TeXnik - Tips TeX and LaTeX


Welcome to the TeXnik website (under construction)

\marginpar Command"
TUG logo

Main page

Index
UK FAQ
Documentation
Software
CTAN
Search CTAN:

Statistics

Google c.t.t.

Google d.c.t.t.

 


 


Changing font |  Centered font |  Double margin notes |  General use |  Mathmode | 


Left and right margin notes


Margin notes in math mode


General use of margin notes

For example use of
\marginpar[a text left-outside the text inside the margin]{a text right-outside the text inside the margin}
gives for the twoside mode
a right marginnote
a left marginnote
For the oneside mode there are only right margins.

The koma-class defines a new command \marginline[1] which works like \marginpar but its a little bit easier to handle. Therefore it makes sense to modify the marginpar command like:

\let\oldmarginpar\marginpar
\renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft\small\sf #1]{\raggedright\small\sf #1}}
Now \marginpar can be used with only one parameter
\marginpar{a text outside the text inside the margin}
The marginnote appears in another fontstyle:
a right marginnote
a left marginnote

The notes are automatically right or left set.

The other commands which depends to \marginpar are

  1. \reversemarginpar
  2. \normalmarginpar
  3. \marginparwidth
  4. \marginparsep
  5. \marginparpush


Changing Fontsize
To get another font or alignment write in the preamble (f.ex. another fontsize and raggedright)
\let\margin\marginpar
\newcommand\myMargin[1]{\margin{\raggedright\scriptsize #1}}
\renewcommand{\marginpar}[1]{\myMargin{#1}}


Marginpars for math equations
To get this work put the eqaution into a minibox:
[...]

text text text

\begin{minipage}{\linewidth}
\[
f(x)=\int \frac{1}{x} dx
\]
\end{minipage}%
\marginpar{blah\\blubber}

text text text
[...]

local time: Sat Aug 24 02:09:50 CEST 2019 ; file is: 57.2650231481481 days old
contact webmaster _at_ TeXnik.de