title: TikZ matrix, style for combination or rows and columns

text: In the TikZ manual we have the example below that shows how to apply an style to an entry of the matrix. It is also easy to apply it for an entire row and an entire column. My question is how can we achieve the same for several entries? Is there _a simple way_ to specify a style, say for example, **rows 1 & 3 and columns 1 & 2**?               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{matrix}     \begin{document}     \begin{tikzpicture}[row 2 column 3/.style=red]     \matrix [matrix of nodes]     {      8 & 1 & 6 \\      3 & 5 & 7 \\      4 & 9 & 2 \\       };      \end{tikzpicture}      \end{document}


title: How can I type in Devnagari font using LaTeX?

text: I'm new to LaTeX and I'm trying to learn it. It is very interesting. I have to type a lot of documents that contain Devnagari text, more precisely Nepali Language. How can I type it using LaTeX, so that I could make beautiful document in my own language?


title: Struggling to get moderncv files to compile

text: I'm a real novice on LaTex, having only used it previously a small amount at University but not for a while. I've decided I'd quite like to transfer my CV to the LaTex moderncv style. I downloaded the package here http://www.ctan.org/pkg/moderncv I use TexWorks, and I was hoping I'd just be able to open the template file from the moderncv download, compile it and edit the text to produce a nice CV. Unfortunately, when I try to do this I get the following error: > Running ttf2pk.exe... > > miktex-makepk: PK font umvs could not be created. > > !pdfTeX error: pdflatex.EXE (file umvs): Font umvs at 864 not found > > ==> Fatal error occurred, no output PDF file produced! > > texify: pdflatex failed for some reason (see log file). So it seems to be a problem with not having a font package installed or something?! Do you know which package this is? And how do I actually download a font package so that TexWorks knows it's installed and thus compiles the file? I've heard people talk about Miktex package installer, but I don't think I have that available, but I set up all my LaTex stuff quite a while ago, so I'm not sure... Sorry for my very poor understanding of LaTex, I'd just like to find a way to get this moderncv package working asap. Any help would be much appreciated. Cheers,


title: Drawing a logarithmic timeline with tikz

text: I am trying to draw a logarithmically scaled timeline with TikZ. I tried starting from a snippet from `chronlogy.sty`:               \begin{tikzpicture}[baseline={(current bounding box.north)}]%        \draw [|->] (0,0) -- (\thedeltayears*\unit+\unit, 0);%        \foreach \x in {1,...,\thedeltayears}%         \draw[xshift=\x*\unit] (0,-.1\unit) -- (0,.1\unit);%       \addtocounter{deltayears}{1}%       \foreach \x in {\thestepstart,\thestep,...,\thestepstop}{%         \pgfmathsetlength\xstop{(\x-\theyearstart)*\unit}%         \draw[xshift=\xstop] (0,-.3\unit) -- (0,.3\unit);%         \node at (\xstop,0) [below=.2\unit] {\x};}}{%     \end{tikzpicture}%      The horizontal axis should look like the x-axis of a logarithmic plot with main ticks labeled ...,`10^-2`,`10^-1`,`10^0`,`10^1`,... and minor ticks without lables at a position corresponding to log10 of `2*10^-2`, `3*10^-2`, ... etc. Since the lower and upper limits should be customizable I need to implement an appropriate scaling function in TikZ. However, I already fail to alter the simple computation `xshift=\x*\unit` to something like `xshift=log10(pow(10,\x))*\unit`. How can I realize non-elementary computations in this place? Note that I consciously avoid the builtin `\begin{axis}`, because eventually I want to add labels and a second axis with different units etc. I also tried using `\pgfmathparse` and `\pgfmathresult` with equal success.


title: Subtheorems with alphabetic number

text: I would like to create a list of tasks using LaTeX. Therefore I created a theorem called task. For some tasks I would like to create additional subtheorems using alphabetic numbering. Currently my document is:               \documentclass[11pt, british, a4paper]{article}          \usepackage[utf8]{inputenc}     \usepackage[UKenglish]{babel}     \usepackage{amsthm}          \newtheorem{task}{Task}     \newtheorem{subtask}{Task}[task]          \begin{document}          \section{Tasks} % (fold)     \label{sec:number_1}          \begin{task}         Task 1     \end{task}          \begin{subtask}         Subtask 1     \end{subtask}          \begin{subtask}         Subtask 2     \end{subtask}          % section number_1 (end)          \end{document}      This produces:   * Task 1.   * Task 1.1.   * Task 1.2. My aim is an output like:   * Task 1.   * Task 1.a)   * Task 1.b) and subsubtasks (I do not know whether this word exists or not):   * Task 1.a.a)   * Task 1.a.b) How can I achieve this? Is it possible to achieve this with `amsthm` because I started with this package.


title: Enumeration with several items per line, several lines and nicely formatted

