Opened 10 years ago
Closed 10 years ago
#47115 closed defect (fixed)
texlive can't find docbook.sty
Reported by: | nortcele | Owned by: | neverpanic (Clemens Lang) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | Cc: | ||
Port: | dblatex |
Description
Since, r132311 tex commands can't find docbook files installed by dblatex.
For example.
Create a test.xml file with:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ ]> <article class="techreport" status="final"> <para>Just some blabla.</para> </article>
Then use dblatex to transform the xml to latex with:
dblatex -t tex test.xml -o test.tex
Then use pdflatex to transform the latex file to pdf with:
pdflatex test.tex
The later command fails with the error:
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/MacPorts 2014_7) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./test.tex LaTeX2e <2014/05/01> Babel <3.9k> and hyphenation patterns for 4 languages loaded. (/opt/local/share/texmf-texlive/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/opt/local/share/texmf-texlive/tex/latex/base/size10.clo)) (/opt/local/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty) (/opt/local/share/texmf-texlive/tex/latex/base/fontenc.sty (/opt/local/share/texmf-texlive/tex/latex/base/t1enc.def)) (/opt/local/share/texmf-texlive/tex/latex/base/inputenc.sty (/opt/local/share/texmf-texlive/tex/latex/base/latin1.def)) (/opt/local/share/texmf-texlive/tex/latex/fancybox/fancybox.sty Style option: `fancybox' v1.4 <2010/05/15> (tvz) ) (/opt/local/share/texmf-texlive/tex/latex/base/makeidx.sty) ! LaTeX Error: File `docbook.sty' not found.
Change History (5)
comment:1 Changed 10 years ago by nortcele
comment:2 Changed 10 years ago by nortcele
After reading the textlive portgroup file, I changed a little bit the dblatex Portfile to use the texlive_texmflocal variable:
--- Portfile.orig 2015-03-11 15:16:10.000000000 +0100 +++ Portfile 2015-03-12 14:46:46.000000000 +0100 @@ -66,6 +66,16 @@ ln -s ${python.prefix}/share/$f ${destroot}${prefix}/share/$f } } + file mkdir ${destroot}${texlive_texmflocal}/tex/latex/dblatex + fs-traverse f ${destroot}${python.prefix}/share/dblatex/latex { + if {[file isfile $f]} { + if {[catch {exec ${prefix}/bin/kpsewhich -a [file tail $f]} result]} { + set f [string range $f [string length ${destroot}${python.prefix}/share/dblatex/latex/] end] + file mkdir [file dirname ${destroot}${texlive_texmflocal}/tex/latex/dblatex/$f] + ln -s ${python.prefix}/share/dblatex/latex/$f ${destroot}${texlive_texmflocal}/tex/latex/dblatex/$f + } + } + } ln -s ${python.prefix}/bin/dblatex ${destroot}${prefix}/bin/ }
comment:3 Changed 10 years ago by neverpanic (Clemens Lang)
Cc: | cal@… removed |
---|---|
Owner: | changed from macports-tickets@… to cal@… |
Status: | new → assigned |
Thanks for the patch, that looks good. I'll take a look once I'm back at my Mac.
comment:4 Changed 10 years ago by neverpanic (Clemens Lang)
Commited in r134131. There may have been better ways to do this without touching texmf-local, but I'd rather have a non-optimal version than a broken one.
I've also increased the revision since this changes which files are installed by the port and we need to force a rebuild because of that.
comment:5 Changed 10 years ago by neverpanic (Clemens Lang)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I changed my local version of dblatex to make texlive tools find docbook informations. Here are my modifications:
My modifications add links to dblatex files in "/opt/local/share/texmf-local/tex/latex/dblatex", but only for files that are not allready known by texlive (use of kpsewhich) to avoid the replacement of texlive files by outdated versions.
I don't know anything about TCL, dblatex or texlive so I don't know if this is a good or valid way to process, but with this modification, I could use texlive tools to manage dblatex generated files.