7

I am trying to use tufte-book with either XəLaΤεχ or LuaΤεχ. Both give me a ‘Missing \begin{document}’ error, which is obviously not the real cause as it is indeed there.

The whole skeleton I am trying to process:

\documentclass {tufte-book}
\usepackage {color, microtype, polyglossia, epigraph, fontspec, graphicx, listings, ucs}
\usepackage [colorlinks = true, urlcolor = blue, linkcolor = cyan, frenchlinks = true, pdfborder = {0 0 0}] {hyperref}
\usepackage [acronym, xindy] {glossaries}
\defaultfontfeatures {Contextuals = {Inner, LineFinal, Swash, WordInitial, WordFinal}, Ligatures=Rare, Numbers=Lowercase}

\setmainfont {Junicode}
\setmainlanguage {portuges}
\setotherlanguage [variant = british] {english}
\setotherlanguage [spelling = old] {german}
\setotherlanguage [variant = ancient] {greek}
\setotherlanguage [numerals = hebrew, calendar = hebrew] {hebrew}
\setotherlanguages {french, italian, latin, russian, spanish}

\makeglossaries

\begin {document}
\title {O que é fé salvadora?}
\author {\textenglish {Gordon Haddon \textsc {Clark}}}
\publishers {Monergismo}

\maketitle
\tableofcontents

\frontmatter
\part {Fé \& fé salvadora}
\chapter {Prefácio}
A motivação para este estudo sobre a natureza da fé é a edificação de cristãos: 

\mainmatter
\chapter {Introdução}
O ladrão na cruz disse

\marginpar {Mesmo sabendo tão pouco}
Dificilmente ele sabia muito sobre Jesus.



\part {O Logos joanino}


\backmatter
\bibliography{fé}{}
\bibliographystyle{plain}

\printglossaries
\end {document}

The error log:

~/Documents/fé $ xelatex fé.xelatex
This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/Debian)
 restricted \write18 enabled.
entering extended mode
(./fé.xelatex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, fa
rsi, arabic, pinyin, bulgarian, ukrainian, russian, usenglishmax, ukenglish, fr
ench, basque, ngerman, german, swissgerman, ngerman-x-2012-05-30, german-x-2012
-05-30, monogreek, greek, ibycus, ancientgreek, italian, latin, portuguese, gal
ician, catalan, spanish, swedish, thai, loaded.
(/usr/share/texlive/texmf-dist/tex/latex/tufte-latex/tufte-book.cls
Document Class: tufte-book 2009/12/11 v3.5.0 Tufte-book class
(/usr/share/texlive/texmf-dist/tex/latex/tufte-latex/tufte-common.def
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex)))
(/usr/share/texlive/texmf-dist/tex/latex/xifthen/xifthen.sty
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/ifmtarg/ifmtarg.sty))
(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls
Document Class: book 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/bk10.clo))
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty)
(/usr/share/texlive/texmf-dist/tex/latex/titlesec/titletoc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/xelatex/xetexconfig/hyperref.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver: hxetex.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hxetex.def
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/stringenc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))

Package hyperref Warning: Option `pagecolor' is not available anymore.

(/usr/share/texlive/texmf-dist/tex/latex/ms/ragged2e.sty
(/usr/share/texlive/texmf-dist/tex/latex/ms/everysel.sty))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty)
(/usr/share/texlive/texmf-dist/tex/latex/changepage/changepage.sty)
(/usr/share/texlive/texmf-dist/tex/latex/paralist/paralist.sty)
(/usr/share/texlive/texmf-dist/tex/latex/textcase/textcase.sty)
(/usr/share/texlive/texmf-dist/tex/latex/soul/soul.sty)
(/usr/share/texlive/texmf-dist/tex/latex/setspace/setspace.sty)
(/usr/share/texlive/texmf-dist/tex/latex/natbib/natbib.sty)
(/usr/share/texlive/texmf-dist/tex/latex/natbib/bibentry.sty)
No file fé.bbl.
(/usr/share/texlive/texmf-dist/tex/latex/sauerj/optparams.sty)
(/usr/share/texlive/texmf-dist/tex/latex/placeins/placeins.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/share/texlive/texmf-dist/tex/xelatex/xetex-def/xetex.def)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/dvipsnam.def)
(/usr/share/texmf/tex/latex/xcolor/svgnam.def))
(/usr/share/texlive/texmf-dist/tex/latex/tools/multicol.sty)))
(/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.sty

Package microtype Warning: You don't seem to be using pdftex.
(microtype)                `microtype' only works with pdftex.
(microtype)                Try running `pdflatex' instead of `xelatex'.

) (/usr/share/texlive/texmf-dist/tex/xelatex/polyglossia/polyglossia.sty
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texlive/texmf-dist/tex/latex/makecmds/makecmds.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3names.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3basics.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3expan.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3tl.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3seq.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3int.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3quark.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3prg.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3clist.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3token.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3prop.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3msg.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3file.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3skip.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3keys.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3fp.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3box.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3coffins.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3color.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3luatex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/fixltx2e.sty)
*************************************************
* LaTeX warning: "xparse/redefine-command"
* 
* Redefining document command \oldstylenums with arg. spec. 'm' on line 107.
*************************************************
) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/share/texlive/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/share/texmf/tex/latex/tipa/t3enc.def
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmss.fd))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg))))
(/usr/share/texlive/texmf-dist/tex/latex/epigraph/epigraph.sty)
(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def))

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.4 \usepackage
                [acronym, xindy] {glossaries}
? 

Is this even possible?

  • 3
    Since tufte internally loads hyperref, loading it again with different options will produce a clash. Instead of \usepackage [colorlinks = true, urlcolor = blue, linkcolor = cyan, frenchlinks = true, pdfborder = {0 0 0}] {hyperref} use \hypersetup{colorlinks = true, urlcolor = blue, linkcolor = cyan, frenchlinks = true, pdfborder = {0 0 0}} – Gonzalo Medina Mar 12 '14 at 2:21
  • 1
    No need for a new question :) Use \author {\texorpdfstring{\textenglish{Gordon Haddon \protect\textsc{Clark}}}{Gordon Haddon Clark}} and \publishers in undefined; remove that line. – Gonzalo Medina Mar 12 '14 at 2:47
  • 3
    Note that you are effectively loading both babel and polyglossia. I thought they were alternatives? Also, fontenc and fontspec. (I know this is possible if you know what you are doing. It just isn't very usual, I don't think, as it can create problems if you don't know.) – cfr Mar 12 '14 at 2:51
  • 3
    Also, I'd suggest using the tufte-book.cls and tufte-common.def files from SVN at code.google.com/p/tufte-latex/source/browse because the package in TeX Live is a bit out of date. – godbyk Mar 12 '14 at 3:50
  • 1
    It is in the log you posted. babel is loaded right near the start; fontenc later on. Possibly the svn version will do better? It should at least solve the font issue, I think... probably/hopefully the other, as well. Not that the svn version has been modified since 2011 but that is much more recent than the version on ctan. I assume at this point they don't intend it for TeX Live. – cfr Mar 12 '14 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.