2016-09-17 14:10:04 -04:00
|
|
|
Execute (Setup):
|
|
|
|
set shiftwidth=2
|
|
|
|
set expandtab
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Given tex (Indent: regular tex):
|
2016-03-26 04:38:46 -04:00
|
|
|
\documentclass{minimal}
|
|
|
|
\usepackage{amsmath}
|
|
|
|
\usepackage{tikz}
|
|
|
|
\begin{document}
|
|
|
|
|
|
|
|
{
|
|
|
|
asdasd
|
|
|
|
}
|
|
|
|
|
|
|
|
\end{document}
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Do (Indent):
|
2016-03-26 04:38:46 -04:00
|
|
|
gg=G
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Expect tex (Verify):
|
2016-03-26 04:38:46 -04:00
|
|
|
\documentclass{minimal}
|
|
|
|
\usepackage{amsmath}
|
|
|
|
\usepackage{tikz}
|
|
|
|
\begin{document}
|
|
|
|
|
|
|
|
{
|
|
|
|
asdasd
|
|
|
|
}
|
|
|
|
|
|
|
|
\end{document}
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Given tex (Indent: lists):
|
2016-03-26 04:38:46 -04:00
|
|
|
\begin{itemize}
|
|
|
|
\item item is indented twice
|
|
|
|
and the next line is indented to match
|
|
|
|
\end{itemize}
|
|
|
|
|
|
|
|
\begin{description}
|
|
|
|
\item[One] Ingeniería Electrónica ``first'';
|
|
|
|
a couple of lines.
|
|
|
|
\item[Doctorado] ``Generic title''
|
|
|
|
(Author): commentaries here
|
|
|
|
\end{description}
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Do (Indent):
|
2016-03-26 04:38:46 -04:00
|
|
|
gg=G
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Expect tex (Verify):
|
2016-03-26 04:38:46 -04:00
|
|
|
\begin{itemize}
|
|
|
|
\item item is indented twice
|
|
|
|
and the next line is indented to match
|
|
|
|
\end{itemize}
|
|
|
|
|
|
|
|
\begin{description}
|
|
|
|
\item[One] Ingeniería Electrónica ``first'';
|
|
|
|
a couple of lines.
|
|
|
|
\item[Doctorado] ``Generic title''
|
|
|
|
(Author): commentaries here
|
|
|
|
\end{description}
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Given tex (Indent: math):
|
2016-08-04 16:21:58 -04:00
|
|
|
\[
|
2016-03-26 04:38:46 -04:00
|
|
|
1+1
|
|
|
|
\]
|
|
|
|
|
|
|
|
\begin{align}
|
|
|
|
2+2=4
|
|
|
|
\end{align}
|
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
\left(
|
|
|
|
f(x) = 3
|
|
|
|
\right)
|
|
|
|
\left.
|
|
|
|
f(x) = 3
|
|
|
|
\right.
|
|
|
|
\end{equation}
|
|
|
|
|
2016-10-11 17:02:30 -04:00
|
|
|
Test $[ ... )$ of unmatched brackets in
|
|
|
|
inline math text.
|
|
|
|
|
|
|
|
In R, there is the operator \verb|[<-|...
|
|
|
|
that ...
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Do (Indent):
|
2016-03-26 04:38:46 -04:00
|
|
|
gg=G
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Expect tex (Verify):
|
2016-03-26 04:38:46 -04:00
|
|
|
\[
|
|
|
|
1+1
|
|
|
|
\]
|
|
|
|
|
|
|
|
\begin{align}
|
|
|
|
2+2=4
|
|
|
|
\end{align}
|
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
\left(
|
|
|
|
f(x) = 3
|
|
|
|
\right)
|
|
|
|
\left.
|
2016-07-13 17:28:59 -04:00
|
|
|
f(x) = 3
|
2016-03-26 04:38:46 -04:00
|
|
|
\right.
|
|
|
|
\end{equation}
|
|
|
|
|
2016-10-11 17:02:30 -04:00
|
|
|
Test $[ ... )$ of unmatched brackets in
|
|
|
|
inline math text.
|
|
|
|
|
|
|
|
In R, there is the operator \verb|[<-|...
|
|
|
|
that ...
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Given tex (Indent: tikz):
|
2016-03-26 04:38:46 -04:00
|
|
|
\tikz \fill[green] rectangle (0.5,0.5); Something
|
|
|
|
about something.
|
|
|
|
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\draw [solid] let \p{I} = (0,0) in (1,1) -|
|
|
|
|
(\x{I}-1cm,-1cm) node [yshift=-.25cm] {(i)};
|
|
|
|
% Just some comment
|
|
|
|
\end{tikzpicture}
|
|
|
|
|
|
|
|
\begin{tikzpicture}
|
|
|
|
% (i) center contact head
|
|
|
|
\draw [solid] let \p{I} = (centerContactHead) in (centerContactHead) -|
|
|
|
|
(\x{I}-.75cm,-2.5)
|
|
|
|
node [yshift=-.25cm] {(i)};
|
|
|
|
|
|
|
|
% (ii) outer conductor of the contact head
|
|
|
|
\coordinate (outerContactHead) at (.8,-1.7);
|
|
|
|
\draw [solid] let \p{O} = (outerContactHead)
|
|
|
|
in (outerContactHead) -- (\x{O},-2.5)
|
|
|
|
node [yshift=-.25cm] {(ii)};
|
2016-12-17 06:13:21 -05:00
|
|
|
|
|
|
|
\begin{axis}
|
|
|
|
\addplot
|
|
|
|
table[row sep=crcr]{%
|
|
|
|
0 0\\
|
|
|
|
1 1\\
|
|
|
|
2 2\\
|
|
|
|
};
|
|
|
|
\end{axis}
|
2016-03-26 04:38:46 -04:00
|
|
|
\end{tikzpicture}
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Do (Indent):
|
2016-03-26 04:38:46 -04:00
|
|
|
gg=G
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Expect tex (Verify):
|
2016-03-26 04:38:46 -04:00
|
|
|
\tikz \fill[green] rectangle (0.5,0.5); Something
|
|
|
|
about something.
|
|
|
|
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\draw [solid] let \p{I} = (0,0) in (1,1) -|
|
|
|
|
(\x{I}-1cm,-1cm) node [yshift=-.25cm] {(i)};
|
|
|
|
% Just some comment
|
|
|
|
\end{tikzpicture}
|
|
|
|
|
|
|
|
\begin{tikzpicture}
|
|
|
|
% (i) center contact head
|
|
|
|
\draw [solid] let \p{I} = (centerContactHead) in (centerContactHead) -|
|
|
|
|
(\x{I}-.75cm,-2.5)
|
|
|
|
node [yshift=-.25cm] {(i)};
|
|
|
|
|
|
|
|
% (ii) outer conductor of the contact head
|
|
|
|
\coordinate (outerContactHead) at (.8,-1.7);
|
|
|
|
\draw [solid] let \p{O} = (outerContactHead)
|
|
|
|
in (outerContactHead) -- (\x{O},-2.5)
|
|
|
|
node [yshift=-.25cm] {(ii)};
|
2016-12-17 06:13:21 -05:00
|
|
|
|
|
|
|
\begin{axis}
|
|
|
|
\addplot
|
|
|
|
table[row sep=crcr]{%
|
|
|
|
0 0\\
|
|
|
|
1 1\\
|
|
|
|
2 2\\
|
|
|
|
};
|
|
|
|
\end{axis}
|
2016-03-26 04:38:46 -04:00
|
|
|
\end{tikzpicture}
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Given tex (Indent: verbatims):
|
2016-08-04 16:21:58 -04:00
|
|
|
\begin{verbatim}
|
2016-03-27 18:22:10 -04:00
|
|
|
#!/bin/bash
|
|
|
|
echo "test"
|
|
|
|
\end{verbatim}
|
|
|
|
|
|
|
|
\begin{lstlisting}
|
|
|
|
Indent
|
|
|
|
should
|
|
|
|
not affect verbatim environments!
|
|
|
|
\end{lstlisting}
|
2016-03-26 04:38:46 -04:00
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Do (Indent):
|
2016-03-26 04:38:46 -04:00
|
|
|
gg=G
|
|
|
|
|
2016-04-07 16:12:46 -04:00
|
|
|
Expect tex (Verify):
|
2016-03-26 04:38:46 -04:00
|
|
|
\begin{verbatim}
|
2016-03-27 18:22:10 -04:00
|
|
|
#!/bin/bash
|
|
|
|
echo "test"
|
2016-03-26 04:38:46 -04:00
|
|
|
\end{verbatim}
|
|
|
|
|
2016-03-27 18:22:10 -04:00
|
|
|
\begin{lstlisting}
|
|
|
|
Indent
|
|
|
|
should
|
|
|
|
not affect verbatim environments!
|
|
|
|
\end{lstlisting}
|
|
|
|
|
2016-12-05 16:23:51 -05:00
|
|
|
Given tex (Indent: ampersands):
|
2016-09-17 13:54:39 -04:00
|
|
|
\begin{tabular}{cc}
|
|
|
|
\begin{tabular}{c}
|
|
|
|
Cell 1
|
|
|
|
\end{tabular} &
|
|
|
|
\begin{tabular}{c}
|
|
|
|
Cell 2
|
|
|
|
\end{tabular}
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
\begin{aligned}
|
2016-09-17 16:23:50 -04:00
|
|
|
1 &
|
|
|
|
& 2 \\
|
|
|
|
3 &
|
|
|
|
& 4 \\
|
2016-09-17 13:54:39 -04:00
|
|
|
\end{aligned}
|
|
|
|
\end{equation}
|
|
|
|
|
|
|
|
Do (Indent):
|
|
|
|
gg=G
|
|
|
|
|
|
|
|
Expect tex (Verify):
|
|
|
|
\begin{tabular}{cc}
|
|
|
|
\begin{tabular}{c}
|
|
|
|
Cell 1
|
|
|
|
\end{tabular} &
|
|
|
|
\begin{tabular}{c}
|
|
|
|
Cell 2
|
|
|
|
\end{tabular}
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
\begin{aligned}
|
2016-09-17 16:23:50 -04:00
|
|
|
1 &
|
|
|
|
& 2 \\
|
|
|
|
3 &
|
|
|
|
& 4 \\
|
2016-09-17 13:54:39 -04:00
|
|
|
\end{aligned}
|
|
|
|
\end{equation}
|
|
|
|
|
2016-12-30 16:27:57 -05:00
|
|
|
Given:
|
|
|
|
Execute (let g:vimtex_indent_on_ampersands = 0):
|
|
|
|
let g:vimtex_indent_on_ampersands = 0
|
|
|
|
|
|
|
|
Given tex (Indent: ampersands 2):
|
|
|
|
\begin{equation}
|
|
|
|
\begin{aligned}
|
|
|
|
1 &
|
|
|
|
& 2 \\
|
|
|
|
3 &
|
|
|
|
& 4 \\
|
|
|
|
\end{aligned}
|
|
|
|
\end{equation}
|
|
|
|
|
|
|
|
|
|
|
|
Do (Indent):
|
|
|
|
gg=G
|
|
|
|
|
|
|
|
Expect tex (Verify):
|
|
|
|
\begin{equation}
|
|
|
|
\begin{aligned}
|
|
|
|
1 &
|
|
|
|
& 2 \\
|
|
|
|
3 &
|
|
|
|
& 4 \\
|
|
|
|
\end{aligned}
|
|
|
|
\end{equation}
|
|
|
|
|
2016-12-05 16:23:51 -05:00
|
|
|
Given tex (Indent: ignored environments):
|
|
|
|
\documentclass{minimal}
|
|
|
|
\usepackage{amsmath}
|
|
|
|
\begin{document}
|
|
|
|
|
|
|
|
\begin{proof}
|
|
|
|
This statement is false.
|
|
|
|
\end{proof}
|
|
|
|
\end{document}
|
|
|
|
|
|
|
|
Execute (let g:vimtex_indent_ignored_envs = ...):
|
|
|
|
let g:vimtex_indent_ignored_envs = ['document', 'proof']
|
|
|
|
|
|
|
|
Do (Indent):
|
|
|
|
gg=G
|
|
|
|
|
|
|
|
Expect tex (Verify):
|
|
|
|
\documentclass{minimal}
|
|
|
|
\usepackage{amsmath}
|
|
|
|
\begin{document}
|
|
|
|
|
|
|
|
\begin{proof}
|
|
|
|
This statement is false.
|
|
|
|
\end{proof}
|
|
|
|
\end{document}
|
|
|
|
|
|
|
|
Given:
|
|
|
|
Execute (unlet g:vimtex_indent_ignored_envs):
|
|
|
|
unlet g:vimtex_indent_ignored_envs
|
2016-12-30 16:27:57 -05:00
|
|
|
unlet g:vimtex_indent_on_ampersands
|
2016-12-05 16:23:51 -05:00
|
|
|
|