tufte-latex suddenly not compiling in Debian (unstable)

340 views
Skip to first unread message

Matt Bellis

unread,
Mar 30, 2012, 1:13:16 AM3/30/12
to tufte...@googlegroups.com
Hi all,

  I've been using tufte-latex for my class notes with great success. A recent upgrade under Debian unstable (texlive-binaries) has caused tufte-latex to stop building. 

  If I do a fresh clone of the git repository and try ``pdflatex sample-handout", I get this....

--- snip ---

Package ifplatform Warning:
    shell escape is disabled, so I can only detect \ifwindows.

) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
! I can't find file `"|kpsewhich -var-value=max_print_line"'.
<to be read again>
                   \relax
l.57 ...kpsewhich -var-value=max_print_line"\relax

(Press Enter to retry, or Control-D to exit)
Please type another input file name:

--- snip ---

   If I try xelatex, I get the following....

--- snip ---

! Argument of \MakeTextLowercase has an extra }.
<inserted text>
                \par
l.159   \caption{This is a margin figure.}
 
--- snip ---

   I can get the .pdf to build under xelatex if I use the nols option.

\documentclass[nols]{tufte-handout}

  But then I lose the slick fonts. Any thoughts? Is anyone else seeing these errors?

Matt

Boris Veytsman

unread,
Mar 30, 2012, 1:20:48 AM3/30/12
to tufte...@googlegroups.com


On Mar 30, 2012 1:13 AM, "Matt Bellis" <matthew...@gmail.com> wrote:
>
> Hi all,
>
>   I've been using tufte-latex for my class notes with great success. A recent upgrade under Debian unstable (texlive-binaries) has caused tufte-latex to stop building. 
>
>   If I do a fresh clone of the git repository and try ``pdflatex sample-handout", I get this....
>
> --- snip ---
>
> Package ifplatform Warning:
>     shell escape is disabled, so I can only detect \ifwindows.
>
> ) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
> ! I can't find file `"|kpsewhich -var-value=max_print_line"'.
> <to be read again>
>                    \relax
> l.57 ...kpsewhich -var-value=max_print_line"\relax
>

It looks like your new binaries have write18 disabled by default.  Try adding -shell-escape to the pdflatex (or xelatex) call.

-Boris

Kevin Godby

unread,
Mar 30, 2012, 1:23:48 AM3/30/12
to tufte...@googlegroups.com
Hello, Matt.

On Fri, Mar 30, 2012 at 12:13 AM, Matt Bellis <matthew...@gmail.com> wrote:
>   I've been using tufte-latex for my class notes with great success. A
> recent upgrade under Debian unstable (texlive-binaries) has caused
> tufte-latex to stop building.
>
>   If I do a fresh clone of the git repository and try
> ``pdflatex sample-handout", I get this....
>
> --- snip ---
>
> Package ifplatform Warning:
>     shell escape is disabled, so I can only detect \ifwindows.
>
> ) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
> ! I can't find file `"|kpsewhich -var-value=max_print_line"'.
> <to be read again>
>                    \relax
> l.57 ...kpsewhich -var-value=max_print_line"\relax
>
> (Press Enter to retry, or Control-D to exit)
> Please type another input file name:
>
> --- snip ---

I haven't see this error before. If you're not running pdflatex when
shell-escape enabled, then it shouldn't be trying to run the kpsewhich
command.

I'm wondering if this is caused by the older Debian texlive-*
packages. I typically recommend that people install TeX Live from
upstream: http://kevin.godby.org/2012/02/13/installing-tex-live-in-ubuntu/
The Debian texlive packages (last I checked) are for TeX Live 2009.

If you're running xelatex, you can use any font on your system
<http://tex.stackexchange.com/a/18968/80>. If you want to still use
Palatino, etc., then they should work okay -- they just won't be
loaded automatically. Add the following to your preamble to load
them:


