Text FormattingHyphenation in marginpar

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ernste
Posts: 1
Joined: Tue Jan 19, 2010 9:50 pm

Hyphenation in marginpar

Post by ernste »

I am using sinple margin labels in my German text with the marginlabel command which I created as:
\newcommand{\marginlabel}[1]
{\mbox{}\marginpar[\footnotesize\raggedleft\hspace{0pt}#1]
{\footnotesize\raggedright\hspace{0pt}#1}}

I usually write these margin labels in footnotesize. Strangely enough the text in the margin labels is not hyphenated.

Why???

What can I do about it???

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Hyphenation in marginpar

Post by localghost »

Hyphenation in narrow columns is always tricky. Since you are writing in German, you should generally enable Cork Encoding for better hyphenation (if not done yet).

Code: Select all

\usepackage{T1]{fontenc}
The marginnote package improves typesetting of marginals notes. In your case further enhancements might come by using the ragged2e package.

Please use the code environment to tag code as such (see Board Rules). This keeps posts clear and legible.


Best regards and welcome to the board
Thorsten
Post Reply