VS Code : Latex formatter


For this we need to install two things.

1. LaTeX Workshop extension in VS Code editor
2. latexindent.pl

LaTeX Workshop

Below is the description of extension. 

Name: LaTeX Workshop
Id: james-yu.latex-workshop
Description: Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
Version: 8.9.0
Publisher: James Yu
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop

You can find it in VS Code extension search list.

latexindent.pl

For windows, download latexindent.exe and defaultSettings.yaml from given link
Make sure both files exists in same directory.
Run latexindent.exe as administator. (If you got windows screen error, just click on more info and select run anyway)


That's it. 
Copy the tex file in the same directory where latexindent.exe exist.
Now open the tex file in VSCode, 
select content that you want to format, 
right click and select format document, 
then select LaTeX Workshop

Comments