Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files do not compile with XeTeX if \author or \title used #45

Open
GoogleCodeExporter opened this issue Mar 12, 2015 · 19 comments
Open

Comments

@GoogleCodeExporter
Copy link

(Please attach an example .tex file demonstrating the problem or bug.)

Please describe the feature, problem, or bug:

Whereas previous versions of tufte-latex would compile with XeTeX, the 3.5 
series (SVN revision 141)  throws a number of errors.  The error seems to 
be similar to that reported by Joachim.

What is the expected output? What do you see instead?

The file fails to compile when using XeTeX (version 2007) on Ubuntu Linux 
(or version 2009 on Mac OS X).

What version of Tufte-LaTeX are you using?  With which TeX distribution?

Version 3.5 SVN revision 141


Please provide any additional information below.

All files fail to build, including the sample handout and book included 
with the class.  First error:

! Argument of \MakeTextLowercase has an extra }.


Original issue reported on code.google.com by [email protected] on 7 Jan 2010 at 4:27

@GoogleCodeExporter
Copy link
Author

I am having very similar errors to Rob.S.Oakes with XeTeX nonfunctionality. I 
was
also only trying to compile the sample-book document with today's TeX Live 2009
install on TeXworks (on a Mac 10.4).

Original comment by [email protected] on 11 Jan 2010 at 5:03

Attachments:

@GoogleCodeExporter
Copy link
Author

I can also confirm this error.  Taking a look at the .dvi, I see that it outputs
"Package soul Error: Reconstruction failed.  See the soul package documentation 
for
explanation.  I cam across hyphenatable material enclosed in group braces, 
which I
can't handle.  Either drop the braces of make the material unbreakable using an 
\mbox
(\hbox).  Note that a space also counts as a possible hyphenation point.  See 
page 4
of the manual."  However, even when I remove all spaces from the author, title, 
and
publisher, I still get the error.

Original comment by [email protected] on 17 Jan 2010 at 4:46

@GoogleCodeExporter
Copy link
Author

The problem is related to the use of the soul package for letterspacing.  To
temporarily work around the problem, you can use the 'nols' document class 
option:

  \documentclass[nols]{tufte-book}% or tufte-handout

The side effect of this is that you're on your own for letterspacing (i.e., the
\allcaps and \smallcaps commands will not letterspace the text). 

If you're is using XeLaTeX, you should probably set up the letterspacing and 
fonts
using XeLaTeX and fontspec.  (I need to write some instructions for this at 
some point.)

Original comment by [email protected] on 17 Jan 2010 at 5:00

@GoogleCodeExporter
Copy link
Author

If you wanted to provide a quick outline of which options are necessary, I 
would be happy to do a more detailed 
write-up of what the options should look like.

Original comment by [email protected] on 17 Jan 2010 at 6:17

@GoogleCodeExporter
Copy link
Author

Dear godbyk,

Has there been any progress on resolving the conflict between the "soul" 
package and
"XeLaTex"? The use of 'nols' is not really a good option in comparison to what 
we
used to be able to do in earlier versions with XeLaTeX. Please help.

Thanks so much,
nanomech.

Original comment by [email protected] on 21 Feb 2010 at 7:21

@GoogleCodeExporter
Copy link
Author

Glad to find this workaround and also wondering on any improvement to 
tufte-book that might improve it.  I'm not (knowingly) using xelatex, so assume 
it's a bigger issue than just for that one.  I use latex command from the 
texlive distribution (on debian).  

Thanks again for posting your workaround - it's saving me :)

Original comment by [email protected] on 31 Dec 2010 at 5:56

@GoogleCodeExporter
Copy link
Author

Meanwhile there is some preliminary microtype package for XeTeX. You might want 
to continue using nols option  and load the right microtype package yourself.

Original comment by [email protected] on 31 Dec 2010 at 9:55

@GoogleCodeExporter
Copy link
Author

I installed the beta microtype package; and verified it is being used from the 
logs. But if I use the 'nols' option, then the header in tufte-handout document 
class is still all lowercase (instead of small caps). If I remove the 'nols' 
option, the header has small caps, but it is all garbled. What am I missing?

Original comment by [email protected] on 6 Jan 2011 at 11:58

@GoogleCodeExporter
Copy link
Author

Hi, 

I can confirm the issue. I am using the Tufte book style. I tried the nols 
workaround but the fancyheaders (the running chapter and section titles) were 
not set correctly. 

I switched back to pdflatex in order to continue, but would appreciate if a 
solution allowing latex (the latex command on a Ubuntu system) could be used! 

Ola Dahl

Original comment by [email protected] on 23 Feb 2011 at 8:03

@GoogleCodeExporter
Copy link
Author

Hi,

