1% LaTeX test file for kate's syntax highlighting and code folding 2 3\ordinaryLaTeXcommandwithoption[10pt,a4paper]{article} 4% BEGIN region 5%comment, this is all ok % $ 6\%no comments please 7\\%comment 8% END of region 9 10\newcommand{\nohighlighting} 11 12\section{normal} 13 14\ref{blue} 15\pageref{blue} 16\cite{blue} 17 18\begin{environmentshavespecialcolors} 19normal 20\end{environmentshavespecialcolors} 21 22$equations are green, \commands somewhat darker$ 23normal 24$$equations are green, \commands somewhat darker$$ 25normal 26\( 27\frac{1}{2} 28\begin{test} 29\end{test} 30\) 31normal 32\[ 33%comment 34displaymath 35\] 36normal 37\begin{equation} 38green\darkergreen 39\begin{test} 40\test 41\end{test} 42\end{equation} 43 44\begin{equation*} 45green\darkergreen 46%comment 47\begin{test} 48\test 49\end{test} 50\%no comment 51\end{equation*} 52 53\{ %this should be comment 54 55\verb%this shouldn't be%and this should be normal text 56\verb!verbatim text! normal text 57 58text \texttt{more text} 59 60\begin{verbatim} 61text inside a verbatim environment is also treated special $ %, 62you can even put a \begin{verbatim} inside 63\end{verbatim} 64 65normal 66 67\begin{Verbatim} 68&@@#^%&^#$ 69\end{Verbatim} 70 71\begin{Verbatim*} 72@*&^#@*(^#(*@& 73\end{Verbatim*} 74 75normal 76 77\begin{Verbatim} 78\begin{verbatim} 79This is a verbatim block. 80\end{verbatim} 81\end{Verbatim} 82 83normal 84 85% test alignat 86\begin{alignat}{2} 87A &= B &= C \\ 88A &= B &= C 89\end{alignat} 90normal text 91 92\iffalse 93\fill commented out text 94\fi 95 96% Math mode 97 98Depending on the value of $x$ the equation \( f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \) may diverge or converge. 99 100\[ f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \] 101 102\[ 103S = \{ z \in \mathbb{C}\, |\, |z| < 1 \} \quad \textrm{and} \quad S_2=\partial{S} 104\] 105 106\[ 107\frac{ 108 \begin{array}[b]{r} 109 \left( x_1 x_2 \right)\\ 110 \times \left( x'_1 x'_2 \right) 111 \end{array} 112 }{ 113 \left( y_1y_2y_3y_4 \right) 114 } 115\] 116 117\begin{eqnarray*} 118\begin{eqnarray*} 119f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \\ 120\textstyle f(x) = \textstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\ 121\scriptstyle f(x) = \scriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\ 122\scriptscriptstyle f(x) = \scriptscriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} 123\end{eqnarray*} 124\end{eqnarray*} 125 126\begin{xalignat}{3} 127i_{11} & =i_{23}\nonumber 128\end{xalignat} 129 130c 131\begin{equation} 132c 133\begin{aligned} 134a & b\\ 135c & d 136\end{aligned} 137c 138\end{equation} 139c 140 141$$E=mc^2$$ 142 143\begin{equation} 144E=m 145\end{equation} 146 147\begin{equation 148x=3\textrm{plop} 149\end{equation} 150 151\[ \begin{array}{llll} 152 x^3 = (-x)^3 & \text{if $x > 0$}\\ 153 x^3 = (-x)^3 & \text{if {$x > 0$}}\\ 154 x^3 = (-x)^3 & \text{if {\color{green} $x > 0$}}\\ 155\end{array} \] 156 157\section*{Notes for My Paper} 158 159\begin{center} 160\begin{tabular}{ |c|c|c| } 161 \hline 162 cell1 & cell2 & cell3 \\ 163 cell4 & cell5 & cell6 \\ 164 cell7 & cell8 & cell9 \\ 165 \hline 166\end{tabular} 167 168\begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill} } | c | c | c | r | } 169 \hline 170 label 1 & label 2 & label 3 & label 4 \\ 171 \hline 172 item 1 & item 2 & item 3 & item 4 \\ 173 \hline 174\end{tabular*} 175 176\begin{tabular*}{0.75\textwidth}{ | c | c | c | r | } 177 \hline 178 label 1 & label 2 & label 3 & label 4 \\ 179 \hline 180 item 1 & item 2 & item 3 & item 4 \\ 181 \hline 182\end{tabular*} 183\end{center} 184 185 186\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| } 187 \hline 188Label 1 & \multicolumn{2}{>{\centering\setlength\hsize{2\hsize} }X|}{Label 2} & Label 3\tabularnewline 189\hline 190 123 & 123 & 456 & 123 \tabularnewline 191 \hline 192 123 & 123 & 456 & 123 \tabularnewline 193 \hline 194\end{tabularx} 195 196\begin{lstlisting} 197Write('Case insensitive '); 198Write('Pascal keywords.'); 199\end{lstlisting} 200 201\begin{lstlisting}%[frame=single] 202Write('Case insensitive '); 203Write('Pascal keywords.'); 204\end{lstlisting} 205 206\begin{lstlisting}[frame=single] 207Write('Case insensitive '); 208Write('Pascal keywords.'); 209\end{lstlisting} 210 211\begin{lstlisting}[frame=single] % blah blah 212Write('Case insensitive '); 213Write('Pascal keywords.'); 214\end{lstlisting} 215 216\begin{lstlisting} 217[frame=single] % blah blah 218Write('Case insensitive '); 219Write('Pascal keywords.'); 220\end{lstlisting} 221 222\begin{minted}{python} 223def foo(x): 224 return x 225\end{minted} 226 227\begin{minted} 228% blah blah 229{python} 230def foo(x): 231 return x 232\end{minted} 233 234\begin{minted}[frame=lines]{python} 235def foo(x): 236 return x 237\end{minted} 238 239\begin{minted} 240% plop 241[frame=lines, 242fontsize=\footnotesize 243] 244% ok 245{python} 246def foo(x): 247 return x 248\end{minted} 249 250\begin{comment} 251This is a comment block. 252\end{comment} 253 254\documentclass{article} 255\usepackage{fancyvrb} 256 257\documentclass[12pt]{article} 258\begin{document} 259 260Text 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. 261 262\end{document} 263 264% A delimiter is not required before "\" in keywords of kind "\command" (see bug #413493) 265\begin{equation}123\end{equation} 266 267\begin{comment}Comment\end{comment} 268\iffalse text\fi normal text 269 270text\begin{tabular}text\end{tabular} 271text\begin{a}text\end{a} 272 273% Close brackets correctly in some commands (see bug #415384) 274\input{\a{}} 275\cites{ text { text } text } 276 277% Parentheses within [ ... ] (see bug #418979) 278\cite[eq. (1.1)]{some_reference} 279\cite[eq. \(x^n + y^n = z^n\)]{some reference} 280 281% Close folding correctly in "\end{...}" and in region markers (see bug #419125) 282\begin{document} 283 \begin{abstract} 284 285 \end{abstract} 286 287 \begin{itemize} 288 \item[\(\bullet\)] 289 %% BEGIN something 290 Here are some text describiing a new theorem. In the equation 291 \begin{equation} 292 E = mc^2 293 \end{equation} 294 we have a solution for energy-mass equivalence. 295 %% END 296 297 \item[\(\bullet\)] 298 \begin{align*} 299 B(z) &= p^r \sum_{k \geq 0} \binom{-r}{k} (-1)^k (1 - p)^k z^k \\ 300 B(z) &= p^r \sum_{k \geq 0} \binom{-r}{k} (-(1-p) z)^k 301 \end{align*} 302 \end{itemize} 303\end{document} 304 305% Allow Math environment within another Math environment (see bug #435086) 306\begin{gather*} 307 a = 5 \\ 308 y = \begin{cases} 309 0 & x < 2 \\ 310 2x-4 & x > 2 \\ 311 \end{cases} \\ 312 x = 5 \\ 313 z = 5 314\end{gather*} 315