Passing command-line arguments to LaTeX document

That is, can I pass latex some command-line arguments so that I can choose which style to use based on that argument? Yes. Three options: One In your source file, write \providecommand{\comment}[1]{\emph{#1}}% fallback definition and then compile the LaTeX document (“myfile.tex”) as pdflatex (whatever options you need) “\newcommand\comment[1]{\textbf{#1}}\input{myfile}” Two Alternatively, pdflatex “\let\ifmyflag\iftrue\input{myfile}” and then have … Read more

Enable xelatex in Latex Workshops for Visual Studio Code

The simplest solution found in issues here, but in more common formulation: Copying the content, simply go to Preferences → Extensions → LaTeX (meaning LaTeX is LaTeX workshops), find gear-wheel button with name Manage, then find in the list link to settings.json under any tag, open and type next: “latex-workshop.latex.tools”: [{ “name”: “latexmk”, “command”: “latexmk”, … Read more

Python: Unable to Render Tex in Matplotlib

On an Ubunutu 14.04 machine the combination of answers from above worked. I sudo apt-get install the dvipng,texlive-latex-extra, and texlive-fonts-recommended packages and that did the trick: $ sudo apt-get install dvipng texlive-latex-extra texlive-fonts-recommended Edit: As of Matplotlib 3.2.1, you now also need the package cm-super (see https://github.com/matplotlib/matplotlib/issues/16911) $ sudo apt-get install dvipng texlive-latex-extra texlive-fonts-recommended cm-super

How to create a timeline with LaTeX?

There is a new chronology.sty by Levi Wiseman. The documentation (pdf) says: Most timeline packages and solutions for LATEX are used to convey a lot of information and are therefore designed vertically. If you are just attempting to assign labels to dates, a more traditional timeline might be more appropriate. That’s what chronology is for. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)