Am 09.04.2009 um 22:14 schrieb Design Department:

Just tried the following snippet on the live.contextgarden.net with no joy:
The layer content appears on a single line, whether I use \par, \\,
\endgraf, \crlf or no line ending at all.

To help you I will explain why your setup did not work.

TeX use boxes to place text, two different types are available
and they are horizontal (\hbox) and vertical (\vbox) boxes.

Text in a horizontal box is placed in a single line and \par \vskip ...
is ignored, if your text is too long it runs over the right margin, only
text in a vertical box is placed in multiple lines.

The pure \setlayer command use a horizontal box for the content
and did therefore not work for you, \setlayerframed is (simplified)
a combination of \setlayer and \frame, the definition looks like
\setlayer[name][setup]{\framed{text}}.

The \framed command itself can act as horizontal or vertical box
dependent on the setup, by default it acts like a horizontal box,
to let it act as vertical box two setup need to be done
(1) the alignment (format) of the text needs to be set with
'align=left|normal|...' and (2) it needs either a width or
a height with is done with 'width=...' or 'height=...' or
'lines=...'.

Your layer command should now look like:

\setlayerframed
  [TicketSummary]
  [hoffset=.5\backspace,
   voffset=2.5in,
   width=3cm,
   align=right]
  {\bold{Client Name:}\\
   Acme Corporation\\
   \bold{Location of Work:}
   Main warehouse}

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to