title: How to make the moderncv templates from CTAN work in Ubuntu 11.10

text: I am trying to use `moderncv` on Ubuntu 11.10. The class is in texlive-latex- extra but it seems to be an old version and it does not recognize some new commands. I would like to either upgrade the class system-wide or, preferably, override it locally for a given user or project. I tried putting the class file (from CTAN) in the same folder as my .tex file but the compiler complains about redefined commands. How can I fix this issue?


title: BibTeX Changes "U.S" to "U.C.", How to Correct?

text: I have noticed that BibTeX will change the initials "U.S." (as in "United States") to "U.C." This has happened using both IEEE and Elsevier document classes, and it works the same with and without punctuation. This happens formatting the citation as either `@misc` and `@techreport` (it may also happen with additional formats, but I have not tried). For example, when attempting to cite > "U.S. Census Bureau" the output becomes > "U.C. Bureau" Here's a code sample.               \documentclass[5p]{elsarticle}     \begin{document}          Citation \cite{census:2011}.          \bibliographystyle{elsarticle-num}     \bibliography{bibliography}          \end{document}      with BibTex entry:               @misc{census:2011,       author        = "U.S. Census Bureau",       title         = "2010 Census",       howpublished  = "U.S. Department of Commerce",       month         = feb,       year          = "2011",     }      produces: > [1] U. C. Bureau, 2010 census, U.S. Department of Commerce (Feb. 2011). I can use `\verb` to force the correct lettering, but the resulting font and font size is different than the surrounding text. How can I correct this in a citation? Is this some well known inside joke I'm not in on?


title: Numbering section: “1” instead of “0.1”

text: > **Possible Duplicate:**   >  Section numbering I have a problem with my numbering in LaTeX. When I do               \section{foo}      the result is               0.1 foo      and what I need is               1 foo      Does anyone have a solution?


title: Increment the section number with 1, not 0.1

