Vspace to an absolute page offset
up vote
1
down vote
favorite
I'm producing a series of flash cards in LaTeX (well, actually XeLaTeX). Each card has a title, a short paragraph of text, and a table, which is the main purpose of the card. Occasionally the paragraph references a footnote (which is laid out in the normal way at the foot of the card). The tables all occupy the same vertical height, but the paragraph above and the footnotes below (if present) can take up varying amounts of space.
I want to lay out the cards so the table appears in the same vertical position on each card, regardless of how much text there is above or below. Because of the way I'm generating the cards, I have very limited control over the LaTeX source, but unlimited control over the .sty
file. In particular, I cannot wrap the table in a textblock
(e.g. as per this question). What I really want is a way of doing vspace to 4cm
, i.e. with an absolute page offset. Is anything like this possible?
positioning vspace
add a comment |
up vote
1
down vote
favorite
I'm producing a series of flash cards in LaTeX (well, actually XeLaTeX). Each card has a title, a short paragraph of text, and a table, which is the main purpose of the card. Occasionally the paragraph references a footnote (which is laid out in the normal way at the foot of the card). The tables all occupy the same vertical height, but the paragraph above and the footnotes below (if present) can take up varying amounts of space.
I want to lay out the cards so the table appears in the same vertical position on each card, regardless of how much text there is above or below. Because of the way I'm generating the cards, I have very limited control over the LaTeX source, but unlimited control over the .sty
file. In particular, I cannot wrap the table in a textblock
(e.g. as per this question). What I really want is a way of doing vspace to 4cm
, i.e. with an absolute page offset. Is anything like this possible?
positioning vspace
You "cannot wrap the table in atextblock
". Okay, what else can you not do? Can you wrap thetabular
inside something else? What about wrapping the paragraph in something? It would be ideal if you could identify all restrictions/limitations as well as some sample (compilable) code to work with.
– Werner
4 hours ago
The constraint is that I can only insert code before the table, but I cannot put anything after the table, not anend{something}
or even a single close brace. I have (almost) complete control over the formatting of the title and paragraph, and can wrap these in something if that helps. If there's an environment that turns the paragraph into a fixed-height box, I can easily use that, so long as it doesn't alter the paragraph indentation.
– richard
4 hours ago
Could you add an example of the code you have to manage?
– egreg
3 hours ago
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm producing a series of flash cards in LaTeX (well, actually XeLaTeX). Each card has a title, a short paragraph of text, and a table, which is the main purpose of the card. Occasionally the paragraph references a footnote (which is laid out in the normal way at the foot of the card). The tables all occupy the same vertical height, but the paragraph above and the footnotes below (if present) can take up varying amounts of space.
I want to lay out the cards so the table appears in the same vertical position on each card, regardless of how much text there is above or below. Because of the way I'm generating the cards, I have very limited control over the LaTeX source, but unlimited control over the .sty
file. In particular, I cannot wrap the table in a textblock
(e.g. as per this question). What I really want is a way of doing vspace to 4cm
, i.e. with an absolute page offset. Is anything like this possible?
positioning vspace
I'm producing a series of flash cards in LaTeX (well, actually XeLaTeX). Each card has a title, a short paragraph of text, and a table, which is the main purpose of the card. Occasionally the paragraph references a footnote (which is laid out in the normal way at the foot of the card). The tables all occupy the same vertical height, but the paragraph above and the footnotes below (if present) can take up varying amounts of space.
I want to lay out the cards so the table appears in the same vertical position on each card, regardless of how much text there is above or below. Because of the way I'm generating the cards, I have very limited control over the LaTeX source, but unlimited control over the .sty
file. In particular, I cannot wrap the table in a textblock
(e.g. as per this question). What I really want is a way of doing vspace to 4cm
, i.e. with an absolute page offset. Is anything like this possible?
positioning vspace
positioning vspace
asked 4 hours ago
richard
349211
349211
You "cannot wrap the table in atextblock
". Okay, what else can you not do? Can you wrap thetabular
inside something else? What about wrapping the paragraph in something? It would be ideal if you could identify all restrictions/limitations as well as some sample (compilable) code to work with.
– Werner
4 hours ago
The constraint is that I can only insert code before the table, but I cannot put anything after the table, not anend{something}
or even a single close brace. I have (almost) complete control over the formatting of the title and paragraph, and can wrap these in something if that helps. If there's an environment that turns the paragraph into a fixed-height box, I can easily use that, so long as it doesn't alter the paragraph indentation.
– richard
4 hours ago
Could you add an example of the code you have to manage?
– egreg
3 hours ago
add a comment |
You "cannot wrap the table in atextblock
". Okay, what else can you not do? Can you wrap thetabular
inside something else? What about wrapping the paragraph in something? It would be ideal if you could identify all restrictions/limitations as well as some sample (compilable) code to work with.
– Werner
4 hours ago
The constraint is that I can only insert code before the table, but I cannot put anything after the table, not anend{something}
or even a single close brace. I have (almost) complete control over the formatting of the title and paragraph, and can wrap these in something if that helps. If there's an environment that turns the paragraph into a fixed-height box, I can easily use that, so long as it doesn't alter the paragraph indentation.
– richard
4 hours ago
Could you add an example of the code you have to manage?
– egreg
3 hours ago
You "cannot wrap the table in a
textblock
". Okay, what else can you not do? Can you wrap the tabular
inside something else? What about wrapping the paragraph in something? It would be ideal if you could identify all restrictions/limitations as well as some sample (compilable) code to work with.– Werner
4 hours ago
You "cannot wrap the table in a
textblock
". Okay, what else can you not do? Can you wrap the tabular
inside something else? What about wrapping the paragraph in something? It would be ideal if you could identify all restrictions/limitations as well as some sample (compilable) code to work with.– Werner
4 hours ago
The constraint is that I can only insert code before the table, but I cannot put anything after the table, not an
end{something}
or even a single close brace. I have (almost) complete control over the formatting of the title and paragraph, and can wrap these in something if that helps. If there's an environment that turns the paragraph into a fixed-height box, I can easily use that, so long as it doesn't alter the paragraph indentation.– richard
4 hours ago
The constraint is that I can only insert code before the table, but I cannot put anything after the table, not an
end{something}
or even a single close brace. I have (almost) complete control over the formatting of the title and paragraph, and can wrap these in something if that helps. If there's an environment that turns the paragraph into a fixed-height box, I can easily use that, so long as it doesn't alter the paragraph indentation.– richard
4 hours ago
Could you add an example of the code you have to manage?
– egreg
3 hours ago
Could you add an example of the code you have to manage?
– egreg
3 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
You can set the paragraph inside a parbox[<pos>][<height>]{<width>}{<stuff>}
where <pos>
is set to t
op, <width>
is fixed at linewidth
and you specify something in <height>
that accommodates all the paragraphs. Here's an example that uses 20baselineskip
(to fit 20 lines of text):
documentclass{article}
usepackage{geometry,lipsum}
geometry{
papersize = {6in,5in}, % A flash card
margin = 0.5in
}
setlength{parindent}{0pt}
newlength{parboxheight}
setlength{parboxheight}{20baselineskip}
begin{document}
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[1]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[2]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[3]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[4]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
end{document}
Using minipage
is also a possibility.
Perfect. Thanks. I hadn't realisedparbox
had an optional height parameter.
– richard
4 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You can set the paragraph inside a parbox[<pos>][<height>]{<width>}{<stuff>}
where <pos>
is set to t
op, <width>
is fixed at linewidth
and you specify something in <height>
that accommodates all the paragraphs. Here's an example that uses 20baselineskip
(to fit 20 lines of text):
documentclass{article}
usepackage{geometry,lipsum}
geometry{
papersize = {6in,5in}, % A flash card
margin = 0.5in
}
setlength{parindent}{0pt}
newlength{parboxheight}
setlength{parboxheight}{20baselineskip}
begin{document}
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[1]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[2]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[3]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[4]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
end{document}
Using minipage
is also a possibility.
Perfect. Thanks. I hadn't realisedparbox
had an optional height parameter.
– richard
4 hours ago
add a comment |
up vote
2
down vote
accepted
You can set the paragraph inside a parbox[<pos>][<height>]{<width>}{<stuff>}
where <pos>
is set to t
op, <width>
is fixed at linewidth
and you specify something in <height>
that accommodates all the paragraphs. Here's an example that uses 20baselineskip
(to fit 20 lines of text):
documentclass{article}
usepackage{geometry,lipsum}
geometry{
papersize = {6in,5in}, % A flash card
margin = 0.5in
}
setlength{parindent}{0pt}
newlength{parboxheight}
setlength{parboxheight}{20baselineskip}
begin{document}
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[1]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[2]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[3]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[4]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
end{document}
Using minipage
is also a possibility.
Perfect. Thanks. I hadn't realisedparbox
had an optional height parameter.
– richard
4 hours ago
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You can set the paragraph inside a parbox[<pos>][<height>]{<width>}{<stuff>}
where <pos>
is set to t
op, <width>
is fixed at linewidth
and you specify something in <height>
that accommodates all the paragraphs. Here's an example that uses 20baselineskip
(to fit 20 lines of text):
documentclass{article}
usepackage{geometry,lipsum}
geometry{
papersize = {6in,5in}, % A flash card
margin = 0.5in
}
setlength{parindent}{0pt}
newlength{parboxheight}
setlength{parboxheight}{20baselineskip}
begin{document}
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[1]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[2]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[3]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[4]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
end{document}
Using minipage
is also a possibility.
You can set the paragraph inside a parbox[<pos>][<height>]{<width>}{<stuff>}
where <pos>
is set to t
op, <width>
is fixed at linewidth
and you specify something in <height>
that accommodates all the paragraphs. Here's an example that uses 20baselineskip
(to fit 20 lines of text):
documentclass{article}
usepackage{geometry,lipsum}
geometry{
papersize = {6in,5in}, % A flash card
margin = 0.5in
}
setlength{parindent}{0pt}
newlength{parboxheight}
setlength{parboxheight}{20baselineskip}
begin{document}
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[1]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[2]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[3]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
clearpage
parbox[t][parboxheight]{linewidth}{%
strut
lipsum*[4]% Your paragraph here
strut
}
{centering texttt{tabular} herepar}
end{document}
Using minipage
is also a possibility.
answered 4 hours ago
Werner
433k609531635
433k609531635
Perfect. Thanks. I hadn't realisedparbox
had an optional height parameter.
– richard
4 hours ago
add a comment |
Perfect. Thanks. I hadn't realisedparbox
had an optional height parameter.
– richard
4 hours ago
Perfect. Thanks. I hadn't realised
parbox
had an optional height parameter.– richard
4 hours ago
Perfect. Thanks. I hadn't realised
parbox
had an optional height parameter.– richard
4 hours ago
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463240%2fvspace-to-an-absolute-page-offset%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You "cannot wrap the table in a
textblock
". Okay, what else can you not do? Can you wrap thetabular
inside something else? What about wrapping the paragraph in something? It would be ideal if you could identify all restrictions/limitations as well as some sample (compilable) code to work with.– Werner
4 hours ago
The constraint is that I can only insert code before the table, but I cannot put anything after the table, not an
end{something}
or even a single close brace. I have (almost) complete control over the formatting of the title and paragraph, and can wrap these in something if that helps. If there's an environment that turns the paragraph into a fixed-height box, I can easily use that, so long as it doesn't alter the paragraph indentation.– richard
4 hours ago
Could you add an example of the code you have to manage?
– egreg
3 hours ago