title: Row wise list environment

text: Let us consider the following example :                \documentclass[a4paper,10pt]{book}     \usepackage{multicol}     \begin{document}     \begin{multicols}{2}     \begin{enumerate}     \item Text     \item Text     \item Text     \item Text     \item Text     \item Text     \end{enumerate}     \end{multicols}     \end{document}      This produces : ![enter image description here](http://i.stack.imgur.com/PoXDA.jpg) I want to get the following list environment using the same package 'multicol ' ![enter image description here](http://i.stack.imgur.com/BTXPi.jpg) Is there any way to do this ?


title: Rearrange How Multicol Lists Things

text: If I compile the following:               \begin{multicols}{2}          \begin{enumerate}              \item Math              \item Is               \item Quite              \item Fun          \end{enumerate}          \end{multicols}      Then it will compile as:                    (a) Math   (c)  Quite               (b) Is     (d) Fun      I would like (b) to be to the right of (a). Is there any way to get Mulitcols to do this automatically? I know I can just rename things or type them in a different order.


title: Counting occurences in TeXnicCenter’s search and replace

text: Using TeXnicCenter 2.0 alpha 4 to run MiKTeX 2.9. When performing a Replace _specimen1_ with _specimen2_ under Seach\Replace, the output used to show how many occurences had been found. This was an excellent method of checking in some circumstances, but seems to have been dropped and I cannot find a way to retrieve it. Is there any way of recovering this option?


title: How to create automatically table of contents of external PDF file?

text: I have merged three external pdf files. Now I want to create table of contents of this resultant pdf file. Here `\tablesofcontents`is not working.               \documentclass{article}     \usepackage{pdfpages}     \begin{document}          \includepdf[pages={1,2,3-30}]{myfile1.pdf}     \includepdf[pages={1,2,7-40}]{myfile2.pdf}     \includepdf[pages={990}]{myfile3.pdf}          \end{document}


title: Place figures at the bottom of a page

text: Does anyone know how to place figures at the bottom of a page ? At the moment, it automatically goes at the top of a new page... I am using LyX.


title: Label in a footnote in author's field causes 'xfootnotemark doesn't match its definition'

text: I am trying to insert a `\label` in the footnote (`\thanks`) of the author's field with the following code               \author{Gopal \thanks{XYZ university\label{auth1}}}      However, LaTeX keeps giving the error `\@xfootnotemark doesn't match its definition`. If I remove the label, then there are no errors. Why am I trying to use a label? Two authors have the same affiliation and I want to refer the existing affiliation for the second author. I am also using `hyperref` enabled for pdf. I tried to look up on net for this solution but could not find one. Any help would be greatly appreciated.


title: Section like heading with Tikz

text: I'm trying to make a new section-like heading with TikZ. I basically want it to look like this (nevermind the funky background): ![What I want](http://i.stack.imgur.com/7vd6f.png) But I can only get something like this: ![what I have](http://i.stack.imgur.com/AGiDp.png) In my LaTeX document I call this with:               \problems      And here is the code I use to produce the (unsatisfactory) result above:               \RequirePackage{tikz}          \makeatletter          \pgfdeclareshape{topbot}{          \inheritsavedanchors[from=rectangle]          \inheritanchorborder[from=rectangle]          \inheritanchor[from=rectangle]{center}          \inheritanchor[from=rectangle]{north}          \inheritanchor[from=rectangle]{south}          \inheritanchor[from=rectangle]{west}          \inheritanchor[from=rectangle]{east}          \inheritanchor[from=rectangle]{north east}          \inheritanchor[from=rectangle]{south east}          \inheritanchor[from=rectangle]{north west}          \inheritanchor[from=rectangle]{south west}          \inheritanchor[from=rectangle]{base}          \backgroundpath{%          \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y          \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y          \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}          \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}} %left hand vertical line         \pgfpathmoveto{\pgfpoint{\pgf@xb}{\pgf@yb}} %top vertical line         \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}          \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}          \pgfpathclose              }%          }          \makeatother               \newcommand{\problems}{             \begin{tikzpicture}              \node[draw,shape=topbot,very thick, minimum width=\paperwidth, text width=.8\paperwidth]              {\large\textbf{Problems for Section~\thesection}};              \end{tikzpicture}}             \titlespacing*{\problems}{-0.25in}{50pt}{0pt}      I was trying to make the bottom left hand corner of the rectangle, and then make left hand side really thick. Also, I'd like the rectangle to be the width of the page. (This will not be printed – hence I'm not too concerned about margins.)


title: removing an unwanted page between two chapters

text: What could be the reason? Somehow a blank page with some random number gets inserted between two chapters.               \flushbottom     \include{chapter1}     \flushbottom     %%-------------------------------------------------------------------------     %     %-------------------------------------------------------------------------     \flushbottom     \include{chapter2}     \flushbottom     %%-------------------------------------------------------------------------          %%-------------------------------------------------------------------------     \flushbottom     \include{chapter3}     \flushbottom     %-------------------------------------------------------------------------          %-------------------------------------------------------------------------     \flushbottom     \include{chapter4}     \flushbottom


title: Read manuscript in to output

text: I want to put my source plain TeX file in the output of the same plain TeX file. As I remember coming through a macro, that can put a file's content in to the output, but only `\input` comes to mind. What could it be? Becoming frustrated—and so tired—I decided, to use the `\openin`, `\read`, `\closein` macros, but failed. For the same file, nothing is read. Only for a text file, the very first line is read, but only if the condition is after the body of the loop. However, while I was writing this question, a suggestion were showed here, which I learned from that I was missing `\unless`. It is fine, but now everything is interpreted. How can I avoid that?


title: How to use non-breaking space (~) with \usepackage[spanish]{babel}?

text: I just realized that when I `\usepackage[spanish]{babel}` I can no longer use `~` as a non-breaking space before `n` or `N`. MWE:               \documentclass{article}     \usepackage[spanish,notilde]{babel}     \begin{document}     h~n h~l     \end{document}      results in ![enter image description here](http://i.stack.imgur.com/pS4cf.png) Which is clearly not what I want. How do I get the original functionality of `~` while also having the `babel` package with the `spanish` option? * * * _**EDIT:_** Hmmm.. the log file says that I'm using `Babel <v3.8h>`, which as far as I can tell is the newest version. Also when I try to use [spanish,es-notilde] option I get an error > `!` Package babel Error: Language definition file es-noshorthands.ldf not > found. or with [spanish,es-notilde]: > `!` Package babel Error: Language definition file es-notilde.ltd not found. Looking into `spanish.ltd` I found the following version: > [2005/03/31 v4.2b Spanish support from the babel system] but I do not know if it is the most current or not. As the log file is not too large, I'm quoting it here:               Running `LaTeX' on `tildeTest' with ``pdflatex  -interaction=nonstopmode "\input" tildeTest.tex''     This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)      %&-line parsing enabled.     entering extended mode     LaTeX2e <2005/12/01>     Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, nohyphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ngerman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish, french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibycus, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, portuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish, turkish, ukenglish, ukrainian, loaded.     (./tildeTest.tex (/usr/share/texmf/tex/latex/base/article.cls     Document Class: article 2005/09/16 v1.4f Standard LaTeX document class     (/usr/share/texmf/tex/latex/base/size10.clo))     (/usr/share/texmf/tex/generic/babel/babel.sty     (/usr/share/texmf/tex/generic/babel/spanish.ldf     (/usr/share/texmf/tex/generic/babel/babel.def))          ! Package babel Error: Language definition file es-notilde.ldf not found.          See the babel package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.141 \ProcessOptions*          ) (./tildeTest.aux) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]     (./tildeTest.aux) )     (see the transcript file for additional information)</usr/share/texmf/fonts/type1/bluesky/cm/cmr10.pfb>     Output written on tildeTest.pdf (1 page, 4802 bytes).     Transcript written on tildeTest.log.


title: Inline Tex Math expressions positioning in Anki

text: I'm not exactly familiar with how Anki processes the inline math expressions, but the developer advised me to ask this question on a Tex discussion platform: The problem is that the rendered formulas are always placed a bit too high in the text. Like this: ![enter image description here](http://i.stack.imgur.com/Wp2CG.png) How can I change this? **Edit:** > All Anki does is combine the text on your card with the prefix and postfix > in the deck options and send it to LaTeX, so if you're having layout > problems you'll need to ask on a LaTeX forum. The only related settings I could find are the LaTex header and footer: Header:               \documentclass[12pt]{article}     \special{papersize=3in,5in}     \usepackage[utf8]{inputenc}     \usepackage{cancel}     \usepackage{amssymb,amsmath}     \pagestyle{empty}     \setlength{\parindent}{0in}     \begin{document}     \scriptsize      Footer:               \end{document}


title: Automatically reduce long authors list

text: I've found this topic which is very near to my problem: BibTex: How can I automatically reduce long author lists to "xxx et al."? I'd like to use `natdin` though. Can anyone help me with the code?


title: Cannot copy from pdflatex-created PDF

text: When I create a PDF using `pdflatex`, I can neither copy from it nor search across lines. Is there any way to make these things possible? I tried `cmap`, but it doesn't help at all. Here is an example document containing the preamble I typically use, minus the stuff that I'm certain that it isn't related to this problem.               \documentclass[a4paper]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{lipsum}     %\usepackage{cmap}     \begin{document}     \lipsum[1]     \end{document}


title: LaTeX nomenclature define on first use?

text: How do I define nomenclature inside the document on first use? Or even define it on every use? I use the `nomencl` package to define all symbols, but it just puts them in one page at the beginning. I want something like a glossary where the full definition is given on first use. I know I can use glossary for nomenclatures too but can I do it using `nomencl`?


title: Special arrangement of subfigures in memoir