text: Based on Alan's answer here, I would like to be able to create nicely formatted "inline" enumerated lists. The issue I have is that the space between items on a line is always fixed, which does not look nice. I'm looking for a way to level out the spacing across lines. Any suggestion and help how to achieve something good looking would be appreaciated. Maybe I should not be using a enumeration environment? The lists in question are either just bullet points or a)-d).               \documentclass[12pt]{article}     \usepackage[inline]{enumitem}     \makeatletter     % This command ignores the optional argument for itemize and enumerate lists     \newcommand{\inlineitem}[1][]{%     \ifnum\enit@type=\tw@         {\descriptionlabel{#1}}       \hspace{\labelsep}     \else       \ifnum\enit@type=\z@            \refstepcounter{\@listctr}\fi         \quad\@itemlabel\hspace{\labelsep}     \fi}     \makeatother          \begin{document}          % Combined inline list     \noindent This is a combined inline enumerated list.     \begin{itemize}     \item Less than 5 years \inlineitem Between 5 and 10 years     \item More than 10 years \inlineitem Do not know     \end{itemize}          \bigskip          \noindent Another list.     \begin{itemize}     \item £850     \inlineitem £1,000     \inlineitem £1,150     \inlineitem £1,500     \inlineitem Do not know     \end{itemize}          \bigskip          \noindent And the final one     \begin{enumerate}[label=(\alph*)]     \item Agree strongly \inlineitem Tend to agree \inlineitem Neither agree nor disagree     \item Tend to disagree \inlineitem Disagree strongly \inlineitem Don't know     \end{enumerate}          \end{document}      ![enter image description here](http://i.stack.imgur.com/GotIO.png)


title: draw colored world/US map in LaTeX

text: I'm trying to draw maps similar to these in a LaTeX pdf document: ![enter image description here](http://i.stack.imgur.com/yIML0.jpg) ![enter image description here](http://i.stack.imgur.com/jeq2e.jpg) ![enter image description here](http://i.stack.imgur.com/pXZGX.jpg) I want to auto-generate them from a list of pairs (country,color) to determine the colors. I have found the package `pst-map2dII` in `pst-geo`, however its documentation is from 2004, is in French and the tutorial examples in it no longer seem to work (or I failed to understand something important in the French part). Is this package still working somehow, and if so how do I get a basic version to work? Either an English manual or a simple tutorial example similar to the world map above, would greatly be welcomed. If not, other packages or methods to auto-generate them outside LaTeX would be equally welcome.


title: DeclareMathOperator and align environment

text: Minimal working example:               \documentclass{article}     \usepackage{amsmath}     \begin{document}         \begin{align}             &s + t &\text{foo}\\             &\sin x &\text{bar}         \end{align}     \end{document}      Here, the `\sin` (or any other operator declared with `\DeclareMathOperator`) is not aligned with the `s`, it has some spacing in front of it. I know that math operators are inserting some spacing such that `x \sin y` works as expected, but since there is nothing in front of the `\sin` here, I wouldn't expect that to apply. Typesetting the paragraph `\noindent\\(s + t\\)\\\\\\(\sin x\\)` works as expected, too, so why doesn't it align correctly when used with the align environment?


title: Why does verb throw an error using in multicolumn command?

text: I encounter an error when using the `\verb` command within the `multicolumn` command. I reduced the problem to the example below:               \documentclass{article}          \begin{document}     \begin{table}[htb]     \begin{center}     \begin{tabular}{c|c}       \multicolumn{2}{c}{\verb+test+}      \end{tabular}     \end{center}     \end{table}          \end{document}      Error message: `\verb illegal in command argument` **1. Why is using`\verb` not allowed within `\multicolumn` ?** **2. How can I workaround this issue ?**


title: Resize tikzfigure in tcolorbox depending on height of tcolorbox

text: in my book I got many different type of boxes so I made some macros placing the boxes automatically according to their arguments. ![enter image description here](http://i.stack.imgur.com/pCu3r.jpg) That's one of them. So far I made some boxes that have big "+" and "-" inside and some that have small ones. It'd be nice, if I could manage to adapt the size of the signs according to the height of the box.               \documentclass{book}          \usepackage{xstring}     \usepackage[many]{tcolorbox}     \usepackage{calc}     \usetikzlibrary{calc}          \definecolor{mp}{RGB}{240,240,240}           \newcommand{\bround}{                         \draw[rounded corners=15pt,color=mp,line width=1pt,fill=white]                             (frame.south west) --                              (frame.north west) --                              (frame.north east) --                             (frame.south east) -- cycle;     }     \newcommand{\sep}{                         \draw[color=mp,line width=1pt]                         ([yshift=10pt]segmentation.south) -- ([yshift=-10pt]segmentation.north);     }          \newcommand{\ds}[1]{         \IfEqCase{#1}{%                     {bpl}{\dosign{0.25}{x}{y}{0}{0}{20}{-50}{50}{-60}}%                     {bmr}{\dosign{0.75}{x}{x}{0}{0}{20}{-50}{50}{-60}}%         }[\PackageError{ds}{Undefined option to ds: #1}{}]%     }          \newcommand{\dosign}[9]{                     \coordinate (xl) at ($ (frame.west)!#1!(frame.east) $ );                     \coordinate (yl) at ([yshift=#9pt] $ (frame.north)$ );                          \draw[line width=#6pt,mp]                             ([#2shift=#7pt,yshift=#4pt]xl|-yl) -- ([#2shift=#8pt,yshift=#4pt]xl|-yl);                           \draw[line width=#6pt,mp]                             ([#3shift=#7pt,yshift=#5pt]xl|-yl) -- ([#3shift=#8pt,yshift=#5pt]xl|-yl);     }          \newcommand{\doibs}[4]{\scantokens{%                 \begin{tcolorbox}[                            colback=white,                         arc=10pt,                         colframe=black,                         freelance,                         sidebyside,                         sidebyside align=top,                         frame code=\bround,                         segmentation code=\sep,                         interior code=\ds{#3}\ds{#4}                 ]                 \raggedright #1 \tcblower \raggedright #2                 \end{tcolorbox}}}          \begin{document}          \doibs{A\\A\\A\\A}{B}{bpl}{bmr}          \end{document}      As I have every type of combination (+-,++,--,+=,==,..), I wrote those macros keeping the source code as minimal as possible (according to my skills). If I had the possibility to get the height in macro `\ds`, I could ajust the signs by recalculating their dimensions, coordinates, etc. Does anyone have a clue?


title: Typesetting in Tamil on ShareLaTeX

text: My main goal is to display **Tamil** script in LaTeX using _ShareLaTeX_. I would be happy to figure out a minimal working code to display வணக்கம் in ShareLaTeX.               \documentclass{article}     \usepackage[utf8]{inputenc}          \title{Tirukkural}         \date{April 2014}         \begin{document}     \maketitle          அகர முதல எழுத்தெல்லாம் ஆதி     பகவன் முதற்றே உலகு          \end{document}      I have tried several packages, however, I run into a lot of errors whenever I use them. Here are some of my attempts: **1) itrans-package: Transliteration Example** LaTeX/XeTeX setup Tamil/Indic languages When I use the code suggested in the thread above, I get the error: 'File 'itrans.sty' not found'. How could I include it into ShareLaTeX? **2) otamil-package: Tamil Font Example** When I try to include the otamil-package the documentation says I have to install Yudit which would therefore not allow me to use tamil through ShareLaTeX. Does anyone have a suggestion how I could bring the code to use?               \usepackage[chandra]{otamil}      **3) babel-package: Tamil Font Example** http://www.sharelatex.com/learn/International_language_support ShareLaTeX has a sample code for using Russian script. However, applying the same logic to Tamil I get the following error message: _Package babel Error: Unknown option `tamil'. Either you misspelled it_               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[english, tamil]{babel}     \usepackage[T1, T2A]{fontenc}          \begin{document}          அகர முதல எழுத்தெல்லாம் ஆதி     பகவன் முதற்றே உலகு          \end{document}


title: How can I draw development of a polyhedron?

text: I have some pictures http://www.mediafire.com/view/?58gs6ye0zf149fv How can I draw development of polyherons in Tex? Please help me. * * * ![enter image description here](http://i.stack.imgur.com/T19Mo.png) ![enter image description here](http://i.stack.imgur.com/hkDGn.png)


title: Achemso: optional note in first citation reference creates extra bibliography entry and odd numbering

text: Using `achemso` class, is there a way to avoid the superfluous bibliography entry when the first citation contains an optional note? In such cases, the demonstration example warns us than `achemso` "assumes that the whole work has already been cited: odd numbering will result if this is not the case." Why, and is there an alternative or workaround? MWE illustrates undesired default behavior when using `\cite` with optional note to give a specific page number:               \documentclass{achemso}%           \begin{filecontents}{example.bib}     @Article{ref1,       author   = {Author},       title    = {Title of work},       date    = {2014}     } \end{filecontents}           \title{Test of citations with optional note in achemso}          \begin{document}          Here is the first and so far only reference \cite[p.~x]{ref1}, %     but two bibliography entries are made~\ldots          \bibliography{example}     \end{document}      Instead of the following (with note 1 never appearing in the text): > (1) Author,   >  (2) Ref. 1, p. x. I want: > (1) Author, p. x. Later in my document I may refer to other parts of the same work (so cannot specify pages in the `.bib` file). Also, the citation style uses superscripts; thus there is no parenthetical text (as per `natbib`'s `\citep`) in which to put the optional note.


title: Vertical alignment with multirow in tabularx

text: I have looked around for a solution that allows me to vertically centrally align a `multirow` row that spans two intermediate rows, which potentially span multiple lines since the tabular environment is `tabularx`. Some other questions that don't quite get to the solution are here, here, and here. These solutions use the `fixup` parameter to `multirow` that I really would not like to use, or they are not quite applicable to my case. So, to give an example               \documentclass{article}     \usepackage{tabularx, multirow, booktabs, lipsum}     \begin{document}          \begin{table}[ht]     \begin{tabularx}{\textwidth}{XXX}     \toprule     a & the first very, very, very, very, very, very, very, very, very, very, very long line. & a \\     \multirow{2}{*}{b} & a very, very, very, very, very, very, very, very, very, very, very long line. & \multirow{2}{*}{b} \\                        & another very, very, very, very, very, very, very, very, very, very, very long line. &  \\     \bottomrule     \end{tabularx}     \end{table}      \end{document}      I would like the "b"s to be vertically centrally aligned. I am not tied in any way to `multirow`, but I am to `tabularx` and would very much prefer an automatic solution.


title: Soul's underline misses text produced by a macro

text: The macro `ul` provided by `soul` works great, allowing linebreaks within an underlined text block. It even supports macros - if they were registered with `soulregister`. But if these registered macros produce text _on their own_ , it isn't underlined:               \documentclass{article}          \usepackage{soul}          \newcommand{\one}[1]{\ul{#1}}     \newcommand{\two}[1]{not underlined #1}          \soulregister{\two}{1}          \begin{document}     test1 \one{test2 \two{test3}}.     \end{document}      !["not underlined" isn't underlined](http://i.stack.imgur.com/1X3UM.png) How can I make sure this text is underlined correctly?


title: \section* no longer hides the section number

text: I wanted to add a background color to my sections, but by doing so `\section*` no longer works properly, ie, it now shows the section number when I want to hide it. Any ideas? Here's my code:               \documentclass[a4paper]{article}     \usepackage[english]{babel}     \usepackage{color}     \usepackage[uppercase]{titlesec}     \usepackage{textcase}     \newcommand{\ColorSection}[1]{%         \colorbox{red}{\parbox[c][1.5em][c]{\dimexpr\textwidth-2\fboxsep}         {\MakeUppercase{\thesection\ #1}}}}     \titlespacing*{\section}{0pt}{\baselineskip}{\baselineskip}          \titleformat{\section}         {\sffamily\Large\raggedright}                                                         {}{0pt}{\ColorSection}                                                                     \begin{document}          \section{with section number}          \section*{no section number}          \end{document}


title: How to keep two blocks containing item lists in the same position after overlay

text: I've been trying to use the overprint and overlayarea environments to keep 2 blocks with lists inside in the same position The items of the lists should also have overlays. For some reason, overprint neither overlayarea seem to work. Here is the code I'm using. Is there a way to keep overlaid blocks with overlaid item lists inside in the same position?               \documentclass[serif]{beamer}          \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \usepackage[spanish]{babel}     \usepackage{mathpazo}     \linespread{1.05}           \author{Lorem ipsum}     \title{Lorem ipsum}     \setbeamertemplate{navigation symbols}{}      \usetheme[hideallsubsections,left,width=2cm]{Marburg}          \usecolortheme{rose}      \setbeamercolor{titlelike}{bg=structure,fg=white}          \logo{ \includegraphics[height=1.5cm]{Logo.png}}            \setbeamertemplate{sidebar left}{           \vspace{-2\baselineskip}           \insertlogo                \vspace{\baselineskip}           \color{white}{\insertshorttitle[width={2cm},center,respectlinebreaks]}          \insertshortauthor[width={2cm},center,respectlinebreaks] \vspace{\baselineskip}          \insertverticalnavigation{2cm}          \vspace{4\baselineskip}          \insertframenumber            }               \begin{document}               \section{Lorem Ipsum}               \begin{frame}     \begin{overprint}[\textwidth]                    \onslide<1-4> {      \begin{block}{\hfill erga}       \begin{itemize}        \item 123        \item 1234.        \item 12455.        \item LOrep ipsum.      }       \end{itemize}           \end{block}           \onslide<5-7>{           \begin{block}{\hfill E3}                 \begin{itemize}        \item aergaergaerg        \item Genaerg.        \item tahthhaethetros.        \item aehathahtarhat.        \end{itemize}           \end{block}     }          \end{overprint}     \end{frame}     \end{document}      Thanks in advance, Charlie


title: \newenvironment where all text is typewriter (like \texttt)

text: I'd like to have an environment that encloses all its content into the typewriter font as `\texttt{}` does. However, I do not want to use `\texttt{}` but an own environment, e.g. `\begin{allintypewriter}` because my text contains multiple paragraphs. So instead of               \texttt{     My multiparagraph text     }      I'd like to write               \begin{allintypewriter}     My multiparagraph text     \end{allintypewriter}      Sorry, it's a newbe question, but how do I define a `\newenvironment` for this? (I do not want to use something like `\verbatim` because the text to be set as typewriter should contain other latex commands; only the font should be changed to typewriter for this environment)


title: Wrong numbering in the List of Figures with subfigure package

text: I get a wrong numbering of subfigures in the List of Figures with the following MWE. If I remove the `FIGTOPCAP` option or if I put the `\caption` on the top, the problem is solved, but I'd like keep them. Any idea?               \documentclass{book}     \usepackage[tight,FIGTOPCAP]{subfigure}     \setcounter{lofdepth}{2}          \begin{document}     \listoffigures          \begin{figure}         \frame{             \begin{minipage}[t]{0.4\textwidth}                 PIC 1             \end{minipage}         }         \caption[Short Caption]{Long Caption}     \end{figure}          \begin{figure}         \subfigure[Sub-caption A]{\label{LabelA}%             \frame{                 \begin{minipage}[t]{0.4\textwidth}                     PIC 2A                 \end{minipage}             }%         }         \hfill         \subfigure[Sub-caption B]{\label{labelB}%             \frame{                 \begin{minipage}[t]{0.4\textwidth}                     PIC 2B                 \end{minipage}             }%         }%         \caption[General Short Caption]{General Long Caption\label{GenLabel}}     \end{figure}     \end{document}


title: Bookmarks not linking with Table of Figures and Bibliography properly

text: I've been trying to get the `bookmark` package to work with my thesis, and for the most part I'm happy with the results; however, I'm having some problems with the links for the Table of Figures and Bibliography. Below is a rather extensive MWE of my code for the various sections and chapters etc. I've included all the packages I'm using in my thesis (thus far) in case there's anything that might be causing some conflicts. Having compiled the TeX file and opened the pdf all the various bookmarks are present, however when I click on the bookmark for Table of Figures it takes me to the Contents page. Similarly, when I click on the bookmark for the bibliography it takes me to 6.1.1, the subsection in Chapter 6. Can anyone shed any light on what's going wrong here? Many thanks!               \documentclass[12pt,a4paper]{report}     \usepackage[utf8]{inputenc}     \usepackage{setspace}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{lscape}     \usepackage[round,colon]{natbib}     \usepackage{caption}     \usepackage{array,booktabs,threeparttable}     \usepackage{chemformula}     \usepackage{url}     \usepackage[intoc]{nomencl}     \usepackage{bookmark}     \usepackage{lipsum}     \bookmarksetup{bold=false}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}       @book{Knu86,         author = {Knuth, Donald E.},         year = {1986},         title = {The \TeX book},       }     \end{filecontents}          \begin{document}          \begin{titlepage}     \begin{center}     \vspace*{1in}     {\LARGE Quantifying rates of landscape evolution in carbonate terrains using U-Pb dating of speleothems}     \par     \vspace{1.5in}     {\large Christopher James Martin Smith}     \par     \vfill     A dissertation submitted to the University of Bristol in accordance with the requirements for award of the degree of Doctor of Philosophy in the Faculty of Science.     \par     \vspace{0.5in}     School of Geographical Sciences     \par     \vspace{0.5in}     University of Bristol     \par     \vspace{0.5in}     September 2014     \end{center}     \end{titlepage}          \pagenumbering{roman}     \chapter*{Declaration}     \addcontentsline{toc}{chapter}{Declaration}     \lipsum[1]          \chapter*{Acknowledgements}     \addcontentsline{toc}{chapter}{Acknowledgements}     \lipsum[1]          \chapter*{Abstract}     \addcontentsline{toc}{chapter}{Abstract}     \lipsum[1]          \label{Table of Contents}     \cleardoublepage     \pdfbookmark{\contentsname}{Contents}     \tableofcontents     \newpage          \label{List of Figures}     \addcontentsline{toc}{chapter}{List of Figures}     \listoffigures     \newpage          \label{Lits of Tables}     \addcontentsline{toc}{chapter}{List of Tables}     \listoftables     \newpage          \label{Nomenclature}     \printnomenclature     \newpage          \pagenumbering{arabic}     \chapter{Introduction}     \section{Section}     \lipsum[1]\citep{Knu86}     \subsection{Subsection}     \lipsum[1]          \chapter{Literature Review}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \chapter{Methodology}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \chapter{Results}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \chapter{Discussion}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \chapter{Conclusion}     \section{Section}     \lipsum[1]     \subsection{Subsection}     \lipsum[1]          \addcontentsline{toc}{chapter}{Bibliography}      \bibliographystyle{plainnat}     \bibliography{\jobname}          \end{document}


title: Cutting string with formula or cite

text: I am trying to define a macro that would take a string and paint its ending, for example:               \def\paintString#1{%       \saveexploremode%       \exploregroups%       \textcolor{white}{\StrGobbleRight{#1}{5}}%       \StrGobbleRight{#1}{2}[\tmp]%       \textcolor{yellow}{\StrRight{\tmp}{3}}%       \textcolor{white}{\StrRight{#1}{2}}%       \restoreexploremode%     }      This works like intended for the ordinary text (everything white, except chars 4-5 from the right, which are yellow). However, it breaks if the argument contains formula or `\cite{}`:               \paintString{Blah \cite{reference}}     \paintString{Blah $\Sigma$}      To this, LaTeX reports               Argument of \XC@col@rlet has an extra }.      which I assume happens because I break formula (or `\cite`) and put `\textcolor{...}{` inside and the corresponding `}` outside. Is there a way to force the expansion in a way that these special things are treated as a single char by the `xstring` macros? I need to put some kind of expansion explicitly (hence `\exploregroups`), because without it the strings are not parsed properly. Furthermore, this is in Beamer theme and one of the places this is called from are frame titles which, if unexpanded, report `\StrLength` 1, so the above painting doesn't occur at all. **Edit:** This is a bit safer to use:               \def\paintString#1{%       \saveexploremode%       \exploregroups%       {\color{white}\StrGobbleRight{#1}{5}%       \StrGobbleRight{#1}{2}[\tmp]%       \color{yellow}\StrRight{\tmp}{3}%       \StrRight{#1}{2}}%       \restoreexploremode%     }      However, it still fails with `\cite`.


title: How to properly space multirow subfloats

text: I have 3 subfloats, but they will not all fit on one line, so I have two in the top row and one on the bottom row. My first problem is the floats are all different sizes and they are not being spaced properly. The captions for all three seem to be in the appropriate spots (bottom float is centered on the page). However, the subfloats seem to be offset to the right in all cases. Also the captions for the first two subfloats are multiline and do not line up the same way. In the first one the second line starts between the `(a)` and the first letter, in the second subfloat the second line starts indented, about the third letter in. I didn't write this code, so I'm sure there is something in there that is messing it up. Please help me figure out what is going on.               \begin{figure}[h!]         \centering         \begin{subfigure}[h]{0.3\textwidth}                 \centering                 \includegraphics[scale=1]{fig_1}                 \caption{This Caption is long and takes two lines}                 \label{fig:fig_1}         \end{subfigure}%         \hfill         \begin{subfigure}[h]{0.3\textwidth}                 \centering                 \includegraphics[scale=1]{fig_2}                 \caption{This Caption is also long and takes two lines}                 \label{fig:fig_2}         \end{subfigure}              \begin{subfigure}[h]{0.3\textwidth}                 \centering                 \includegraphics[scale=0.8]{fig_3}                 \caption{Caption Figure 3}                 \label{fig:fig_3}         \end{subfigure}         \caption{Caption Figure All}         \label{fig:all}     \end{figure}


title: \intertext doesn't play nice with \paragraph

text: I have the following test case:               \documentclass[12pt]{article}     \usepackage{amsmath}     \begin{document}         \section{Test}         \paragraph{Group A:}         \begin{align*}             E &= mc^2\\             E &= \hbar\omega           \intertext{\paragraph{Group B:}}             F &= ma\\             F &= mv\frac{dv}{dx}         \end{align*}     \end{document}      I would expect this to produce the paragraph title "Group A:", followed by two energy expressions, followed by the paragraph title "Group B:", followed by two force expressions. When I use two `align*` blocks instead of `intertext` then this works, but in my actual document (where the equations are more complicated), the equations are obviously not aligned across the blocks. If I remove the `\paragraph` from the `\intertext`, then I get the expected result (but the "Group B:" text is obviously not formatted as I want). The specific output that I get from TexMaker looks as follows: # Log:               LOG FILE :     This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=pdflatex 2013.7.16) 16 JUL 2013 15:42     (etc)      # Output: > ## 1 Test > > ### Group A: > > E = mc² > > E = hw > > ### Group A: > > F = ma > > F = mv dv/dt > > ### Group A: ...which is obviously not what I want! # Solution (thanks to egreg): Prelude:               \newcommand{\group}[1]{\noalign{\noindent\textbf{#1}}}      Document:                 E &= mc^2\\       E &= \hbar\omega\\     \group{Group B:}\\       F &= ma\\       F &= mv\frac{dv}{dx}


title: How to style a tree using tikz?

text: I want to style a tree into this form : ![goal](http://i.stack.imgur.com/NMEXy.png) but my code is in generate this: ![enter image description here](http://i.stack.imgur.com/MNWTy.png)               \documentclass{article}          \usepackage{tikz}     \usepackage{tikz-qtree}          \begin{document}          \begin{tikzpicture}             [level distance=10mm,                     every node/.style={fill=red!60,circle,inner sep=1pt},                     level 1/.style={sibling distance=20mm,nodes={fill=red!45}},                     level 2/.style={sibling distance=10mm,nodes={fill=red!30}},             level 3/.style={sibling distance=5mm,nodes={fill=red!25}}]             \node {31}             child {node {30}                     child {node {20}                             child {node {5}}                             child {node {4}}                     }                     child {node {10}                             child {node {9}}                             child {node {1}}                     }             }             child {node {20}                     child {node {19}                             child {node {1}}                             child[missing]                     }                     child {node {18}}             };     \end{tikzpicture}          \end{document}      How can I make the line begins from the center of the circle instead of the edge?


title: How can I add borders

text: Given this, how can I add a border around?               \begin{ttfamily}     \begin{lstlisting}     g@g0001:~$ cd Desktop     g@g0001:~/Desktop$ cat script.sh          #!/bin/bash     echo $1 `date`          g@g0001:~/Desktop$ ./script.sh "hello"     hello Wed Dec 19 06:30:49 CET 2012          g@g0001:~/Desktop$ ./script.sh "`ls -la`"     total 244 drwxr-xr-x 2 g g 4096 2012-12-19 06:29     . drwxr-xr-x 34 g g 4096 2012-12-19 06:23     .. -rwxr-xr-x 1 g g 314 2012-11-24 12:06     25332.txt -rw------- 1 g g 1038 2008-01-15 18:59     Makefile -rw-r--r-- 1 g g 227981 2011-09-06 10:37     .pdf -rwxrwxrwx 1 g g 29 2012-12-18 18:16     script.sh Wed Dec 19 06:31:18 CET 2012     \end{ttfamily}      I tried `\fbox` but I get an error.


title: The line spacing in the list of algorithms

text: This is my code:                \documentclass[12pt,a4paper]{book}       \usepackage[T1]{fontenc}      \usepackage[chapter]{algorithm}      \renewcommand{\baselinestretch}{1.5}       \begin{document}      \begin{spacing}{1.2}      \tableofcontents      \backmatter       {\listoffigures  \listoftables \listofalgorithms} \end{spacing}      \include{Chapter1}      \include{Chapter2}      \end{document}      in the PDF file, i have: in the list of figure the space between fig2.1 and fig 2.2 is smaller than the space between fig2.2 and fig 3.1, but in the list of algorithm i have the same space everywhere, Have you an idea please ? I would like to have the list of algorithms like the list of figure Thank you. Similar:   * How to change the line spacing in my list of figures?   * How to tweak the LOF and LOT without using any packages?


title: Using csquotes and babel with option "british" reverses order of single and double quotes

text: I have the following:               \documentclass{report}     \usepackage[british]{babel} % <-- problematic line     \usepackage[english=british]{csquotes}          \begin{document}     \enquote{outside \enquote{inside} outside again}     \end{document}      I would like to have double quotes around the outer part and single quotes around the inner part. Generally this works, but adding the marked line changes the roles of single and double quotes. I'm using pdflatex under Ubuntu. There was a similar question: Retaining double quotation marks in biblatex- chicago with British localization But I couldn't extract an answer to my case.


title: XeLaTeX override default sanskrit hyphenation, do not hyphenate if not indicated

text: Sanskrit hyphenation is not very good in xelatex as it can possibly not recognize long compound words. I want to override the default hyphenation and hyphenate only where indicated by the `\\\\-` command. I have a minimal working example below where I use `\usepackage[none]{hyphenat}` to disable hyphenation and the sloppyvar environment (without which there is an overflow). I want to disable all default hyphenation except for my `\\\\-` command but cannot figure out how to do this. For example I type `स्वादमनुभूत\\\\-वन्तोऽस्याः` but the hyphenation is not respected - the entire word is printed on fourth line of page 2, with the third line has extra space. Similarly I do not want `सुचरितविग्रहाः` to split but it is split. How can I achieve the dual objective of hyphenating where indicated and nowhere else?               \documentclass{article}     \usepackage{graphicx}     \usepackage{polyglossia}     \usepackage{fontspec}     \usepackage{metalogo}     \usepackage{array}     \usepackage[margin=2.5cm]{geometry}     \usepackage{longtable}     \usepackage{setspace}     \usepackage{fancyhdr}     \usepackage{xstring}     \usepackage{draftwatermark}     \usepackage{pdflscape}     \usepackage{ragged2e}     \usepackage[none]{hyphenat}     \setmainlanguage{sanskrit}     \setdefaultlanguage{sanskrit}     \setmainfont[Script=Devanagari]{Arial Unicode MS}      \newfontfamily\devanagarifont[Script=Devanagari]{Arial Unicode MS}     \newcommand{\devanagarinumeral}[1]{   \devanagaridigits{\number\csname c@#1\endcsname}}     \parindent 0pt     \addtolength{\parskip}{2mm}     \tolerance=500     \raggedbottom     \overfullrule=10pt     \hyphenpenalty=100     \setcounter{secnumdepth}{-1}     \renewcommand{\contentsname}{\centering \Huge अनुक्रमणिका}     \SetWatermarkText{\shortstack[c]{DRAFT2}}     \SetWatermarkLightness{0.95}     \SetWatermarkScale{0.25}      \renewcommand{\tabcolsep}{0.5pt}     \title{MyDoc}            \author{Me}          \date{}     \renewcommand{\thesection}{\devanagarinumeral{section}}     \renewcommand{\thepage}{\Large \devanagarinumeral{page}}     \renewcommand{\theenumi}{\devanagarinumeral{enumi}}     \usepackage{hyperref,bookmark}     \hypersetup{         pdftitle={MyDoc},         pdfauthor={Me},         pdfkeywords={Blah},         pdfsubject={Blah Blah},         bookmarksnumbered,         pdfstartview={FitH},         colorlinks,         urlcolor=cyan,         linkcolor=blue     }     \begin{document}     \renewcommand{\contentsname}{\centering \Huge अनुक्रमणिका}     \tableofcontents     \pagebreak     \fontsize{16}{18}\selectfont     \section[\texorpdfstring{\Large नान्दीवाक्}{Foreword}]{\huge नान्दीवाक्}     \justifying     \begin{longtable}{>{\setlength\parfillskip{0pt}}p{85mm}l}     यावत्स्थास्यन्ति गिरयः सरितश्च महीतले & । \\ \nopagebreak     तावद्रामायणकथा लोकेषु प्रचरिष्यति & ॥ \\      \end{longtable}     \vspace{-6mm}     \begin{sloppypar}   इति। सहस्र\-धारा भगवती भागीरथीव संदृश्यते रामकथा\-परम्परा। त एव स्वादमनुभूत\-वन्तोऽस्याः कथाया येऽस्यां निमग्नाः।      यथाऽपरिमेय\-सलिलाकरस्सागरश्शत\-शताऽवर्तैः प्रनृत्यन्नीर\-चक्रवालैः कशाभिघात\-प्रतीकाशैस्तरङ्गोच्चयैर्डिण्डीर\-बुद्बुदशक्ति\-शङ्खादिभिश्च      विलक्षणमेव किमपि हरिचन्दन\-नयनासेचनकं जनयन् महतीमभिख्यामुपयाति तथैव भगवतो रामभद्रस्य सुचरितप्रवाहोऽपि कविप्रतिभा\-प्रसूत\-नूतनप्रस्थानैः      प्रकरण\-वक्रिमभिश्च काप्यपूर्वामेव सारस्वतीं विच्छित्तिं जनयति। कियद्भिरेव प्राचेतसोत्तर\-वर्तिभिः कविपुङ्गवैः      भास\-कालिदास\-भवभूति\-कुमारदासाभिनन्द\-भट्टि\-मुरारि\-मायुराज\-राजशेखर\-भोजदेव\-जयदेव\-महादेव\-शक्तिभद्र\-विरूपाक्ष\-रामभद्र\-दीक्षित\-मल्लिनाथ\-प्रभृतिभिः दृश्य\-श्रव्य\-राघव\-कथाकारैः       साभिनवकल्पनं स्वकाव्यानि प्रणीतानि। हन्त। न तथापि निरवकाशा जाता दशरथ\-नन्दन\-यशश्चन्द्रिका। रामकथा अद्यापि कविभिः प्रणीयन्ते प्रणेष्यन्ते      च भविष्यत्कालेऽपि। यतो हि सार्व\-कालिको रामः। सार्व\-देशिको रामः। सर्वधर्म\-व्याख्येयो  रामः। सर्वसम्प्रदाय\-समाधेयो रामः।      सर्वभाषा\-साहित्य\-सङ्कीर्तनीयो रामः। एतादृशं लोकवन्दनीयं लोकमर्यादा\-प्रतिमानभूतं निष्कलङ्कं चरितं क्वान्यत्र संदृश्यते।      पदे पदे सन्ति समराङ्गण\-सूत्रधाराः इतिहास\-वर्णिताः। वदान्यानां लोकोपकार\-प्रवणानां दानदाक्षिण्य\-कलावतंसानां महीपानां लोकधुर्याणाञ्चापि नैयून्यं न संल्लक्ष्यते।      तथाप्यप्रतिमो रामः। अतुलनीयो रामः। सर्वथाऽनिर्वचनीयो रामः प्रतिभाति। इदमेवाऽस्ति रामचरितस्य सनातनत्वम्। इदमेवास्ति रामचरितस्य सनातनत्वम्।      इदमेवास्ति राम\-चरितस्याक्षुण्णत्वम्। सर्वेऽपि नायकत्वेनोप\-कल्प्यमानाः सुचरितविग्रहाः कालातीताः प्रतीयन्ते।      परन्तु नित्य\-कीर्तनीयस्तिष्ठति केवलं वैदेहीजानिर्भगवान् दशरथनन्दन एव।      येन राम\-कथानुशंसया न पवित्रीकृताऽत्मकाव्य\-प्रतिभा वृथैव जातं तत्कवित्वम्। ततएवाऽद्यापि कवीनुत्कयति रामकथा। \\     \end{sloppypar}      \end{document}


title: Tabular: title above and caption below?

text: I have a table that I would like to put the Title above and a caption below. Intuitively (though I know how troublesome intuition can be in something like LaTeX), I should be able to do as below:               \begin {table}[H]     \caption {Table Title} \label{tab:title}      \begin{center}     \begin{tabular}{ >{\centering\arraybackslash}m{1.25in}  >{\centering\arraybackslash}m{.85in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in}}     \toprule[1.5pt]     {\bf Variable Name} & {\bf Regression 1} & {\bf Mean} & {\bf Std. Dev} & {\bf Min} & {\bf Max}\\      \midrule     text        &  text     & text      &  text     &  text     &text\\          \bottomrule[1.25pt]     \end {tabular}     \caption {Should be a caption}     \end{center}     \end {table}      The above produces:                             Table 1: Table Title     =================================================     Name   Regression 1   Mean   Std. Dev.   Min  Max     --------------------------------------------------     text    text           text    text     text   text     ===================================================              Table 5: Should be a caption      How can I force latex to suppress the numbering/create a "caption" in the regular sense?


title: Writing an official letter

text: I want to write an official letter such as apply for fund ... as following : > > `To` >> >> `Subject` >> >> `Body` >> >> `Sign` >> >> `Name` I would appreciate if you can tell me the proper packages I should use for that.


title: latex classicthesis :: change the start location of the table of contents

text: I'm using classicthesis for my dissertation. By default the TOC begins with "List of Figures", "List of Tables", and "Listings" as can be seen in the Contents.tex source file. I would like the TOC to list "Dedication", "Acknowledgements", "Foreword", and "Abstract" before "List of Figures", etc. I have attempted to do this by adding the following code just before the code for "List of Figures" in Contents.tex.               \addcontentsline{toc}{chapter}{Dedication}     \pdfbookmark[1]{Dedication}{Dedication}          \addcontentsline{toc}{chapter}{Acknowledgements}     \pdfbookmark[1]{Acknowledgements}{Acknowledgements}          \addcontentsline{toc}{chapter}{Foreword}     \pdfbookmark[1]{Preface}{Foreword}          \addcontentsline{toc}{chapter}{Abstract}     \pdfbookmark[1]{Abstract}{Abstract}      This places these four entries into the TOC in the correct position, but they all get assigned the same page number: the roman page number that immediately follows the TOC (the same page number as "List of Figures"). How do I get the TOC to recognize the correct roman page numbers of these four preceding chapters? Thanks.


title: How to create a short upper hyphen

text: How can I create a short hyphen, that connects two words in their upper part? The usual hyphen connects the words in their middle part. I tried to detexify it, but got only middle and bottom hyphens, not top hyphens.


title: Skipping every even numbered item in the enumerate environment

text: How can I skip every even item in the `enumerate` environment without having to continually type `\setcounter{enumi}{5}`? I am still learning to program macros, so I spologize if this is a ridiculously easy question. Just to be clear, I would like something like `1\. *Something.* 3\. *Somthing else.* 5\. *A third something.* ` ...As opposed to `1\. Something. 2\. A second something. 3\. A tertiary Something. `


title: generate circular path with tikz and include empty node

text: In the following example:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{arrows}          \begin{document}     \begin{tikzpicture}[every node/.style={inner sep=1pt}]       \node (1) at (8,6) {A1};       \node (2) [below left of = 1] {A2};       \node (3) [below right of = 2] {A3};       \node (4) [below right of = 1] {A4};       % True circle       \draw[red, opacity=.3] ($(1)!.5!(3)$) circle (6.5mm);       % connect the dots       \path[->,>=stealth]       (1) edge [bend right=20]  (2)       (2) edge [bend right=20]  (3)       (3) edge [bend right=20]  (4)       (4) edge [bend right=20]  (1);     \end{tikzpicture}     \end{document}      Is it possible to generate the same diagram but without the node 'A1' i.e. I want the same shape but with an empty node the same size as A3 in the space where A1 would be. How can this be done?


title: "in" not in capital letters in bibliography for artices and incollections

text: I'm setting up my bibliography and I have a very small isue. I'm using the `authoryear` bibstyle and it provides a "." after the (year). So automatically, the "in" is written "In:". It very ugly... I'm trying to get rid of that "." to be replace by a "," and have a small "in". Otherwise, I'm also trying to get of the ":" after the in. To have something like: MHONE, Guy (1992). "The political... Malawi", in MHONE, Guy, (éd.). _Malawi at ..._ Here is the MWE:               \documentclass[a4paper,12pt]{book}                    % these is the full list of the packages I use if ever the is conflict...     \usepackage[utf8]{inputenc}     \usepackage{xcolor}     \usepackage[french]{babel} % my french setting     \usepackage{csquotes}     \usepackage[T1]{fontenc}     \usepackage[pdftex]{graphicx}     \usepackage[top=2.5cm, bottom=2.5cm, right=1.5cm, left=1.5cm, headheight = 20pt]{geometry}     \usepackage{pifont}     \usepackage{xspace}     \usepackage{setspace}     \usepackage{mathptmx}     \usepackage{parskip}     \usepackage{titlesec}     \usepackage[titletoc]{appendix}     \usepackage[hidelinks]{hyperref}     \usepackage{tocloft}     \usepackage{calc}     \usepackage{tocbibind}     \usepackage{pdfpages}     \usepackage{emptypage}     \usepackage{bookmark}     \usepackage{quoting}     \quotingsetup{vskip=0em}     \usepackage[font=footnotesize,labelfont=bf]{caption}     \usepackage{microtype}               %************************************************     %                                               *     %       MISE EN PAGE DE LÀ BIBLIOGRAPHIE        *     %                                               *     %************************************************     \usepackage[backend=biber,language=auto,sorting=nyt,bibstyle=authoryear,citestyle=authortitle-icomp]{biblatex}                    %commandes de citation journal & revue     \renewbibmacro*{date}{\printdate}          \DeclareCiteCommand{\citejournal}           {\usebibmacro{prenote}}           {\usebibmacro{citeindex}%             \usebibmacro{journal}             \setunit{\addspace}              \usebibmacro{date}              \setunit{\addspace}                \usebibmacro{title}}           {\multicitedelim}           {\usebibmacro{postnote}}              \DeclareCiteCommand{\footcitejournal}[\mkbibfootnote]           {\usebibmacro{prenote}}           {\usebibmacro{citeindex}%             \usebibmacro{journal}             \setunit{\addspace}              \usebibmacro{date}              \setunit{\addspace}                \usebibmacro{title}}           {\multicitedelim}           {\usebibmacro{postnote}}             \DeclareCiteCommand{\citerevue}           {\usebibmacro{prenote}}           {\usebibmacro{citeindex}%             \usebibmacro{title}             \setunit{\addspace}              \usebibmacro{journal+issuetitle}              \setunit{\addspace}              \usebibmacro{date}}           {\multicitedelim}           {\usebibmacro{postnote}}              \DeclareCiteCommand{\footciterevue}[\mkbibfootnote]           {\usebibmacro{prenote}}           {\usebibmacro{citeindex}%             \usebibmacro{title}             \setunit{\addspace}              \usebibmacro{journal+issuetitle}              \setunit{\addspace}              \usebibmacro{date}}           {\multicitedelim}           {\usebibmacro{postnote}}                                % Put editor string in parentheses     \DeclareFieldFormat{editortype}{\mkbibparens{#1}}          % Obtenir le nom de l'éditeur pour les @incollection entre le 'in' et le titre     \renewbibmacro*{in:}{%       \printtext{\bibstring{in}\intitlepunct}%      \ifentrytype{article}{}{}%      \ifentrytype{incollection}{%       \ifnameundef{bookauthor}         {\ifnameundef{editor}            {\printnames{translator}%             \setunit{\addcomma\space}%             \usebibmacro{translator+othersstrg}%             \clearname{translator}}            {\printnames{editor}%             \setunit{\addcomma\space}%             \usebibmacro{editor+othersstrg}%             \clearname{editor}}}         {\ifnamesequal{author}{bookauthor}            {}            {\printnames{bookauthor}%             \clearname{bookauthor}}}}%            \setunit{\addspace}        \newunit\newblock}          % mettre entre parenthèses le numéro de la revue dans un volume en comportant plusieurs       \renewbibmacro*{volume+number+eid}{%       \printfield{volume}%       \setunit*{\addnbspace}%        \printfield{number}%       \setunit{\addcomma\space}%       \printfield{eid}}     \DeclareFieldFormat[article]{number}{\mkbibparens{#1}}               %new toggle pour sources primaires     \newtoggle{blx@bibdriver@article:journalyear}%new toggle to set which driver is to use     \togglefalse{blx@bibdriver@article:journalyear}          %redefine author-macro so it only prints the year in the default bibdriver     \renewbibmacro*{author}{%also modified       \ifboolexpr{         test \ifuseauthor         and         not test {\ifnameundef{author}}       }         {\usebibmacro{bbx:dashcheck}            {\bibnamedash}            {\usebibmacro{bbx:savehash}%             \printnames{author}%             \iffieldundef{authortype}               {\setunit{\addspace}}               {\setunit{\addcomma\space}}}%          \iffieldundef{authortype}            {}            {\usebibmacro{authorstrg}%             \setunit{\addspace}}}%         {\global\undef\bbx@lasthash          \usebibmacro{labeltitle}%          \setunit*{\addspace}}%       \iftoggle{blx@bibdriver@article:journalyear}{}{%added       \usebibmacro{date+extrayear}}}%modified          %new bibdriver for article in the second bibliography     \newbibmacro*{article:journalyear}{%modified bibdriver for article       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{journal+issuetitle}%       \newunit       \usebibmacro{date}       \newunit       \usebibmacro{title}%       \newunit       \usebibmacro{author/translator+others}%       \newunit       \usebibmacro{note+pages}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \newunit\newblock       \iftoggle{bbx:related}         {\usebibmacro{related:init}%          \usebibmacro{related}}         {}%       \usebibmacro{finentry}}               %redeclare the existing bibdriver for article     \DeclareBibliographyDriver{article}{%from standard.bbx     \iftoggle{blx@bibdriver@article:journalyear}{\usebibmacro{article:journalyear}}{%added       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/translator+others}%       \setunit{\labelnamepunct}\newblock       \usebibmacro{title}%       \newunit       \printlist{language}%       \newunit\newblock       \usebibmacro{byauthor}%       \newunit\newblock       \usebibmacro{bytranslator+others}%       \newunit\newblock       \printfield{version}%       \newunit\newblock       \usebibmacro{in:}%       \usebibmacro{journal+issuetitle}%       \newunit       \usebibmacro{byeditor+others}%       \newunit       \usebibmacro{note+pages}%       \newunit\newblock       \iftoggle{bbx:isbn}         {\printfield{issn}}         {}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \newunit\newblock       \iftoggle{bbx:related}         {\usebibmacro{related:init}%          \usebibmacro{related}}         {}%       \usebibmacro{finentry}}     }                                   \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}                    @incollection{mhone_crossroads_1992,          title = {The Political Economy of Malawi - An Overview},          chapter = {1},          author = {Guy Mhone},          year = {1992},          booktitle = {Malawi At The Crossroads. The Post-Colonial Political Economy},          editor = {Guy Mone},          publisher = {\textsc{SAPES} Books},          address = {Harare},          pages = {1--34},          keywords = {malawi_histoire},     },                    \end{filecontents}          \bibliography{\jobname}          \begin{document}               \nocite{*}               \printbibliography[keyword=malawi_histoire,heading=subbibliography,title={Malawi: histoire sociale}]          \end{document}


title: List of TikZ Editor

text: After mentioning `TikZ` in academia, I tried to have a look here for recommended editors for `TikZ`. I found no list, and thus here's the question: **What`TikZ` editors/front-ends do you know? What can you recommend?** I guess that what I have in mind is a tool where the image can be edited using an interface similar to inkscape, and then it will generate a code snippet in `TikZ`. For example I know of geogebra, but I'm interested in a big list. I am aware of the list available here, as pointed by one of the answers to this question, but I'm interested in some evaluation of each based on personal experience. I suggest that each tool should has its own answer, this way this will become sort of a poll as well. Probably, each answer should contain at least: pros/cons/platform...


title: How to change table row heights and center their contents?

text: How can I decrease(or increase) the row height of a specific row in a table and center its content both horizontally and vertically? A related answer discusses how to decrease the height of a row, but how can I center the text in that table cell? I am using `dcolumn` as a column type therefore cannot use any other columns type which does the centering.               \usepackage{dcolumn}     \newcolumntype{L}{D{.}{.}{1.1}}          \renewcommand{\arraystretch}{2}     \begin{table}     \centering     \begin{tabular}{|c|c|L|}     \hline     a & b & 1.1\\ [-5pt]     \hline     d & e & 2.2 \\ [1pt]     \hline     g & h & 3.3 \\ [6pt]     \hline     \end{tabular}     \end{table}      I want an output similar to this: ![enter image description here](http://i.stack.imgur.com/Pnao3.png)


title: How to find the length of a PGF array?

text: A few of my macros currently require the user to pass the length of an array along with the array itself. It would be nice if the length could be calculated for them, as the user in question (myself) seems incapable of consistently counting beyond 3. I've checked the pgfmanual's chapters 56 (for loops, where most of this is getting used) and 63 (mathematical functions where arrays are defined). In some sense, this is just counting commas (which I don't know how to do), but PGF has a few exceptions in arrays with () and {} allowing entries to have commas within them. Can someone write a reasonable pgf math function that takes an array as its only argument and returns the length of that array as its result?


title: How to achieve correct spacing for arithmetic/geometric sequences?

text: I want to typeset some sequences/progressions. I'm trying (in math mode):               x_1 = 2.3, x_{n+1} = x_n - 0.7 (n = 1, 2, 3, \ldots)      but the spacing is much too tight when this is typeset. For example LaTeX interprets the term showing the progression of n as a coefficient of -0.7. I understand why this is happening but don't know how to stop it. What is the correct way to typeset sequences/progressions in LaTeX?


title: Why can't LaTeX smartly match the double quote?

text: In many word processors, when you type `"` twice, it will give you a left and right double quotation marks in sequence, they are smartly matched. Why does latex end up with using,               ``Blahblahblah...''      to do double quotings? Question: Any philosophy behind this design? A side complaint: This is very annoying when you try to copy a text file with a lot of `"` double quote marks. And you cannot just simply replace them all, you have to do it manually!!!


title: Creating an index with sub-sub-subentries

text: For my PhD thesis I need to make a list of works quoted. I thought that using the LaTeX index would be a good idea. But unfortunately I cannot have more than 3 levels in the index. BTW I am using the `memoir` class and `xelatex`. An example of an index could be:               Christian Writings       Origen         Homilies on Joshua           1.1, 5           2.2, 6         Homilies on Numbers           1.1, 7       New Testament         Matthew           1.1, 8         John           2.2, 9       Shepherd of Hermas         1.1, 8     Jewish Writings       Old Testament         Genesis           1.1, 11      I had to type it in code mode to help see the structure. Here is a minimal example:               \documentclass[12pt]{memoir}     \makeindex          \begin{document}          Lorem ipsum     \index{Christian Writings!Origen!Homilies!1.1}     \index{Christian Writings!New Testament!Matthew!1.1}     \index{Christian Writings!Shepherd of Hermas!1.1}          \printindex     \end{document}        This only outputs the third index entry (as the other two have too many '!'s). Can anyone help?


title: How can I indent a block of text for a specified amount?

text: > **Possible Duplicate:**   >  Indenting a whole paragraph   >  Write text with some fixed amount of space from the margin I would like to indent a paragraph or two for a specific amount. The `quote` environment is not suitable, since indentation width is not configurable. An article suggested using `{\addtolength{\leftskip}{5mm} text}`, but that doesn't work for me. Another article suggested a very hacky way, which involved temporarily modifying global margins. Is there a clean solution for this?


title: Write text with some fixed amount of space from the margin

text: How would I write the following in LaTeX:               _Abstract_       XXXX This is the       XXXX abstract.          _Keywords_       XXXX keyword1, keyword1        In the above the letter `X` stands for space.


title: What is the template for this slide?

text: I was wondering what it is the template for this slide? I guess it is written with `beamer`, but don't know how the slides are so fancy. So is there some tutorial on writing this particular slides among others?


title: Create "bracket free" macros (like in mimeTeX)

text: In mimeTeX, an abundance of macros like `\cd` = `\cdot`, `\fr` = `\frac` and `\sq` = `\sqrt` are allowed. This kind of macros are easily created in own LaTeX documentens, using `\newcommand`. Other mimeTeX macros are so to speak "bracket free"; for instance, `\te hallo` is possible to use instead of `\text{hello}`. My question is, whether this kind of macros too are possible to imitate in LaTeX, and, if so, how that is done.


title: Big number of the chapter

text: I'm writing my master thesis and I would like to change the number of every chapter with one bigger: I tried to use the package "classicthesis" and it does what I want, but I would change the style (font) of the number, because it's horrible for me. So I would know how can change this font or (it's better) how I can change the chapter number with one bigger than the default in order to use it in every document class (if it's possible). You can see my code below:               \documentclass[headinclude,footinclude,openany,paper=a4,fontsize=12pt]{scrbook}     \usepackage[eulerchapternumbers,pdfspacing]{classicthesis}     \usepackage{arsclassica}     \usepackage{tikz}     \usepackage{changepage}     \usepackage{times}      Thanks in advance!


title: Inputenc problem in Beamer

text: I need to use Spanish accents in beamer but I get errors when I use it               \documentclass{beamer}     \usepackage{amsmath, amsthm, amscd, amssymb, amsfonts, amsxtra}     \usepackage[spanish]{babel}     \usepackage[latin1]{inputenc}               \usetheme{Darmstadt}          \title[The Title]{ Códigos}     %\subtitle[The Subtitle]{The Subtitle \\ Based on A Really Important Paper \\ by Some Other Author}     \author[The Author]{}     \institute{UNC - Famaf \\ Córdoba}               \begin{document}               \section{Introducción}     \begin{frame}      \titlepage     \end{frame}     \end{document}      The accent doesn´t appear or I get errors in compilation, can anyone help me? I always use the `inputenc` package in other document classes and I have no problem.


title: Font Size Conversion

text: I am writing a document that is supposed to be typeset in Time New Roman or _equivalent_. The problem I have is that 12pt in font A is not the same as 12pt in font B. So is there a conversion table of some sort? Or can I calculate the ratio myself?? Specifically I would like to know the ratios for Adobe Caslon Pro and Warnock Pro. PS: I am using XeLaTeX with fontspec.


title: problem with surfaces on tkz-fct

text: i am using this wonderful tool that tkz-fct is for creating nice documents but I have a weird result from recently. This is my document :               \documentclass[10pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{calc}     \usepackage{color}     \usepackage{pifont}                     %pour utiliser la police Ding     \usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=2cm]{geometry} %marges du document     \usepackage[french]{babel}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage[L]{thmbox}     \usepackage{eurosym}     \usepackage{enumitem}               %pour modifer itemize et enumerate     \usepackage{amsmath,amsfonts,amssymb}     \usepackage{mathrsfs}               %pour utiliser mathscr     \usepackage{array,multirow,makecell}     \usepackage{fancyhdr}               %package pour modifier les en-têtes     \usepackage{fancybox}               %pour boîtes spéciales     \usepackage{tikz,tkz-tab,tkz-fct}     \usepackage{tikz-dependency}        %permet de créer des schemas     \usepackage{sectsty}                %permet de modifier les styles des sections (voir \sectionfont l.21)     \usepackage{fourier-orns}     \usepackage{shadethm}               %pour theoremes en gris     \setcellgapes{1pt}     \makegapedcells     \newcolumntype{R}[1]{>{\raggedleft\arraybackslash }b{#1}}   %pour redéfinir les colonnes dans tabular     \newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}     \newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}     \renewcommand{\thesection}{\Roman{section}} %permet de changer la numérotation en chiffres romains des sections     \newshadetheorem{defi}{Définition}  %crée un nouveau type de théorème     \newshadetheorem{thm}{Théorème}     \newshadetheorem{ppte}{Propriété}     \sectionfont{\sectionrule{3ex}{3pt}{-1.5ex}{1pt}} %mettre un trait de séparation dans les sections (package sectsty)     \pagestyle{fancy} %style en-têtes     \lhead{} %en-tête gauche     \chead{Lois à densité} %en-tête centrale     \rhead{T\up{ale}} %en-tête droite     \begin{document}     \begin{tikzpicture}          \tkzInit[xmin=-4,xmax=4,ymax=1]          \tkzDrawX[label={},noticks]          %\tkzDrawY          \tkzFct[domain=-2:2]{exp(-x**2)}          \tkzDrawArea[color=blue, domain = -0.5:1]          \tkzText(-1,0.75){$\mathscr{C}_{f}$}     \end{tikzpicture}     \end{document}      But from now, it doesn't produce the result I would like as the surface start from the point (-0.5,f(-0.5)) and not as an integral from -0.5 to 1. This is a picture of the result : ![result](http://i.stack.imgur.com/Ok4D1.png) Which is obviously not what I would like and this extends now to all my "old" docs which were "normal" before. I don't think I have done anything special except updating my Tex distribution ... If someone has an idea ??


title: How can I reference a page in another pdf, which I have no control over?

text: I want to reference a specific page in another pdf document. There is also a bookmark on that page, which I could use. However, I have no control over the other document, and maybe it wasn't even created with Tex. Is there a way to extract labels from the file that I could use with `\hyperref` or `xr`, or which other packages or commands could I use?


title: Complicated footnote within longtable environment

text: I have a footnote that explains color coding within a complicated longtable. I would like this footnote to appear on all pages of the longtable. However, the way I have it now, the footnote itself is within a longtable of its own. Is there any other way I can typeset this footnote and have it appear on all pages of the longtable? Any ideas would be most welcome. Please see code and snapshot below for a minimum working example for what I have right now:               \documentclass[6pt]{article}     \usepackage[portrait, total={5.45in, 8.5in}, top=1.25in, bottom=1.25in, right=1.25in, left=1.5in, centering]{geometry}     \usepackage{longtable}     \usepackage{bm}     \usepackage[table]{xcolor}     \usepackage[none]{hyphenat}     \usepackage[T1]{fontenc}     \usepackage[default]{cantarell}     \usepackage{booktabs}     \usepackage{array}     \definecolor{tableShade2}{HTML}{F1F5FA}     \definecolor{tableShade}{HTML}{FAFAFD}     \definecolor{tableShade3}{HTML}{dddddd}     \definecolor{tableShade4}{HTML}{C2A5CF}     \definecolor{tableShade5}{HTML}{E7D4E8}     \definecolor{tableShade6}{HTML}{A1D99B}     \definecolor{tableShade7}{HTML}{D9F0D3}     \definecolor{tableShade1}{HTML}{FFEDA0}          \pagestyle{empty}     \renewcommand{\familydefault}{\sfdefault}     \renewcommand{\arraystretch}{1.25}     \usepackage{arydshln}     \newcolumntype{x}[1]{>{\raggedright}p{#1}}     \arrayrulecolor{tableShade3}     \setlength{\tabcolsep}{4pt}     \begin{document}          \begin{center}     \scriptsize{\textbf{A longtable with two groups}}\end{center}     \setlength\LTleft{0in}     \setlength\LTright{1.25in}     \setlength\LTpre{-0.3cm}     \setlength\LTpost{0in}     \rowcolors{1}{tableShade2}{white}\scriptsize     \newcommand{\CTPanel}[1]{%     \multicolumn{1}{>{\columncolor{white}}r|}{#1}}     \centering     \begin{longtable}{lp{0.3cm}!{\color{tableShade3}\vrule}                    p{0.3cm}!{\color{tableShade3}\vrule}                    p{0.3cm}!{\color{tableShade3}\vrule}                    p{0.3cm}!{\color{tableShade3}\vrule}                    p{0.3cm}!{\color{tableShade3}\vrule}                    p{0.3cm}!{\color{tableShade3}\vrule}                    p{0.3cm}!{\color{tableShade3}\vrule}                    p{0.3cm}!{\color{tableShade3}\vrule}                    p{0.3cm}!{\color{white}\vrule width 4pt}                    p{0.3cm}!{\color{white}\vrule}                    p{0.3cm}!{\color{white}\vrule}                    p{0.3cm}!{\color{white}\vrule}                    p{0.3cm}!{\color{white}\vrule}                    p{0.3cm}!{\color{white}\vrule}                    p{0.3cm}!{\color{white}\vrule}                    p{0.3cm}!{\color{white}\vrule}                    p{0.3cm}!{\color{white}\vrule}                    p{0.3cm}!{\color{white}\vrule}}     \hiderowcolors     &\multicolumn{9}{c}{First Group}&\multicolumn{9}{c}{Second Group}\\\cmidrule(lr){2-10}\cmidrule(lr){11-19}     something&\multicolumn{2}{c}{AB} & \multicolumn{3}{c}{ABCD} &                              \multicolumn{4}{c}{ABCD EFGH}&\multicolumn{2}{c}{AB} & \multicolumn{3}{c}{ABCD} & \multicolumn{4}{c}{ABCD EFGH}\\\cmidrule(lr){2-3}\cmidrule(lr){4-6}\cmidrule(lr){7-10}\cmidrule(lr){11-12}\cmidrule(lr){13-15}\cmidrule(lr){16-19}     Characteristics & + & - & I & II & III & $L^{A}$ & $L^{B}$ & $H^{+}$ & TN & + & - & I & II & III & $L^{A}$ & $L^{B}$ & $H^{+}$ & TN\\     \specialrule{0.01em}{0.1em}{0em}     \endhead     \specialrule{0.01em}{0em}{0em}     \endfoot     \multicolumn{5}{l}{\textbf{The first subheading}}\\     \showrowcolors     some variable &+&+&-&+&+&-&-&-&-&-&+&+&-&-&+&+&-&-\\     some other variable &+&+&-&+&+&-&-&-&-&-&+&+&-&-&+&+&-&-\\     some other variable &+&+&-&+&+&-&-&-&-&-&+&+&-&-&+&+&-&-\\     fourth variable &+&+&-&+&+&-&-&-&-&-&+&+&-&-&+&+&-&-\\     fifth variable &+&+&-&+&+&-&-&-&-&-&+&+&-&-&+&+&-&-\\     yet other variable &+&+&-&+&+&-&-&-&-&-&+&+&-&-&+&+&-&-\\     \end{longtable}     \scriptsize     %Complicated legend begins     \begin{longtable}{llllll}     \addlinespace[1.6em]     \hiderowcolors     \multicolumn{6}{l}{\textbf{LEGEND}}\\     {\cellcolor{tableShade4}${\bm+^m}$}&: Monotonic Increase, Significant&     {\cellcolor{tableShade6}${\bm-^m}$}&: Monotonic Decrease, Significant&     {\cellcolor{tableShade1}${\bm*}$}&: Non-linear, Significant \\          {\cellcolor{tableShade4}${\bm+}$}&: Increase, Significant&     {\cellcolor{tableShade6}${\bm-}$}&: Decrease, Significant&     {\cellcolor{tableShade1}${\bm\pm}$}&: Mixed, Significant\\          {\cellcolor{tableShade5}$+^m$}&: Monotonic Increase&     {\cellcolor{tableShade7}$-^m$}&: Monotonic Decrease&     {\cellcolor{tableShade2}$\pm$}&: Mixed\\          {\cellcolor{tableShade5}$+$}&: Increase&     {\cellcolor{tableShade7}$-$}&: Decrease&     -&: Not computed\\     \addlinespace[1em]     \multicolumn{6}{l}{AB: ABbreviation}\\     \end{longtable}     \end{document}      ![MWE of longtable with complicated legend](http://i.stack.imgur.com/aGttF.png) Final solution from D.Carlisle's accepted answer and comments below.               \endhead      %Complicated legend begins at the top of longtable in the \endfoot area     \noalign{\raggedright     \scriptsize     {     \begin{tabular}{llllll}     \hiderowcolors     \multicolumn{6}{l}{\textbf{LEGEND}}\\     {\cellcolor{tableShade4}${\bm+^m}$}&: Monotonic Increase, Significant&     {\cellcolor{tableShade6}${\bm-^m}$}&: Monotonic Decrease, Significant&     {\cellcolor{tableShade1}${\bm*}$}&: Non-linear, Significant \\          {\cellcolor{tableShade4}${\bm+}$}&: Increase, Significant&     {\cellcolor{tableShade6}${\bm-}$}&: Decrease, Significant&     {\cellcolor{tableShade1}${\bm\pm}$}&: Mixed, Significant\\          {\cellcolor{tableShade5}$+^m$}&: Monotonic Increase&     {\cellcolor{tableShade7}$-^m$}&: Monotonic Decrease&     {\cellcolor{tableShade2}$\pm$}&: Mixed\\          {\cellcolor{tableShade5}$+$}&: Increase&     {\cellcolor{tableShade7}$-$}&: Decrease&     -&: Not computed\\     \addlinespace[1em]     \multicolumn{6}{l}{AB: ABbreviation}\\     \end{tabular}     }     \endfoot      It works and the legend is now flush left with the table! An addition to this problem is when you do not specify the LTleft and LTright lengths in your longtable preamble. In this case, the `\noalign` trick above does not work. Here's the solution, all thanks to David Carlisle's incredibly useful comments in TeX, LaTeX and Friends chat: Try:               \multicolumn{8}{@{}p {6in}}     {\raggedright     \begin{tabular}{llllll}     \hiderowcolors     \addlinespace[2pt]     \multicolumn{6}{@{}l}{Variables with as asterisk(*) have corresponding continuous forms. Please also see Table x.x for summary from the analyses using these continuous forms.}\\     \multicolumn{6}{@{}l}{\textbf{LEGEND}}\\     {\cellcolor{tableShade4}${\bm+^m}$}&: Monotonic Increase, Significant&     {\cellcolor{tableShade6}${\bm-^m}$}&: Monotonic Decrease, Significant&     {\cellcolor{tableShade1}${\bm*}$}&: Non-linear, Significant \\          {\cellcolor{tableShade4}${\bm+}$}&: Increase, Significant&     {\cellcolor{tableShade6}${\bm-}$}&: Decrease, Significant&     {\cellcolor{tableShade1}${\bm\pm}$}&: Mixed, Significant\\          {\cellcolor{tableShade5}$+^m$}&: Monotonic Increase&     {\cellcolor{tableShade7}$-^m$}&: Monotonic Decrease&     {\cellcolor{tableShade2}$\pm$}&: Mixed\\          {\cellcolor{tableShade5}$+$}&: Increase&     {\cellcolor{tableShade7}$-$}&: Decrease&     -&: Not computed\\     \end{tabular}     }      Notice how @{} in the multicolumn specification removes the space before the content starts in a cell. So it forces the legend to start at the wall of the longtable and ensures that the small tabular also does not introduce any extra space on the left.The legend now appears flush left with wherever the table edge might be. Many thanks!


title: getting titlesec package to respect title font, etc in style file

text: I am using a `.sty` file submitted by a journal which puts the section headers in capitals format. However, when i use the following               \usepackage[compact]{titlesec}     \titlespacing{\section}{0pt}{*1}{*1}     \titlespacing{\subsection}{0pt}{*1}{*1}     \titlespacing{\subsubsection}{0pt}{*1}{*1}     \titlespacing{\paragraph}{0pt}{*1}{*1}     \titlespacing{\subparagraph}{0pt}{*1}{*1}      this formatting is replaced by a format of first letter in capitals, the rest in small lettering. Is there a way to get `\titlesec` to respect the fonts, lettering, etc of the style file? Sorry if this question is not very clear. I am happy to clarify further.


title: Symbol for Gtalk or Skype to add in resume contact

text: Is there a way to add any symbol for gtalk or skype next to my ID name?. We have symbols for phone, mail etc. Anything similar for this ? UPDATE: SOLUTION : FONTAWESOME package gives all the social linked symbols. Thanks.


title: Columns within columns

text: I'm making a formula sheet for an exam. I want to have two columns and in the left column for example I want to add a box of text to the right of the formula for clarification. Here is what I have:               \fbox{\begin{minipage}{250pt}     \textbf{Chapter 25: Capacitance}\\     $U=\frac{q^2}{2C}=\frac{1}{2}CV^2$ (Electric Potential Energy of a charged capacitor)\\     \end{minipage}}      This is the first column of two. I would like the text in paranthesis (Electric potential energy...) to be a column next to the equation, because right now it is wrapping around and starting a new line below the equation which gets very messy. Thank you


title: math conditionals using (if - else - fi) command

text: I saw these command when i searching sth. I wonder if we can increase numbers **if** conditions. it's like **if{0} = a** , **if{1}=b** , **if{2}=c** , **if{3}=d** etc.               \newcommand{mycommand}[1]{     \if{#1 != 0}     Some text, because it's nonzero     \else     Some other text, because it's zero     \fi     }          \mycommand{0}     \mycommand{1}


title: Referring to specific list item with hyperref

text: using the following code, when I click on references (having red boxes), they do not refer to proper places.               \documentclass{article}     \usepackage{array,longtable}     \usepackage{hyperref}          \begin{document}          \renewcommand\theenumii{\alph{enumii}}     \makeatletter     \def\subitem{\omit\@arstrut      \ifnum\value{enumii}=0 \stepcounter{enumi}\fi     \refstepcounter{enumii}\theenumi\theenumii\hfill}     \def\item{\omit\setcounter{enumii}{0}\let\omit\relax}     \makeatother          \begin{longtable}{>{\refstepcounter{enumi}\setcounter{enumii}{0}\theenumi}lr}     \item     \subitem \label{1a}& fooo \\     \subitem \label{1b}& foo \\     \item     \subitem \label{2a}& foo \\     \subitem \label{2b}& foo \\     \label{3}& foo  \\     \label{4}& foooo \\     \end{longtable}          we have \ref{1a}, \ref{2b}, \ref{4}          \end{document}


title: How NOT to display the number of pages for preprints from arXiv via biblatex

text: I use the `ieee-alphabteic` style for `biblatex` and since I have a lot of drafts from arXiv, they are treated as the published articles. For some, the field               pages={...},      is present, for some it is not. How can I get `biblatex` to skip the page field for arXiv preprints only ? [since I get the .bib from Mendeley, I could select all the papers from arXiv and delete the page field, but let's say I wish for a method on the `biblatex` side] A typical arXiv entry in my `.bib` is               @article{Ashtekar1997,     archivePrefix = {arXiv},     arxivId = {arXiv:gr-qc/9706069v1},     author = {Ashtekar, A and Schilling, T},     eprint = {9706069v1},     pages = {1--41},     primaryClass = {arXiv:gr-qc},     title = {{Geometrical Formulation of Quantum Mechanics}},     year = {1997}     }


title: Beginner template

text: I just downloaded TexWorks using MikTex. I am trying to write my math homework in Latex form but I am having difficulty getting the correct template. My template looks like this:               \title{}     \date{\today}          \documentclass[12pt]{article}          \begin{document}     \maketitle               \section{}               \end{document}      How can I insert my questions in LaTex form? For example, right after the date I want to have "{question 1(in bold)} ... {answer to question 1} ... {question 2(in bold)} ... {answer to question 2}" so on and so forth to the very last question?


title: Semantic TeX - where are we heading?

text: (Update: I learned that this kind of open question is not supposed to be asked here at tex.stackexchange.com, so I will refrain from furthering the discussion here and invite contributions instead via the link provided in the next line.) Overheard today: > I believe what is likely to happen is that some alternative language will be > developed which is syntactically similar to TeX (since this will make it > easier for mathematicians and physicists to transition to it) with less > focus on typesetting but far richer semantically, allowing a smoother > transition to MathML. A brief Google search revealed that a number of initiatives have been started along these lines, e.g.:   * SALT (Semantically Annotated LaTeX)   * Hermes   * STeX   * SnuggleTeX My question, now, is how to get an overview what the comparative strengths and weaknesses of these (and other) approaches are, what communities and applications drive them, and what else to consider. I would be surprised if there were a simple answer to any of these, so I expect to split this thread up into simpler ones as the discussion develops.


title: LyX user interface; adding toolbar icon for unformatted tex

text: I am a heavy user of LyX 2.0 and I want to to add useful shortcuts to help me in my work. I tend to copy and paste a lot of text from PDFs or the web or even some old work written in MS Word. A shortcut for pasting unformatted text would be useful in this case. I tried to create a toolbar icon in a similar way to the example below in my custom `toolbar.inc`.               Item "Bold" "font-bold"      I wonder if there is something similar to the above command to that of the unformatted text.


title: Multiple Multi columns with pgfplotstable

text: I've already seen these two questions: Create a contingency table using pgfplotstable and Dec sep align & \multicolumn incompatibility? and I'm still not able to do what I want. I rarely use `tex`, and sometimes I need to do tables/figures and I'm not used to it. I have 14 columns (for now, I'll try to reduce) and I want to group them with multicolums. The first two columns aren't supposed to be grouped, then all the remaining 12 should be grouped by pairs, so column 3 and 4 should form a multicolumn, 5 and 6, and so on. And each of these pairs, the columns should be named, the first has a name like "time avg" and the second "quality avg". How do I set where the multicolumn starts or which columns it should group? I can only see a column number parameter, but it never gets specified which columns the multi will group. The dumb code I have for now is:               \documentclass{standalone}     \usepackage{pgfplotstable}     \usepackage{pgfplots}     \usepackage{booktabs}     \usepackage[paperwidth=50cm,paperheight=\maxdimen]{geometry}     \usepackage{tikz}          \begin{document}                    \pgfplotstabletypeset[      every head row/.style={%       before row={\toprule          & \multicolumn{2}{c}{Data} \\                 & \multicolumn{2}{c}{32-2 LS} \\         & \multicolumn{2}{c}{128-4 LS} \\         & \multicolumn{2}{c}{256-8 LS} \\         & \multicolumn{2}{c}{32-4} \\         & \multicolumn{2}{c}{128-4} \\         & \multicolumn{2}{c}{256-8}},         after row=\midrule},       every last row/.style={after row=\bottomrule},       string type,     ]     {     %sample data     bur26a 26 94.6513 0.9995 145.6622 0.9999 202.7375 1.0000 1.4381 0.9707 2.0208 0.9770 2.9439 0.9786     chr25a 25 84.5684 0.8296 131.5305 0.8881 183.0491 0.9012 1.4192 0.3110 1.9670 0.3369 2.8968 0.3530     }          \end{document}      Needless to say it doesn't even get close to what I want. I even tried to pair the first two columns with a multicolumn with no success. **edit:** after reading (more like trying over and over) some more I kind of got what I want, hacking with "&"'s, but the table needs some improvement, like making the second row columns have the same name.               \documentclass{article}          \usepackage[paperwidth=25cm]{geometry}     \usepackage{booktabs}     \usepackage{pgfplotstable}          \begin{document}          \noindent\pgfplotstabletypeset[      every head row/.style={      before row={\toprule       &        &\multicolumn{2}{c}{32-2 LS}        &\multicolumn{2}{c}{128-4 LS}        &\multicolumn{2}{c}{256-8 LS}        &\multicolumn{2}{c}{32-4}        &\multicolumn{2}{c}{128-4}        &\multicolumn{2}{c}{256-8}        &},     },     every last row/.style={after row=\bottomrule},     string type,     ]     {     Inst n qavg tavg qavg2 tavg2 qavg3 tavg3 qavg4 tavg4 qavg5 tavg5 qavg6 tavg6     bur26a   26 94.6513 0.9995 145.6622 0.9999 202.7375 1.0000 1.4381 0.9707 2.0208 0.9770         2.9439 0.9786     chr25a   25 84.5684 0.8296 131.5305 0.8881 183.0491 0.9012 1.4192 0.3110 1.9670 0.3369     2.8968 0.3530     }          \end{document}      Gives me this: ![http://i.imgur.com/9e5lu.png](http://i.stack.imgur.com/WexkN.png)


title: Error using \lrtimes

text: I am trying to use a symbol mapped by the tag `\lrtimes` in Math mode, but I am getting error. Here is what I am doing.               \begin{align*}     Sys_1 \stackrel{\text{\tiny def}}{=} (Appl \parallel Appl) \lrtimes  WS     \end{align*}      The `\stackrel{\text{\tiny def}}{=}` is a latex code for 'is defined as' operator which works fine in my other formulas. The log message(from texmaker) reads as below: > ! Undefined control sequence. ...}{=} (Appl \parallel Appl) \lrtimes WS l.69 > \end{align*} The control sequence at the end of the top line of your error > message was never \def'ed. What is wrong in this case?


title: How do I instruct \fullcite to use maxbibnames rather than maxcitenames?

text: For my PhD thesis, I am including a _List of appended papers_ automagically. To generate the references, I used to use `\bibentry`, but now I switched to biblatex and headed for `\fullcite` hoping it to be an equivalent. Alas, `\fullcite` uses `maxcitenames` to decide the number of authors; I'd like it to use `maxbibnames` so that the number of authors printed is like it is in the bibliogaphy.               \documentclass{article}     \usepackage[maxbibnames=99,maxcitenames=1]{biblatex}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @misc{A01,       author = {Author, A. and Buthor, B. and Cuthor, C. and Duthor, D.},       year = {2001},       title = {Alpha},     }     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     This is by \textcite{A01}, or, more completely:     \fullcite{A01}.          \printbibliography     \end{document}      The desired effect: `This is by Author et al. [1], or, more completely, A. Author, B. Buthor, C. Cuthor, and D. Duthor, Alpha, 2001` The actual effect: ![resulting document](http://i.stack.imgur.com/d3Dt8.png) How do I get a full citation with all authors (or `maxbibnames` no. of authors) with `\fullcite` or a similar command in `biblatex`? If I change `maxcitenames`, then `Author et al. [1]` will also be affected, and this is not desired. All my `\fullcite` occurences are concentrated in one part of the document that uses no other citation commands, so a solution temporarily changing `maxcitenames` would be acceptable for me.


title: Splitting a huge `.tex` file to chapter files on TeX/LaTeX level

text: Inspired by (although a possible duplicate) Outputting each chapter of a LaTeX document to a separate PDF, I wonder whether there is a possibility to extract the chapter (or whatever sectioning level) content to separate `*.tex` files if the `.tex` source file is **not** already 'splitted' and uses `\include` statements?               \documentclass{scrbook}          \begin{document}     \chapter{My first sophisticated chapter}     Some content...          \chapter{My second, even more sophisticated chapter}     Other content....          \end{document}      This means, that everything between (but including the `\chapter{...}` line!) should be captured and written to separate file, say `\jobname_chapter\number\value{chapter}.tex` such that `\jobname_chapter1.tex` contains               \chapter{My first sophisticated chapter}     Some content...      and `\jobname_chapter2.tex` contains               \chapter{My second, even more sophisticated chapter}      Other content....      Most probably, one way is to redefine the corresponding sectioning command to redirect the output not to be directly processed by `TeX/LaTeX`. I think, this could be 'extended' to other grouping commands, if it is possible at all. > For the sake of simplicity: No one should care about that those 'standalone' > chapter files are not compilable at all. > > I also do not care about performance of such an approach **Edit** If the `\chapter` command would be such that `\chapter{title}{Chapter content...}`, this would be 'easy', just catch the 2nd argument of the command and write it (after `\unexpand\expandafter` commands) to a file via `\immediate\write`. However, `\chapter` has another syntax ;-)


title: Pgfplots and beamer: how to fill the area under a curve with oblique lines (hatching) as a pattern?

text: This is a follow up question to Jake's solution  to that post. Although I got Jake's solution there work in LaTeX document perfectly fine, I could not get it work in `beamer`. Here's Jake's code but using `beamer`:               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{patterns}     \usepackage{pgfplots}          \begin{document}          \begin{frame}         \begin{tikzpicture}         \tikzset{             hatch distance/.store in=\hatchdistance,             hatch distance=10pt,             hatch thickness/.store in=\hatchthickness,             hatch thickness=2pt         }              \makeatletter         \pgfdeclarepatternformonly[\hatchdistance,\hatchthickness]{flexible hatch}         {\pgfqpoint{0pt}{0pt}}         {\pgfqpoint{\hatchdistance}{\hatchdistance}}         {\pgfpoint{\hatchdistance-1pt}{\hatchdistance-1pt}}%         {             \pgfsetcolor{\tikz@pattern@color}             \pgfsetlinewidth{\hatchthickness}             \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}             \pgfpathlineto{\pgfqpoint{\hatchdistance}{\hatchdistance}}             \pgfusepath{stroke}         }              \begin{axis}[             xmin=-4,xmax=4,             xlabel={z},             ymin=0,ymax=1,             axis on top,             legend style={legend cell align=right,legend plot pos=right}]          \addplot[color=red,domain=-4:4,samples=100] {1/sqrt(2*pi)*exp(-x^2/2)};         \addlegendentry{z}         \addplot+[mark=none,             domain=0:1,             samples=100,             pattern=flexible hatch,             area legend,             pattern color=red]{1/sqrt(2*pi)*exp(-x^2/2)} \closedcycle;         \addlegendentry{Interval 1}         \addplot+[mark=none,             domain=-2:-0.5,             samples=100,             pattern=flexible hatch,             hatch distance=5pt,             hatch thickness=0.5pt,             draw=blue,             pattern color=cyan,             area legend]{1/sqrt(2*pi)*exp(-x^2/2)} \closedcycle;                 \addlegendentry{Interval 2}         \end{axis}     \end{tikzpicture}     \end{frame}     \end{document}      It seems the system never finish compiling. I not sure whether it is just my system or it is a more general problem? Meanwhile, Marco's solution there does work in `beamer`.


title: Pandoc: Markdown to PDF, without cutting off code block lines that are too long

text: I'm trying to convert a Markdown file into a PDF file using Pandoc. I have a lot of code blocks in my Markdown. And if I have a line of code that is too long, it will just be cut off in the PDF. How can I make Pandoc to warp lines that are too long? Here's the line I'm using right now:               pandoc input.md --highlight-style tango -o output.pdf;


title: Improving typewriter animation

text: How can I improve the code for this animation so that I can write more words? I wanted a smarter code.               \documentclass{article}     \usepackage{tikz}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{0pt}%          \begin{document}     \foreach \t in {         L,         La,         LaT,         LaTe,         LaTeX         }{         \begin{tikzpicture}[scale=1]             \clip[fill=white] (0,-1) rectangle (6,1);             \node[right] at (1,0) {\Huge \t};         \end{tikzpicture}     }     \end{document}      ![enter image description here](http://i.stack.imgur.com/Ashps.gif)


title: Set default output format in layout in Lyx

text: I am writing a layout for a class file. The corresponding class file specifies several \RequirePackage calls with the [dvips] option, and hence trying to compile the document using pdflatex or any of the other pdf renderers fails. Unfortunately, pdf output is the default in Lyx. Is there a way to set the default output format to dvi in the layout file?


title: LaTeX Coding for Statement of Purpose

text: I need a LaTeX sample for statement of purpose. I found a sample statement of purpose file through Internet. It seems OK but not functioning on my Windows PC as it uses XeLaTeX files. Now I am looking for a little bit different file. I created this using Microsoft Office. I don't know where I need to make changes to get the exactly similar look like the Microsoft Office one. Are there any suggestions?


title: Combining threeparttable with cross references - LyX

text: I was wondering if there was a known issue with combining `threeparttable` with cross references inside a float. I have my labels inside the table captions, and this works just fine unless `threeparttable` is called, in which case the references are `??` once it's compiled. Any suggestions would be appreciated. ETA: Thank you scottkosty, of course I should add more detail. Here is a screenshot of one of the tables in LyX, with the threeparttable command: ![enter image description here](http://i.stack.imgur.com/fP5Uv.png) And here is the exported tex for that table, including the preamble:               %% LyX 2.0.6 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[12pt,british,american,english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{color}     \usepackage{babel}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{setspace}     \onehalfspacing     \usepackage[unicode=true,pdfusetitle,      bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,      breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=true]      {hyperref}     \usepackage{breakurl}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}     %% A simple dot to overcome graphicx limitations     \newcommand{\lyxdot}{.}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.          \usepackage{amsfonts}     \usepackage{chicago}     \usepackage{pdflscape}     \usepackage{appendix}     \usepackage{hyperref}     \usepackage[letterpaper,top=1in,right=1in,left=1in,bottom=1in]{geometry}     \usepackage[bottom]{footmisc}     %\usepackage{fancyhdr}     \usepackage{bibentry}     \usepackage{threeparttable}     \usepackage{dcolumn}     \usepackage{booktabs}          \setcounter{MaxMatrixCols}{10}          \newtheorem{theorem}{Theorem}     \newtheorem{acknowledgement}[theorem]{Acknowledgement}     \newtheorem{algorithm}[theorem]{Algorithm}     \newtheorem{axiom}[theorem]{Axiom}     \newtheorem{case}[theorem]{Case}     \newtheorem{claim}[theorem]{Claim}     \newtheorem{conclusion}[theorem]{Conclusion}     \newtheorem{condition}[theorem]{Condition}     \newtheorem{conjecture}[theorem]{Conjecture}     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{criterion}[theorem]{Criterion}     \newtheorem{definition}[theorem]{Definition}     \newtheorem{example}[theorem]{Example}     \newtheorem{exercise}[theorem]{Exercise}     \newtheorem{lemma}{Lemma}     \newtheorem{notation}[theorem]{Notation}     \newtheorem{problem}[theorem]{Problem}     \newtheorem{proposition}{Proposition}     \newtheorem{remark}[theorem]{Remark}     \newtheorem{solution}[theorem]{Solution}     \newtheorem{summary}[theorem]{Summary}     \newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}          % For centered entries:      % Allow line breaks with \\ in specialcells     \newcommand{\specialcell}[2][c]{%     \begin{tabular}[#1]{@{}c@{}}#2\end{tabular}     }          % For left-aligned entries:     %% Allow line breaks with \\ in specialcells     %\newcommand{\specialcell}[2][c]{%     %\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}% missing % in original     %                       %%%     %}          % *****************************************************************     % siunitx     % *****************************************************************     \newcommand{\sym}[1]{\rlap{#1}} % Thanks to Joseph Wright & David Carlisle          \usepackage{siunitx}         \sisetup{             detect-mode,             group-digits            = false,             input-symbols           = ( ) [ ] - +,             tight-spacing       = true,             table-align-text-post   = false,             input-signs             = ,             }             % Packages for tables     \usepackage{booktabs}% Pretty tables     \usepackage{threeparttablex}% For Notes below table          % Character substitution that prints brackets and the minus symbol in text mode. Thanks to David Carlisle     \def\yyy{%       \bgroup\uccode`\~\expandafter`\string-%       \uppercase{\egroup\edef~{\noexpand\text{\llap{\textendash}\relax}}}%       \mathcode\expandafter`\string-"8000 }          \def\xxxl#1{%     \bgroup\uccode`\~\expandafter`\string#1%     \uppercase{\egroup\edef~{\noexpand\text{\noexpand\llap{\string#1}}}}%     \mathcode\expandafter`\string#1"8000 }          \def\xxxr#1{%     \bgroup\uccode`\~\expandafter`\string#1%     \uppercase{\egroup\edef~{\noexpand\text{\noexpand\rlap{\string#1}}}}%     \mathcode\expandafter`\string#1"8000 }          \def\textsymbols{\xxxl[\xxxr]\xxxl(\xxxr)\yyy}               % *****************************************************************     % Estout related things     % *****************************************************************     \let\estinput=\input % define a new input command so that we can still flatten the document          \newcommand{\estwide}[3]{             \vspace{.75ex}{                 \textsymbols% Note the added command here                 \begin{tabular*}                 {\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{#2}{#3}}                 \toprule                 \estinput{#1}                 \bottomrule                 \addlinespace[.75ex]                 \end{tabular*}                 }             }             \newcommand{\estauto}[3]{             \vspace{.75ex}{                 \textsymbols% Note the added command here                 \begin{tabular}{l*{#2}{#3}}                 \toprule                 \estinput{#1}                 \bottomrule                 \addlinespace[.75ex]                 \end{tabular}                 }             }          % *****************************************************************     % Custom subcaptions     % *****************************************************************     % Note/Source/Text after Tables     % The new approach using threeparttables to generate notes that are the exact width of the table.     \newcommand{\Figtext}[1]{%         \begin{tablenotes}[para,flushleft]         \hspace{6pt}         \hangindent=1.75em         #1         \end{tablenotes}         }     \newcommand{\Fignote}[1]{\Figtext{\emph{Note:~}~#1}}     \newcommand{\Figsource}[1]{\Figtext{\emph{Source:~}~#1}}     \newcommand{\Starnote}{\Figtext{* p < 0.1, ** p < 0.05, *** p < 0.01. Standard errors in parentheses.}}% Add significance note with \starnote          % To adjust margins:      \usepackage{changepage}          \usepackage{bbm}     \usepackage{bm}          \makeatother          \begin{document}     \begin{onehalfspace}               \begin{table}[!t]     \centering     \begin{threeparttable}          \caption{\label{tab:indices_plain}Treatment effects on index variables}               {\scriptsize\include{../Output/indices_plain}}          \selectlanguage{british}%     \begin{tablenotes}[flushleft] \scriptsize \item \emph{Notes:}      OLS estimates of treatment and spillover effects. Outcome variables are listed on the left. Column (1) reports the mean of the control group for a given outcome variable. Column (2) reports the treatment effect across villages, i.e. comparing treatment households to pure control households. Column (3) reports the treatment effect within villages, i.e. comparing treatment housholds to control households in treatment villages (spillover households). Column (4) reports the spillover effect, i.e. the treatment effect on spillover households compared to pure control households. The unit of observation is the household for all outcome variables, except the psychological variables index, where it is the individual. The sample includes all households and individuals, except for the intrahousehold index, where it is restricted to co-habitating couples, and for the education index, where it is restricted to households with school-age children. For each outcome variable, we report the coefficient of interest, its standard error in parentheses, and the bootstrapped FWER $p$-value in brackets. Standard errors are clustered at the village level in columns (2) and (4), and at the household level in column (3). * denotes significance at 10 pct., ** at 5 pct., and *** at 1 pct. level.     \end{tablenotes}     \end{threeparttable}\selectlanguage{english}%     \end{table}          \end{document}      Hopefully this helps describe the situation. I'm using LyX version 2.0.6, with the MacTeX package 2013. Thank you all!