Generalmulticol | Dictionary-like Headers

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
legolie
Posts: 3
Joined: Mon Feb 06, 2012 4:51 pm

multicol | Dictionary-like Headers

Post by legolie »

Hi everybody,

I'm a french student and my english is not very good, so I hope I won't make to many "faux-amis"

I'm making a "alumni book" (is it the right expression?) for the school. I want to have a dictionary-like heading, with fancyhdr.

I don't have any problem with monoline heading, but I can't make multiline heading.

A short example to show what happens:

Code: Select all

\documentclass[a4paper,10pt,titlepage,twoside]{article}
\usepackage{multicol}

\begin{document}

\begin{multicols}{3}

\raggedright
\markright{test \\ test}

\end{multicols}

\end{document}
Error:
"! Argument of \mult@@cols has an extra }."

If I change raggedright to \begin{flushleft}\end{flushleft}, the error is:
"! Use of \@item doesn't match its definition.
\@ifnextchar ... \reserved@d =#1\def \reserved@a {"

Without multicol, or \\ or raggedright, it works (at least it compiles)

I very bad at TeX, and I didn't achieve to understand the way markboth works.

I have a standard texlive installation on Linux.

Any ideas?

Regards

Recommended reading 2024:

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

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

legolie
Posts: 3
Joined: Mon Feb 06, 2012 4:51 pm

Re: multicol | Dictionary-like Headers

Post by legolie »

I understood the problem (Actually, someone told me)

raggedright change the definition of \\

so I replaced raggedright by \setlength{\rightskip}{\fill}

And it works
Last edited by legolie on Mon Feb 06, 2012 6:19 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

multicol | Dictionary-like Headers

Post by Stefan Kottwitz »

Hi,

you could use \newline instead of \\.

Code: Select all

\markright{test\newline test}
Stefan
LaTeX.org admin
legolie
Posts: 3
Joined: Mon Feb 06, 2012 4:51 pm

Re: multicol | Dictionary-like Headers

Post by legolie »

Actually, it compiled with newlin, but it messes up alignements in the headings.

I couldn't flushright the mark (it was strange, it looks like a combination of centering and flushright).

\\ did what I wanted to, so I prefered to use \\.

But thanks for the proposition.
Post Reply