\usepackage[osf,sc]{mathpazo}
\usepackage[scaled=0.90]{helvet}
\usepackage[scaled=0.85]{beramono}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

If you continue to have problems or have any further questions, please
let me know.

Thanks!

--Kevin Godby

Matt Bellis

unread,
Mar 30, 2012, 1:35:04 AM3/30/12
to tufte...@googlegroups.com
Hi Boris,
 

It looks like your new binaries have write18 disabled by default.  Try adding -shell-escape to the pdflatex (or xelatex) call.

  I get exactly the same behavior on all fronts with the -shell-escape with either pdflatex or xelatex. What does -shell-escape do? How did you think this might fix things? I'm always looking to learn new tricks.

Matt 

Boris Veytsman

unread,
Mar 30, 2012, 1:39:51 AM3/30/12
to tufte...@googlegroups.com

1. -shell-escape allows tex to call external programs.

2. what do you get if you call this command:

kpsewhich -var-value=max_print_line

-B

Matt Bellis

unread,
Mar 30, 2012, 1:42:49 AM3/30/12
to tufte...@googlegroups.com
Hi Kevin,


I'm wondering if this is caused by the older Debian texlive-*
packages.  I typically recommend that people install TeX Live from
upstream: http://kevin.godby.org/2012/02/13/installing-tex-live-in-ubuntu/
 The Debian texlive packages (last I checked) are for TeX Live 2009.

  I'm running Debian unstable (sometimes, that's a whole other set of problems) and the texlive is from 2011.


 

If you're running xelatex, you can use any font on your system
<http://tex.stackexchange.com/a/18968/80>. If you want to still use
Palatino, etc., then they should work okay -- they just won't be
loaded automatically.  Add the following to your preamble to load
them:


  \usepackage[osf,sc]{mathpazo}
  \usepackage[scaled=0.90]{helvet}
  \usepackage[scaled=0.85]{beramono}
  \usepackage[T1]{fontenc}
  \usepackage{textcomp}

   Great! Trying this now....which led to an interesting discovery. beramono is not on my laptop....nor is it in the Debian unstable repository, though it is still in testing and unstable. That's a question for the Debian folks, however. 

   If I comment out the beramono line, I get this....

! LaTeX Error: Command \nobreakspace unavailable in encoding T1.

    Does that look familiar? Or is that an artifact of the commented beramono font?

Matt

Matt Bellis

unread,
Mar 30, 2012, 1:43:35 AM3/30/12
to tufte...@googlegroups.com

2. what do you get if you call this command:

kpsewhich -var-value=max_print_line


    79

 

Boris Veytsman

unread,
Mar 30, 2012, 1:48:05 AM3/30/12
to tufte...@googlegroups.com

Look, your error log says this command gives an error, but when you call it manually, it works fine.  Looks like a problem with PATH...

Can you add \listfiles in the beginning of your file and send the full log?

-B

Kevin Godby

unread,
Mar 30, 2012, 1:54:35 AM3/30/12
to tufte...@googlegroups.com
Hello, Matt.

On Fri, Mar 30, 2012 at 12:42 AM, Matt Bellis <matthew...@gmail.com> wrote:
>   I'm running Debian unstable (sometimes, that's a whole other set of
> problems) and the texlive is from 2011.
>
> http://packages.debian.org/en/sid/texlive

Ah, okay. I haven't tried these packages yet.

>    Great! Trying this now....which led to an interesting discovery. beramono
> is not on my laptop....nor is it in the Debian unstable repository, though
> it is still in testing and unstable. That's a question for the Debian folks,
> however.
>
>    If I comment out the beramono line, I get this....
>
> ! LaTeX Error: Command \nobreakspace unavailable in encoding T1.
>
>     Does that look familiar? Or is that an artifact of the commented
> beramono font?

It's not 'caused by the missing beramono package. It's caused by an
interaction between the T1 font-encoding and the fontspec package
(which Tufte-LaTeX loads automatically when you compile with XeLaTeX).
Try leaving out the fontenc and textcomp packages and see if
everything works okay.

