Warning, /frameworks/syntax-highlighting/autotests/input/highlight.tex is written in an unsupported language. File is not indexed.
0001 % LaTeX test file for kate's syntax highlighting and code folding 0002 0003 \ordinaryLaTeXcommandwithoption[10pt,a4paper]{article} 0004 % BEGIN region 0005 %comment, this is all ok % $ 0006 \%no comments please 0007 \\%comment 0008 % END of region 0009 0010 \newcommand{\nohighlighting} 0011 0012 \section{normal} 0013 0014 \ref{blue} 0015 \pageref{blue} 0016 \cite{blue} 0017 0018 \begin{environmentshavespecialcolors} 0019 normal 0020 \end{environmentshavespecialcolors} 0021 0022 $equations are green, \commands somewhat darker$ 0023 normal 0024 $$equations are green, \commands somewhat darker$$ 0025 normal 0026 \( 0027 \frac{1}{2} 0028 \begin{test} 0029 \end{test} 0030 \) 0031 normal 0032 \[ 0033 %comment 0034 displaymath 0035 \] 0036 normal 0037 \begin{equation} 0038 green\darkergreen 0039 \begin{test} 0040 \test 0041 \end{test} 0042 \end{equation} 0043 0044 \begin{equation*} 0045 green\darkergreen 0046 %comment 0047 \begin{test} 0048 \test 0049 \end{test} 0050 \%no comment 0051 \end{equation*} 0052 0053 \{ %this should be comment 0054 0055 \verb%this shouldn't be%and this should be normal text 0056 \verb!verbatim text! normal text 0057 0058 text \texttt{more text} 0059 0060 \begin{verbatim} 0061 text inside a verbatim environment is also treated special $ %, 0062 you can even put a \begin{verbatim} inside 0063 \end{verbatim} 0064 0065 normal 0066 0067 \begin{Verbatim} 0068 &@@#^%&^#$ 0069 \end{Verbatim} 0070 0071 \begin{Verbatim*} 0072 @*&^#@*(^#(*@& 0073 \end{Verbatim*} 0074 0075 normal 0076 0077 \begin{Verbatim} 0078 \begin{verbatim} 0079 This is a verbatim block. 0080 \end{verbatim} 0081 \end{Verbatim} 0082 0083 normal 0084 0085 % test alignat 0086 \begin{alignat}{2} 0087 A &= B &= C \\ 0088 A &= B &= C 0089 \end{alignat} 0090 normal text 0091 0092 \iffalse 0093 \fill commented out text 0094 \fi 0095 0096 % Math mode 0097 0098 Depending on the value of $x$ the equation \( f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \) may diverge or converge. 0099 0100 \[ f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \] 0101 0102 \[ 0103 S = \{ z \in \mathbb{C}\, |\, |z| < 1 \} \quad \textrm{and} \quad S_2=\partial{S} 0104 \] 0105 0106 \[ 0107 \frac{ 0108 \begin{array}[b]{r} 0109 \left( x_1 x_2 \right)\\ 0110 \times \left( x'_1 x'_2 \right) 0111 \end{array} 0112 }{ 0113 \left( y_1y_2y_3y_4 \right) 0114 } 0115 \] 0116 0117 \begin{eqnarray*} 0118 \begin{eqnarray*} 0119 f(x) = \sum_{i=0}^{n} \frac{a_i}{1+x} \\ 0120 \textstyle f(x) = \textstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\ 0121 \scriptstyle f(x) = \scriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} \\ 0122 \scriptscriptstyle f(x) = \scriptscriptstyle \sum_{i=0}^{n} \frac{a_i}{1+x} 0123 \end{eqnarray*} 0124 \end{eqnarray*} 0125 0126 \begin{xalignat}{3} 0127 i_{11} & =i_{23}\nonumber 0128 \end{xalignat} 0129 0130 c 0131 \begin{equation} 0132 c 0133 \begin{aligned} 0134 a & b\\ 0135 c & d 0136 \end{aligned} 0137 c 0138 \end{equation} 0139 c 0140 0141 $$E=mc^2$$ 0142 0143 \begin{equation} 0144 E=m 0145 \end{equation} 0146 0147 \begin{equation 0148 x=3\textrm{plop} 0149 \end{equation} 0150 0151 \[ \begin{array}{llll} 0152 x^3 = (-x)^3 & \text{if $x > 0$}\\ 0153 x^3 = (-x)^3 & \text{if {$x > 0$}}\\ 0154 x^3 = (-x)^3 & \text{if {\color{green} $x > 0$}}\\ 0155 \end{array} \] 0156 0157 \section*{Notes for My Paper} 0158 0159 \begin{center} 0160 \begin{tabular}{ |c|c|c| } 0161 \hline 0162 cell1 & cell2 & cell3 \\ 0163 cell4 & cell5 & cell6 \\ 0164 cell7 & cell8 & cell9 \\ 0165 \hline 0166 \end{tabular} 0167 0168 \begin{tabular*}{0.75\textwidth}{@{\extracolsep{\fill} } | c | c | c | r | } 0169 \hline 0170 label 1 & label 2 & label 3 & label 4 \\ 0171 \hline 0172 item 1 & item 2 & item 3 & item 4 \\ 0173 \hline 0174 \end{tabular*} 0175 0176 \begin{tabular*}{0.75\textwidth}{ | c | c | c | r | } 0177 \hline 0178 label 1 & label 2 & label 3 & label 4 \\ 0179 \hline 0180 item 1 & item 2 & item 3 & item 4 \\ 0181 \hline 0182 \end{tabular*} 0183 \end{center} 0184 0185 0186 \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| } 0187 \hline 0188 Label 1 & \multicolumn{2}{>{\centering\setlength\hsize{2\hsize} }X|}{Label 2} & Label 3\tabularnewline 0189 \hline 0190 123 & 123 & 456 & 123 \tabularnewline 0191 \hline 0192 123 & 123 & 456 & 123 \tabularnewline 0193 \hline 0194 \end{tabularx} 0195 0196 \begin{lstlisting} 0197 Write('Case insensitive '); 0198 Write('Pascal keywords.'); 0199 \end{lstlisting} 0200 0201 \begin{lstlisting}%[frame=single] 0202 Write('Case insensitive '); 0203 Write('Pascal keywords.'); 0204 \end{lstlisting} 0205 0206 \begin{lstlisting}[frame=single] 0207 Write('Case insensitive '); 0208 Write('Pascal keywords.'); 0209 \end{lstlisting} 0210 0211 \begin{lstlisting}[frame=single] % blah blah 0212 Write('Case insensitive '); 0213 Write('Pascal keywords.'); 0214 \end{lstlisting} 0215 0216 \begin{lstlisting} 0217 [frame=single] % blah blah 0218 Write('Case insensitive '); 0219 Write('Pascal keywords.'); 0220 \end{lstlisting} 0221 0222 \begin{minted}{python} 0223 def foo(x): 0224 return x 0225 \end{minted} 0226 0227 \begin{minted} 0228 % blah blah 0229 {python} 0230 def foo(x): 0231 return x 0232 \end{minted} 0233 0234 \begin{minted}[frame=lines]{python} 0235 def foo(x): 0236 return x 0237 \end{minted} 0238 0239 \begin{minted} 0240 % plop 0241 [frame=lines, 0242 fontsize=\footnotesize 0243 ] 0244 % ok 0245 {python} 0246 def foo(x): 0247 return x 0248 \end{minted} 0249 0250 \begin{comment} 0251 This is a comment block. 0252 \end{comment} 0253 0254 \documentclass{article} 0255 \usepackage{fancyvrb} 0256 0257 \documentclass[12pt]{article} 0258 \begin{document} 0259 0260 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. 0261 0262 \end{document} 0263 0264 % A delimiter is not required before "\" in keywords of kind "\command" (see bug #413493) 0265 \begin{equation}123\end{equation} 0266 0267 \begin{comment}Comment\end{comment} 0268 \iffalse text\fi normal text 0269 0270 text\begin{tabular}text\end{tabular} 0271 text\begin{a}text\end{a} 0272 0273 % Close brackets correctly in some commands (see bug #415384) 0274 \input{\a{}} 0275 \cites{ text { text } text } 0276 0277 % Parentheses within [ ... ] (see bug #418979) 0278 \cite[eq. (1.1)]{some_reference} 0279 \cite[eq. \(x^n + y^n = z^n\)]{some reference} 0280 0281 % Close folding correctly in "\end{...}" and in region markers (see bug #419125) 0282 \begin{document} 0283 \begin{abstract} 0284 0285 \end{abstract} 0286 0287 \begin{itemize} 0288 \item[\(\bullet\)] 0289 %% BEGIN something 0290 Here are some text describiing a new theorem. In the equation 0291 \begin{equation} 0292 E = mc^2 0293 \end{equation} 0294 we have a solution for energy-mass equivalence. 0295 %% END 0296 0297 \item[\(\bullet\)] 0298 \begin{align*} 0299 B(z) &= p^r \sum_{k \geq 0} \binom{-r}{k} (-1)^k (1 - p)^k z^k \\ 0300 B(z) &= p^r \sum_{k \geq 0} \binom{-r}{k} (-(1-p) z)^k 0301 \end{align*} 0302 \end{itemize} 0303 \end{document} 0304 0305 % Allow Math environment within another Math environment (see bug #435086) 0306 \begin{gather*} 0307 a = 5 \\ 0308 y = \begin{cases} 0309 0 & x < 2 \\ 0310 2x-4 & x > 2 \\ 0311 \end{cases} \\ 0312 x = 5 \\ 0313 z = 5 0314 \end{gather*}