[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Pandoc LuaTeX-flavor PDF output fails with fontspec << 2.0



On 12-03-11 at 01:29pm, John MacFarlane wrote:
> +++ Jonas Smedegaard [Mar 11 12 19:02 ]:
> > On 12-03-11 at 10:34am, John MacFarlane wrote:
> > > +++ Jonas Smedegaard [Mar 11 12 14:13 ]:
> > > > On 12-03-10 at 06:30pm, John MacFarlane wrote:
> > > > > +++ Jonas Smedegaard [Feb 29 12 10:58 ]:
> > > > > > On 12-02-29 at 01:41pm, Kiwamu Okabe wrote:
> > > > > > > Lualatex has error.
> > > > > > > 
> > > > > > > $ cat hoge.md
> > > > > > > # Title
> > > > > > > Hi!
> > > > > > > 
> > > > > > > * Item1
> > > > > > > * Item2
> > > > > > > $ /usr/bin/pandoc hoge.md --latex-engine=pdflatex -f markdown -o hoge.pdf
> > > > > > > $ /usr/bin/pandoc hoge.md --latex-engine=xelatex -f markdown -o hoge.pdf
> > > > > > > $ /usr/bin/pandoc hoge.md --latex-engine=lualatex -f markdown -o hoge.pdf
> > > > > > > pandoc: Error producing PDF from TeX source.
> > > > > > > !
> > > > > > >  ********************************************
> > > > > > >  * XeTeX is required to compile this document.
> > > > > > >  * Sorry!
> > > > > > >  ********************************************.
> > > > > > > \RequireXeTeX ...********************************}
> > > > > > >                                                   \endgroup \fi
> > > > > > > l.18 \RequireXeTeX
> > > > > > > 
> > > > > > > But I can't the reason of the TeX error....
> > > > > > 
> > > > > > Hmm, yes - looks odd (and contrary to upstream documentation!) that 
> > > > > > LuaTeX should require XeTeX (and even parts of XeTeX that XeLaTeX 
> > > > > > does not need itself).
> > > > > > 
> > > > > > @John: Could you help here, how to proceed debugging?
> > > > > 
> > > > > I don't get the error on my system, but I do have xetex installed.
> > > > > First step in debugging would be
> > > > > 
> > > > > /usr/bin/pandoc hoge.md -s -t latex -o hoge.tex
> > > > > 
> > > > > then run lualatex directly
> > > > > 
> > > > > lualatex hoge.tex
> > > > > 
> > > > > and inspect the log for further messages.
> > > > > 
> > > > > The error message seems to be coming from the ifxetex.sty package,
> > > > > which defines \RequireXeTeX.  I ran lualatex on hoge.tex and inspected
> > > > > the list of packages it opened, then grepped through all of them for
> > > > > \RequireXeTeX.  The only hit was in ifxetex.sty.  So that is no help.
> > > > > 
> > > > > It is possible that the issue you're seeing is cleared up in TeXLive
> > > > > 2011, or maybe in the transition from pandoc 1.9.1.1 to 1.9.1.2.
> > > > > Sorry I can't be more help at the moment.
> > > > 
> > > > Seems you are right, John - apparently fontspec supports LuaTeX only 
> > > > since TeXLive 2010: 
> > > > latex-alive.tumblr.com/post/643148677/fontspec-for-luatex
> > > > 
> > > > Anyone have a suggestion how to improve the TeX template to require 
> > > > fontspec 2.0 when used with LuaTex, and else do some sort of fallback?
> > > 
> > > Why is debian so far behind on TeXLive?  That seems the obvious place
> > > to improve matters.
> > 
> > I guess because TeXLive is huge, and Debian here - as is sometimes the 
> > case - does more than simply shrinkwrap upstream releases.
> > 
> > Apparently there was quite recently a first release of TeXLive 2011 to 
> > experimental: http://packages.qa.debian.org/t/texlive-base.html
> > 
> > Changelog entry for the packaging release is quite terse, yet telling:
> > 
> >   * new upstream, too many changes
> > 
> > 
> > I would apprecieate if Pandoc could somehow gracefully deal with TeXLive 
> > 2009, as I would love for the package to be backportable to current 
> > stable Debian (and other distros as well), and also to not need to 
> > strictly rely on TeXLive 2011 packaging maturing in time for the freeze 
> > of upcoming stable Debian distro release.
> 
> One option would be to patch the template and just remove the
> two fontspec-related lines under \ifluatex.  With these removed,
> lualatex will still be able to produce files; you'll just have less
> control over fonts, and lots of unicode characters will just disappear.
> 
> But I'm not sure this option is better than just letting an error occur
> and providing an explanation somewhere in the Debian notes.  (I'll bet
> most people who use pandoc with lualatex will be installing more recent
> versions of lualatex themselves, not using the debian package.)
> 
> I'll ask some ConTeXt experts how to do fonts with lualatex prior
> to fontspec.

Thanks for the help, John.

For upstream Pandoc I agree that it makes best sense to keep current 
template - but perhaps improve documentation and installation 
hints/routines to reflect the need for at least fontspec 2.0 for LuaTeX, 
i.e. at least TeXLive 2010.

For Debian I would find it tolerable but not ideal to simply add a note 
that LuaTeX is broken with the version of TeXLive currently in Debian. 
Better would be - for Debian only - to patch the template to not use 
fontspec with LuaTeX as you suggest.  Even better, however, would be a 
patch check fontspec version and use fontspec with LuaTeX if version 2.0 
or greater.

I don't really know (La)TeX so would appreciate help composing such 
(Debian-specific, I suggest) template.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: Digital signature


Reply to: