title: How do I put the "$_" string in a \section?

text: How do I put the "`$_`" string in a `\section`? When I try `\section{$\\_}` it gives me `Missing $ inserted` error. When I try `\section{\$\\_}` it gives me `Extra }, or forgotten $.` error. When I try `\section{\verb|$_|}` it gives me `Argument of \@xtrplargoom has an extra }` error.


title: Tikz Drawing bent lines

text: I would like to draw the below picture:   ![enter image description here](http://i.stack.imgur.com/IsQ5u.png)   I have achieved to do the following:   ![enter image description here](http://i.stack.imgur.com/RRcqM.png) Here is the MWE:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \filldraw[color=lightgray] (1,0) rectangle (7,4);     \filldraw[color=blue] (1.5,3) rectangle (2.5,0.5);     \filldraw[color=blue] (5.5,3) rectangle (6.5,0.5);     \filldraw[color=white] (3.5,1.2) rectangle (4.5,2.4);     \end{tikzpicture}     \end{document}       My question is, how to draw these red lines from the North pole to south pole through the intermediate square?


title: What is the difference between install texlive through iso image and through apt-get in Ubuntu?

text: I'd like install TeX Live, but I'd like know the best option: download the ISO image or install through `apt-get` command: `apt-get texlivefull`. I am using Xubuntu 11.10. Is there a significant difference between two types of installations? I will have the same packages? Can I use Kile editor with Tex Live installed through the ISO image? Is it hard to configure it?


title: Label variables of equation using tikz without using itemize

text: I'm trying to use tikz to label the variables of an equation. I know of a similar question (Itemized Equation) but the answer uses itemize to label the variables. I would like to do something similar to what the attached figures shows, though of course, I would like for it to look nice :) Any suggestions? Thanks, ![enter image description here](http://i.stack.imgur.com/lYbHf.png)


title: Labelling a TikZ Diagram - Issues

text: I would like to label my TikZ ER iagram. The `figure` environment shows me error (wanted to use caption). So I created a node at the required postion. But, the size of figure has now reduced. I tried scaling but no improvement in that. I would like to label my diagram. Please help me out. Here is the code:               \documentclass[12pt]{article}     \usepackage{tikz-er2}     \usepackage{pdflscape}     \usepackage{adjustbox}     \usepackage{ulem}     \usetikzlibrary{shadows,positioning}     \begin{document}     \tikzset{         every entity/.style = {top color=white,bottom color=blue!30,draw=blue!50!black!100,drop shadow},         every attribute/.style = {top color=white, bottom color=yellow!20,                                       draw=yellow, drop shadow},         every relationship/.style ={top color=white, bottom color=red!20,                                       draw=red!50!black!100, drop shadow},         every edge/.style = {link},         every isa/.style = {top color=white, bottom color=green!20,                                       draw=green!50!black!100, drop shadow},     }     \begin{landscape}     \vspace*{\stretch{1}}     \thispagestyle{empty}     \begin{adjustbox}{max height=0.5\textwidth}     \begin{tikzpicture}[node distance=10em]         \node[entity] (student) at (-2,0) {Student};         \node[isa] (isa1) [below = 2em of student, node distance=5em] {ISA} edge node [auto,swap] {disjoint} (student);         \node[entity] (mtech-stud) [below left = 2em of isa1] {MTech$-$student} edge (isa1);         \node[attribute] (btechproj) [below left = 2em and 0em of mtech-stud] {No.-of-BTech-Projects} edge (mtech-stud);         \node[entity] (btech-stud) [below = 5em of isa1] {BTech$-$student} edge (isa1);         \node[entity] (phd-stud) [below right = 2em of isa1] {Ph.D.$-$student} edge (isa1);         \node[attribute] (btechproj1) [above right = 2em of phd-stud] {No.-of-BTech-Projects} edge (phd-stud);         \node[attribute] (mtechproj) [below right = 2em of phd-stud] {No.-of-MTech-Projects} edge (phd-stud);         \node[attribute] (stud-id) [left = 0.5cm of student] {\key{student-id}} edge (student);         \node[attribute] (name) [above left = 0.75cm and -0.5cm of student] {Name} edge (student);         \node[attribute] (fname) [above left = 0.75cm and 0cm of name] {First-Name} edge (name);         \node[attribute] (lname) [above right = 0.75cm and 0cm of name] {Last-Name} edge (name);         \node[attribute] (cgpa)  [above right = 0.75cm and -0.5cm of student] {CGPA} edge (student);         \node[relationship] (joins) [right = 1.4cm of student] {joins} edge [total] (student);         \node[entity] (pgroup) [right = 1.4cm of joins] {Project-Group} edge [<-] (joins);         \node[attribute] (group-id) [above left = 0.75cm and -0.5cm of pgroup] {\key{group-id}} edge (pgroup);         \node[derived attribute] (group-cgpa) [above = 2cm of pgroup] {group-CGPA} edge (pgroup);         \node[multi attribute] (areas) [above right = 0.75cm and -0.5cm of pgroup] {areas-of-interest} edge (pgroup);         \node[relationship] (pgroup-guide) [right = 2.2cm of pgroup] {Project-Group-Guide} edge[<->] (pgroup);         \node[attribute] (pdomain) [above = 2cm  of pgroup-guide] {Project-Domain} edge (pgroup-guide);         \node[attribute] (ptitle) [below = 2cm of pgroup-guide] {Project-Title} edge (pgroup-guide);         \node[entity] (faculty) [right = 1.9cm of pgroup-guide] {Faculty} edge[<->] (pgroup-guide);         \node[attribute] (facid) [above left = 0.75cm and -0.5cm of faculty] {\key{faculty-d}} edge (faculty);         \node[attribute] (name) [above = 1.7cm of faculty] {Name} edge (faculty);         \node[attribute] (fname) [above left = 0.75cm and 0cm of name] {First-Name} edge (name);         \node[attribute] (lname) [above right = 0.75cm and 0cm of name] {Last-Name} edge (name);         \node[multi attribute] (specialisation) [above right = 0.75cm and -0.5cm of faculty] {Specialisation} edge (faculty);         \node[attribute] (email) [below left = 0.75cm and -0.5cm of faculty] {Email} edge (faculty);         \node[multi attribute] (phoneno) [below right = 0.75cm and -0.5cm of faculty] {Phone-no} edge (faculty);         %\node[below = 10cm of pgroup] {\uline{some text}};     \end{tikzpicture}     \end{adjustbox}     \vspace{\stretch{1}}     \end{landscape}     \end{document}      And I get this: ![enter image description here](http://i.stack.imgur.com/NLbfM.png) After I put the node, (after removing the comment). Here is what I get: ![enter image description here](http://i.stack.imgur.com/tgLm3.png)


title: Number of lines in double spacing (compared to Word)

text: I am a newbie to LaTeX. I noticed that my document is almost a page longer in Word compared to LaTeX. (~7.25 in latex, ~8.25 in Word). This seems to be because my Word document has 23 lines per page, where my LaTeX document has 27. I _think_ the margins are the same (I set them to be, but haven't measured them). The beginning of my document looks like this:               \documentclass[12pt]{article}     \usepackage[margin=1.25in,top=1in,bottom=1in]{geometry}     \usepackage{textcomp}     \usepackage{setspace}     \doublespacing      ...and that's pretty much all the formatting I have. Is the default "double spacing" in LaTeX/`setspace` smaller than Word? How can I manually adjust this (in LaTeX)?


title: Remove chapter numbering in page header

text: I have chapters beginning as follows:               \chapter*{MyChapter}     \chaptermark{MyChapter}     \addcontentsline{toc}{chapter}{MyChapter}      As you can see the chapters are not numbered but added to the TOC. My problem is with the \chaptermark{} that still puts the chapter number in front of the chapter title on all page headers. What do I have to do? Here is a working example:               \documentclass[10pt]{scrreprt}     \begin{document}     \pagestyle{headings}     \tableofcontents     \chapter*{MyChapter}     \chaptermark{MyChapter}     \addcontentsline{toc}{chapter}{MyChapter}           Repeat this text to get a second page in this chapter!          \end{document}      Important: You need to make the text longer so a second page will be added to the chapter. The page header of this second page now reads "0 MyChapter". However, since I like it unnumbered, it should read "MyChapter".


title: I need help to make an apa style bibliography in LaTeX

text: Im using Spanish `babel` and I need to do an `apa` style bibliography in Spanish but when I use `apa` style bibliography it just shows the word `referencias` (references) but doesn't show the references I have written on a `.bib` file. I appreciate any help.


title: Why does my new subsectioning heading not gobble the subsection title?

text: I hope I'm not missing anything obvious. Instead of trying to elaborate on my title, let me illustrate with an MWE:               \documentclass[twocolumn]{article}          \makeatletter     \setcounter{secnumdepth}{4}     \newcounter{subsubsubsection}     \newcommand\subsubsubsection{%     \@startsection{subsubsubsection}{4}{\z@}{-3.25ex\@plus -1ex \@minus -.2ex}%                   {2ex \@plus .2ex}{}}     \makeatother          \begin{document}     \section{Section}         \subsection{Sub-}     \subsubsection{Subsub-}     \subsubsubsection{subsubsub-}          \end{document}      _**Result:_** ![My \\subsubsubsection command is not consuming its argument](http://i.stack.imgur.com/rLoOQ.png) _**Remarks:_**   1. The problem goes away if I use `\subsubsubsection*`, but still exists if I use `\subsubsubsection` without changing `secnumdepth`.   2. Yes, I'm aware of the `\paragraph` command: I don't want to use it because what I'm using `\subsubsubsection` for are not paragraphs. If you would like to suggest some other less repetitive name, I'm open to suggestions. What's going on here?


title: How to adjust the positioning of \cancel strikethrough?

text: After loading the package `cancel` the command `\cancel{text}` worked not so exactly, because the slash strikethrough looks so ugly. The output is shown below: ![enter image description here](http://i.stack.imgur.com/TjEXS.png) Is it a LaTeX error or PDF error?


title: "\No": "Undefined control sequence" in TeXStudio (TeXLive)

text: ! Undefined control sequence.     \@title ->Home work \\ Economics \No                                 ~2     l.16 \maketitle      Today, I tried to change my text-editor from TeXworks to TeXStudio (and MiKTeX to TeXLive also) and run there (in TeXStudio, which connected with packages of TeXLive) my homework. So, as you see above, the problem is connected with the "\No~2". TeXworks worked it out fine and put the sign, but TeXStudio did not. And when I remove "\No", undoubtedly, TeXStudio works okay too. Is there any opportunity to teach TeXStudio a Number sign (\No) in \maketitle? In the rest of the text it does not works too.               \documentclass[12pt]{article}     \usepackage{cmap}     \usepackage[utf8]{inputenc}      \usepackage[russian]{babel}     \usepackage{amsmath}     \usepackage{graphicx}      \usepackage{array}      * * *               \title{Home work \\ Economics \No~2}          \author{MY name}          \date{12 may 2014}          \begin{document}          \maketitle          \textbf{\large Task 1}          Some stuff          \end{document}      P.S.: when I put "\No~2" in some part of the text (not in title information) it does not work too. I think, that I have to say that this is the russian symbol (№) of a number. The sign is slightly differ from the English one (No. or #). I need this: ![\\No~2 by texworks in \\maketitle](http://i.stack.imgur.com/WRIfc.png)


title: How to make width of columns in table smaller

text: So I basically create all my tables in Excel and then transfer to Texnic Center by using the Excel2LaTeX addin for Excel. I am not too familiar with adjusting the outputted code to my own likings. For example, I have the following table (directly from Excel2LaTeX):               \begin{table}[htbp]       \centering       \caption{Add caption}       \begin{tabular}{ccccccc}         \toprule         Dependent variable: & $CoJPoD_{system|sov}$ &       & $\Delta$$CoJPoD_{system|sov}$ &       & $CoJPoD_{sov|system}$ &  \\         \midrule               &       &       &       &       &       &  \\               & \textbf{(1)}   & \textbf{(2)}   & \textbf{(3)}   & \textbf{(4)}   & \textbf{(5)}   & \textbf{(6)} \\               &       &       &       &       &       &  \\         Constant & -11.116*** & -10.045*** & -6.668*** & -5.597*** & 13.194*** & 13.938*** \\               & (-2.934) & (-3.540) & (-2.939) & (-3.000) & (3.584) & (3.556) \\         Market Ret (6 months) (\%) & 0.001*** &       & 0.001*** &       & 0.000 &  \\               & (3.022) &       & (3.645) &       & (-0.016) &  \\         Market Vol (6 months) (\%) & 0.008 &       & 0.009 &       & 0.008 &  \\               & (0.686) &       & (1.127) &       & (0.458) &  \\         Market Ret (1 month) (\%) &       & 0.013** &       & 0.010** &       & -0.021*** \\               &       & (2.010) &       & (2.171) &       & (-2.723) \\         Market Vol (1 month) (\%) &       & -1.949*** &       & -1.629*** &       & -0.051 \\               &       & (-4.682) &       & (-5.221) &       & (-0.063) \\         Log GDP & 0.913*** & 0.826*** & 0.550*** & 0.463*** & -1.180*** & -1.242*** \\               & (2.882) & (3.470) & (2.919) & (2.943) & (-3.824) & (-3.764) \\         Debt/GDP (\%) & 0.004*** & 0.004*** & 0.002* & 0.002 & 0.004* & 0.004* \\               & (2.796) & (2.825) & (1.953) & (1.949) & (1.750) & (1.730) \\         Reserve/Debt (\%) & 0.0689** & 0.071** & 0.043** & 0.045* & 0.075** & 0.072** \\               & (2.478) & (2.322) & (2.101) & (1.919) & (2.371) & (2.325) \\         Term Spread (\%) & 0.0423*** & 0.041*** & 0.038*** & 0.037*** & 0.012 & 0.015** \\               & (6.244) & (6.984) & (7.033) & (7.261) & (1.312) & (2.154) \\         VSTOXX (\%) & 0.004*** & 0.003*** & 0.003*** & 0.002*** & 0.008*** & 0.007868*** \\               & (4.853) & (4.192) & (4.389) & (3.737) & (7.545) & (7.848) \\               &       &       &       &       &       &  \\         Bank fixed effects & Yes   & Yes   & Yes   & Yes   & Yes   & Yes \\         No. of observations & 620   & 620   & 620   & 620   & 620   & 620 \\         Adjusted $R^2$ & 0.728 & 0.719 & 0.774 & 0.760 & 0.822 & 0.822 \\         \bottomrule         \end{tabular}       \label{tab:addlabel}     \end{table}      Basically, the table is too wide to fit onto a portrait page (I do not want to use landscape). I see that there is quite a wide gap between each column, is there a way for me to reduce the gap between columns? Thanks.


title: Letterspacing memoir section headers

text: I'd like to add letterspacing to the `\section` commands with `\setsecheadstyle` in a `memoir` book. I tried using `soul`:               \sodef\soSection{}{.1em}{.5em plus.1em}{.1em plus.1em minus.1em}     \setsecheadstyle{\sectionFont\MakeUppercase\soSection}      Of course this fails to compile because it should be `\soSection{...}`, but `memoir` inserts `\secheadstyle` this way:               \newcommand{\section}{%       \sechook%       \@startsection{section}{1}%  level 1           {\secindent}%            heading indent           {\beforesecskip}%        skip before the heading           {\aftersecskip}%         skip after the heading           {\normalfont\secheadstyle}} % font      It's possible to use a quick workaround, but it would be much neater to do this with styling.               \section[Suffering and Self-View]{\soSection{Suffering and Self-View}}      Can one set `\setsecheadstyle` with a `soul` command in it somehow?


title: biblatex: different output for one, two, or three authors

text: I'm using/customizing the `verbose` style in `biblatex`. This is the desired output, depending on the number of authors (just focussing on the authors): > Apple, Anthony. _Title_. **[⇦ 1 author]**   >  Banana, Barbara/Chris Coconut. _Title_. **[⇦ 2 authors]**   >  Date, Donna et al. _Title_. **[⇦ >2 authors]** I've almost got it figured out, there's just one space that I can't get rid of:               \documentclass{article}          \usepackage[backend=biber,style=verbose,%                 maxnames=2,minnames=1,%                 maxitems=2,minitems=1]{biblatex}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}          @book{one,         author = {Anthony Apple},         title = {Title}}     @book{two,         author = {Barbara Banana and Chris Coconut},         title = {Title}}     @book{three,         author = {Donna Date and Eric Eggplant and Fred Fig},         title = {Title}}          \end{filecontents}          \addbibresource{\jobname.bib}          \DefineBibliographyStrings{english}{%       and = {\unspace/}}          \begin{document}          \nocite{*}% adds all entries to the bibliography          \printbibliography          \end{document}      ![output with spurious space](http://i.stack.imgur.com/IOxrZ.png)


title: Spacing in list of figures / tables for entries from appendices

text: Having made the changes Werner very helpfully suggested in the Separate table of appendices - pdf bookmarks & avoid previous chapter's format, my list is up and running but I have some spacing problems. I now have an extra space before my figure and table numbers from the appendices. For example, ```A.1` in the table of contents. This means it no longer lines up with the lines from the main chapters. In the entry in the `.lot` file there is a space before `{ A.1}`. ![Misaglined List of Tables/Figures with entries from appendeices](http://i.stack.imgur.com/baTa5.png) Here is the a minimal working example (or at least my best shot at it):               \documentclass[]{ut-thesis}     \usepackage{tocloft}     \usepackage[colorlinks=true, allcolors=black]{hyperref}          \begin{document}               \newcommand{\listappendixname}{List of Appendices}     \newlistof{appendix}{app}{\listappendixname}     \setcounter{appdepth}{2}         \renewcommand{\theappendix}{\Alph{appendix}}     \renewcommand{\cftappendixpresnum}{Appendix\space}     \setlength{\cftbeforeappendixskip}{\baselineskip}     \setlength{\cftappendixnumwidth}{1in}     \newlistentry[appendix]{subappendix}{app}{1}     \renewcommand{\thesubappendix}{\theappendix.\arabic{subappendix}}     \renewcommand{\cftsubappendixpresnum}{Appendix\space}     \setlength{\cftsubappendixnumwidth}{1in}     \setlength{\cftsubappendixindent}{0em}          \newcommand{\myappendix}[1]{%       \refstepcounter{appendix}\pdfbookmark[1]{#1}{#1\theappendix}%       \chapter*{Appendix \theappendix\space #1}%       \addcontentsline{app}{appendix}{\protect\numberline{\theappendix}#1}%       \markboth{}{\MakeUppercase{Appendix}\ \theappendix\space #1}\par     }          \newcommand{\subappendix}[1]{%       \refstepcounter{subappendix}\pdfbookmark[2]{#1}{#1\thesubappendix}%       \section*{\thesubappendix.\space #1}%       \addcontentsline{app}{subappendix}{\protect\numberline{\thesubappendix}#1}%     }               \begin{preliminary}          \listoftables     \listoffigures          \end{preliminary}               \chapter{Objective}     \section{Get it done}     \begin{figure}     \caption[Short name for a figure]{Loooong name for the figure with lots of explanation}     \end{figure}     \begin{table}     \caption[Short name for my table]{Loooong name for the my  with lots of explanation}     \end{table}          \appendix     \clearpage \phantomsection     \addcontentsline{toc}{chapter}{Appendices}     \renewcommand{\thefigure}{ \theappendix.\arabic{figure}}     \renewcommand{\thetable}{ \theappendix.\arabic{figure}}          \myappendix{VBA code for Extension of Jaccard Measure}     \label{chap:code}     \begin{figure}     \caption[Code for functions that do this and that]{}     \end{figure}     \begin{table}     \caption[Table showing not very much]{}     \end{table}          \end{document}


title: Problem with the alignment of characters

text: I am having some trouble in displaying characters in LaTeX. Here is what I am doing. I am performing a binary addition and would like to have all the characters aligned one below the other. Here is the small example :               1010     1000      ----     0010      However, the problem I am facing is that the characters are not aligned in a vertical line. If it was a table, I could align left-edge or right edge, but not here. I would prefer, here, 1-1-0, 0-0-0, 1-0-1, 0-0-0 are aligned in a single line vertically. I am trying to give proper spacing, but it does not look elegant in the pdf. It looks misaligned with a long sequence of binary number. P.S : Attached is the screen shot of the pdf file. ![enter image description here](http://i.stack.imgur.com/EEbdq.png)               \documentclass[twoside,english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \setcounter{secnumdepth}{2}     \setcounter{tocdepth}{2}     \usepackage{babel}     \begin{document}     \newdimen\digitwidth      \settowidth\digitwidth{0}      \def~{\hspace{\digitwidth}}     \def\divrule#1#2{%      \noalign{\moveright#1\digitwidth%      \vbox{\hrule width#2\digitwidth}}}      \begin{tabular}[b]{@{}r@{}}      %10010      \\ \hline      \big|\begin{tabular}[t]{@{}l@{}}      1010 1111\\      1000 1000 \\      \divrule{0}{10}      ~~ 1000 1000 \\      \end{tabular}      \end{tabular}     \end{document}


title: Read part and page count from auxiliary file

text: My main document is included into another that rearranges and adds crop marks to it. For universalizing my script I need to extract the page and part count out of the `.toc`- or `.aux`-file. These are the lines from `.toc`:               \contentsline {chapter}{XXX}{139}{section*.96}     \contentsline {part}{\bfseries \leavevmode {\color {gray}\Ordinalstringnum {9}~Teil:\hspace {0.5em}XXX}}{135}{part.9}      and `.aux`:               \@writefile{toc}{\contentsline {chapter}{XXX}{139}{section*.96}}     \@writefile{toc}{\contentsline {part}{\bfseries  \leavevmode {\color  {gray}\Ordinalstringnum {9}~Teil:\hspace  {0.5em}XXX}}{135}{part.9}}      Is there any way to get the page count when there's no new chapter, section, etc. on the last page? MWE:               \documentclass[twoside,landscape]{scrreprt}     \usepackage{forloop}     \usepackage{pdfpages}     \usepackage{background}     \usetikzlibrary{calc}     \usepackage[a4paper]{geometry}     \geometry{top=6mm, left=6mm, right=0mm, bottom=0mm}          \backgroundsetup{     scale=1,     opacity=1,     angle=0,     color=black,     contents={%     \begin{tikzpicture}[remember picture,overlay]       \draw[thick] ($(current page.north west)+(0mm,-9mm)$) -- ++(\paperwidth,0mm); %o       \draw[thick] ($(current page.south west)+(0mm,9mm)$) -- ++(\paperwidth,0mm); %u       \draw[thick] ($(current page.north east)+(-9mm,0mm)$) -- ++(0,-\paperheight); %r       \draw[thick] ($(current page.north west)+(9mm,0mm)$) -- ++(0,-\paperheight); %l       \draw[thick] ($(current page.north)+(0mm,0mm)$) -- ++(0,-\paperheight); %m     \end{tikzpicture}%     }}          \newcommand{\ing}[1]{\includegraphics[width=(\textwidth-6mm)/2,height=\textheight-6mm,page=#1]{empty}}          \newcommand{\pdf}[4]{     \hspace*{-11pt}%     \ing{\numexpr#1\relax}%     \ing{\numexpr#2\relax}%     \clearpage%     \hspace*{6pt}%     \ing{\numexpr#3\relax}%     \ing{\numexpr#4\relax}%     \clearpage%     }          \pagestyle{plain}     \newcounter{i}     \newcommand\maxpage{???}     \newcommand\emptypage{3}          \begin{document}          %%% Cover     \pdf{1}{3}{3}{3}          %%% Inhalt     \forloop{i}{1}{\value{i} < 34}{%     \pdf{\thei*4+2}{\thei*4-1}{\thei*4}{\thei*4+1}     }          %%% letzte 3 Seiten     \pdf{3}{137}{138}{139}          \null\clearpage          \end{document}      I need it for these lines: `\forloop{i}{1}{\value{i} < 34}{%` For this line I need something like `\floor{\maxpage/4}` instead of `34` `\pdf{3}{137}{138}{139}` This line adds the last 3 pages. If I include them in the loop, I get an error as page `140` doesn't exist. A macro containing a `if`-condition would be great (`if #1 > \maxpage then \emptypage`) Edit: ![enter image description here](http://i.stack.imgur.com/cKqm7.png) `A.pdf` is my main file. `B.tex` includes the pages of `A.pdf`, rearranges them and adds crop marks for printing. The final result that gets printed in the press is `B.pdf`. The code I posted above is from `B.tex`. Here I need the page count of `A.pdf` therefore I require a command for extracting the page count out of the auxiliary files `A.aux` or `A.toc` to use it in `B.tex`. Hopefully that helped to clarify my question.


title: naming argument and optional-argument for \def, \newcommand and newenvironment

text: I know how to create a new command or an environment. I think it will much better if I can specify name of the arguments. For example in `framebox` command and `array` environment below, we know exactly what're the arguments that should be passed.               \framebox(xdimen,ydimen)[position]{text}          \begin{array}[pos]{cols}         content...     \end{array}      So far, I've tried               \documentclass{article}          \def\testdef#1#2{#1 #2}          \newcommand{\testcommand}[2]{#1 #2}          \newenvironment{testenv}[2]{#1}{#2}          \begin{document}          \testdef{arg1}{arg2}          \testcommand          \begin{testenv}{1}{2}     content...     \end{testenv}          \end{document}      and you all can see, `\testdef{arg1}{arg2}` just print `arg1` and `arg2` while I need to naming them with, for example, `name` and `value`. It should be               \testdef{name}{value}      The same goes also for `\testcommand` and `testenv`. So, How can I do that? > ### Edit > > These pictures is taken from TeXstudio. > > In picture #1, we see what are arguments for `\framebox`. > > ![enter image description here](http://i.stack.imgur.com/N89Gd.png) > > while in picture #2, we just see `\testdef{arg1}{arg2}`. > > ![enter image description here](http://i.stack.imgur.com/oA6aL.png) > > Is it behavior of Latex editor? or we can tune it through latex macro?


title: LuaTeX bug with bold italic text?

text: Ok, so this _is_ in a sense a bug report. But I have failed at going through the regular channels (cf. How to report a bug in LuaTeX?). The bug tracker never sent me a confirmation e-mail for an account, subscribing to the mailing list requires moderator approval, which I haven't received yet, and the LuaTeX maintainers don't put any contact info on the LuaTeX site. It shouldn't be that hard to be able to report a bug ... So I'm doing it here. The question can be closed as soon as one of the LuaTeX maintainers acknowledges the report. The space around a bold italic character (both before and after) is too large in LuaLaTeX. MWE and picture:               \documentclass{article}     \usepackage{fontspec}     \setmainfont         [             Path = C:/Windows/Fonts/,             Extension = .otf,             UprightFont = LinLibertine_R,             BoldFont = LinLibertine_RZ,             ItalicFont = LinLibertine_RI,             BoldItalicFont = LinLibertine_RZI         ]{libertine}          \begin{document}     \noindent dad \textit{dad}\\     d\textbf{a}d \textit{d\textbf{a}d}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Ugfr7.png) The problem is not there when compiling with XeLaTeX: ![enter image description here](http://i.stack.imgur.com/NCgnP.png)


title: Is there a way of limiting the scope of \newlength?

text: Is there a way of limiting the scope of `\newlength`? I'm using the same name in many TikZ picture but each with different value, and I don't want it to live on between the pictures as it's not intended to.


title: Avoiding orphans at the start of quote/quotation environments

text: To me, orphans -- page breaks after the first line of a paragraph -- are tolerable in the normal text body, and so I leave TeX's default settings (`\clubpenalty=150`) alone. On the other hand, I want to get rid of orphans at the start of `quote`/`quotation` environments.   * My first (naïve?) attempt was to define a new environment based on `quote` and set `\clubpenalty=10000` within this environment; this still produced orphans.   * After rummaging through the LaTeX2e sources, I tried to embed `\@afterheading` (p. 287) into my custom environment; this resulted in an error message.   * Finally (and out of sheer desparation), I inserted `\@nobreaktrue` (which is used in `\@afterheading`) into my custom environment; this _worked_. This poses the following questions:   * Why did my attempt at locally redefining `\clubpenalty` fail?   * What does `\@nobreaktrue` do? Are there adverse effects?   * If the latter is the case, what is the proper way to avoid orphans at the start of `quote`/`quotation` environments? * * *               \documentclass{report}          \usepackage[latin]{babel}          \usepackage{blindtext}          \setlength{\textwidth}{350pt}          \newenvironment{failednoorphanquote}{\begin{quote}\clubpenalty=10000\relax}{\end{quote}}          \makeatletter     \newenvironment{noorphanquote}{\begin{quote}\@nobreaktrue}{\end{quote}}     \makeatother          \begin{document}          \chapter{bla}          \blindtext[3]          \begin{quote}     \blindtext     \end{quote}          \chapter{blubb}          \blindtext[3]          \begin{failednoorphanquote}     \blindtext     \end{failednoorphanquote}          \chapter{foo}          \blindtext[3]          \begin{noorphanquote}     \blindtext     \end{noorphanquote}          \end{document}      EDIT: In response to Martin Scharrer's answer: I'm looking for a solution that (unlike `\Needspace`) does not make implicit assumptions about the vertical space above the `quote` environment.


title: Why \( and \) were not defined as robust commands in the first place?

text: I am aware of the difference between using `\\(...\\)` and `$...$` (in moving arguments, for example), and yes, I've read the answers to this question: Are \( and \) preferable to $?). I also know the definition of `\\(` and `\\)`:                \def\({\relax\ifmmode\@badmath\else$\fi}      \def\){\relax\ifmmode\ifinner$\else\@badmath\fi\else\@badmath\fi}      (taken from Section 55.2 of source2e.pdf) My question here is: couldn't `\\(` and `\\)` have been defined as robust commands in the LaTeX kernel? Is there any (non trivial) reason explaining why they were defined as fragile commands?


title: Template for Cubicle Tags (Desk Tags) in LaTeX

text: Does anyone have a good template for a `LaTeX` style cubicle or Desk Tags. The format of the tag can be as follows: `Name` `Designation` `Misc Info`


title: grouping options problem in pgfplots.groupplots

text: i have a problem with the grouping options of pgfplots.groupplots. besides the labels i have also units defined. with the option `xlabels at=edge bottom` only the label but not the unit is moved to the bottom of the group (same with ylabels).               \pgfplotsset{         use units,         x unit=s, x unit prefix={}, % 5.3.1 p227         y unit=\unitfrac{rad}{s}, y unit prefix={},         xlabel=time,         ylabel=frequency $\omega$,     }               \begin{groupplot}[         group style={          group name=my plots,             group size=2 by 2,             xlabels at=edge bottom,             ylabels at=edge left,         },      any ideas how to put also the unit to the bottom?


title: Is is possible to not abbreviate the author name of only one reference in my bibliography?

text: I am using the `IEEEtran.bst` file for my bibliography (as follows):               \bibliographystyle{IEEEtran}     \bibliography{IEEEabrv,biblio}      and it works as desired in all but one case. I have one entry where the 'author' is "World Health Organization and others", which gets abbreviated as "W. H. Organization et al.". Obviously, this is not what I want. Is there a way I can use `IEEEabrv`, but make an exception for this one entry? Please note that I am obliged to use this style (not natbib or anything else) due to the conference submission guidelines.


title: Problems with \toprule and \midrule in a table

text: Having the following `siunitx` table code in LyX, for each occurrence of `\toprule` and `\midrule` I obtain an error message: > The control sequence at the end of the top line of your error message was > never \def'ed. If you have misspelled it (e.g., `hobx'), type `I' and the > correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget > about whatever was undefined. I correctly imported `siunitx` in the preamble.   TexLive version: 2012.10.20121205_r28449.fc18 LaTeX code:               \centering     \sisetup{output-decimal-marker={,}}          \begin{tabular}{ccS}     \toprule     {Dimensione finestra} & {Perdita} & {Tempo}\\     {} & {} & {(secondi)}\\     \midrule     10                & 0$\%$       & 121\\     \midrule     10                & 10$\%$       & 127\\     \midrule     10                & 20$\%$       & 176\\     \midrule     10                & 30$\%$       & 257\\     \midrule     10                & 40$\%$       & 442\\     \midrule     10                & 50$\%$       & 780\\     \midrule     10                & 60$\%$       & 1226\\     \midrule     10                & 70$\%$       & 1469\\     \midrule     10                & 80$\%$       & 1904 \\     \midrule     10                & 90$\%$       & 3234 \\     \midrule     50                & 0$\%$        & 46 \\     \midrule     50                & 10$\%$       &109 \\     \midrule     50                & 20$\%$       &146 \\     \midrule     50                & 30$\%$       &202 \\     \midrule     50                & 40$\%$       &257 \\     \midrule     50                & 50$\%$       &373 \\     \midrule     50                & 60$\%$       &544 \\     \midrule     50                & 70$\%$       &760 \\     \midrule     50                & 80$\%$       &1356 \\     \midrule     50                & 90$\%$       &6588 \\     \midrule     100                & 0$\%$       &76 \\     \midrule     100                & 10$\%$       &91 \\     \midrule     100                & 20$\%$       &109 \\     \midrule     100                & 30$\%$       &146 \\     \midrule     100                & 40$\%$       &180 \\     \midrule     100                & 50$\%$       &297 \\     \midrule     100                & 60$\%$       &414 \\     \midrule     100                & 70$\%$       &585 \\     \midrule     100                & 80$\%$       &1355 \\     \midrule     100                & 90$\%$       &4326 \\          \bottomrule     \end{tabular}


title: equation numbering in align without parentheses

text: How can I number equation without parentheses in tags? In other word when I type:               \begin{align}          my formul          \end{align}      see in pdf:               my formul           .1


title: Could TiKz make a picture of a matrix with pictorial normal distributions?

text: Is TikZ the best way of doing this do you think? ![enter image description here](http://i.stack.imgur.com/5IDjH.png) Any other method you can think of?


title: Finite complete graph of arbitrary size in Tikz

text: I want to present a complete graph of arbitrary finite size. This means a number of nodes which are interconnected to all other nodes. In addition I want to clearify that the number of nodes is not important. For numbers this would simply look like this:               $$1, \dots, n$$      I want to add one additional node at the side which is connected to all other nodes in the complete graph. I am not looking for a manual how to do an exact representation in tikz which is most elegant. Those exists. I looking for a more abstract depicted which tells the viewer that this is a complete graph on the first sight. I am open to unorthodox solutions. Like a cloud of interconnected nodes with or without `\dots` e.g. ... Any ideas?


title: Why tex4ht does not accept \setcounter{tocdepth} in report class, but it does in article?

text:
**Update:** As I mentioned in the comment below, the Table of contents should be the same regardless of the splitting done. So the solution should produce the same toc in HTML from the following commands                htlatex foo.tex      htlatex foo.tex "htm,2"      **Original question below** When setting `\setcounter{tocdepth}{0}` in report class, then the PDF file shows only the chapters as expected in toc, but the HTML shows both chapter and sections in toc. When setting `\setcounter{tocdepth}{1}` in artice class, then the PDF file shows only the sections as expected in toc, and now the HTML shows only the sections in toc as expected as well. So, the question is: Why tex4ht agrees with pdf toc for article and not for report? The following diagram illustrates this. I am not using any options or configuration files other than standard commands to build these. MWE and commands used is below. ![enter image description here](http://i.stack.imgur.com/3kPu5.png) ## Article               \documentclass{article}%     \setcounter{tocdepth}{1}     \begin{document}     \tableofcontents     \clearpage          \section{This is section 1}     some text in section 1     \subsection{1}     some text in section, subsection          \section{This is section 2}     some text in section 2     \subsection{1}     some text in section, subsection          \section{This is section 3}     some text in section 3     \subsection{1}     some text in section, subsection          \end{document}      commands used               pdflatex foo.tex     htlatex foo.tex      ## Report               \documentclass{report}%     \setcounter{tocdepth}{0}     \begin{document}     \tableofcontents     \clearpage          \chapter{This is chapter 1}     some text in chapter 1     \section{1}     some text in chapter, section          \chapter{This is chapter 2}     some text in chapter 2     \section{1}     some text in chapter, section               \chapter{This is chapter 3}     some text in chapter 3     \section{1}     some text in chapter, section          \end{document}      ## Appendix I know of a work around for the report case. But the question is really not to find a workaround, but why it happens in first place. Here is the work around for those interested.               \documentclass{report}%     \setcounter{tocdepth}{0}     \begin{document}          \ifdefined\HCode       \Configure{tableofcontents*}{chapter}  %force htlatex to only show chapters     \else     \tableofcontents     \fi     \clearpage          \chapter{This is chapter 1}     some text in chapter 1     \section{1}     some text in chapter, section          \chapter{This is chapter 2}     some text in chapter 2     \section{1}     some text in chapter, section              \chapter{This is chapter 3}     some text in chapter 3     \section{1}     some text in chapter, section          \end{document}      HTML result now is as expected ![Mathematica graphics](http://i.stack.imgur.com/EDVu7.png) Here is the full output of the htlatex output for the report case. It is not too large, but posting it since the comment below said this can't be produced on a different machine. I am using texlive 2014 as can be seen from the log:               >htlatex foo.tex     This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex)      restricted \write18 enabled.     entering extended mode     LaTeX2e <2014/05/01>     Babel <3.9k> and hyphenation patterns for 78 languages loaded.     (./foo.tex (/usr/local/texlive/2014/texmf-dist/tex/latex/base/report.cls     Document Class: report 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/tex4ht.sty)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/tex4ht.4ht     ::::::::::::::::::::::::::::::::::::::::::      TeX4ht info is available in the log file      ::::::::::::::::::::::::::::::::::::::::::     ) (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/tex4ht.sty     --- needs --- tex4ht foo ---     (./foo.tmp) (./foo.xref)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/latex.4ht     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/fontmath.4ht     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/report.4ht     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (./foo.aux) [1] (./foo.4ct) [2] [3]     Chapter 1.     [4]     Chapter 2.     [5]     Chapter 3.     [6] (./foo.aux) )     Output written on foo.dvi (6 pages, 12504 bytes).     Transcript written on foo.log.     This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex)      restricted \write18 enabled.     entering extended mode     LaTeX2e <2014/05/01>     Babel <3.9k> and hyphenation patterns for 78 languages loaded.     (./foo.tex (/usr/local/texlive/2014/texmf-dist/tex/latex/base/report.cls     Document Class: report 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/tex4ht.sty)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/tex4ht.4ht     ::::::::::::::::::::::::::::::::::::::::::      TeX4ht info is available in the log file      ::::::::::::::::::::::::::::::::::::::::::     ) (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/tex4ht.sty     --- needs --- tex4ht foo ---     (./foo.tmp) (./foo.xref)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/latex.4ht     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/fontmath.4ht     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/report.4ht     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (./foo.aux) [1] (./foo.4ct) [2] [3]     Chapter 1.     [4]     Chapter 2.     [5]     Chapter 3.     [6] (./foo.aux) )     Output written on foo.dvi (6 pages, 12504 bytes).     Transcript written on foo.log.     This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex)      restricted \write18 enabled.     entering extended mode     LaTeX2e <2014/05/01>     Babel <3.9k> and hyphenation patterns for 78 languages loaded.     (./foo.tex (/usr/local/texlive/2014/texmf-dist/tex/latex/base/report.cls     Document Class: report 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/tex4ht.sty)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/tex4ht.4ht     ::::::::::::::::::::::::::::::::::::::::::      TeX4ht info is available in the log file      ::::::::::::::::::::::::::::::::::::::::::     ) (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/tex4ht.sty     --- needs --- tex4ht foo ---     (./foo.tmp) (./foo.xref)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/latex.4ht     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/fontmath.4ht     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/report.4ht     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4.4ht)     (/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (./foo.aux) [1] (./foo.4ct) [2] [3]     Chapter 1.     [4]     Chapter 2.     [5]     Chapter 3.     [6] (./foo.aux) )     Output written on foo.dvi (6 pages, 12504 bytes).     Transcript written on foo.log.     ----------------------------     tex4ht.c (2012-07-25-19:36 kpathsea)     tex4ht -f/foo.tex        -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/      (/usr/local/texlive/2014/texmf-dist/tex4ht/base/unix/tex4ht.env)     (/usr/local/texlive/2014/texmf-dist/tex4ht/ht-fonts/iso8859/1/charset/unicode.4hf)     (/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmr10.tfm)     (/usr/local/texlive/2014/texmf-dist/tex4ht/ht-fonts/alias/lm/lm-rep-cmrm/cmr.htf)     Searching `lm-rep-cmrm.htf' for `cmr10.htf'     (/usr/local/texlive/2014/texmf-dist/tex4ht/ht-fonts/unicode/lm/lm-rep-cmrm.htf)     [1 file foo.html      file foo.css      file foo.tmp     ] [2] [3] [4] [5] [6]     Execute script `foo.lg'     ----------------------------     t4ht.c (2012-07-25-19:28 kpathsea)     t4ht -f/foo.tex      (/usr/local/texlive/2014/texmf-dist/tex4ht/base/unix/tex4ht.env)     Entering foo.lg     Entering foo.css     Entering foo.tmp     >      Here is the actual HTML produces as well. (not too large also)               <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"         "http://www.w3.org/TR/html4/loose.dtd">             <title></title>      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">      <meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">      <meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">            <meta name="src" content="foo.tex">      <meta name="date" content="2014-08-09 11:55:00">      <link rel="stylesheet" type="text/css" href="foo.css">
Contents

        1 This is chapter 1
    1.1 1
   2 This is chapter 2
    2.1 1
   3 This is chapter 3
    3.1 1

Chapter 1
This is chapter 1

some text in chapter 1
1.1    1

some text in chapter, section
Chapter 2
This is chapter 2

some text in chapter 2
2.1    1

some text in chapter, section
Chapter 3
This is chapter 3

some text in chapter 3
3.1    1

some text in chapter, section


title: line associated with tikz \draw operation is not obscured by objects on \backgroundpath of new shape

text: I don't have much experience with creating new symbols using the \pgfdeclareshape macro, and I believe there are a few things I'm overlooking. My specific question is: Why the line associated with the tikz \draw operation is not obscured by the symbol when placed on a path? For instance, in many examples of the circuits library documentation, resistors are clearly not drawn with a line extending through the center of the symbol.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \usetikzlibrary{circuits}     \begin{document}     \makeatletter     \pgfdeclareshape{symbol shape}     {     \anchor{center}{\pgfpointorigin}     \backgroundpath{%         \pgfpathmoveto{\pgfpoint{-2cm}{-0.5cm}}         \pgfpathlineto{\pgfpoint{-2cm}{0.5cm}}         \pgfpathlineto{\pgfpoint{2cm}{0.5cm}}         \pgfpathlineto{\pgfpoint{2cm}{-0.5cm}}         \pgfpathlineto{\pgfpoint{-2cm}{-0.5cm}}              \pgfpathmoveto{\pgfpoint{-2cm}{-0.5cm}}         \pgfpathlineto{\pgfpoint{2cm}{0.5cm}}              \pgfpathmoveto{\pgfpoint{-2cm}{0.5cm}}         \pgfpathlineto{\pgfpoint{2cm}{-0.5cm}}         \pgfusepath{stroke}         }     }     \makeatother               \begin{tikzpicture}[     circuit,     circuit declare symbol=symbol,     set symbol graphic={shape=symbol shape, draw, minimum size=1cm,transform shape}     ]     \draw (0,0) to [symbol] (8,0);     \end{tikzpicture}     \end{document}      Can anyone suggest an improvement to the code shown above in order to prevent the \draw operation line from extending through the symbol?


title: How to include graphs in my document?

text: I've just started using LyX for my Economics essays. Using Inkscape, I have been able to create some very neat diagrams to go with them. However I really need to be able to insert graphs (XY charts, bar charts, histograms etc.) into the document, preferably without having to go via excel. I don't need anything fancy, just something that works with LyX.


title: How can I horizontally align rows in fancyhdr?

text: How can I left-align the [multiple-row] text in the right portion of my header using fancyhdr? I have something like this               \rhead{row 1\\row 2\\row 3}      where the rows aren't the same length, and I wish for them to be aligned on the left.


title: How to convert mdash into LaTeX markup?

text: I am converting HTML markup into LaTeX markup by using `sed` command. I need to convert `—` into its corresponding LaTeX markup. How can I implement it?               — into LaTeX markup


title: Help with generalized list

text: I want to create an environment which contains a list to typeset auto-numbered thesis (just like one does with math formulae). I would like the spacing to be something like this: ![exhibit1](http://i.stack.imgur.com/qt8sw.png) This is the code I've managed to create:               \newenvironment*{Tesis}       {\begin{list}         {\hspace{14pt}(T\arabic{tesisc})}         {\setlength{\rightmargin}{0cm}%          \refstepcounter{tesisc}%          \setlength{\leftmargin}{2\parindent}}         \item       }       {\end{list}}      which unfortunately renders thus: ![exhibit2](http://i.stack.imgur.com/JjskR.png) I've fiddled with every `list` parameter I know of (`\labelwidth` etc.), but with no avail. How can I tweak the `list` environment to accomplish the desired effect?


title: How to open a temporary comics-like balloon in a beamer slide?

text: I would like to open a temporary comics-like balloons to explain a specific word in a beamer slide. Somebody has suggestions?


title: Problem with minipages' images overlapping

text: I am trying to place two images next to each other and I use minipages for that. I create two minipages and when I compile it the one image overlaps with the other. Shouldn't be the one next to the other by default without any overlapping and with no need to add horizontal space in the first place and do so only if I wanted to make them even more apart? Why is that happening and how can I fix it? The code I used is               \begin{minipage}[t]{2cm}          \includegraphics[scale=0.45]{A1.JPG}          \end{minipage}     \begin{minipage}[b]{2cm}          \includegraphics[scale=0.45]{A11.JPG}          \end{minipage}


title: Yen (￥) character (\textyen) in LaTeX - proper encoding

text: I am trying to type yen (￥) symbol in LateX. I am using UTF8 encoding:               \usepackage[utf8]{inputenc}      I tried to type this directly as ￥. When I try to compile file with `pdflatex` I get this error:               Package inputenc Error: Unicode char \u8:￥ not set up for use with LaTeX.      When I try to use `\textyen` command instead of actual character I get:               LaTeX Error: Command \textyen unavailable in encoding OT1.      My question is this:   1. What is proper encoding for yen symbol?   2. Can I use multiple encodings in one file? I want to use UTF8 encoding for all text instead of this yen symbol. Is it possible? I found one way to do this without changing encoding by using:               \yen      in text, while defining following in preamble:               \def\yen{{\setbox0=\hbox{Y}Y\kern-.97\wd0\vbox{\hrule height.1ex     width.98\wd0\kern.33ex\hrule height.1ex width.98\wd0\kern.45ex}}}      However, I am still curious about doing this with proper encoding.


title: LyX not accessing styles, classes, and bibliographies

text: Precursor info: I'm on a Mac operating OSX 10.9.4, which I updated to months ago, before this problem started. I'm running LyX 2.1. Just a few days ago I was using LyX with no problems. The next day, error messages started popping up such as: > "The selected document class Article (Standard Class) requires external > files that are not available. The document class can still be used, but the > document cannot be compiled until the following prerequisites are installed: > article.cls" and > "The module linguistics requires a package that is not available in your > LaTeX installation, or a converter that you have not installed. LaTeX ouptut > may not be possible. Missing prerequisites: covington.sty" and > "The module natbib requires a package that is not available in your LaTeX > installation, or a converter that you have not installed. LaTeX ouptut may > not be possible. Missing prerequisites: natbib.sty" I also cannot access any of my .bib documents. When I go to Tools > TeX Information, nothing is there (i.e. the LaTeX classes and styles, and BibTeX styles and databases sections are all empty). I do, however, have what I believe is the correct directory available: username/Library/texmf/bibtex/bib/.bib_docs_here username/Library/texmf/bibtex/bst/.bst_docs_here username/Library/texmf/tex/latex/packages_&_styles_here Things I've tried:   * Tools > Reconfigure, then quitting and restarting LyX.   * I was on LyX 2.0 when this started. I erased LyX 2.0 from my computer and installed LyX 2.1. At Library/Application Support/LyX-2.1/ there is the same texmf file there, so it does look like the installation of LyX 2.1 correctly copied all of that information.   * Full computer restart.   * Removing and replacing all TeX related folders in Library. I'd very much appreciate any diagnoses of what the problem might be and/or advice on how to solve it. Thank you.


title: Metro style Beamer theme with in-built "Segoe UI" font

text: Has anyone come across a Beamer theme having Microsoft Metro presentation style, in-built with "Segoe UI" font?


title: Avoiding compression artifacts when displaying results of image processing experiments

text: I'm creating a latex document in which I display results of some image processing experiments. In particular, I'm displaying a black and white image which has been blurred (artifically) and then had noise added to it (artificially). I want to make sure that I'm displaying this image correctly / in the standard way. My goal is to completely avoid any compression artifacts when including images in a pdf file created using pdflatex. Currently, I have a blurry, noisy image stored in a Matlab array called b of size 1024 by 1024. The components of b are between 0 and 1. I'm saving b as a png image using Matlab's imwrite command, as follows:               imwrite(b,'blurryNoisyImage.png','png')      First question: no compression is introduced in this step, right? (Edit: Since b is an array of doubles with values between 0 and 1, there is a little precision lost here; I could get a slightly better result using imwrite(b,'blurryNoisyImage.png','png','bitdepth',16).) I'm then including blurryNoisyImage.png in my .tex file, as shown in the following snippet of Latex:               \begin{subfigure}[b]{0.3\textwidth}     \includegraphics[width=\textwidth]{blurryNoisyImage.png}     \caption{Blurry, noisy image.}     \end{subfigure}      I then use pdflatex to create a pdf file. (And when I call pdflatex, I don't use any special commands telling pdflatex to avoid compression when creating the pdf file.) Second question: could any compression artifacts be introduced at this step? Please let me know if I'm doing this the standard way, and if there's a better way that I can do this! Thank you!


title: PGFplotstable: using a csv file with 4 columns

text: Suppose I have a csv file with no titles in it just data. The first column is time (x axis) and the next 3 columns each construct a different set; that is, plot(t, col1) is one set of data, plot(t, col2), etc. I can load the csv with the following command               \pgfplotstableread[col sep = comma]{data.csv}\mydata      How would I then plot each line?               \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat = 1.10}     \pgfplotstableread[col sep = comma]{fexam1cdata.csv}\mydata     \begin{document}     \begin{tikzpicture}       \begin{axis}[         legend pos = south east,         xmin = 0,         xmax = 20,         ymin = 0,         ymax = 2.5         ]         \addplot table[x = time, y = 2nd col]{\mydata};         \addplot table[x = time, y = 3rd col]{\mydata};         \addplot table[x = time, y = 4th col]{\mydata};         \addplot table[x = time, y = 5th col]{\mydata};         \legend{Actual, Measured, Est $Q = 0.01$, Est $Q = 0.1$}       \end{axis}     \end{tikzpicture}     \end{document}      Does `pgfplots` have an internal label name for each column? Can I change it to time, actual, measured, Q1, Q2? In the code above, I used `x = time` and `y = ith col` to show what I want where. Those aren't correct and it wont compile since I don't know how to distinguish the columns in the csv file with `pgfplots`.


title: Strange spacing when using lstlisting

text: I am trying to use the lstlisting package in order to show some code in my document. However, it aligns it to the right of the page, as opposed to left as expected.               \begin{lstlisting}[frame=single]         run.py -some -parameters -right -here     \end{lstlisting}      Would yield something like:                                                                         run.py -some -parameters -right -here      What can I do to fix this?


title: Missing "Vol." and "No." in biblatex/biber

text: I'd like to cite an article with biblatex, but I'm failing to add "Vol." and "No." in front of the corresponding number. Here is the entry, of type `@article`, in the `.bib` file:               @article{kakimoto_monitoring_2006,         title = {Monitoring of Interarea Oscillation Mode by Synchronized Phasor Mesurement},         volume = {21},         issn = {0885-8950},         doi = {10.1109/TPWRS.2005.861960},         number = {1},         journal = {{IEEE} Transactions on Power Systems},         author = {Kakimoto, Naoto and Sugumi, Masahiro and Makino, Tohru and Tomiyama, Katsuyuki},         month = feb,         year = {2006},         pages = {260 -- 268}     }      I cite it in this minimal example:               \documentclass{scrartcl}      \usepackage[T1]{fontenc}     \usepackage{selinput}     \SelectInputMappings{         adieresis={ä},         germandbls={ß},         Euro={€},     }          \usepackage[ngerman]{babel}     % erweiterete Literaturverwaltung     \usepackage[  backend = biber   % (bibtex, biber)             , bibwarn = true    % Warnung bei fehlerhafter bib-Datei             , style = authoryear             , natbib = true               ]{biblatex}     % Einstellung der Anführungszeichen bei Zitaten („x“, »x«, “x”)     \usepackage[autostyle = true]{csquotes}          % Lokalisierung für biber ergänzen % wirkt nicht     \DefineBibliographyStrings{ngerman}{%           jourvol = {V1ol. }         , volume = {VolB. }         , volumes = {VolBs. }         , edition = {No. }         %, andothers = {and others}     }     % Trenner zwischen den Namen ein Semikolon     \renewcommand*{\multinamedelim}{\addsemicolon\space}          % Literaturliste laden     \addbibresource{L:/Uni/Literatur.bib}           \begin{document}          \cite{kakimoto_monitoring_2006}          \printbibliography          \end{document}      But I get in my bibliography this entry:               Kakimoto, Naoto u.a. (Feb. 2006). „Monitoring of Interarea Oscillation Mode by Syn-     chronized Phasor Mesurement“. In: IEEE Transactions on Power Systems 21.1, S. 260–     268. issn: 0885-8950. doi: 10.1109/TPWRS.2005.861960.      As you can see, instead of "Vol. 21, No. 1" I get "21.1". In my code I tried to change this behaviour with the `\DefineBibliographyStrings` macro, but without success. It is interesting, that the commented `andother` localisation string works, the others don't.


title: Two y-axis pgfplot with ylabel and width=\linewidth badly aligned

text: I am trying to draw a `pgfplot` with to different y-axis with their respective label in a full line width and I can't get an alignment of the whole `tikzpicture` within the margins. The problem seems to come from the ylabel which, on the left axis shift the plot to the right, and on the right axis is plotted out of the picture, ie in the margin. I try to add the `ylabel style={overlay}` so I get the plot centered but both `ylabel` are this time in the margins. For sure, I can put a `0.95\linewidth` but I don't find this solution good enough since it isn't generalist. Does anyone knows how can I fix this small example in an automatically way (meaning that `pgfplot` or `tikz` finds the right width alone)?               \documentclass{article}          \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \begin{document}     \centering{}     \hrule{}     I\hfill I\hfill I\\     \begin{tikzpicture}     \begin{axis}[       width=\linewidth,       xmin=-5,xmax=5,       axis y line*=left,       axis x line*=top,       ylabel={$y=x^{2}$ label},       ]       \addplot {x^2};     \end{axis}     \begin{axis}[       width=\linewidth,       xmin=0,xmax=15,       domain=0:15,       axis y line*=right,       axis x line*=bottom,       ylabel={$y=x$ label},       ]       \addplot[red] {x};     \end{axis}     \end{tikzpicture}          \end{document}      which produces this badly aligned plot ![enter image description here](http://i.stack.imgur.com/eRGoy.png)


title: Latex question “Missing $ inserted

text: I want to write this simple equation in latex                   2/|w|      In which |w| is the norm of w,, I tried with                    \frac{2}{\|w\|}      And get error "Missing $ inserted" then I use this                 \frac{2}{$\|w\|$}      And still get same error.. Does someone know how to solve this problem??


title: gb4e breaks math subscripts in \caption

text: As @egreg notes in this answer to Can't compile XeLaTeX document with biblatex and gb4e together, the package `gb4e` makes `_` and `^` active to be able to use subscripts and superscripts in ordinary text without having to switch to math mode. Unsurprisingly, this can cause problems, which is why the package `gb4e` has a way of turning this behavior off with `\noautomath`. Given this, the following MWE does not compile unless `\noautomath` is uncommented.               \documentclass{article}          \usepackage{mwe}     \usepackage{graphicx}          \usepackage{gb4e}     %\noautomath          \begin{document}          \begin{figure}     \centering     \includegraphics{example-image-a}     \caption[$F_{0}$]{$F_{0}$}     \end{figure}          \end{document}      Although, another way to make the MWE compile while leaving `\noautomath` commented is to change the `\caption` line to something like `\caption[No subscript here]{F$_{0}$}`. My question is thus: _why_ does making `_` active break its usage in `\caption`?


title: Extensible \vec instead of \overrightarrow

text: Instead of changing to `\overrightarrow{}`, which uses a usual extensible arrow and puts it above the argument, I would like to get an extensible `\vec{}` symbol. My intention is to obtain a new command `\vect{}`, for instance, which is exactly the same as `\overrightarrow{}` but the head is the `\vec` symbol (and the extensible part is done with the aproppiate “`\relbar`s”, which I don't know). In my case I'm using `kpfonts` package.               \documentclass{scrartcl}     \usepackage{kpfonts}     \newcommand*{\vv}[1]{\vec{\mkern0mu#1}}     \begin{document}     \[         \vec u,\ \vv u,\ \vv{OA},\ \vv{BC},\ \overrightarrow{AB}     \]     \end{document}      I defined the `\vv{}` command because the usual `\vec` gives you a misaligned arrow. ![enter image description here](http://i.stack.imgur.com/buPKu.png) **EDIT:** As @GonzaloMedina pointed, there exists the `esvect` package. But, in my opinion, it doesn't provide any arrow with a head matching the style of `kpfonts`.


title: Numbering Appendices After Bibliography in Backmatter

text: My graduate school requires the appendices to be after the bibliography but still numbered A,B,C, etc. I'm running into a problem because I am using `\backmatter` before calling the bibliography but this turns off chapter numbering so then all appendices are numbered as .1 and so forth. For example, I'd like to do the following:               \documentclass{book}          \begin{document}          \frontmatter     \tableofcontents          \mainmatter     \chapter{foo}     \section{Donald}          \backmatter     \bibliographystyle{bibstyle}     \bibliography{exampleBiB}          \appendix     \chapter{bar}     \section{Mickey}          \end{document}      and have the Mickey section labeled A.1. I know that backmatter turns off chapter numbering so I realize this is the problem, but without it then the bibliography is incorrect. Any help is appreciated.


title: The reference section does not appear at the end of my document

text: I am writing my first LaTeX document. Whenever I view it as a PDF file, the reference section does not appear where I want it to be (at the end of my document), instead it appears in between the pages. What should I do to fix it?


title: How do I center my title (both horizontally and vertically)?

text: I'm trying to create a centred title, both horizontally and vertically on the page. I'm rather new to latex - so far, I've tried the code below without success:               \begin{center}     \title{Title}     \maketitle     \end{center}      Am I required to use special flags to centre the title? I'm using:               \documentclass[12pt]{article}


title: Problems with installation of MinionPro

text: I am trying run my .tex-file after I installed MinionPro in TeXLive, but the following problem appears:               !pdfTeX error: pdflatex (file MinionPro-Bold.pfb): cannot open Type 1 font file      for reading      I really don't know what I am doing wrong. Please help me out. (I am extremely new to LaTeX) Furthermore the installation wants my path to adobefonts:               find /youradobefonts/ -iname '*minion*pro*otf' -exec cp -v '{}' otf/ ';'      but I don't know where they are.


title: Include file with preamble to another tex file

text: I have two files: paper.tex with text, title, and full preamble with authors and so on. It compiles successfully. The second file (B) has also a full preamble with title, authors, little text. It compiles also successfully. File B is in other language than English. I need to have the content of file B in paper.tex output WITH TITLE, AUTHORS, etc. In other words, I need a document with TWO title pages - 1'st titlepage should be in English and come from paper.tex and should appear as normal. Second title page should appear with ALL formatting in last page and should be in another language with different babel and so on. `\include{B}` in this situation does not work. How can I achieve this? Thank all for any kind of help.


title: How to make a pgfooclass persistent across a beamer presentation?

text: I would like to define a tikz image element that I could re-use along a beamer presentation. I tried to define this as a pgfooclass, but this seems to be that I can only instantiate objects of a class in the frame where the class has been defined, and similarly, I can only use an instantiated object in the frame where it has been instantiated. If I try to instantiate in a frame an object of a class defined outside a frame, I get an "Unknown class" error. I can instantiate such an object outside a frame, but I get an "Undefined control sequence" error when I try to use the object inside a frame. Solved: The problem was due to the `ignorenonframetext` beamer option. It turns out that pgfooclasses can be defined before the `\begin{document}`, and be then usable in frames, even with the `ignorenonframetext` option Example:               \documentclass[ignorenonframetext]{beamer}     %\documentclass{beamer}          \usepackage{tikz}     \usepgfmodule{oo}               \author{bli}          % defining a class before the document     \pgfooclass{outdocclass}{         \method outdocclass(){}             \method draw(){             \node (outdoc) at (0,0) {outdoc};         }     }          \begin{document}          % defining a class outside a frame     \pgfooclass{outclass}{         \method outclass(){}             \method draw(){             \node (out) at (0,0) {out};         }     }     % instantiating an object of this class outside a frame works     %\pgfoonew \outobject=new outclass()          \begin{frame}{Class outclass is defined outside frames, and outdocclass before the beginning of the document}          Class outclass is instantiated as outobject outside frames          Class outdocclass is instantiated as outdocobject in this frame     % instantiating an object of the outocclass     \pgfoonew \outdocobject=new outdocclass()          \begin{tikzpicture}         \node at (0,1) {object outobject can be used in this picture};         %\outobject.draw()     % if the option ignorenonframetext is used:     %! Undefined control sequence.     %\beamer@doifinframe ... this picture}; \outobject     %                                                  .draw() \end {tikzpicture}...     %l.50 \end{frame}         \node[text width=0.75\textwidth] at (0,-1) {object outdocobject can be used in this picture, even with the ignorenonframetext beamer option};         \outdocobject.draw()     \end{tikzpicture}          \end{frame}               \end{document}


title: Command with xkeyval keys from different families

text: As I stated in some other questions and on my profile page, I am writing a `problem-solution` package (I know, there are some of them already) I have used `xkeyval` package and my keys, but now, I want to write a wrapper command for some other `environment` or `command` from a different package (not developped by by me) which itself uses `xkeyval` keys as well, belonging to a different key family.               \providecommand{\somewrapper}[1][]{%        \setkeys{mykeyfamily}{#1}%        % Some stuff not relevant here, e.g. configuration etc.        \theothercommand[#1]{other content} % Not written by me...      }%      However, this fails of course, since the wrapper command argument should contain key values specific for `\theothercommand`. Is mixing possible? Stated alternatively: How to distinguish inside which key value should go to `\theothercommand` and which key is connected to my own package code? To make it clearer: There is no problem with keys having the some name in both families, because I use a specific naming scheme for my command and/or package keys, so key names from different packages do not collide. Addendum: One possibility I have in mind is to use a two or even three argument wrapper command, where the first argument contains keys belonging to key family `FamilyA` and the second argument holds keys from `FamilyB`, but this ist not really appropiate, since I would have to change some other commands on top level and to introduce additional optional arguments as well.


title: xkvltxp gives keyval error in case of biblatex's options on multiple lines

text: A `keyval` error arises if both:   * `xkvltxp` is loaded   * `biblatex` is loaded with options on multiple lines. The following MWE shows this strange behavior:               \documentclass{article}     % \usepackage{xkvltxp}     \usepackage[backend=biber,     style=numeric]{biblatex}     \begin{document}     Test.     \end{document}      works like a charm but, if the `xkvltxp` is loaded, it gives the error:               ! Package keyval Error: style undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.10902 \blx@processoptions      As soon as the `biblatex`'s options are given on the same line, this file compiles like a charm. I tried some other packages than `biblatex` with options on multiple lines but it is the only one I found giving this eror.


title: Tex Live 2014 full installation does not have documentation files

text: I installed the Full scheme of Tex Live 2014 with `install-tl` on RHEL 5. I find that it no longer has the `texdoc`-accessible PDF documentation. Am I missing something? Or is excluding the documentation a community decision that I was not aware of?               $ texdoc amsmath     Sorry, no documentation found for amsmath.     If you are unsure about the name, try searching CTAN's TeX catalogue at     http://ctan.org/search.html#byDescription.          $ texdoc tikz     Sorry, no documentation found for tikz.     If you are unsure about the name, try searching CTAN's TeX catalogue at     http://ctan.org/search.html#byDescription.      I think I have my `PATH`s correctly set, because I could compile a past project out-of-the-box. Anyways, I probably still missed something. How do I install all the PDF documentation seamlessly?


title: What packages will let me use Cyrillic characters in math mode?

text: Note I'm not actually planning on writing any, for instance, Russian prose or even any Russian words. It's just that, on paper, I've always had the habit of denoting sets by uppercase roman letters, sets of sets by script letters and, when the need arises, sets of sets of sets by uppercase Cyrillic letters. Is there some package I can load which will allow me to typeset (in LaTeX math mode) Cyrillic letters much as I would typeset Greek letters? ie. $\Zhe$ to produce an uppercase zhe. Thanks!


title: How to create the character Д for math mode?

text: In my research I'm using results of the paper Vinogradov A. M., - The logic algebra for the theory of linear differential operators, - Soviet Math. Dokl., 13 (1972), 1058-1062. The paper uses the character looking like Д (Unicode hex U+0414) to refer to a specific operator: ![Д](http://i.stack.imgur.com/wznxn.png) What I want is to write something like `\newcommand\DD{\unicodesymbol{U+0414}}` (which obviously doesn't work) and use `\DD` to refer to this symbol in math mode. I've also found, that               \usepackage[OT2, T1]{fontenc}     \usepackage[russian, english]{babel}     \newcommand\DD{ {\operatorname{\textrm{\foreignlanguage{russian}{D}}}} }      seems to work, but I'm not sure, if this is a good way to define this symbol (e.g. if it doesn't break anything). So, what is the best way to do that? P.S. I tried to use Detexify, as suggested here, and didn't find anything like Д. I also looked at Comprehensive LaTeX symbols and AMS LaTeX Short Math Guide, and the most close equivalend I've found is `\symrook` from `skak` package, which is still different. **Update:** as was suggested in a comment below by Gonzalo Medina I now use               \usepackage{amsmath}     \usepackage[OT2, T1]{fontenc}     \usepackage[russian, english]{babel}     \DeclareMathOperator\DD{\textrm{\foreignlanguage{russian}{D}}}


title: How to give simple label to each connected component of graph

text: I have a disconnected graph, with six components. I would like to give some name at the bottom for each component. I would like to represent them with $D_1, D_2 . . .D_6$. Can some one help me out.                \documentclass{article}     \usepackage{tikz}     \begin{document}      \begin{figure}     \begin{tikzpicture}     [scale=.8,auto=left,every node/.style={circle,fill=blue!30,linewidth=10mm,inner sep=0pt,minimum size=10pt}]          \node (n1) at (8,0)  {e};     \node (n2) at (0,0)  {e};     \node (n3) at (0,-2)  {fg};     \node (n4) at (8,-2)  {abcdhijk};     \node (n5) at (6,0)  {h};     \node (n6) at (2,0)  {h};     \node (n7) at (2,-2)  {ikj};     \node (n8) at (6,-2)  {abcdefg};     \node (n9) at (0,0)  {d};     \node (n10) at (0,-2)  {abc};     \node (n11) at (3,0)  {d};     \node (n12) at (3,-2)  {efg};     \node (n13) at (4,0)  {d};     \node (n14) at (4,-2)  {hijk};          \foreach \from/\to in {n2/n3,n1/n4,n5/n8,n6/n7,n9/n10,n11/n12,n13/n14}      \draw (\from) -- (\to);          \end{tikzpicture}     \end{figure}     \end{document}


title: space behind unit in nomenclature list

text: I would like to have the unit closer to the symbol description in my nomenclature list. But when I use the command from the help file and add a space after the unit:               \newcommand{\nomunit}[1]{\renewcommand{\nomentryend}{\hspace*{\fill}[#1]\hspace{2cm}}}      only the last entry is moved. How can I move all entries by 2cm to the left?               \documentclass{article}     \usepackage{nomencl}     \usepackage{siunitx}          \makenomenclature     \begin{document}          \newcommand{\nomunit}[1]{\renewcommand{\nomentryend}{\hspace*{\fill}[#1]\hspace{2cm}}}               \nomenclature[C]{$  m   $}{ mass    \nomunit{$\si{  kg  }$}}     \nomenclature[C]{$  \omega\_{m} $}{ mechanical angular frequency    \nomunit{$\si{  Hz  }$}}     \nomenclature[C]{$  \omega\_{el}    $}{ electrical angular frequency    \nomunit{$\si{  Hz  }$}}          Here comes the nomenclature:          \printnomenclature          \end{document}


title: Why is \rotate useless in deluxetable?

text: The command `\rotate` is useless. I searched the web and somebody said it is common and weird. ## How to rotate it then? I download a 2028K configuration files herehttp://authortools.aas.org/aastex/downloads.html and the rotation problem is fixed. **However I still do not know how to fix it if I use my original configuration file. Can you rotate the table using the tex code below?** **And can you put the whole table in a single page?** Test tex is as below:               \documentclass[12pt,preprint]{aastex}     \begin{document}     \rotate     \begin{deluxetable}{lllllllllllll}          \tabletypesize{\tiny}     \startdata     113b&2014-10-16:21.3&2014-10-17:20.6&2.76358799&11:07:53.107&+6:12:05.9&16.971279167&26.8683055556 &2014-10-17 13:21:00 &2014-10-17 19:26:00 &2014-10-17 21:21:00 &2014-10-18 03:25:00&ok\\`     \enddata          \end{deluxetable}     \end{document}


title: Biblatex BibliographyOption with braces?

text: For a specific biblatex style, I have declared a bibliography option which takes a name, as in               \DeclareBibliographyOption{myname}{\edef\somename{#1}}      Now LaTeX yields an error if the value of this option consists of braces, such as `myname=M{\"u}ller`:               ! You can't use `macro parameter character #' in horizontal mode.     \@removeelement #1#2#3->\def \reserved@a ##1,#1,##                                                       2\reserved@a {##1,##2\rese...          l.59 \ProcessOptions\relax      Is there a way to work around this? If not, is there a way to expand a macro in such a way that braces disappear? My aim is to test for string equivalence via `\ifdefstring`, and the test returns false if `M{\"u}ller` is compared to `M\"uller`, as in               \edef\x{M{\"u}ller}     \edef\y{M\"uller}     \ifdefstrequal{\x}{\y}{TRUE}{FALSE}      which will return `FALSE`.


title: drawing a circle in the xy plane when using 3d coordinates

text: I am trying to make a circle in the xy plane that has walls that slope up. How can I do this? Basically a bucket with a bigger opening then base.               \documentclass{article}     \usepackage{tikz, tikz-3dplot}      \begin{document}     \begin{center}       \tdplotsetmaincoords{72}{120}       \begin{tikzpicture}[line join = round, line cap = round, >=triangle 45,         tdplot_main_coords]         \draw[->] (0,0,0) -- (3,0,0) node[left, scale = .75] {$x$};         \draw[->] (0,0,0) -- (0,3,0) node[right, scale = .75] {$y$};         \draw[->] (0,0,0) -- (0,0,2) node[above, scale = .75] {$z$};               \end{tikzpicture}     \end{center}     \end{document}


title: How to wrap a fig close to a description/itemize list?

text: I want to make a description list with a figure in the right side. I prefer wrapping the fig, but It´s good in any other kind of wrapping I code this, but I have no good results, It´s strange, place the fig after the description list               \item Los tres tipos de anomalías son:\\       \begin{wrapfigure}{r}{40mm}  %\begin{wrapfigure}{r}{36mm}              \includegraphics[width=40mm]{anomalias.jpg}       \end{wrapfigure}  %\end{wrapfigure}                    \begin{description}             \item [- Verdadera.-] Es el ángulo que forma el planeta medido desde el foco de la órbita con el eje de la elipse. Se designa por $\nu$, por $T$, o por $V$             \item [- Verdadera.-] Es el ángulo que forma el planeta medido desde el foco de la órbita con el eje de la elipse. Se designa por $\nu$, por $T$, o por $V$             \item [- Verdadera.-] Es el ángulo que forma el planeta medido desde el foco de la órbita con el eje de la elipse. Se designa por $\nu$, por $T$, o por $V$             \item [- Verdadera.-] Es el ángulo que forma el planeta medido desde el foco de la órbita con el eje de la elipse. Se designa por $\nu$, por $T$, o por $V$             \item [- Verdadera.-] Es el ángulo que forma el planeta medido desde el foco de la órbita con el eje de la elipse. Se designa por $\nu$, por $T$, o por $V$            \end{description}


title: Tabular with automatic \hline

text: Is there a package or simple command that will insert an `\hline` after every line in a `tabular` environment? It is rather annoying to do it all manually, and it seems like there should be a simple way of doing this (it seems to be a relatively common thing to want to do). Is there something that does this? **Edit:** In case it does not go without saying, I would also like a line above the first row as well. Clarification: I currently have something that looks like this:               \documentclass[12pt]{article}     \usepackage[english]{babel}     \usepackage{amsmath,amsthm}     \usepackage{amsfonts}          \begin{document}     \begin{tabular}{l}     \hline     a\\     \hline     a\\     \hline     a\\     \hline     a\\     \hline     a\\     \hline     \end{tabular}          \end{document}      I would like to have something that would remove the need for me to type `\hline` so many times.


title: Set a color to be considered as transparent while including eps files in latex

text: I have some .eps files whose background colors are white. I need to include these graphics in my latex file, and my latex file has a background color different from white. I am willing to have these .eps files in my latex document without their white background colors being shown, i.e. I want the white color to be considered as a transparent color. Is this possible without using other graphical software?    **Edit:**   To clarify my question a bit more, I'll give you an example. In the picture below, on the right hand side is my original picture (with extension .eps), and on the left hand side is my latex file. I have included the picture in my latex file using \includegraphics command. When I build my latex file, the picture appears like what is marked as A. But what I am looking for is to do something in order for the picture to appear as what is marked as B. ![enter image description here](http://i.stack.imgur.com/moiz0.jpg)


title: Single Thicker vertical line

text: I have this table and I would like to make two vertical lines thiker than the others. This turns out to be useful to visually divide the columns. Basically my table has 13 columns and I would like to turn 2 of them a bit thicker. I won't show the code for the table because it is really huge and not practical to paste it here. What I'm looking for is probably a keyword to make the vertical line thicker, without messing too much with this already messed-up table :-). Thanks a lot. EDIT: I tried with the following command `\newcolumntype{"}{@{\hskip\tabcolsep\vrule width 1pt\hskip\tabcolsep}}` But it creates some spacing between one column and the other. Trying to remove the first `\tablecolsep` solves the issue (that is no more spacing between the columns), but I get three errors: `Package array Error: Illegal pream-token (2.2mm): 'c' used.` this probably because I declare the column like this: `|"{2.2mm}` but it I do not declare the size it messes the whole table up, `Missing number, treated as zero.` on                   \vrule      \end{tabularx}      and `Illegal unit of measure (pt inserted).` on the exact same output as the second error. Sorry if these are stupid mistakes but modifying the command shown doesn't lead me to success. EDIT2: By using the "array" package and following what @egreg said, I get the following error: `Package array Error: Illegal pream-token (2.2mm):`c' used`. This is probably because I define the columns like this (where`x`is`\newcolumntype{x}[1]{>{\centering\hspace{0pt}}b{#1}}`):               |?{2.2mm}     |x{2.2mm}     |x{2.2mm}      and so on.


title: Where is the specification of the Synctex file format?

text: In the context of a new LaTeX web-based IDE, we're writing a parser for Synctex. Where can we find a specification or explanation of its structure and content in order to correctly parse it?


title: It doesn't show what I changed on the PDF

text: I had just updated my Mac to Mavericks and that's when the nightmare starts.. Everything was working fine before I had it upgraded. Now when I do any editing on my old work after I save it, it just doesn't show on the PDF, it still shows the same old work that I did (nothing has changed). But the formula is right and I had changed everything. It just doesn't show and change on the PDF.


title: ConTeXt: Change location of page numbers in table of contents

text: # Background Looking to place the page number on the left of each section heading in the frontmatter's table of contents, similar to the following (where "Title Here" is a section title and the page numbers are hyperlinks): ![ToC Picture](http://i.stack.imgur.com/ig6LX.png) By default the "alternative" styles (a through f) always place the page number to the right of the section title. For example:               \setupcombinedlist[content][       alternative=a,     ]      # Problem I cannot determine how to check whether or not to display the chapter title in the ToC. # Code Here is what I have so far:               \startsetups [list:TOC]     \starttabulate     \currentlistentrypagenumber{} \hskip 1em \NC \currentlistentrytitle{} \NR     \stoptabulate     \stopsetups          \definelistalternative       [TOC]       [renderingsetup=list:TOC]          % Format the ToC style.     \setupcombinedlist[content][       alternative=TOC,     ]          \starttext       \completecontent       \startchapter [title=alpha] \stopchapter         \startsection[title=alphasec] \stopsection       \startchapter [title=beta]  \stopchapter         \startsection[title=alphasec] \stopsection       \startchapter [title=gamma] \stopchapter         \startsection[title=alphasec] \stopsection     \stoptext      # Question How do you determine whether or not the chapter title should be displayed? # Ideas The code on the wiki reveals:               \doifelse\currentlistentrylocation{\structureheadlocation{chapter}}             {{\bfb\currentlistentrytitle}}             {     \currentlistentrytitle}\NC\NR      However, there are a number of syntax errors with the code and the conditional expression assumes that the ToC is being placed on every page. This assumption allows it to resolve the namedstructureheadlocation value. For a regular ToC, there is no "current chapter" and so the conditional fails. # Related   * How to adjust the position of entries in the table of contents in ConTeXt?   * Using macro variables with Lua in ConTeXt


title: big angle brackets

text: I know that `\langle` and `\rangle` creates left and right angle brackets. But they don't seem to adopt to the size of the expression inside. For example, if I have a big matrix, I would like to angle brackets to be big as well. How can I get this effect?


title: different type areas on even/odd pages

text: in some (very rare) cases, it might be desirable to have the type area, particularly the text width, be different on even and odd pages. Let's say we're typesetting a textbook that's supposed to have small illustrations or annotations in the margin of the odd pages -- so we'd need a narrower type area on these. Like this: ![different type areas even/odd](http://i.stack.imgur.com/JzvuX.png) Here's an attempt at a solution I came up with. It isn't as smart as I thought it was. I thought we might just combine `everyshi` and an `\ifthispageodd` test to change the typearea at every shipout. Obviously, that's not how it works:               \documentclass[paper=a5,pagesize,10pt,DIV=12,twoside=true]{scrreprt}     \usepackage{everyshi,blindtext}     \EveryShipout{%     \ifthispageodd{\areaset{6cm}{12cm}}{\areaset{9cm}{12cm}}}          \begin{document}     \Blinddocument     \end{document}      this results in:               ! Bad space factor (0).     <recently read> \@savsf           l.7 \Blinddocument      Is there a way to improve this? Or something entirely different?


title: Specify positions for top/bottom in Beamer vertical shading

text: **MWE**               \documentclass{beamer}          % Yes, this is a poster, if that matters in the slightest     %\usepackage[orientation=portrait,size=a0]{beamerposter}     \mode<presentation>{}          \setbeamertemplate{background canvas}        [vertical shading]        [bottom=blue!15,top=blue!0,midpoint=.1]          \begin{document}     \begin{frame}[t]{Title!}     Content!     \end{frame}     \end{document}      What I'd like to be able to do is set `top`/`bottom` the same way I set `midpoint`, since (the title area being white) the junction of the white background with a sudden and noticeable blue is extremely offsetting. I've looked through the manual, but to my knowledge there is no explicit support for this.


title: revtex incompatible with dblfloatfix?

text: This minimal example makes my latex/pdflatex from MiKTeX (or TeX Live of a colleague) crash:               \documentclass{revtex4-1}     \usepackage{dblfloatfix}     \begin{document}     Hello World!     \begin{figure}     \end{figure}     \end{document}      It writes out several 100 MB of log files until I force quit it. Why is this? Not using `dblfloatfix`, or using a different document class solves the problem, but not my use case.


title: Using the correct amount of space around unit symbols

text: This is from an old package I developed back in 2003. The idea was to cover international system units (SI) and other type of units, roughly following guidelines from that document. > Units should use some straight font (roman vs. italic or oblique), they are > not abbreviations and should never use a period, and should be separated > from the quantity by a space (if typographically possible by a small space) > and should be separated also from following punctuation. So I defined macro `\unit` that would typeset the following argument as `\mathrm` handling a tinyspace `\,` before to separate it from the quantity and would add an additional tinyspace after if followed by punctuation. It also took an optional argument for typesetting an exponent. It also had an additional macro `\newunit` that would create a command for most common uints. I also attempted for these commands to work both in normal text as in math- mode. The code bellow shows the macros defined and an example:               \documentclass[twocolumn]{article}     \makeatletter       %%% Modified from xspace       \DeclareRobustCommand\uspace{\futurelet\@let@token\@uspace}       \def\@uspace{%         \ifx\@let@token\bgroup\else         \ifx\@let@token\egroup\else         \ifx\@let@token\/\else         \ifx\@let@token\ \else         \ifx\@let@token~\else         \ifx\@let@token.\,\else         \ifx\@let@token!\,\else         \ifx\@let@token,\,\else         \ifx\@let@token:\,\else         \ifx\@let@token;\,\else         \ifx\@let@token?\,\else         \ifx\@let@token/\else         \ifx\@let@token'\else         \ifx\@let@token)\,\else         \ifx\@let@token-\else         \ifx\@let@token\@xobeysp\else         \ifx\@let@token\space\else         \ifx\@let@token\@sptoken\else          \space          \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}       \newcommand\unit[1]{\def\@tempa{#1}\unit@}       \newcommand\unit@[1][\@empty]{%         \ensuremath{\,%           \textrm{\@tempa}%           \ifx#1\@empty\else            ^{#1}\fi}%         \uspace}       \newcommand\newunit[2]{%         \@namedef{#1}{\unit{#2}}}       \newcommand\degree{%         \ensuremath{^\circ}}     \makeatother     % SI official and common derivated units     \newunit{m}{m}     \newunit{kg}{kg}     \newunit{sec}{s}     \newunit{amp}{A}     \newunit{ohm}{$\Omega$}     \newunit{kelvin}{\degree K}     \newunit{celcius}{\degree C}          \begin{document}     \newunit{cm}{cm}     One inch is 2.54\cm and one square inch is 6.4516\cm[2].     \[(2.54\cm)^2=6.4516\cm[2]\]          \newunit{farenheit}{\degree F}     Water freezes at 32\farenheit and boils at 212\farenheit.     \[100\celcius=212\farenheit-32\farenheit\]          International unit system defines the Ampere (\amp) and the     second (\sec), however it does ot define the Culomb (\unit{C})     prefering the compund Ampere-second (\amp\sec).     (Although it should look as \unit{As}.)     \[1\unit{C} = 1\amp\sec = 1\unit{As}.\]          If a tension of 12\unit{V} on a resistor of 15\ohm will produce     a current of 0.8\amp.     \[\frac{12\unit{V}}{15\ohm}=0.8\amp\]          The gravitational field on Eath's surface is 1\unit{g}, and this     is roughly equal to 9.8\unit{N}/\kg or 32\unit{ft}/\sec[2].     \[1\unit{g} \simeq 9.8\frac{\unit{N}}{\kg}      = 9.8\m\sec[-2] \simeq 32\frac{\unit{ft}}{\sec[2]}\]          \end{document}      ![Example output](http://i.stack.imgur.com/HbZrF.png) In most running text and and math mode it works fine, however the output sometimes leaves spaces too wide where no space should be. What kind of trick may I use to eliminate the spaces where I don't need them while preserving the space I want? I have noticed that command `\mathrel` handle the spaces similarly as I expect for `\unit` (The space previous to the degree symbol might be handled apart, as it affects all the instances of those units.) ((I got the attention that package `siunitx` might already do what I attempted; while using that package might solve my typographic problems, it doesn't solve my “I want to know how to do it” problem.))