Man Linux: Main Page and Category List

## NAME

       fig2sty - LaTeX Layout Generator



## SYNOPSIS

         fig2sty [-debug] [-baselineskip=..] [-fontsize=..]
[-reference=(grid|upper|lower)] [-offset=..]
[-figversion=..] [-nopipe] [-fig2dev=...] input-file

"-debug"
Show base lines in background picture

"-baselineskip", "-fontsize", "-reference", "-offset"
Default values. May be overridden by tags.

"-figversion"
XFig format version which will be fed to "fig2dev" to generate
background picture

"-nopipe"
If your version of "fig2dev" does not accept piped input use this
switch

"-fig2dev"
If you have installed several versions of "fig2dev" you can specify
which version to use



## DESCRIPTION

       fig2sty allows you to generate fancy layouts with LaTeX.  The basic
idea is to draw layout definitions interactively with XFig and
transform this definition to a LaTeX style file. You can then use LaTeX
to typeset your text into arbitrarily shaped polygons (frames) within
the layout.

You can even add any graphical elements in the layout definition which
will appear in the LaTeX output as a background picture.



## Howtodrawthelayoutdefinition.

       Any closed polygon or box may be a frame. But it must not have an area
fill such that your coloured background boxes will not interfere with
your frames. Tags are associated to each frame. A tag is simply a text
"key=value" marked as special and positioned within the bounding box of
the respective frame.  If there are any ambiguities, simply put your
frame and its tags into a compound.

Several key words are interpreted by "fig2sty":

"type"
This tag is compulsory; a frame will not be detected as such if you
don’t provide a type tag. You can have several type tags in your
layout, but you may as well have several frames associated with the
same type tag. Text will then flow between all the frames of common
type. The type tag must neither contain numerals nor any special
characters, just plain alpha characters. If you care about the
ordering of the text flow you can use the following tag:

"n" Text will flow between frames of common type in increasing size of
"n"

"baselineskip"
Text will be typeset in a fixed line grid. Baselineskip provides
the distance between neighbouring lines. All frames of a certain
type share the same baselineskip. If you provide several of them,
the tag within the frame of lowest "n" will be used. If you have
rectangular frames of equal widths only you may set
"baselineskip=any". Text will then by set in ordinary horizontal
mode. For any other kind of frame or multiple rectangulars with
differing width "baselineskip=any" is forbidden.

"reference"
Lines of all frames will be aligned if you assign the value "grid"
to this tag. Other possibilities are "upper"("lower") which will
align to the upper(lower) boundary of your frame. Each frame has
its private reference.

"offset"
You can shift your base lines by an arbitrary amount by providing
the "offset" tag. Each frame has its private offset.

"fontsize"
Used only as minimal distance from top baseline to the upper
boundary of the frame.

LaTeX code to be prepended to the text

"tail"
LaTeX code to be appended to the text

Default values to the tags are "baselineskip=12", "reference=grid",
"offset=0", but you can overwrite these defaults by the command
line options. All dimensions are given in TeX pt.



## Howthebaselinesarechosen

       First of all, you can’t have lines split horizontally.  Lines will
always go from the leftmost intersection of the base line with the
frame to the rightmost one. There is not really any technical reason
for this (except for laziness, one of the virtues...). If you find this
to be a major restriction, please let me know.

The baselines are chosen such that the distance to the reference point
is a multiple of "baselineskip". "fig2sty" will ensure that no textual
element of size "fontsize" will overlap the given frame. This is indeed
the only use of the "fontsize" tag. "fontsize=baselineskip" is usually
a good choice except when using small letters at wide vertical spacing.
The choice of the reference point is based on the "reference" tag. The
value "grid" means that a global reference point (the upper-left corner
of the layout) will be used. This allows text in different frames to be
aligned. "reference=upper" means that text will touch the upper
boundary of your frame. The analogous functionality is provided by the
"lower" value.



## HowtouseinyourLaTeXdocument.

       If you have two frames of type ’"abstract"’ and ’"text"’ within the
layout "fancylayout" you type:

\documentclass{article} \usepackage{figtosty} \usepackage{fancylayout}

\begin{document}
...
\begin{fancylayout}
\begin{figframe}{abstract}
blah blah
\end{figframe}

\begin{figframe}{text}
blah blah
\end{figframe}
\end{fancylayout}

...
\end{document}>



## INSTALLATION

       You will need XFig.pm in your Perl Library path , figtosty.sty in your
LaTeX search path and fig2sty in your binary search path.



## KNOWNBUGS

       list environments do not respect frame boundaries

some mysterious bug with splines

doesn’t work with \sloppy



## AUTHOR

       M. Rohner, rohner@ife.ee.ethz.ch



## CONTRIBUTORS

       Thanks to Tobias Oetiker for his helpful comments



       XFig.pm