title: How can I force lstlisting to expand an argument?

text: I'm trying to use the `listings` package with a variable language (it's actually for a package). However, I can't seem to pass a macro as the value half of a key-value pair. Here's a simple example:               \documentclass{article}          \def\lang{Java}          \usepackage{listings}          \begin{document}          % writes "Java" to document     \lang          % writes with no formatting (as expected)     \begin{lstlisting}     int x = 2; // declare, initialize variable     \end{lstlisting}          % writes with Java formatting (as expected)     \begin{lstlisting}[language=Java] % same effect with language={Java}     int x = 2; // declare, initialize variable     \end{lstlisting}          % fails with Error: language Java undefined     \begin{lstlisting}[language=\lang]     int x = 2; // declare, initialize variable     \end{lstlisting}          \end{document}      In reality, this is part of a package that itself includes a key-value system, so optimally you should be able to do `\usepackage[language=Java]{foo}` and it will later be able to `\begin{lstlisting}[language=Java]` properly. I also tried using `\edef` instead of `\def`, and using `\expandafter` (though that seems backwards to me). What's the proper way to do this?


title: LaTeX Visual Novel Engine: Does it exist?

text: Did anyone in the past use LaTeX to create a "visual novel" engine? I've been using http://www.renpy.org/ for rare presentations when I need functionality the beamer class in LaTeX doesn't easily provide (create self- propelled interactive presentations with multiple panels not synchronized to send to people). But I have to convert all formulas into images. But what about using a standalone document class, or beamer, cross references, internal links, and \foreach loops in \tikz, to make a visual novel engine sufficient for self-leading interactive presentations? Essentially, several independent text panels on a presentation are easy to do. Every permutation of the pages in possible orders is itself some page that is generated in the output pdf and internal links allow for consistent navigation: click on lower half of screen to advance to next slide in the lower panel while keeping same slide in top panel, or click on the top half of screen to advance to next slide in upper panel while keeping the same slide in the the lower panel. Or same thing, except foreground and background, using figure environments. Has something of this sort been done or discussed before? EDIT: it seems to have been migrated from stackoverflow. To clarify, this is a YES (here is link) or NO question.


title: Scaling a tikzpicture to fit in a beamer frame

