Hi Jonathan, On Fri, Jan 25, 2013 at 12:05:47PM +0000, Jonathan Underwood wrote: > Dear All, > > I have various packages that use (La)TeX to generate documentation at > package build time. In the past, this was usually handled fine with a > BuildRequires: tex(latex) which would bring in enough of a latex > environment to build most things. > > With the more fine grained texlive packaging in F>18 where tex(latex) is > provided by texlive-collection-latex I am finding that this is insufficient > to build most documents. I see two options in these cases: > > 1) Add BuildRequires; texlive-collection-latexextra (nb. > texlive-collection-latexrecommended isn't usually sufficient) > > 2) Generate a list of specific style files using an incantation such as > > egrep -R 'usepackage|documentclass|RequirePackage' * | cut -d']' -f2 | cut > -s -d'{' -f 2 | sed s/"}"/.sty"}"/g | cut -d'}' -f1 | sort | uniq > > and turn this into a list of specific BuildRequires: tex(foo.sty) lines. > > If (1) is the preferred route, then I think we should move the virtual > provides for tex(latex) to the texlive-collection-latexextra package. If > (2) is the preferred route we probably need a wiki page and possibly a > packaging guideline explaining this. I personally lean towards the first > option (i.e. moving the tex(latex) provides to > texlive-collection-latexextra package) as it will fix a lot of packages > that currently will fail to build. > > What do folks think? the purpose of tex(*) virtual provides is to make a TeX feature available regardlessly on TeX distribution available (texlive, miktex, tetex, etc.) in Fedora. From this POV (1) doesn't seem to be an optimal solution because: * your package will be dependend on texlive TeX distro * you are going to pull in tons of dependencies you don't actually need Every TeX package contains virtual provides of: ".tfm", ".ttf", ".ttc", ".pfa", ".pfb", ".pcf", ".otf", ".tex", ".cnf", ".cfg", ".def", ".dat", ".ldf", ".fd", ".enc", ".map", ".vf", ".vpl", ".clo", ".bug", ".bg2", ".cbx", ".bbx", ".cls", ".sty" files if it ships any of file of such an extension. So the process of "my tex file doesn't compile" should be addressed like this: a) figure out which file is missing - (La)TeX is quite explicit about this in error logs b) install tex(<file>.<extension>) and add the BR to package c) does it compile now? No = go to a) d) done The tex(tex), tex(latex), etc. dependencies are here to cover minimalistic, most frequently used styles to reduce the amount of manual work. Example pdflatex error in log - style missing: ---- ! LaTeX Error: File `upquote.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) ---- solution: ---- # yum install 'tex(upquote.sty)' Loaded plugins: langpacks, presto, refresh-packagekit Resolving Dependencies --> Running transaction check ---> Package texlive-upquote.noarch 2:svn26059.v1.3-13.fc18 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================= Package Arch Version Repository Size ======================================================================= Installing: texlive-upquote noarch 2:svn26059.v1.3-13.fc18 updates 15 k Transaction Summary ======================================================================= Install 1 Package Total download size: 15 k Installed size: 1.0 k Is this ok [y/N] ---- Another example - font missing: ---- This is pdfTeX, Version 3.1415926-2.5-1.40.13 (TeX Live 2013/dev) restricted \write18 enabled. entering extended mode (./x.tex LaTeX2e <2011/06/27> Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo aded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (/usr/share/texlive/texmf-dist/tex/latex/pslatex/pslatex.sty kpathsea: Running mktextfm ptmr7t /usr/share/texlive/texmf/web2c/mktexnam: Could not map source abbreviation for ptmr7t. /usr/share/texlive/texmf/web2c/mktexnam: Need to update ? mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr7t This is METAFONT, Version 2.718281 (TeX Live 2013/dev) kpathsea: Running mktexmf ptmr7t ! I can't find file `ptmr7t'. <*> ...:=ljfour; mag:=1; nonstopmode; input ptmr7t Please type another input file name ! Emergency stop. <*> ...:=ljfour; mag:=1; nonstopmode; input ptmr7t Transcript written on mfput.log. ---- Solution: ---- # yum install 'tex(ptmr7t.tfm)' Loaded plugins: langpacks, presto, refresh-packagekit Resolving Dependencies --> Running transaction check ---> Package texlive-times.noarch 2:svn28614.0-13.fc18 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================= Package Arch Version Repository Size ======================================================================= Installing: texlive-times noarch 2:svn28614.0-13.fc18 updates 384 k Transaction Summary ======================================================================= Install 1 Package Total download size: 384 k Installed size: 1.4 M Is this ok [y/N] ---- When a package using LaTeX needs these two additional dependencies to comppile then this should be present in the spec file: BuildRequires: tex(latex) tex(upquote.sty) tex(ptmr7t.tfm) Hope that helps, Jindrich -- Jindrich Novy <jnovy@xxxxxxxxxx> http://people.redhat.com/jnovy/ Kdo víno má a nepije, kdo hrozny má a nejí je, kdo ženu má a nelíbá, kdo zábavě se vyhýbá, na toho vemte bič a hůl, to není člověk, to je vůl. --- Jan Werich -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel