% signal=squid

\startcomponent excursion-en-margintexts

\enablemode[**en-us]

\project excursion

\startchapter[title=Margin texts,reference=chap:inmargin]

\index{margin text}

\Command{\tex{margintext}}
\Command{\tex{inmargin}}
\Command{\tex{inleft}}
\Command{\tex{inright}}

It is very easy to put text in the margin. You just use \type{\inmargin}.

\shortsetup{margindata:instance:inmargin}

You may remember one of the earlier examples.

\startbuffer[marginpicture]
\inoutermargin
  {\externalfigure
     [excursion-23]
     [width=.6\marginwidth]}
\stopbuffer

\typebuffer[marginpicture]

\getbuffer[marginpicture]

This would result in a figure in the \pagereference [marginpicture] margin. You
can imagine that it looks quite nice in some documents. But be careful. The
margin is rather small so the figure could become very marginal.

You can set up margin texts with

\shortsetup{setupmargindata}

Other commands that you can use for forcing text into the margin are listed in
\in{table}[tab:margincommands].

\startplacetable
  [location=here,
   reference=tab:margincommands,
   title={Overview of margin commands}]
  \bTABLE
    \bTR \bTD Command               \eTD \bTD Meaning              \eTD \eTR
    \bTR \bTD \type{\ininner}       \eTD \bTD text in inner margin \eTD \eTR
    \bTR \bTD \type{\inouter}       \eTD \bTD text in outer margin \eTD \eTR
    \bTR \bTD \type{\inright}       \eTD \bTD text in right margin \eTD \eTR
    \bTR \bTD \type{\inleft}        \eTD \bTD text in left margin  \eTD \eTR
    \bTR \bTD \type{\inmargin}      \eTD \bTD text in the margin   \eTD \eTR
    \bTR \bTD \type{\margintext}    \eTD \bTD text in the margin   \eTD \eTR
  \eTABLE
\stopplacetable

The commands \type{\inmargin}, \type{\inleft} and \type{\inright} all have the
same function. In a two sided document \type{\inmargin} puts the margin text in
the correct margin. The \type{\\} is used for line breaking.

A few other examples are shown in the text below.

\startbuffer
The Ridderstraat (Street of knights)
\inmargin{\tfx\setupinterlinespace Street of\\Knights} is an
obvious name. In the 14th and 15th centuries, nobility and
prominent citizens lived in this street. Some of their big
houses were later turned into poorhouses
\inright[]{\tfx poorhouse} and old peoples homes.

Up until \inleft[]{\tfx 1940}1940 there was a synagog in the
Ridderstraat. Some 40 Jews gathered there to celebrate their
sabbath. During the war all Jews were deported to Westerbork
and then to the extermination camps in Germany and Poland.
None of the Jewish families returned. The synagog was
knocked down in 1958.
\stopbuffer

\typebuffer

The example above would look like this:

\getbuffer

If you want to place more extensive text blocks in the margin there is the
command

\shortsetup{startmarginblock}

and the accompanying command

\shortsetup{setupmarginblock}

\stopchapter

\stopcomponent