I also got this error. However it is easily solved by making use of the 
LetterSpace feature in the fontspec package for XeTeX. Since I do not like to 
patch tufte-commen.def directly, I fixed the issue in the preamble of my 
document by redefining the faulty commands:


      \renewcommand{\allcapsspacing}[1]{{\addfontfeature{LetterSpace=20.0}#1}}
      \renewcommand{\smallcapsspacing}[1]{{\addfontfeature{LetterSpace=5.0}#1}}
      \renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}

I'm not sure though whether the textsc command needs to redefined at all by the 
class, since normally, if using XeTeX, one would have enabled the kerning 
feature which should take care of a correct spacing of smallcaps strings 
automatically.

Perhaps this solution can be added to the tufte-latex source?

Regards,
Alex

Original comment by [email protected] on 6 Apr 2011 at 6:24

@GoogleCodeExporter
Copy link
Author

I noticed that when using Alex's workaround, the running heads that include the 
document title show up a lowercase, but not in small caps. This is without 
having the "soul" package installed, with XeTeX and the "microtype" package 
installed (the beta version that works with XeTeX).

Original comment by [email protected] on 26 Aug 2011 at 9:29

@GoogleCodeExporter
Copy link
Author

Per the previous comment, you have to redefine \smallcaps:

\renewcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}}

Kathy

Original comment by [email protected] on 29 Nov 2011 at 9:01

@GoogleCodeExporter
Copy link
Author

Alex's solution only worked for me if I *don't* use the "nols" or "xetex" 
options; for example:

\documentclass[a4paper,12pt,bidi]{tufte-book}

AND: 

  \renewcommand{\allcapsspacing}[1]{{\addfontfeature{LetterSpace=20.0}#1}}
      \renewcommand{\smallcapsspacing}[1]{{\addfontfeature{LetterSpace=5.0}#1}}
      \renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}
\renewcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}}

work fine.

Original comment by [email protected] on 28 Dec 2011 at 12:07

@GoogleCodeExporter
Copy link
Author

Same problem here, but no workaround sufficed.  Is there any perspective of 
tufte working again with XeLaΤεχ?

Original comment by [email protected] on 11 Mar 2014 at 11:07

@GoogleCodeExporter
Copy link
Author

I got it working using the solution in #13, plus adding the font spec 
declarations, e.g.

\usepackage{fontspec}
\setmainfont{Palatino Linotype}
\setsansfont{Gill Sans Std}

Obviously these fonts will need to be installed on your system, and if you use 
an alternative typeface, it will need to have defined the small caps shapes for 
page headings, etc, to show up correctly.

Original comment by [email protected] on 26 Aug 2014 at 10:20

@GoogleCodeExporter
Copy link
Author

I can't say that it works well when you define new commands with \smallcaps, 
there is no space after the small caps word:

\documentclass[nobib,a4paper]{tufte-book}

\usepackage{unicode-math}
\setmainfont[Mapping=tex-text,Ligatures=TeX]{TeX Gyre Pagella}
\setmathfont{TeX Gyre Pagella Math}
\setsansfont{Gill Sans}

\renewcommand{\allcapsspacing}[1]{{\addfontfeature{LetterSpace=20.0}#1}}
\renewcommand{\smallcapsspacing}[1]{{\addfontfeature{LetterSpace=5.0}#1}}
\renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}
\renewcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}}

\newcommand{\generic}{\smallcaps{generic}}

\begin{document}
Compare:

\generic formalism

\smallcaps{generic} formalism

\end{document}


The result looks something like like

Compare:
GENERICformalism 
GENERIC formalism

Original comment by [email protected] on 22 Nov 2014 at 8:23

@GoogleCodeExporter
Copy link
Author

yrogirg, that isn't because of the small caps. That's because TeX swallows 
white space after a command sequence. The following, for example, will exhibit 
the same behavior:

  \newcommand{\generic}{generic}
  \generic formalism

If you use the \xspace command from the xspace package, it will insert a space 
if the macro isn't immediately followed by punctuation:

  \usepackage{xspace}
  \newcommand{\generic}{\smallcaps{generic}\xspace}

  \generic formalisms are \generic.

Original comment by [email protected] on 22 Nov 2014 at 5:08

@GoogleCodeExporter
Copy link
Author

Was there any ever progress with this?  I don't know enough TeX to follow the 
workarounds, but it seems like perhaps there's a way to modify tufte-common so 
it handles this issue automatically?

Original comment by [email protected] on 8 Feb 2015 at 7:39

@LambdaP
Copy link

LambdaP commented Dec 9, 2019

Let it be known to the world that I ran into a similar issue in December 2019. It would be nice to patch tufte-common so that people may stop wasting time on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants