Bug 1288301 - dblatex do not find warning.pdf
dblatex do not find warning.pdf
Product: Fedora
Classification: Fedora
Component: dblatex (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael J Gruber
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-12-03 21:34 EST by Cédrick
Modified: 2015-12-07 11:12 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-07 11:12:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
DocBook test file (1.24 KB, text/plain)
2015-12-05 10:11 EST, Alexis Bienvenüe
no flags Details
DocBook test file (342 bytes, application/docbook+xml)
2015-12-05 10:13 EST, Alexis Bienvenüe
no flags Details

  None (edit)
Description 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 :


I solved the problem with this command

sudo ln -s /usr/share/dblatex/latex /usr/share/texlive/texmf-dist/tex/latex/dblatex
sudo texhash
Comment 1 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)
Comment 2 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.
Comment 3 Alexis Bienvenüe 2015-12-05 10:10:46 EST
The problem is related to the use of <warning> (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 <return>  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?
Comment 4 Alexis Bienvenüe 2015-12-05 10:11 EST
Created attachment 1102536 [details]
DocBook test file
Comment 5 Alexis Bienvenüe 2015-12-05 10:13 EST
Created attachment 1102537 [details]
DocBook test file

Sorry, this is the right one.
Comment 6 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.
Comment 7 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.
Comment 8 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
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
env > dblatex.env

dblatex -r ./d.sh   w.xml

That will put the environment in a file dlatex.env, which in my case contains:


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.
Comment 9 Alexis Bienvenüe 2015-12-07 08:11:04 EST
Thank you very much for your help: these are good solutions for my problem.
Comment 10 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.

Note You need to log in before you can comment on or make changes to this bug.