text: As described in answers to this question, the following code:               \documentclass{memoir}     \newsubfloat{figure}     \begin{document}     \begin{figure}[H]     \centering%     \begin{tabular}{lr}     \begin{tabular}{c}%     \subbottom[A]{\rule{0.3\linewidth}{100pt}} \\     \subbottom[B]{\rule{0.3\linewidth}{100pt}}     \end{tabular}     &     \subbottom[C]{\rule{0.6\linewidth}{230pt}}     \end{tabular}     \caption{D}%     \end{figure}     \end{document}      Leads to significant misalignment. How do I fix it? ![enter image description here](http://i.stack.imgur.com/u2YGJ.png)


title: Listings Keyword Part of Comment

text: I made a homebrewed language for structured text (because I expected no language like this to be available). Now there is a comment that starts with `/*` and ends with `*/` and a line comment that starts with `//`... but I also need the `/` for division highlighting. Everything works but the comments that start with `/` are not highlighted. What can I do? I got another question. Is it possible to have two groups of otherkeywords in two different styles? I think I will need this because I have to highlight all numbers in a different color than the keywords `+`, `-`, etc.


title: How to have a simple text appearing when the cursor is hovering over a part of the document?

text: I'm trying to get a short description of a picture to appear when the cursor is hovering over this picture in the pdf file. I read that this might be possible using `fancytooltips` but I have to say that after reading through the documentation and some "basic" example, I am not convinced. Could someone explain to me how to modify the following code to get "this is the description" appearing next to the cursor, when this one is above the picture (Is it the same process for another kind of element, ie. pop-up above a word or a paragraph)?               \documentclass{article}     \usepackage[demo]{graphicx}          \begin{document}          \includegraphics[width=3cm,height=5cm]{example}          \end{document}      What are the options I have to customize this pop-up window (shape, background color, persistence, etc.) ?


title: How to make \chapter and \part align right and get a quote under them?

text: Consider this example: http://jmvdveer.home.xs4all.nl/algol68g.pdf Section and chapter titles are set so they align with the right margin, how do I do that? and more importantly, how do I make them align to left and right, depending on even and odd page? If you scroll down to page "xi" (Preface), there's a quote from Blaise Pascal right under the chapter line. I seem to remember this was part of a Koma class, but I can't find it anymore how to get it. I believe there was an extra command to get things like qotes, etc, right under a `\chapter{}` or `\part{}`. I'm using XeLaTeX, with the Koma classes.


title: Numbering equation for each custom section

text: I have created an environment named `hwp` with custom headers and footers that works otherwise very much like the native section environment, in which I can set equations, add figures, etc. What I would like to do is to use the `\numberwithin{equation}{section}` for `hwp`. In other words, the numbering of equations should be reset whenever a new `hwp` is created. As it appears that I have to work around the `\numberwithin` command, I have been working on setting up my own counter that would serve the purpose, yet to no avail. The following is the code related to my goal. Any advice would be much appreciated.               \newcounter{hwpcounter}     \newcounter{eqcounter}     \renewcommand{\theeqcounter}{\addtocounter{eqcounter}{1}}          \newenvironment{hwp}[1][Prob \arabic{hwpcounter}]     {         \stepcounter{hwpcounter}         \renewcommand{\theequation}{\arabic{hwpcounter}.\theeqcounter}     }


title: How to change enumerate style in GSM package

text: I used GSM LaTeX package of AMS to write a book, in which the enumerate environment gives the result as follows: (1) If blah blah blah. (2) Else blah blah blah. (3) Or blah blah blah.... I want to change it to : 1) If blah blah blah. 2) Else blah blah blah. 3) Or blah blah blah.... Here is the MWE:               \documentclass{gsm-l}     \usepackage{enumitem}     \setlist[itemize]{leftmargin=*}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{amsmath,enumitem}     \setlist[enumerate]{leftmargin=*}     \usepackage[utf8]{vietnam}     \begin{document}     \begin{enumerate}     \item If blah blah blah     \item Else blah blah blah     \item Or blah blah blah      \end{enumerate}     \end{document}      Please help me. Thanks.


title: How to organise code

