Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hyperref with multiple sub-files

620 views
Skip to first unread message

Patrick Berthoud

unread,
Apr 30, 2000, 3:00:00 AM4/30/00
to
Hi,

I would like to use the "hyperref" package to produce hyperlinks in my
thesis, which is built with a main document and many different included
chapters (separate files). If I just compile the first pages without any
references to other chapters, everything works fine. But when LaTeX
tries to make hyperlink with other files (the chapters), I get the
following error message : "missing \endcsname inserted". I've tried to
use the package "xr-hyper.sty" that comes with hyperref (released
93-97), but without success. Could anyboby advice me ?

Thanks

--
Patrick Berthoud
JILA - University of Colorado
Campus Box 440, Boulder, Colorado 80309-0440, USA
Phone : ++1 (303) 492-5585 (office) / ... 2-6839 (lab)
Fax : ++1 (303) 492-5235 (reception desk)
E-mail : mailto:pbe...@jilau1.colorado.edu
Web : http://jilawww.colorado.edu/


JLP

unread,
May 1, 2000, 3:00:00 AM5/1/00
to
can you show a sample of what you are doing?

Typically I use the following:

\chapter{Chapter One}
\input{chap1.tex} % this is chapter 1 file

using this method allows me to put chap1 anywhere I please it the file
chap1.tex doesn't make any reference to being chapter 1, so it can be
used anywhere.

Otherwise there is no difference when using \section-ing commands with
or without hyperref. They work the same.

jeremy


Sent via Deja.com http://www.deja.com/
Before you buy.

Patrick Berthoud

unread,
May 1, 2000, 3:00:00 AM5/1/00
to
I use the following in my preambule

\documentclass{Book}
\includeonly{Intro}
\usepackage[dvips,...]{hyperref}
...
\begin{document}
\include{Intro}
\include{Exp}
\end{document}

The file Intro.tex looks like this :

\chapter{Introduction}
\label{chap:intro}
\section{Historique}
\label{sec:intro:histo}
...
blablabla

When LaTeX comes to references \ref{chap:exp} in the Intro.tex, whose
label is placed in Exp.tex , it breaks with error message
! Missing \endcsname inserted.
How to solve the problem ?
Thanks

Patrick


JLP wrote:

--

Heiko Oberdiek

unread,
May 1, 2000, 3:00:00 AM5/1/00
to
Patrick Berthoud <pbe...@jilau1.colorado.edu> wrote:

>\documentclass{Book}

I know the document class book.cls, but what is Book.cls?

>\includeonly{Intro}
>\usepackage[dvips,...]{hyperref}
>...
>\begin{document}
>\include{Intro}
>\include{Exp}
>\end{document}
>
>The file Intro.tex looks like this :
>
>\chapter{Introduction}
>\label{chap:intro}
>\section{Historique}
>\label{sec:intro:histo}
>...
>blablabla
>
>When LaTeX comes to references \ref{chap:exp} in the Intro.tex, whose
>label is placed in Exp.tex , it breaks with error message
>! Missing \endcsname inserted.
>How to solve the problem ?

* No idea, because I cannot reproduce the error.
(If there are non-hyperref .aux files, then I get
another error message.)
* You should make a minimal test file that reproduces
the error.
* Which versions you are using?

Yours sincerely
Heiko <ober...@ruf.uni-freiburg.de>

Giuseppe Bilotta

unread,
May 2, 2000, 3:00:00 AM5/2/00
to
> Hi,
>
> I would like to use the "hyperref" package to produce hyperlinks in my
> thesis, which is built with a main document and many different included
> chapters (separate files). If I just compile the first pages without any
> references to other chapters, everything works fine. But when LaTeX
> tries to make hyperlink with other files (the chapters), I get the
> following error message : "missing \endcsname inserted". I've tried to
> use the package "xr-hyper.sty" that comes with hyperref (released
> 93-97), but without success. Could anyboby advice me ?
>
> Thanks

First of all, make sure you have the last hyperref version; then try a
"clean" compilation; that is, delete all .aux, .lot, .lof etc files before
compiling the first time; I noticed that adding hyperref to a
perfecly-behaving LaTeX document already compiled would break things up,
because hyperrref changes the .aux format, and cannot cope with the original
format (there should be a warning when LaTeX reads the .aux files at the
beginning of the compilation process).

If this is not the problem, could you please post a short example?

--
Giuseppe Bilotta
bour...@bigfoot.com

=============================================
This paper contains much that is new and much that is true.
Unfortunately, that which is true is not new
and that which is new is not true.
(Wolfgang Pauli (attr.))
=============================================


Patrick Berthoud

unread,
May 2, 2000, 3:00:00 AM5/2/00
to Giuseppe Bilotta
Here is a short sample of document:

\documentclass{book}
%
%Packages
\usepackage[latin1]{inputenc} % pour clavier Windows
\usepackage[T1]{fontenc} % pour caractères accentués
%
\usepackage{ae} % pour simuler les fontes EC type1
\usepackage{aeguill} % pour guillements francais type 1
%\usepackage[frenchb]{babel} % pour langue francaise par Babel
%
\usepackage{color}
\usepackage[dvips,colorlinks]{hyperref} % pour hyper-references
%
\begin{document}
%


\chapter{Introduction} \label{chap:intro}

Voici le chapitre expérimental (second chapter) : \ref{chap:exp}
%
\chapter{Dispositif expérimental} \label{chap:exp}
Voici le chapitre d'introduction (first chapter) :
\ref{chap:intro}
%
\end{document}

Everything works fine even if I put chapters (Introduction) and chapter
(Dispositif expérimental) in separate files and I include them with \include
commands. My problem seems to come from the package \usepackage[frenchb]{babel}.
If I use this to typeset in french, I get the folllowing error :

Chapitre 1.
! Missing \endcsname inserted.
<to be read again>
\unskip
l.17 ... (second chapter) : \ref{chap:exp}

Do you know what to do ?

Thanks

Patrick


Giuseppe Bilotta wrote:

--

Heiko Oberdiek

unread,
May 3, 2000, 3:00:00 AM5/3/00
to
Patrick Berthoud <pbe...@jilau1.colorado.edu> wrote:

If this package is the problem, a minimal test file looks such as:

\documentclass{book}
\usepackage[frenchb]{babel}
\begin{document}


\chapter{Introduction}\label{chap:intro}

\ref{chap:intro}
\end{document}

Only _6_ lines!

>If I use this to typeset in french, I get the folllowing error :
>
>Chapitre 1.
>! Missing \endcsname inserted.
><to be read again>
> \unskip
>l.17 ... (second chapter) : \ref{chap:exp}
>
>Do you know what to do ?

Yes, but it seems that you cannot read:

>Giuseppe Bilotta wrote:
>
>> First of all, make sure you have the last hyperref version;

In old versions there was a bug in versions below 1999/06/27 v6.61.
The current version, however, is 2000/04/12 v6.70e and
is available at
http://www.tug.org/applications/hyperref/hyperref.zip
http://www.tug.org/applications/hyperref/hyperdoc.zip

Yours sincerely
Heiko <ober...@ruf.uni-freiburg.de>

Patrick Berthoud

unread,
May 3, 2000, 3:00:00 AM5/3/00
to
OK Heiko, that's fine, it works. Thanks
Patrick

Heiko Oberdiek wrote:

--

0 new messages