diff --git a/autotests/folding/example.rmd.fold b/autotests/folding/example.rmd.fold --- a/autotests/folding/example.rmd.fold +++ b/autotests/folding/example.rmd.fold @@ -1,7 +1,7 @@ --- -title: "test" -author: "me" -date: "07.10.2014" +title: "test" +author: "me" +date: "07.10.2014" output: html_document --- diff --git a/autotests/folding/highlight.tex.fold b/autotests/folding/highlight.tex.fold --- a/autotests/folding/highlight.tex.fold +++ b/autotests/folding/highlight.tex.fold @@ -1,11 +1,11 @@ % LaTeX test file for kate's syntax highlighting and code folding \ordinaryLaTeXcommandwithoption[10pt,a4paper]{article} -% BEGIN region +% BEGIN region %comment, this is all ok % $ \%no comments please \\%comment -% END of region +% END of region \newcommand{\nohighlighting} @@ -17,11 +17,11 @@ \begin{environmentshavespecialcolors} normal -\end{environmentshavespecialcolors} +\end{environmentshavespecialcolors} $equations are green, \commands somewhat darker$ normal -$$equations are green, \commands somewhat darker$$ +$$equations are green, \commands somewhat darker$$ normal \( \frac{1}{2} @@ -38,21 +38,24 @@ green\darkergreen \begin{test} \test -\end{test} +\end{test} \end{equation} \begin{equation*} green\darkergreen %comment \begin{test} \test -\end{test} +\end{test} \%no comment \end{equation*} \{ %this should be comment \verb%this shouldn't be%and this should be normal text +\verb!verbatim text! normal text + +text \texttt{more text} \begin{verbatim} text inside a verbatim environment is also treated special $ %, @@ -71,6 +74,14 @@ normal +\begin{Verbatim} +\begin{verbatim} +This is a verbatim block. +\end{verbatim} +\end{Verbatim} + +normal + % test alignat \begin{alignat}{2} A &= B &= C \\ @@ -82,4 +93,170 @@ \fill commented out text \fi +% Math mode + +Depending on the value of $x$ the equation \( f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \) may diverge or converge. + +\[ f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \] + +\[ +S = \{ z \in \mathbb{C}\, |\, |z| < 1 \} \quad \textrm{and} \quad S_2=\partial{S} +\] + +\[ +\frac{ + \begin{array}[b]{r} + \left( x_1 x_2 \right)\\ + \times \left( x'_1 x'_2 \right) + \end{array} + }{ + \left( y_1y_2y_3y_4 \right) + } +\] + +\begin{eqnarray*} +\begin{eqnarray*} +f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \\ +\textstyle f(x) = \textstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\ +\scriptstyle f(x) = \scriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\ +\scriptscriptstyle f(x) = \scriptscriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} +\end{eqnarray*} +\end{eqnarray*} + +\begin{xalignat}{3} +i_{11} & =i_{23}\nonumber +\end{xalignat} + +c +\begin{equation} +c +\begin{aligned} +a & b\\ +c & d +\end{aligned} +c +\end{equation} +c + +$$E=mc^2$$ + +\begin{equation} +E=m +\end{equation} + +\begin{equation +x=3\textrm{plop} +\end{equation} + +\[ \begin{array}{llll} + x^3 = (-x)^3 & \text{if $x > 0$}\\ + x^3 = (-x)^3 & \text{if {$x > 0$}}\\ + x^3 = (-x)^3 & \text{if {\color{green} $x > 0$}}\\ +\end{array} \] + +\section*{Notes for My Paper} + +\begin{center} +\begin{tabular}{ |c|c|c| } + \hline + cell1 & cell2 & cell3 \\ + cell4 & cell5 & cell6 \\ + cell7 & cell8 & cell9 \\ + \hline +\end{tabular} + +\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill} } | c | c | c | r | } + \hline + label 1 & label 2 & label 3 & label 4 \\ + \hline + item 1 & item 2 & item 3 & item 4 \\ + \hline +\end{tabular*} + +\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | } + \hline + label 1 & label 2 & label 3 & label 4 \\ + \hline + item 1 & item 2 & item 3 & item 4 \\ + \hline +\end{tabular*} +\end{center} + + +\begin{tabularx}{1\textwidth}{ |>{\setlength\hsize{1\hsize}\centering}X|>{\setlength\hsize{1\hsize}\raggedleft}X@{} >{\setlength\hsize{1\hsize}\raggedright}X|>{\setlength\hsize{1\hsize}\centering}X| } + \hline +Label 1 & \multicolumn{2}{>{\centering\setlength\hsize{2\hsize} }X|}{Label 2} & Label 3\tabularnewline +\hline + 123 & 123 & 456 & 123 \tabularnewline + \hline + 123 & 123 & 456 & 123 \tabularnewline + \hline +\end{tabularx} + +\begin{lstlisting} +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting}%[frame=single] +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting}[frame=single] +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting}[frame=single] % blah blah +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting} +[frame=single] % blah blah +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{minted}{python} +def foo(x): + return x +\end{minted} + +\begin{minted} +% blah blah +{python} +def foo(x): + return x +\end{minted} + +\begin{minted}[frame=lines]{python} +def foo(x): + return x +\end{minted} + +\begin{minted} +% plop +[frame=lines, +fontsize=\footnotesize +] +% ok +{python} +def foo(x): + return x +\end{minted} + +\begin{comment} +This is a comment block. +\end{comment} + +\documentclass{article} +\usepackage{fancyvrb} + +\documentclass[12pt]{article} +\begin{document} + +Text that has a footnote\footnote{This $i_s$ the \[i_s\] $$x_i$$ \(x_i\)footnote}\addtocounter{footnote}{-1}\addtocounter{footnote}{-1} looks like this. Later text referring to same footnote\footnotemark uses the other command. +\end{document} diff --git a/autotests/folding/test.tex.fold b/autotests/folding/test.tex.fold deleted file mode 100644 --- a/autotests/folding/test.tex.fold +++ /dev/null @@ -1,5 +0,0 @@ -% commet - -text \texttt{more text} - -\verb!verbatim text! normal text diff --git a/autotests/html/highlight.tex.html b/autotests/html/highlight.tex.html --- a/autotests/html/highlight.tex.html +++ b/autotests/html/highlight.tex.html @@ -31,8 +31,8 @@ normal \( \frac{1}{2} -\begin{test} -\end{test} +\begin{test} +\end{test} \) normal \[ @@ -44,21 +44,24 @@ green\darkergreen \begin{test} \test -\end{test} +\end{test} \end{equation} \begin{equation*} green\darkergreen %comment \begin{test} \test -\end{test} +\end{test} \%no comment \end{equation*} \{ %this should be comment \verb%this shouldn't be%and this should be normal text +\verb!verbatim text! normal text + +text \texttt{more text} \begin{verbatim} text inside a verbatim environment is also treated special $ %, @@ -71,12 +74,20 @@ &@@#^%&^#$ \end{Verbatim} -\begin{Verbatim*} +\begin{Verbatim*} @*&^#@*(^#(*@& \end{Verbatim*} normal +\begin{Verbatim} +\begin{verbatim} +This is a verbatim block. +\end{verbatim} +\end{Verbatim} + +normal + % test alignat \begin{alignat}{2} A &= B &= C \\ @@ -88,5 +99,171 @@ \fill commented out text \fi +% Math mode + +Depending on the value of $x$ the equation \( f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \) may diverge or converge. + +\[ f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \] + +\[ +S = \{ z \in \mathbb{C}\, |\, |z| < 1 \} \quad \textrm{and} \quad S_2=\partial{S} +\] + +\[ +\frac{ + \begin{array}[b]{r} + \left( x_1 x_2 \right)\\ + \times \left( x'_1 x'_2 \right) + \end{array} + }{ + \left( y_1y_2y_3y_4 \right) + } +\] + +\begin{eqnarray*} +\begin{eqnarray*} +f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \\ +\textstyle f(x) = \textstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\ +\scriptstyle f(x) = \scriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\ +\scriptscriptstyle f(x) = \scriptscriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} +\end{eqnarray*} +\end{eqnarray*} + +\begin{xalignat}{3} +i_{11} & =i_{23}\nonumber +\end{xalignat} + +c +\begin{equation} +c +\begin{aligned} +a & b\\ +c & d +\end{aligned} +c +\end{equation} +c + +$$E=mc^2$$ + +\begin{equation} +E=m +\end{equation} + +\begin{equation +x=3\textrm{plop} +\end{equation} + +\[ \begin{array}{llll} + x^3 = (-x)^3 & \text{if $x > 0$}\\ + x^3 = (-x)^3 & \text{if {$x > 0$}}\\ + x^3 = (-x)^3 & \text{if {\color{green} $x > 0$}}\\ +\end{array} \] + +\section*{Notes for My Paper} + +\begin{center} +\begin{tabular}{ |c|c|c| } + \hline + cell1 & cell2 & cell3 \\ + cell4 & cell5 & cell6 \\ + cell7 & cell8 & cell9 \\ + \hline +\end{tabular} + +\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill} } | c | c | c | r | } + \hline + label 1 & label 2 & label 3 & label 4 \\ + \hline + item 1 & item 2 & item 3 & item 4 \\ + \hline +\end{tabular*} + +\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | } + \hline + label 1 & label 2 & label 3 & label 4 \\ + \hline + item 1 & item 2 & item 3 & item 4 \\ + \hline +\end{tabular*} +\end{center} + + +\begin{tabularx}{1\textwidth}{ |>{\setlength\hsize{1\hsize}\centering}X|>{\setlength\hsize{1\hsize}\raggedleft}X@{} >{\setlength\hsize{1\hsize}\raggedright}X|>{\setlength\hsize{1\hsize}\centering}X| } + \hline +Label 1 & \multicolumn{2}{>{\centering\setlength\hsize{2\hsize} }X|}{Label 2} & Label 3\tabularnewline +\hline + 123 & 123 & 456 & 123 \tabularnewline + \hline + 123 & 123 & 456 & 123 \tabularnewline + \hline +\end{tabularx} + +\begin{lstlisting} +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting}%[frame=single] +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting}[frame=single] +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting}[frame=single] % blah blah +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting} +[frame=single] % blah blah +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{minted}{python} +def foo(x): + return x +\end{minted} + +\begin{minted} +% blah blah +{python} +def foo(x): + return x +\end{minted} + +\begin{minted}[frame=lines]{python} +def foo(x): + return x +\end{minted} + +\begin{minted} +% plop +[frame=lines, +fontsize=\footnotesize +] +% ok +{python} +def foo(x): + return x +\end{minted} + +\begin{comment} +This is a comment block. +\end{comment} + +\documentclass{article} +\usepackage{fancyvrb} + +\documentclass[12pt]{article} +\begin{document} + +Text that has a footnote\footnote{This $i_s$ the \[i_s\] $$x_i$$ \(x_i\)footnote}\addtocounter{footnote}{-1}\addtocounter{footnote}{-1} looks like this. Later text referring to same footnote\footnotemark uses the other command. +\end{document} diff --git a/autotests/html/test.tex.html b/autotests/html/test.tex.html deleted file mode 100644 --- a/autotests/html/test.tex.html +++ /dev/null @@ -1,12 +0,0 @@ - - - -test.tex - -
-% commet
-
-text \texttt{more text}
-
-\verb!verbatim text! normal text
-
diff --git a/autotests/input/highlight.tex b/autotests/input/highlight.tex --- a/autotests/input/highlight.tex +++ b/autotests/input/highlight.tex @@ -53,6 +53,9 @@ \{ %this should be comment \verb%this shouldn't be%and this should be normal text +\verb!verbatim text! normal text + +text \texttt{more text} \begin{verbatim} text inside a verbatim environment is also treated special $ %, @@ -71,6 +74,14 @@ normal +\begin{Verbatim} +\begin{verbatim} +This is a verbatim block. +\end{verbatim} +\end{Verbatim} + +normal + % test alignat \begin{alignat}{2} A &= B &= C \\ @@ -82,4 +93,170 @@ \fill commented out text \fi +% Math mode + +Depending on the value of $x$ the equation \( f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \) may diverge or converge. + +\[ f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \] + +\[ +S = \{ z \in \mathbb{C}\, |\, |z| < 1 \} \quad \textrm{and} \quad S_2=\partial{S} +\] + +\[ +\frac{ + \begin{array}[b]{r} + \left( x_1 x_2 \right)\\ + \times \left( x'_1 x'_2 \right) + \end{array} + }{ + \left( y_1y_2y_3y_4 \right) + } +\] + +\begin{eqnarray*} +\begin{eqnarray*} +f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \\ +\textstyle f(x) = \textstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\ +\scriptstyle f(x) = \scriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\ +\scriptscriptstyle f(x) = \scriptscriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} +\end{eqnarray*} +\end{eqnarray*} + +\begin{xalignat}{3} +i_{11} & =i_{23}\nonumber +\end{xalignat} + +c +\begin{equation} +c +\begin{aligned} +a & b\\ +c & d +\end{aligned} +c +\end{equation} +c + +$$E=mc^2$$ + +\begin{equation} +E=m +\end{equation} + +\begin{equation +x=3\textrm{plop} +\end{equation} + +\[ \begin{array}{llll} + x^3 = (-x)^3 & \text{if $x > 0$}\\ + x^3 = (-x)^3 & \text{if {$x > 0$}}\\ + x^3 = (-x)^3 & \text{if {\color{green} $x > 0$}}\\ +\end{array} \] + +\section*{Notes for My Paper} + +\begin{center} +\begin{tabular}{ |c|c|c| } + \hline + cell1 & cell2 & cell3 \\ + cell4 & cell5 & cell6 \\ + cell7 & cell8 & cell9 \\ + \hline +\end{tabular} + +\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill} } | c | c | c | r | } + \hline + label 1 & label 2 & label 3 & label 4 \\ + \hline + item 1 & item 2 & item 3 & item 4 \\ + \hline +\end{tabular*} + +\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | } + \hline + label 1 & label 2 & label 3 & label 4 \\ + \hline + item 1 & item 2 & item 3 & item 4 \\ + \hline +\end{tabular*} +\end{center} + + +\begin{tabularx}{1\textwidth}{ |>{\setlength\hsize{1\hsize}\centering}X|>{\setlength\hsize{1\hsize}\raggedleft}X@{} >{\setlength\hsize{1\hsize}\raggedright}X|>{\setlength\hsize{1\hsize}\centering}X| } + \hline +Label 1 & \multicolumn{2}{>{\centering\setlength\hsize{2\hsize} }X|}{Label 2} & Label 3\tabularnewline +\hline + 123 & 123 & 456 & 123 \tabularnewline + \hline + 123 & 123 & 456 & 123 \tabularnewline + \hline +\end{tabularx} + +\begin{lstlisting} +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting}%[frame=single] +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting}[frame=single] +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting}[frame=single] % blah blah +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{lstlisting} +[frame=single] % blah blah +Write('Case insensitive '); +Write('Pascal keywords.'); +\end{lstlisting} + +\begin{minted}{python} +def foo(x): + return x +\end{minted} + +\begin{minted} +% blah blah +{python} +def foo(x): + return x +\end{minted} + +\begin{minted}[frame=lines]{python} +def foo(x): + return x +\end{minted} + +\begin{minted} +% plop +[frame=lines, +fontsize=\footnotesize +] +% ok +{python} +def foo(x): + return x +\end{minted} + +\begin{comment} +This is a comment block. +\end{comment} + +\documentclass{article} +\usepackage{fancyvrb} + +\documentclass[12pt]{article} +\begin{document} + +Text that has a footnote\footnote{This $i_s$ the \[i_s\] $$x_i$$ \(x_i\)footnote}\addtocounter{footnote}{-1}\addtocounter{footnote}{-1} looks like this. Later text referring to same footnote\footnotemark uses the other command. +\end{document} diff --git a/autotests/input/test.tex b/autotests/input/test.tex deleted file mode 100644 --- a/autotests/input/test.tex +++ /dev/null @@ -1,5 +0,0 @@ -% commet - -text \texttt{more text} - -\verb!verbatim text! normal text diff --git a/autotests/reference/highlight.tex.ref b/autotests/reference/highlight.tex.ref --- a/autotests/reference/highlight.tex.ref +++ b/autotests/reference/highlight.tex.ref @@ -7,13 +7,13 @@ \\%comment
% END of region

-\newcommand{\nohighlighting}
+\newcommand{\nohighlighting}

\section{normal}

-\ref{blue}
-\pageref{blue}
-\cite{blue}
+\ref{blue}
+\pageref{blue}
+\cite{blue}

\begin{environmentshavespecialcolors}
normal
@@ -25,8 +25,8 @@ normal
\(
\frac{1}{2}
-\begin{test}
-\end{test}
+\begin{test}
+\end{test}
\)
normal
\[
@@ -38,21 +38,24 @@ green\darkergreen
\begin{test}
\test
-\end{test}
+\end{test}
\end{equation}

\begin{equation*}
green\darkergreen
%comment
\begin{test}
\test
-\end{test}
+\end{test}
\%no comment
\end{equation*}

\{ %this should be comment

\verb%this shouldn't be%and this should be normal text
+\verb!verbatim text! normal text
+
+text \texttt{more text}

\begin{verbatim}
text inside a verbatim environment is also treated special $ %,
@@ -65,12 +68,20 @@ &@@#^%&^#$
\end{Verbatim}

-\begin{Verbatim*}
+\begin{Verbatim*}
@*&^#@*(^#(*@&
\end{Verbatim*}

normal

+\begin{Verbatim}
+\begin{verbatim}
+This is a verbatim block.
+\end{verbatim}
+\end{Verbatim}
+
+normal
+
% test alignat
\begin{alignat}{2}
A &= B &= C \\
@@ -82,4 +93,170 @@ \fill commented out text
\fi

+% Math mode
+
+Depending on the value of $x$ the equation \( f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \) may diverge or converge.
+
+\[ f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \]
+
+\[
+S = \{ z \in \mathbb{C}\, |\, |z| < 1 \} \quad \textrm{and} \quad S_2=\partial{S}
+\]
+
+\[
+\frac{
+ \begin{array}[b]{r}
+ \left( x_1 x_2 \right)\\
+ \times \left( x'_1 x'_2 \right)
+ \end{array}
+ }{
+ \left( y_1y_2y_3y_4 \right)
+ }
+\]
+
+\begin{eqnarray*}
+\begin{eqnarray*}
+f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \\
+\textstyle f(x) = \textstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\
+\scriptstyle f(x) = \scriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\
+\scriptscriptstyle f(x) = \scriptscriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x}
+\end{eqnarray*}
+\end{eqnarray*}
+
+\begin{xalignat}{3}
+i_{11} & =i_{23}\nonumber
+\end{xalignat}
+
+c
+\begin{equation}
+c
+\begin{aligned}
+a & b\\
+c & d
+\end{aligned}
+c
+\end{equation}
+c
+
+$$E=mc^2$$
+
+\begin{equation}
+E=m
+\end{equation}
+
+\begin{equation
+x=3\textrm{plop}
+\end{equation}
+
+\[ \begin{array}{llll}
+ x^3 = (-x)^3 & \text{if $x > 0$}\\
+ x^3 = (-x)^3 & \text{if {$x > 0$}}\\
+ x^3 = (-x)^3 & \text{if {\color{green} $x > 0$}}\\
+\end{array} \]
+
+\section*{Notes for My Paper}
+
+\begin{center}
+\begin{tabular}{ |c|c|c| }
+ \hline
+ cell1 & cell2 & cell3 \\
+ cell4 & cell5 & cell6 \\
+ cell7 & cell8 & cell9 \\
+ \hline
+\end{tabular}
+
+\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill} } | c | c | c | r | }
+ \hline
+ label 1 & label 2 & label 3 & label 4 \\
+ \hline
+ item 1 & item 2 & item 3 & item 4 \\
+ \hline
+\end{tabular*}
+
+\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | }
+ \hline
+ label 1 & label 2 & label 3 & label 4 \\
+ \hline
+ item 1 & item 2 & item 3 & item 4 \\
+ \hline
+\end{tabular*}
+\end{center}
+
+
+\begin{tabularx}{1\textwidth}{ |>{\setlength\hsize{1\hsize}\centering}X|>{\setlength\hsize{1\hsize}\raggedleft}X@{} >{\setlength\hsize{1\hsize}\raggedright}X|>{\setlength\hsize{1\hsize}\centering}X| }
+ \hline
+Label 1 & \multicolumn{2}{>{\centering\setlength\hsize{2\hsize} }X|}{Label 2} & Label 3\tabularnewline
+\hline
+ 123 & 123 & 456 & 123 \tabularnewline
+ \hline
+ 123 & 123 & 456 & 123 \tabularnewline
+ \hline
+\end{tabularx}
+
+\begin{lstlisting}
+Write('Case insensitive ');
+Write('Pascal keywords.');
+\end{lstlisting}
+
+\begin{lstlisting}%[frame=single]
+Write('Case insensitive ');
+Write('Pascal keywords.');
+\end{lstlisting}
+
+\begin{lstlisting}[frame=single]
+Write('Case insensitive ');
+Write('Pascal keywords.');
+\end{lstlisting}
+
+\begin{lstlisting}[frame=single] % blah blah
+Write('Case insensitive ');
+Write('Pascal keywords.');
+\end{lstlisting}
+
+\begin{lstlisting}
+[frame=single] % blah blah
+Write('Case insensitive ');
+Write('Pascal keywords.');
+\end{lstlisting}
+
+\begin{minted}{python}
+def foo(x):
+ return x
+\end{minted}
+
+\begin{minted}
+% blah blah
+{python}
+def foo(x):
+ return x
+\end{minted}
+
+\begin{minted}[frame=lines]{python}
+def foo(x):
+ return x
+\end{minted}
+
+\begin{minted}
+% plop
+[frame=lines,
+fontsize=\footnotesize
+]
+% ok
+{python}
+def foo(x):
+ return x
+\end{minted}
+
+\begin{comment}
+This is a comment block.
+\end{comment}
+
+\documentclass{article}
+\usepackage{fancyvrb}
+
+\documentclass[]{article}
+\begin{document}
+
+Text that has a footnote\footnote{This $i_s$ the \[i_s\] $$x_i$$ \(x_i\)footnote}\addtocounter{footnote}{-1}\addtocounter{footnote}{-1} looks like this. Later text referring to same footnote\footnotemark uses the other command.

+\end{document}
diff --git a/autotests/reference/test.tex.ref b/autotests/reference/test.tex.ref deleted file mode 100644 --- a/autotests/reference/test.tex.ref +++ /dev/null @@ -1,5 +0,0 @@ -% commet
-
-text \texttt{more text}
-
-\verb!verbatim text! normal text
diff --git a/autotests/syntaxrepository_test.cpp b/autotests/syntaxrepository_test.cpp --- a/autotests/syntaxrepository_test.cpp +++ b/autotests/syntaxrepository_test.cpp @@ -408,8 +408,8 @@ auto def = m_repo.definitionForName(QLatin1String("LaTeX")); QVERIFY(def.isValid()); - // check that backslash '\' is removed - for (QChar c : QStringLiteral("\t !%&()*+,-./:;<=>?[]^{|}~")) + // check that backslash '\' and '*' are removed + for (QChar c : QStringLiteral("\t !%&()+,-./:;<=>?[]^{|}~")) QVERIFY(def.isWordDelimiter(c)); QVERIFY(!def.isWordDelimiter(QLatin1Char('\\'))); diff --git a/data/syntax/latex.xml b/data/syntax/latex.xml --- a/data/syntax/latex.xml +++ b/data/syntax/latex.xml @@ -1,137 +1,392 @@ - - + + +]> + + + \begin + + + + \end + + + + \Autocite + \autocite + \autoref + \Cite + \cite + \Citeauthor + \citeauthor + \citep + \citet + \citetitle + \citeurl + \citeyear + \cref + \Cref + \cref* + \Cref* + \eqref + \Footcite + \footcite + \footfullcite + \fullcite + \label + \nocite + \pagecite + \pageref + \Parencite + \parencite + \ref + \subref + \subref* + \supercite + \Textcite + \textcite + \vpageref + \vref + + + + \documentclass + \includegraphics + \include + \usepackage + \bibliography + \bibliographystyle + + + + \cites + \Cites + \parencites + \Parencites + \autocites + \Autocites + \supercites + \footcites + \Footcites + + + + \part* + \part + \chapter* + \chapter + \section* + \section + \subsection* + \subsection + \subsubsection* + \subsubsection + \paragraph* + \paragraph + \subparagraph* + \subparagraph + + + + \column + \definecolor + \geometry + \hspace* + \hspace + \input + \newboolean + \rule + \setboolean + \setcounter + \setlength + \special + \textcolor + \vspace* + \vspace + + + + \footnote* + \footnote + + + + \renewcommand* + \renewcommand + \providecommand* + \providecommand + \newcommand* + \newcommand + + + + \edef + \gdef + \xdef + + + + \ensuremath + + + + \iffalse + + + + \fi + \else + + + + verb* + verb + Verb + + + + lstinline + + + + mint + + + + lstlisting* + lstlisting + + + + minted* + minted + + + + Verbatim* + Verbatim + BVerbatim* + BVerbatim + LVerbatim* + LVerbatim + verbatim* + verbatim + boxedverbatim* + boxedverbatim + + + + comment* + comment + + + + alignat* + alignat + xalignat* + xalignat + xxalignat* + xxalignat + + + + Bmatrix* + Bmatrix + IEEEeqnarray* + IEEEeqnarray + IEEEeqnarraybox* + IEEEeqnarraybox + Vmatrix* + Vmatrix + align* + align + bmatrix* + bmatrix + cases* + cases + displaymath* + displaymath + eqnarray* + eqnarray + equation* + equation + flalign* + flalign + gather* + gather + math* + math + multline* + multline + pmatrix* + pmatrix + smallmatrix* + smallmatrix + subeqnarray* + subeqnarray + vmatrix* + vmatrix + + + + tabularx* + tabularx + tabular* + tabular + supertabular* + supertabular + mpsupertabular* + mpsupertabular + xtabular* + xtabular + mpxtabular* + mpxtabular + longtable* + longtable + + + + \text + \textit + \textbf + \textmd + \textsl + \textsc + \textrm + \textsf + \texttt + \textup + \textlf + \textnormal + \shortintertext + \intertext + \mbox + \emph + + + + \KileResetHL + \KateResetHL + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + - - - + + + - - + + - + - + - - - + + - + - + - - - + + - - + + - - - - - - - - - - + - - + + + - + + - - - - - - - + - - - - - - - + + + + + @@ -147,92 +402,97 @@ - + - - + + + + - + - + + - - - + + + - + + - + - - + + - - - + + + + - - - + + + + - + + - + - - + + - - - - - - + - - - - - - + + + + + + + - + + - + + - + - - + + @@ -242,305 +502,455 @@ - - - + + - + - - - + + - + - - - - - - - - - - - - + + + + + + + + + + - + - - - + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + - + - - - + + + + + - - + + - - + + + + - - + + - - - - - - - - - + + + + - - + + - - + - + + - - + + + - - + - - - - - + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + - - + - - - + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + - + - - - + + - - + + - - - - + + - - + + + - + + + + - - - - - + + - - - - - + + + + + + + + + - - - - - - + + + - + - - - + + + + + + + + - - - - + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + - - - + + - - + + + + + + - - - - + + + + - - - - - - + + + - - - - - - + - - - + + + + @@ -556,12 +966,12 @@ + - @@ -571,7 +981,7 @@ - +