text: At the moment I write macros without breaking them up, like so:               \NewDocumentCommand{\HC}{ o }{\IfNoValueTF{#1} {\emph{HC}\xspace}{\emph{HC}, p.#1\xspace}}      This obviously gets pretty hard to follow once things get longer. Examples on this site are always broken into separate lines, using % at the end of each line. I have never been sure what the rules are for how to do this effectively, or what the practice of arranging code in this way is. I feel that I am falling into a very bad habit by ignoring this. Is there a guide to this anywhere on this site or elsewhere, or is it just personal preference?


title: Placing text and equations inside a box

text: I have a paragraph that contains text, inline equations and centred equations, and I'd like to put the whole thing in a box that's centred horizontally in the page. It's a key paragraph, so I wanted to box it so that it stands out. I just want a simple box: black outline, white fill, no curved corners. I had a look at questions with similar titles, but couldn't find anything that both worked and suited my needs. If it helps, see below for the particular paragraph I want to put in a box:               \documentclass[12pt article]{article}     \usepackage{amsmath}     \usepackage{amssymb}          \begin{document}              Let $a(b) = \left\{ \begin{array}{c l} hi & \mbox{if } t^5 \mbox{ reduced} \\ t & \mbox{otherwise} \end{array} \right.$, $xyz = \left\{ \begin{array}{c l} GH & \mbox{if } tr^{\pi} \mbox{ secluded} \\ x& \mbox{otherwise} \end{array} \right.$, $s = \left\{ \begin{array}{c l} up^{-5} & \mbox{if } t^55 \mbox{ reduced} \\ lo & \mbox{otherwise} \end{array} \right.$. \\ \\              Define the magician $M_n$ recursively, where $M_1 = \bigstar$ and               \begin{center} $  \begin{array}{r} M_{3} =   tr(Md) \\ M_{hat} =   norbert(2304) \\ Mtri =   solution \end{array} $ \end{center}              where $z$ is the smallest integer such that $z \notin \{ 0 \}$. Terminate the magician at $M_{3}$ where $3$ is such that $M_{3}, ... , M_{3}$ have all already appeared in $M_1, ... , M_{t},$ i.e.              \begin{center}              $ Mtr = g, \underbrace{hi, hello, good day}_{\mbox{cousins}}, \underbrace{1,2,3,4,4,5}_{\mbox{enemies of first cousin of } g} , ... \ , M_{3}, M_{3}, M_{3} $              \end{center}              where $i$ is smallest such that $rt \neq z$.          \end{document}      Thanks! I wasn't sure what tags to use - I'd welcome any changes.


title: Is there a better way to display this information?

text: ![enter image description here](http://i.stack.imgur.com/DXCcN.jpg) I have drawn this picture in tikz. Is there a more visually pleasing and intuitively appealing way of displaying this information? I feel what I have drawn is dull and boring. I have to include more text also in this image. In the following, I give the tex code which accomplished this (modified one of the tikz examples).               \documentclass[]{standalone}      \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{tikz}      \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,positioning,shapes.symbols,chains,calc}     \usetikzlibrary{paths.ortho}     \begin{document}          \begin{tikzpicture}     [node distance = 1cm, auto,font=\footnotesize,     % STYLES     every node/.style={node distance=3cm},     % The comment style is used to describe the characteristics of each force     comment/.style={rectangle, inner sep= 3pt, text width=3cm, node distance=0.25cm, font=\scriptsize\sffamily},     % The force style is used to draw the forces' name     force/.style={rectangle, draw, fill=black!10, inner sep=2pt, text width=2.5cm, text badly centered, minimum height=.7cm, font=\bfseries\footnotesize\sffamily}]           \node [force] (HQCQP) {Problem to solve};     \path (HQCQP.north)+(2cm,1cm)  node [force] (JNRBased) {Proposed Method};     \path (HQCQP.south)+(2cm,-1cm)  node [force] (SDR) {Existing Method};     \path (JNRBased)+(4cm,1cm) node[force](LMI){First Variation};     \path (JNRBased)+(4cm,-1cm) node[force](RelaxedJNR){Second Variation};     \path (HQCQP.west)+(12cm,0cm) node[force](solution){Solution};          \node [force, text width=2.5cm, dashed, above=.05cm of solution] (upbnd) {Upper Bound};     \node [force, text width=2.5cm, dashed, below=.05cm of solution] (lowbnd) {Lower Bound};          \draw [ -latex] (HQCQP.north) |- (JNRBased.west);     \draw [ -latex] (HQCQP.south) |- (SDR.west);     \draw [ -latex] (SDR.east)    -|- (lowbnd.west);     \draw [ -latex] (RelaxedJNR.east)    -|- (lowbnd.west);     \draw [ -latex] (LMI.east) -| (upbnd.north);     \draw [ -latex] (JNRBased.east) -|- (LMI.west);     \draw [ -latex] (JNRBased.east) -|- (RelaxedJNR.west);          \path (LMI.north)+(3.5cm,.2cm) node [comment] (comment-LMI) {Gives exact solution \\ in cases 1 and 2 and upperbound for other cases.};     \end{tikzpicture}      \end{document}


title: algorithmicx or algpseudocode custom command indentation within a while loop or if statement

text: I have been trying all day to set-up the commands necessary to represent the Haggis pseudocode format using the `algorithmicx` package in Latex. I have managed to create the commands I need for the simple algorithm I am describing but I can't get the indentation to appear correctly. In my main document I am defining the following new commands and my algorithm below it:               \documentclass{report}          \usepackage{algpseudocode}     \algnewcommand\algorithmicset{\textbf{SET}}     \algnewcommand\algorithmicto{\textbf{TO}}     \algnewcommand\SET[2]{\item\algorithmicset\ #1 \algorithmicto\ #2}     \algnewcommand\algorithmicreceive{\textbf{RECEIVE}}     \algnewcommand\algorithmicfromkeyboard{\textbf{FROM KEYBOARD}}     \algnewcommand\RECEIVE[1]{\item\algorithmicreceive\ #1 \algorithmicfromkeyboard}     \algnewcommand\algorithmicsend{\textbf{SEND}}     \algnewcommand\algorithmictodisplay{\textbf{TO DISPLAY}}     \algnewcommand\SEND[1]{\item\algorithmicsend\ #1 \algorithmictodisplay}     \algrenewcommand\algorithmicwhile{\textbf{WHILE}}     \algrenewcommand\algorithmicend{\textbf{END}}     \algrenewcommand\algorithmicdo{\textbf{DO}}     \algrenewcommand\algorithmicif{\textbf{IF}}     \algrenewcommand\algorithmicthen{\textbf{THEN}}          \begin{document}          \begin{algorithm}[H]         \caption{Hello world}     \begin{algorithmic}[1]     \SET{$number$}{$0$}     \While{$number \neq -1$}         \SEND{$"Please\ enter\ the\ next\ number\ (-1\ to\ end):\ "$}         \RECEIVE{$number$}         \If{$number \neq -1$}             \SET{$number$}{$total\ +\ number$}         \EndIf     \EndWhile     \SEND{$total$}     \end{algorithmic}     \end{algorithm}          \end{document}      When I create the PDF I get the following: ![Final representation](http://i.stack.imgur.com/9y9AA.png) There is something wrong with the either the commands I have created or there is something else that I need to do that I am unaware of. I have searched for sometime without success and I would appreciate any assistance with this problem as I am tearing my hair out! No doubt it is something obvious I have overlooked.


title: Automatic new lines in cells in a table to fit page width

text: I'd like to let latex automatically put a new line in cells so to fit the table in the page width, is this possible? For example this code would show the table but the table would not fit in the page width:               \usepackage{tabularx}     \begin{tabular*}{\textwidth}{c| @{\extracolsep{\fill}} c|c}     \hline      This is a very long table and cannot fit in the page width & another long words & more long words \\     \hline      \hline      example & example & example of a lot of text here so this should also go to multiple lines in this cell \\     \hline      A & B & C \\     \hline      \end{tabular*}


title: \SIrange[tophrase=dash] fails to render an en-dash

text: When using `\SIrange[tophrase=dash]` to specify a range of numbers with units, the range phrase is literally specified as `dash`. The following MWE yields `10 mdash20 m` as an output. MWE:               \documentclass{article}          \usepackage{siunitx}     \sisetup{per=slash, load=abbr}          \begin{document}          \SIrange[tophrase=dash]{10}{20}{\metre}          \end{document}      Whats going on here? Where should I be looking?


title: Endfloat and CUEDthesisPSnPDF template. Hyperref problem

text: I'm trying to use the thesis template at the following link: http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/ (Direct link: https://raw.github.com/kks32/phd-thesis-template/phd-latex-template-latest- stable/Classes/PhDThesisPSnPDF.cls). I've created a MWE using a version of that class below. I'm adding Endfloat to the MWE to list any/all tables and figures at the end of each chapter. The hyperref command in the CUEDthesisPSnPDFCopy class is clashing with Endfloat. What's the reason for this? How can I edit/override the hyperref setting in the class file in the MWE latex file? This is the MWE.               \documentclass[oneside,12pt]{CUEDthesisPSnPDFCopy}     \usepackage[notablist]{endfloat}     \usepackage{titletoc}          \begin{document}     \chapter{Learning}     \startlist{lot}     \begin{table}     \caption{First Table}      \label{tab:table1}     \end{table}     \begin{table}     \caption{Second Table}     \label{tab:table2}     \end{table}     \printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}     \processdelayedfloats          \chapter{Data}     \startlist{lot}     \begin{table}     \caption{First Table}     \label{tab:table1}     \end{table}     \begin{table}     \caption{Second Table}     \label{tab:table2}     \end{table}     \printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}     \processdelayedfloats     \end{document}      This is the class file from the link above (edited to include only the region giving the error).               %     % CUEDthesis v1.1     % By Harish Bhanderi <harish.bhanderi@cantab.net     % Version 1.0 released 15/07/2002     % Version 1.1 released 14/07/2010     %-------------------------- identification ---------------------     \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{CUEDthesisPSnPDFCopy}[2010/07/14 v1.1 CUED thesis class]     %-------------------------- initial code -----------------------     \newif\ifCU@bookmode     \CU@bookmodetrue          \DeclareOption{report}{\CU@bookmodefalse}     \DeclareOption{book}{\CU@bookmodetrue}     \ProcessOptions\relax%          \ifCU@bookmode     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}%     \ProcessOptions\relax%         \ifx\pdfoutput\undefined%              \LoadClass[dvips, a4paper]{book}%         \else%              \LoadClass[pdftex, a4paper]{book}%         \fi%     \else         \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}%         \ProcessOptions\relax%             \ifx\pdfoutput\undefined%                 \LoadClass[dvips, a4paper]{report}%             \else%                  \LoadClass[pdftex, a4paper]{report}%             \fi%         \renewcommand{\refname}{REFERENCES}%     \fi               \usepackage{ifthen}     \usepackage{ifpdf}     \ifpdf             \usepackage[ pdftex, plainpages = false, pdfpagelabels,                                       pdfpagelayout = OneColumn, % display single page, advancing flips the page - Sasa Tomic                                      bookmarks,                                      bookmarksopen = true,                                      bookmarksnumbered = true,                                      breaklinks = true,                                      linktocpage,                                      pagebackref,                                      colorlinks = true,                                      linkcolor = blue,                                      urlcolor  = blue,                                      citecolor = red,                                      anchorcolor = green,                                      hyperindex = true,                                      hyperfigures                                      ]{hyperref}              \usepackage[pdftex]{graphicx}             \DeclareGraphicsExtensions{.png, .jpg, .pdf}     \else     \fi


title: Definitive guide to trivlists

text: I create a lot of `theorem`-like environments, and I'm usually happy to employ a package (such as `ntheorem`, `amsthm`, etc) to do the work for me. After studying the `ntheorem` documentation, and reading many answers here on TeX exchange, it seems that most `theorems`, and more interestingly, a lot of the 'standard' environments (such as the `center` environment, for example) are defined in terms of `trivlist`s I'm interested in experimenting with my own environments using `trivlist`s, but would like to know all the parameters that can be tweaked- so far I haven't been able to find a definitive guide, hence this question :) So, can someone provide details of all of the parameters that can be tweaked in order to customize a `trivlist`? Here's a MWE that can be played with               \documentclass{article}     \usepackage[showframe=true]{geometry}     \usepackage{lipsum}          \setlength{\parskip}{5mm}          \newenvironment{problem}{%     \begin{trivlist}%     \item[{\bfseries Problem}]%     \item%     }{\end{trivlist}}          \begin{document}          \begin{problem}         \lipsum[1]     \end{problem}          \end{document}      Interestingly, there's no `trivlist` tag, so feel free to re-tag as you see appropriate.


title: How to hide table# & Break cell text into two rows

text: I asked for a new table environment here. How to create new table environment. I took the solution provided by `Yiannis` I works great I have two questions - I do not know how to break the cell content into two lines, because of that two tables are overlapping on one another. In the image, I want to break the line at red slash. I tried `\newcommand{\nl}{newline}` I did not realize at the time of asking that each page has 10 tables, so 100 page document will have 1000 tables. Is there any way to get rid of `table- xxx:` from caption and just leave the text that I want to add to the caption. ![enter image description here](http://i.stack.imgur.com/JCMbD.png) I would really appreciate your help Since I could not explain the issue to cmhughes I am adding the desired output image as well. ![enter image description here](http://i.stack.imgur.com/MiABF.png)


title: How to keep page numbering below text?

text: I have started writing my report using LaTeX. I have hid the page numbers for the first pages, table of contents included. However, after table of contents page numbers seems to be above the lowest point that the content reaches. I am using               \documentclass[a4paper,12pt]{article}     \usepackage{fullpage}     \title{\bf Title\vspace{2cm}}     \author{\emph{Author:}\\author\vspace{0.5cm} \\ \emph{Supervisor:}\\supervisor\vspace{2cm}}     \date{\today}     \begin{document}     \maketitle     \thispagestyle{empty}     \newpage     \begin{abstract}     \end{abstract}     \thispagestyle{empty}     \newpage     \renewcommand{\abstractname}{Acknowledgements}     \begin{abstract}     \end{abstract}     \thispagestyle{empty}     \newpage     \thispagestyle{empty}     \tableofcontents     \thispagestyle{empty} \newpage     \setcounter{page}{1}      and resetting counter after ToC like this :`\setcounter{page}{1}`   What do i have to change in order the page numbers to appear below my text?


title: What is "\C" with xelatex and beamer?

text: When compiling a beamer document using xelatex, I encountered a problem with the macro `\C`. Basically, I want to use that to stand for the set of complex numbers so I want to redefine it to be `\mathbb{C}`, but `xelatex` complains that it is already defined. Using `\show`, I can see that it is defined to be:               > \C=macro:     ->\PU-cmd \C \PU\C .      but a texmf-wide grep doesn't show me anything sensible on what that actually means! So I don't know if it's safe to clobber it or not. Here's the minimal test case. Note that the issue only shows up with `xelatex`, not with `pdflatex` or `lualatex`.               \documentclass{beamer}          \begin{document}     \show\C     \end{document}      It feels like something font-y, since if I remove the `\show` (i.e., actually try to _use_ the command), then I get the error:               ! LaTeX Error: Command \C unavailable in encoding OT1.


title: fontspec FakeBold affects text in graphics

text: In the minimal example below (compiled with XeLaTeX in MacTex), the `FakeBold` option in package `fontspec` works as intended for the main text, using Times to represent the non-default font I am using in my actual document. However, `FakeBold` also thickens the Helvetica font used in the included graphic `plot.pdf` (available from here) although the Helvetica font is not embedded in that PDF. Furthermore, the Helvetica font is thickened to the same degree regardless of the `FakeBold` setting, i.e. `FakeBold=0.5`, `FakeBold=1`, `FakeBold=3` all produce the same amount of thickening in the Helvetica font. However, if I embed the Helvetica into `plot.pdf`, then `FakeBold` works nicely within the graphic. There are two issues here:   1. `FakeBold` was invoked only for Times but it affected the Helvetica in the graphic.   2. In the case where Helvetica hadn't been embedded in the graphic, `fontspec` apparently detected the presence of some kind of text in the graphic and applied a thickening that was insensitive to the setting of `FakeBold` for the main text. I tried to prevent `FakeBold` from thickening the text in the graphic by setting `FakeBold=0` just before the graphic but to no effect. I also tried `\setsansfont[FakeBold=0]{Helvetica}` but of course this had no effect because the text within the graphic wasn't being identified as Helvetica. I have tried other fonts for the main text and within the graphic and the same behaviour arises. There does not appear to be any mention of this in the `fontspec` documentation, and I am incapable of getting into its source code to look for the cause. I would be very grateful if someone could hint at how I could overcome this problem. I apologise if it's something blindingly obvious.               \documentclass{minimal}          \usepackage{graphicx}          \usepackage{fontspec}     \setmainfont[FakeBold=1]{Times}          \begin{document}          Test test test          \includegraphics{plot.pdf}          \end{document}


title: Renew appendix command to remove blank pages

text: I'm using Steve R. Gunn's Thesis Class. My issue is that Latex insists on inserting a blank page after the first of my 4 appendices, yet at no other point in the document. I believe this is caused by the switch to the `\appendix` environment. I've examined the Thesis.cls file, but as I can see, that environment is not modified. I wonder if the `oneside` parameter is perhaps not passed on correctly? I'm far from a Latex expert, but I've attempted to modify the environment myself, by copying how the `\backmatter` command was renewed. This has successfully removed the blank page, but also got rid of the lettering of my appendices, which I'd like to retain. (Both with "Appendix A:" at the start of each title, and for the TOC/header lines.) Currently I've added this:               \renewcommand\appendix{       \if@openright         \cleardoublepage       \else         \clearpage       \fi       \@mainmatterfalse}      Can anyone detail what I'd need to add to also keep the lettering? Or is there a specific way to just modify certain parts of a command? (I presume what is happening here, is that by 'renewing' the command, I'm overwriting the default imposed by the `Thesis` class being based on `book`. Below is the entire Thesis.cls file if it's required. (The section where `\backmatter` is modified is right at the end.)               \NeedsTeXFormat{LaTeX2e}[1996/12/01]     \ProvidesClass{Thesis}                   [2007/22/02 v1.0        LaTeX document class]     \def\baseclass{book}     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}     \def\@checkoptions#1#2{       \edef\@curroptions{\@ptionlist{\@currname.\@currext}}       \@tempswafalse       \@tfor\@this:=#2\do{         \@expandtwoargs\in@{,\@this,}{,\@curroptions,}         \ifin@ \@tempswatrue \@break@tfor \fi}       \let\@this\@empty       \if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi     }     \@checkoptions{11pt}{{10pt}{11pt}{12pt}}     \PassOptionsToClass{a4paper}{\baseclass}     \ProcessOptions\relax     \LoadClass{\baseclass}     \newcommand\bhrule{\typeout{------------------------------------------------------------------------------}}          \newcommand\Declaration[1]{     \btypeout{Declaration of Authorship}     \addtotoc{Declaration of Authorship}     \thispagestyle{plain}     \null\vfil     %\vskip 60\p@     \begin{center}{\huge\bf Declaration of Authorship\par}\end{center}     %\vskip 60\p@     {\normalsize #1}     \vfil\vfil\null     %\cleardoublepage     }          \newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}     \def\today{\ifcase\month\or       January\or February\or March\or April\or May\or June\or       July\or August\or September\or October\or November\or December\fi       \space \number\year}     \usepackage{setspace}     \onehalfspacing     \setlength{\parindent}{0pt}     \setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}     \usepackage{vmargin}          \RequirePackage[utf8]{inputenc} % Allows the use of international characters (e.g. Umlauts)          %----------------------------------------------------------------------------------------     %   MARGINS     %----------------------------------------------------------------------------------------     \setmarginsrb  { 1.5in}  % left margin                             { 0.6in}  % top margin                             { 1.0in}  % right margin                             { 0.8in}  % bottom margin                             {  20pt}  % head height                             {0.25in}  % head sep                             {   9pt}  % foot height                             { 0.3in}  % foot sep     %----------------------------------------------------------------------------------------     \raggedbottom     \setlength{\topskip}{1\topskip \@plus 5\p@}     \doublehyphendemerits=10000       % No consecutive line hyphens.     \brokenpenalty=10000              % No broken words across columns/pages.     \widowpenalty=9999                % Almost no widows at bottom of page.     \clubpenalty=9999                 % Almost no orphans at top of page.     \interfootnotelinepenalty=9999    % Almost never break footnotes.     \usepackage{fancyhdr}     \lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}     \rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}     \chead{}\lfoot{}\rfoot{}\cfoot{}     \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}     \renewcommand{\sectionmark}[1]{}     \renewcommand{\subsectionmark}[1]{}     \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else     \hbox{}     \thispagestyle{empty}     \newpage     \if@twocolumn\hbox{}\newpage\fi\fi\fi}     \usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}     \theoremstyle{plain}     \newtheorem{example}{Example}[chapter]     \newtheorem{theorem}{Theorem}[chapter]     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{axiom}[theorem]{Axiom}     \theoremstyle{definition}     \newtheorem{definition}[theorem]{Definition}     \theoremstyle{remark}     \newtheorem{remark}[theorem]{Remark}     \usepackage[centerlast,small,sc]{caption}     \setlength{\captionmargin}{20pt}     \newcommand{\fref}[1]{Figure~\ref{#1}}     \newcommand{\tref}[1]{Table~\ref{#1}}     \newcommand{\eref}[1]{Equation~\ref{#1}}     \newcommand{\cref}[1]{Chapter~\ref{#1}}     \newcommand{\sref}[1]{Section~\ref{#1}}     \newcommand{\aref}[1]{Appendix~\ref{#1}}     \renewcommand{\topfraction}{0.85}     \renewcommand{\bottomfraction}{.85}     \renewcommand{\textfraction}{0.1}     \renewcommand{\dbltopfraction}{.85}     \renewcommand{\floatpagefraction}{0.75}     \renewcommand{\dblfloatpagefraction}{.75}     \setcounter{topnumber}{9}     \setcounter{bottomnumber}{9}     \setcounter{totalnumber}{20}     \setcounter{dbltopnumber}{9}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{booktabs}     \usepackage{rotating}     \usepackage{listings}     \usepackage{lstpatch}     \lstset{captionpos=b,             frame=tb,             basicstyle=\scriptsize\ttfamily,             showstringspaces=false,             keepspaces=true}     \lstdefinestyle{matlab} {             language=Matlab,             keywordstyle=\color{blue},             commentstyle=\color[rgb]{0.13,0.55,0.13}\em,             stringstyle=\color[rgb]{0.7,0,0} }     \usepackage[hidelinks,pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,        bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,        colorlinks,linkcolor={blue},citecolor={blue},urlcolor={red},        pdfstartview={FitV},unicode,breaklinks=true]{hyperref}     \pdfstringdefDisableCommands{        \let\\\space     }     \newcommand*{\supervisor}[1]{\def\supname{#1}}     \newcommand*{\thesistitle}[1]{\def\ttitle{#1}}     \newcommand*{\examiner}[1]{\def\examname{#1}}     \newcommand*{\degree}[1]{\def\degreename{#1}}     \newcommand*{\authors}[1]{\def\authornames{#1}}     \newcommand*{\addresses}[1]{\def\addressnames{#1}}     \newcommand*{\university}[1]{\def\univname{#1}}     \newcommand*{\UNIVERSITY}[1]{\def\UNIVNAME{#1}}     \newcommand*{\department}[1]{\def\deptname{#1}}     \newcommand*{\DEPARTMENT}[1]{\def\DEPTNAME{#1}}     \newcommand*{\group}[1]{\def\groupname{#1}}     \newcommand*{\GROUP}[1]{\def\GROUPNAME{#1}}     \newcommand*{\faculty}[1]{\def\facname{#1}}     \newcommand*{\FACULTY}[1]{\def\FACNAME{#1}}     \newcommand*{\subject}[1]{\def\subjectname{#1}}     \newcommand*{\keywords}[1]{\def\keywordnames{#1}}          %----------------------------------------------------------------------------------------     %   DOCUMENT VARIABLES     %----------------------------------------------------------------------------------------     %Author note: these are cut.            % The default title page, this is not used in this www.latextemplates.com version                 \renewcommand\maketitle{       \btypeout{Title Page}       \hypersetup{pdftitle={\@title}}       \hypersetup{pdfsubject=\subjectname}       \hypersetup{pdfauthor=\authornames}       \hypersetup{pdfkeywords=\keywordnames}       \thispagestyle{empty}       \begin{titlepage}         \let\footnotesize\small         \let\footnoterule\relax         \let \footnote \thanks         \setcounter{footnote}{0}         \null\vfil         \vskip 60\p@         \begin{center}           \setlength{\parskip}{0pt}           {\large\textbf{\UNIVNAME}\par}           \vfill           {\huge \bf \@title \par}           \vfill           {\LARGE by \par}           \smallskip           {\LARGE \authornames \par}           \vfill           {\large A thesis submitted in partial fulfillment for the \par}           {\large degree of \degreename \par}           \bigskip           \bigskip           {\large in the \par}           {\large \facname \par}           {\large \deptname \par}            \bigskip           \bigskip           \bigskip           {\Large \@date \par}           \bigskip         \end{center}         \par         \@thanks         \vfil\null       \end{titlepage}       \setcounter{footnote}{0}%       \global\let\thanks\relax       \global\let\maketitle\relax       \global\let\@thanks\@empty       \global\let\@author\@empty       \global\let\@date\@empty       \global\let\@title\@empty       \global\let\title\relax       \global\let\author\relax       \global\let\date\relax       \global\let\and\relax       \cleardoublepage     }     %----------------------------------------------------------------------------------------     %   ABSTRACT PAGE DESIGN     %----------------------------------------------------------------------------------------     \newenvironment{abstract}     {       \btypeout{Abstract Page}       \thispagestyle{empty}       \null\vfil       \begin{center}         \setlength{\parskip}{0pt}         {\normalsize \UNIVNAME \par} % University name in capitals         \bigskip         {\huge{\textit{Abstract}} \par}         \bigskip         {\normalsize \facname \par} % Faculty name         {\normalsize \deptname \par} % Department name         \bigskip         {\normalsize \degreename\par} % Degree name         \bigskip         {\normalsize\bf \@title \par} % Thesis title         \medskip         {\normalsize by \authornames \par} % Author name         \bigskip       \end{center}     }     %----------------------------------------------------------------------------------------     {       \vfil\vfil\vfil\null       \cleardoublepage     }     \addtocounter{secnumdepth}{1}     \setcounter{tocdepth}{6}     \newcounter{dummy}     \newcommand\addtotoc[1]{     \refstepcounter{dummy}     \addcontentsline{toc}{chapter}{#1}}     \renewcommand\tableofcontents{     \btypeout{Table of Contents}     \addtotoc{Contents}     \begin{spacing}{1}{         \setlength{\parskip}{1pt}         \if@twocolumn           \@restonecoltrue\onecolumn         \else           \@restonecolfalse         \fi         \chapter*{\contentsname             \@mkboth{                \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}         \@starttoc{toc}         \if@restonecol\twocolumn\fi        \cleardoublepage     }\end{spacing}     }     \renewcommand\listoffigures{     \btypeout{List of Figures}     \addtotoc{List of Figures}     \begin{spacing}{1}{         \setlength{\parskip}{1pt}         \if@twocolumn           \@restonecoltrue\onecolumn         \else           \@restonecolfalse         \fi         \chapter*{\listfigurename           \@mkboth{\MakeUppercase\listfigurename}                   {\MakeUppercase\listfigurename}}         \@starttoc{lof}         \if@restonecol\twocolumn\fi         \cleardoublepage     }\end{spacing}     }     \renewcommand\listoftables{     \btypeout{List of Tables}     \addtotoc{List of Tables}     \begin{spacing}{1}{         \setlength{\parskip}{1pt}         \if@twocolumn           \@restonecoltrue\onecolumn         \else           \@restonecolfalse         \fi         \chapter*{\listtablename           \@mkboth{               \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}         \@starttoc{lot}         \if@restonecol\twocolumn\fi         \cleardoublepage     }\end{spacing}     }     \newcommand\listsymbolname{Abbreviations}     \usepackage{longtable}     \newcommand\listofsymbols[2]{     \btypeout{\listsymbolname}     \addtotoc{\listsymbolname}         \chapter*{\listsymbolname           \@mkboth{               \MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}}     \begin{longtable}[c]{#1}#2\end{longtable}\par         \cleardoublepage     }     \newcommand\listconstants{Physical Constants}     \usepackage{longtable}     \newcommand\listofconstants[2]{     \btypeout{\listconstants}     \addtotoc{\listconstants}         \chapter*{\listconstants           \@mkboth{               \MakeUppercase\listconstants}{\MakeUppercase\listconstants}}     \begin{longtable}[c]{#1}#2\end{longtable}\par         \cleardoublepage     }     \newcommand\listnomenclature{Symbols}     \usepackage{longtable}     \newcommand\listofnomenclature[2]{     \btypeout{\listnomenclature}     \addtotoc{\listnomenclature}         \chapter*{\listnomenclature           \@mkboth{               \MakeUppercase\listnomenclature}{\MakeUppercase\listnomenclature}}     \begin{longtable}[c]{#1}#2\end{longtable}\par         \cleardoublepage     }     \newcommand\acknowledgements[1]{     \btypeout{Acknowledgements}     \addtotoc{Acknowledgements}     \thispagestyle{plain}     \begin{center}{\huge{\textit{Acknowledgements}} \par}\end{center}     {\normalsize #1}     \vfil\vfil\null          }     \newcommand\dedicatory[1]{     \btypeout{Dedicatory}     \thispagestyle{plain}     \null\vfil     \vskip 60\p@     \begin{center}{\Large \sl #1}\end{center}     \vfil\null     \cleardoublepage     }     \renewcommand\backmatter{       \if@openright         \cleardoublepage       \else         \clearpage       \fi       \addtotoc{\bibname}       \btypeout{\bibname}       \@mainmatterfalse}     \endinput


title: Chapter title not displayed in pdfbook mark: Only sections and subsections are displayed

text: I am trying to get the PDF output of my thesis with bookmarks using `hyperref` package. I am able to get the sections and subsections displayed in bookmark however the chapter is not displayed. How can I get the chapter title displayed in this PDF output?               \documentclass[12pt]{report}     \setcounter{secnumdepth}{5}     \setcounter{tocdepth}{5}               \usepackage{uncc-thesis}     \usepackage{subfig}     \usepackage{amsmath}     \usepackage{mathtools}     \usepackage{graphicx,epstopdf}     \usepackage{rotating}      \usepackage{float}     \usepackage{color}     \usepackage[numbers, square, comma, sort&compress]{natbib}     \bibpunct{[}{]}{,\!}{n}{}{;}     \usepackage[breaklinks=true, bookmarks=true, pdftoolbar=true, linktocpage=true,colorlinks=true,citecolor=blue]{hyperref}          \usepackage{setspace}     \usepackage{tocloft}     \usepackage[font=small,format=plain,labelfont=bf,textfont=it]{caption}          \begin{document}          \pdfbookmark[0]{Abstract}{abstract}     \begin{abstract}     This is the abstract.     \end{abstract}          \pdfbookmark[0]{Dedication}{dedication}     \dedication     Here is the dedication.          \pagebreak{}     \pdfbookmark[0]{Acknowledgements}{acknowledgements}     \acknowledgments     Here is the acknowledgement.          \begin{singlespace}          \clearpage     \phantomsection     \tableofcontents     \label{toc}     \clearpage          \phantomsection     \listoftables     \label{lot}     \clearpage          \phantomsection     \listoffigures     \label{lof}     \end{singlespace}               \pagebreak{}     \pdfbookmark[0]{List of Abbreviations}{listofabbreviations}     \listofabbreviations     \input{List-of-Abbreviations}          \pagebreak{}     \pdfbookmark[0]{List of Symbols}{listofsymbols}     \listofsymbols     \input{List-of-Symbols}          \include{Chapter_One}          \include{Chapter_Two}     \include{Chapter_Three}     %\include{Chapter-Four}     %\include{Chapter-Five}               \bibliographystyle{ieeetr}          \bibliography{PhDThesis_Bibtex_Final} % References file          \end{document}


title: Beamer handout mode: explicitly printing "half-way" frames

text: I have some fairly complex slides where I'd like to have an intermediate slide on the handout. (In order that I can have separate `\note` pages for two parts of the slide. Here's an MWE showing what the problem is:               \documentclass[handout]{beamer}          \begin{document}     \begin{frame}<1>[label=foo]     foo\pause bar     \end{frame}     \end{document}      Handout mode is printing "foobar" since it is ignoring the overlay specifications. This is normally fine, but I'd like a way to explicitly say "Hey, handout mode, this time, I really do mean just print slide 1 of this frame! Replacing `<1>` with `<1|handout:1>` doesn't work. Any advice? In the real test case, there's some `againframe` trickery to talk through half the slide, move onto a little tangent, then back for the second half of the first slide. I'd like to have a "halfway" slide on the handout so that it can be followed by my notes relating to what I should have said by that point (just before the tangent). * * * Edit: Note that this doesn't seem to depend on how the slides are incremented. That is, it isn't due to any weird behaviour of `\pause`. `\onslide<2>` and `\onslide<+>` both produce the same behaviour.


title: StrobeMediaPlayback.swf vs Vplayer.swf vs Aplayer.swf

text: According to the media9 documentation, the `media9` package comes with > ...an enhanced version of ‘StrobeMediaPlayback.swf’. In addition, two simple > player for video and audio, ‘VPlayer.swf’ and ‘APlayer.swf’ are included, > which can be used instead. My first impression is that `Aplayer.swf` is for audio files only (?), whereas `Vplayer.swf` is for video (although I have used it for videos with audio). I was wondering what's the difference between the three of them, and what could be the advantages of using one over the other.


title: Replicate the Singular Value Decomposition figure in LaTeX

text: I have tried to replicate a portion of this matrix decomposition system in LaTeX, but I am unable to draw the first and the last matrices with rectangular boxes.![enter image description here](http://i.stack.imgur.com/DrGXP.png) This is what I could do until now, which of course, is easy to write. I can use LatexDraw to draw this figure, but the figure will not look very elegant as this one:                \begin{equation}     \underbrace{\mathbf{A}}_{W \times D} = \underbrace{\mathbf{U}}_{W \times W} \times \underbrace{\mathbf{\Sigma}}_{W\times D} \times \underbrace{\mathbf{V}^{\text{T}}}_{D \times D} =      \left(      \begin{array}{ccccc}        \sigma_1\\         & . & & \text{\huge0}\\         & & .\\         & \text{\huge0} & & \sigma_r\\         & & & & 0      \end{array}     \right)     \end{equation}


title: Misalignment of Chapter number and chapter title in memoir southall chapterstyle

text: I have the number and chapter title in the southall chapterstyle in memoir class not aligned vertically. How to fix it?


title: How to make dvi show cyrillic letters?

text: I could copy the sentence "МАТЕМАТИЧКИ ВЕСНИК" into the LaTeX, however when I press the `dvi`, it does not show in the `dvi`. How to make the dvi show the sentence "МАТЕМАТИЧКИ ВЕСНИК"?


title: How to move frame down in LaTeX?

text: I am writing one article using top and bottom margin.                \usepackage[top=.5cm, bottom=.8cm, left=1cm, right=1cm, includefoot,showframe]{geometry}      I observe some spacing between frame and footer (here mdframed). How can i reduce spacing between footer and frame? ![enter image description here](http://i.stack.imgur.com/7s842.png)


title: Problem with legend in pgfplots

text: I want to make plot with fill area. I try this code               \documentclass[a4paper,12pt]{report}          \usepackage{pgfplots}     \definecolor{plotmain}{HTML}{97bbcd}          \pgfplotsset{every axis legend/.append style={at={(0.5,-0.17)},anchor=north,legend cell align=left}}          \begin{document}          \begin{figure}     \centering     \begin{tikzpicture}     \begin{axis}[     xlabel={x},     ylabel={y},     ymin=2.56286,     height=9cm,     width=15cm,     grid=major,     ]     \addplot[color=plotmain, draw=none,fill, fill opacity = 0.5,thick] coordinates {     (-4.77778,2.56286)     (-4.77778,27.60977)     (-3.55556,3.84069)     (-2.33333,2.58953)     (-1.11111,4.50066)     (0.11111,6.66082)     (1.33333,2.56286)     (2.55556,3.40638)     (3.77778,19.24780)     (5.00000,39.56775)     (5.00000,2.56286)     };     \addplot[color=plotmain, mark=*,mark options={plotmain,opacity = 1, fill=white,thick},thick] coordinates {     (-4.77778,27.60977)     (-3.55556,3.84069)     (-2.33333,2.58953)     (-1.11111,4.50066)     (0.11111,6.66082)     (1.33333,2.56286)     (2.55556,3.40638)     (3.77778,19.24780)     (5.00000,39.56775)     };     \addlegendentry{estimate}     \end{axis}     \end{tikzpicture}     \caption{A larger example}     \end{figure}          \end{document}      And I see this resut: ![enter image description here](http://i.stack.imgur.com/TsxsT.png) I have problem with legend. A see line from first plot without marks. How can I fix it? **Update.** If I use `\closedcycle` lines appear on a cycle. They look like a continuation of the main line. And if I use If I use negative numbers, the chart draws a line at zero. ![enter image description here](http://i.stack.imgur.com/dwAIT.png) If I use second solution (changing order) and try add two (four of the present) legend draws the wrong line. ![enter image description here](http://i.stack.imgur.com/jDfZA.png)               \begin{figure}     \centering     \begin{tikzpicture}     \begin{axis}[     xlabel={x},     ylabel={y},     ymax=42,     xmax=6.5,     height=9cm,     width=15cm,     grid=major,     axis lines=left,     ]     \addplot[color=plotmain, mark=*,mark options={plotmain,opacity = 1, fill=white,thick},thick] coordinates {     (-4.77778,27.60977)     (-3.55556,3.84069)     (-2.33333,2.58953)     (-1.11111,4.50066)     (0.11111,6.66082)     (1.33333,2.56286)     (2.55556,3.40638)     (3.77778,19.24780)     (5.00000,39.56775)     };     \addlegendentry{estimate}     \addplot[color=plotmain, draw=none,fill, fill opacity = 0.5,thick] coordinates {     (-4.77778,2.56286)     (-4.77778,27.60977)     (-3.55556,3.84069)     (-2.33333,2.58953)     (-1.11111,4.50066)     (0.11111,6.66082)     (1.33333,2.56286)     (2.55556,3.40638)     (3.77778,19.24780)     (5.00000,39.56775)     (5.00000,2.56286)     };     \addplot[color=red, mark=*,mark options={red,opacity = 1, fill=white,thick},thick] coordinates {     (-2,20)     (2.,3)     (5,10)     };     \addlegendentry{yueu}     \addplot[color=red, draw=none,fill, fill opacity = 0.5,thick] coordinates {     (-2,2.56286)     (-2,20)     (2.,3)     (5,10)     (5,2.56286)     };     \end{axis}     \end{tikzpicture}     \caption{A larger example}     \end{figure}


title: How can different numbering style be used for nested subfigures?

text: I want to display a figure demonstrating 3 cases. The case1 and case2 are shown using single images each. But case 3 needs 3 images. I have used nested subfigure as follows: However the captions go as (a), (b), (d), (e), (f). I want to give captions (a) (b) and (c) for each case, and(i), (ii), (iii) for each image in case 3. How is that possible? Thanks.               \begin{figure}[H]     \centering     \subfigure[ ]{     \includegraphics[width=110px,height=85px]     {images/case1.eps}     \label{fig:case1}     }     \subfigure[ ]{     \includegraphics[width=110px,height=85px]     {images/case2.eps}     \label{fig:case2}     }     \subfigure[]{     \subfigure[]{     \includegraphics[width=70px,height=60px]     {images/case3a.eps}}     \subfigure[]{     \includegraphics[width=70px,height=60px]     {images/case3b.eps}}     \subfigure[]{     \includegraphics[width=70px,height=60px]     {images/case3c.eps}}     }\\      I also tried adding `\thesubfigure` and `\addtocounter` as per the link: _Captioning nested subfigures with subcaption_ It produced captions (a), (b), (c) for the 3 subfigures. But it gives (d) to all the 3 sub-subfigures in case3.               \begin{figure}[H]     \centering     \subfigure[ ]{     \includegraphics[width=110px,height=85px]     {images/case1.eps}     \label{fig:case1}     }     \subfigure[ ]{     \includegraphics[width=110px,height=85px]     {images/case2.eps}     \label{fig:case2}     }     \subfigure[]{     \subfigure[]{     \renewcommand\thesubfigure{\alph{subfigure}1}     \includegraphics[width=70px,height=60px]     {images/case3a.eps}}     \subfigure[]{     \addtocounter{subfigure}{-1}     \renewcommand\thesubfigure{\alph{subfigure}2}     \includegraphics[width=70px,height=60px]     {images/case3b.eps}}     \subfigure[]{     \addtocounter{subfigure}{-1}     \renewcommand\thesubfigure{\alph{subfigure}3}     \includegraphics[width=70px,height=60px]     {images/case3c.eps}}     \addtocounter{subfigure}{-1}     }


title: LyX: cannot convert file. Error occured while running

text: I have been using LyX for about a year now and I have not encountered this problem. This happened two days ago and up to now I have still not been able to address this issue. I want to visualize my LyX document in `pdf`. I have uninstalled and installed LyX and yet the problem still persist. I keep on receiving this message:               LyX cannot convert file     Error occurred while running python-tt...      I am using LyX 2.0 on Window 7. could anyone help me out?


I have a problem with too long text in one cell. Text in cell is autocreated, and I cannot know previously how long will be it. When text is too long LaTeX pushes the cell off the bottom of the page. Is the some way to teach LaTeX automatically to transfer text on the next page (not out of page)? Maybe you can offer some package that can fix my problem. For table creating I use `longtable`. ![enter image description here](http://i.stack.imgur.com/Wwdof.png) Some example:               \documentclass{article}     \usepackage{longtable}     \begin{document}     \begin{longtable}{|p{0.2\textwidth}|p{0.7\textwidth}|}     Text & Steps \\ \hline       & 1.step \newline         2.step \newline         3.step \newline         4.step \newline         5.step \newline         6.step \newline         7.step \newline         ................. \newline         57.step \newline         58.step \newline         59.step \newline         60.step \newline         61.step \newline         62.step \newline         63.step \newline         64.step \newline         65.step \newline         66.step \newline         67.step \\ \hline     \end{longtable}     \end{document}      One more example:               \begin{longtable}{|p{3.2cm}|p{1.5cm}|p{1.5cm}|p{1.3cm}|} \hline     \textit{\textbf{\normalsize{Description:}}}     & \multicolumn{3}{p{7.5cm}|} {Some description of Table} \\ \hline     \textit{\textbf{\normalsize{Steps:}}} & \multicolumn{3}{p{7.5cm}|} {     1. step  \newline     2. step  \newline     3. step  \newline     4. step  \newline     5. step  \newline     6. step  \newline     7. step  \newline     ......   \newline     63. step \newline     64. step \newline     65. step \newline     66. step \newline     67. step      } \\  \hline     \textit{\textbf{\normalsize{Remarks:}}}         & \multicolumn{3}{p{7.5cm}|} {---} \\                     \hline     \textit{\textbf{\normalsize{Date:}}}     & \multicolumn{3}{p{7.5cm}|} {2012/10/23} \\                     \hline     \parbox[c]{\textwidth}{\textit{\textbf{\normalsize{Approval}}}}   & \normalsize{\parbox[c]{\textwidth}{+}} & \normalsize{\parbox[c]{\textwidth}{+}} & \normalsize{\parbox[c]{\textwidth}{\textbf{-}}} \\   \hline     \end{longtable}      ![one more example](http://i.stack.imgur.com/fvXXm.png)


title: \SweaveInput{...} with UTF-8 encoding?

text: Some hack here. In ?RweaveLatex manual, I found only paragraph about encoding in UTF-8 but considering Windows users: > >      The use of fancy quotes (see ‘sQuote’) can cause problems when >      setting R output.  Either set ‘options(useFancyQuotes = FALSE)’ or >      arrange that LaTeX is aware of the encoding used (by a >      ‘\usepackage[utf8]{inputenc}’ declaration: Windows users of >      ‘Sweave’ from ‘Rgui.exe’ will need to replace ‘utf8’ by ‘cp1252’ >      or similar) and ensure that typewriter fonts containing >      directional quotes are used. >   Currently running ubuntu, how can I make the SweaveInput aware of the UTF-8 encoding?


title: Is there a way to remove the period from "et al." in citations and the bibliography when using natbib?

text: Apologies if this has been asked and answered before, but while I've been able to resolve some of my queries from this resource, I can't seem to find an answer to this one. I have my own preferred bibliography style for my PhD dissertation, and I've managed to produce almost exactly what I want using `makebst.tex`. My style (`mythesis.bst`) removes all full stops (aka periods) from acronyms and abbreviations, including author name initials and journal abbreviations. However, "et al." irritatingly appears with the full stop in both the citation and bibliography. Is there a tweak I can make to the `mythesis.bst` file and/or `\cite` series of commands to remove the full stop? I also have a horrible feeling that "ed." (for editor) is going to appear with a full stop too, so a similar question applies. I'm using the TexLive 2011 distribution on Windows 7 and `JabRef` as my bibliography manager. Please be gentle, as (a) I'm a LaTeX beginner and (b) I'm a biologist!


title: Where is the argument?

text: I have this code on my hard disk and now I would like to understand it. Firstly I would like to know if this code is correct and logic or if there is another way to do the same thing.               \documentclass{article}     \usepackage{fp}          \newcommand*\macro[2][]{%       Option : #1\par % print the option in #1       \let\y #2 % to keep      \begingroup       \catcode`\(=1       \catcode`\)=2       \macrobis     }     \newcommand*\macrobis[1]{%     \endgroup     \scantokens{\def\temp{#1}}}          \begin{document}          \def\fct{x*x}          \macro[op]{\fct}(exp(1))          \FPeval\x{\temp}%     \FPeval\img{\y}%     x = \x\ donne  y = \img          \end{document}      `\begingroup` and `\endgroup` are here, I suppose, because the code changes the catcodes but tha call of macrobis is very strange. Where is the argument ? Can someone explain this code?


title: Fancy Handwritten Post it document

text: Recently I was asked by a professor to gather comments from all my class mates, anonimusly, regading his way of teaching in order to improve or keep some aspects. I thought to write each comment in a post it like box, which will be rotated, in handwritten fonts. This means that every post-it box will have different orientation and different handwritten font type. I have found some really good looking handwritten font styles here. So far I could only use `mdframed` but the result is not as fancy as I thought it will be. My code is               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{%         calc,%         fadings,%         shadings%     }     \usetikzlibrary{arrows,snakes,shapes}     \usetikzlibrary{backgrounds}          \newcommand{\Cloud}[2][180]% [angle], content     {   \begin{tikzpicture}[overlay]             \node[align=center, draw, shading=ball, text=white, cloud callout, cloud puffs=17, cloud puff arc=140, callout pointer segments=3, anchor=pointer, callout relative pointer={(#1:2 cm )}, aspect=4,scale=0.5] at (-3ex,0.5ex) {#2};     \end{tikzpicture}     }          \usepackage{mdframed}     \mdfdefinestyle{MyFrameBlue}{%         linecolor=red,         outerlinewidth=0.5pt,         roundcorner=5pt,         innertopmargin=\baselineskip,         innerbottommargin=\baselineskip,         innerrightmargin=20pt,         innerleftmargin=20pt,         backgroundcolor=blue!20!white}              \begin{document}             \begin{mdframed}[style=MyFrameBlue]             What a great lesson with a lot of fun features!!!             \end{mdframed}                 \Cloud[30]{Have a great Summer}         \end{document}      My output looks like that(it's in Greek Sorry!) ![enter image description here](http://i.stack.imgur.com/p8Hnk.png) Any idea on how to do it post-it like with handwritten fonts in greek?


title: Fancyheaders and special pages: contents, bibliography

text: I use the `fancyhdr` package and it works in general. Unfortunately, some "special" pages' headers, like those of the contents and bibliography, seem to resist every approach to format them. They show an uppercase "CONTENTS" and "BIBLIOGRAPHY" instead of the lowercase headers of the rest of the document. How can I configure their appearance or, in particular, make them lowercase? An example shows what I mean when you compile it:               \documentclass[twoside, openright]{report}     \usepackage{fancyhdr}          % Setup fancyhdr     \pagestyle{fancy} % Use fancy headers     \fancyhf{} % Clear all header and footer entries     \renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}} % how the chapter is supposed to be displayed in the headers     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} % how the section is supposed to be displayed in the headers     \renewcommand{\headrulewidth}{0.1ex} % Head line     \renewcommand{\footrulewidth}{0.1ex} % Foot line     \fancyfoot[LE,RO]{\thepage} % Footer     \fancyhead[LE]{\textit{\leftmark}} % Header     \fancyhead[RO]{\textit{\rightmark}} % Header     \fancypagestyle{plain}{\fancyhf{}\fancyfoot[LE,RO]{\thepage}\renewcommand{\headrulewidth}{0ex}} % Redefine plain style, it is used for pages with new chapters          \begin{document}          \tableofcontents     \chapter{chapter 1}     \chapter{chapter 2}     \chapter{chapter 3}     \chapter{chapter 4}     \chapter{chapter 5}     \chapter{chapter 6}     \chapter{chapter 7}     \nocite{*} \bibliography{?} % insert your own bibliography here or comment it out          \end{document}


title: How do I avoid Type3 fonts when submitting to ManuscriptCentral

text: I am trying to submit a publication to ManuscriptCentral. All I am allowed to do is to submit my tex file and any missing packages (it seems to have a fair selection of standard packages) and it will go away and compile it. I think it uses latex and then dvipdf to create PDF files - here is an extract from the log file that I can download from the server:               command: latex -interaction=batchmode diff.tex     Command Ok     This is TeX, Version 3.14159 (Web2C 7.4.5)          command: dvipdf diff.dvi     Command Ok     dvips: warning: no config file for `generic'      In other words, I can't really change how latex is invoked and what fonts are installed on the target system. The servers seems to choke on my tex file with a not too specific error message:               We are sorry, but there is a problem with your submitted file(s) named      x.tex.pdf. Our system cannot process this file. The most common reason for      this is badly embedded fonts or Type 3 fonts (which we do not support at the      moment). If possible, please change the font settings and/or re-distil this      PDF to a lower Adobe Acrobat version and try again.      The following additional help (available under 'Read more ...') makes me think it must be about the fonts in the tex file:               A Type 3 font error is due to bit mapped fonts in your document or missing      fonts used within the document. Bitmapped fonts display poorly on screen in PDF      files and sometimes cause printing problems. We recommend for Word Documents      that you embed your fonts and re-upload the file(s), or for PDF's save them      using Acrobat 6 (or lower).      So here is my question: What can I do in the tex file so that it chooses fonts that are in all likelihood present on the server and not of the Type 3 flavour? EDIT: Some more sleuthing prompted by egreg reveals the following: when I run pdffonts on the PDF file that the publisher creates from my tex files I get:               Error: PDF file is damaged - attempting to reconstruct xref table...     Error: Invalid XRef entry     Error: Top-level pages object is wrong type (null)      Oddly, when I compile them myself, pdffonts lists some fonts all of which are Type 1, CID TrueType, TrueType, or Type 1C. When I open the publisher PDF file with Adobe Reader and look at the Fonts I see two Type 3 fonts. How come ScholarShip manages to sneak them in and I don't? Additional info: Some of the figures that are being included fail the Rapid Inspector for image files "fail due to fonts that are not embedded". Is that a hint?


title: Arabic numbers mirrored in Arabic environment (ConTeXt)

text: In my arabic environment the arabic numbers are mirrored. Minimal Example:               \definefont[Sheh][name:Scheherazade*arabic at 18pt]        \definestartstop[Arab][commands=\setups{Arabic}]     \def\Arab{\doArab}     \def\Arab[#1]{         \startArab                  \setupalign[r2l]\Sheh \startalignment [middle] #1 \stopalignment         \stopArab         }          \starttext         \Arab[          إِنَّ مَثَلَ عِيسَىٰ عِندَ ٱللَّـهِ كَمَثَلِ ءَادَمَ خَلَقَهُ مِن تُرَابٍ ثُمَّ قَالَ لَهُ كُن فَيَكُونُ ﴿٥٩﴾     ]          The verse-number is wrong, it shows 95, but it is 59 in the code.       \stoptext      I think this is an effect of `\setupalign[r2l]`, so how to fix this, that > (٥٩) is indeed interpreted as it is (59). Of course I could always mirror the numbers myself, but that would be not very suitable.


title: TikZ: a point on the ray

text: > **Possible Duplicate:**   >  What is the equivalent for ([nodesep=10pt]{B}A) in TikZ? Consider a ray `[AB)`, where `A` and `B` are `\coordinate`s in TikZ. One wants to select a point `M` on this ray such that `|AM| = d`, where `d` is some given number. The easisest way to do this?


title: How does LaTeX make line-breaking for word that can not fit in cell?

text: Often in my tables LaTeX doesn't want to line-break a word that can not fit in a cell. How I can teach it to split such a word? As you can see in my example below the same word in some cases will be split, in another cases not. I want to teach LaTeX to split all words (that can not fit on the page) automatically. Can you help me? **Some example:**               \begin{longtable}{|p{0.1\textwidth} | p{0.3\textwidth}|} \hline     Text                       & Remarks   \\ \hline     new zoogeographical region &           \\ \hline     zoogeographical region     &           \\ \hline     \end{longtable}      ![enter image description here](http://i.stack.imgur.com/9b1Nr.png)


title: How to determine the height of a beamer block?

text: To keep content from jumping between slides in a `beamer` presentation, I would like to use an `overlayarea` environment. By trial and error, one can determine the appropriate amount of space to reserve. However, I would like to determine it automatically. To do this, I want to determine the height of one or more `block` environments. In the following example, the position of "Some text" changes between the first and second slides. I would like for it not to move. To that end, I would like to enclose Block 1 and Block 2 in an `overlayarea`. I want to determine the heights of Block 1 and Block 2, as well as the vertical space between them, and then use that as the height parameter for the `overlayarea`.               \documentclass{beamer}          \mode<presentation>     {       \usetheme{Frankfurt}     }          \begin{document}          \begin{frame}      Some text           \only<1>{       \begin{block}{Block 1}        Other text       \end{block}            \begin{block}{Block 2}        Still more text       \end{block}     }            \only<2>{         \begin{block}{Block 3}          Yet more text         \end{block}     }     \end{frame}          \end{document}      This is what I want to end up with:               \documentclass{beamer}          \mode<presentation>     {       \usetheme{Frankfurt}     }          \begin{document}          \begin{frame}      Some text           \begin{overlayarea}{\textwidth}{\myheight} %\myheight is the quantity to be determined        \only<1>{       \begin{block}{Block 1}        Other text       \end{block}            \begin{block}{Block 2}        Still more text       \end{block}     }            \only<2>{         \begin{block}{Block 3}          Yet more text         \end{block}     }      \end{overlayarea}     \end{frame}          \end{document}      N.B.: This question is about how to find the width of a `block`, but I have not found anything about finding the height.


title: If I'm about to write a book on LaTeX, should I wait for a LaTeX3 release?

text: From time to time I plan to write a beginner's book on LaTeX. But I'm not sure of this: isn't it better to wait some time more until a workable release of LaTeX3 reaches the market? I'm really paralized by this cruel doubt...


title: How to break a line in a table

text: > **Possible Duplicate:**   >  How to add a forced line break inside a table cell In a table I would like to have a line break in the text inside a cell. Is there an easy way to do so, or do I have to create a new line without borders? The same holds true for other situations such as breaking a line in a caption for instance.


title: How to add a forced line break inside a table cell

text: I have some text in a table and I want to add a forced line break. I want to insert a forced line break without having to specify the column width, i.e. something like the following:               \begin{tabular}{|c|c|c|}     \hline     Foo bar & Foo <forced line break here> bar & Foo bar \\     \hline     \end{tabular}      I know that `\\` inserts a line break in most cases, but here it starts a new table row instead. * * * A similar question was asked before: How to break a line in a table


title: Write column header on multiple line

text: > **Possible Duplicate:**   >  How to add a forced line break inside a table cell I would like to write the header of a column on multiple line. I tried with this commands but it doesn't work:               \begin{tabular}{|c|l|l|l|l|l|l|}     \hline \\     $\alpha$      & \multicolumn{1}{|c|}{GallusGallus \\ CC \\ t = 104}     & \multicolumn{1}{|c|}{GallusGallus \\ MF \\ t = 124}     & \multicolumn{1}{|c|}{GallusGallus \\ BP \\ t = 110}     & \multicolumn{1}{|c|}{BosTaurus \\ CC \\ t = 99}     & \multicolumn{1}{|c|}{BosTaurus \\ MF \\ t = 217}     & \multicolumn{1}{|c|}{BosTaurus \\ BP \\ t = 205}     \end{tabular}      How can I fix?


title: floatrow + caption = odd behaviour + wrong figure numbers

text: Looking for means to control vertical alignment in subfigures, I decided to use floatrow package, but later found it behavior quite strange. The issue is with figure captions, which may disappear or have wrong count. Example: ![floatrow caption problem](http://i.stack.imgur.com/jEodQ.png)               \documentclass{book}          \usepackage{caption}     \usepackage{subcaption}     \usepackage{floatrow}     \usepackage{graphicx}          \begin{document}          Here is Figure \ref{fig:test}:          \thisfloatsetup{heightadjust=all,valign=t}     \begin{figure}[H]         \caption{Caption that is missing.} % An error occurs when I place \caption and \label before \end{figure}           \label{fig:test}         \begin{subfigure}{\textwidth}             \centering             \includegraphics[width=5cm]{example-image-a}             \caption{Test caption a}\label{fig:test1}             \vspace{.5cm}         \end{subfigure}         \begin{subfloatrow}         \ffigbox[]             {\includegraphics[width=5cm]{example-image-b}}             {\caption{Test caption b}\label{fig:test1}}         \ffigbox[]             {\includegraphics[width=4.5cm]{example-image-c}}             {\caption{Test caption c}\label{fig:test2}}         \end{subfloatrow}     \end{figure}          As you see, figure caption is missing. Besides, Figure \ref{fig:working-caption-test} has got the wrong number.          \begin{figure}[H]         \caption{Caption that is not missing.}         \includegraphics[width=5cm]{example-image-a}         \label{fig:working-caption-test}     \end{figure}          \end{document}       What can be wrong? I have freedom to avoid using the package, so if anyone knows other ways of controlling subcaption+subfigure vertical and horisontal alignments, that will help. ****UPDATE**** I managed caption numbering, but the problem is with heights of subfigures. All rows get the same height, so if A is small, there’ll be a rather large ugly margin under it. Placing `\thisfloatsetup` after the first `subfloatrow` does not help. ![enter image description here](http://i.stack.imgur.com/fPy2j.png)               \documentclass{book}          \usepackage{caption}     \usepackage{subcaption}     \usepackage{floatrow}     \usepackage{graphicx}          \begin{document}          Here is Figure \ref{fig:test}:          \thisfloatsetup{heightadjust=all,valign=t}     \begin{figure}[H]         \ffigbox[]{         \begin{subfloatrow}             \ffigbox[]                 {\centering\includegraphics[width=2cm]{example-image-a}}                 {\subcaption{Test caption a}\label{fig:test1}}         \end{subfloatrow}         \begin{subfloatrow}         \ffigbox[]             {\includegraphics[width=5cm]{example-image-b}}             {\subcaption{Test caption b}\label{fig:test1}}         \ffigbox[]             {\includegraphics[width=4.5cm]{example-image-c}}             {\subcaption{Test caption c (pretty long one xxxxx xxxxxxxx)}\label{fig:test2}}         \end{subfloatrow}         }        {\caption{Caption that was missing.}\label{fig:test}}     \end{figure}          As you see, figure caption is not missing any more and Figure \ref{fig:working-caption-test} has the right number. However, the height of subloatrow with A is bigger that it should           \begin{figure}[H]         \includegraphics[width=5cm]{example-image-a}         \caption{Caption that is not missing.}\label{fig:working-caption-test}     \end{figure}          \end{document}


title: Create a keyboard shortcut for changing listing placement in LyX

text: From inline to float and vice versa. Is it possible? I don't see anything immediately obvious in LyX Functions.


title: Chemical process flow sheets TikZ/PGF

text: I'm working with simulation and control of chemical process-systems and I'm trying to get a grip on how to make nice looking process flow sheets. On the web everybody is referring to Microsoft Visio, but I'm on a mac and I would like to make my flowsheets slightly more flexible when it comes to using different platforms. Ideally, I would like to use TikZ/PGF or similar. Q1: Is there a TikZ library, for Chemical Engineering, similar to that of MS Visio? Q2: Could one generate a diagram as presented below with TikZ? (...) Q3: ... and make it easy to reproduce, i.e. start building your own library? EDIT: Q4: How can one generate the picture? I have a problem with the repeating and rotating structures, e.g. the valves. I would prefer if I could be able to do something like this (beware pseudo code. I have no idea how I could implement this in tikz)               \documentclass{standalone}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}          def node makeValve(<relative position>)    % generates the entire valve structure as one node     def node makeCSTR(<relative position>)     % generates the entire reactor (Mr in the picture) as one node          \node[] (feedFlow) ;     \draw[->] (feedFlow)--(\makeValve(2,0))--(\makeCSTR(1,0)) ;          \end{tikzpicture}     \end{document}      ![Chemical flowsheet of a CSTR-reactor and a distillation column](http://i.stack.imgur.com/M2LPr.png)


title: synctex problem with -output-directory in TeXLive

text: I am currently using Windows 7, TeXLive2011, and TeXworks 0.4.3. I want to put all temporary files in `tmp` directory located in the same working directory as the `.tex` file. But, I want the final `.pdf` file in the same directory as the `.tex` file, not in `tmp` directory. I did the following:               pdflatex -synctex=1 -output-directory=tmp foo.tex      It put all temporary files in `tmp` directory, but also `foo.pdf`. So, I created a batch file to copy `foo.pdf` from `tmp`directory to the working directory.               :: %1 = tex file basename (without extension)     :: %2 = working directory          :: remove quotes in the basename tossed by TeXworks     for /f "useback tokens=*" %%a in ('%1') do set basename=%%~a     :: remove spaces in the basename tossed by TeXworks     set basename=%basename: =%          :: change / to \ in the directory name tossed by TeXworks     set dirname=%2     set dirname=%dirname:/=\%          :: create tmp directory if not exist     IF NOT EXIST %dirname%\tmp mkdir %dirname%\tmp          pdflatex -synctex=1 -output-directory=tmp %basename%.tex          :: open pdf in tmp so that synctex works in TeXworks     texworks %dirname%\tmp\%basename%.pdf          copy %dirname%\tmp\%basename%.pdf %dirname%\%basename%.pdf      But I have to open `foo.pdf` in `tmp` to make the forward/inverse search work in TeXworks. This works good enough to me, except one thing. After executing the above batch file, TeXworks opens two windows: one for `foo.tex`, one for `tmp\foo.pdf`. Inverse search from `tmp\foo.pdf` to `foo.tex` works good, but if I do `Ctrl+click` in `foo.tex`, it opens `foo.pdf`, but synchronizes with `tmp\foo.pdf`. Of course, `foo.tex` does not synchronize with `foo.pdf`, because sync file is written for `tmp\foo.pdf`. If I do not copy `tmp\foo.pdf` to `foo.pdf` in the original working directory, it works well, because there is no `foo.pdf` that TeXworks can open. Would there be any workaround for this?


title: Best practices - How should one go about drawing lots of rectangular (=similar) shapes?

text: This is rather general inquiry, with intent to find out how to go about this the best way with the less time-consuming the better. How would you draw a graphics with lots of rectangles (or other similar forms) with TikZ?   * Would you make each bit a node?   * Would you use some advanced node positioning methods, or maybe use a matrix? Little explanation for the example below: it's a sketch of a lab machine. There are obviously lots of rectangular shapes and nearly equally many nodes "pointing" to them. On the right of the nodes (and currently not visible) are the same rectangular shapes, just rotated by 90°, in the sense of a sectional drawing. ![picture](http://i.imgur.com/btKCS48.png) ## MWE 01 (picture below), first attempt               \documentclass[     11pt,     a4paper     ]     {scrreprt}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}          \usepackage{         tikz,         setspace,         hyperref     }          \usetikzlibrary{         external,         calc,         matrix,         fit,         positioning,         calc     }          \tikzset{     descr/.style={     draw,     rectangle,     text width=3.5cm,     minimum height=1cm, %use this because text width makes the text bottom-aligned     align=center}     }          \begin{document}     \begin{center}     \begin{tikzpicture}[font=\small]     %the following foreach loop would obviously increase the speed of drawing the shapes on the left, but it is, as far as I can see, entirely without any coherent content -> a foreach loop is unfortunately of no use, also because of different lengths and heights     %\foreach \y in {0,2,4,6,8}{     %\node[draw, rectangle, text width=5cm, text height=1cm, align=center] at (0,\y) {aaa};}     \node[draw, rectangle, text width=4cm, text height=1.5cm, align=center] (node01) at (0,2) {node1};     \node[draw, rectangle, text width=4cm, text height=2cm, align=center] (node02) at (0,4) {node2};     \node[draw, rectangle, text width=5cm, text height=1.5cm, align=center] (node03) at (0,6) {node3};     \node[draw, rectangle, text width=3cm, text height=1.5cm, align=center] (node04) at (0,8) {node4};     \node[draw, rectangle, text width=4cm, text height=1.5cm, align=center] (node05) at (0,10) {node5};     %     %the 'descriptive' nodes on the right can be placed in this matter and the loop enables a somewhat uniform 'descriptive' look     %but with using a loop, I am clueless as to how I can name each node then     \begin{scope}[xshift=6cm]     \foreach \x/\y in {{Stuff and lots of other words}/0,Word/2,Text/4,aaa/6,bbb/8}{         \node[descr] at (0,\y) {\x};}     \end{scope}     \end{tikzpicture}     \end{center}     \end{document}      ## Picture for MWE 01 ![enter image description here](http://i.stack.imgur.com/UKhUC.png)


title: Is there a LaTeX wrapper for use in Google Docs?

text: I collaboratively edit documents in Google Docs. Unfortunately, there are no LaTeX macros/wrappers I know of for Google Docs. So, editing a TeX file on Google Docs is like going back to the old days when you had to edit LaTeX in plan text. Does anybody know of a LaTeX wrapper for Google Docs/Drive?


title: tikz matrix alignment problem

text: I'm trying to draw a explanation of SAD (Sum of Absolute differences). After a lot of tweaking I have something that sort of looks OK except that the horizontal as well as the vertical alignment/distances are terrible! And, as you can see, everything is hardcoded. How can I get everything to line up beautifully? Label Right which isn't aligned with `Left` and `Center` as well as the vertical distance between the 3 "rows". The `Left, Center & Right` matrixes should probably be moved to the right a bit to have everything centered on some imaginary vertical axis. To add a offset repetable until it looks better is a pain since there are many values to change, e.g. for the grids. Output: ![sad](http://i.stack.imgur.com/FUpuW.png) MWE:               \documentclass[convert={density=300,size=640x480,outext=.png}]{standalone}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage{times}     \usepackage[T1]{fontenc}          \usepackage{tikz}     \usepackage{adjustbox}     \usetikzlibrary{calc, matrix}          \begin{document}          \begin{adjustbox}{max size={.95\textwidth}{.8\textheight}}         \begin{tikzpicture}             \draw[step=0.5cm,color=lightgray] (-.75,-.75) grid (.75,.75);             \matrix (template) [matrix of nodes,nodes={inner sep=0pt,text width=.5cm,align=center,minimum height=.5cm}]{             2 & 5 & 5 \\             4 & 0 & 7 \\             7 & 5 & 9 \\             };             \node[label={[xshift=0cm, yshift=0cm]Template}] at (template.north) {};                  \draw[step=0.5cm,color=lightgray] (1.75,-.75) grid (4.25,.75);             \matrix (search) [matrix of nodes,nodes={inner sep=0pt,text width=.5cm,align=center,minimum height=.5cm}] at (3,0){             2 & 7 & \node[red]{5}; & \node[red]{8}; & \node[red]{6}; \\             1 & 7 & \node[red]{4}; & \node[red]{2}; & \node[red]{7}; \\             8 & 4 & \node[red]{6}; & \node[red]{8}; & \node[red]{5}; \\             };             \node[label={Search Image}] at (search.north) {};                  \draw[step=0.5cm,color=lightgray] (-1.75,-3.75) grid (-.25,-2.25);             \matrix (left) [matrix of nodes,nodes={inner sep=0pt,text width=.5cm,align=center,minimum height=.5cm}] at (-1,-3){             0 & 2 & 0 \\             3 & 7 & 3 \\             1 & 1 & 3 \\             };             \node[label={Left}] at (left.north) {};                  \draw[step=0.5cm,color=lightgray] (.25,-3.75) grid (1.75,-2.25);             \matrix (center) [matrix of nodes,nodes={inner sep=0pt,text width=.5cm,align=center,minimum height=.5cm}] at (1,-3){             5 & 0 & 3 \\             3 & 4 & 5 \\             3 & 1 & 1 \\             };             \node[label={Center}] at (center.north) {};                  \draw[step=0.5cm,color=lightgray] (2.25,-3.75) grid (3.75,-2.25);             \matrix (right) [matrix of nodes,nodes={inner sep=0pt,text width=.5cm,align=center,minimum height=.5cm}] at (3,-3){             \node[red]{3}; & \node[red]{3}; & \node[red]{1}; \\             \node[red]{0}; & \node[red]{2}; & \node[red]{0}; \\             \node[red]{1}; & \node[red]{3}; & \node[red]{4}; \\             };             \node[label={Right}] at (right.north) {};                  \matrix (sad) [matrix of nodes] at (1,-5) {             20 & 25 & \node[red]{17}; \\             };             \node[label={SAD}] at (sad.north) {};             % ..             \end{tikzpicture}         \end{adjustbox}         \end{document}


title: pgf(plots) node shadow/opaque pin

text: Is it possible to place a `shadow`/`fill`/`opaque` setting on _text_ of a node `pin`? I know I can do that with the actual node, but I am using `\node` in `pgfplots` to mark some stuff on graphs, and it would be great if I could make a white filling in the text area to make it more clear. Of course, if you know a better way to achieve the same thing in `pgf`, let me know. Code I've got so far is below. I tried putting something like `[opaque=0.5]` after `pin`, but it seems it has no such options, and I wasn't able to find anything relevant to `pin` text in `pgf` documentation.               \tikzset{small dot/.style={fill=black,                                circle,scale=0.2}}          \node[small dot, pin=120:{$100\ k\Omega$}] at (axis description cs:0.5,0.61) {};


title: reference amsthm theorem with item list inside

text: Here is my minimum example. Click from right to left 2-1-1 and notice that it jumps correctly to item 2 then item 1. But then it doesn't jump to remark 1, but instead to the entire first page, as it does when an invalid link is specified. Why is this? It must have to do with `amsthm`, because when I remove that, it works. But I don't want to remove it since in the real file its predefined styles are used.               \documentclass[a4paper,12pt]{article}     \usepackage{amsthm}     \usepackage[pdfstartview=FitH]{hyperref}     \newtheorem{_Remark}{Remark}     \begin{document}     \begin{_Remark}     \label{rmk:1}     \begin{enumerate}     \item \label{rmk:1a}this is a.     \item \label{rmk:1b}this is b.     \end{enumerate}     \end{_Remark}     \ref{rmk:1}-\ref{rmk:1a}-\ref{rmk:1b}     \end{document}


title: Table, rotatebox and itemization

text: I'm trying to achieve something like this               + --------------------------------------     +      | - Item entry one with multiple     +  A   |   rows blablabla     +  A   | - Item entry with blabla     +      | - Item entry     + --------------------------------------      So here some explanations:   * In the left column, I want to have text but rotated by 90 degree (sorry, don't know how to write this in the example above ^^).   * Rotated text should be aligned vertically   * Itemization should not have any margins.   * paralist package is not an option, because it causes a compile error (I use some other packages that might cause the problem) At the moment, I'm doing something like this:               \documentclass[12pt,twoside,openright,a4paper]{memoir}     \usepackage{soul}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{decorations.pathmorphing}     \usepackage{enumitem}     \usepackage{tabularx}     \usepackage{booktabs}     \usepackage[table]{xcolor}     \usepackage{tabu}          \begin{document}     \begin{tabular}{ m{0.4cm} p{7cm} }        \rotatebox{90}{AA} &           \begin{itemize}                [label=\Square,leftmargin=*,                 nosep,noitemsep,partopsep=0pt,topsep=-35pt,after=\strut]             \item Item entry one with multiple rows blablabla           \end{itemize}           \\     \end{tabular}     \end{document}      My problems are   * The rotated text is fixed at the top, not centered vertically. I also tried a `\centering` in the `rotatebox`, but no effect.   * The itemization has a lot of margins. Why? I define `topset` to be negative?!? Thank you for your help! I'm starting to get nuts about this. If there is a solution without tables, e.g., floating boxes, it would also be appreciated!


title: Alignment of a tabular with respect to text outside of the tabular

text: In the picture I am wondering if it is possible to align the first row of the table with the word "Ciphertext" instead of having the table vertically centered? ![enter image description here](http://i.stack.imgur.com/a4o0l.png)               \documentclass[12pt,letterpaper]{article}     \usepackage[margin=1in]{geometry}     \usepackage{fancyhdr, float}          \usepackage{amsmath, amssymb, amsthm}     \usepackage{cleveref}     \usepackage{algorithm2e}     \usepackage{enumerate}     \usepackage{graphicx}          \lhead{... \\ ...}     \chead{\textsc{Homework 2}}     \rhead{... \\ ...}          \lfoot{}     \cfoot{}     \rfoot{\thepage}          \renewcommand{\headrulewidth}{0.01em}     \pagestyle{fancy}     \addtolength{\headsep}{1em}     \setlength{\headheight}{28pt}          \newcommand{\vigenere}{Vigen\`{e}re }     \newcommand{\colsp}{@{\hskip 0.2in}}          \newcommand{\comment}[1]{%       \text{\phantom{(#1)}} \tag{#1}     }          \theoremstyle{definition}     \newtheorem*{answer}{Answer}     \theoremstyle{remark}     \newtheorem{claim}{Claim}     \newtheorem{lemma}{Lemma}          \begin{document}     \thispagestyle{fancy}          \subsection*{Chapter 4}          \begin{enumerate}     \item[\textbf{4.10.}]         Encrypt each of the following \vigenere plaintexts using the given keyword and the \vigenere tableau (Table 4.1).         \begin{enumerate}         \item[(a)]             Keyword: \texttt{hamlet} \\             Plaintext: \texttt{To be, or not to be, that is the question.}         \item[(b)]             Keyword: \texttt{fortune} \\             Plaintext: \texttt{The treasure is buried under the big W.}         \end{enumerate}     \item[\textbf{4.11.}]         Decrypt each of the following \vigenere ciphertexts using the given keyword and the \vigenere tableau (Table 4.1).         \begin{enumerate}         \item[(a)]             Keyword: \texttt{condiment} \\             Ciphertext:              \begin{tabular}{l \colsp l \colsp l \colsp l \colsp l}                 \texttt{r s g h z} & \texttt{b m c x t} & \texttt{d v f s q} & \texttt{h n i g q} & \texttt{x r n b m} \\                 \texttt{p d n s q} & \texttt{s m b t r} & \texttt{k u}       &                    &             \end{tabular}          \item[(b)]         \end{enumerate}     \item[\textbf{4.13.}]     \item[\textbf{4.20.}]     \item[\textbf{4.22.}]     \item[\textbf{4.23.}]     \end{enumerate}          \end{document}


title: package right similar to tufte-book

text: Is there any package right similar to tufte-book? Using `\marginpar`, the following (Default) could be produced, but I want to have the Target; i.e. to spread the page header over the margin. ![enter image description here](http://i.stack.imgur.com/wrRIB.jpg) Finally I want to produce the page header positioned like the following . ![enter image description here](http://i.stack.imgur.com/9aU0L.jpg)