TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider the MWE below:

\documentclass[10pt,twoside,onecolumn,openright,draft]{memoir}
\usepackage{fontspec}
\usepackage{filecontents}
\usepackage{calc}
\usepackage[french]{babel}
\usepackage{mparhack}
\usepackage{csquotes}
\usepackage[authordate,strict,backend=biber,babel=other]{biblatex-chicago}

%\let\oldmarginpar\marginpar
%\renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft\footnotesize\hspace{0pt}#1]%
%{\raggedright\footnotesize\hspace{0pt}#1}}

\begin{filecontents}{references.bib}
@book{Thomsen:SL,
    author = {Thomsen, Marie-Louise},
title = {The Sumerian Language},
    subtitle = {An Introduction to its History and Grammatical Structure},
    shorttitle = {Sumerian Language},
    shorthand = {SL},
    edition = {2},
    series = {Mesopotamia Copehagen Studies in Assyriology},
    number = {10},
    location = {Copenhagen},
    publisher = {\foreignlanguage{danish}{Akademisk Forlag}},
    date = {1987},
    year = {1987}
}
\end{filecontents}
\bibliography{references.bib}

\begin{document}
Texte\marginpar{\cite[§228]{Thomsen:SL}} et encore.
\end{document}

This compiles fine. However, when I uncomment the redefinition of marginpar (which I've used successfully for a few years), I get

./minimal:33: Argument of \blx@citeargs@i has an extra }

Either the redefinition is problematic or else this causes a conflict of some kind with biblatex-chicago.

Any thoughts?

share|improve this question
up vote 8 down vote accepted

You hit a problem if there is ever a ] in the argument as then parsing for the optional argument goes wrong, so you need a {} group to hide the inner ]:

\let\oldmarginpar\marginpar
\renewcommand\marginpar[1]{\-\oldmarginpar[{\raggedleft\footnotesize\hspace{0pt}#1\par}]%
{\raggedright\footnotesize\hspace{0pt}#1}}
share|improve this answer
    
Thank-you, that makes good sense, and I'd never have thought of it! – K.G. Feuerherm Oct 8 '12 at 17:10
    
This was a lifesaver. I never would have known. – John Peyton Mar 27 '15 at 19:24

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.