Skip to content

22_Latex

Davood Dorostkar edited this page Oct 4, 2024 · 2 revisions

Install klatex for math

  1. download latest source code from:
https://sourceforge.net/projects/klatexformula/files/klatexformula/
  1. install dependencies:
sudo apt-get install libqt5widgets5 libqt5gui5 libqt5core5a qtbase5-dev qttools5-dev
  1. extract
tar xvzf <source file>
  1. add #include <QPainterPath> in the src/klftools/klfflowlistwidget_p.h
  2. install
mkdir build && cd build && cmake .. && make -j`nproc` && sudo make install

Auto Latex format

add this to settings.json (to use latexindent:

    "latex-workshop.latex.autoBuild.run": "onSave",
    "latex-workshop.formatting.latex": "latexindent",
    "latex-workshop.latex.tools": [
        {
            "name": "latexindent",
            "command": "latexindent",
            "args": [
                "-w",
                "-l",
                "-s",
                "-m",
                "-a",
                "%DOC%"
            ]
        },
    ]

then install this:

sudo apt install perl cpanminus
sudo cpanm YAML::Tiny

check if it is ok:

latexindent --version

add miktex to PATH if not set yet:

which miktex
echo $PATH
Clone this wiki locally