wannier90 icon indicating copy to clipboard operation
wannier90 copied to clipboard

Failed to compile the solution booklet with pdflatex.

Open hongyi-zhao opened this issue 4 years ago • 2 comments

Hi,

I tried to compile the solution booklet with pdflatex using the supplied Makefile but failed. See following for more info:

werner@ubuntu-01:~/Public/hpc/tools/wannier90.git/doc/solution_booklet$ make
pdflatex solution_booklet.tex 
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./solution_booklet.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-05-15>
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/base/size11.clo))
(./newcommands.tex) (./Packages.tex
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/geometry/geometry.
sty
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/graphics/keyval.st
y)
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/generic/iftex/ifvtex.sty
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty)
))
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/mdwtools/footnote.
sty)
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.st
y
For additional information on amsmath, use the `?' option.

(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.st
y
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty
))
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty
)
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty
))
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/amsfonts/amssymb.s
ty
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/amsfonts/amsfonts.
sty))
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/graphics/graphicx.
sty
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/graphics/graphics.
sty
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/graphics/trig.sty)

(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/graphics-cfg/graph
ics.cfg)
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/graphics-def/pdfte
x.def)))
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/subfig/subfig.sty
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/caption/caption3.s
ty))
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/fancyhdr/fancyhdr.
sty)
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/base/fontenc.sty)
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/tools/bm.sty)
(/home/werner/Public/local/texlive/2020/texmf-dist/tex/latex/natbib/natbib.sty)

! Argument of \reserved@b has an extra }.
<inserted text> 
                \par 
l.20 
     
? 

OTOH, I try to use the make doc to generate the documents for wannier90, but it seems that some example numbers are incorrect in the solution booklet. Say, the example 29 will become 23: Platinum—Spin Hall conductivity in the ultimate solution booklet pdf document.

Regards.

hongyi-zhao avatar Jun 28 '20 10:06 hongyi-zhao

The Makefile works fine in my case, but maybe because I am using the pdflatex bundled in TexLive 2019, while you are using TexLive 2020. I will report back once I have a TexLive 2020 environment.

About the example numbers, that's because the solution booklet is not complete yet, once the missing chapters are added it will have the same order as the tutorial.pdf

qiaojunfeng avatar Jun 30 '20 16:06 qiaojunfeng

See here for more discussions on this problem. According to notes given by Ulrike Fischer, the reason for this problem is the following:

The problem is in the Packages.tex.

It calls hyperref with the option

 pdftitle={\Wannier~\version: Solution booklet},

The definition of \Wannier contains formatting commands and is
basically doing

\usepackage[pdftitle=\mbox{\textsc{...}}]{hyperref}

hyperref don't like the \textsc here at all.

Replace the \Wannier by something more sensible. 

Based on my tries, the problem can be solved by any of the following methods:

Don't use \Wannier command in the pdftitle, say, by commenting out the pdftitle line

or

changing it into the following form:

pdftitle={Wannier~\version: Solution booklet},

or

use the following line in newcommands.tex :

\renewcommand\Wannier{wannier90}

Side note, Ulrike Fischer also suggested the following workaround, but failed to work based on my testing:

\newcommand{\myfont}[1]{\texorpdfstring{\mbox{\textsc{#1}}}{#1}}

hongyi-zhao avatar Jun 30 '20 22:06 hongyi-zhao

This will vanish when we move to html documentation.

jryates avatar Feb 12 '24 16:02 jryates