Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 576424 - latex-package.eclass: allow passing arguments to pdflatex
Summary: latex-package.eclass: allow passing arguments to pdflatex
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: TeX project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-03-04 10:27 UTC by Jonas Rabenstein
Modified: 2016-03-05 16:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
add LATEX_ARGUMENTS for documentation compilation (latex-package.eclass.patch,1.12 KB, patch)
2016-03-04 10:27 UTC, Jonas Rabenstein
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Rabenstein 2016-03-04 10:27:45 UTC
Created attachment 427384 [details, diff]
add LATEX_ARGUMENTS for documentation compilation

the latex package dev-tex/minted requires to pass -shell-escape to pdflatex in order to compile its documentation. As this may be required also for other packages, to pass this or other arguments to pdflatex/texi2pdf in order to compile correctly. I suggest adding a variable with optional (default empty) arguments.
Attached is a patch introducing the variable LATEX_ARGUMENTS for this task.
Comment 1 Alexis Ballier gentoo-dev 2016-03-05 12:08:03 UTC
sounds like a good idea (though '-shell-escape' is really not safe but that's another issue :) )

just one thing: I wouldn't pass those args to texi2dvi; even if some are mapped 1:1 I don't think texi2dvi guarantees that every single pdflatex arg ever will be accepted and passed properly.


could you please submit a github PR with the above amendment ? (it's easier for me to merge and you retain authorship in git log)
Comment 2 Jonas Rabenstein 2016-03-05 13:34:50 UTC
of course -shell-escape is nothing to enable by default - but sometimes required, as may other options too.

As texi2pdf is used as fall back, I think there should be at least a way to give some options to both of them? Having two variables is a bit overkill in my opinion. I'm not familiar with texi2pdf and therefore don't know much about compatibility between both - just looked for shell-escape in the according man page.

as I am quite new to gentoo: github PR to https://github.com/gentoo/gentoo?
Comment 3 Alexis Ballier gentoo-dev 2016-03-05 13:39:39 UTC
(In reply to Jonas Rabenstein from comment #2)
> As texi2pdf is used as fall back, I think there should be at least a way to
> give some options to both of them? Having two variables is a bit overkill in
> my opinion. I'm not familiar with texi2pdf and therefore don't know much
> about compatibility between both - just looked for shell-escape in the
> according man page.

well, I left the texi2dvi fallback just in case, but it really shouldn't be used anymore IMHO: if your package works with 'pdflatex $some_options', then you shouldn't worry at all about texi2dvi
I'd rather leave the texi2dvi call as is in fact

> as I am quite new to gentoo: github PR to https://github.com/gentoo/gentoo?

yep, exactly
Comment 4 Alexis Ballier gentoo-dev 2016-03-05 16:18:06 UTC
PR merged, thanks!