text: How can I vertically scale the figure to accomodate on the frame?               \begin{frame}{P\textsuperscript{H}metry studies}     \begin{figure}[scale=0.5\textheight]     \begin{tikzpicture}     \node [block] at (0,6) (GERD){GERD};     \node [block] at (-3,4) (Esophagitis){Reflux esophagitis};     \node [block] at (0,4) (NERD){NERD};     \node [block] at (3,4) (Barret){Barret's esophagitis};     \node [block] at (0,2) (Ph){Ph testing};     \node [block] at (-3,0) (positive) {Ph +ve NERD};     \node [block] at (3,0) (Negative){Functional heart burn};     \node[] at (3,-2)(Symptoms) {\footnotesize {Symptoms associated with P\textsuperscript{H} changes?}};     \node [block] at (5, -4)(hypersensitive) {hypersensitive esophagus};     \node[block] at (1,-4)(unassociated){Acid unassociated heart burn};     \begin{scope}[cyan!40!black]     \draw[->] (GERD) -- (Esophagitis);     \draw[->] (GERD) -- (NERD);     \draw[->] (GERD) -- (Barret);     \draw[->] (NERD)--(Ph);     \draw[->](Ph)--(positive);     \draw[->](Ph)--(Negative);     \draw[->](Negative)--(Symptoms);     \draw[->](Symptoms)--(unassociated);     \draw[->](Symptoms)--(hypersensitive);     \end{scope}      \end{tikzpicture}     \end{figure}     \end{frame}


title: Alternative theorem styles with amsthm package?

text: I am writing a document with many lemmas, theorems, and proofs. I don't like the default styling available, mainly because it places almost no visual separation between theorems and text (or proofs and text). I would like the following: A definiton environment with larger margins and a vertical line on the left side, so I can clearly see where the definition starts and ends, by noticing where the vertical line begins and ends. Is there any theorem style that would achieve this? Any similar style which would at least make the theorems and proofs stand out from the text? Thanks! p.s. Currently, I end a definition block with a `\\( \qed \\)` so there is some indication that the definition ended.


title: Automatic pausing of video with media9?

text: Is there a way I can pause an embedded beamer video at some specified time point? Video Playing Code (media9):               \includemedia[     width=\textwidth,height=0.5625\textwidth,     addresource=video.mp4,      flashvars={     source=video.mp4     &loop=true      &scaleMode=letterbox      }     ]{}{VPlayer.swf}      I can probably split the video into two, have the first half play, then play the second half on click. But I am wondering if there is an easier solution?


title: How to print the permutation of {s,u,v,a,t} with LaTeX?

text: I want to use LaTeX to print the permutation of a set `{s,u,v,a,t}`. The output looks like the following.               suvat     suvta     suavt     suatv     ...      There are 120 rows in total that must be generated on the fly. How to do this with LaTeX? ## MWE:               \documentclass{article}     \begin{document}     .     \end{document}


title: Why is this TikZ pattern spilling outside the path it fills?

text: This:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{patterns}          \begin{document}          \begin{tikzpicture}       \fill[pattern=horizontal lines] (0,0) -- (2,2) to[out=90,in=180] (4,5) -- (7,5) -- (7,0) -- cycle;       \fill[pattern=north east lines] (0,0) -- (2,2) to[out=0,in=270] (4,5) -- (0,5) -- cycle;     \end{tikzpicture}          \end{document}      produces this: ![bad pattern fill](http://i.stack.imgur.com/TyNR5.png) The "north east lines" pattern spills out to the right of the path it's supposed to be filling, which is definitely not what I want. What am I doing wrong?


title: New environment with center and parsep

text: I want to make a new environment where the content is centered and where I can specify a local parsep value. My attempt to make this work is the following:               \documentclass{article}                                                                     \usepackage{lipsum}          \newenvironment{myenv}[1]{%         \center %         \begingroup %         \setlength{\parsep}{#1} %     }{%         \endgroup %         \endcenter %     }          \begin{document}          \lipsum[1]          \lipsum[2]          \begin{myenv}{1cm}       Hello            world     \end{myenv}          \lipsum[3]          \end{document}      This environment centers "Hello" and "world" as desired, but with the same paragraph spacing as between lipsum[1] and lipsum[2] and I want it to be 1 cm (in this example).


title: Why is there a word boundary in “ßv”?

text: I have made a blackletter font (http://www.linta.de/Jena1330, although this may instead be a generic thing, which just usually does not show up due to absence of initial and final replacements) for use with LaTeX, which contains some initial forms. Most things work well, but there is a substitution                (LABEL BOUNDARYCHAR)       (LIG O 166 O 27)      in the pl file of the font (`O 27` is a swashy initial `O 166 = C v`) which is applied also in the case of               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{jena1330}     \begin{document}      \textjena{ßvi}     \end{document}      (`\textjena` is defined in the `jena1330` package to use that font.) Furthermore, `œvi` has no substitution as expected, and with `\DeclareTextSymbol{\aaa}{T1}{97}`, `\aaa{}vi` has the substitution, as opposed to what I'd like to see. The final substitution ſ→s does not occur for the case of `ſœ` and `ſ\aaa`, but `sß` is also problematic. How can I make sure that there are no in all these cases? * * * The reason I want this is because in some cases („Inhaltsverzeichnis”) I want to typeset a round s in the middle of the word, but the v after it should not be substituted to initial form. So I tried to build a glyph `\DeclareTextSymbol{\zwj}{T1}{12}` (zero width, without special initial or final substitutions) to be able to type `Inhalts\/\zwj{}verzeichnis` in this case and get what I want. However, this behaves just as the `\aaa` in the minimal example above and therefore does not solve the problem. I solved this original problem using a random ascii non-letter character to define the symbol and it now works with `\DeclareTextSymbol{\\*}{T1}{12}` as wished, but word boundaries in LaTeX are still a mystery to me, as already in Dealing with word boundaries in a pl file _I'm not sure about tags, feel free to retag this question if there are better fitting tags._


title: Writing Greek text

text: I am trying to compile some Greek text in PDF. I get it compiled using `babel` package, but text in Greek renders as complete gibberish. Only if I write Latin text does it convert it into Greek letters, but I have text in Greek to begin with. Here are my two closest tries               \documentclass[12pt]{article}          \usepackage[greek,english]{babel}          \begin{document}          \section{Introduction}     \begin{otherlanguage}{greek}     ἀλλ' οὐ λέγουσι τὸ διὰ τί περὶ οὐδενός, οἷον διὰ     \end{otherlanguage}          \textgreek{ἀλλ' οὐ λέγουσι τὸ διὰ τί περὶ οὐδενός, οἷον διὰ}       and another one               \documentclass[12pt]{article}     \usepackage[english,greek]{babel}     \usepackage[iso-8859-7]{inputenc}          \begin{document}          \section{Εισαγωγή}          Σήμερα είδα για πρώτη φορά το     \selectlanguage{english} site     \selectlanguage{greek}του Γιάννη.          \end{document}      output for both               ὐὤὐὡἑᾥᾠ ὓᾲἑᾢᾠὐᾥ     Ξ•Ξ ́ΗΟ•Ξ•Ξ•Ο•Ξ•Ξ•


title: tikz - alter circular path with nodes

text: I am attempting to generate a circular path with nodes:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows}     \begin{document}     \begin{tikzpicture}     \node (1) at (8,6) {A11};     \node (2) [below left of = 1] {B22};     \node (3) [below right of = 2] {C33};     \node (4) [below right of = 1] {D44};     % connect the dots     \path[->,>=stealth]     (1) edge [bend right] node[left] {} (2)     (2) edge [bend right] node[left] {} (3)     (3) edge [bend right] node[right] {} (4)     (4) edge [bend right] node[right] {} (1);     \end{tikzpicture}     \end{document}      ![Image](http://i.stack.imgur.com/E7E9u.png) However, something doesn't seem quite right here, I think it doesn't look right due to the arrows not being quite long enough. I gather this is most likely due to the nodes being too large to accommodate a circular path for the arrows, but I was hoping someone might have a work around for this issue? Please note that this is included in a larger diagram so its size must remain relatively small. Also I realize I can reduce the entire font size which seems the produce a better outcome by               \tikzstyle{every node}=[font=\tiny]


title: Test for empty value in xparse

text: Following the recommendation of the answers to this question, I use the following code               \ExplSyntaxOn     \DeclareExpandableDocumentCommand{\IfNoValueOrEmptyTF}{mmm}     {      \IfNoValueTF{#1}       {#2} % true       {\tl_if_empty:nTF {#1} {#2} {#3}} % false     }     \ExplSyntaxOff      to test for either no or an empty value. One corresponding macro is               \NewDocumentCommand \sidenotemark { o } {%     \IfNoValueOrEmptyTF{#1}%     {%...      However, I changed the code to               \NewDocumentCommand \sidenotemark { O{} } {%     \IfEmptyTF{#1}%     {%...      and               \ExplSyntaxOn     \DeclareExpandableDocumentCommand{\IfEmptyTF}{mmm}     { \tl_if_empty:nTF {#1} {#2} {#3}     }     \ExplSyntaxOff      because I feel it is more readable. However, it seems odd that there is neither `\IfEmptyTF` nor `\IfNoValueOrEmptyTF` in `xparse`. Is there a better way to achieve the described behavior (while keeping the optional argument instead of key value pairs?). --- UPDATE --- It is rather hard to make an example useful and minimal. I hope this makes it clearer. In the next example I would expect the same behavior from `empty` and `no value`.               \documentclass{book}          \usepackage{xparse}     \usepackage{lipsum}     \usepackage{marginnote}          \ExplSyntaxOn         \DeclareExpandableDocumentCommand{\IfNoValueOrEmptyTF}{mmm}         {          \IfNoValueTF{#1}           {#2} % true           {\tl_if_empty:nTF {#1} {#2} {#3}} % false         }     \ExplSyntaxOff               \NewDocumentCommand \placemarginal {o m}     {     \IfNoValueOrEmptyTF{#1}     {\marginpar{#2}} % is empty, use marginpar     {\marginnote{#2}[#1]} % is not empty, use marginnote     }          \begin{document}     float\placemarginal{\lipsum[1]}          float\placemarginal[]{test2}          fix\placemarginal[0pt]{test}          \end{document}


title: Shifted hexagons in TikZ picture

text: Recently there was a great answer in How to draw a 3D hexagonal structure with TikZ? But I noticed a small "bug" which I can't seem to be able to fix. I stripped the code down that shows the problem:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes}          \begin{document}     \begin{tikzpicture}       \begin{scope}[%           every node/.style={anchor=west,regular polygon, regular polygon sides=6,draw,inner sep=0.5cm},           transform shape]         \node (A) {A};         \node (B) at (A.corner 1) {B};         \node (C) at (B.corner 5) {C};         \node (D) at (A.corner 5) {D};         \node (E) at (D.corner 5) {E};         \foreach \hex in {A,...,E}         {           \foreach \corn in {1,...,6}             \draw[fill=white] (\hex.corner \corn) circle (2pt);          }       \end{scope}     \end{tikzpicture}     \end{document}      This code draws five nodes with hexagonal shape, but the hexagons are a few, but always a different "number of few", pixels "off", as shown in this picture: ![enter image description here](http://i.stack.imgur.com/04ZyX.png)   * Which value is responsible for this?   * Why is the "shifting" happening with different strength?   * How to fix it?


title: new command using math mode sub index bug

text: I have defined the following command               \newcommand{\gsubselector}[2]{$s_{#1,#2}$}      and I'm calling it from a document in the following way:               ... \gsubselector{a,i} : \gsubselector{b,j} there is ...      I expect an output such as:               ... $s_{a,i}$ : $s_{b,j}$ there is ...      however, judging from the output pdf that I've got using 'pdfTex', the output corresponds to the following code:               ... $s_{a,i,:}$ $s_{b,j,t}$ here is ...      Am I doing something wrong in the definition? Thanks!


title: \addtolength{\leftskip}{2em} does not apply to equations in the paragraph

text: I have a paragraph which should be emphasized using left and right skips. Thereby I recognized that it simply ignores equations in this paragraph. Is this reasonable?               \documentclass{article}     \usepackage{changepage}% http://ctan.org/pkg/changepage     \usepackage{lipsum}% http://ctan.org/pkg/lipsum     \begin{document}     \lipsum[1]     {     \addtolength{\leftskip}{10em}     \addtolength{\rightskip}{10em}     \lipsum[2]     \begin{equation}     a+b=c\textrm{ is a very very very very very very long equation }a+b=c     \end{equation}     \lipsum[3]     }     \lipsum[4]     \end{document}      During testing you will register no warning. However the equation is broader than the current text's width. > Is there a way **without** using any **environment** in order to sqeeze the > equation to the surrounding textwidth?


title: How to get line-breaking / multirow to work in my beginner's table?

text: I can't seem to get the `multirow` or `pbox` to give me a line break (of "automatic" width). The following won't compile successfully: note the two variations in the "TOTALLY" line. How can I fix it?               \documentclass{article}     \usepackage{tabulary}     \usepackage{threeparttable}     \usepackage{array}     \usepackage{siunitx}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{pbox}     \usepackage{lipsum}          \renewcommand{\arraystretch}{1.2}     \sisetup{round-mode=places,round-precision=1, add-decimal-zero=true, add-integer-zero=true, round-integer-to-decimal}          \begin{document}          \lipsum[1]               \begin{table}     \begin{threeparttable}     \caption{this is my first table's captive caption}     \begin{tabulary}{\textwidth}{@{}*{2}{L}*{6}{S[table-format=3.2]}@{}} \toprule     × & TOTALLY bla percentage of bla & {1000} & {2000} & {3000} & \pbox[t]{1.5cm}{Bonjour monde!} & {5000} & {6000\tnote{1}}\\ \midrule     % × & TOTALLY bla percentage of bla & {1000} & {2000} & {3000} & \multirow{2}*{4000 apples and pears \\ and whatnot} & {5000} & {6000\tnote{1}}\\ \midrule     DDD 1 & 47.6 & 29.1 & 1.0 & 0.2 & 1.9 & 15.2 & 0.0\\     UUU & 24.8 & 10.8 & 6.4 & 0.0 & 3.2 & 4.5 & 0.0\\     × & × & × & × & × & × & × & ×\\     Unweighted average: & × & × & × & × & × & × & ×\\     BBB & 33.8 & 11.3 & 9.1 & 0.4 & 1.8 & 11.0 & 0.2\\     GGG & 32.9904 & 8.60325 & 9.3845 & 0.0495 & 1.43225 & 10.79525 & 0.119\\     DDD & 39.4545 & 9.8695 & 15.3365 & 0.6915 & 2.246 & 10.6705 & 0.5105\\ \bottomrule     \end{tabulary}          \begin{tablenotes}     \item [1] the first note ...     \end{tablenotes}          \end{threeparttable}     \end{table}          \lipsum[2]          \end{document}      related (but didn't help me, yet):   * Text wrapping in multirow columns   * Newline in \multirow environment   * How to add a forced line break inside a table cell so this question is probably just yet-another-beginner's-desperate- duplicate... plz forgive! **Edit** just to supply a **working example** (for a quick comparison, note I got rid of the `\\\` in the uncommented "TOTALLY" line):               \documentclass{article}     \usepackage{tabulary}     \usepackage{threeparttable}     \usepackage{array}     \usepackage{siunitx}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{pbox}     \usepackage{lipsum}          \renewcommand{\arraystretch}{1.2}     \sisetup{round-mode=places,round-precision=1, add-decimal-zero=true, add-integer-zero=true, round-integer-to-decimal}          \begin{document}          \lipsum[1]               \begin{table}     \begin{threeparttable}     \caption{this is my first table's captive caption}     \begin{tabulary}{\textwidth}{@{}*{2}{L}*{6}{S[table-format=3.2]}@{}} \toprule     × & TOTALLY bla percentage of bla & {1000} & {2000} & {3000} & {4000 apples and pears and whatnot} & {5000} & {6000\tnote{1}}\\ \midrule     %× & TOTALLY bla percentage of bla & {1000} & {2000} & {3000} & {4000 apples and pears \\ and whatnot} & {5000} & {6000\tnote{1}}\\ \midrule     % × & TOTALLY bla percentage of bla & {1000} & {2000} & {3000} & \pbox[t]{1.5cm}{Bonjour monde!} & {5000} & {6000\tnote{1}}\\ \midrule     % × & TOTALLY bla percentage of bla & {1000} & {2000} & {3000} & {\multirow{2}*{\pbox[t]{1.5cm}{Bonjour monde!}}} & {5000} & {6000\tnote{1}}\\ \midrule     DDD 1 & 47.6 & 29.1 & 1.0 & 0.2 & 1.9 & 15.2 & 0.0\\     UUU & 24.8 & 10.8 & 6.4 & 0.0 & 3.2 & 4.5 & 0.0\\     × & × & × & × & × & × & × & ×\\     Unweighted average: & × & × & × & × & × & × & ×\\     BBB & 33.8 & 11.3 & 9.1 & 0.4 & 1.8 & 11.0 & 0.2\\     GGG & 32.9904 & 8.60325 & 9.3845 & 0.0495 & 1.43225 & 10.79525 & 0.119\\     DDD & 39.4545 & 9.8695 & 15.3365 & 0.6915 & 2.246 & 10.6705 & 0.5105\\ \bottomrule     \end{tabulary}          \begin{tablenotes}     \item [1] the first note ...     \end{tablenotes}          \end{threeparttable}     \end{table}          \lipsum[2]          \end{document}


title: Vectorized Text Effects/Transformations: Stretching & Expanding (WordArt)

text: I'd like to apply a text transformation similar to what the Inkscape extension 'Modify Path -> Envelope' does within LaTeX: ![inkscape text effect transform vectorized text to fit to box](http://i.stack.imgur.com/NpIPj.png) In-source documentation of the envelope extension: > This extension implements Bezier enveloping. It takes an arbitrary path (the > "letter") and a 4-sided path (the "envelope") as input. The envelope must be > 4 segments long. Unless the letter is to be rotated or flipped, the envelope > should begin at the upper left corner and be drawn clockwise. Presumably this can only be done with one of the more advanced drawing packages:   * tikz (pgf/tikz library decorations.text, basic layer canvas transformation)   * pstricks (pst-text)   * asymptote   * MetaPost


title: Subfigure sublabel inside figure

text: I have the following code included in my LaTeX report:               \begin{figure}[h]                                                                           \subfigure[Probe 1, Fluoreszenz]{                                                                                \includegraphics[width=0.48\textwidth]{images/p1flPart}                                 \label{fig:patha}                                                                   }                                                                                \subfigure[Probe 2, Fluoreszenz]{                                                           \includegraphics[width=0.48\textwidth]{images/p2flPart}                                 \label{fig:pathb}                                                                   }                                                                                \subfigure[Probe 1, Phasenkontrast]{                                                        \includegraphics[width=0.48\textwidth]{images/p1phPart}                                 \label{fig:pathc}                                                                   }                                                                                \subfigure[Probe 2, Phasenkontrast]{                                                        \includegraphics[width=0.48\textwidth]{images/p2phPart}                                 \label{fig:pathd}                                                                   }                                                                                \caption{                                                                                Rekonstruierte Trajektorien der erkannten Teilchen.                                 }                                                                                \label{fig:path}                                                                    \end{figure}      The resulting image appears to be faulty and I don't know why. ![enter image description here](http://i.stack.imgur.com/8VkXN.jpg)


title: Automate a running counter through a document

text: The following minimal example demonstrates my situation:               \documentclass{article}     \usepackage{calculator}     \newcommand{\pts}{0}          \begin{document}          \ADD{\pts}{3}{\pts}\pts          \ADD{\pts}{3}{\pts}\pts          \ADD{\pts}{3}{\pts}\pts          \begin{enumerate}         \item \ADD{\pts}{3}{\pts}\pts         \item \ADD{\pts}{3}{\pts}\pts     \end{enumerate}          \pts          \end{document}      Ideally I would like to have the counter `\pts` to increase through and after the application of the enumeration environment (or any environment in fact). The package document does state: > But these commands act as declarations, so that its scope is local in > environments and groups. Is there a way around this? Is there a way to keep a counter running through a document, that one can add (or other arithmetic operations as needs be, which the calculator package does do wonderfully).


title: Automatically splitting large square table across pages

text: I am writing a program that has to generate a PDF. I decided to generate LaTeX source and compile it with `pdflatex`. The problem is that one of printed elements is big square table (up to 97x97). First row and first column are headers that contains short string. Other cells can contain number in range from 0 to 255. The best solution would be to let LaTeX layout the table so my program would just generate data. I just cannot find a way to scale/rotate/split among pages this table so it remains legible. Example table I try to fit to page(s):               \documentclass{article}     \usepackage[a4paper, margin=1cm]{geometry}     \usepackage{rotating,graphics,longtable}     \newcommand*\rot{\rotatebox{90}}          \begin{document}             \begin{longtable}{l|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}                     & \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1}& \rot{K1} \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline                     K1 & 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200& 200 \\                     \hline             \end{longtable}     \end{document}      ## EDIT: Perfect solution for me would be hand-written LaTeX file that contains all formating rules and definitions, and that is included to generated one. Generated one contains only data and essential markup (also from included file). An algorithm used to split table by LaTeX could be:   1. Assume max number of columns and rows per page (for example 32).   2. Calculate number of pages needed to print table (using assumption from point 1).   3. Try to make equal number of columns/rows on all pages (for example for 90x90 table first split would be 32 columns + 32 columns + 26 columns. This point makes it 30 columns + 30 columns + 30 columns).   4. Print sub-tables in some order (ex. left-right, top-bottom) It should preserve cell content and formatting (if any). Is it possible at all? Maybe I should use something else to generate PDF?


title: Different shading for multi-parted tikz node

text: Please consider MWE below:               \documentclass{standalone}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \usepackage{tikz}     \usetikzlibrary{positioning,shapes,shadows,arrows}     \usepackage{lipsum}     \begin{document}     \tikzstyle{abstract} =  [draw=gray,                              inner sep = 0.2cm,                             rounded corners,                              rectangle split,                              rectangle split parts=3,                              % shade=rectangle,                              % left color=blue!10!white,                             % rectangle split part fill={blue!30!white,blue!20!white,blue!10!white}, %This will fill them, but not shade! Moreover, I prefer not to do it this way                             every text node part/.style={fill=blue!20!white}, %This is not working                             every two node part/.style={text width=6cm},                             every three node part/.style={text=blue}]     \tikz             \node (Item)[abstract]               {                 \textbf{Foo}                 \nodepart{two}\lipsum[1]                 \nodepart{three}\textsl{Bar}             };     \end{document}      This creates tikz node with three parts but no filling (Fig. Left). Somehow the line below is doing nothing:               every text node part/.style={fill=blue!20!white}      Next line fills the rectangles (Fig. Center) but I prefer to do it with `every` command:               rectangle split part fill={blue!30!white,blue!20!white,blue!10!white}      What I eventually want, is to have different gradient shadings for each part, preferably using `every XXX node part/.style` (e.g. Fig. Right). ![enter image description here](http://i.stack.imgur.com/nFP2u.png)


title: Automatic hyperlinks within document?

text: I'm new to TeX (and I'm still trying to get my hear around it.) I was wondering is there a package that automatically creates links within the document I am writing - like hyperlinking from the table of contents to the specific sections, or citations to the bibliographic data? Thanks!


title: 3 subfigures in a row, different sizes. How to manually adjust the spaces in beween?

text: I want three subfigures to be shown next to each other so that the subcaptions of all three subfigures are equally 'wide'. I'm experiencing _2 problems_.   1. Since my middle subfigure is a lot smaller, the subcaption of this figure is stretched out vertically. I want all the subcaptions, however, to have the same width.    2. Since the sizes of the images differ, the images are displayed very strangely. I would like the two outer ones to start at the same height and the middle one to be centered (same distance above and under the image as well as at the sides, relative to the outer images). I've already been playing with `\hspace`, `\vspace`, and `\hfill`, but this seems to have no effect. The _output result_ I keep obtaining: ![Output result of my three subfigures](http://i.stack.imgur.com/jJiiY.jpg) ## My code               \documentclass[master=elt,masteroption=eg]{kulemt}     \usepackage{color}     \usepackage{amsmath,amsfonts,amssymb}       \everymath{\displaystyle}       \numberwithin{equation}{section}          \usepackage{graphicx}       \graphicspath{{./Images/}}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{natbib}       \bibpunct{[}{]}{;}{a}{,}{,}          \begin{document}     \begin{figure}       \centering       \begin{subfigure}[b]{0.3\textwidth}         \vspace{0.05\textheight}         \includegraphics[width=\textwidth]{OriginalImage}         \caption{An original set of pixels making up an object}         \label{OriginalImage}       \end{subfigure}%         ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)       \begin{subfigure}[b]{0.1\textwidth}         \vspace{0.08\textheight}         \hspace{0.2\textwidth}         \includegraphics[width=\textwidth]{StructuringElement}         \caption{The structuring element used for the closing}         \label{StructuringElement}         \hspace{0.2\textwidth}       \end{subfigure}         ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)       \begin{subfigure}[b]{0.3\textwidth}         \vspace{0.05\textheight}         \includegraphics[width=\textwidth]{ClosedImage}         \caption{The closed image}         \label{ClosedImage}       \end{subfigure}       \caption{The closing of an object}\label{Closing}     \end{figure}     \end{document}


title: Help with footer

text: I'm pretty much finished the document I'm working on, but now that I'm adding the footer I have run into some issues. I'm using `fancyhdr` and have rather small margin, so the footer doesn't really fit atm. It's also not in the center of the page and I've got a strange line at the top that I don't know where it's coming from. I realize that I will probably have to adjust my margins a bit, but I need to keep them as close as possible to current as I am matching the style of a previous document and have some large flowcharts. ![footer](http://i.stack.imgur.com/pXuL3.png)               \documentclass{article}          %%%%% Packages and configuration %%%%%     \usepackage[firstpage]{draftwatermark} % watermark     \SetWatermarkText{\textsc{Confidential}}     \SetWatermarkScale{4}     \SetWatermarkColor[gray]{0.9}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{} % clear all fields     %\fancyfoot[LE,CO]{\thepage}           % page number in "outer" position of footer line     %\fancyfoot[RE,LO]{Message of the day} % other info in "inner" position of footer line     \lfoot{Lorem\\Ipsum}\cfoot{dolor sit\\amet \\ \thepage}\rfoot{Rev. \#\\ \today}                    \usepackage[margin=0.5in]{geometry} % Advanced page geometry configuation     %\usepackage[cm]{fullpage} % Alternate option for page configuration     %\usepackage[letterpaper, top=0.7in, bottom=0.9in, left=0.7in, right=0.7in, showframe]{geometry}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \usepackage{lipsum}          \begin{document}          \lipsum[1-5]          \end{document}


title: Can't get my pdf and .ps files to use type 1 fonts

text: I am preparing a paper for submission to ACM proceedings and Digital Library. However, I keep getting the "Your pdf and .ps files both use type 3 fonts, you need use type 1 fonts" error from the publishing house. I have generated plots in PS and PDF formats and both utilize type 3 fonts. I would love to avoid any solution that would require me to reproduce the plots (using matplotlib and python) as much as possible (The computation time to recalculate would mean that I miss the deadline). I tried the command:               dvips -P pdf -t letter -o <file>.ps <file>.dvi      as well as               \usepackage[T1]{fontenc}     \usepackage{lmodern}      and still get type 3 fonts in my PS files and PDFS               pdffonts <file>.pdf      name                                 type              emb sub uni object ID     ------------------------------------ ----------------- --- --- --- ---------     LBEWKO+NimbusSanL-Regu               Type 1C           yes yes no      10  0     PUBBEM+NimbusSanL-Bold               Type 1C           yes yes no       8  0     YFYECG+CMSY10                        Type 1C           yes yes yes     18  0     AHPFBS+NimbusRomNo9L-ReguItal        Type 1C           yes yes no      16  0     AXUBMJ+NimbusRomNo9L-Regu            Type 1C           yes yes no      14  0     YSSGKF+NimbusRomNo9L-Medi            Type 1C           yes yes no      12  0     [none]                               Type 3            yes no  no      67  0     JCUPWZ+CMR10                         Type 1C           yes yes no      69  0     [none]                               Type 3            yes no  no      35  0     [none]                               Type 3            yes no  no      51  0     [none]                               Type 3            yes no  no      71  0     [none]                               Type 3            yes no  no      65  0     [none]                               Type 3            yes no  no      93  0     [none]                               Type 3            yes no  no      66  0     [none]                               Type 3            yes no  no      59  0     [none]                               Type 3            yes no  no      68  0     [none]                               Type 3            yes no  no      63  0     ITCMPN+Helvetica-Bold                Type 1C           yes yes no     117  0     WZLTXN+Helvetica                     TrueType          yes yes yes    121  0     FKSFIN+CMMI10                        Type 1C           yes yes no     125  0     JVZHNQ+Helvetica-Bold                TrueType          yes yes yes    123  0     MTASZJ+Helvetica                     Type 1C           yes yes no     115  0     KXKKTR+Symbol                        Type 1C           yes yes no     119  0     GQCMLS+StandardSymL                  Type 1C           yes yes no     132  0     EDAHZQ+Helvetica                     TrueType          yes yes no     138  0     JWFHTI+Helvetica-BoldOblique         TrueType          yes yes yes    142  0     XUKNTB+HelveticaNeue                 TrueType          yes yes yes    134  0     KRAGHG+Helvetica-Bold                TrueType          yes yes yes    144  0     MAUGEX+Helvetica_00                  TrueType          yes yes no     140  0     [none]                               Type 3            yes no  no     152  0     [none]                               Type 3            yes no  no     160  0     [none]                               Type 3            yes no  no     174  0     [none]                               Type 3            yes no  no     154  0     [none]                               Type 3            yes no  no     168  0     [none]                               Type 3            yes no  no     176  0     [none]                               Type 3            yes no  no     162  0     [none]                               Type 3            yes no  no     167  0     [none]                               Type 3            yes no  no     175  0     [none]                               Type 3            yes no  no     169  0     SITHQP+NimbusMonL-Regu               Type 1C           yes yes no     190  0      I wonder how can I rectify the font type issue. Is there a way to change the font of a PDF or PS plot after-the-fact to produce a compliant PDF and PS version of my paper without any type 3 fonts? PS: I'd appreciate detailed explanation, as I am new and just getting started with these tools. And I don't mind less than ideal workarounds. **UPDATE** : 1. The problematic figures can be downloaded from this dropbox link


title: Diacritics above dotted i (i with tittle)

text: It is taught that, in order to place an accent mark on top of the letter "i", one should use `\i` to remove the tittle (the dot) first. (That the dot may need to be removed is of course a matter of convention. To indicate vowel length in Latin, people place a macron above the "i" with or without tittle; that is, I have encountered both ways of doing things.) However, strangely the accent commands `\'`, `\\``, `^`, `\"`, and `\\.` seem to remove the tittle automatically: ![accents above i with and without tittle](http://i.stack.imgur.com/7SXMy.png)               \documentclass{article}               \begin{document}          \verb|\ACCENT{i}|:\hphantom{\texttt{A}}\quad       \'{i} \`{i} \^{i} \"{i} \.{i} \~{i} \={i} \H{i} \r{i} \v{i} \u{i}          \verb|\ACCENT{\i}|:\quad       \'{\i} \`{\i} \^{\i} \"{\i} \.{\i} \~{\i} \={\i} \H{\i} \r{\i} \v{\i} \u{\i}          \end{document}      **1. Since when has it been the case that an accent command in (La)TeX removes the tittle from the letter "i" in those 5 cases?** (And are there any special cases I left out?) **2. How can I avoid this? That is, I would like the accent to be placed above the letter i _with_ tittle.** Interestingly, the tittle is left intact for the letter "j": ![accents above j with and without tittle](http://i.stack.imgur.com/KyUFm.png)


title: Custom decoration along curved paths

text: The problem that I started out with were those straight lines at the end of paths decorated with `snake` or `coil`, which I wanted to get rid of. I found a very nice solution here for the wavy line: http://tex.stackexchange.com/a/29645/36900 The problem that I am facing now, however, is when I apply this decoration to curved paths:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.pathmorphing}     \usetikzlibrary{decorations.markings}          \pgfdeclaredecoration{complete sines}{initial}     {         \state{initial}[             width=+0pt,             next state=sine,             persistent precomputation={\pgfmathsetmacro\matchinglength{                 \pgfdecoratedinputsegmentlength / round(\pgfdecoratedinputsegmentlength/\pgfdecorationsegmentlength)}                 \setlength{\pgfdecorationsegmentlength}{\matchinglength pt}             }] {}         \state{sine}[width=\pgfdecorationsegmentlength]{             \pgfpathsine{\pgfpoint{0.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}             \pgfpathcosine{\pgfpoint{0.25\pgfdecorationsegmentlength}{-\pgfdecorationsegmentamplitude}}             \pgfpathsine{\pgfpoint{0.25\pgfdecorationsegmentlength}{-\pgfdecorationsegmentamplitude}}             \pgfpathcosine{\pgfpoint{0.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}     }         \state{final}{}     }          \begin{document}          \begin{tikzpicture}[line width=1. pt]                  \draw[decorate, decoration={snake}]              (3,-3) arc (180:-90:1);             \draw[line width=0.3pt]             (3,-3) arc (180:-90:1);                  \draw[decorate,decoration={complete sines}]              (4,1) arc (180:-90:1);             \draw[line width=0.3pt]             (4,1) arc (180:-90:1);                \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/HULWx.jpg) One clearly sees how these "decoration segments" are simply rotated and put behind one another resulting in a finite displacement with respect to the initial path, due the finite width of the pattern that is repeated. I was wondering if there is the possibility to decorate a path "continuously". If I could specify the xy-displacement (x showing tangential to the initial path) of each point along the initial path like this               {0.}{\amplitude * sin(2*pi/\wavelength * \x)}      where `\wavelength` could be computed at the beginning as in the example above, and `\x` denotes the actual position along the initial path. Superimposing an oscillation along the y-coordinate should also allow me to produce coils. I guess one could define a decoration with segments of width `1pt` but I thought that there must be a simpler solution.


title: How to format a block of source code?

text: > **Possible Duplicate:**   >  Package to indent and syntax highlight C++ code I want to format a block of C source code using TeX, how can I accomplish this work? for example:               int main()     {         printf( "Hello World!\n" );              return 1;     }      I wish to format the source code of mine like tex.stackexchange.


title: How to Left-align first line in a paragraph, right-align others

text: I'm trying to typeset a song and for cases where one verse is longer than a line, I'd like to have the first line left-aligned and the second one right- aligned. Is there any way to achieve this automatically without the need to insert manual breaks?


title: Which package for In-line and float algorithms?

text: I am using LyX to describe algorithms. A common scenario is that I have a snippet of pseudo code (in a float, for example) and a block of text which makes references to keywords in that pseudo code. The listings package can do this, I think, but I recall having trouble using math notation, like subscripts, with listings. On the other hand, I have not been able to find how to use the algorithms package inline.


title: beamer, how to explicitly call the "normal itemize icon"

text: I want to have beamer slides where the change between one slide and the next is that the standard itemize symbol is replaced by a tick or a cross. My first attempt:               \begin{itemize}     \item[\onslide<2->{\tick}] Foo     \item[\onslide<3->{\cross}] Bar     \item[\onslide<4->{\tick}] Foo, again.     \end{itemize}      Unfortunately this doesn't quite work, since the normal item symbol isn't there (that is, there is nothing to the left of each item until the tick or cross appears). So I want to do something like this:               \begin{itemize}     \item[\only<1>{\normalsymbol}\only<2->{\tick}] Foo     \item[\only<1-2>{\normalsymbol}\only<3->{\cross}] Bar     \item[\only<1-3>{\normalsymbol}\only<4->{\tick}] Foo, again.     \end{itemize}      At the moment I've just found the inner theme I'm using and copied the code that defines the itemize symbol and done a `\newcommand`. But this is not all that satisfactory, since if I want to change innerthemes, I'll have to redefine it. So for my current theme (Dresden) I have:               \newcommand{\normalsymbol}{\scriptsize\raise1.25pt\hbox{\donotcoloroutermaths$\blacktriangleright$}}      So my question has two parts: is there a command that holds the current inner theme's item symbol? And, is there a better way to achieve what I want? I'm particularly fond of using `<+->` when I can, so I can add items without changing all the numbers... To reiterate, what the above code is supposed to do is have all the items appear on the first slide. Then on each progressive slide, the itemize symbol is replaced by a tick or a cross, depending on whether I like the item or not. The code above does what I want, but it's unsatisfactory because (1) the `\normalsymbol` macro has to be set by hand and (2) the slide transitions have to be specified explicitly.


title: Inserting a figure in a SIAM template

text: I looked at a SIAM template example to understand how to insert a figure. In this template, it codes:               \begin{figure}[ht]     \vspace{2.5in}     \caption{{\rm Log}$_{10}$ of the residual norm versus the number of     {\rm GMRES$(m)$} iterations for the finite difference methods.}     \label{diff}     \end{figure}      However, it never seems to indicate a specific file to upload the image. A long time ago, i wrote a paper in the IEEE SIGS conference proceedings format, which used a command akin to:               \psfig{file=network_model.eps, height=2in, width=2in,}      inside the \begin{figure}...\end{figure} block. I tried using it in my AMS paper, but it produces an undefined control sequence error. What is the appropriate command to insert the figure from a local file? **UPDATE:** Sorry, I erroneously stated earlier that the template was from AMS, when it was truly from SIAM.


title: tabular & multirow: taking a multirow back to a single

text: I have a table that I needed `multirow` for say column 2, but for column 3, I am putting the best result from column 2.               \documentclass{article}     \usepackage{tabu}     \usepackage{multirow}     \begin{document}     \begin{tabular}{ccc}     \multirow{2}{*}{A} & 4 & 4\\                        & 5     \end{tabular}     \end{document}      Here A is vertically centered for the `multirow`. I would like 4 to be able to achieve this same look. If I do `& 4 & 4\\\`, it will be aligned at the top, and vice verse for `5`. What can I do to achieve my desired result?


title: How to span over variable number of cells?

text: I'm looking for a macro to span all cells in a `tabu` environment to get category headers in tables. This example does what I need for two columns.               \begin{tabu} {XX}        abc   & def \\        \multicolumn{2}{c}{category header} \\        ghi   & jkl \\     \end{tabu}      What I want is a macro without the need to specify the number of columns. The category header should always span over all columns of the `tabu` environment. I tried to access the `tabu@nbcols` constant but I've got no clue how to do that. These two don't work:               \multicolumn{\tabu@nbcols}{c}{header}     \multicolumn{\the\tabu@nbcols}{c}{header}      What I want could look like:               \begin{tabu} {XX}        abc   & def \\        \mycatheader{category header} \\        ghi   & jkl \\     \end{tabu}


title: Use the argument command itself instead of its argument in newcommand

text: I want to implement a macro, that uses the command passed in the first argument as the command itself, not as the content passed by evaluating it. Something like:               \newcommand{\foo}{bar}     % definition     \newcommand{\mycmd}[1]{         \dosomethingwith{???}% I want \foo here, not 'bar'     }     \mycmd{\foo}


title: How to change label of \pgfcalendarweekdayshortname?

text: I will build the calendar in other langauge (thai) with tikzlibrary. I can change the `\pgfcalendarmonthname` but the `\pgfcalendarweekdayshortname`, I can't. The following code has errors.                   \documentclass[a4paper,12pt]{article}         \usepackage{tikz}         \usetikzlibrary{calendar}         \usepackage{translator}         \begin{document}         % % % % % % % % %%%%%%%%%%%%%%%%%%%% % % % %This is good.         \def\pgfcalendarmonthname#1{%         \translate{\ifcase#1\or JJJ\or FFF\or MMM\or AAA\or         MAY\or JJU\or JJY\or AAU\or SSS\or OOO\or         NNN\or DDD\fi}}         % %%%%%%%%%%%%%%% % % % % % % % % % % % % % %This is errors.         \def\pgfcalendarweekdayshortname#1{%         \translate{\ifcase#1\or SU\or MN\or TU\or WE\or         TH\or FR\or SA\fi}}         % % % % % % % % % % % % % % % % % % % % % % % % % % % % %           \begin{tikzpicture}         \calendar         [dates=2013-09-01 to 2013-09-last,         day list downward,         month label left,         day code={\node[name=\pgfcalendarsuggestedname,         every day]{\pgfcalendarweekdayshortname{\pgfcalendarcurrentweekday}\         \tikzdaytext};},         every month/.append style={anchor=base east,xshift=-2em}];         \end{tikzpicture}         \end{document}


title: Convert LaTeX book to presentation and handouts

text: I have written a LateX "book", with `section`, `figure` and my custom defined `example`. Somehow, I would like to convert this into:   1. A presentation PDF   2. A handout PDF I've been experimenting with Beamer, and this seems to get the job done but I don't want to have to manually extract out all the content - it becomes a pain if I want to change something. **Is there a way to markup the presentation content in the article?** The key aspect of this question is that: in my book I define a series of `examples`; in the presentation, I would like to reference a subset of them but in doing so, ensuring that the numbering is the same in the presentation as the book.


title: Problem combining tikzexternalize, tikzscale and external graphics

text: I have a problem when trying to scale and externalize a `tikzpicture` that includes an external graphics file. Using the following code will result in an output of the document but the figure is not externalized into a separate file. Also, an error message is produced. When commenting `tikzexternalize` or using `input{test.tikz}` (i.e. not scaling the `tikzpicture`) everything works, though obviously without the corresponding effect. Also, `tikzpicture`s without an external graphic work just fine. Is there any way to combine `tikzscale` and `tikzexternalize` for `tikzpicture`s including an external graphic?               \documentclass[crop,10pt,border=0]{standalone}     \usepackage[english]{babel}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{external}     \tikzexternalize[shell escape=-enable-write18]     \usepackage{tikzscale}     \usepackage{mwe}     \usepackage{filecontents}          \begin{document}     \setlength{\textwidth}{510pt}     \begin{filecontents}{test.tikz}     \begin{tikzpicture}     \node at (0,0) {\includegraphics[width=.25\textwidth]{example-image-a}};     \end{tikzpicture}     \end{filecontents}     This is my document.     % \input{test.tikz}         \includegraphics[width=0.5\textwidth]{test.tikz}     \end{document}      The error message is the following: > ! Package tikz Error: Sorry, the system call 'pdflatex -enable-write18 > -halt-on -error -interaction=batchmode -jobname "external-test-figure0" > "\def\tikzextern alrealjob{external-test}\input{external-test}"' did NOT > result in a usable outp ut file 'external-test-figure0' (expected one of > .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. > For pdflatex, this is 'pdflatex -sh ell-escape'. Sometimes it is also named > 'write 18' or something like that. Or m aybe the command simply failed? > Error messages can be found in 'external-test-f igure0.log'. If you continue > now, I'll try to typeset the picture.


title: Inserting \chapter* title to TOC

text: I'm writing a book using Latex               \documentclass[parskip=full,12pt,a4paper,twoside,frenchb,openany,fleqn]{book}      How can I add my \Chapter* to my TOC, because only \chapter titles appear.


title: packaged.tex in different folder

text: I have file called packages.tex with the following listing:               \usepackage{geometry}     \usepackage{setspace}     \usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage{array}     \usepackage{float}     \usepackage[         bookmarks,         bookmarksopen=true,         colorlinks=true,         linkcolor=black,         anchorcolor=black,         citecolor=black,         filecolor=black,         menucolor=black,         urlcolor=black,         backref,         pagebackref,         plainpages=false,         pdfpagelabels,         hypertexnames=false,         linktocpage         ]{hyperref}      I would like to keep it in a different directory so that multiple projects can share the file. I tried absolute path, relative path, if the file is not in the project directory or subdirectory, it does not work. Anything I can do to make it work? I am using Linux. Thanks...


title: Paragraph indents with optional line break

text: I am writing a document in which I would like to be able to use different kinds of paragraph breaks. I want to use indented first lines without a `parskip` for most of the new paragraphs, but for slightly bigger jumps in the subject matter I want to have a blank line (or at least a nonzero `parskip`). See the example below. I am currently using line breaks (`\\\`) in combination with blank lines, but I am aware that this is bad form. Is tere an elegant way to do this without having to redefine parskip every time I want a blank line? * * * Example:               First paragraph         Second paragraph, indented.              Third paragraph indented and with a blank line.


title: Why are some of my boxplots dashed?

text: Here's a MWE:               \documentclass[a4paper]{standalone}          \usepackage{pgfplots}     \usepgfplotslibrary{statistics}     \pgfplotsset{compat=1.8}          \begin{document}          \begin{tikzpicture}     \begin{axis}[     boxplot/draw direction=y,     ylabel={root mean square error (RMSE)},     height=8cm,     boxplot={         %         % Idea:          %  place the          %  group 1 at 0.3333 and 0.6666         %  group 2 at 1.3333 and 1.6666         %  group 3 at 2.3333 and 2.6666         %  ...         % in a formular:         draw position={1/3 + floor(\plotnumofactualtype/2) + 1/3*mod(\plotnumofactualtype,2)},         %         % that means the box extend must be at most 0.33333 :         box extend=0.3     },     % ... it also means that 1 unit in x controls the width:     x=2cm,     % ... and it means that we should describe intervals:     xtick={0,1,2,...,10},     x tick label as interval,     xticklabels={%         {dataset 1\\{\tiny disabled enabled}},%         {dataset 2\\{\tiny disabled enabled}},%         {dataset 3\\{\tiny disabled enabled}},%         {dataset 4\\{\tiny disabled enabled}},%     },         x tick label style={             text width=2.5cm,             align=center         },     ]               %disabled     %'120689': [2.7646732338376374, 2.9386338075128915, 2.0759453040402924, 1.4933341587154352, 1.2858810574360171],      %'123092': [1.6213436825515752, 3.659127461813457, 6.3573913630881957, 2.851522397932257, 1.4161184310137278]     %'122034': [2.7782786785170344, 2.388295853323815, 1.0169391397932168, 1.3282220840941463, 1.1519878464320008],      %'overd': [1.4050751524256098, 1.1888905444333131, 4.330757692491046, 3.665914730249296, 1.4398896445581748],           %enabled     %'120689': [1.1753863748576165, 2.8136463510466894, 2.0065471893571609, 3.8938997085167464, 2.0129749752740276],      %'123092': [2.2803725936262524, 1.4825727354215965, 1.7871388688900045, 2.3261434769789657, 1.795254324625537]     %'122034': [1.0286497508188084, 1.5717822303817375, 4.0903690748471373, 3.8755839151245763, 1.8905509506317051],      %'overd': [2.9370285732792341, 1.3202361917111065, 1.3576990603035917, 1.852324571876895, 1.2151847831011142],           \addplot     table[row sep=\\,y index=0] {     data\\     2.764\\     2.938\\     2.075\\     1.493\\     1.285\\     };          \addplot     table[row sep=\\,y index=0] {     data\\     1.175\\     2.813\\     2.006\\     3.893\\     2.012\\     };          \addplot     table[row sep=\\,y index=0] {     data\\     1.621\\     3.659\\     6.357\\     2.851\\     1.416\\     };          \addplot     table[row sep=\\,y index=0] {     data\\     2.280\\     1.482\\     1.787\\     2.326\\     1.795\\     };          \addplot     table[row sep=\\,y index=0] {     data\\     2.778\\     2.388\\     1.016\\     1.328\\     1.151\\     };          \addplot     table[row sep=\\,y index=0] {     data\\     1.028\\     1.571\\     4.090\\     3.875\\     1.890\\     };          \addplot     table[row sep=\\,y index=0] {     data\\     1.405\\     1.188\\     4.330\\     3.665\\     1.439\\     };          \addplot     table[row sep=\\,y index=0] {     data\\     2.937\\     1.320\\     1.357\\     1.852\\     1.215\\     };          \end{axis}     \end{tikzpicture}               \end{document}      Why are the last three boxplots dashed? ![what-the-hell](http://i.stack.imgur.com/0j3LB.jpg) Sorry that there's still so much code in the MWE, it's just that the dashed boxplots don't appear if I try to make the MWE smaller. :/


title: Force latex to finish compiling regardless of error? (xelatex)

text: I have a reoccurring problem. I want to be able to force latex to finish compiling regardless of an error. I know that this error will occur several times in my script and it is a result of the pythontex package. I use the pythontex package to import data into my report that I've manipulated in python. To use pythontex first you compile the tex document with latex (I use xelatex), then with pythontex, and then once again with latex. So in the command line I run:               xelatex mydoc.tex     pythontex mydoc.tex     xelatex mydoc.tex      The problem is, I want to be able to color code the values returned from python based on whether they are greater than or less than zero. However, the first time I compile my tex file with xelatex (or whatever), because pythontex hasn't been run yet, the \py{2} argument I'm passing my `colorme` function is empty. This throws an error, and the whole process grinds to a stop. I will be creating more similar functions such as `colorme` so I am hoping there is an all encompassing solution that will help keep latex runnign despite the inevitable errors from empty arguments. Is there anyway to force latex to finish compiling, so that I can at least run pythontex?               \documentclass{article}     \usepackage{pythontex}          %color things red!     \newcommand{\colorme}[1]{              \ifnum\ifnum\numexpr 0 < #1             \textcolor{black}{#1}         \else             \textcolor{red}{#1}          \fi          }          \begin{document}          \colorme{\py{2}}     \colorme{\py{-2}}     \colorme{2}     \colorme{\py{-2}}          \end{document}


title: In LyX, how can I remove the title and newline in a subsubsection?

text: I'm using the KOMA-script article class (`\documentclass{scrartcl}`)and would like to remove the title and newline from the subsubsection, leaving me with a number followed by standard text. Ideally I'd like to add something to the preamble once, but I can add something at each subsubsection if I need to. I'm also open to other document classes. I'm seeing that the package `\titlesec` might be able to do what I want to do, but I'm not seeing any clear examples of it. I'm new here, and to LaTeX, so please let me know how to better format or ask this question (for future questions as I dig deeper into LyX and actual LaTeX).


title: Overlayed underlines

text: I want the overlayed underline like the one shown ![here](http://i.stack.imgur.com/Xc3tY.png), but, since the `ulem` package only offer `{}`as enclosing characters, the code `\uline{ab\uwave{cd}ef}` doesn't work. Does anyone have a simple solution to this? Thanks!!


title: Border alignment issue using tabularx in LaTeX

text: I'm writing a program to parse wikimarkup to LaTeX, and I've run into a bit of an issue when it comes to creating tables. For some reason, the right vertical edge of the table is getting pushed way over into the right margin, and some of the center borders are also getting duplicated. I tried removing the text from the rightmost cells to see if the text was somehow pushing the border over, but that seemed to make no difference. I also tried setting `\textwidth` to the correct value manually, but still had no luck. This is the full LaTeX code:               \documentclass[letterpaper]{article}     \pagestyle{empty}     \usepackage[utf8]{inputenc}     \usepackage[margin=4cm]{geometry}     \usepackage{libertine, parskip, setspace, tabularx, tikz, ulem, wasysym}     \usepackage[T1]{fontenc}     \setlength\parindent{0pt}          \newcommand{\hfline}[3]{%     \par\medskip\noindent     \makebox[\textwidth][s]{\rlap{#1}\hfill#2\hfill\llap{\footnotesize{#3}}}%     \par\medskip}          \begin{document}          \begin{spacing}{0.7}     \begin{center}     \begin{scriptsize}\textbf{Declassified} per Executive Order 13526, Section 3.3\\NND Project Number: NND 63316.By: NWD Date: 2011     \end{scriptsize}     \end{center}     \end{spacing}     \begin{center}     \begin{large}     FINAL REPORT OSD \\     \end{large}     \begin{large}     Vietnam Task Force \& Index \\     \end{large}     \end{center}          \newpage     \begin{spacing}{0.7}     \begin{center}     \begin{scriptsize}\textbf{Declassified} per Executive Order 13526, Section 3.3\\NND Project Number: NND 63316.By: NWD Date: 2011     \end{scriptsize}     \end{center}     \end{spacing}     \begin{center}     \begin{Large}     EXECUTIVE SECRETARIAT \\     \end{Large}     \end{center}          \begin{tabularx}{0.7\textwidth}{X X X X X}     TLE & JJ & RMM & KDA & \fbox{ S/S-A} \\       &   &   &   &   \\     RHM & AL & LA & NP & S/S-I \\      &  &  &  & S/S-O \\     RTC & HHB & BF & PW & S/S-S \\       &   &   &   &   \\     JC & TMT & JM & \fbox{ HCB} & S/S-EX \\     \end{tabularx} \\          \rule{\textwidth}{2px} \\               \begin{tabularx}{\textwidth}{X X}     \begin{large}\Square~ ACTION\end{large} & \begin{large}\Square~ INFORMATION\end{large} \\     \begin{large}\Square~ COMMENTS PLEASE\end{large} & \begin{large}\Square~ YOUR FILES\end{large} \\     \begin{large}\Square~ FOLLOW UP\end{large} & \begin{large}\Square~ PER CONVERSATION\end{large} \\     \begin{large}\CheckedBox~ PLEASE SEE/\sout{CALL ME}\end{large} & \begin{large}\Square~\end{large} \\     \end{tabularx} \\          \rule{\textwidth}{2px} \\          \begin{large}     REMARKS \\     \end{large}     \begin{center}     \begin{large}     Any S/S involvement? \\     \end{large}     \end{center}     \begin{flushright}     RTC     \end{flushright}          \rule{\textwidth}{2px} \\               \begin{tabularx}{\textwidth}{X X X}     T. L. ELIOT, JR. & R. H. MILLER & R. T. CURRAN \\     X22540 & X23126 & X28448 \\     \end{tabularx} \\          \newpage     \begin{spacing}{0.7}     \begin{center}     \begin{scriptsize}\textbf{Declassified} per Executive Order 13526, Section 3.3\\NND Project Number: NND 63316.By: NWD Date: 2011     \end{scriptsize}     \end{center}     \end{spacing}     \begin{flushright}     SecDef/CCS Regrading Action \#35---71     \end{flushright}          \begin{tabularx}{\textwidth}{*{4}{|p{0.25\textwidth}|}}     \hline     \multicolumn{2}{|p{0.5\textwidth}|}{\textbf{OFFICE OF THE SECRETARY OF DEFENSE REGRADING ACTION}} & \multicolumn{2}{|p{0.5\textwidth}|}{\textbf{\begin{footnotesize}DATE\end{footnotesize}} \newline  \newline 23 June 1971} \\ \hline      \multicolumn{4}{|p{1.0\textwidth}|}{\textbf{\begin{footnotesize}FROM:\end{footnotesize}} \newline Top Secret Control Officer, SecDef/Classified Control Section, Room 31948, The Pentagon, Washington, D. C. 20301} \\ \hline      \multicolumn{4}{|p{1.0\textwidth}|}{\textbf{\begin{footnotesize}TO:\end{footnotesize}} \newline State Department, ATTENTION: Document Control/Security Officer, Washington, D. C. 20520} \\ \hline      \textbf{\begin{footnotesize}DOCUMENT\end{footnotesize}} \newline \textbf{\begin{footnotesize}(Type, Office of Origin, Date, Subject)\end{footnotesize}} & \textbf{\begin{footnotesize}CONTROL NUMBER\end{footnotesize}} & \textbf{\begin{footnotesize}CLASSIFICATION\end{footnotesize}} & \textbf{\begin{footnotesize}REGRADED TO\end{footnotesize}} \\ \hline      Memorandum for the Secretary of Defense, Thru: ASD/ISA and DASD(Policy Planning and Arms Control), OASD(ISA), From Chairman, OSD Task Force /s/ Leslie H. Gelb, dated 15 January 1969, Subject: Final Report, OSD Vietnam Task Force (U) w/1 Inclosure::::::::: & SecDefControl\#X-0295/69 & CONFIDENTIAL & UNCLASSIFIED WHEN SEPARATED FROM INCLOSURE \\ \hline      \textit{INCLOSURE \# 1:} \newline Document, Subject: OSD Vietnam Task Force Outline of Studies (U), dtd 10 January 1969----------------------- & " & CONFIDENTIAL & REMAINS CONFIDENTIAL \\ \hline      \multicolumn{4}{|p{1.0\textwidth}|}{////////NOTHING FOLLOWS//////////// \newline  \newline  \newline Document was forwarded to both Mr. Bundy and Mr. Katzenback in 1969 \newline If you have any questions concerning this regrading action please contact SFC William C. Holzer, US Army, Chief Clerk, SecDef/Classified Control Section, Rm3A948, The Pentagon, Phone: OX-76131 \newline  \newline  \newline Done 7/19/71 \newline Copy in EA/Bundy file \newline Copy in 8/1-file 7512 \newline \newline  \newline } \\ \hline      \multicolumn{4}{|p{1.0\textwidth}|}{\begin{footnotesize}The document(s) listed above has/have been regraded and action should be taken to mark copies furnished your office. It is requested that you notify all recipients to whom additional distribution was furnished.\end{footnotesize} \newline  \newline  \newline } \\ \hline      \multicolumn{2}{|p{0.5\textwidth}|}{\textit{T. B. EDWARDS, MAJ, USA, Top Secret Control Officer} \newline \begin{footnotesize}Printed or typed name of official\end{footnotesize}} & \multicolumn{2}{|p{0.5\textwidth}|}{\begin{footnotesize}Signature\end{footnotesize}} \\ \hline      \end{tabularx} \\     \end{document}      The table in question spans lines 97-108. The table (on page 4), looks like this: ![enter image description here](http://i.stack.imgur.com/F1vKa.png)


title: Integral limits with amsmath in LuaLaTeX

text: Also reading the thread about Making integral ∫ use \limits by default with unicode-math I'm not quite happy with the solution. With pdfLaTeX I use the code               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[intlimits]{amsmath}     \begin{document}     \[A=\int_0^{b}f(x)\mathrm{d}x\]     \end{document}      and get ![Screenshot of result with pdflatex](http://i.stack.imgur.com/uEYsR.png) Compiling the code               \documentclass{article}     \usepackage[intlimits]{amsmath}     \usepackage{fontspec,unicode-math}     \setmainfont{Latin Modern Roman}     \setmathfont{Latin Modern Math}     \begin{document}     \[A=\int_0^{b}f(x)\mathrm{d}x\]     \end{document}      with LuaLaTeX I get ![Screenshot of result with lualatex](http://i.stack.imgur.com/e8jvX.png) Is there any possibility—beside the solution in the linked question—to get the same output with both pdfLaTeX and LuaLaTeX?


title: Half of a document in pdfLaTeX, half in XeLaTeX

text: As far as I know, I cannot use `microtype` in XeLaTeX, and cannot use `fontspec` in pdfLaTeX. I am rendering Chinese symbols only on one page, and I need this line: `\newfontfamily{\J}[Scale=0.85]{Osaka}` to render the symbols properly. I want to use `microtype` and `fontspec` at the same time; is it possible to tell latex to switch into "pdfLaTeX" mode to render the first half of the document, and then switch back into XeLaTeX to render the other half?


title: Why can't this table compile?

text: I had wrote following table in TexMaker, when I write it without `\usepackage{xepersian}` it works but when I want to compile it with that package too, program will hang! But I don't see any mistakes and my entries are these.               \documentclass[12pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{xepersian}     \settextfont[Scale=1]{XB Niloofar}     \author{SadeghiManesh}     \title{A Table}     \begin{document}         \begin{flushleft}         \begin{tabular}{|l|l|l|l|l|l|}         \hline $\nabla_{X_{i}}X_{j}$ & $\Gamma_{i,j}^{2}$ & $\Gamma_{i,j}^{1}$ & k & j & i  \\          \hline $\frac{-1}{x_{2}}X_{2}$ & $\begin{array}{l} \; \\ \frac{-1}{x_{2}} \end{array} $ & $\begin{array}{l} - \\ \; \end{array} $ & $\begin{array}{l} 1 \\ 2 \end{array} $ & $\begin{array}{l} 1 \\ 1 \end{array} $ & $\begin{array}{l} 1 \\ 1 \end{array} $ \\          \hline $\frac{-1}{x_{2}}X_{1}$ & $\begin{array}{l} \; \\ - \end{array} $ & $\begin{array}{l} \frac{-1}{x_{2}} \\ \; \end{array} $ & $\begin{array}{l}1 \\ 2 \end{array} $ & $\begin{array}{l} 2 \\ 2 \end{array} $ & $\begin{array}{l} 1 \\ 1 \end{array} $ \\          \hline $\frac{-1}{x_{2}}X_{1}$ & $\begin{array}{l} \; \\ - \end{array} $ & $\begin{array}{l} \frac{-1}{x_{2}} \\ \; \end{array} $ & $\begin{array}{l} 1 \\ 2 \end{array} $ & $\begin{array}{l} 1 \\ 1 \end{array} $ & $\begin{array}{l} 2 \\ 2 \end{array} $ \\           \hline $\frac{-3}{x_{2}}X_{2}$ & $\begin{array}{l} \; \\ \frac{-3}{x_{2}} \end{array} $ & $\begin{array}{l} - \\ \; \end{array} $ & $\begin{array}{l} 1 \\ 2 \end{array} $ & $\begin{array}{l} 2 \\ 2 \end{array} $ & $\begin{array}{l} 2 \\  2\end{array} $ \\           \hline           \end{tabular}           \end{flushleft}     \end{document}


title: Typewriter text in sections with ACM "sig-alternate" document class

text: I would like to put a `\texttt{}` block in a section, e.g.               \section{Algorithm \texttt{FSG}}      But the problem of this approach is that the text inside the`\texttt{}` block does not inherit the size and boldness of the surrounding text, at least with the ACM `sig-alternate` document class. How could I solve this problem?


title: How to define the math operator in n//m?

text: [I reworded the question to make it less based on opinion and ask only for specific expertise.] Using Sage one can write m//n for the integer division. I found Sage's notation very convenient to use and want to use this notation also with TeX. What is the best way to do so?               \documentclass{article}     \usepackage{amsmath}     \newcommand\+{/ \mkern-5mu /}     \begin{document}     \begin{align}     a_{n}&=2^{\left\lfloor n/2\right\rfloor}\left(\left\lfloor n/2\right\rfloor+1\right) n!     \\[6pt]      a_{n}&=2^{n/\!/2}\left(n/\!/2+1\right) n!     \\[6pt]     a_{n}&=2^{n\+2}\left(n\+2+1\right) n!     \end{align}     \end{document}      ![enter image description here](http://i.stack.imgur.com/xyoGY.png)


title: Make matrix inside equation fit the page width in LyX

text: I have a matrix that is a bit too wide to fit inside my page width. After reading a lot of different answers on the Internet, none really related to LyX, I came up with these three different solutions, all of them involve inserting an ERT (raw LaTeX code, in this case all the lines before `\begin{equation}` and after `\end{equation}`). Here is the image: ![output](http://i.stack.imgur.com/OL64y.jpg) I don't know if other possibilities also work and which are the advantages or disadvantages, from each method. The LaTeX source for all this is:               \noindent\makebox[\textwidth]{%     \tiny%     \begin{minipage}[t]{1\columnwidth}%     \begin{equation}     Q=\begin{pmatrix}0.00301472 & -0.0961879 & -0.00897697 & 0.0389941 & -0.860642 & 0.0131329 & -4.73786 & -0.00552858\\     -0.028584 & 0.615003 & 0.111671 & -0.371008 & 4.94379 & -0.138279 & 20.3258 & 0.0512362\\     0.0132728 & -0.345125 & -0.0701132 & 0.115389 & -3.11777 & 0.102871 & -16.9949 & -0.0408223\\     2.91757 & 1.03545 & -5.16595 & 1.69976 & -22.1649 & 4.33453 & 120.513 & -1.35074\\     0.867566 & 2.92363 & -1.14174 & 3.4356 & -2.96193 & 1.91413 & -113.348 & -0.684269     \end{pmatrix}     \end{equation}     %     \end{minipage}}          \resizebox{\textwidth}{!}{%     \tiny%     \begin{minipage}[t]{1\columnwidth}%     \begin{equation}     Q_{ij}=\left(\begin{array}{cccccccc}     0.00301472 & -0.0961879 & -0.00897697 & 0.0389941 & -0.860642 & 0.0131329 & -4.73786 & -0.00552858\\     -0.028584 & 0.615003 & 0.111671 & -0.371008 & 4.94379 & -0.138279 & 20.3258 & 0.0512362\\     0.0132728 & -0.345125 & -0.0701132 & 0.115389 & -3.11777 & 0.102871 & -16.9949 & -0.0408223\\     2.91757 & 1.03545 & -5.16595 & 1.69976 & -22.1649 & 4.33453 & 120.513 & -1.35074\\     0.867566 & 2.92363 & -1.14174 & 3.4356 & -2.96193 & 1.91413 & -113.348 & -0.684269     \end{array}\right)     \end{equation}     %     \end{minipage}}          \noindent%     \begin{minipage}[t]{1\textwidth}%     \tiny     \begin{equation}     Q=\begin{pmatrix}0.00301472 & -0.0961879 & -0.00897697 & 0.0389941 & -0.860642 & 0.0131329 & -4.73786 & -0.00552858\\     -0.028584 & 0.615003 & 0.111671 & -0.371008 & 4.94379 & -0.138279 & 20.3258 & 0.0512362\\     0.0132728 & -0.345125 & -0.0701132 & 0.115389 & -3.11777 & 0.102871 & -16.9949 & -0.0408223\\     2.91757 & 1.03545 & -5.16595 & 1.69976 & -22.1649 & 4.33453 & 120.513 & -1.35074\\     0.867566 & 2.92363 & -1.14174 & 3.4356 & -2.96193 & 1.91413 & -113.348 & -0.684269     \end{pmatrix}     \end{equation}     %     \end{minipage}      Is there a simpler way of doing this in LyX, for example without using the `\tiny` command and inserting boxes inside boxes? Can't LaTeX simply determine when a matrix is too big and rescale it to fit the page? This is how it looks like in the output: 2


title: LTR bibliography in a RTL document

text: I have a Lyx document in Hebrew(RTL Language), while all the sources are in English(LTR Language). Therefore, I've added `\selectlanguage{english}` before the bibliography, and `\selectlanguage{hebrew}` in it's end. So now the bibliography looks good. However, whenever I add a citation, it's number is inverted(a.k.a 31 instead of 13). Surrounding the citation with `\selectlanguage` tags works to fix the problem(although is quite cumbersome), but than the citation appears in the beggining of the line. Any help please? **EDIT1** : I have noticed that this becomes possible if you surround the citations with `\beginL` and `\endL`. However, if I do that, the parantheses surrounding the citation's number become inverted(a.k.a. ]12[ instead of [12]). **EDIT2** : As to your questions. Providing minimal working code is hard, as it's a lyx document, so it generates lots of noise. However, Here's the LaTeX preamble:               \usepackage{cite}     \let\oldcite\cite     \renewcommand{\cite}[1]{\beginL\oldcite{#1}\endL}      I use ordinary \cite command for the citations with a basic bibtex bibliography.


title: Table in footnotes

text: I would like to include tables in footnotes               \footnotetext{SOME TEXT          TABLE          SOME TEXT}      I can use the `tabular` environment, but the `begin{table}` with the caption and the label doesn't work.