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.

I am trying to use the chronology package in a report that includes babel. My distribution : pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)

On below my MWE :

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}

\usepackage{chronology}
\begin{document}
\begin{chronology}[5]{1983}{2010}{10cm}[7cm]
\event{1984}{\color{blue}{one}}
\event[1985]{1986}{\small{two}}
\event{\decimaldate{25}{12}{2001}}{\huge{three}}
\end{chronology}
\vspace{5cm}

\begin{chronology}*[5]{1983}{2010}{10cm}
\event{1984}{\color{blue}{one}}
\event[1985]{1986}{\small{two}}
\event{\decimaldate{25}{12}{2001}}{\huge{three}}
\end{chronology}
\vspace{5cm}

\begin{chronology}[5]{1983}{2010}{10cm}[13cm]
\event{1984}{\color{blue}{one}}
\event[1985]{1986}{\small{two}}
\event{\decimaldate{25}{12}{2001}}{\huge{three}}
\end{chronology}
\end{document}

Actually, I get this error :

 ! Paragraph ended before \pgffor@next was complete.

However, when I remove the line

\usepackage[francais]{babel}

The compilation is working fine. How can I fix it please ?

share|improve this question

closed as off-topic by LaRiFaRi, egreg, Papiro, Jubobs, Johannes_B Aug 20 at 10:43

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
\usetikzlibrary{babel} after loading package chronology –  Johannes_B Apr 16 '14 at 8:38
    
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Johannes_B Apr 16 '14 at 8:38
    
@Johannes_B : I receive the following error ! I can't find file tikzlibrarybabel.code.tex'. –  cherryone Apr 16 '14 at 8:45
1  
@Johannes_B my Tex distrubution : pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) I think it is the latest. –  cherryone Apr 16 '14 at 8:49
4  
I'm voting to close this question as off-topic because it is about a bug which has been fixed in version 1.1.1 of the package chronology. –  LaRiFaRi Aug 20 at 10:01

2 Answers 2

up vote 6 down vote accepted

Use:

[...]
\usepackage{chronology}
\let\CHRONOLOGY\chronology
\let\endCHRONOLOGY\endchronology
\def\chronology{\shorthandoff{;}\CHRONOLOGY}
\def\endchronology{\endCHRONOLOGY\shorthandon{;}}
[...]

The ; is an active character in french, but used in TikZ. An environment like chronology is internally defined as \chronology and \endchronology. I save the old definitions, insert the active character handling and then use the old definition.

share|improve this answer
1  
Will it cause an issue in the next lines of my report (ie if I use ;) ? What are the consequences of these two commands please ? –  cherryone Apr 16 '14 at 8:59
    
see my edited answer. In that case there should be no problems. The redefinition makes The ; inactibe inside the chronology environment. Ouside it has the default behaviour. –  Herbert Apr 16 '14 at 9:01
1  
It seems to solve the issue. Do you mind explaining a bit more what was the issue and the commands please ? I wish I could understand what these 4 lines are doing. –  cherryone Apr 16 '14 at 9:06

As @herbert already explained in his answer, ; and other characters are active in french. This is conflicting with TikZ, which is using ; to end a drawing command.

To resolve the issue, one can use the tikzlibrary babel, which isnt doing more than

\tikzset{
  handle active characters in code,
  handle active characters in nodes
}

Now, you can still use the shorthands in your nodes.

As there are other possible conflicts with active chararcters using build in functionality seems reasonable. You can find more information about whats going on in the tikz-documentation.

Putting it all in a compilable example gives:

\listfiles
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}

\usepackage{chronology}
%\tikzset{
%  handle active characters in code,
%  handle active characters in nodes
%}
%or
\usetikzlibrary{babel}
\begin{document}
\begin{chronology}[5]{1983}{2010}{10cm}[7cm]
\event{1984}{\color{blue}{one?}}
\event[1985]{1986}{\small{two;}}
\event{\decimaldate{25}{12}{2001}}{\huge{three!}}
\end{chronology}
\end{document}
share|improve this answer

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