TeXnik - Tips TeX and LaTeX

Welcome to the TeXnik website (under construction)

Boxes and Frames
TUG logo

Main page

Search CTAN:


Google c.t.t.

Google d.c.t.t.



Boxing formulaes  |  Boxing Images with a Caption |  Boxing over columns |  Boxing text |  Boxing whole page |  Colored Boxes |  Pagebreak inside a framed Box |  Shadow boxes  | 

Pagebreak inside a framed Shadow Box

You need the packages framed and fancybox.

Shadow Boxes

Boxing Images with a Caption

for a default solution look at package hvfloat. Is the image/table larger than one page try the following. It is a special one for images/tables which are higher than one page. You need package framed.

In the preamble:

and in the text use:
\xcaption{the caption}

Boxing/Framing Text

Boxing a text over the whole columnwidth is very easy:

  1. in a textline: \fbox{myText}
  2. over the whole column or smaller by choosing a specific boxwidth instead of \columnwidth, e.g. 5cm or 0.5\columnwidth
    ..the text the text the text
    If you want framed text over more than one page choose package framed, and than in text
    ... the text ...

Colored Boxes/Frames

A colored box is possible with package color and command \colorbox{mycolor} instead of command \fbox

Boxing over more than one column

Boxing over two or more colums is possible when you replace \columnwidth with \textwidth, but remember, that LaTeX reservs space only for the actual column. Therefore this makes sense in headers or footers, which have always \textwidth-format, which is unindependent from the value of the columns.

Boxing the whole page

A frame around the whole page is possible with packages fancxbox and pstricks. Write in LaTeX-preamble

The values for LowerLeft corresponds to the upper left textarea. These values are right for the komascript-style. Change them for other classes. In Text write anywhere at the page:
the best way to put a frame around the whole page is to export the dvi output to a ps-file and than
psnup -b20 -d input.ps output.ps
which gives a frame with a distance of 20pt from the margins of the predefined a4-page. There is also package framed.

local time: Fri Jun 18 00:55:24 CEST 2021 ; file is: 725.591296296296 days old
contact webmaster _at_ TeXnik.de