is there a way to load a package by command line? I tried:
latex "\RequirePackage{xcolor} \input{myfile.tex}"
but it doesn't work.
I need to load some packages "temporarily", by scripts I wrote, to do some checks on my output files (pdf or dvi).
Edit. I found that the string I use generates the file xcolor.pdf
instead of myfile.pdf
As requested, this is my .log
shell output:
tmp$ latex "\RequirePackage{xcolor} \input{example.tex}"
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
LaTeX2e <2015/10/01> patch level 2
Babel <3.9m> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/dvips.def))
(./example.tex (/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size11.clo))
(/usr/local/texlive/2015/texmf-dist/tex/latex/lipsum/lipsum.sty)
No file xcolor.aux.
[1
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!{/usr/local/texlive/2015/texmf-var/fonts/map/pdftex/upd
map/pdftex.map}
Non-PDF special ignored!
Non-PDF special ignored!] [2
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!] (./xcolor.aux) )</usr/local/texlive/2015/texmf-dist/f
onts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on xcolor.pdf (2 pages, 22276 bytes).
Transcript written on xcolor.log.
and this is the screenshot:
package.pdf
file instead offilename.þdf
ones... also with double backslash excaping.