--Kevin

Matt Bellis

unread,
Mar 30, 2012, 1:56:08 AM3/30/12
to tufte...@googlegroups.com
Hi Boris,

Look, your error log says this command gives an error, but when you call it manually, it works fine.  Looks like a problem with PATH...

Can you add \listfiles in the beginning of your file and send the full log?


   Sure thing. Here's the sample-handout.log after adding \listfiles immediately after the \documentclass. I run 

 pdflatex -shell-escape sample-handout

    Log file attached.

Matt
sample-handout.log

Matt Bellis

unread,
Mar 30, 2012, 2:06:05 AM3/30/12
to tufte...@googlegroups.com
Hi Kevin,

   Installed beramono font from CTAN.

It's not 'caused by the missing beramono package. It's caused by an
interaction between the T1 font-encoding and the fontspec package
(which Tufte-LaTeX loads automatically when you compile with XeLaTeX).
 Try leaving out the fontenc and textcomp packages and see if
everything works okay.


   No dice. I'm now using the [nols] option, adding these lines after the \documentclass declaration, and using xelatex.

\usepackage[osf,sc]{mathpazo}
\usepackage[scaled=0.90]{helvet}
\usepackage[scaled=0.85]{beramono}

   Still no pretty fonts. .pdf attached. 
 
   It feels like the font paths are goofed (as hinted at by Boris?), but I've run texhash manually now and it's still not swinging. I'm not getting an error when I include the beramono, as per the above line, so it feels like it's aware of the font.

Matt
sample-handout.pdf

Matt Bellis

unread,
Mar 30, 2012, 2:07:27 AM3/30/12
to tufte...@googlegroups.com
Seeing this warning in the log.

LaTeX Font Warning: Some font shapes were not available, defaults substituted.


Boris Veytsman

unread,
Mar 30, 2012, 1:38:58 PM3/30/12
to tufte...@googlegroups.com
On 3/30/12, Matt Bellis <matthew...@gmail.com> wrote:


>> Sure thing. Here's the sample-handout.log after adding \listfiles

Ok, I see you use the tufte files from the local directory. I wonder
what happens if you move them from it and try the system-wide
tufte-handout.cls?

-B

Kevin Godby

unread,
Mar 30, 2012, 11:21:37 PM3/30/12
to tufte...@googlegroups.com
Hello, Matt.

If you're compiling under XeLaTeX, try the following to use fonts
similar to those we use under pdfLaTeX:

% Use fonts similar to Palatino and Bera Mono
\setmainfont[Mapping=tex-text,Numbers=OldStyle]{TeX Gyre Pagella}%
provided with TeX Live
% TODO \setsansfont[Mapping=tex-text,Numbers=OldStyle,Scale=MatchLowercase]{...}
\setmonofont[Mapping=tex-text,Scale=MatchLowercase]{DejaVu Sans
Mono}% freely available from http://dejavu-fonts.org/

% Sets up the letterspacing -- spacing values may need to be adjusted
\renewcommand\allcapsspacing[1]{{\addfontfeature{LetterSpace=15}#1}}
\renewcommand\smallcapsspacing[1]{{\addfontfeature{LetterSpace=10}#1}}

You can set a sans serif font as well. If you're on a Mac, then Gill
Sans is available (and is what Tufte frequently uses). (The default
sans serif font used by the Tufte-LaTeX classes with pdfLaTeX is
Helvetica, but I think it's a poor pairing with Palatino.)

--Kevin

Matt Bellis

unread,
Apr 22, 2012, 7:51:57 PM4/22/12
to tufte...@googlegroups.com
Hi Boris and Kevin,

  Thanks for all your help on this. As with many things in Debian Unstable, things have started working again.  :)

Matt
Reply all
Reply to author
Forward
0 new messages