-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about toolchain #292
Comments
The is correct, when set to |
I think so. I have to check the build log, but yesterday I did a simple experiment. I put the command \usepackage{tgpagella} to change the document font. This (AFAIK) will only work with pdflatex. If I explicitly specify the latexmk toolchain, the document will compile correctly (ie., using the TeX Gyre Pagella font). However, if I use the auto toolchain, xelatex is always used (ie., the custom toolchain) and the document is compiled using the CM font instead. |
We just read the exit code of the command and use that as a metric of failure. You could try adding |
I'm not sure if this test will work. As I said, the custom toolchain (in my case that means xelatex) seems to be run first. So if I add that package, the document will compile correctly since it is compiled using xelatex. I honestly don't know if this is because the software have tried latexmk (ie., pdflatex) first, failed, then switched to custom. I doubt this, though, since even if I don't add any xelatex-specific package the document is always compiled with xelatex. If the latexmk is favoured, then such a document should have been compiled with pdflatex. An example is the following bare-bones LaTeX source code. It should not generate any errors with pdflatex (i.e., latexmk should not fail), but the document seems to still be compiled using xelatex instead of pdflatex. |
Please share your package settings |
Will do. But forgive me for asking: how best should I do that? Make a screen shot? Sorry, I'm new at Atom and perhaps I'm missing the obvious. |
Screenshot, or |
I might have been a bit misleading - Sorry for the confusion. For the matter of |
I'm not sure about the |
Then it probably doesn't exist ;-) Just to confirm, when you manually switch from |
Yes, if I specifically choose |
Can you add a debug statements in setCmds: ->
@latex.manager.loadLocalCfg()
if @latex.manager.config?.toolchain
@custom_toolchain(@latex.manager.config.toolchain)
console.log "cfg:", @cmds
else if atom.config.get('atom-latex.toolchain') == 'auto'
if !@latexmk_toolchain()
@custom_toolchain()
console.log "Auto:", @cmds
else if atom.config.get('atom-latex.toolchain') == 'latexmk toolchain'
@latexmk_toolchain()
console.log "latexmk :", @cmds
else if atom.config.get('atom-latex.toolchain') == 'custom toolchain'
@custom_toolchain()
console.log "custom :", @cmds
This can be done by going to the Atom-Latex package page, and then clicking "View Code" editing, and then reloading your test document window with Then share what you see in the dev console for |
I hope these are what you had in mind:
|
Okay, we are getting somewhere now.
|
The outputs are all false, except for the last one: The output to the last two commands are:
|
Right - so that is the issue, when setting the custom toolchain, it fails to find What you can do is remove all the debug logging, and then remove the Line 170 in b8f3c80
i.e if !@binCheck('latexmk') It should then use |
latexmk -xelatex .... and you are fine :-) see latexmk --help for details |
@ashthespy: Tried what you suggested. Now when I use @op183: I don't think that is what I want. If I understand it correctly, your suggestion will always tell atom to use |
No as I mentioned in #292 (comment) this isn't the inbuilt to the package. The fall back is more to check if For your usecase I would suggest using a |
@iwan1510 I suggest always using auto (latexmk) and in settings define the parameters For example i use -synctex=1 -interaction=nonstopmode -file-line-error -pdflua to compile my LuaLaTex source. It tells latexmk tu use lualatx and generate pdf. Other examples -pdfxe - generate pdf by xelatex and so on .... If you need even something more flexible see see https://mg.readthedocs.io/latexmk.html for further details |
But that would mean you need to switch parameters for each project.. |
@ashthespy or put all the necessary logic into perl script ... latexmk is nothing but such a perl script https://mirror.szerverem.hu/ctan/support/latexmk/latexmk.pdf |
Indeed, you could always implement logic yourself ;) Ideally, the package should understand the Personally, I just define in each root file what the processor should be
And then set my custom tool chain to All different ways to achieve the same thing ;-) |
@ashthespy and @op183, thank you for the suggestions and explanations. I think for the time being I have a clear(er) understanding of the current capabilities and limitations of the package with regard to switching TeX engine. I think my original question has been answered. I thank you both and I will close the issue. |
This is more of a question rather than a bug report: I mainly use PDFLatex, but sometimes I do use Xelatex. I modify the custom toolchain such that it runs xelatex instead of pdflatex. I can compile a document using xelatex when I choose custom toolchain. The way I understand it, though, if I choose "Auto" toolchain, it would first try latexmk toolchain (and thus using pdflatex, instead of xelatex). If it fails, then the custom toolchain will be used. However, everytime I choose Auto, it will instead runs xelatex instead of pdflatex. If I want to use pdflatex, I had to specifically choose the latexmk toolchain.
I am very new with atom-latex, so I might be missing the obvious here. But am I doing something wrong, or is my understanding about Auto trying latexmk toolchain first before using custom toolchain wrong? Or is there something else going on here?
If it helps, I am trying to compile a very simple file containing just a few lines of text (I am just trying to get a feel for atom-latex here).
The text was updated successfully, but these errors were encountered: