Trying to create a PDF version of my book I get the following error:
! LaTeX Error: Option clash for package textcomp.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.43 \RequirePackage
{titlesec}
$ git clone https://github.com/ricpelo/libro-dwese.git
$ cd libro-dwese
$ pip install -r requirements.txt
$ make latexpdf
Running Sphinx v1.7.1
loading translations [es]... done
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
processing dwese.tex...index_latex introduccion php yii2
resolving references...
writing... done
copying TeX support files...
done
build succeeded.
The LaTeX files are in _build/latex.
Run 'make' in that directory to run these through (pdf)latex
(use `make latexpdf' here to do that automatically).
make[1]: se entra en el directorio '/home/ricardo/libro-dwese/_build/latex'
latexmk -pdf -dvi- -ps- 'dwese.tex'
Latexmk: This is Latexmk, John Collins, 1 January 2015, version: 4.41.
Rule 'pdflatex': Rules & subrules not known to be previously run:
pdflatex
Rule 'pdflatex': The following rules & subrules became out-of-date:
'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'xelatex -recorder "dwese.tex"'
------------
Latexmk: applying rule 'pdflatex'...
This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/Debian) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./dwese.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(./sphinxmanual.cls
Document Class: sphinxmanual 2017/03/26 v1.6 Document class (Sphinx manual)
(/usr/share/texlive/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo)))
(/usr/share/texlive/texmf-dist/tex/latex/cmap/cmap.sty
Package cmap Warning: pdftex not detected - exiting.
) (/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/expl3-code.tex)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def))
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/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/graphics/keyval.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/xelatex/xetex-def/xetex.def
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texlive/texmf-dist/tex/latex/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/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/polyglossia/gloss-spanish.ldf)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/libertine.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def))
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
*
* OpenType feature 'Numbers=Monospaced,Lining' (+tnum) not available for font
* 'LinLibertine_RZI' with script 'Latin' and language 'Default'.
*************************************************
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
*
* OpenType feature 'Numbers=Monospaced,Lining' (+tnum) not available for font
* 'LinLibertine_RZI' with script 'Latin' and language 'Default'.
*************************************************
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LinLibertine_R.tex)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LinBiolinum_R.tex)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LinBiolinum_K.tex)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LinLibertine_I.tex)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LKey.tex))
(/usr/share/texlive/texmf-dist/tex/latex/fncychap/fncychap.sty) (./sphinx.sty
(/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
! LaTeX Error: Option clash for package textcomp.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.43 \RequirePackage
{titlesec}
? The package textcomp has already been loaded with options:
[]
There has now been an attempt to load it with options
[warn]
Adding the global options:
,warn
to your \documentclass declaration may fix this.
Try typing <return> to proceed.
? OK, entering \batchmodeLatexmk: Index file 'dwese.idx' was written
Latexmk: References changed.
Latexmk: Missing input file: 'dwese.ind' from line
'No file dwese.ind.'
Latexmk: References changed.
Latexmk: Log file says output to 'dwese.pdf'
Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 256
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs of latex/pdflatex.
Latexmk: Errors, so I did not complete making targets
Makefile:32: fallo en las instrucciones para el objetivo 'dwese.pdf'
make[1]: *** [dwese.pdf] Error 12
make[1]: se sale del directorio '/home/ricardo/libro-dwese/_build/latex'
Makefile:18: fallo en las instrucciones para el objetivo 'latexpdf'
make: *** [latexpdf] Error 2
No errors and PDF generated successfully.
https://github.com/ricpelo/libro-dwese
$ latex -v
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.41.0
(/usr/share/texlive/texmf-dist/tex/latex/libertine/libertine.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
It seems your project uses libertine package which depends textcomp.
https://github.com/ricpelo/libro-dwese/blob/master/conf.py#L263
On the other hand, Sphinx also uses textcomp package with warn option.
It was introduced at #4267.
@jfbu could you check this please?
@ricpelo can you try adding this key to latex_elements in your conf.py:
latex_elements = {
passoptionstopackages: '\\PassOptionsToPackage{warn}{textcomp}',
}
does this fix your issue ? I will make a PR to address this premptively.
@jfbu Yes, adding that line fix the issue! Thank you very much!
Fixed at 87e8dd1 . With 1.7.2 you can remove the extra latex_elements key, but leaving it should cause no harm. Thanks for report.
Thanks to you!