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?










share|improve this question






















  • 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










  • Could you add an example of the code you have to manage?
    – egreg
    3 hours ago















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?










share|improve this question






















  • 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










  • Could you add an example of the code you have to manage?
    – egreg
    3 hours ago













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?










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









richard

349211




349211












  • 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










  • 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










  • 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
















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










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 top, <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):



enter image description here



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.






share|improve this answer





















  • Perfect. Thanks. I hadn't realised parbox had an optional height parameter.
    – richard
    4 hours ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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

























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 top, <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):



enter image description here



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.






share|improve this answer





















  • Perfect. Thanks. I hadn't realised parbox had an optional height parameter.
    – richard
    4 hours ago















up vote
2
down vote



accepted










You can set the paragraph inside a parbox[<pos>][<height>]{<width>}{<stuff>} where <pos> is set to top, <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):



enter image description here



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.






share|improve this answer





















  • Perfect. Thanks. I hadn't realised parbox had an optional height parameter.
    – richard
    4 hours ago













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 top, <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):



enter image description here



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.






share|improve this answer












You can set the paragraph inside a parbox[<pos>][<height>]{<width>}{<stuff>} where <pos> is set to top, <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):



enter image description here



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.







share|improve this answer












share|improve this answer



share|improve this answer










answered 4 hours ago









Werner

433k609531635




433k609531635












  • 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
















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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)