text: > **Possible Duplicate:**   >  Section numbering I'm happy with the logical layout of my document, but the section numbering is bugging me. I'd like the first section (the introduction) to be 1, not 1.1. Also, the second section should be 2, not 1.2 (yes, that's a one, like it is still the introduction). I'm getting something wrong, obviously. (I also want sections beginning at the top of a new page, and page numbering should start with the introduction, if you wonder about the other stuff I had to put in the document header. But those things work.) Any other suggestions are welcome, of course.               % x.tex          \documentclass[a4paper, twoside, draft, 12pt]{report}          \usepackage[pdftex, final]{graphicx}     \graphicspath{{./pics/}}          \usepackage[parfill]{parskip}          \usepackage{titlesec}     \newcommand{\sectionbreak}{\clearpage}          \setcounter{tocdepth}{6}     \setcounter{secnumdepth}{6}     \setcounter{chapter}{1}          \begin{document}          \begin{titlepage}     % some stuff here     \end{titlepage}          \pagebreak     \tableofcontents     \thispagestyle{empty}     \pagebreak          \cleardoublepage     \pagenumbering{arabic}          \section{Introduction}          % first section - should have number 1, but have 1.1          \subsection{Services}          % subsection - should be 1.1, is 1.1.1          \section{The algorithm}          % new section - number is 1.2, should be 2          \end{document}      **Edit** With the `article` solution, it suddenly looks like this here and there. Otherwise, it works. ![white](http://user.it.uu.se/~embe8573/white.png)


title: Sections without chapters in a LaTeX document

text: I have a document generated by doxygen with just `\section` directives and no chapters, so they're getting numbered as               0.1 Section 1     0.2 Section 2     0.2.1 SubSection 1      How can I skip the chapter number and display 1.1, 1.2, instead?


title: Sections are labeled as 0.x in the output

text: This is probably a very basic question, but I am new at this. I am using `\section{}` to create a new section. Latex labels it as 0.1. How can I get it to label it as 1.0?               \documentclass{report}     \begin{document}     \section{test}     \subsection{test}     \section{test}     \end{document}


title: marginpar infobox

text: I apologize for not knowing the correct term for this, but I want to put some kind of a infobox at the beginning of each section. What I want to ask about is for example on Wikipedia: you have this box on the right side where you can find information like population figures: http://en.wikipedia.org/wiki/Berlin. What's in this box might even be redundant to what is written in the text, but it makes it much nicer to (skim) read the document. Ideally, I want this infobox to contain a tabular and I'd like it to be placed in the margin, but reaching inside the paragraph with the text floating around the box. Basically like this: ![infobox](http://i.stack.imgur.com/exSjJ.gif) Can you tell me what the term for this is and what package I can use for this?


I want to create a problem booklet consisting of some questions and images on the marginpar. How to make sure the images properly float on the marginpar? If you carefully see the left image below, you will notice that the most bottom image gets cropped as it is not properly floated. ![enter image description here](http://i.stack.imgur.com/UOodl.png)![enter image description here](http://i.stack.imgur.com/N0fzk.png)               \documentclass[twoside,12pt]{book}     \usepackage[         a4paper,         vmargin=2cm,         outermargin=9cm,         innermargin=2cm,         marginparwidth=7cm,         marginparsep=20pt     ]{geometry}          \usepackage{graphicx}     \usepackage{marginnote}     \usepackage{caption}     \usepackage{lipsum}          \newcommand\MarginFig[1]{%     \marginpar{\includegraphics[width=\marginparwidth]{example-image-a}     \captionof{figure}{#1}     \label{#1}}}                    \begin{document}     \chapter{Higgs Boson}     \lipsum[1-3]          \begin{enumerate}     \item     \MarginFig{1}     \MarginFig{2}     \MarginFig{3}     \lipsum[1-2]          \item     \MarginFig{4}     \MarginFig{5}     \MarginFig{6}     \lipsum[1-2]          \item      \MarginFig{7}     \MarginFig{8}     \MarginFig{9}     \lipsum[1-2]          \end{enumerate}     \end{document}      This question is a continuation of my previous question. ## Edit 3 Bonus questions (without prizes): Among the permutation of `\MarginFig{n}`, `\MarginFig{n+1}`, `\MarginFig{n+2}`, and `\lipsum[1-2]`, which one will produce the best floating?


title: Put node on ellipse in tikz

text: I'm trying to make a simple drawing in tikz consisting of:   * An ellipse   * Some label inside the ellipse   * Another label near the curve   * An outer normal vector to the ellipse, again with a label Producing the ellipse and the first two labels is no problem. However, I can't figure out how to put a node on the boundary of the ellipse. How to do this?               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}        \filldraw[fill=black!20!white](0, 0) ellipse (100pt and 50pt);     \end{tikzpicture}     \end{document}


title: When not to use \ensuremath for math macro?

text: I have gotten into the habit of using `\ensuremath` around math components in **_every_** macro that I define, so that I can use the same macro inside and outside of math mode. But egreg's comments in \DeclareMathOperator won't take arguments has me thinking that perhaps I should not be doing this all the time: > It's not a good idea, in my opinion, to add `\ensuremath`; why should it be? > Disclaimer: this is part of my `\ensuremath`-only-when-really-needed > campaign. :) - egreg A related comment in Force line break inside a \lim argument in align environment: > Why `\ensuremath`? Wouldn't `$\scriptstyle#1$` be easier to read? - egreg In this case it was required to use math mode as we were within a `\makebox` (i.e., text mode). So, out of habit I used `\ensuremath` but egreg was right that in this case using `$...$` would have worked just as well and was certainly easier to read. But, even in this case I still prefer to use `\ensuremath` so that it is more obvious that this can be used in math and text mode without having to think about `\makebox` being in text mode. So, is there really any harm in always using `\ensuremath`, at least for any of my personal macros? I realize that there is a slight extra overhead in processing, but is there something else to consider? If there are other considerations when they macros are coming packages that are intended for general purpose use, I would be interested in those as well. The most obvious one is that we may want to make sure that the user of the macro knows that this macro requires math mode, so require them to only use the macro in math mode. Since this references egreg's campaign, I felt I should include a MWE for new users as per my MWE-as-often-as-possible campaign:               \documentclass{article}          \newcommand{\FunctionF}{\ensuremath{x^2}}%          \begin{document}     Text mode: \FunctionF          Math mode: $G(x) = x^3 - \FunctionF$     \end{document}


title: Merge items in list of floats

text: My seraching creativity didn't provide useable results so far, so I have to ask this question... I have a group of related (figure-like) item types (music examples) which I include in different ways:   1. a floating environment defined with `\DeclareFloatingEnvironment`   2. a non-floating environment (allowing page breaks)   3. a full-page command using \includepdf internally. I managed to let the environments share a counter (the one from 1.), but I don't know how I can include the non-floating versions in a \listofmusicexamples. Probably I would find a way to directly write a line into the auxiliary file from 2. and 3., but isn't there a less hacky way to accomplish this? Thanks in advance for any hint or suggestion * * * Unfortunately I have to revoke my comment somewhat. Using `\captionsetup` only works smoothly in my non-floating environment (2.) but not in the command 3. Using the command environment gives a warning `\captionsetup{type=...} (caption) outside box or environment`. While I could live with that warning I just realized that this command affects paragraph formatting afterwards. After the first appearance of my command all paragraphs are not indented anymore (they now are like the captions(?)). If I enclose everything with a \begingroup \endgroup I get lots of errors, but the document compiles and the paragraph formatting is correct again. So my assumption seems right that somehow the caption's formatting was kept active. I tried some kinds of other approaches but none seems to work. So I had to reimplement 3. by manually incrementing the counter with `\refstepcounter` and adding an entry to the list with `\addcontentsline`


title: Exam (not exam class) with LaTeX

text: I would like to do an exam with LaTeX. I want to use the `srcartcl` class and the exam itself is ready. But I like to have a number as a unique identifier for the students. So, for 60 students, I like to have written 01, 02, 03, ... up to 60 at a defined position in the document. The rest of course stays unchanged. Is that somehow achievable?


title: biblatex: How to suppress back references for certain citations?

text: When using BibTeX's standard citation commands, such as `\cite`, typically back references are generated (if enabled) in the bibliography pointing back to the place of citation. That's a nice feature. However, I would like to suppress these back references for certain citations, such as in figure or table captions. I don't want these to appear as back references in the bibliography. I have found an identical question on `comp.text.tex`, it is unanswered there.


title: moderncv - newline within a cventry in the banking style

text: I want to find a way to split long line in the 3rd element of `\cventry`. I use **moderncv** package and **banking** style. Using \newline doesn't help. I get the result in the picture using following code. I want to have the word "markets" go to the 2nd line, and "Euro-Finance company" to the 3rd line.               \cventry{2006}{Euro-Finance company}{Certified as technical and fundamental analyst of international financial \newline markets}{MyCity, MyCountry}{}{}      Below is the definition of `\cventry` in the moderncvstylebanking.sty. I tried to modify it but wasn't able to reach my goal, as I don't understand most of that code.               \renewcommand*{\cventry}[7][.25em]{       \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}%       {\bfseries #4} & {\bfseries #5} \\%       {\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%       \end{tabular*}%       \ifx&#7&%     \else{\\\vbox{\small#7}}\fi%     \par\addvspace{#1}}      ![Bad result](http://i.stack.imgur.com/y6VA1.png)


title: Dashes: - vs. – vs. —

text: This may or may not be a real TeX/LaTeX question but rather a general question on punctuation: How are the different dashes `-` "-", `--` "–" and `---` "—" supposed to be used?


title: What kind of dash is used in the combination of artist and song title?

text: Which one is correct?   * _Def Leppard ‒ Photograph_ (figure dash, `U+2012`),   * _Def Leppard – Photograph_ (n-dash, `U+2013`),   * _Def Leppard — Photograph_ (m-dash, `U+2014`) or   * _Def Leppard ― Photograph_ (horizontal bar, `U+2015`).


title: What is the symbol to join two personal names?

text: > **Possible Duplicate:**   >  Dashes: - vs. – vs. — I don't know if here is the best place to ask, but my question involves three symbols, so here we go: What symbol should I use to connect two names, for example, _Cauchy-Riemann_? Usually I use `--` but what is the difference between `--` and `\--`? Or the correct symbol is only one dash `-`?


title: Getting psfrag to work on ggplots with transparency

text: Right, so I'm using ggplot2 in R to create a graph that involves transparencies (no way around it I'm afraid). In Latex I use latex - dvips - ps2pdf to compile, because I also need psfrag (and pstricks) and as far as I'm aware, that is the only way to do it. So I need to export the graph from R in an .eps file, right? So then I get to the problem of dev.copy2eps not supporting transparencies. But I can get around this using cairo_ps, which gets the transparencies to work, but unfortunately now psfrag no longer works... Any ideas how to get around this? Minimal example - plots in R:               library('ggplot2')     df <- data.frame(xmin=c(0,0.5), xmax=c(1,1.5), ymin=c(0,0.5), ymax=c(1,1.5))          p <- ggplot() +        scale_x_continuous(name="x") +        scale_y_continuous(name="y") +       geom_rect(data=df, mapping=aes(xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax), color="black", alpha=0.5)          cairo_ps(file='cairo.eps', width=5, height=5)     p     dev.off()          X11(width=5, height=5)     p     dev.copy2eps(file="regular.eps")      Minimal example - LaTex ( LaTex + dvips + ps2pdf + view pdf):               \documentclass{minimal}     \usepackage{pstricks}     \usepackage[dvips]{graphicx}     \usepackage{psfrag}          \begin{document}          \begin{pspicture}(\textwidth,10)     \psfrag{x}{X axis}     \psfrag{y}{Y axis}     \rput[l](0,0){\includegraphics[width=0.5\textwidth]{cairo.eps}}     \rput[l](0.5\textwidth,0){\includegraphics[width=0.5\textwidth]{regular.eps}}     \end{pspicture}          \end{document}      And here's what I get: ![transparency works on left, psfrag works on right](http://i.stack.imgur.com/kXdoY.png) Edit: Christoph is right, it works correctly for me on two different Ubuntu machines. The problem occurs on a Windows 7, also with R 3.0.2 running. I guess migrating the topic to the LaTex forum wasn't such a good idea after all. Can it be moved back?


title: typesetting the document which fits into marked fixed lines

text: I have a to typeset the article such that, the output should be printed on the fixed marks that are 1.36 cms apart. In other words, printing sheet has marked lines which are 1.36 cms apart. I have to type with font 11 or 12 whcih fits into these marked lines.![enter image description here](http://i.stack.imgur.com/EGdzC.png) Also, how can decide the maximum font size that i can fit between any two fixed lines.


title: How can I make a postcard template?

text: I would like to print some of my holiday photos as postcards. But sadly, all companies I have seen so far do not offer easy possibilities to create the back of the post card. So I want to make a template for A6 post cards. ## MWE               \documentclass[a6paper,landscape,7pt]{scrartcl}     \usepackage[ngerman]{babel}  % German umlauts     \usepackage[utf8]{inputenc}  % German umlauts     \usepackage{hyperref}  % seems to be important for multicols     \pagenumbering{gobble}  % disable page numbering     \usepackage{multicol}  % split page in two parts     \usepackage{helvet}     \renewcommand{\familydefault}{\sfdefault}     \usepackage[margin=0.2cm]{geometry}     \usepackage{parskip}          \setlength\columnseprule{.4pt}     \begin{document}     \begin{multicols}{2}         Skyline of Pittsburgh, Pennsylvania\\         {\small Photographer: Max Mustermann}         \columnbreak         \vspace*{0.5\textheight}         \rule{5.8cm}{0.01cm}\vspace*{1cm}\\ % Name         \rule{5.8cm}{0.01cm}\vspace*{1cm}\\ % Street + Nr         \rule{2.2cm}{0.01cm}\hspace*{0.2cm}\rule{3.4cm}{0.01cm}\vspace*{1cm}\\ % zip code + town         \rule{5.8cm}{0.01cm}\\ % country     \end{multicols}      \end{document}      ## Rendering ![enter image description here](http://i.stack.imgur.com/s3Gsc.png) ## Question The first helping line (commented with `Name`) should get placed on the right side after about half of the page width. But it gets placed on the left side. How can I fix that? Just in case somebody thinks he can do it, I have a super-duper bonus question: It would eventually be nice to make a small stamp template in the upper right corner. Feel free to adjust anything to make it look nicer :-) (Usually, I would simply add an image. But there seems not to be any stamp template image on Wikipedia.)


title: Changing the numeration of sections

text: believe it or not, I need to change the way the command `\section` enumerates the sections: I'd like my second section to be section number 4. (I don't want any section number 2 or three in my article). Is this possible?


title: pgfplots update Texlive2014

text: I am currently using **Texlive' 2014** on Ubuntu 12.04LTS machine. The problem I am facing is updating different packages (eg. Pgfplot). I have tried changing repositories, and this does not seem to change the result. The output I get just display's no updates _available_               tlmgr: package repository http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/systems/texlive/tlnet     tlmgr: saving backups to /usr/local/texlive/2014/tlpkg/backups     tlmgr: no updates available      The version of Pgfplots currently in my system is ( _1.01_ ) and the latest available option is version 2.0*. I have also tried the following:               tlmgr update --self     tlmgr update all      I don't want to update different packages manually, because its too much work for all the other packages. can someone tell me what is it that I am doing wrong ???


title: Problem between opticals and minionint options in the MinionPro package

text: I've already told the author of the `MinionPro` package about this. But I post it here to see if somebody solves it before him: This document:               \documentclass{scrartcl}     \usepackage[minionint,opticals]{MinionPro}          \begin{document}     \boldmath $a+b$     \end{document}      does not compile. This is the error I get: > ! I can't find file `MnSymbolFI-Bold10'. > > ! Emergency stop. Why? Is it a “code only” problem and therefore can be solved here easily? Or it's a problem of the font itself and then I should wait to an official solution?


title: Reference file relative to the home directory

text: How can I refer to a file (e.g. in `\includegraphics{}`) that lives in my home directory (I am on linux)?               \documentclass{article}     \usepackage{graphicx}          \begin{document}     not working: $\sim$/foo.png     %%\includegraphics{~/foo.png}          not working either: \$HOME/foo.png     %%\includegraphics{$HOME/foo.png}     \end{document}


title: Removing from what is in the bibliography

text: Using LyX with `biblatex-apa`. I am trying to remove the parentheses that surround the article, book, collection, etc year in the references. I just want the format to be `YEAR.` instead of `(YEAR).`               \documentclass{article}     \begin{filecontents}{bib.bib}     @article{art1,      Author = {John Smith},      Year = {1998},      Publisher = {XYZ},      Title = {ABC}      }     @book{book1,      Author = {Jane Smith},      Year = {2009},      Publisher = {ABC},      Title = {XYZ}      }     \end{filecontents}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=apa, backend=biber]{biblatex}     \DeclareLanguageMapping{american}{american-apa}     \addbibresource{bib.bib}     \begin{document}          text \cite{art1}     text \cite{book1}          \printbibliography     \end{document}      I tried removing them using: `\DeclareFieldFormat{year}{#1}` in the preamble but nothing changed


title: Creating a Polar Grid with Tikz

text: I am trying to recreate the following image using tikz: ![polar_plot](http://i.stack.imgur.com/mjKAa.png) So far, this is my code               \documentclass{article}         \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[>=latex]     \fill[fill=lightgray] plot[domain=-pi/2:pi/2] (xy polar cs:angle=\x r,radius= {2-2*sin(\x r)});     \draw[thick,color=red,domain=0:2*pi,samples=200,smooth] plot (xy polar cs:angle=\x r,radius= {2-2*sin(\x r)});     \node at (2,1) {\scriptsize $r=2-2\sin\theta$};     \draw[->] (-4,0) -- (4,0);     \draw[->] (0,-5) -- (0,2);     \end{tikzpicture}      \end{document}      which produces: ![enter image description here](http://i.stack.imgur.com/oo9Ay.png) To complete it, I need to polar grid with the particular labeling. I am aware of the polar axis environment available in the pgfplots package. However, I am not familiar with pgfplots and would prefer a tikz solution. Any ideas? I fear I can't put off learning pgfplots much longer.


title: Aliasing, with or without argument?

text: What is the correct way to alias a command to another one?               \newcommand*{\keyword}{\emph}      or:               \newcommand*{\keyword}[1]{\emph{#1}}      Apart from the fact that the second is more explicit, is there any real differences?


title: Aligning an array in align*

text: I was trying to make a 3 point list with a brace next to 2 of the items with text next to it and than a brace that covered all three again with text next to it. I had never used an array before but I found an example of something similar to what I had in mind on this website which did use one. I fiddled around with it a bit and ended up with something that did what I wanted.               \documentclass[10pt,a4paper,oneside]{article}      \usepackage{amsmath,amssymb,amsfonts,textcomp}      \begin{document}     \begin{align*}     \left. \begin{array}{l}     \left. \begin{array}{l}     1.\text{ Mensen hebben tegengestelde oordelen.} \\     2.\text{ Elke keuze is arbitrair.} \\     \end{array}\right\} \text{Scepticisme of fenemonalisme.}\\     \hspace{0.22cm}3.\text{ Waarneming is inzicht dus is scepticisme fout.}\\      \end{array}\right\} \parbox{5cm}{Fenemonalisme is juist. \\ PNC is vals.}     \end{align*}     \end{document}      I'm quite pleased with the result except for \hspace. I was trying to align the numbers 1., 2. and 3. using & but wherever I put them they only generated extra linebreaks with the following error:               Extra alignment tab has been changed to \cr.      Without the `\hspace` everything is ok, except for the 3. being close to 0.22cm to much to the left. What's a better and more elegant way to align these?


title: Change vertical space in overset

text: How can I decrease the space in overset? I found this solution online, but it doesn't look quite like the original overset (note I know it is difficult to come up with a solution to handle all cases elegantly, but I have listed 4 common use cases that would like to look good)               \documentclass[11pt]{book}          \usepackage{amsmath,amsfonts,amssymb,amsthm}           %overset spacing     \makeatletter     \newcommand{\oset}[2]{%       {\mathop{#2}\limits^{\vbox to -.5\ex@{\kern-\tw@\ex@        \hbox{\scriptsize #1}\vss}}}}     \makeatother          \usepackage{newpxmath}     \usepackage{microtype} % Slightly tweak font spacing for aesthetics          \usepackage[utf8]{inputenc} % Required for including letters with accents     \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs               \begin{document}      I would like it to work for the following examples:               Original 1: $X_n\overset{P}{\to} X$          Original 2: $X_n\overset{D}{\to} X$          Original 3: $X_n\overset{\text{$r$th}}{\to} X$          Original 4: $X_n\overset{\text{i.i.d.}}{\sim} X$               Testing 1: $X_n\oset{P}{\to} X$          Testing 2: $X_n\oset{D}{\to} X$          Testing 3: $X_n\oset{\text{$r$th}{\to} X$          Testing 4: $X_n\oset{\text{i.i.d.}{\sim} X$     \end{document}      ![enter image description here](http://i.stack.imgur.com/HwUZ6.png) The spacing around the `\to` seems off. Can you guys help me come up with a more robust solution?


title: Undefined control sequence \State \For \While

text: I am trying to write a pseudo code in MiKTeX. I have used `\usepackage{algorithm}` `\usepackage{algorithmic}` but I get: > Undefined control sequence' for every structure (\State, \While, \For, \If).               \begin{algorithm}     \caption{PSO}     \label{pseudoPSO}     \begin{algorithmic}[1]     \State Initialize a population of particles with random values positions and velocities from \textit{D} dimensions in the search space     \WHILE{Termination condition not reached}      \For{ Each particle \textit{i}}         \State Adapt velocity of the particle using Equation \ref{eq:1}         \State Update the position of the particle using Equation \ref{eq:2}         \State Evaluate the fitness {$f(\overrightarrow{X}_i)$}         \If{\begin{equation}f(\overrightarrow{X}_i)<f(\overrightarrow{P}_i)\end    {equation}              \begin{equation}\overrightarrow{P}_i \gets \overrightarrow{X}_i\end{equation}         \EndIf         \If{\begin{equation}f(\overrightarrow{X}_i)<f(\overrightarrow{P}_g)\end{equation}              \begin{equation}\overrightarrow{P}_g \gets \overrightarrow{X}_i\end{equation}         \EndIf     \EndFor     \ENDWHILE     \end{algorithmic}     \end{algorithm}


title: Memoir footnotes in margin with ragged2e

text: I would like to set up `memoir` so that when I use `\footnote{foo}`, `foo` is displayed in the margin with the proper label and preferably break over pages. There is an option `\footnotesinmargin` which gives almost exactly what I need, only justified. I want it to use `ragged2e` and change alignment based on even/odd page so that the margin note is always flushed towards the main text area and allows hyphenation on the side of the edge.               \documentclass[12pt, draft]{memoir}     \footnotesinmargin     \usepackage{polyglossia}     \setmainlanguage{english}     \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \setmainfont[Ligatures=TeX,Numbers=OldStyle]{Minion Pro}     \usepackage{kantlipsum}          \begin{document}     \kant[1]\footnote{\kant[1]}     \kant[2]\footnote{\kant[2]}     \kant[3-5]     \end{document}      ## Possible partial work-around I have remembered a nice thesis based upon the Classic thesis template and found the source which indeed contains a possible solution:               \usepackage{marginnote}     \usepackage{ragged2e}     \newcommand{\sidemark}[1]{#1.{\:}}          \newcommand{\marginelement}[2][0]{%       \marginnote{%         \strictpagechecktrue         \checkoddpage         \ifoddpage%           \RaggedRight\footnotesize%         \else%           \RaggedLeft\footnotesize%         \fi%         #2%       }[#1\onelineskip]%     }%          \newcommand{\sidenote}[2][0]{%       \footnotemark%       \ignorespaces%       \marginelement[#1]{%         \sidemark{\thefootnote}%         \ignorespaces#2%       }%       \unskip%     }%      Nevertheless, I would still prefer a memoir-specific solution with the re- definition of footnotes when used with the option `\footnotesinmargin` mainly for the sake of portability. This work-around also **does not work with hyperref** (there is no hypertext connection) and **does not break over pages** automatically.


title: Error when compiling a 'minted' listings inside a 'memoir' subfloat

text: I'm trying to compile the following minimal example:               \documentclass{memoir}          % Enable subfloats within figures     \newsubfloat{figure}          \usepackage{minted}          \begin{document}     \begin{figure}     \subbottom{%     \begin{minted}{c}     test;     \end{minted}     }     \end{figure}     \end{document}      but I get an error:               ! Argument of \FV@BeginScanning has an extra }.     <inserted text>                      \par      l.13 \end{minted}}      I've tried replacing the `minted` environment with a `inputminted` which reads the code from a file, but to no avail. How do I fix this?


title: How to hyperlink to a file and open it on presentation mode in beamer?

text: I want to create a hyperlink to the file, and want to open that file directly from the hyperlink during presentation. I tried with the following code.               \documentclass{beamer}     \usepackage{graphicx}     \usepackage{animate}     \usepackage{amsmath}     \usepackage{xcolor}     \usepackage{mathtools}     \usepackage{hyperref}     \usepackage{multimedia}     \usetheme{PaloAlto}     \usepackage{graphicx}     \usepackage{natbib}               \usepackage{relsize}           \begin{document}          \frame{     \frametitle{Cosmology Simulations With Enzo}     \framesubtitle{We are going to start}     \href{run:simple_slice.txt}{click me}       \movie[externalviewer]{click me}{simple_slice.txt}     }          \end{document}      Both methods are not working. What may be the problem? How can I solve this? Thank You.


title: How to create a three column header with multiple rows on sides and Huge text in the middle

text: What I am trying to achieve is best said with this picture that I made in Microsoft Word and an image editor: ![enter image description here](http://i.stack.imgur.com/nDQbW.png) It would be nice (but not necessary) if the height of the middle text matched the height of the two side rows together. I fiddled with `multicol`, `parcolumns`, and other techniques for quite some time, but couldn't get this layout. What's the right way to do this?


title: Line break in a table cell for a math equation?

text: In the middle of typing up an assessment and trying to work out how to get equations to work inside a table environment               \documentclass [11pt] {article}     \usepackage{amsmath}     \usepackage{pdflscape}     \usepackage{float}     \restylefloat{table}     \begin{document}               \title{CSC3407 assessment one }     \author{My name My student number}     \date{09/03/2013}     \maketitle     \tableofcontents     \newpage          \begin{landscape}          \section{Question 3}     Fill the answers in the blanks in the two tables below. You need to provide the working process for each answer.     \subsection{A}     The network mask that supports:      \begin{table}[H]         \begin{tabular}{|l|l|l|}             \hline            Classful Network & Required borrowed subnet bits & The mask that supports the required subnets \\ \hline             100.0.0.0 & 12 & 8 bits for class A + 12 bits for subnet = $ 11111111.11111111.11110000.00000000 =1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0= 255$   \\                   \hline         \end{tabular}     \end{table}     \end{landscape}          \end{document}      The equation I need to split is 100.0.0.0 & 12 & 8 bits for class A + 12 bits for subnet = `$ 11111111.11111111.11110000.00000000 =1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0= 255$` \ If I could get the 1x2^7 ... to sit below the binary rep that would make it really good. Example               11111111.11111111.11110000.00000000     =1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0= 255$


title: How to make more than two fancy gradient stripes in tcolorbox?

text: I use the following fancy `tcolorbox` definition:               \newtcolorbox{mybox}{colframe=black!80,colback=black!10,sharpish corners,     skin=bicolor,interior style={left color=black!5,right color=black!35},segmentation style={left color=black!35,right color=black!5}}      Using `\tcblower` I can split the box, and make two fancy gradient stripe, but I would like to use more than two. How to do an environment with the same appearance, where I can use simple `\tcblower` or something like that to add another stripe?


title: List of Abbreviations not showing

text: I had a list of abbreviations, which worked fine, but now it's not showing any more. And I have no idea what I could've changed. It is shown in the table of content, but also on the wrong position.   My preamble:               \newcommand{\Abkuerzung}{         \printnomenclature         \newpage     }      The place where it should be displayed:               \addcontentsline{toc}{chapter}{\noname}     \Abkuerzung      My abbreviations \abbrev{dex}{Dalvik Executable} : How I build it:               pdflatex file.tex     makeindex file.nlo -s nomencl.ist -o file.nls     pdflatex file.tex     pdflatex file.tex      my output of makeindex:               Scanning style file /usr/share/texmf-dist/makeindex/nomencl/nomencl.ist....done(10 attributes redefined, 3 ignored).     Scanning input file file.nlo...done (0 entries accepted, 0 rejected).     Nothing written in file.nls     Transctipt written in file.ilg      I see that there is nothing written into the nls file and nothing happens and so, but what can I do? **EDIT**               \documentclass[11pt,a4paper]{report}                                                     \usepackage{graphicx}         \usepackage{a4}     \usepackage[english, ngerman]{babel}     %That Headings have Kapitälchen:     \usepackage[T1]{fontenc}          \usepackage{xcolor}          %%%%%%%%%BIBLIOGRAPHY + PICTURES IN TABLE OF CONTENTS     \usepackage[nottoc]{tocbibind}     \usepackage{breakcites}                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%ABKÜRZUNGEN     \usepackage{nomencl}     \let\abbrev\nomenclature     \renewcommand{\nomname}{List of Abbreviations}     \setlength{\nomlabelwidth}{.25\hsize}     \renewcommand{\nomlabel}[1]{#1 \dotfill}     \setlength{\nomitemsep}{-\parsep}     \makenomenclature      \newcommand{\Abkuerzung}{     \printnomenclature     \newpage     }                    \begin{document}          \include{cover}     \include{title}     \include{abstract}     \include{affidavit}          \selectlanguage{english}     \tableofcontents     \listoffigures     \renewcommand{\lstlistlistingname}{Listings}     \lstlistoflistings     \addcontentsline{toc}{chapter}{Listings}     \newpage     \addcontentsline{toc}{chapter}{\nomname}     \Abkuerzung               %%% Chapters     \include{Chapters/introduction}     \include{Chapters/overview}     \include{Chapters/migration}     \include{Chapters/analysis}     \include{Chapters/conclusion}          %%%%%%%%%%%%%%%%%%BIBLIOGRAPHY%%%%%%%%%%%%%%%%%%%%%     %\nocite{*}     \bibliography{bibliography}{}     %\bibliographystyle{apalike}     \bibliographystyle{abbrv}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%makeindex thesis.nlo -s nomencl.ist -o thesis.nls     \abbrev{dex}{Dalvik Executable}     \abbrev{XML}{Extensible Markup Language}     \abbrev{VM}{Virtual Machine}     \abbrev{JIT}{Just In Time}     \abbrev{DVM}{Dalvik Virtual Machine}     \abbrev{JVM}{Java Virtual Machine}                                                   \end{document}


title: Compare a character to a character code?

text: How can one compare a character (e.g. "U") with a character code in a certain font (e.g. "\char85"). I'd expect the following to work:               \documentclass{article}     \usepackage{ifthen}     \begin{document}     \font\X=cmr10     \X     U looks like \char85, ...%     \if U \char85 { and U is \char85 } \else { but U is not \char85 } \fi          % Or using the `ifthen` package:         Plus,      \ifthenelse{\equal{U}{\char85}}{ then U is U too }{ then U is not U, too }     \end{document}      Alas, neither works as expected. Thoughts and input are appreciated. ## Edit It is helpful to note that:               \meaning \char 85 \\     \meaning \char'U  \\     \meaning U      Produces the output:               “char85     "char'U     the letter U      These are clearly different internally, and I presume must be normalized before comparison.


title: linebreak fails for long lines in list of figures

text: When lines becoms long and there are many ~-characters (eg for citing) latex fails to break the line in the list of figures and prints into the margin. any ideas how to "force" a break before the margin?               \documentclass{book}          \begin{document}          \listoffigures          \begin{figure}     \caption{Long  Long  Long  Long Long  Long  Long  Long Long Long Long~Long~Long~Long/Long}     \end{figure}          \begin{figure}     \caption{Long  Long  Long  Long Long  Long  Long  Long Long Long Long~Long~Long~Long}     \end{figure}          \begin{figure}     \caption{Short}     \end{figure}          \end{document}


title: \elementarycharge command not recognized in siunitx package

text: I'm trying to use               \SI{0.006}{\elementarycharge}      in the `siunitx` package               \usepackage{siunitx}.      The `\elementarycharge` command does not work. I'm using               \documentclass[prb,twocolumn,showpacs]{revtex4}      Any idea?


title: Why aren't there well-hinted Type1 Computer Modern fonts supporting the T1 encoding yet?

text: Given the popularity of PDF, the pain that is OT1, and the bad on-screen rendering of bitmapped fonts in Adobe's software, I would have expected that someone would have undertaken conversion/extension of the BlueSky fonts to the T1 encoding while maintaining the quality of the hints ... but I've seen nothing about such a project anywhere. Why is that? (Or am I wrong? I would love to be wrong!) ## Edit: Now I've seen that someone is selling European Computer Modern fonts in Type1(?), and evidently they use T1 -- but why are they not free yet?


title: get width of longest line in table column

text: # Question In a longtable, how do I retrieve the width of the longest line for each column? # Background I'd like to use the `longtable` environment in combination with the `ltablex` package. The latter allows for weighting the columns, such that column 2 is twice as large as column 1, for instance. I have many tables to format, and due to their data source it's not possible to give the tables any hint on column widths. As often there is a lot of text in one or two columns, but little text in the others, it doesn't make sense to just use X columns. Therefore, I'd like to dynamically adjust the proportions of the table. My idea is to find the width of the longest line of each column. Using these width it should then be possible to calculate the proportions correctly (while granting each column a mininum width). _Thanks for your help!_


title: How to fix Footnote position at the bottom of the page

text: `\footnote[1]{\nameref*{8.1.16}` is an अधिकार सूत्र it goes upto `\nameref*{8.3.55}}` \& अङ्गाधिकार (अङ्गस्य)`\footnote[2]{\nameref*{6.4.1}` is an अधिकार सूत्र it goes upto `\nameref*{7.4.97}}` I am using footnote as shown above. However the footnote appears to be floating and when I don't have much in the page it appears in the middle of the page. I got by so far with \vspace{} but I think there must be a way to position this at the bottom of the page despite whats in the page. Thanks for your help ![alt text](http://i.stack.imgur.com/22AQ9.jpg)


title: Edit bibitem labels in BibDesk

text: For those who use BibDesk on OS X, is there a way to add labels to bibitem entries through the UI? A way to put "label" into the BibTeX item like: `\bibitem[label]{key}`? When items with labels are pulled into BibDesk, it changes the type of citation from, e.g., misc to misc[label] in the pull down menu. Also, is there another BibTeX editor that can do this? JabRef, etc.?


title: How to get the veelo chapter style of the memoir class to pick up trimmed paper sizes?

text: I have defined how I want to cut my paper and I was planning on using the veelo chapter style. However it doesn't pick up the trimmed paper size correctly. See this example:               \documentclass[showtrims]{memoir}            \usepackage{graphicx}            \stockaiv            \settrimmedsize{242mm}{165mm}{*}       \settrims{20mm}{20mm}       \settypeblocksize{*}{33pc}{1.618}       \setlrmargins{*}{*}{1.5}       \setulmarginsandblock{3pc}{3pc}{*}       \setcolsepandrule{1pc}{0pt}            \chapterstyle{veelo}       \checkandfixthelayout            \trimFrame            \begin{document}         \chapter{My first chapter}         Notice how the veelo setting has not picked up the right paper size.     \end{document}      I have tried calling `\checkandfixthelayout` before `\chapterstyle{veelo}` also but that did not make any difference. What am I doing wrong?


title: MikTeX 2.9 without list of packages in settings program

text: Today I updated MikTeX and the process aborted. After that, the **program does not show the list of packages** in the update (admin) program. I changed the package repository address and the program informs the following error: * * * Error report:               MiKTeX Problem Report     Message: Unknown package.     Data: uni-wtal-ger     Source: Libraries\MiKTeX\PackageManager\PackageManager.cpp     Line: 1026     MiKTeX: 2.9     OS: Microsoft Windows XP Professional Service Pack 3 (build 2600)     Invokers: explorer     SystemAdmin: yes     PowerUser: no     Root0: C:\Documents and Settings\Administrador\Datos de programa\MiKTeX\2.9     Root1: C:\Documents and Settings\Administrador\Configuración local\Datos de programa\MiKTeX\2.9     Root2: C:\Documents and Settings\All Users\Datos de programa\MiKTeX\2.9     Root3: C:\Archivos de programa\MiKTeX 2.9     UserInstall: C:\Documents and Settings\Administrador\Datos de programa\MiKTeX\2.9     UserConfig: C:\Documents and Settings\Administrador\Datos de programa\MiKTeX\2.9     UserData: C:\Documents and Settings\Administrador\Configuración local\Datos de programa\MiKTeX\2.9     CommonInstall: C:\Archivos de programa\MiKTeX 2.9     CommonConfig: C:\Documents and Settings\All Users\Datos de programa\MiKTeX\2.9     CommonData: C:\Documents and Settings\All Users\Datos de programa\MiKTeX\2.9 * * * After that, the list of packages is empty. I searched the uni-wtal-ger package and found it in `C:\Archivos de programa\MiKTeX 2.9\tpm\packages`. This file has the following content: * * *               <?xml version="1.0" encoding="iso-8859-1"?>     <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/">     <rdf:Description about="http://www.miktex.org/packages/uni-wtal-get">     <TPM:Name>uni-wtal-get</TPM:Name>     <TPM:Creator>mpc</TPM:Creator>     <TPM:Title>Citation style for literary studies at the University of Wuppertal.</TPM:Title>     <TPM:Version>0.1</TPM:Version>     <TPM:TargetSystem></TPM:TargetSystem>     <TPM:Description>The package defines a biblatex citation style based on the author-title style of biblatex-dw. The citations are optimised for literary studies in faculty of humanities at the Bergische Universität Wuppertal.</TPM:Description>     <TPM:RunFiles size="8916">texmf\bibtex\bib\uni-wtal-ger\germanistik.bib texmf\tex\latex\uni-wtal-ger\uni-wtal-ger.bbx texmf\tex\latex\uni-wtal-ger\uni-wtal-ger.cbx texmf\tpm\packages\uni-wtal-get.tpm</TPM:RunFiles>     <TPM:DocFiles size="71811">texmf\doc\latex\uni-wtal-ger\germanistik.pdf texmf\doc\latex\uni-wtal-ger\README</TPM:DocFiles>     <TPM:SourceFiles size="4531">texmf\source\uni-wtal-ger-src.tar.bz2</TPM:SourceFiles>     <TPM:TimePackaged>1304690215</TPM:TimePackaged>     <TPM:MD5>5cfacd1eb764f317970a3f8fabd04455</TPM:MD5>     <TPM:CTAN path="/macros/latex/contrib/biblatex-contrib/uni-wtal-ger"/>     <TPM:Copyright owner="Carsten A. Dahlmann" year="2011"/>     <TPM:License type="lppl1.3"/></rdf:Description></rdf:RDF>      * * * After I deleted this file, I repeated the process of changing the package repository, to force a reread of the package list. **The error repeats again**. I looked before posting the related questions to the title of my question and searched for `uni-wtal-ger` getting zero references. I use Windows XP SP3 with MikTeX 2.9. This happened once one year ago and the problem was resolved by someone retiring the difficult package. Does someone has an idea of how can I restore the package list or should I wait that the list of packages be repaired on the servers?


title: Appendix name repeated twice; How to get rid of the first instance?

text: I use for appendix the following function               \appendix     \renewcommand{\thesection}{\Roman{section}}          \section{appendix}          \section*{\text{Appendix I}}      But it gives me a double name of the section. How to 'erase' the first name for the appendix? (I wanted that it would be written 'Appendix I.').


title: Is there a way to typeout the contents of \graphicspath

text: First of let me admit that I've very new to the LaTeX, so this may be obvious and I just do see it, but here's my question: I'm trying to write a set of macros to automatically downsample images... sort of like `degrade.sty`, but for images that are inserted at arbitrary sizes in the document. What I would like to do is redefine `\includegraphics` so that this can be accomplished for existing documents. In order to find the intended graphics file, I need to know what paths are currently in the graphics path. Alas, I cannot figure out how to determine what those paths are. Is this possible?


title: listings package - Can I include a backslash \ in language keyword (\begin) for syntax highlighting in LaTeX code?

text: I want to highlight a LaTeX code (including backslash \, e.g. **\begin** ). Unfortunately, by default a LaTeX listings package does syntax highlighting only keywords WITHOUT back slash (e.g. **begin** ).


title: Automatically resize lstlisting fontsize in a beamer slide

text: I have frames of the following format (code followed by an itemize):               \begin{frame}[fragile]         \frametitle{Blah}         \begin{lstlisting}         Five to seven lines of code here...         \end{lstlisting}         \begin{itemize}             \item explanation             \item explanation             \item explanation         \end{itemize}     \end{frame}      What I want to accomplish is for the lstlisting to automatically resize the font to take up as much space as possible without causing horizontal and vertical overflows.


title: article(Noweb) in LyX 2.0.0

text: I've tough luck with running article(Noweb) in LyX 2.0.0. Could someone guide me how to run article(Noweb) in LyX 2.0.0? Sharing an example will be highly appreciated.


title: Computer Modern Unicode + OpenType for XeTeX / fontspec

text: I'd like to use the most modern version of the Computer Modern fonts for XeTeX [or anything newer, of course] with the FontSpec package. Currently, I'm using               \setromanfont{CMU Serif}      However, this produces odd results with certain characters, e.g. `--` or `'` in italic text (created with `\emph`), e.g. `ὔ` instead of `'`. The problem isn't there when I use Latin Modern Roman or Linux Libertine O, but [with Latin Modern Roman] foreign characters don't show up. (Sure, Linux Libertine is beautiful, but I want something a little less classy for normal documents :). ) I'm also using polyglossia, LyX, and a small script to remove LyX output errors, if it matters. I've looked at the TeX file and it seems fine. ## Edit 1 Here's a minimal example, sorry for not providing this earlier.               \documentclass{article}     \usepackage{xunicode,fontspec,xltxtra}     \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}     \setromanfont{CMU Serif}     \setsansfont{CMU Sans Serif}     \setmonofont{CMU Typewriter Text}     \begin{document}     \emph{hello -- a'b}     \end{document}      The render I get using xelatex is this: ![my xelatex render](http://i.stack.imgur.com/G15yB.png) ## Edit 2 Files used are here, thanks for the help all.


title: TeXnicCenter 2 Alpha 3 deleting my .tex files

text: I am using TeXnicCenter 2 Alpha 3, and I'm experiencing a weird problem where it seems to be deleting my `.tex` files occasionally. I'm not sure this is the best place to ask, but I wasn't sure where else to ask. I've also sugmitted a report about this on the sourceforge project page. Also, I realize it's an Alpha version so bug are to be expected. So, occasionally when TeXnicCenter tries to save the currently active file, I get a small popup error window with the following message:               Cannot save the file          C:\%path%\%file%.tex          Cannot create a file that already exists.      where `%path%` and `%file%` are the path and filename of the file currently being edited. Again, this happens only during some file saves, not all, and since a file save occurs whenever I build, and also whenever autosave dictates, I will occasionally get this message at the beginning of a build, in which case the build fails, and also it will occasionally pop up out of nowhere because Autosave has tried to save and failed. The details of the what happens are as follows:   * A save is attemped by build or autosave   * Above-mentioned error window pops up   * I press ok   * If I look in my working directory now, the file is missing, meaning the only copy is the one open in the TeXnicCenter GUI (Scary!! What if my computer crashes now? My file's lost.)   * If I try to build again, I get a second error saying `File %path%%name% could not be found`   * I can then manually save the file via `Ctrl+S` and build will then succeed. I haven't been able to figure out if there is a correlation with other programs being open when this happens, and it is sporadic and not unique to any particular project, so it is not feasible to provide a MWE to reproduce it. I am using Windows 7 Pro 64-bit, and MikTeX 2.8.


title: xpinyin: suppress pinyin annotation in footnotes

text: The `pinyinscope` environment of the `xpinyin` package adds pinyin annotations to all Chinese characters therein, including those that appear in the footnote. **Is it possible to suppress pinyin annotation for footnotes inside a`pinyinscope` environment (or inside an `\xpinyin*` command)?** My current work around is to use the `\footnotemark`+`\footnotetext` combination. But this is hardly efficient when there are a lot of footnotes to be entered. # MWE               \documentclass{article}     \usepackage[UTF8]{ctex}     \usepackage{xpinyin}          \begin{document}     \begin{pinyinscope}     文字文字文字\footnote{腳註\ inside \texttt{pinyinscope}}     \end{pinyinscope}          \begin{pinyinscope}     文字文字文字\footnotemark % work-around     \end{pinyinscope}     \footnotetext{腳註\ using \texttt{\string\footnotemark} and \texttt{\string\footnotetext}}     \end{document}      ![enter image description here](http://i.stack.imgur.com/KSHOl.png) ![enter image description here](http://i.stack.imgur.com/vt63B.png)


title: "TeX capacity exceeded" error when converting markdown to PDF using XeLaTeX with russian language

text: I've installed `pandoc` and `texlive-full` packages on recent Ubuntu 14.04 LTS 64bit to convert markdown files with russian language to PDF. Everything works fine when I run the following command:               pandoc --latex-engine=xelatex --toc --chapters -V mainfont="Ubuntu" -f markdown -o test.pdf test.md      But in order to have russian language also in table of contents, in pictures' descriptions and etc I specify `lang` variable like this:               pandoc --latex-engine=xelatex --toc --chapters -V mainfont="Ubuntu" -V lang="russian" -f markdown -o test.pdf test.md      and execution ends with the following message:               pandoc: Error producing PDF from TeX source.     ! TeX capacity exceeded, sorry [input stack size=5000].     <inserted text>                      -1     l.61 \tableofcontents      Everything works again if I specify another language, e.g. `french` or `dutch`:               pandoc --latex-engine=xelatex --toc --chapters -V mainfont="Ubuntu" -V lang="french" -f markdown -o test.pdf test.md      It doesn't matter what contents of `test.md` are. They could be a simple text file:               # Первая глава          Текст первой главы.          # Вторая глава          Текст второй главы.          # Третья глава          Текст третьей главы.      I use default latex template:               pandoc -D latex > mytemplate.tex      and guess that something goes wrong when main language is set:               \ifxetex         \usepackage{polyglossia}         \setmainlanguage{$mainlang$}     \else         \usepackage[$lang$]{babel}     \fi      Am I doing something wrong or is it a bug? Unfortunately, I was unable to find workaround to fix the problem. As I can see there is a lot of issues that may cause this error. I'm absolute beginner in pandoc, TeX and all related things so any help will be appreciated! **UPDATE** Tried on Windows 7 Professional 32bit using MiKTeX as recommended by pandoc documentation specifying `-V mainfont="Times New Roman"` for font and got exactly the same error...


title: Automatically itemize a paragraph

text: I'd like to use LaTeX for lecture notes but I use bullet lists extensively, and the itemize macro in LaTeX is too time consuming for lecture notes. But if I could teach LaTeX how to do it for me things would be beautiful! (Typing equations in OpenOffice is annoying...) If I'm typing a regular paragraph in LaTeX, every new line would be bulleted. There would be a command to denote an item that exists outside the bulleted paragraph. Finally, commands like `\up`, `\down` to promote/demote all lines of text that follow them in the list. An example:               \title{this would be the title of a slide}     this is a line of text     this is another line of text     \up     this is a subpoint     another     \down     last line      To get: > **This would be the title of a slide** > >   * this is a line of text >   * this is another line of text >     * this is a subpoint >     * another >   * last line > In a comment below, Werner described this more specifically. I want to "avoid using `\item` for every paragraph, and instead just let the paragraph breaks be "equivalent to" `\item`, while `\up` initiates a new `itemize` environment, and `\down` closes it." `\title` would then close _all_ `itemize` environments (the bolding is something I'd like to automatically have done but not necessarily relevant to the question).


title: How can I tell biblatex to filter entries based on URL and URLDATE?

text: I would like to create two separate lists of references using `biblatex`. The first one should contain literature references, the second one online references. My criterion is that any entry with both a `Url` and a `Urldate` in the BibTeX file should be an online source. So I defined a “bibcheck” like so:               \documentclass{article}          \usepackage[style=verbose]{biblatex}          \defbibcheck{online}{%       \ifboolexpr{          not test {\iffieldundef{Url}} and not test {\iffieldundef{Urldate}}       }{% Entry has both url and urldate -> it's a web source         }{%         \skipentry       }     }          \defbibcheck{hasurl}{%       \iffieldundef{Url}{\skipentry}{}%     }          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @misc{A01,       author = {Author, A.},       year = {2001},       title = {Alpha},       url = {http://www.google.com/},       urldate = {2012-06-21}     }     @misc{B02,       author = {Buthor, B.},       year = {2002},       title = {Bravo},       url = {http://www.google.com/}     }     @misc{C03,       author = {Cuthor, C.},       year = {2001},       title = {Charlie},       urldate = {2012-06-21}     }     @misc{D04,       author = {Duthor, D.},       year = {2001},       title = {Delta}     }     \end{filecontents}          \addbibresource{\jobname.bib}          \nocite{*}          \begin{document}          \printbibliography[check=online]     \printbibliography[check=hasurl]          \end{document}      This does not work, however, because it seems that in the bibcheck “routine” neither `Url` nor `Urldate` are set – even though they are printed correctly in the list of references. I tried outputting the value of the `Url` field using `\thefield{url}` and it only returns an empty string. How can I filter based on `Url` and `Urldate`?


title: Beamer, notes, and bibliography

text: I would like to create notes for a set of slides, but I have problem with my long bibliography. Here is a MWE:               \documentclass{beamer}     \setbeameroption{show only notes}     \usepackage[backend=biber,style=authoryear-comp]{biblatex}     \addbibresource{beamer.bib}     \usepackage[utf8]{inputenc}     \usetheme{Warsaw}          \makeatletter     \def\beamer@framenotesbegin{% at beginning of slide         \gdef\beamer@noteitems{}%         \gdef\beamer@notes{{}}% used to be totally empty.     }          \makeatother          \begin{document}     \begin{frame}[allowframebreaks]         FOO \\[10cm]         BAR     \end{frame}     \appendix     \begin{frame}         \cite{Stack1,Stack2,Stack3,Stack4,Stack5}.     \end{frame}     \begin{frame}[allowframebreaks]         \printbibliography     \end{frame}     \end{document}      With beamer.bib looking similar to:               @MISC{Stack1,        author = {Caesar, Gaius J.},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }     @MISC{Stack2,        author = {Caesar, Gaius J.},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }     @MISC{Stack3,        author = {Gaius J., Caesar},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }     @MISC{Stack4,        author = {Caesar, Gaius J.},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }     @MISC{Stack5,        author = {Gaius J., Caesar},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }      I used the answer to this question: Run macro on each frame in beamer to generate as many frames in my notes as in my slides. However, if you look at the last note, the bibliography doesn't show up, and as it spans over two frames (if you uncomment the second line `\setbeameroption{show only notes}`), I don't have the same number of frames in both documents. Any workaround ?


title: Tabular: Underfull \hbox (badness 10000) in paragraph at lines

text: I read all the questions regarding the error message `Underfull \hbox (badness 10000) in paragraph at lines` but I am still not sure if my code is correct. The problem is with the tabular of a table. When I see the pdf, what I notice is that the first raw (the header) occupies more than one line and some words are cut, which is the behavior I do expect. So, my question is, should I ignore those warnings or should I fix something? To reproduce the code:               \documentclass{article}          % Tables       \usepackage{pdfpages}     \usepackage{longtable}     \usepackage{array} % for extrarowheight     \usepackage[table]{xcolor}     \usepackage{tabularx}     \usepackage{ifthen}     \usepackage{xspace}     %\setlength{\extrarowheight}{1pt}     %\setlength{\tabcolsep}{1em}     \rowcolors{1}{black!10}{}          \newboolean{nextRetrait}     %\setboolean{french}{false}     \setboolean{nextRetrait}{false}          \newcommand{\retrait}         {\ifthenelse{\boolean{nextRetrait}}%            {\hspace{-3cm}}%            {}}%               \begin{document}          \begin{center}     \begin{table*}[!ht]     {\small     \hfill{}     \centering     \scalebox{0.8}{     \retrait\begin{tabular}{|p{1.8cm}|p{1.2cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.4cm}|p{1.4cm}|p{1.4cm}|p{1.4cm}|p{0.6cm}|}      \hline                \textbf{Application (swap unit)}            &\textbf{Size (MB) before swapping}           &\textbf{Objects before swapping}            &\textbf{Size (MB) after swapping}           &\textbf{Objects after swapping}            &\textbf{Size (MB) after experiments}           &\textbf{Objects after experiments}           &\textbf{Average objects per graph}           &\textbf{Average \% of shared objects per graph}           &\textbf{Gain}     \\     \hline     XXX (class) & 22.7 &  469882 & 10.6 & 254696 & 13.8 & 317107 & 170 &17\% & 40\% \\     \hline     \end{tabular}}}     \hfill{}     \caption{XXX}     \label{tb:XXX}     \end{table*}     \end{center}          \end{document}      And the warnings:               Overfull \hbox (2.82243pt too wide) in paragraph at lines 49--49     []|\OT1/cmr/bx/n/9 Application          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 (swap          Underfull \hbox (badness 10000) in paragraph at lines 49--49     []|\OT1/cmr/bx/n/9 Size          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 (MB)          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 be-fore          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 swap-          Underfull \hbox (badness 10000) in paragraph at lines 49--49     []|\OT1/cmr/bx/n/9 Objects          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 be-fore          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 swap-          Underfull \hbox (badness 10000) in paragraph at lines 49--49     []|\OT1/cmr/bx/n/9 Size          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 (MB)          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 af-ter          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 swap-          Underfull \hbox (badness 10000) in paragraph at lines 49--49     []|\OT1/cmr/bx/n/9 Objects          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 af-ter          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 swap-          Underfull \hbox (badness 10000) in paragraph at lines 49--49     []|\OT1/cmr/bx/n/9 Size          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 (MB)          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 af-ter          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 ex-per-i-          Underfull \hbox (badness 10000) in paragraph at lines 49--49     []|\OT1/cmr/bx/n/9 Objects          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 af-ter          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 ex-per-i-          Underfull \hbox (badness 10000) in paragraph at lines 49--49     []|\OT1/cmr/bx/n/9 Average          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 ob-jects          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 per          Underfull \hbox (badness 10000) in paragraph at lines 49--49     []|\OT1/cmr/bx/n/9 Average          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 % of          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 shared          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 ob-jects          Underfull \hbox (badness 10000) in paragraph at lines 49--49     \OT1/cmr/bx/n/9 per          Overfull \hbox (5.3494pt too wide) in paragraph at lines 49--49     []|\OT1/cmr/bx/n/9 Gain|           Overfull \hbox (57.22829pt too wide) in paragraph at lines 30--51     []  []          Underfull \hbox (badness 10000) in paragraph at lines 30--51


title: How to have the same visual effect of a figure in a non-floating environment

text: I have the following code:               \begin{figure}     \centering     \subfloat[\footnotesize my_sub_caption1]{\includegraphics[width=0.45\linewidth]{images/my_image1}}     \quad     \subfloat[\footnotesize my_sub_caption2]{\includegraphics[width=0.45\linewidth]{images/my_image2}}     \quad     \subfloat[\footnotesize my_sub_caption3]{\includegraphics[width=0.45\linewidth]{images/my_image3}}     \caption{My caption}     \label{fig:my_label}     \end{figure}      which creates a figure with 3 subfigures exactly how I desire. Now I don't want this image to float: a first solution (the one I used at the moment) is to put a \pagebreak before and after the figure, forcing image position with \begin{figure}[h]. This solution is ok for me because my image has to take a whole page, but I'd love a more systematic approach. Since I don't want the image to float I tried to use a minipage, with the following code:               \begin{minipage}[t]{\textwidth}     \begin{center}         \begin{minipage}{0.45\textwidth}             \begin{center}                 \includegraphics[width=\linewidth]{images/my_image1}                 \captionof{subfigure}{my_sub_caption1}             \end{center}         \end{minipage}         \quad         \begin{minipage}{0.45\textwidth}             \begin{center}                 \includegraphics[width=\linewidth]{images/my_image2}                 \captionof{subfigure}{my_sub_caption2}             \end{center}         \end{minipage}     \end{center}          \begin{center}         \begin{minipage}{0.45\textwidth}             \includegraphics[width=\linewidth]{images/my_image3}             \captionof{subfigure}{my_sub_caption3}         \end{minipage}     \end{center}     \captionof{figure}{My caption}     \label{fig:my_label}     \end{minipage}      This solution actually worked, but my subcaptions haven't got the brackets as in the rest of my work. Any solutions?


title: Contents of title field "all lowercase" for BibTeX entry?

text: Online resources like this:               @MISC{Google:AppEngine:Datastore:Java:API,       author = {Google},       year = {2012},       month = "April",       title = {Google App Engine Datastore Java API},       url = "https://developers.google.com/appengine/docs/java/datastore/",       note = "[Accessed: June 2012]"     }      have an "all lowercase" title in my bibliography. Non-@MISC resources display just fine. Example: (the above is displayed as follows) Google (2012), `Google app engine datastore java api'. [Accessed: June 2012]. URL: https://developers.google.com/appengine/docs/java/datastore/ I am using:               \usepackage[round]{natbib}     \usepackage{multibib}     \bibliographystylereferencedonline{agsm}     \bibliographyreferencedonline{robottinosino}      and quoting without citation:               \nocitereferencedonline{Google:AppEngine:Datastore:Java:API}      Any ideas as to why? Also, could I have the [Accessed: Month Year] block appear after the nicely formatted URL?


title: Font formatting order

text: I want to set my `chapterprefix` font for `scrbook` class. This is what I want to do:               \setkomafont{chapterprefix}{\centering\Huge\rmfamily\mdseries\scshape}      However, as I was writting it, I asked myself if there is any difference in the order I give `LaTeX` the commands. Is there any **right** order to do this? Should I go first with the placement (`\centering`), with the family (`\rmfamily`), shape (`\scshape`), weight (`\mdseries`), size (`\Huge`)...?


title: How can I represent these symbols?

text: Can someone tell me how to write these symbols in LaTeX? ![enter image description here](http://i.stack.imgur.com/sOoHA.png)


title: Topics for a book about LuaTeX

text: I am writing a book about LuaTeX - what topics would you like to see in that book? More beginner's topics or more advanced sections? Both? I'd like to hear your opinion.


title: How do I control how tikzpictures are grouped within figures?

text: I want to be able to control how tikzpictures are grouped within a figure. I've got several `tikzpicture` within a `figure` set to `\centering`. Is there a way to control how close the tikzpictures are placed to each others? To clarify see the following example. This               \documentclass{article}          \usepackage{tikz}          \begin{document}          \begin{figure}     \centering     \begin{tikzpicture}     \draw circle (2.4cm) node (w) {\(A\)};     \end{tikzpicture}     \begin{tikzpicture}     \draw circle (2.4cm) node (w) {\(B\)};     \end{tikzpicture}     \begin{tikzpicture}     \draw circle (2.4cm) node (w) {\(C\)};     \end{tikzpicture}     \begin{tikzpicture}     \draw circle (2.4cm) node (w) {\(D\)};     \end{tikzpicture}     \caption{Caption}     \end{figure}          \end{document}      produces this: ![Four tikzpictures in a centered figure](http://i.stack.imgur.com/J0zEh.png) I find the circles grouped fined but I want them to be slightly further away from each others. How can I control this? What's the best way to approach this?


title: Vertical lines going beyond the borders of my table

text: I am very new to LaTeX so please excuse the amateur question. I am creating a table using the following commands:               \begin{table}[ht!]     \small     \centering     \caption{Effect of industry on \emph{Bad Self Impact} by value of \emph{Cultural Sentiment}}.     \begin{tabular}{|c|c|c|c|}\\      \hline     Value of \emph{Cultural Sentiment}  & Coefficient on \emph{Import Industry}  & P-value & Observations\\ \hline     Positive & 0.234 (-0.108, 0.577) & 0.179 & 1995\\ \hline     Neutral & 0.607 (0.267, 0.947) & 0.000 & 1040\\ \hline     Negative & -0.099 (-0.485, 0.288) & 0.616 & 703\\ \hline     \end{tabular}\\     \end{table}      But the result looks like this, with two lines on the top left of the table jutting out beyond its borders. How do I get rid of them? ![enter image description here](http://i.stack.imgur.com/4qObH.png)


title: Use \captionof in conjunction \subfigure?

text: I'm using the KOMA scrreprt class. I have a large figure with 6 subfigures, and a lengthy (but necessary!) caption explaining the figure that doesn't fit on the same page. I'm trying to use the `\captionof` command in a centering environment to produce a caption that will automatically wrap to the next page; something like               \begin{center}       \begin{figure} [h!]         \subfigure[ ]{ \includegraphics{picture1.pdf} }         \subfigure[ ]{ \includegraphics{picture2.pdf} }         ...         \subfigure[ ]{ \includegraphics{picture3.pdf} }       \end{figure}       \captionof{figure}[Short caption]{Long caption explaining the whole figure}     \end{center}      The figure is getting repositioned to the end of the section (even with the h! float specifier), and the caption ends up dissociating from the figure so that they appear in completely different parts of the document. I assume this is because I am still using the figure environment? But I need this for subfigure to work. Using the H specifier from the float package helps - I get the caption and the figure on consecutive pages - but the caption still doesn't wrap the way I'd like, the figure is on its own page with no label, and the KOMA scrreprt class throws an error. Is there either a) an alternative to subfigure that will handle labels in the same way, or b) a way to make \captionof play nicely with the figure float? * * * Edit: Werner's answer below is excellent, but it has two small problems: 1) ~~The figure itself now splits over two pages, so that the first two images are on a page with some other material. Is there a way to prevent this?~~ (easily fixed with a `\newpage` command just above the figure) 2) ~~Although the ToF entry is perfect, the reference numbering in the text is broken. I suspect that the figure is getting numbered as a table.~~ Werner to the rescue again: `\def\@currentlabel{\thefigure}\label{<label>}` works with a slight quirk. I have assigned labels to each subfigure, and they all end up appearing the same in the compiled document, so subfigure specifiers – e.g. (a) – have to be added manually. The label redefinition can be added to the after page argument instead.


title: Higher sections like Part are missing in my table of contents

text: I am using LyX. My document uses Part*, Section*, Subsection*, Subsubsection* sections, and babel with `\usepackage[english,frenchle]{babel}`. With the _memoir_ document template, only Subsection* and Subsubsection* appear in the TOC, not the Section* nor Part*. With the LyXBook template, none at all, just the "Table of Contents" title. My document was built with a huge use of awks, sed helpers, from a LbreOffice document. Though it compiles to produce a pdf, I may have broken something ? EDIT : Below my MWE that fails with LyXBook - only parts appear in the TOC (but works with memoir). What may have I broken ? Or what I could try to add in the preambul to make it work ? EDIT: I suppressed the stars in the sections. Actually, they appear in the TOC and still I can suppress the numbering. As this MWE is from scratch, I did not break anything except a misuse of the stars in sections declarations (in the new MWE below, I have suppressed the stars). So the remaining question is: can I have a more complete TOC, including _Section_ and _Subsection_?               #LyX 2.0 created this file. For more info see http://www.lyx.org/     \lyxformat 413     \begin_document     \begin_header     \textclass LyXBook--Default     \use_default_options true     \begin_removed_modules     Endnote     \end_removed_modules     \maintain_unincluded_children false     \language english     \language_package default     \inputencoding auto     \fontencoding global     \font_roman default     \font_sans default     \font_typewriter default     \font_default_family default     \use_non_tex_fonts false     \font_sc false     \font_osf false     \font_sf_scale 100     \font_tt_scale 100          \graphics default     \default_output_format default     \output_sync 0     \bibtex_command default     \index_command default     \paperfontsize default     \spacing single     \use_hyperref false     \papersize default     \use_geometry false     \use_amsmath 1     \use_esint 1     \use_mhchem 1     \use_mathdots 1     \cite_engine basic     \use_bibtopic false     \use_indices false     \paperorientation portrait     \suppress_date false     \use_refstyle 1     \index Index     \shortcut idx     \color #008000     \end_index     \secnumdepth 1     \tocdepth 1     \paragraph_separation indent     \paragraph_indentation default     \quotes_language english     \papercolumns 1     \papersides 1     \paperpagestyle default     \tracking_changes false     \output_changes false     \html_math_output 0     \html_css_as_file 0     \html_be_strict false     \end_header          \begin_body          \begin_layout Standard     \begin_inset CommandInset toc     LatexCommand tableofcontents          \end_inset               \end_layout          \begin_layout Part     pppppp     \end_layout          \begin_layout Section     ssssssss     \end_layout          \begin_layout Standard     gergerg ertert     \end_layout          \begin_layout Subsection     xxxxxxxxxxxxx     \end_layout          \begin_layout Subsubsection     cccccccccc     \end_layout          \begin_layout Standard     fgergergerg rgterg     \end_layout          \end_body     \end_document


title: How to plot a lattice of points on the surface of a torus?

text: I am doing a report on the Ising model, without going into the complex details of the model, in its two-dimensional form it involves a lattice of points. ![Lattice of Points](http://i.stack.imgur.com/6O74w.png) Which, when periodic boundary conditions are imposed can be though of as on a torus. For clarification, what I mean by "periodic boundary conditions" is that the right neighbour to a point in the far right column is a point in the far left column in the same row, and the bottom neighbour to a point in the bottom row is a point in the top row in the same column. ![Torus](http://i.stack.imgur.com/g8wdG.png) Therefore, what I want to do is plot a grid on a torus, and place dots on that grid. I also eventually want to place arrows going from one point to the next on the torus, as I did here for the lattice: ![Sweep through lattice](http://i.stack.imgur.com/Nm9dE.png) I'm just having a lot of trouble trying to put it all together. How can this be achieved with Tikz? If not with Tikz, then how can be achieved at all? Thank you in advance for any answers or comments. I've done a fair bit of research on drawing a torus:   * How to draw a torus   * Drawing a ring around a torus (doughnut) using TikZ   * Drawing checkered torus (doughnut)   * Need to plot a lattice and the topological building of a torus!   * How to draw a torus And a few other things:   * LaTeX/PGF/TikZ   * Tikz: Draw simple shortened curved line between two coordinates in tikz   * Easy curves in TikZ And if it helps, here is the source code to the drawings I made in this post:               \begin{tikzpicture}         \clip (-1,-1) rectangle (6cm,6cm);          \draw[style=help lines,thick] (0,0) grid[step=.5cm] (5,5);              \foreach \x in {0,1,...,10}         {             \foreach \y in {0,1,...,10}             {                 \node[draw,circle,inner sep=2pt,fill] at (.5*\x,.5*\y) {};             }         }     \end{tikzpicture}      and...               \begin{tikzpicture}         \clip (-1,-1) rectangle (6cm,6cm);               \foreach \x in {0,1,...,10}         {             \foreach \y in {10,9,...,0}             {                 \node[draw,circle,inner sep=1pt,fill] at (.5*\x,.5*\y) {};                 \draw[thick,->] (.5*\x,.5*\y) -- (.5*\x+.4,.5*\y);                 \draw[thick,->] (.5*\x,.5*\y) -- (.5*\x,.5*\y-.4);             }         }     \end{tikzpicture}      My only request is that graphics created in non-LaTeX applications like InkScape, Blender, etc not be suggested.


title: Multicol and Itemize

text: I am using the `multicol` package with `itemize`. On the left of my two columns, each bullet point is 2 lines long, and on the right side, each bullet point is one line long. Right now, my output is being displayed as: ![enter image description here](http://i.stack.imgur.com/4d6yy.png) However, I want the bullet points on the left and right columns to be aligned such that the first lines of each bullet point are aligned. The code I am using right now is:               \begin{multicols}{2}     \textbf{Hello World}     \begin{itemize}     \item         Hello: This, is, a, list, of, many, things, that, I, like     \item         Goodbye: This, is, a, list, of, many, things, that, I, like     \end{itemize}     \columnbreak     \textbf{Goodbye World}     \begin{itemize}     \item         Hello: One liner now     \item         Goodbye: Still a one liner     \end{itemize}     \end{multicols}      How can obtain my desired output?


title: Comprehensive list of tools that simplify the generation of LaTeX tables

text: Manually hacking tables in LaTeX is one of the less funny things when preparing a document. Naturally, there are quite a few tools that promise to simplify this. In fact, I have somewhat lost track of all the tools available, and I'd like to gather your valuable experience into one big post. Some of the tools are mentioned in Tool for manipulating LaTeX tables (HTML to LaTeX), but I feel there's much more around. I'd suggest that somebody starts an overview with an alphabetic list (so that I can accept this answer and it stays on top), and that everyone replies with a "community wiki" entry, one reply per tool, and inserts the tool into the list. Personally, I use Excel2LaTeX, but I'm unhappy with having to fire up Windows in order to generate the LaTeX code. I'm thinking of a rewrite as a standalone Python tool using the `xlrd` library, but I'm not too inclined to reinvent the wheel.


title: App for making tables

text: I know of a few web-based apps that allow you to make tables, but they're all a bit clunky. Does anybody know of an app you can download that allows you to draw/edit tables and easily copy-paste code into latex? Or, are there any other recommendations for the best way to draw a table for latex?


title: I am having trouble importing a big excel table into latex

text: I have an excel file including the following table. How should I create something similar to it? Is it better to use the table code in latex or make a figure from it and import it to latex (I did this but the quality of picture was so bad). If I have to create a table, how should I automatically import those values to latex, because the values are too much to be written without any automatic routine. ![enter image description here](http://i.stack.imgur.com/zCxhY.png)


title: How can I import an excel table into latex longtable

text: I want to import some data from excel which is in table form (raw from that it not formatted) and I want to import into a longtable with the appropriate formatting (if indeed it can be done in one step) what is the easiest way to do this?


title: Include data from LibreOffice Calc or MS Excel

text: I'd like to use LibreOffice Calc or MS Excel to create and edit spreadsheets and include these in LaTeX (LuaLaTeX would be fine, too). It is necessary for me to get calculated values like `SUM(C2:C5)` as well. So far I've tried odsfile and exceltex. ~~Where odsfile didn't work at all~~ , exceltex did work but ignored calculated values. Has anyone successfully tried to include spreadsheet data with calculated values? **Update** This question is not the same as "I'd like a easy interface for LaTeX-Tables", as I look for a more comprehensive solution. We use spreadsheets for modeling our problems. When we refine our models, I'd like to update the TeX-based reports without exporting/importing many tables. That said, odsfile works pretty much as I wanted to. Thanks for your comments and suggestiongs so far. Do you know any other solutions like odsfile?


title: tables from excel to tex

text: > **Possible Duplicate:**   >  Comprehensive list of tools that simplify the generation of LaTeX tables I have some tables in excel. I use `excel2latex` to generate the LaTeX code to insert them into by document. `excel2latex` seems to mess things up pretty badly: horizontal lines, vertical text, etc. What other options are there for generating tables that do not require typing out all the tex code by hand for the table and maintain nice formatting?


title: automatic creating of tables

text: > **Possible Duplicate:**   >  Comprehensive list of tools that simplify the generation of LaTeX tables I'm writing an larger report for my bachelor project and I wonder if there where an easy way to create table, maybe and program that generates the code for my?, so I don't have to this way:               \begin{table}[position specifier]     \centering     \begin{tabular}{|l|}     ... your table ...     \end{tabular}     \caption{This table shows some data}     \label{tab:myfirsttable}     \end{table}      Right now im using word to create the tables, because my tables is to large and complicated to i want to do it manually.


title: Software latex for designing complex tables

text: I look for a software for designing complex table by generating code latex. I know drawlatex but it not suitable for me.


title: Good LaTeX Table Editor?

text: For LaTeX tables editor, I am using LaTable version 0.7.1 which is good to a large extent. The only problem I have (so far) with this editor is the ability of adding multi-lines in a cell. Can someone suggest a powerful table editor for LaTeX?


title: Visual editor for multi-column table layout

text: > **Possible Duplicate:**   >  Comprehensive list of tools that simplify the generation of LaTeX tables Is there a visual tool which can generate tex code for more complex tables as shown? The idea is to drawn them and generate the latex code as shown: ![enter image description here](http://i.stack.imgur.com/NB2Cz.png)


title: Including pdf_tex images from inkscape

text: I am trying to use pdftex to lay out a document including images made in inkscape. From inkscape I can output the images as pdfs with accompanying pdf_tex files and put these in a figure environment. This works if the figures are in the main file. However, I have each chapter in a separate folder with all the images for that chapter. When I include images in a chapter I get the error : "Package pdftex.def Error: File 'peeling_flow_constant_width.pdf' not found." Googling around (here: http://mirrors.ibiblio.org/CTAN/info/svg- inkscape/InkscapePDFLaTeX.pdf) suggests that if I had all my images in the same folder then I could use \graphicspath. This doesn't work for my case of having graphics in each of the separate chapter subfolders. I think the problem comes from the fact that the .pdf_tex file automatically generated by inkscape includes the command: \put(0,0){\includegraphics[width=\unitlength]{base_peeling_flow_constant_width.pdf}}% This command doesn't have any information about the path to the pdf file. My minimal working example is               \documentclass[12pt,chapterprefix,openright,twoside,a4paper,numbers=noenddot,DIV11,BCOR1cm]{scrbook}     %\include{l_preamble}     \usepackage{graphicx} % to be able to use \includegraphics     \usepackage[rgb]{xcolor} % Needed by pdfcomment          \begin{document}          \begin{figure}[htb]     \input{base_peeling_flow_constant_width.pdf_tex}     \end{figure}          \include{chapter1/chapter1}          \end{document}      with the chapter 1 file               \section{test chapter1}          \begin{figure}[htb]     \input{chapter1/peeling_flow_constant_width.pdf_tex}     \end{figure}


title: htlatex converting all occurences of 'ff' and 'fi' to null characters in HTML output

text:
I'm running MiKTeX under Windows 7, trying to compile some LaTeX to HTML using htlatex. htlatex appears to be converting every instance of 'ff' and 'fi' with a NUL byte in the HTML. Was wondering if anybody had any insight! Here's the config file I'm using ( _some stuff I got on the internet that is probably the whole problem_ ):               \Preamble{xhtml}     \Configure{HtmlPar}     {\EndP\Tg
}     {\EndP\Tg
}     {\HCode{
\Hnewline}}     {\HCode{
\Hnewline}}     \Configure{emph}{\ifvmode\ShowPar\fi\HCode{}}{\HCode{}}     \Configure{textbf}{\ifvmode\ShowPar\fi\HCode{}}{\HCode{}}     \begin{document}     \EndPreamble      And here is an example tex file that illustrates my problem:               \documentclass{article}          \begin{document}          \section{Letters}     \subsection{Valid Letters}     AA Aa aA aa\\     BB Bb bB bb\\     CD Cd cD cd\\     \subsection{Invalid Letters}     FF Ff fF ff\\     FI Fi fI fi\\          \section{Strings}     a string of text\\     a fine string of text\\     a definition of an efficient and fine string of text\\     finally, the problem is solved!\\          \end{document}      And here is output I get after running the the command `htlatex example.tex MyFonts.cfg "xhtml, NoFonts, -css" -utf8 -shell-escape` > 1 Letters > > 1.1 Valid Letters > > AA Aa aA aa   >  BB Bb bB bb   >  CD Cd cD cd > > 1.2 Invalid Letters > > FF Ff fF   >  FI Fi fI > > 2 Strings > > a string of text   >  a ne string of text   >  a denition of an ecient and ne string of text > > nally, the problem is solved! If I look in the HTML output, all occurences of 'ff' and 'fi' have been replaced by the NUL character. Does anybody know why? Thanks!


title: define a newcommand that will put text in verbatim

text: For making a report of my work, I am facing a problem of writing varbatim too frequently. So, I need a workout. Say, I define a newcommand as (for example)               \newcommand{\uve}{\textbf{In verbatim}}  %there must be something more      now, if I invoke               \uve <some text>      the effect should be as               \textbf{in verbatim}     \begin{verbatim}     <some text>     \end{verbatim}      I tried using               \providecommand{\uve}[1]{\\\textbf{In Verbatim:~}\begin{verbatim}{#1}\end{verbatim}}      and failed, with error: Runaway argument?               {/}\end {verbatim}<some text>^^M\stat Complete\ETC.     ! File ended while scanning use of \@xverbatim.     <inserted text>       Kindly help. **Edit after 3 comments** For my present purpose, `\verb` is sufficient. but, I need to define an environment (sorry, not a command as I put in OP) that will give me:               \begin{verbenv}      some text     \end{verbenv}      will directly give me:               **In verbatim:** Some text


title: Underfull \hbox (badness 10000) in paragraph for table

text: I got a "bad box" warning said `!h'               Underfull \hbox (badness 10000) in paragraph     Underfull \hbox (badness 10000) in paragraph     Underfull \hbox (badness 10000) in paragraph     Underfull \hbox (badness 2707) in paragraph      The source code is               \begin{table}[!ht]     \caption{Comparison of design requirements for adults and children}     \footnotesize     \begin{center}     \begin{tabular}{|p{0.2\linewidth}|p{0.35\linewidth}|p{0.35\linewidth}|}     \hline \centering{Message} & \centering{Adults}  & \centering{Children} \tabularnewline      \hline *M1-constraint-requirement-requirement-summary & ``The target user is an \textbf{adult}. Constraints - Ergonomics can be found in standard \textbf{XX1}.''& ``The target user is a \textbf{child}. Constraints - Ergonomics can be found in standard \textbf{XX2}.'' \tabularnewline      \hline      \end{tabular}      \end{center}     \end{table}      and it looks like this ![enter image description here](http://i.stack.imgur.com/aEkX1.png) I don't know what's going wrong in my case.


title: How to have an itemized list in beamer conditionally appear

text: I would like to have an itemized list of points with follow-up points appearing once I am taking about that item. My guess is that this is going to need something like a pause, overlay, or the \only commands. Below is what I would like the slides to look like: ![enter image description here](http://i.stack.imgur.com/Klmi0.png)


title: How to gradually unveil a tikz node from its background

text: I would like to gradually unveil a `tikz` `node` from its background (like an animation, from un-noticable to gradually clear). One strategy could be to gradually reduce the `opacity` level of the node, through a `foreach`. I am not sure if is the right approach as it is still rather discrete and non- smooth.


title: Best way to avoid repeating expressions

text: I'm writing a text where I repeatedly speak of particular expressions which compose more complex expressions which I also repeatedly speak of (more specifically I'm writing a text with logical and set theoretic expressions). If I put my simple expressions in definitions and build up the more complex expressions from these definitions I benefit in the following ways:   1. If I decide to change a particular expression it's easy to change it and it reflects throughout my text.   2. It's easier to avoid mistakes of not repeating the exact expression. That is, it's easier to be consistent.   3. The source might be easier to read and write. Here's an example:               \documentclass{article}          \def\firstcond{A \land B}     \def\secondcond{C \lor D}     \def\thirdcond{E \land F}     \def\firstimp{\firstcond \to \secondcond}     \def\secondimp{\thirdcond \to P(\secondcond )}          \begin{document}          \begin{equation}     (\firstimp ) \leftrightarrow ( \secondimp )     \end{equation}     \(\lnot (\secondimp )\) instead of \(\secondimp\), thus     \begin{equation}     (\firstimp ) \leftrightarrow \lnot( \secondimp )     \end{equation}          \end{document}      Say that I decide that `\firstcond` is a bad expression and that it should read some other way. Then I can just change the definition of `\firstcond` and it reflects throughout my document (I know that this can be done by an editor's search and replace but that doesn't help with point 2 and 3). What I prefer with this solution is that `\def` can be put after the preamble so that it can figure right before it's used so that its contents is near its first use in text. This makes it easier when writing because I don't have to scroll back and forth or switch between files to see the contents. Now, my question. Is this the best way to achieve this kind of writing/way of working? Is there any way to improve on it? Note that I'm not looking for ways to make cross-references because in this case I don't want to burden the reader with the overhead of connecting a label to an expression.


title: Tikz /.style with two parameters

text: How do I pass two parameters to a tikz style? I would like to do something like this:               \begin{tikzpicture}[         transformer/.style={draw, cylinder, gray!80, rotate=90, minimum height=#1, minimum width=#2},      And then, I want to use this style in a node:               \node [transformer{2.3cm}{1cm}] () at (0,0.6) {};


title: Copy pasting of underscore

text: When I use `\textunderscore` to print an underscore "_" character, the copy- paste functionality of Adobe Acrobat Reader does not appear to work properly. For instances, when I copy               test_case       from Acrobat, and paste it in notepad, I get               test case      How to ensure that underscore is copied properly?


title: Rounded ends with tikz

text: I can draw double lines, and I can draw rounded caps using certain arrowheads. However, in combination they don't look as you would expect:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,scopes}     \begin{document}      \begin{tikzpicture}       \draw [line width = 4pt,-round cap] (0,0) -- (0,1);       { [every path/.style = {double distance = 2pt, very thick}]        \draw (1,0) -- (1,1);        \draw [-round cap] (2,0) -- (2,1);       }      \end{tikzpicture}     \end{document}      ![tiny sample pictures](http://i.stack.imgur.com/c7PRV.png) I would prefer the "round cap" on a doubled line to cause the lines to curve around the end and meet, as in:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,scopes}     \begin{document}      \begin{tikzpicture} [very thick, x=1em]       \draw (0,0) -- (0,1)             arc [x radius = 0.5em, y radius = 0.5em, start angle = 180, end angle = 0]             (1,0) -- (1,1);      \end{tikzpicture}     \end{document}      ![larger sample picture](http://i.stack.imgur.com/EphAB.png) Obviously I _can_ draw such a thing, but how can I do it with an arrow head?


title: Add text to Penrose triangle

text: I'd like to add text to the Penrose triangle (code below) and write   "London", "Paris", "Berlin" on the sides. How can I do that?               \begin{tikzpicture}[scale=1, line join=bevel]          % \a and \b are two macros defining characteristic     % dimensions of the Penrose triangle.            \pgfmathsetmacro{\a}{1.8}     \pgfmathsetmacro{\b}{0.7}          \tikzset{%       apply style/.code     = {\tikzset{#1}},       triangle_edges/.style = {thick,draw=black}     }          \foreach \theta/\facestyle in {%         0/{triangle_edges, fill = gray!50},       120/{triangle_edges, fill = gray!25},       240/{triangle_edges, fill = gray!90}%     }{       \begin{scope}[rotate=\theta]         \draw[apply style/.expand once=\facestyle]           ({-sqrt(3)/2*\a},{-0.5*\a})                     --           ++  (-\b,0)                                       --             ({0.5*\b},{\a+3*sqrt(3)/2*\b})                -- % higher point              ({sqrt(3)/2*\a+2.5*\b},{-.5*\a-sqrt(3)/2*\b}) -- % rightmost point           ++({-.5*\b},-{sqrt(3)/2*\b})                    -- % lower point             ({0.5*\b},{\a+sqrt(3)/2*\b})                  --           cycle;              \end{scope}       }       \end{tikzpicture}      Thanks, Marco