If I'd rather manually compile my document than use latexmk, what placeholder would I use to refer to my .bib file when running bibtex? If I modify the toolchain to run bibtex main.bib where I typed in main by hand, bibtex runs correctly; I just don't know how to have the toolchain automatically find my .bib from project to project.
tl;dr: %DOC%
This one will be replaced with the root file name without extension name. So if the .aux is generated by latex compilers, it should work just fine.
There is no need to bibtex citation.bib bib-files. At least I think so and pls correct me if I am wrong.
So, I think I disagree on both counts - what I was seeing in console output was that %DOC% is always pasting in the .tex file. And manual compilation requires pdflatex, bibtex, pdflatex, pdflatex - how would the bibliography be compiled otherwise?
The generic notation would be pdflatex main.tex, bibtex main, pdflatex main.tex, pdflatex main.tex I believe. When I explicitly add bibtex main' to my toolchain (rather thanbibtex %DOC%' it does indeed add the bibliography.
Houston, we've had a problem here.
Will be fixed.
P.S. You may try out in terminal. bibtex main.tex won't work, bibtex main or bibtex main.aux will if you have the .aux generated.
Correct - I've been editing my comment if you haven't seen (sorry) - it should be just bibtex main as you say.
Thanks so much for developing this and your quick responses... I just installed today and am really psyched to now have all of my work on VSC.
The trailing .tex is removed in %DOC%. Other extensions remain there.
This change will get released in the marketplace shortly, after reviewing other changes.
I'm seeing it working now; however, I had to explicitly put %DOC%.tex into my toolchain to compile successfully. (Using MikTex/your texify toolchain now!)
That is also strange. AFAIK pdflatex main and pdflatex main.tex work exactly the same. Can you please post logs of your building process? Both ways are fine.
That's what I thought. The toolchain doesn't even get so far as creating a log file. pdflatex main indeed works, so the issue must be with texify, which I know nothing about (I'm using it at your suggestion).
The output is:
Toolchain step 1: texify --synctex --tex-option="-interaction=nonstopmode -file-line-error" --pdf "c:\path\main"
Toolchain returns with error.
Thanks for your report. It seems to be a problem with texify. I will test the configs tmr and update code/readme if needed.
Out of interest @zachjweiner what's the reason for not using the default latexmk command? is it not provided by MikTeX? (Don't know much about LaTeX on Windows excuse my ignorance!)
I did download latexmk via MikTex, but I think I just don't have perl installed, so it doesn't run. So, mostly inertia ;P don't really care to install anything additional unless there's a good reason to use latekmk over texify.
@jabooth Windows does not ship Perl, which is needed by latexmk. It seems MikTeX bundled texify and all its dependencies for some reason.
I personally favor TeXLive more than MikTeX even on Windows. The only downside is that installing TeXLive on Win can be very time-consuming (hours or even a day).
Exactly! :P I used sharelatex for 90% of my work (until I discovered this extension!) and didn't care too much about which distribution I used. I'm sure the first three google hits of "miktex vs. texlive" convinced me to use miktex, whether because it's faster to install or some other reason I don't remember :)
Just Kidding! TLDR version MikTeX vs. TeXLive (my own opinion) 馃槅
You're gonna have to elaborate on "everything else" (if that's what we want to turn this thread into :D) because installing missing packages on-the-fly is pretty desirable for me :P
馃榿 It's just a joke and I don't want to turn the table lol. I am actually not an expert in LaTeX. For me, SyncTeX is really something handy which is not provided by MikTeX. Yet the package manager for MikTeX is really something else I missed 馃槏
Yeah you know, I tried putting the binaries in the right directory via the stackexchange thread linked somewhere here, but it ain't working for me... gotta figure that one out sometime.
Hahaha yeah let's not start a flame war! 馃槃 馃敟
Well I've started playing around with some crazy experiments around how hard it would be to ship everything a user needs for LaTeX development _inside_ LaTeX Workshop...
So that regardless of what platform you are on, you can just do the following:
And it just works, without having to install any LaTeX distribution manually.
Sounds a bit mad I know, but I actually think it might be possible. You would need internet access the first time you encounter a new package to \include{} or whatever, but we would only download the _exact_ files needed by the LaTeX compiler so it would stay pretty compact.
Basically what I have in mind is a bit like MikTeX auto installer, but on steriods, as it would be on the _file_ level rather than package level.
A grand project! Can't wait to see it happens!
Awesome, thanks for the support @James-Yu!
It's early days, will let you know when there is something more solid to share!
I've updated the readme to correct texify toolchain.
Originally I planned to introduce a new placehold %DOCFULL% for root file with extension. However it seems that %DOCFULL% == %DOC%.tex for .tex, and %DOCFULL% == %DOC% otherwise. It might be overkill to have another one that may cause confusion.
Looks good; seems redundant to create a second placeholder when one can just put the extension in manually. Thanks for the effort to support all compilation methods!
@jabooth That sounds great, but please design it to avoid installing duplicate versions within VS Code :)
Most helpful comment
Hahaha yeah let's not start a flame war! 馃槃 馃敟
Well I've started playing around with some crazy experiments around how hard it would be to ship everything a user needs for LaTeX development _inside_ LaTeX Workshop...
So that regardless of what platform you are on, you can just do the following:
And it just works, without having to install any LaTeX distribution manually.
Sounds a bit mad I know, but I actually think it might be possible. You would need internet access the first time you encounter a new package to
\include{}or whatever, but we would only download the _exact_ files needed by the LaTeX compiler so it would stay pretty compact.Basically what I have in mind is a bit like MikTeX auto installer, but on steriods, as it would be on the _file_ level rather than package level.