TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Since it is impossible to use \vfill inside a framebox, is there any way of getting the current height position of text? I want to fill in a framebox so that it uses all the space left on a page, instead of trial and error...

share|improve this question
Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}). – Claudio Fiandrino Dec 27 '12 at 11:12
Also, you can use backticks ` to mark your inline code. – Torbjørn T. Dec 27 '12 at 11:13
possible duplicate of How to compute the remaining space on the current page – Stephen Dec 27 '12 at 18:36
Check out [tex.stackexchange.com/a/17813/22413]. – A.Ellett Dec 27 '12 at 20:43

Is there any way of getting the current height position of text?

If this were your only question, then you have the answer in Aditya's \measurepage in How to define a figure size so that it consumes the rest of a page?

I don't consider your question as duplicate though since it is specific to using \framebox which cannot take a macro directly as height using \framebox(<width>,<height>){<>} syntax. A possibility using Aditya's \measurepage macro is to use \parbox as in the MWE below.



%Here is the next text

The showframe option of the geometry was just used here so that you can see where the text ends.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.