i'd like to write words that fit between two lines.

i found the following code:




\Huge Stackexchange

what i like to get is something like this:

edit: to be more clear ... sorry!

i'd like the lines to be the full width of the page with only some characters in front of the two lines.


The following example puts the text in a box, then it reduces the height and depth to put a frame (\fbox) without margin around the shrinked box. The original height and depth is kept by \vphantom.


    \vphantom{\copy0}% keep original height and depth
    \sbox2{x}% new height
    \ht0=\ht2 %
    \dp0=0pt %
    \setlength{\fboxsep}{0pt}% \fbox without additional inner margins



Half open box, spanning the line

The following example uses a tabular environment with one column that spans the whole line width. The two lines are set at the beginning of the row.

The code uses plain TeX macros and primitives. Literature:

The example file:




    \vbox{\hrule width\linewidth}%
    \raise\ht0\vbox{\hrule width\linewidth}%
  \copy0 %



  • thanx! that is nearly that what i want to get! but how can i make the lines to be full width of the page? do you have a reference for sbox0, sbox2, ht0, ht2 ... i haven't found anything how to use this to modify your example. – UweThom Oct 19 '12 at 7:58
  • ok ... once again my fault :( but how can i add a vertical "|" at the end? i left it in my example to visualize that the end of the two lines is not the end ... – UweThom Oct 19 '12 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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