Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sorry, but until someone comes up with a better title, I have to stick to this one for my question. I am currently using \marginnote for the first time in Latex and I want to use it on a twocolumn, twoside document. The best way to go for me is to place all margin notes on the outside, which works well so far. However I want to add a visual aid to show if the note corresponds to the inner or outer column. If the note belongs to the outer column, no hint should be given. If the note belongs to the inner column, an arrow (or a similar guide) should be displayed. The following image provides an example what it would look like on an odd page: Margins with guide/hint on an odd page

Can you show me how to use a marginpar or marginnote (or whatever) that accomplishes this automatically (or at least after some command definitions)?

share|improve this question

1 Answer 1

You can use \if@firstcolumn to detect which column you are in and if true print an extra symbol. The easiest place to hook in is the \raggedrightmarginnote macro

Sample output

\documentclass[twocolumn]{article}

\usepackage[margin=3cm,marginparwidth=2cm]{geometry}
\usepackage{marginnote}

\edef\marginnotetextwidth{\the\textwidth}

\makeatletter
\renewcommand*{\raggedrightmarginnote}{\raggedright\if@firstcolumn\(
\triangleleft \) \fi}
\makeatother

\usepackage{lipsum} %For dummy text

\begin{document}

\lipsum[1]
\marginnote{First note}

\lipsum[2-4]
\marginnote{Second note}

\lipsum[5-6]
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.