Bug 1288301 - dblatex do not find warning.pdf
 Summary: dblatex do not find warning.pdf
 Status: Product: CLOSED NOTABUG Aliases: None Fedora Fedora dblatex (Show other bugs) --- 23 x86_64 Unspecified unspecified Severity unspecified --- Target Release: --- Michael J Gruber Fedora Extras Quality Assurance Show dependency tree / graph

 Reported: 2015-12-03 21:34 EST by Cédrick 2015-12-07 11:12 EST (History) 7 users (show) alexl bkoz cedrick.copol jchaloup mjg pabgz pertusus Bug Fix --- 2015-12-07 11:12:01 EST Bug --- --- --- --- --- ---

 Cédrick 2015-12-03 21:34:07 EST Description of problem: Using dblatex causes this error : ! LaTeX Error: File warning' not found. But we can find warning.pdf in this directory : /usr/share/dblatex/latex/contrib/db2latex/graphics/warning.pdf I solved the problem with this command sudo ln -s /usr/share/dblatex/latex /usr/share/texlive/texmf-dist/tex/latex/dblatex sudo texhash Michael J Gruber 2015-12-04 02:14:37 EST Could you please provide the following information: - How do you reproduce the problem? (exact commandline) - Has this worked before? (say with dblatex-0.3.5 instead of dblatex-0.3.6 if that is what you are using, or with Fedora 22 instead of Fedora 23) Cédrick 2015-12-04 06:44:19 EST > - How do you reproduce the problem? (exact commandline) The commandline is : dblatex -t tex --texstyle=amcdocstyle --xslt-opts="--nonet" --xslt-opts="--catalogs" auto-multiple-choice.en.xml -o auto-multiple-choice.en.tex It's not my commandline, it appears during building (Makefile) the software auto-multiple-choice (https://bitbucket.org/auto-multiple-choice/auto-multiple-choice) > - Has this worked before? I don't know, it's my first time using it. Alexis Bienvenüe 2015-12-05 10:10:46 EST The problem is related to the use of (and similar) in a DocBook document. With attached w.xml, dblatex -t tex w.xml pdflatex w.tex ends with an error: ! LaTeX Error: File warning' not found. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.285 \begin{DBKadmonition}{warning}{Important} LaTeX can't find the drawing 'warning.pdf' which is shipped with dblatex but not in the LaTeX tree. 'dblatex w.xml' works, because pdflatex is run with modified TEXINPUTS. On debian, dblatex's 'warning.pdf' is located in the LaTeX tree. If including dblatex graphics files in LaTeX tree is unwanted on Fedora, is there an easy way for the user to get the path leading to them, so that he can run a successful pdflatex modifying TEXINPUTS? Alexis Bienvenüe 2015-12-05 10:11 EST Created attachment 1102536 [details] DocBook test file Alexis Bienvenüe 2015-12-05 10:13 EST Created attachment 1102537 [details] DocBook test file Sorry, this is the right one. Michael J Gruber 2015-12-05 17:00:14 EST TEXINPUTS=/usr/share/dblatex/latex/graphics/: pdflatex w.tex works. Really, the problem is not the use "of warning" but the use of a non-stand ard mode ("-t tex") without setting the search path in the same way as dblatex does for its own processing. I'm really wondering whether we should support that - if yes, then all the graphics files would need to be copied or moved inside the latex tree. The strange thing is that dblatex undertakes quite some efforts to set TEXINPUTS appropriately, without relying on distributions or setup.py to put its files into the standard latex tree. That would be moot if we put everything there, so I don't think that its tex output is supposed to work out of the box. Alexis Bienvenüe 2015-12-06 15:25:09 EST I understand that dblatex was designed to let its graphics files outside the latex tree, so that a dblatex package can't be blamed to respect this. Do you know a simple way to get the path to the dblatex graphics directory? Maybe assuming it is /usr/share/dblatex/latex/graphics/ won't work in all situations. I need to use the tex output to run platex instead of pdflatex for japanese DocBook documents. Michael J Gruber 2015-12-07 05:25:16 EST If the way in which you want to use "-t tex" is the way dblatex is meant to be used, than by all means we should copy those files to the standard LaTeX tree. Alas, the documentation of dblatex does not mention that as part of the installation procedure, but leaves those files in /usr/share. Therefore, I'm leaning towards doing it the same way (i.e. leave the package as is). dblatex does not provide any way to override the latex engine, unfortunately. Two possible workarounds: 1) "monkey patch", i.e. set up a "pdflatex" in your PATH which calls "platex": --->%--- pdflatex #!/bin/sh exec platex "$@" --->%--- 2) read the paths from dblatex: 2a) either get the package_base from the dblatex script: sed -ne 's/package_base.*"$$.*$$".*/\1/p'$(which dblatex) gives /usr/share/dblatex for me. 2b) or use dblatex's texpost feature to get the exact environment it uses: --->%--- d.sh #!/bin/sh env > dblatex.env --->%--- dblatex -r ./d.sh w.xml That will put the environment in a file dlatex.env, which in my case contains: TEXINPUTS=/usr/share/dblatex/latex/style//::/usr/share/dblatex/latex// But really, if you need to jump through these hoops for japanese TeXing then maybe upstream (dblatex) should provide a way to override the TeX compiler. Or are there any packages that would the same job? That would lead to possibility 3) Use the "-r" switch to transform the TeX file before dbaltex calls pdflatex. Alexis Bienvenüe 2015-12-07 08:11:04 EST Thank you very much for your help: these are good solutions for my problem. Michael J Gruber 2015-12-07 11:12:01 EST Closing as NOTABUG for now. Upstream could make it easier for users of "-t tex", though.