meltuhamy / latex-watcher Goto Github PK
View Code? Open in Web Editor NEWA (very) simple latex file watcher to auto-compile tex files.
License: MIT License
A (very) simple latex file watcher to auto-compile tex files.
License: MIT License
Hi @meltuhamy,
nice piece of work you did there. I'm currently using latex-watcher with the package minted (https://ctan.org/tex-archive/macros/latex/contrib/minted/) which forces the pdflatex flag -shell-escape
to be set.
I just put that additional flag into line 86 of the compilePDFLatex function
compilePDFLatex = function(cb){
process.stdout.write(' » pdflatex');
var pdflatex = spawn('pdflatex', ['-interaction=nonstopmode','-shell-escape',texName]);
pdflatex.on('exit', function (code) {
process.stdout.write((code==0 ? '\r ✓ pdflatex'.green : '\r × pdflatex'.red) + '\n');
if(code != 0){
displayErrors(cb);
} else if(cb != undefined) cb();
});
},
So, my latex-watcher command is not changed:
latex-watcher -c pdflatex,bibtex,pdflatex,pdflatex -t document.tex -b document
It would be nice to add the functionality of adding arbitrary flags and options to the run commands. Like
latex-watcher -c pdflatex[shell-escape],bibtex,pdflatex[shell-escape,anotherkey=anothervalue],pdflatex[shell-escape] -t document.tex -b document
If you like that feature i'll put a pull request here soon. If you are not interested in any contribution or action on this, just let me know.
Have a happy new year!
It would be nice to have a one-off compile option (e.g. latex-watcher --once -c pdflatex,clean -t main
or latex-watcher --once -c clean
). This would be nice since it's always a pain to clean up latex temp files.
Version of pdflatex: pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)
Version of node: v0.10.26
When I run "latex-watcher -c pdflatex -t main -b main", it gets stuck with "Compiling -- pdflatex"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.