-
Notifications
You must be signed in to change notification settings - Fork 25
Add new option to allow override pdflatex binary #18
Conversation
Any pdflatex-compatible binary could be used instead. For example, xelatex (as requested in readthedocs/readthedocs.org#1556).
@agjohnson, any feedback? |
I'm interested in the fix of #1556. Any feedback on this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to leave this hanging for so long. Seems we could use some updates to the spec.rst
file for this. This should make sense otherwise, with a companion patch to rtfd/readthedocs.org to use this setting.
readthedocs_build/config/config.py
Outdated
@@ -291,6 +293,13 @@ def validate_conda(self): | |||
|
|||
self['conda'] = conda | |||
|
|||
def validate_pdflatex(self): | |||
if 'pdflatex' not in self.raw_config: | |||
self['pdflatex'] = validate_string('pdflatex') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no need to validate this string
Ok, I did requested change.
Maybe it's better to use latex_engine option from conf.py? In this case - probably no changes should be made here, but all in rtfd/readthedocs.org repo. |
Test failure seems to be unrelated - master branch is broken. |
@skirpichev I'm not the one taking the decisions but I would suggest to add documentation (maybe in On the other hand, this PR will need another one into the |
Sure. But I don't know where it should be. Most yml settings are documented now in readthedocs.org main repo.
Maybe. But your suggestions looks even more cryptic.
Or just add more validation for this option, e.g. test if this value resolves to some binary in $PATH.
Sure. I'm waiting here, because otherwise PR against readthedocs.org doesn't make sense. Here is another way to solve issue. So, it's possible without changes in readthedocs-build, in principle. |
So, this seems a little more complicated than just swapping out the binary used. I agree with @humitos that the option shouldn't be just a string, and that it should probably be moved to a different namespace in the space. Bear with us, this is going to be a spec related decision. I believe we'll be adding a number of options to configure sphinx eventually, so perhaps putting it under the sphinx namespace makes more sense. Here are some options: sphinx:
latex:
binary: (?:xelatex|latex)
sphinx:
latex_binary: (?:xelatex|latex) I think i lean towards option 1, perhaps there are others? This would take adding parsing of the |
@agjohnson, could you provide an example? Most sphinx stuff - configurable via conf.py, I think. |
I also prefer the option 1 since it prepares RTD for the future in case we want to teak a little bit more sphinx or even the latex builder.
I think the idea of the |
@humitos, I hope, it's not... |
@agjohnson, thank you for review and sorry for your time. I'll close this pr per readthedocs/readthedocs.org#2362 |
Any pdflatex-compatible binary could be used instead. For example, xelatex (as requested in readthedocs/readthedocs.org#1556).
This is a very primitive version of that can be used to solve mentioned issue. Some other variants are mentioned in the issue thread.