Skip to content

Instantly share code, notes, and snippets.

@cmhughes
Created May 22, 2022 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmhughes/6ffaf004e573838d4209d36387cfe105 to your computer and use it in GitHub Desktop.
Save cmhughes/6ffaf004e573838d4209d36387cfe105 to your computer and use it in GitHub Desktop.
latexindent.yaml for tex exchange 645096
fineTuning:
UnNamedGroupingBracesBrackets:
follow: '\{|\[|,|&|\)|\(|\$|--'
noAdditionalIndentGlobal:
UnNamedGroupingBracesBrackets: 1
@cmhughes
Copy link
Author

Starting with

\begin{tikzpicture}
    \graph [layered layout] {
        "\(S_3\)"
        --
        {
            "\(\langle \alpha \rangle\)",
            "\(\langle \beta \rangle\)",
            "\(\langle \alpha\beta \rangle\)",
            "\(\langle \alpha^2\beta \rangle\)",
        }
        --
        "\(\{e\}\)";
    };
\end{tikzpicture}

and calling

latexindent.pl -l myfile.tex -wd

gives

\begin{tikzpicture}
	\graph [layered layout] {
		"\(S_3\)"
		--
		{
			"\(\langle \alpha \rangle\)",
			"\(\langle \beta \rangle\)",
			"\(\langle \alpha\beta \rangle\)",
			"\(\langle \alpha^2\beta \rangle\)",
		}
		--
		"\(\{e\}\)";
	};
\end{tikzpicture}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment