title: How to find command TexMaker used

text: As I'm still VERY new to Tex I have been using TexMaker (niavely) to generate my pdf's. I have a doc I have been working on for some time that someone else wants to manually generate with my tex files on a remote computer. They asked me what command I used to created the document. How do I find the command that TexMaker would run if I was just to use command line options (and not TexMaker)? I looked in the log file that is generated but nothing really jumped out at me.


title: What is the difference of \mathop, \operatorname and \DeclareMathOperator?

text: One sees all kind of versions in source files for defining something like a limit etc. So my question is which one serves what purpose. Is there any "best practice" in chosing one over the other?


title: Beamer overlay images in column environment

text: I have a frame with the two columns, one for an image, and one for itemized text. For example,               \frame{\frametitle{hello}           \begin{columns}[onlytextwidth]         \begin{column}{0.4\textwidth}           \centering           \includegraphics[width=40mm]{pic1.png}         \end{column}              \begin{column}{0.6\textwidth}         \begin{itemize}           \item statement 1           \item statement 2         \end{itemize}         \end{itemize}         \end{column}       \end{columns}               }      I want to specify an overlay, such that `pic1` appears along with statement 1 and `pic2` appears with statement 2. How do could I do this?


title: multi row tables

text: I'm trying to make a table that has column headings with the units underneath the heading. I using the `\multirow` command, below is a section of the code (I can't add the image of the table output as I am a new user and have no rating to include an image). My problem is the first column heading is distorted. Does anyone know what I'm doing wrong, or able to suggest a better way of doing this?               \begin{table}[ht]     \caption{Crystallisation optimisation 96 well screen} % title of Table     \centering % used for centering table     \begin{tabular}{c c c c c} % centered columns (4 columns)%     \hline\hline     \multirow{1}Well & [Protein] & pH & [MgCl$_{2}$] & Precipitant& \\      & (mg.mL$^{-1}$)& & (M)& \\     \hline % inserts single horizontal line     A1 & 7 & 7 & 0.1 & 25\% PEG400\\     A2 & 7 & 7 & 0.1 & 30\% PEG400\\     A3 & 7 & 7 & 0.1 & 35\% PEG400\\     A4 & 7 & 7 & 0.1 & 40\% PEG400\\          \hline     \end{tabular}     \end{table}      Thanks


title: How to use mathfont with the family

text: To be more specific i need **Arev font** in **math mode** using only the family fav or favm, but the way I did not work.               \documentclass[a4paper]{article}     \usepackage[T1]{fontenc}          % family     \newcommand{\fonte}[2]{       {\fontfamily{#1}\selectfont #2}     }          \parindent=0pt     \pagestyle{empty}     \begin{document}          \subsection*{Arev}          Math mode          \fonte{favm}{$f(t) = \frac{T}{2\pi} \int{\frac{1}{\sin\frac{\omega}{t}}}dt$}          \end{document}


title: pmatrix without changing font size

text: In Plain TeX with the `amstex` package, is there a way to tell `\pmatrix` to NOT change font size? E.g. when I do:               \sum_{\pmatrix a \\ b \\ c \endpmatrix}      I end up having to insert `\scriptstyle` three times in front of the a, the b, and the c.


title: AMS article section headings in sans-serif

text: I want to produce an AMS article document using only a sans-serif font. The following almost achieves this:               \documentclass{amsart}     \renewcommand{\familydefault}{\sfdefault}          ...      However, section headings are still typeset in roman. How can I get also the section headings in the standard sans-serif font?


title: Combining invoice and datatool to create serial invoices

text: I want to generate invoices based on a CSV table. My approach looks like this:               \documentclass{letter}     \usepackage{invoice}     \usepackage{datatool}     \address{ABC AG \\         Nonamestreet 4 \\         1100 Vienna \\         bill@example.com}     \date{16. September 2013}     \begin{document}         \DTLloaddb{bills}{billdata.csv}     \DTLforeach{bills}     {\firstname=firstname}     {\lastname=lastname}     {\caddress=customeraddress}     {\tariffname=tariffname}     {\service=service}     {\rateperunit=rateperunit}     {\unitcount=unitcount}     {     \begin{letter}{\firstname~ \lastname \\ \caddress}     \opening{Invoice}     Dear customer \lastname! This is your current bill.     \begin{invoice}{Euro}{20}     \ProjectTitle{\tariffname}     \Fee{Regular charge} {\rateperunit} {\unitcount}     \end{invoice}     \closing{Best regards, ABC AG}     \end{letter}     \clearpage     }     \end{document}      The CSV file has the following structure:               firstname   lastname    customeraddress tariffname  service rateperunit unitcount     John    Doe Musterstraße 4  Tariff1 Call    0.04    4     ...      I then compile the `.tex` file with PDFLaTeX. But I'm always getting this error:               ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.     ...                                                        l.36 \NeedsTeXFormat{LaTeX2e}[                                1995/12/01]     ?       and               ! Emergency stop.     ...                                                        l.36 \NeedsTeXFormat{LaTeX2e}[                                   1995/12/01]     You're in trouble here.  Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.      I am using the `texlive` package of Ubuntu 13.04, and I also tried that with `csvsimple`, ending up with the exact same error.


title: Can we have two pages with different number of columns?

text: I want to write a paper where the first should consist of a single column and the next page should have 2 column format, is there any command available in Latex, please help


title: Renumber bibliography in references

text: I am looking to get a continuation of numbers in my bibliography under my articles section, but as I have included a `@misc` to include hyperlinks in the articles section this is what I get: ![enter image description here](http://i.stack.imgur.com/gnfaB.png)                   \documentclass[11pt,fleqn]{book}     \usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry} \usepackage{xcolor}     \definecolor{ocre}{RGB}{243,102,25}     \usepackage{avant}     \usepackage{mathptmx}     \usepackage{microtype}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{calc}     %\usepackage[refsection=chapter,sorting=nyt,backend=biber]{biblatex}     \usepackage[refsection=chapter,defernumbers=true,sorting=nyt,sortcites=true,autopunct=true,babel=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}     \defbibheading{bibempty}{}     \addbibresource{5.bib}     \usepackage{empheq}     \usepackage{calc}     \usepackage{makeidx}     \makeindex     \newcommand*{\refname}{Bibliography}     \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @book{book1,         address = {New York},         publisher = {John Wiley \& Sons},         author = {Egan, Willian F.},         title = {Phase-Lock Basics},         year = {1998},         %volume = {3},         %series = {2},         edition = {1},         pages = {3--4},         %month = {January}     }          @article{art1,         address = {City},         publisher = {Myself},         author = {Doe, John},         title = {Synthesizer Modulation},         year = {1979},         %volume = {14},         %number = {6},         %pages = {1--8},         month = {June}     }          @book{book2,         address = {New York},         publisher = {John Wiley \& Sons},         author = {Gardner, Floyd M.},         title = {Phaselock Techniques},         year = {2005},         %volume = {14},         %number = {6},         pages = {6--28},         %month = {June}     }          @book{book3,         address = {California},         publisher = {Benjamin/Cummings},         author = {Norman S.},         title = {Control Systems Engineering},         year = {1995},         %volume = {3},         %series = {2},         edition = {2},         pages = {231--232},         %month = {February}     }          @article{art2,         address = {Plantation},         publisher = {Myself},         author = {Me.},         title = {Lock Time Performance},         year = {1990},         %volume = {14},         %number = {6},         %pages = {1--8},         month = {June}     }          @misc{pll_wikipedia,         howpublished = {\url{http://en.wikipedia.org/wiki/Phase-locked loop}},         author = {Wikipedia},         %note = {Last visited on <insert date here>},         title = {Phase-Locked Loop},     }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          \chapter{Chapter 1}     Some  text \autocite{book1,art1}.               \section{Second}          Some  text \autocite{book2}.          Some  text \autocite{book1}.          Some  text \autocite{art2}.          Some  text \autocite{art1}.          Some  text \autocite{pll_wikipedia}.          \chapter*{Bibliography}     \addcontentsline{toc}{chapter}{\textcolor{ocre}{Bibliography}}     \section*{Books}     \addcontentsline{toc}{section}{Books}     \printbibliography[heading=bibempty,type=book,prefixnumbers={B}]     \section*{Articles}     \addcontentsline{toc}{section}{Articles}     \printbibliography[heading=bibempty,type=article,prefixnumbers={A}]     \printbibliography[heading=bibempty,type=misc,prefixnumbers={A}]     \chapter{Chapter 2}     Some  text \autocite{book2}     \chapter*{Bibliography}     \addcontentsline{toc}{chapter}{\textcolor{ocre}{Bibliography}}     \section*{Books}     \addcontentsline{toc}{section}{Books}     \printbibliography[heading=bibempty,type=book,prefixnumbers={B}]     \section*{Articles}     \addcontentsline{toc}{section}{Articles}     \printbibliography[heading=bibempty,type=article,prefixnumbers={A}]     \printbibliography[heading=bibempty,type=misc,prefixnumbers={A}]     \end{document}       I wanted the Articles numbering to continue within the chapter although I have a hyperlink reference.


title: Something like \enumerate, but with custom numbers at each \item

text: I'm doing homework from a particular book, and each question is numbered after the page number and the question number. For example 52.2, 52.9, 53.13, etc. (Note that they are not sequential.) How do I do something that will work like the `enumerate` environment, but instead of 1. 2. 3., etc. at each `\item`, I put a custom number?


title: Line numbering in a philological text

text: I am typesetting a text in the classics. A part of it consists of numbered verses. For each verse line I would like to show (1) a line number, (2) the verse text, and (3) an optional "clause". As there are tens of thousands of these verses and most are rather short, I would like to set the document with two columns. Some verses are very long, so it is important to fill them like paragraphs. Finally, the line numbers that appear to the left of the verses should be set manually (they are generated by a script). The following is the best I have come up with so far (note that the command "clause" is defined to ensure that the clauses appear on the right even after a line break):               \documentclass[9pt, DIV=22]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \setlength{\parindent}{0cm}     \begin{document}     \twocolumn     \newcommand\clause[1]{{%         \unskip\nobreak\hfil\penalty50         \hskip2em\hbox{}\nobreak\hfil\textbf{#1}%         \parfillskip=0pt \finalhyphendemerits=0 \par}}          \section{Traktate}     \subsection{Ad Demetrianum}     {\tiny 1} \textbf{1} Oblatrantem te          % Most verses are short.     {\tiny 2} et aduersus Deum          {\tiny 3} qui unus et uerus est     \clause{T2gdz}          {\tiny 4} ore sacrilego     \clause{Tg}          {\tiny 5} et uerbis impiis          {\tiny 6} obstrepentem frequenter,     \clause{Pg}          {\tiny 7} Demetriane,          {\tiny 8} contempseram          {\tiny 9} uerecundius et melius existimans          {\tiny 10} errantis inperitiam silentio spernere     \clause{T2d}          {\tiny 11} quam loquendo dementis insaniam prouocare.     \clause{V3d}          {\tiny 12} Nec hoc sine magisterii diuini auctoritate faciebam,     \clause{TT12g}          {\tiny 13} cum scriptum sit:          % Many verses span multiple lines, a few are very long.     {\tiny 14} In aures inprudentis noli quicquam dicere, ne quando audierit inrideat sensatos sermones tuos, [Prou. 23, 9]     \clause{bib}          \end{document}      I wonder: Is there a way to put the line numbers in a "column of their own"? This would mean that the numbers are right-aligned, and that the verse texts are set in a separate column to the right of the line numbers. The obvious solution seems to be to use tables. Here the problem is that most table packages do not support \twocolumn or multicol and tables spanning multiple pages. I almost succeeded with the "tabu" package using a trick to make it work with multiple columns. But a problem that I have been unable to solve is that when using tables long verses are not split across pages. Since some verses take up half of a page this is not acceptable. If there was a way to specify a prefix that will be prepended to each physical line after the text has been filled, the above example could be modified to fulfill all the requirements.


title: tikz mindmap looks bad

text: Following Sigur's suggestion in a comment I increased the level distances so that the node separation looks reasonable, but the image I get is still weird (the transitions continue to have an undesired orange color): ![enter image description here](http://i.stack.imgur.com/yAKP2.jpg) Expected result would be more like this: ![enter image description here](http://i.stack.imgur.com/h5B4o.png) MWE (from https://www.sharelatex.com/blog/2013/09/04/tikz-series-pt5.html, and my example is compiled on sharelatex at https://www.sharelatex.com/project/52d47f206202b37430000733).               \documentclass[article, a4paper, 12pt, oneside]{memoir}          \usepackage{tikz}     \usetikzlibrary{mindmap}     \pagestyle{empty}     \begin{document}     \begin{tikzpicture}[grow cyclic, text width=2cm, align=flush center, every node/.style=concept, concept color=orange!40,     level 1/.style={level distance=6cm,sibling angle=90},     level 2/.style={level distance=4cm,sibling angle=45}]          \node{ShareLaTeX Tutorial Videos}        child [concept color=blue!30] { node {Beginners Series}             child { node {First Document}}             child { node {Sections and Paragraphs}}             child { node {Mathematics}}             child { node {Images}}             child { node {bibliography}}             child { node {Tables and Matrices}}             child { node {Longer Documents}}         }         child [concept color=yellow!30] { node {Thesis Series}             child { node {Basic Structure}}             child { node {Page Layout}}             child { node {Figures, Subfigures and Tables}}             child { node {Biblatex}}             child { node {Title Page}}         }         child [concept color=teal!40]  { node {Beamer Series}             child { node {Getting Started}}             child { node {Text, Pictures and Tables}}             child { node {Blocks, Code and Hyperlinks}}             child { node {Overlay Specifications}}             child { node {Themes and Handouts}}         }         child [concept color=purple!50] { node {TikZ Series}             child { node {Basic Drawing}}             child { node {Geogebra}}             child { node {Flow Charts}}             child { node {Circuit Diagrams}}             child [concept color=green!40]  { node {Mind Maps}}         };          \end{tikzpicture}     \end{document}


title: urls do not show up in in biblatex-mla Works Cited list

text: Using the texlive distribution on Arch Linux. I have:               \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=mla]{biblatex}     \bibliography{sources.bib}     ...      In sources.bib I have:               @article{taylor,     %...     howpublished = {Web},     url = {http://www.etc.com/blah/blah/blah}     }      Everything shows up except the url. I've also tried putting `\usepackage{url}` in the preamble and changing the url line to `url = {\url{http://www.etc.com/blah/blah/blah}}` and it makes no difference.


title: ConTeXt: Hyphens for sequential page numbers in an index (register)

text: # Background Page numbers in an index are often formatted using hyphens for references on consecutive pages, such as:               1, 4-7, 10      # Code Consider the following example:               \defineregister[photographer][]          \setupregister[photographer][       pagestyle=normal,       indicator=no,     ]          \starttext        First        \photographer{Yousuf Karsh} \page       Second        \photographer{Yousuf Karsh} \page       Third        \photographer{Yousuf Karsh} \page       Fourth        \photographer{Yousuf Karsh}             \completephotographer     \stoptext       # Problem I would like to produce the behaviour of hyphenated page numbers using ConTeXt, however the example code produces: ![Page numbers](http://i.stack.imgur.com/yWBwL.png) I thought that it would produce `1-4` instead of `1, 2, 3, 4`. The documentation describes two "tricks" to accomplish this feature:   1. Automatically collapse page ranges: `[[Command/{{{1}}}|\\{{{1}}}]]`. I have no idea what that means or how to use it -- there is no complete example. Also, other documentation indicates not to use command, opting for `pagecommand` or `textcommand` instead.   2. Use `\startregister[index][mymouse]{mouse} ... \stopregister[index][mymouse]`. This does not apply in my case because I don't know when the last consecutive reference will be added to the document: the document is created dynamically. # Question How do you collapse page ranges in ConTeXt when you don't know where the first and last references are inserted into the document?


title: Where can I find "user tags" in texstudio?

text: In the features of TeXstudio they indicate the ability to use "tags". If you google for "user tags texstudio", you also find a blog defining user tags in TeXstudio. Basically, because I wanted to quickly replace some frequent text that I use. E.g. replacing `h2o2` by `\ce{H2O2}`. I had implemented this in the user tags of TeXmaker, but I cannot find a similar menu in TeXstudio. ## Screenshot of TeXstudio ![screenshot](http://i.stack.imgur.com/bctly.png) Yet, in TeXmaker (similar build to TeXstudio from what I hear), you can easily find the user tags. ## Screenshot of TeXmaker ![enter image description here](http://i.stack.imgur.com/tibJL.png) ## My questions are:   1. Where can I define the user tags in TeXStudio?   2. I am guessing TeXstudio may not have this feature. Is there any other way for me to quickly replace text that I type often as in the given example above?


title: How to draw a graph by indicating volume of 3D elements but not their position

text: I have about five thousand observations which I would like to plot in a graph. Since the range of values is wide (from 1 to 108,000, with 90% of the observation taking a value of 2, 99% of the observations taking a value between 1 and 6, and just one observation taking the max value of 108,000) I thought that the only way to represent them graphically would be with a volume graph--that is, 3D. The circumference of the sphere will range from 3.89 to 185.62 (then possibly--keeping the same ratio--0.08cm to 3.7cm) in the figure. This is my data along with the circumference (in cm) of a sphere of volume equivalent to the value of `Var1` ![enter image description here](http://i.stack.imgur.com/ewQ4R.png) EDIT: `TikZ` in drawing a circle requires as attribute the radius not the circumference as I wrongly thought. I correct the formula below accordingly. Of course, the graph doesn't need to show clearly all the small values. What I would like to give is the idea of a big sphere floating in a sea of micro spheres. Something like this: ![enter image description here](http://i.stack.imgur.com/U6ODr.png) First let's define a script to get the radius from the volume of the sphere. The `R` script is:               radiusFromVolume <- function(volume){       radius <- (volume/((4/3)*pi))^(1/3)       radius <- radius/10       radius <- round(radius, digits=2)       return(radius)     }      From the R script I will obtain a vector of radius values. Now, the hard part. On these values I would like to draw a sphere for each item in the vector and dispose them (randomly?) in my figure. Thanks to this answer (by Tom Bombadil) I come out with this basic script which gives me two spheres of radius 0.06 and 2.96.               \documentclass[a4paper]{article}          \usepackage{tikz}          \begin{document}          \begin{tikzpicture}         \draw (0,0) circle (2.96cm);         \shade[ball color=blue!10!white,opacity=0.70] (0,0) circle (3.7cm);         \draw (3,0) circle (0.06cm);         \shade[ball color=blue!10!white,opacity=0.70] (3,0) circle (0.08cm);     \end{tikzpicture}          \end{document}      Moving from this script, in pseudocode what I am trying to get through is:               vector <- {volume values} % The values are actually ordered from bigger to smaller to avoid the small spheres to be covered by the biggest spheres     figure_box <- {(-4,-4),(4,4)}          \begin{tikzpicture}               for (item in vector) {          size <- item      coordinates <- ( random(>-4 && <4) , random(>-4 && <4) )     \draw (coordinates) circle (size cm);     \shade[ball color=blue!10!white,opacity=0.70] (coordinates) circle (size cm);          }     \end{tikzpicture}      Is it possible to obtain with `TeX` and `tikz`? EDIT: Why not to use a log/log scale? The problem with my data is that I have one big outlier. A log-log plot of my data will be something like this ![enter image description here](http://i.stack.imgur.com/2cZ5c.png) or like this ![enter image description here](http://i.stack.imgur.com/HH0pf.png) Clearly my outlier--for being so far off the other values--doesn't even show (you can only tell it is there from the X scale). Also log scales are not that easily understood by the median viewer. (On the contrary, differences in ball volumes are much easier to see...)


title: MiKTeX 2.9 problem with XeLaTeX and a Bengali script

text: I wanted to create a Bengali document using Latex. I am using MiKTeX 2.9 in windows XP. I installed all the fonts and the packages for MiKTeX 2.9. I copied the code given here and here. Both of them are not working. Both the cases I got following error:               ("C:\Program Files\MiKTeX 2.9\tex\latex\fontspec\fontspec.cfg"          ! Undefined control sequence.     <argument> \c_keys_code_root_tl                              fontspec/Ligatures/Historical     l.8 ...tureoption{Ligatures}{Historic}{Historical}          ?      At the end, it is producing a `.pdf` file but without any content. Could anybody please help me with this?


title: Using a bib key containing an ampersand (e.g 2000A&AS..143..391S) in table?

text: I am currently stuck with this issue. The following is a typical .bibtex entry of a paper that I need to reference:               @ARTICLE{1996A&A...307L..41V,        author = {{Vink}, J. and {Kaastra}, J.~S. and {Bleeker}, J.~A.~M.},        title = "{A new mass estimate and puzzling abundances of SNR Cassiopeia A.}",        journal = {\aap},        keywords = {ISM: ABUNDANCES, ISM: INDIVIDUAL OBJECTS: CAS A, ISM: SUPERNOVA REMNANTS, X-RAYS: ISM},        year = 1996,        month = mar,        volume = 307,        pages = {L41-L44},        adsurl = {http://adsabs.harvard.edu/abs/1996A%26A...307L..41V},        adsnote = {Provided by the SAO/NASA Astrophysics Data System}     }      I use `\citet{1996A&A...307L..41V}` as an entry in a table to reference this. If the bib key (e.g: 1996A&A...307L..41V) does not contain an ampersand, the reference will work perfectly (and will also reference properly if not in a table). However, if it does contain one and is in the table, I get the error message: > Argument of \@for has an extra }. I have tried to put a backslash before the ampersand, though, this just returns the error: > Missing \endcsname Also, I'm not sure if such a 'fix' would help, as I need the bibcode to be the same as the one in my .bib file. I know I `can' take the ampersand out.. However, I am scripting the output straight from importing these bibcodes, so I would very much like to be able to leave the ampersand in the bibcode. Table:               \begin{table}[h!]     \caption{Integrated values of object}     \centerline{     \begin{tabular}{ccccl}     \hline     Freq & Flux  & $\Delta$Flux  & Reference & Comment \\     \hline     408 &   640.0 & --- & \citet{1983ApJS...51..345M}    & comment1 \\     408 &   600.0 & --- & \citet{1996A&A...307L..41V}    & comment2 \\     \hline     \end{tabular}}     \end{table}      So the first reference will work, however, the second will not. Hope this clears it up. Thanks in advance


title: How can I replicate affine Dynkin diagrams in Kac's textbook?

text: I'm sorry for asking a similar question to this tex.SE question, but my motivation is different. I'd like to replicate the affine Dynkin diagrams as in Kac's textbook, see pp. 53, 54 and 55 of the third edition. Here are links to the pages in Google Books: p. 53, p. 54 and p. 55. Judging from the fonts used, he or the typesetter used simple TeX symbols as much as possible, including the double-lined arrows, `\Leftarrow` etc., instead of using generic diagramming packages. How can I do that? It's a stupid question, not applicable to drawing generic diagrams, but I liked Kac's "minimalism". Also, his textbook is like a Bible in this field of mathematics, so I just want to follow his example, even in typesetting affine Dynkin diagrams! Thanks in advance. * * * (Update) Thanks to the answers of all of you, I put the following diagrams in my paper: ![affine Dynkin diagrams](http://i.stack.imgur.com/itW8b.jpg) see page 9 of the paper.


title: How can I write this expression with box using MathJAX?

text: I'm a beginner of LaTeX. I'm trying to write below expression using MathJAX. ![expression what I want to write](http://i.stack.imgur.com/3tZWP.png) I could write expression without box using array package. But I couldn't draw a box within array. Can you help me please? Thank you for your reading my question.


title: Full-page figure without extraneous whitespace in text?

text: My question is along the lines of How do I ensure that figures appear in the section they're associated with?, but slightly different. I have a figure that occupies a full page. By default, LaTeX wants it to go on the very last page of the document. The previous question was answered with Rob Hyndman's suggestion of using a `\FloatBarrier` from the `placeins` package to demand that it appears before the start of a section. But if I do that, I get a pattern like this: > page (n-1): Section S of text ends halfway down the page. > > page n: Full-page figure. > > page (n+1): Section S+1 begins at the top of the page. This is arguably better than having the figure at the end of the document, but it isn't the behavior I want. What I really want is the full-page figure in the middle, but Section S+1 beginning on page (n-1), so that the text flows normally from page (n-1) to page (n+1), with a page in the middle for the figure. Is there an easy way to achieve this? The code looks something like this (`\FIGURE` comes from the `JHEP3` class supplied by the Journal of High-Energy Physics, but I don't think this is sensitive to details of that file).               \FIGURE[!p]{     \begin{tabular}{cc}     \includegraphics[scale=0.5]{curve1.pdf}&     \includegraphics[scale=0.5]{curve2.pdf}\\     \includegraphics[scale=0.5]{curve3.pdf}&     \includegraphics[scale=0.5]{curve4.pdf}\\     \includegraphics[scale=0.5]{curve5.pdf}&\includegraphics[scale=0.5]{curve6.pdf}\\     \includegraphics[scale=0.5]{curve7.pdf}&\includegraphics[scale=0.5]{curve8.pdf}     \caption{Curves for case A (left), case B (right)}     \end{tabular}     \label{fig: constraints}}


title: How to make a Cayley table?

text: I'm trying to make a Cayley table such as the one shown here http://dogschool.tripod.com/cayley.html Thus this question doesn't help Making an odd shaped table


title: Resume: How to create a textbox ?

text: I am creating a resume template. The picture below looks bad, is there a way to fit the entire bullet point "subject" into a box, so it is properly aligned ? Or is there a better solutions that you would suggest?               \documentclass[10pt]{article}           %\usepackage{setspace}     %\singlespacing          \oddsidemargin=0.0in      \evensidemargin=0.0in      \textwidth=6.5in      \marginparwidth=0.5in     \headheight=0pt      \headsep=0pt      \textheight=9.0in      \pagenumbering{gobble}     \begin{document}     \centerline{\huge \bf My Name}     \vspace{2.5pt}     \centerline{$\bullet$ Naitonality $\bullet$ (Country code)phone number}     \centerline{Email}     \noindent{\LARGE \bf Education} \\     {\line(1,0){475}}     \noindent{\textbf{School} \hfill{Time}} \\     \hspace{10in}{Sixth Form } \hfill{Time}\par     \noindent{\hspace{0.4in} $\bullet$ Subjects: physics, biology, chemistry, japanese, english, mathematics, history, geography, design and technology, religous studies}          \end{document}      ![enter image description here](http://i.stack.imgur.com/4Zr3O.png)


title: Some problems creating german bibliography using Bibtex

text: I am trying to generate a german bibliography using Bibtex. Here are some three examples of my items:               @book{Kirchgässner-Wolters-2007,       AUTHOR        = "Kirchgässner, Gebhard and Wolters, Jürgen",       EDITOR        = "",       TITLE         = "Introduction to Modern Time Series Analysis",       language      = "",       edition       = "1",       series        = "",       address       = "",       PUBLISHER     = "Springer",       month         = "",       YEAR          = "2007",       volume        = "",       number        = "",       note          = "",       url           = ""     }               @unpublished{Chun-Lin-2010,       AUTHOR        = "Chun-Lin, Liu",       TITLE         = "A Tutorial of the Wavelet Transform",       language      = "",       month         = "February",       year          = "2010",       NOTE          = "unpublished",       url           = ""     }           @misc{Hyndman-Athamasopoulos-2012,        author = "Hyndman, Rob J. and Athanasopoulos, George",        title = "Forecasting: principles and practice",        year = "2012",        url = "https://www.otexts.org/book/fpp",        note = "[Online; accessed 21-February-2014]"      }      The code I used is this:               \documentclass[a4paper,twoside,10pt]{report}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage[german]{babelbib}           \begin{document}     \nocite{*}     \bibliography{bibtemplate}      \bibliographystyle{babunsrt}               \end{document}      This results in the following bibliography: ![enter image description here](http://i.stack.imgur.com/qeUf3.png) I have three problems with this: (1) I would like to have it without numbers but instead sorted and with indents for the following lines of the same item (2) What should I do to change the "unpublished" to german version? (3) I keep getting a warning message `package babelbib error no url command defined but field url used` I find some solutions for one problem, but the others remain unsolved or it rusuls in new problems. If I could, I would place a bounty on this, but have to wait for that for two days... I would be grateful for any help!


title: \begin{align} not working when centering math equation

text: I've read a few posts here about center math equations and all of them make use of `\begin{align} *Math symbols* \end{align}` Now I've included the `\usepackage{amsmath}` before the begin document line. But I keep getting this error: ![enter image description here](http://i.stack.imgur.com/1NA8B.png) Any ideas guys? I'm a latex noob Here is some code:               \documentclass{article}     \usepackage{amsmath}          \begin{document}          \section{Situation 1}          \begin{align}     $J_{(j)} = \sum\limits_{i:r(i,j)=1} ((\theta\textsuperscript{(j)})\textsuperscript{T}x\textsuperscript{(i)} - Y_{i,j})^2 + \frac{\lambda}{2}\sum\limits_{k=1}^n(\theta_k\textsuperscript{(j)})^2$     \end{align}          \end{document}


title: Arrow tikz cd don't appear

text: Tikzcd arrows don't appear in my pdf document. Why?               \documentclass[12pt,a4paper]{book}          \usepackage[latin1]{inputenc}     \usepackage[brazilian]{babel}     \usepackage[T1]{fontenc}          \usepackage{indentfirst,amsmath,amsfonts,amstext,amssymb,amscd,bezier,amsthm}     \usepackage[dvips]{graphicx}          \usepackage{biocon}     \usepackage{cancel}     \usepackage{setspace}     \usepackage{graphicx}     \usepackage{tabularx}     \usepackage{longtable}     \usepackage{stackrel}     \usepackage{tikz}     \usepackage{tikz-cd}     %\usepackage[usenames,dvipsnames]{pstricks}     %\usepackage{epsfig}     %\usepackage{pst-grad}     %\usepackage{pst-plot}     \usepackage[all]{xy}     \usepackage{hyperref}     \usepackage{xspace}     \usepackage{color}     \usepackage{psfrag}     \usepackage{mathrsfs}     \usepackage{upgreek}                            % letra grega nao fica em italico     \usepackage{makeidx}                            % ï¿½ndice remissivo \makeindex     \usepackage{fancyhdr}     \usepackage{fancybox}     \usepackage[rm]{titlesec}     \usepackage{float}                  % H insere figura exatamente no local          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          % ATALHOS          \renewcommand{\baselinestretch}{1.1}          \usepackage{enumerate,fancyhdr,subfig,multicol,stackrel,framed}     \usepackage{tikz}     \usepackage{tikz-cd}          %Operadores     \newcommand{\mdc}{\operatorname{mdc}}     \newcommand{\mmc}{\operatorname{mmc}}     \newcommand{\sen}{\operatorname{sen}}     \newcommand{\tg}{\operatorname{tg}}     \newcommand{\dom}{\operatorname{D}}     \newcommand{\cdom}{\operatorname{CD}}     \newcommand{\ima}{\operatorname{Im}}     \newcommand{\idx}{\operatorname{id}}     \newcommand{\car}{\operatorname{car}}     \newcommand{\irr}{\operatorname{Irr}}     \newcommand{\gal}{\operatorname{Gal}}     \newcommand{\aut}{\operatorname{Aut}}     \newcommand{\oo}{\operatorname{o}}     \newcommand{\Frac}{\operatorname{Frac}}     \newcommand{\Char}{\operatorname{char}}     \newcommand{\norma}{\operatorname{Norma}}     \newcommand{\vt}{\operatorname{\vartheta}}     \newcommand{\tr}{\operatorname{tr}}     \newcommand{\T}{\operatorname{T}}     \newcommand{\N}{\operatorname{N}}     \newcommand{\Ann}{\operatorname{Ann}}     \newcommand{\trdg}{\operatorname{tr.deg.}}     \newcommand{\grau}{\operatorname{grau}}     \newcommand{\suchthat}{\;\ifnum\currentgrouptype=16 \middle\fi|\;}          %Comandos     \newcommand{\ds}{\displaystyle}     \newcommand{\tf}{\therefore}     \newcommand{\raw}{\Rightarrow}     \newcommand{\lfraw}{\Leftrightarrow}     \newcommand{\lfaw}{\Leftarrow}          %Letras mathbb     \newcommand{\NN}{\mathbb N}     \newcommand{\RR}{\mathbb R}     \newcommand{\ZZ}{\mathbb Z}     \newcommand{\CC}{\mathbb C}     \newcommand{\QQ}{\mathbb Q}     \newcommand{\PP}{\mathbb P}     \newcommand{\FF}{\mathbb F}     \newcommand{\Oo}{\mathcal O}     \newcommand{\Uu}{\mathcal U}     \newcommand{\Mm}{\mathcal M}          \newtheorem{teo}{Teorema}[chapter]     \newtheorem{lemma}[teo]{Lema}     \newtheorem{cor}[teo]{Corolário}     \newtheorem{prop}[teo]{Proposição}     \newtheorem{defi}[teo]{Definição}          \theoremstyle{definition}     \newtheorem{exmp}{Exemplo}[chapter]     \newtheorem{ex}{Exercício}[chapter]          \theoremstyle{remark}     \newtheorem{obs}{Observação}[chapter]          %###########################################################################     %     \font\largefont= pzcmi scaled 3500 \font\numberfont= pzcmi scaled     3000     \titleformat{\chapter}[display]       %{\normalfont\Large\sffamily % sans serif       {\normalfont\Large % roman       }       {%\titlerule[3pt]%        \filright        \rule[32pt]{.7\linewidth}{4pt}        \hspace{-8pt}        \shadowbox{        \begin{minipage}{.15\linewidth}          \begin{center}               \textsl{\bf {\large \chaptertitlename}}\\            \vspace{1ex}            {\bf {\numberfont \thechapter}}\\            \vspace{1ex}          \end{center}        \end{minipage}}       }       {-10pt}       {\filcenter                \sl                \bf                   \Huge          }       [\vspace{-1cm}\singlespacing\hfill\rule{.8\textwidth}{0.5pt}\\     \vskip-2.8ex\hfill\rule{.7\textwidth}{4pt}\onehalfspacing\vspace*{-1ex}]     \titlespacing{\chapter}{0pt}{*4}{*1}               \titleformat{\section}[block]     {\normalfont\bfseries} {\thesection}{0.5em}{}          \titleformat{\subsection}[block]     {\normalfont\large\bfseries} {\thesubsection}{0.5em}{}          \setlength{\unitlength}{1cm}     \setlength{\baselineskip}{1.4\baselineskip}          \renewcommand{\baselinestretch}{1.5}          %###########################################################################################               %Configuração do tamanho da página e das margens     \setlength{\oddsidemargin}{0.5cm}     \setlength{\textwidth}{16cm}% largura     \setlength{\textheight}{23.5cm}%comprimento     \setlength{\topmargin}{-0.7cm}% margem superior     \setlength{\evensidemargin}{0.5 cm} %margem esquerda               \let\no\operatorname          \setlength{\topmargin}{-0.1 in} \setlength{\textwidth}{16cm}     \setlength{\textheight}{23cm} \setlength{\oddsidemargin}{-0.2cm}     \setlength{\evensidemargin}{-0.2cm}          \makeindex                                      % comando para fazer o ï¿½ndice remissivo     \makeatletter     \numberwithin{equation}{section}          \tikzset{degil/.style={                 decoration={markings,                 mark= at position 0.5 with {                       \node[transform shape] (tempnode) {$\backslash$};                       %\draw[thick] (tempnode.north east) -- (tempnode.south west);                       }                   },                   postaction={decorate}     }     }          \begin{document}          %Sumário     %\tableofcontents \vspace*{12cm} \thispagestyle{empty}     %\thispagestyle{empty}          \begin{tikzcd}           S_{\RR(x)/\RR}=\{v_{\pi}\mid\pi=x0-a,a\in\RR\;\text{em}\;\pi=(x-c)(x-\overline{c}),c\in\CC,\Im(c)>0\}\cup\{v_{\infty}\}\arrow[leftrightarrow]{d}{\text{bijeção}} & \\           \text{semiplano superior compactificado}\arrow[leftrightarrow]{r}{\text{bijeção}} & \text{disco com bordo}          \end{tikzcd}          %\begin{thebibliography}{99}     %\end{thebibliography}          \end{document}


title: Superscripts and subscripts in this equation

text: I have this equation:               g^{\mathsmaller{\left(1\right)}} \left( \tau \right) = \frac{\langle E_{\mathsmaller{s}}^{\mathsmaller{*}}\left( 0 \right) E_{\mathsmaller{s}} \left( \tau \right) \rangle}{\langle \lvert E_{\mathsmaller{s}} \rvert^{\mathsmaller{2}} \rangle}      which looks like this. ![equation](http://i.stack.imgur.com/akqcT.png) Latex always brings out the OCD in me so I have some questions:   * Why is the first subscript `s` lower down than the 2nd one? How can I (should I?) force them to be at the same level or does latex know what its doing?   * Shouldn't the complex conjugate symbol `*` and the squared `2` be higher up?


title: Wrap text in table column header AND fit table width to pagewidth

text: How do I get a table where the header in column 2 is wrapped, while keeping the width of the table = textwidth? As you can see from the attached figure, I have a long title for the 2nd column, which makes the column very wide, resulting in wrapping of the text (actual entries, not the title) in the first column. I guess in a more general sense, I want to prioritize wrapping of column titles over wrapping of actual column entries. (I am not stuck on using tabularx; I am happy to try any other package if it works.)               \documentclass[12pt]{report}      \usepackage{tabularx}           \begin{document}          \begin{table}[h]     \begin{tabularx}{\textwidth}{XXXX}     \hline     \multicolumn{4}{c}{xxx xx xxxx}                                                                                \\ \hline     \textbf{miRNA}  & \multicolumn{1}{l}{\textbf{logFC (ABCDEF vs ABCFED)}} & \textbf{PValue} & \textbf{False Discovery Rate}    \\ \hline     abcd efg hijka  & -1.854                                                & 9.52E-11        & 8.41E-10                         \\     abcd efg hijka  & -1.815                                                & 3.38E-09        & 2.42E-08                         \\ \hline     \end{tabularx}     \end{table}     a lot of text here to show text width a lot of text here to show text width a lot of text here to show text width a lot of text here to show text width a lot of text here to show text width a lot of text here to show text width a lot of text here to show text width          \end{document}      ![what I get now](http://i.stack.imgur.com/SSgSs.jpg)


title: TexStudio cannot compile presentation

text: I have been using TexStudio for a long time with no problem in creating pdf files. But now I have to make a presentation with LaTeX and it does not compile. I tried every tutorial that appears when you search "latex presentation" Most of them use the beamer package. When I open the .tex file and Press F1, the cursor starts spinning and nothing happens. Two files appear: `filename.gz(busy)` and `filename.log` the `.gz` file is empty, the log file contains this :               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (preloaded format=pdflatex 2014.3.6)  27 MAR 2014 20:50     entering extended mode     **testbmr.tex     (C:\Users\asdf\Downloads\testbmr.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\beamer\base\beamer.cls"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\beamer\base\beamerbasercs.sty"     Package: beamerbasercs 2013/12/25 (rcs-revision 31cc758a62ae)     )     Document Class: beamer 2013/12/02 3.33 A class for typesetting presentations (r     cs-revision 332bfd3ce558)     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\beamer\base\beamerbasemodes.sty"     Package: beamerbasemodes 2013/09/03 (rcs-revision 768f2d98ca64)     \beamer@tempbox=\box26     \beamer@tempcount=\count79     \c@beamerpauses=\count80          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\beamer\base\beamerbasedecode.sty"     Package: beamerbasedecode 2010/05/01 (rcs-revision efa082c6111d)     \beamer@slideinframe=\count81     \beamer@minimum=\count82     )     \beamer@commentbox=\box27     \beamer@modecount=\count83     ) ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"     Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)     Package ifpdf Info: pdfTeX in PDF mode is detected.     )     \headheight=\dimen102     \headdp=\dimen103     \footheight=\dimen104     \sidebarheight=\dimen105     \beamer@tempdim=\dimen106     \beamer@finalheight=\dimen107     \beamer@animht=\dimen108     \beamer@animdp=\dimen109     \beamer@animwd=\dimen110     \beamer@leftmargin=\dimen111     \beamer@rightmargin=\dimen112     \beamer@leftsidebar=\dimen113     \beamer@rightsidebar=\dimen114     \beamer@boxsize=\dimen115     \beamer@vboxoffset=\dimen116     \beamer@descdefault=\dimen117     \beamer@descriptionwidth=\dimen118     \beamer@lastskip=\skip41     \beamer@areabox=\box28     \beamer@animcurrent=\box29     \beamer@animshowbox=\box30     \beamer@sectionbox=\box31     \beamer@logobox=\box32     \beamer@linebox=\box33     \beamer@sectioncount=\count84     \beamer@subsubsectionmax=\count85     \beamer@subsectionmax=\count86     \beamer@sectionmax=\count87     \beamer@totalheads=\count88     \beamer@headcounter=\count89     \beamer@partstartpage=\count90     \beamer@sectionstartpage=\count91     \beamer@subsectionstartpage=\count92     \beamer@animationtempa=\count93     \beamer@animationtempb=\count94     \beamer@xpos=\count95     \beamer@ypos=\count96     \beamer@showpartnumber=\count97     \beamer@currentsubsection=\count98     \beamer@coveringdepth=\count99     \beamer@sectionadjust=\count100     \beamer@tocsectionnumber=\count101          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\beamer\base\beamerbaseoptions.sty     "     Package: beamerbaseoptions 2013/03/10 (rcs-revision 47431932db0d)      ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty"     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks14     ))     \beamer@paperwidth=\skip42     \beamer@paperheight=\skip43          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.sty"     Package: geometry 2010/09/12 v5.6 Page Geometry          ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty"     Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO)     Package ifvtex Info: VTeX not detected.     )     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty"     Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional     )     \Gm@cnth=\count102     \Gm@cntv=\count103     \c@Gm@tempcnt=\count104     \Gm@bindingoffset=\dimen119     \Gm@wd@mp=\dimen120     \Gm@odd@mp=\dimen121     \Gm@even@mp=\dimen122     \Gm@layoutwidth=\dimen123     \Gm@layoutheight=\dim      I need to start writing my presentation urgently, and I cannot do anything except banging my head into walls.. Any reccomendations? Another IDE? Another packet manager? Thanks for any help.. ## System Specs Windows 7 64 bit TexStudio 2.7.0 MiKTeX 2.9


title: Looking for the font which has light condensed Greek letters (matching `lmttlc`)

text: I am using the `mathastext` package typsetting some historic literatures. I've chosen the Latin Modern Typewriter Light Condensed font for default font just on the consideration of saving paper. Here is the MWE:               \documentclass{article}     \usepackage[no-math]{fontspec}     \setmainfont{Latin Modern  Mono Light Cond}     \usepackage{amsmath}     \usepackage[basic]{mathastext}     \begin{document}     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut,     placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero,                  nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.     \begin{gather*}     1+\frac{1}{4}+\frac{1}{9}+\cdots =\frac{\pi}{6}\\     \frac{\ln x}{\ln\alpha}=\log_{\alpha}x\\     f(x)=\frac{1}{\sigma\sqrt{2\pi}}\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)     \end{gather*}     \end{document}      ![output](http://i.stack.imgur.com/1jlZF.gif) You can see the Greek letters are too big. I compiled the code file via XeLaTeX BTW.


title: thmbox with normal font and section numbering

text: How can i use "normal font" for definitions and "italic" for remarks (and similar environments like them) in thmbox environment declaring some commands. Also i need numbering as "section" or "subsection".               \documentclass[11pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm]{geometry}          \usepackage{thmtools}     \declaretheorem[style=normalfont, thmbox=M, name=Definition]{definition}     \declaretheorem[style=remark, thmbox=M, name=Remark]{remark}     \begin{document}     \section{Trying}     \begin{remark}     This is a remark.     \end{remark}     \begin{definition}     This is a definition. i just need this as normal font.     \end{definition}     in addition, numbering should be in section (or subsection).     \end{document}


title: Making section headers look like chapter headers

text: I would like to make my section headers look like this with the `titlesec` package. Is there a good way to do that? EDIT - I am using the scratcl document class. ![enter image description here](http://i.stack.imgur.com/S1vlV.png)


title: TeX and Turing Award

text: **Leslie Lamport** , who created LaTeX, has recently received the prestigious **Turing Award** (see here and here). An accomplishement in itself, his work on LaTeX is not even the reason why he got the award. **Donald Knuth** , who created TeX, also received the Turing Award (see here). Who else received prestigious prizes and is connected to the TeX world?


title: breaking a tabular and aligning tabulars throughout the document

text: I have two questions.   1. How do you break a tabular so that some of it lies on the previous page while the rest is on the next page. See sample tex file provided below.    2. How do you align the tabular so that columns in (separate) tables are spaced out evenly throughout the document?  You need the resume LaTeX Class File in here: file http://www.latextemplates.com/templates/curriculum_vitaes/4/cv_4.zip Thank you. Sample tex file:               \documentclass{resume}           \usepackage[left=0.75in,top=0.7in,right=0.75in,bottom=0.7in]{geometry} % Document margins     \usepackage{amsfonts}        \usepackage{fancyhdr}      \pagestyle{fancy}     \usepackage{url}     \usepackage{verbatim}       \usepackage[colorlinks=true, a4paper=true, pdfstartview=FitV,     linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref}                 \begin{document}                         Testing, hello, hello. This is a sample tex file provided to StackExchange.           \textbf{University of So and So}       \hfill                       \vspace{-2mm}                                                                                \vspace{-3mm}\\\vspace{-1mm}%          \begin{tabular}{lll}               Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                                 Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                             Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                 Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                 Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.       \end{tabular}           I will insert some sentences here. But then afterwards, more tabulars will be inserted as one can see below.           \begin{tabular}{lll}                      Spring 2014, Summer 2014, Fall 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                 Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                 Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.       \end{tabular}          \begin{tabular}{lll}                     Fall 2013- Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                             Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                                         Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.             \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                                         Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                                         Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                  \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\                                         Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.                   \vspace{2mm}  \\              Spring 2014 & Math & Calculus, \textsl{recitations}.             \end{tabular}                                                             \end{document}


title: How to put kana with CJK in the name of a "polyglotic" glossary entry?

text: After discovered how to mix glossary and acronym system (See here), and how to put kana/kanji working with pdfLaTeX (See here), I was trying to mix the both, in order to create kind of dictonnary, with the name of the object, in romanji (with our alphabet), in kana/kanji in parenthesis, and then, a description, with a picture if necessary. The 2 packages, and command works well to gather, but, if you try to put some kana/kanji in the "name", in the glossary entry (with the related command), it doesn't work. But, if in the description, there's no problem. Here an exemple that goes fine :               \documentclass[12pt,a4paper,oneside]{book}     \usepackage[francais]{babel}     \usepackage[utf8]{inputenc}     \usepackage{CJKutf8,pinyin} % Enables TeX to generate (a) East Asian glyphs and (b) their pronunciations.     \usepackage[overlap,CJK]{ruby} % Simple method for generating sub- and super-textual pronunciation keys (Pīnyīn, kana, etc.)     \usepackage[T1]{fontenc}     \usepackage[svgnames]{xcolor}     \usepackage{graphicx}     \usepackage{enumitem}     \usepackage{url}     \usepackage[pdftex]{thumbpdf}     \usepackage[pdftex,         breaklinks = true,         bookmarksnumbered = true,         colorlinks = true,         linkcolor = bleuvert,         bookmarks = true,         pdfpagemode = UseOutlines,         pdfstartview = FitH,         pdfpagelayout = OneColumn,         urlcolor = darkpink,         ]{hyperref}     \usepackage{index}     \usepackage[acronym]{glossaries}     \makeglossaries     %     \author{Julien}     \title{Test8}     \date{Dernière compilation le \today}     %     \newcommand{\kana}[1]{\begin{CJK*}{UTF8}{gbsn}#1\end{CJK*}}     \newcommand{\kanji}[1]{\begin{CJK*}{UTF8}{bkai}#1\end{CJK*}}     %     \definecolor{vertfonce}{cmyk}{0.775,0,0.775,0.35}     \definecolor{red_relevant}{cmyk}{0.0,1.7,3.2,0.55}     \definecolor{bleuvert}{cmyk}{2.875,0.105,0.365,0.2}     \definecolor{darkpink}{cmyk}{0,0.25,0.175,0.45}     %     \newglossaryentry{Test}{name={Obon}, description={\kana{お}\kanji{盆}}}     %     \begin{document}     %     \thispagestyle{empty}     \maketitle     %     \frontmatter     %     \tableofcontents     %     \printglossary[type=acronym]     %     \mainmatter     %     \part{Introduction}     %     \chapter{Test}     %     \gls{Test}     %     \appendix     %     \part{Annexe}     %     \chapter{Les index}     %     \printglossary[style=list]     %     \end{document}      (Sorry if looks so ugly...) Note that, my problem is, rather than having the japanese caracters in the description, I'd like to have them in the name, like this : `\newglossaryentry{Test}{name={Obon (\kana{お}\kanji{盆})}, description={This is ...}} Any idea ? => `\unexpanded{}` was the solution, thanks to egreg for is answer.


title: Completly draw line with Fast Triangles (TikZ)

text: Can I use the arrow tip `Fast Triangle` (page 212 in 3.0.0 manual) for the complete path? (or make it look like this) # What I got so far (needs TikZ 3.0.0)               \documentclass[margin=5]{standalone}          \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{arrows.meta}     \usetikzlibrary{bending}               \begin{document}     \begin{tikzpicture}         \node[circle, draw] (a) {a};         \node[circle, draw, right=of a] (b) {b};              \draw [f/.tip = Fast Triangle,              line width=1ex,              {Triangle Cap[reversed] }-{[bend] Triangle Cap[] . ffffff}]             (a) to [bend left] (b);          \end{tikzpicture}          \end{document}      # Result ![result](http://i.stack.imgur.com/sVRM0.png)


title: Incompatibility between verbatim and tabu? (Danger of using \scantokens in a package)

text: With the following MWE               \documentclass{article}     \usepackage{verbatim}     \usepackage{tabu}          \makeatletter     \renewcommand\verbatim@processline     {%       \begin{tabu}to\textwidth{|l|X[-1,l]|}         foo&\the\verbatim@line       \end{tabu}     }     \makeatother          \begin{document}          \verbatiminput{test.tex}%          \end{document}      I get some error messages:               ! Missing number, treated as zero.     <to be read again>                         \NC@list      l.16 \verbatiminput{test.tex}                                  %^^M     ! Incompatible glue units.     <to be read again>                         \NC@list      l.16 \verbatiminput{test.tex}                                  %^^M      etc. and an undesired output: ![screenshot](http://i.stack.imgur.com/dZeIu.png) Is this a known problem? Is there an easy fix or should I report to the package maintainer? ## Edit In the answers it turned out that the problem is caused by applying `\scantokens` when catcodes have been redefined by `\verbatiminput`. As this is an information potentially useful to other package authors, I'd like to draw attention to it.


title: Problem with tufte-book and subfigure

text: I'm having a problem using both the tufte-book class and the subfigure package. This problem started after a fresh install of texlive, and I can't find a reason for it. Consider the following document:               \documentclass[a4paper,10pt]{tufte-book}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{subfigure}     \usepackage{graphicx}               %opening     \title{Test.}     \author{Myself}          \begin{document}     \maketitle     \section{adsf}     adsadfasdf     \begin{figure}         \centering         \includegraphics[width = 1.1\textwidth]{./path/to/figure}         \caption{ \label{fig:ushaped} Ilustração da história da organização social dos humanos e primatas pré-humanos.}          \end{figure}          See figure \ref{fig:ushaped}.               \end{document}      If I set the class to `article` it works ok. If I set the class to `tufte- book` it gives the following errors:               ! Argument of \@iiminipage has an extra }.     ! Paragraph ended before \@iiminipage was complete.       I also notice that if I delete the `\label{fig:ushaped}` command, it works alright. The problem is the same with the subfloats package. I can't find the what's causing the problem. Anybody have an idea?


title: Change diagonal line color in the table (slashbox)

text: I want to change the diagonal line color to white (the one at the left top corner in my case). Here is the image ![enter image description here](http://i.stack.imgur.com/y4maO.jpg) Here is the code               \documentclass[12pt, a4paper,twoside]{memoir}     \begin{document}     \setlength{\arrayrulewidth}{1pt}     \setlength{\extrarowheight}{1.2pt}     \arrayrulecolor{white}       \begin{table}[H]     \centering     \caption{Table}     \label{tb35}     \noindent     \begin{tabular}{|r|*{3}{c|}}\hline     \rowcolor{c1}     \backslashbox{\color{c2}Q\\\color{c2}Metric~}{\color{c2}base~~}       & \color{c2}3A & \color{c2}1A & \color{c2}3A \\     \hline          \rowcolor{c1}     \color{c2}Q & & & \\     \hline          \rowcolor{c1}     \color{c2}Proposed & & & \\     \hline     \end{tabular}     \end{table}      \end{document}


title: Avoid eqnarray! Lars Madsen

text: eqnarray or align?! http://www.tug.org/TUGboat/tb33-1/tb103madsen.pdf Whenever the eqnarray environment appears in a question or example of a problem on comp.text. tex, tex.stackexchange.com or other fora there is a high probability that someone will tell the poster not to use eqnarray. This article will provide some examples of why many of us consider eqnarray to be harmful and why it should not be used.


title: fleqn option and long text lines

text: When the `fleqn` option is used, the vertical spacing before an equation placed right after a "long" text line (exactly `\linewidth` I would say) is improperly set up. See below: ![enter image description here](http://i.stack.imgur.com/D9SB7.png) From the `mathmode` user guide, this could probably be fixed through the `\topsep` length. Is it the right way to proceed? The problem is reproduced by the code below:               \documentclass[12pt,fleqn]{book}     \usepackage{amsmath}     \usepackage{hyperref}     \begin{document}     \chapter{plo}     \section{plo}     eoiu oieu oeiuoe ueoi ueoi ueoiu eoiu oeu oe iupaêio umùaeoiuaem oeiu eoiu eoiu oeee.     eoiu oieu oeiuoe ueoi ueoi ueoiu eoiu oeu oe iupaêio umùaeoiuaemm     \begin{equation}     \cos\pi=-1     \end{equation}     eoiu oieu oeiuoe ueoi ueoi ueoiu eoiu oeu oe iupaêio umùaeoiuaem oeiu eoiu eoiu oeee.     eoiu oieu oeiuoe ueoi ueoi ueoiu eoiu oeu oe iupaêio umùae     \begin{equation}     \cos\pi=-1     \end{equation}     \end{document}      There is something wrong involving `hyperref`, `amsmath`, and `fleqn`. Removing one of those removes the problem.


title: Table of contents -- changing headings

text: I use `\tableofcontents` to generate a ToC of a book. It uses Roman numerals I, II, III for parts, and Arabic numerals 1, 2, 3 for chapters. I would like it to say "Part I" rather than "I", and "Chapter 23" rather than "23". How can I change this consistently throughout the document?


title: Sophisticated square cells table

text: Is it possible to draw tables as those in Figures below. Tables should have square cells and notations along borders. I know that I could use the TAB environment from the Easytable package to create square cells tables, but I do not know how to put notations over the top border. I would like to use the multicolumn command for Figure 2 but it does not work in the TAB environment. Or maybe there is another simple approach to achieve the same? There is and alternative to TAB from the Easytable package as suggested by this link http://www.tug.org/pracjourn/2005-2/robertson/, but I cannot insert any notations and the command multicolumn does not work. I use XeLaTeX. ![Table with square cells and notations along vertical and horizontal border.](http://i.stack.imgur.com/IDjhg.png)


title: Ignore newline in LaTeX variable

text: I have some string in variable `\somevar`, eg. `foo\\\bar`. How can I force LaTeX to ignore newline in `\somevar`. When I write content of the variable there should be               foo bar      and not               foo     bar


title: Successive display of animations in a beamer/tikz environment

text: i made a simple animated graphic in a tikz/beamer environment. the problem is that when i click on one of the slides, _all_ animations begin to move. what i am looking for is that on slide 2 S begins to shake a little. on slide 3, i want PRD and the expanding arrow connecting R to PRD to appear at the same time. same for R and PSD on slide 4. and so on...                \documentclass[compress]{beamer}      \usepackage{pgfpages}      \usepackage[ngerman]{babel}      \usepackage{animate}      \usepackage{tikz}      \usetikzlibrary{arrows,decorations.pathmorphing,through,backgrounds,positioning,fit,petri}      \usetikzlibrary{shapes,shadows}      \usetikzlibrary{shapes.multipart}      \usetikzlibrary{calc}      \usetikzlibrary{decorations.pathreplacing}      \usepackage{animate}           \begin{document}           \begin{frame}      \begin{animateinline}[]{10}      \multiframe{10}{r = 1 + 1, rP = 0.1 + .1}{      \begin{tikzpicture}      [demand/.style={rounded rectangle, minimum size=8mm, minimum width=20mm, text width=1.2cm, text height=-.45cm, fill=blue!20!white, font=\tiny, text centered},      rect/.style={rectangle, font=\tiny},      cris/.style={ellipse, minimum size=8mm, minimum width=15mm, text width=1.3cm, text height=0cm, fill=red!10!white, font=\tiny, text centered},      post/.style={->,>=stealth', very thin, draw=black!50}]      \onslide<1->\node (b) at (0,0) [rect, fill=blue!30!white]  {R};      \onslide<2->\node (r) at  (2,0) [cris, decorate, decoration={random steps,segment length=3pt,amplitude=\r}] {S};      \onslide<3->\node (d) at (3,-2) [demand] {PRD};      \onslide<3->\path (b.east) -- (d.west) node[pos=\rP] (p){};      \draw[post] (b.east) -- (p.west);      \onslide<4->\node (c) at (3,2) [demand] {PSD};      \onslide<4->\path (b.east) -- (c.west) node[pos=\rP] (q){};      \draw[post] (b.east) -- (q.west);      \end{tikzpicture}      }      \end{animateinline}      \end{frame}      \end{document}      Hope someone can help! * * * ### Update: thanks andrew for your quick reply! the problem is that when you click on one of the slides, _all_ animations begin to move. what i am looking for is that on slide 2 S begins to shake a little. on slide 3, i want PRD and the expanding arrow connecting R to PRD to appear at the same time. same for R and PSD on slide 4.                \documentclass[compress]{beamer}      \usepackage{pgfpages}      \usepackage[ngerman]{babel}      \usepackage{animate}      \usepackage{tikz}      \usetikzlibrary{arrows,decorations.pathmorphing,through,backgrounds,positioning,fit,petri}      \usetikzlibrary{shapes,shadows}      \usetikzlibrary{shapes.multipart}      \usetikzlibrary{calc}      \usetikzlibrary{decorations.pathreplacing}      \usepackage{animate}           \begin{document}           \begin{frame}      \begin{animateinline}[]{10}      \multiframe{10}{r = 1 + 1, rP = 0.1 + .1}{      \begin{tikzpicture}      [demand/.style={rounded rectangle, minimum size=8mm, minimum width=20mm, text width=1.2cm, text height=-.45cm, fill=blue!20!white, font=\tiny, text centered},      rect/.style={rectangle, font=\tiny},      cris/.style={ellipse, minimum size=8mm, minimum width=15mm, text width=1.3cm, text height=0cm, fill=red!10!white, font=\tiny, text centered},      post/.style={->,>=stealth', very thin, draw=black!50}]      \onslide<1->\node (b) at (0,0) [rect, fill=blue!30!white]  {R};      \onslide<2->\node (r) at  (2,0) [cris, decorate, decoration={random steps,segment length=3pt,amplitude=\r}] {S};      \onslide<3->\node (d) at (3,-2) [demand] {PRD};      \onslide<3->\path (b.east) -- (d.west) node[pos=\rP] (p){};      \draw[post] (b.east) -- (p.west);      \onslide<4->\node (c) at (3,2) [demand] {PSD};      \onslide<4->\path (b.east) -- (c.west) node[pos=\rP] (q){};      \draw[post] (b.east) -- (q.west);      \end{tikzpicture}      }      \end{animateinline}      \end{frame}          \end{document}


title: Source Code using listings produce very large PDF

text: Taking a 2284 line source file (language=C) and embedding into a LaTeX document using \usepackage{listings} produces a PDF of around 150KB. The original source file is 78KB. By itself this is acceptable, but I'm building a complete project document with hundreds of source files. My final document is now around 22MB of source listings! Previously I've used GNU Enscript to produce postscript output from source. Using the same source file as above, Enscript produced a postscript file of 211KB, and then ps2pdf produced a PDF of 50KB; about a third the size of 'listings' package. Below are my 'listings' settings. I'm using pdflatex and MiKTeX 2.9. Is there anything I can change to help reduce the file size? Why the disparity between Enscript and 'listings'?               \documentclass{article}          \usepackage{listings}     \usepackage{color}          \definecolor{dkgreen}{rgb}{0,0.6,0}     \definecolor{gray}{rgb}{0.5,0.5,0.5}     \definecolor{mauve}{rgb}{0.58,0,0.82}          \lstset{         language=C,         basicstyle=\footnotesize\ttfamily,         keywordstyle=\color{blue},         commentstyle=\color{dkgreen},         stringstyle=\color{mauve},         numbers=left     }               \begin{document}     \lstinputlisting{my_main.c}     \end{document}      Thanks, Chris ==== Edit: To add difference between postscript outputs. Please see the postscript outputs below. I created a short 'hello world' C file which I ran through both Enscript and LaTeX (via listings) to produce some postscript output for comparison. The Enscript output appears more concise, whilst the LaTeX (listings) is rather fragmented, and I can only conclude is what is greatly increasing my final PDF sizes. Does this postscript output from 'listings' look correct? C code:               #include <stdio.h>          int main(int)     {        /* This is a comment, can you see me in LaTeX? */        printf("Hello World!\n");        return 1;     }      Enscript postscript output:               <snip>     /Courier-Oblique 8 8 SUF     0.133333 0.545098 0.133333 setrgbcolor     19.4 732 M     (/* This is a comment, can you see me in LaTeX? */) s     /F-gs-font 8 8 SF     0 setgray     5 723 M     (   printf\() s     /Courier-Bold 8 8 SUF     0 setgray     53 723 M     ("Hello World!\\n") s     /F-gs-font 8 8 SF     0 setgray     129.8 723 M     (\);) s     5 714 M     (   ) s      LaTeX listings postscript output:               TeXcolorrgb Black 0 0.6 0 TeXcolorrgb 216 w Fb(/)5     b(*)p Black 0 0.6 0 TeXcolorrgb Black 0 0.6 0 TeXcolorrgb     53 w(T)h(h)g(i)g(s)p Black 0 0.6 0 TeXcolorrgb Black     0 0.6 0 TeXcolorrgb 53 w(i)f(s)p Black 0 0.6 0 TeXcolorrgb     Black 0 0.6 0 TeXcolorrgb 51 w(a)p Black 0 0.6 0 TeXcolorrgb     Black 0 0.6 0 TeXcolorrgb 50 w(c)g(o)g(m)g(m)g(e)g(n)g(t)p     Black 0 0.6 0 TeXcolorrgb 21 w(,)p Black 0 0.6 0 TeXcolorrgb     Black 0 0.6 0 TeXcolorrgb 50 w(c)g(a)g(n)p Black 0 0.6 0     TeXcolorrgb Black 0 0.6 0 TeXcolorrgb 55 w(y)g(o)g(u)p     Black 0 0.6 0 TeXcolorrgb Black 0 0.6 0 TeXcolorrgb 54     w(s)g(e)g(e)p Black 0 0.6 0 TeXcolorrgb Black 0 0.6 0     TeXcolorrgb 54 w(m)g(e)p Black 0 0.6 0 TeXcolorrgb Black     0 0.6 0 TeXcolorrgb 52 w(i)g(n)p Black 0 0.6 0 TeXcolorrgb     Black 0 0.6 0 TeXcolorrgb 53 w(L)h(a)g(T)g(e)g(X)p Black     0 0.6 0 TeXcolorrgb 11 w(?)p Black 0 0.6 0 TeXcolorrgb     Black 0 0.6 0 TeXcolorrgb 51 w(*)f(/)p Black 396 917     a Fc(6)217 b Fb(p)6 b(r)g(i)g(n)g(t)g(f)11 b(\()p 0.58 0 0.82     TeXcolorrgb 8 w(")p Black 0.58 0 0.82 TeXcolorrgb 10     w(H)6 b(e)g(l)g(l)g(o)p Black 0.58 0 0.82 TeXcolorrgb     10 w( )p Black 0.58 0 0.82 TeXcolorrgb 10 w(W)g(o)g(r)g(l)g(d)p     Black 0.58 0 0.82 TeXcolorrgb 11 w(!)f(\\)p Black 0.58 0 0.82     TeXcolorrgb 9 w(n)p Black 0.58 0 0.82 TeXcolorrgb 7 w(")p     Black 9 w(\))g(;)


I just need help with this problem that I couldn't find the right answer for about a month now. execsummary is my file name and this it the code in this file:               \begin{execsummary}          Write your executive summary here.           \end{execsummary}      Everytime I compile the file I always get this error:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9)     entering extended mode     ("D:/CP/execsummary.tex"     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, and so on... loaded.          ! LaTeX Error: Environment execsummary undefined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.1 \begin{execsummary}          ?       I just installed the latest version of MikTex and I always get this error. Please help.


title: defining a new breakable colored environment for examples

text: I want to define a new colored environment for my examples. There is two title bars at top of this environment, side by side. One is filled by green color and there is a word "Example" in it. Another is filled by blue color and we write the number of example in it, for instance "1-2" (chapter 1, example 2). Finally we write the body of example in a red colored box. It may be mentioned that, this environment must have ability to be broken over pages.


title: captionsetup inside floatbox messing up image

text: I'm trying to include images with custom caption label format defined using `\DeclareCaptionLabelFormat` from `caption` package. If I put `\captionsetup` inside `\floatbox` environment the caption and image are not aligned properly.               \documentclass[10pt]{article}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{floatrow}          \DeclareCaptionFont{red}{\color{red}}     \DeclareCaptionFont{blue}{\color{blue}}     \DeclareCaptionFont{green}{\color{green}}          \DeclareCaptionLabelFormat{mycap1}{(#2) Caption label type 1}     \DeclareCaptionLabelFormat{mycap2}{(#2) Caption label type 2}          \captionsetup[figure]{labelformat=default,       labelsep=newline,        justification=centering,        labelfont={small,red,bf,it},        textfont={blue}}               \begin{document}     \begin{figure}       \begin{floatrow}         \floatbox{figure}                  {\captionsetup{labelformat=mycap1}}                  {\caption {Caption for this figure}}                  {\includegraphics[scale=0.5]{sample.png}}       \end{floatrow}     \end{figure}     \end{document}      ![enter image description here](http://i.stack.imgur.com/5QTYq.png) If I remove `\captionsetup` after `\floatbox` the image and caption are aligned properly, but I'll not be able to get custom label for the caption. What am I missing here?


title: Show full section titles in beamerarticle ToC when short section titles are present

text: I am creating lecture notes and slides simultaneously using **beamerarticle**. In **beamer** , I'm using a theme called Berlin which puts all section titles in the slide header. Because some section titles are long and don't fit, I have specified short titles such as:               \section[short title 1]{First Section's Full Title}      The short titles now appear in the slide header. However, this has an undesirable effect on the **article** : by default the short section titles now show up in the article's table of contents. I read this, and so tried using \sectionmark instead as follows:               \section{First Section's Full Title}     \sectionmark{short title 1}      However, **beamer** does not recognize sectionmark and now reverts to putting the full section titles in the slide header. It seems to me that I need to somehow edit the default options of either the table of contents in the documentclass article, or the Berlin theme in beamer. Unfortunately I am quite new to LaTeX and have no idea how to do either. Help appreciated. Among the packages I am using are titlesec and tocloft, but my problem occurs regardless of whether the packages are in use, thus I have commented them out in the minimal working example below. The code for the m.w.e. needs to be saved as **three separate tex files** in the same folder, as specified below. **Compile example.article.tex and example.beamer.tex, not example.tex**               %NOTE: The following should be saved as example.article.tex:     \documentclass{article}     \usepackage{beamerarticle}     \input{example.tex}          %NOTE: The following should be saved as example.beamer.tex:     \documentclass[ignorenonframetext]{beamer}     \input{example.tex}           %NOTE: The following should be saved as example.tex:     %\mode<article>{     % \usepackage{tocloft}     % \usepackage[compact]{titlesec}     %}     \mode<presentation>{\usetheme{Berlin}}     % everyone:     \usepackage[english]{babel}          \begin{document}      \begin{frame}       \title{Title}       \maketitle      \end{frame}      \begin{frame}{\only<presentation>{Outline}}       \setcounter{tocdepth}{1}       \tableofcontents      \end{frame}      \section[short title 1]{First Section's Full Title}      %\sectionmark{short title 1}      \begin{frame}{First Frame}       Blah blah text      \end{frame}      \begin{frame}{Second Frame}       Blah blah text 2      \end{frame}      \section[short title 2]{Second Section's Full Title}      %\sectionmark{short title 2}      \begin{frame}{Third Frame}       Blah blah text 3      \end{frame}     \end{document}


title: Why can words with hyphen char not be hyphenated?

text: Assume I have a word like Baden-Württemberg. TeX can't hyphenate any of these two word parts. Why? ![no hyphenation in the compound word](http://i.stack.imgur.com/OrhI3.png) why isn't it something like this: ![enter image description here](http://i.stack.imgur.com/E7Kfp.png) where the small ticks indicate possible hyphenation points. A technical (TeXnical) explanation is welcome. BTW: I am not asking how to circumvent this (by using the babel shorthand `"=` for example).


title: messy/overwritten numbering in enumerate tag

text: I have the following in my LateX code:               \begin{enumerate}          \item            \begin{lstlisting}                                                                                x = [x for x in xrange(4, 9)]                                                                                \end{lstlisting}           \item             \begin{lstlisting}                                                                                x = [x for x in xrange(6)]                                                                                \end{lstlisting}           \item             \begin{lstlisting}                                                                                x = [x for x in xrange(6)]                                                                                \end{lstlisting}           \item             \begin{lstlisting}                                                                                x = [x for x in xrange(6)]                                                                                \end{lstlisting}           \item             \begin{lstlisting}                                                                                x = [x for x in xrange(6)]                                                                                \end{lstlisting}           \item             \begin{lstlisting}                                                                                x = [x for x in xrange(6)]                                                                                \end{lstlisting}           \item             \begin{lstlisting}                                                                                x = [x for x in xrange(6)]                                                                                \end{lstlisting}           \item             \begin{lstlisting}                                                                                x = [x for x in xrange(6)]                                                                                \end{lstlisting}           \item             \begin{lstlisting}                                                                                x = [x for x in xrange(6)]                                                                                \end{lstlisting}      Now, the result I get overlaps/overwrites positions for the numberings: ![Very Messy Result](http://i.stack.imgur.com/YxNLD.png) This obviously, not what anyone would want to do. How can I fix the numbering? Thanks for all the help?


title: URL constantly results in a badbox

text: I am trying to insert a long url into a LaTeX document. I'm using `hyperref` package to make them clickable. However, Kile constantly tells me that it results in a badbox. It is strange, since, well, these urls do not have to look good, so it could split them in any place and it would still be good. I tried a few solutions, here, on TeX exchange, using `url` package, `sloppy`, adding some manual hyphenation rule and so on. Nothing works. Sometimes it produces a different hyphenation pattern, but it is still marked by badbox. Is there any sensible reason to do it? I want to show the whole url, btw, so link shorteners are no good (and they aren't answer anyway.)


title: Why does aligning equations not work here?

text: \documentclass{minimal}          \usepackage{amsmath}     \newcommand*{\op}[1]{\operatorname{#1}}          \begin{document}          \begin{align*}         \noalign{$\quad \op{f} * \op{r} = \op{c}_{\op{f}*\op{r}} (x_1,...,x_k) = (\op{f}(a_1,...,a_k), \op{r}(b_1,...,b_k))$}         &\text{if } x_i=(x^{\op{f}}_i,x^{\op{r}}_i), &\text{then } a_i=x^{\op{f}}_i \in \mathcal{S}, b_i=x^{\op{r}}_i \in (\mathcal{A}^*)^*, &1 \leq i \leq k\\         &\text{if } x_i \in \mathcal{A}^*, &\text{then } a_i=b_i=x_i, &1 \leq i \leq k     \end{align*}          \end{document}      ![align](http://i50.tinypic.com/2441wy9.png) Obviously, "then" should be aligned, too. What am I doing wrong? I also tried it with `aligned` and `{alignat*}{2}`, but it's not correct there either.


title: Match coordinate in two different scopes

text: I've many small pictures, each centered at (0,0) in their own figure but i need to combine them and in the combined picture the (0,0) of the 1st picture (in a scope) should be (4,2) of the 2nd picture - whats the best way to achieve this?               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \filldraw[green](4,5)circle(2pt);     \begin{scope}         \begin{scope}     %Should point at the green dot - (3,2)X and (4,5) should be matched         \draw[red,latex-](0,0)--(3,2);         \end{scope}         \begin{scope}     % Should be at the other end of the red vector (3,2)X and (0,0)XX should be matched             \draw[blue](0,0)circle(5pt);         \end{scope}     \end{scope}     \end{tikzpicture}     \end{document}      The X after the coordinates are there to visualise, that these coordinates are (should be valid) in different scopes) PS: Currently I'm doing it with xshift, yshift but that's kinda tedious.


title: Latex Table - \smallskip breaks vertical lines

text: I am creating a table, in which I want to separate groups of lines, using `\smallskip`. However, at the very left of the table there is a `\multirow` cell, whose vertical lines are now broken. Is there a nice solution for this? Resulting image: ![enter image description here](http://i.stack.imgur.com/Zgjf3.png)               \documentclass[runningheads]{llncs}     \usepackage{amsmath,amssymb} % define this before the line numbering.     \usepackage{rotating}     \usepackage{multirow}     \usepackage{hhline}     \begin{document}     \pagestyle{headings}     \mainmatter         \begin{table}[t]                 \footnotesize              \begin{center}                 \label{table:Sequences}                 \setlength{\tabcolsep}{1pt}                  \begin{tabular}{|c|c|c|c|c|}                     \cline{5-5}                     \cline{5-5}                     \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{|c|}{\textit{blah}}\\                     \cline{5-5}                     \noalign{\smallskip}                     \cline{1-1}\cline{3-3}\cline{5-5}                     \multirow{11}{*}{\centering\begin{turn}{90}\textit{Broken Multirow}\end{turn}  } & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{a}\end{turn}   }      & {} & { $1$ } \\           \cline{5-5}                                                         {} & {} &                                   {}      & {} & { $2$ } \\           \cline{5-5}                                                         {} & {} &                                   {}      & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}                                                                                \cline{3-3}     \cline{5-5}                                                         {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{b}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}                                                                                \cline{3-3}     \cline{5-5}                                                         {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{c}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}                                                                                \cline{3-3}     \cline{5-5}                                                         {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{d}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}                     \cline{1-1}\cline{3-3}\cline{5-5}                 \end{tabular}             \end{center}         \end{table}     \end{document}     \pagestyle{headings}     \mainmatter         \begin{table}[t]                 \footnotesize              \begin{center}                 \label{table:Sequences}                 \setlength{\tabcolsep}{1pt}                  \begin{tabular}{|c|c|c|c|c|}                     \cline{5-5}                     \cline{5-5}                     \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{|c|}{\textit{blah}}\\                     \cline{5-5}                     \noalign{\smallskip}                     \cline{1-1}\cline{3-3}\cline{5-5}                     \multirow{11}{*}{\centering\begin{turn}{90}\textit{Broken Multirow}\end{turn}  } & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{a}\end{turn}   }      & {} & { $1$ } \\           \cline{5-5}                                                         {} & {} &                                   {}      & {} & { $2$ } \\           \cline{5-5}                                                         {} & {} &                                   {}      & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}                                                                                \cline{3-3}     \cline{5-5}                                                         {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{b}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}                                                                                \cline{3-3}     \cline{5-5}                                                         {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{c}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}\noalign{\smallskip}                                                                                \cline{3-3}     \cline{5-5}                                                         {} & {} & \multirow{3}{*}{\centering\begin{turn}{90}\textit{d}\end{turn}     }  & {} & { $1$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $2$ } \\           \cline{5-5}                                                         {} & {} &                                   {}  & {} & { $3$ } \\   \cline{3-3}     \cline{5-5}                     \cline{1-1}\cline{3-3}\cline{5-5}                 \end{tabular}             \end{center}         \end{table}     \end{document}


title: Why is my document entirely right-aligned?

text: I usually don't spend too much time on formatting of LaTeX documents, so this is probably easy and I apologize. I've changed my document from a twocolumn class to a onecolumn class, and all of a sudden my document is right-aligned, making many of the tables run off the page. As an example, this is a screenshot: ![screenshot](http://i.stack.imgur.com/RJU7y.png) Why is it doing that? Here is my code at the top of my document:               \documentclass[times, 10pt,onecolumn]{article}     \usepackage{latex12}     \usepackage{times}     \usepackage{balance}     \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage{algorithm}     \usepackage{algorithmic}     \usepackage{verbatim}     \usepackage{graphicx}     \usepackage[pagebackref=true,breaklinks=true,letterpaper=true,colorlinks,bookmarks=false]{hyperref}      Thanks for any help _Edit_ : The contents of latex12.sty:               \typeout{IEEE 8.5 x 11-Inch Proceedings Style `latex8.sty'.}     \font\tenhv  = phvb7t at 10pt     \font\elvbf  = cmbx10 scaled 1100          \setlength{\textheight}{8.875in}     \setlength{\textwidth}{6.5in}     \setlength{\columnsep}{0.375in}     \setlength{\topmargin}{0in}     \setlength{\headheight}{0in}     \setlength{\headsep}{0in}     \setlength{\parindent}{1pc}          \def\@maketitle        {        \newpage        \null        \vskip .375in        \begin{center}           {\Large \bf \@title \par}           % additional two empty lines at the end of the title           \vspace*{24pt}           {           \large           \lineskip .5em           \begin{tabular}[t]{c}              \@author           \end{tabular}           \par           }           % additional small space at the end of the author name           \vskip .5em           {            \large           \begin{tabular}[t]{c}              \@affiliation           \end{tabular}           \par           \ifx \@empty \@email           \else              \begin{tabular}{r@{~}l}                 E-mail: & {\tt \@email}              \end{tabular}              \par           \fi           }           % additional empty line at the end of the title block           \vspace*{12pt}        \end{center}        }          \def\abstract        {%        \centerline{\large\bf Abstract}%        \vspace*{12pt}%        \it%        }          \def\endabstract        {        % additional empty line at the end of the abstract        \vspace*{12pt}        }          \def\affiliation#1{\gdef\@affiliation{#1}} \gdef\@affiliation{}          \def\email#1{\gdef\@email{#1}}     \gdef\@email{}          \newlength{\@ctmp}     \newlength{\@figindent}     \setlength{\@figindent}{1pc}          \long\def\@makecaption#1#2{        \vskip 10pt        \setbox\@tempboxa\hbox{\tenhv\noindent #1.~#2}        \setlength{\@ctmp}{\hsize}        \addtolength{\@ctmp}{-\@figindent}\addtolength{\@ctmp}{-\@figindent}        % IF longer than one indented paragraph line        \ifdim \wd\@tempboxa >\@ctmp           % THEN set as an indented paragraph           \begin{list}{}{\leftmargin\@figindent \rightmargin\leftmargin}              \item[]\tenhv #1.~#2\par           \end{list}        \else           % ELSE center           \hbox to\hsize{\hfil\box\@tempboxa\hfil}        \fi}          \def\section{\@startsection {section}{1}{\z@}        {14pt plus 2pt minus 2pt}{14pt plus 2pt minus 2pt} {\large\bf}}     \def\subsection{\@startsection {subsection}{2}{\z@}        {13pt plus 2pt minus 2pt}{13pt plus 2pt minus 2pt} {\fontsize{11}{\f@baselineskip}\bf}}%\elvbf}}


title: Multiple caption names for listings code (lstinputlisting) based on type of code

text: In my document I have used:               \renewcommand\lstlistingname{Algorithm}     \renewcommand\lstlistlistingname{Algorithms}       to rename my `lstlistings` titles. The problem is that now I want to add a different kind of code,with `lstinputlisting` but I want it to have another caption below. Is there any way somehow to define a new `listings` environment and apply again the commands above to it? For example ideally using two new commands `\c_lstinputlisting{testc.c}`, and `\cpp_lstinputlisting{testc.cpp}` would give two different caption names like > C Code 1.x and > C++ Code 1.x In case I am not clear, I am not talking about the caption itself, but what goes before the caption that is the general name of the caption name. Without editing it is the default > Listing 1.x