title: Error compilation tikz, intersection & foreach

text: I want to compile this code (using PDFLaTeX)               \documentclass[12pt]{article}     \usepackage[ansinew]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{tikz}     \usepackage{color}     \usetikzlibrary{arrows,shapes,scopes,calc,intersections}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \begin{document}     \newcommand{\coorpente}[4]{\coordinate(#1) at ($(#2)+({#4/(sqrt((#3*#3)+1))},{#3*#4/(sqrt((#3*#3)+1))})$);}     \newcommand{\inter}[3]{\path [name intersections={of=#2 and #3,by=#1}];}     \newcommand{\linenp}[4]{\path[name path=#1,#4](#2)--(#3);}          \begin{tikzpicture}[]     \draw[help lines,step=1,line width=1.5pt,black!50] (0,-1) grid (10,6);     \draw[help lines,step=.2] (0,-1) grid (10,6);     \coordinate(ptad1) at (0,0) ;     \coordinate(ptad2) at (10,0) ;     \coordinate(ptg1) at (0.5,-1) ;     \coordinate(ptg2) at (10,5) ;          %espace     \linenp{ad}{ptad1}{ptad2}{draw,yellow!80!black,line width=5pt}     \linenp{adb}{ptad1}{ptad2}{draw,line width=1.5pt}     \draw[cyan,line width=4pt,name path=gamma] (ptg1)to [out=90,in=195] (ptg2);     \linenp{adb}{ptad1}{ptad2}{draw,line width=1.5pt}     \draw[line width=1.5pt,name path=gammab] (ptg1)to [out=90,in=195] (ptg2);          \def\pente {3.5}     %iterations     %1d     \coordinate(iterdb1) at (10,3);     \coorpente{iterd1}{iterdb1}{\pente}{-4}     \linenp{itd1}{iterdb1}{iterd1}{}     \inter{intd1}{itd1}{ad}     \draw(iterdb1)--(intd1);     \foreach \nuuu/\nddd in{1/2,2/3,3/4,4/5,5/6}     {     %u     \coorpente{iteru\nuuu}{intd\nuuu}{-\pente}{-5}     \linenp{itu\nuuu}{iteru\nuuu}{intd\nuuu}{}     \inter{intu\nuuu}{itu\nuuu}{gamma}     \draw(intd\nuuu)--(intu\nuuu);     %d     \coorpente{iterd\nddd}{intu\nuuu}{\pente}{-5}     \linenp{itd\nddd}{intu\nuuu}{iterd\nddd}{}     \inter{intd\nddd}{itd\nddd}{ad}     \draw(intu\nuuu)--(intd\nddd);     }          \draw (ptad1)--(ptg1);          \end{tikzpicture}     \end{document}      I obtain the weird error message:               ! Undefined control sequence.     \tikz@intersect@namedpaths ...@path@name@itd\nddd                                                    \endcsname {\pgfsyssoftpat...     l.165 \draw (ptad1)--(ptg1);      When I remove or comment the line containing `\draw (ptad1)--(ptg1);`, I don't obtain any error. I think that the error is due to the "foreach" command: when I suppress the `\foreach` command and I write the command manually (for each step of the foreach command), I don't have any error. Do you have an idea about the origin of this error?


title: Last version of pgfplots, error with LuaLaTeX

text: I have just installed the last version of `pgfplots` (version **1.10** ) in my local `texmf` directory but when I try to compile a file with `LuaLaTeX` I get the following error:               (/home/red/texmf/tex/generic/pgfplots/util/pgfplotsutil.code.tex     ! LuaTeX error <\directlua >:1: module 'pgfplots' not found:         no field package.preload['pgfplots']         [kpse lua searcher] file not found: 'pgfplots'         [kpse C searcher] file not found: 'pgfplots'         [oberdiek.luatex.kpse_module_loader] Search failed     stack traceback:         [C]: in function 'require'         <\directlua >:1: in main chunk.     <argument> ...e(\pgfplotsDQ pgfplots\pgfplotsDQ )}          l.1993 }             %     ?       If I press enter the compilation finishes without other errors and the file look fine but what is this error? If I instead use the `texlive` version of `pgfplots` ( **1.2.2** ) then no errors at all (but I need the last version not the older one...)


title: concurrent use of geometry package with watermarks

text: I'd like to include a graphic as watermark in a document with the `twoside` option and asymmetric page margins adjusted with the `geometry` package. There's a plethora of packages that are suitable for the task, but with a few restrictions: The `xwatermark` package is simple to use, but I can't specify options for even and odd pages at the same time, so either the watermark appears only on half of the pages or it's page-centered rather than text-centered.   With packages such as `watermark`, I can't exclude the watermark on specific pages, e.g. the title page and certain pages with diagrams.   Lastly, packages like `atbegshi` provide access to `dvi` internals, but I don't have the time to work it all out myself. So my question is: what is the most elegant way to implement such a flexible watermark? If it is relevant, I'm currently using `LaTeX` with `PSTricks` on Windows 7, but may well switch to `ConTeXt` with `PGF/TikZ` on Linux in the future... Thanks in advance.


title: Making an odd shaped table

text: I'm trying to make a table that looks like this:                              +--------------+                    |   Class 1    |                    +--------------+                    |   A  |   B   |     +---------+----+------+-------+     |         | C  |   a  |   b   |     | Class 2 +----+------+-------+     |         | D  |   c  |   d   |     +---------+----+------+-------+      There are many things wrong with my code. First is the way that the word span appears in front of the `\multicolumn{2}{|c|}{{\textbf{Class 1}}}` entry (which doesn't span the line). Second the line between C and D goes all the way through class 2. I don't know how to get rid of the lines in the top right. It's a real mess, what am I doing wrong? Apologies for the not-very specific question.               \begin{tabular}{|r|c||c|c|}       \hline       \multicolumn{2}{c}{} & \multicolumn{2}{|c|}{{\textbf{Class 1}}} \\       \multicolumn{2}{c}{} & A & B \\       \multirow{2}{*}{{\textbf{Class 2}}}         & C & a & b \\       \hline         & D & c & d \\       \hline     \end{tabular}


title: Is there a LaTeX command to save a copy of a tex file in another directory?

text: I am wondering if there is a command I can use at the end of my .tex file so that after compiling a copy of the .tex file is saved in another pre-specified directory? I haven't tried any code because I have no ideas if/how I can do this. Any suggestions will be much appreciated, Thanks in advance


title: circle items in an array

text: So I would like to circle two of the elements in my array at the same time. Even though they are in different rows and or columns. Here is what I have so far.               \documentclass{article}          \begin{document}          $     \begin{array}{cccc}     x_{1}&x_{2}&x_{3}&x_{4}\\     y_{1}&y_{2}&y_{3}&y_{4}     \end{array}     $          \end{document}      I want to put a big circle around `x_{1}` and `y_{1}` as well as a circle around `x_{3}` and `x_{4}`. Any ideas how to do this?


title: Undefined control sequence on \cftaddtitleline

text: The following code produces `! Undefined control sequence.`               \documentclass{article}     \begin{document}     \tableofcontents     \cftaddtitleline{toc}{section}{Topic 1}{}     \end{document}      What am I doing wrong? I need `\cftaddtitleline` to add text in TOC for pages which are written in Word.


title: PDF portfolio navigators

text: Using the embedfile package it is possible to create pdf portfolios/collections with pdfLaTeX. The pdf specification describes the use of custom "navigators" to create a pleasing interface for the files in the pdf portfolio. Is it possible to download or create a custom `.nav` file and embed it directly from LaTeX or with tools other than the full version of Acrobat? Edit: the description of navigators can be found in the supplement to ISO 32000 here.


title: Using BibTeX with a 'corporate' author name (spelling out the name in full)

text: I want to reference a company name using BibTeX:               @book{CUDA,       author    = {NVIDIA Corporation},       title     = {NVIDIA CUDA Compute Unified Device Architecture Programming Guide},       publisher = {NVIDIA Corporation},       year      = {2007}     }      But the entry keeps showing up N. Corporation. Is there a way to get the full author name to show up? I'm currently using the `siam` BibTEX style.


title: BibTex reference not showing up correctly

text: I've been trying to cite this article               @article{office2012national,       title={National Strategy for Suicide Prevention Goals and Objectives for Action Summary List},       author={Office of the Surgeon General (US and National Action Alliance for Suicide Prevention (US and others))},       year={2012},       publisher={US Department of Health \& Human Services (US)}      } using               \bibliographystyle{acm-sigchi}      but regardless of how much I try, it always shows up like this ![enter image description here](http://i.stack.imgur.com/0HqXq.jpg) I tried removing some extra brackets from above (copied directly from Google Scholar search) and replacing the ampersand character, but that does little to change the output. Thank you for the help!


title: Disable Abbreviation for Author Name in latex bibtex

text: In by bibtex.bib file, I have an entry like this: ![enter image description here](http://i.stack.imgur.com/LrNhG.png) After citing, latex abbreviates the author section as below: ![enter image description here](http://i.stack.imgur.com/fpDHn.png) How can I instruct latex to show non-abbreviated version of the author section?


title: Verbatim text in token registers

text: How can I add verbatim text in a token register (I want to accumulate pieces of code in a toks register and print them in an appendix). In the MWE below if you substitute verbatim text it fails.               \documentclass{article}     \begin{document}       \newtoks\test       \test={one }       \test=\expandafter{\the\test test}       \the\test     \end{document}


title: How to create MetaPost image for LaTeX

text: ![im trying to figure out how to create this image in metapost](http://i.stack.imgur.com/d3qy8.png) Im trying to figure out how to create this image in MetaPost


title: How to add running text between bibliography items?

text: I'd like to create a bibliography (with the `\thebibliography` environment) where I need to add a few textual comments between some of the elements (for example, `See the following books for more information on foo:' and 'These resources help you better understand the bar:' etc.) I've seen solutions for adding a preamble to a bibliography ( Adding text between Bibliography header and the first bibitem ), however, I don't know how to use that solution for my needs. Is there any way to solve this problem, or would it be easier to manually create the whole bibliography?


title: Exam class: start true/false questions with "True False"

text: I'm using the exam class and I would like to write questions like this:               1. True False  This statement is false.          2. True False  This statement is true.  It's a long, though, so it                     goes on to the second line.      Then the students can circle "True" or "False" depending on their mood, etc. Note the indentation for the second question. I would probably also put "True" and "False" in bold, with suitable spacing before, after, and between them. I can see how to use `\qformat` to make it look like this:               1.  True False         This statement is false.          2.  True False         This statement is true.  It's a long, though, so it        goes on to the second line.      but then it's a little harder to distinguish the answer choices from the question. I could also use the `oneparchoices` environment, but that doesn't handle the indentation, and it also would insert "A. True B. False", which I don't think looks good.


title: Adding a cost of extra pages / forcing a page limit

text: TeX creates a document by solving an optimization problem, where different spacings etc. are assigned different costs, or "badness". All writers of papers, especially for conferences proceedings have to battle with page limits. Right now it is very late and my coauthor removed a sentence, only to have the document grow beyond the page limit because TeX rearranged some figures. Is it possible to assign an infinite "badness" to using more than a set number of pages? (I am not looking for a solution for this particular deadline, we'll solve our problem anyway)


title: How do I store the upper case counterpart of a string?

text: I have a string stored in a variable `\word`, and I want to store its upper case counterpart in another variable `\WORD`. If I try                \def\WORD{\MakeUppercase{\word}}      \show\WORD      then the message generated by `\show` is `\MakeUppercase {abc}`. Presumably I need to adjust the order of expansion in the first line. How do I do this?


title: Centering a table of images

text: I'm trying to center a table of images; 2 images per table row. Right now the code I have is ugly, and doesn't center on the document. I've tried using \begin{center} and \centering without any luck. Also The way I created it, it currently creates a new table for every line. It's not ideal, but it the best I came up with so far. This is because I need to alternate text and images (for a caption effect, when I try to use the \caption I can't get the 2 column effect or the caption centers without the image and it's ugly) Is there a way I can accomplish this considering there are about 100 images?               \begin{document}     stuff     stuff     stuff     \begin{center}     stuff that centers     stuff that centers     \figureLoop{pic(}{).jpg}     %Doesn't center :(     stuff that centers     \end{center}     \end{document}      The first parameter is the front half of file name (separated by a number that increases in the loop) and the 2nd part is the rest of the file name.               \newcommand{\figureLoop}[2]       {          % Condition to loop; intitialized to true.       \bool_set_true:N \runWhileLoop               % Place holders       \int_zero:N \counter     \tmp=0     \Counter = \counter               % Run while condition is true       \bool_while_do:Nn {\runWhileLoop}       {              % Increment the counter            \int_incr:N \counter         \Counter = \counter                % Create file name from the counter         \edef\fileName{#1\int_use:N\counter#2}             % Increment for the 2nd column         \int_incr:N \counter             % Define the 2nd column figures/number         \edef\filename{#1\int_use:N\counter#2}                   % Check if the file exists         \file_if_exist:nTF {\fileName}         {                 % Check to see if the 2nd column file exists/is necessary             \file_if_exist:nTF {\filename}             {                     \begin{table}[!htbp]                      \begin{tabular}{c c}                         \includegraphics[width=3.5cm]{\fileName} & \includegraphics[width=3.5cm]{\filename} \\                         Image \number\Counter & Image \number\counter \\                     \end{tabular}                     \end{table}             }{                     % If there's an odd number of photos                     \begin{table}[!htbp]                      \begin{tabular}{c}                         \includegraphics[width=3.5cm]{\fileName} \\                         Image \number\Counter \\                     \end{tabular}                     \end{table}             }                     \advance\tmp by 1             \ifnum\tmp=4                 \newpage                 \tmp=0             \fi         }{             % there is no file with the given name             % break the loop             \bool_set_false:N \runWhileLoop         }       }     }      And this is what I currently get. This is the idea I want but centered completely. Any advice would be helpful, but I'd prefer something that has as little modification as possible. ![Ugly format](http://i.stack.imgur.com/2P6dQ.png)


title: Misplaced alignment tab character & error while using bibliography

text: When I build my tex file, I get this error:               ! Misplaced alignment tab character &.     l.6 \newblock Chapman &     Hall/CRC, six edition, 2003.     I can't figure out why you would want to use a tab mark     here. If you just want an ampersand, the remedy is     simple: Just type `I\&' now. But if some right brace     up above has ended a previous alignment prematurely,     you're probably due for more error messages, and you     might try typing `S' now just to see what is salvageable.      my bib file looks like this:               @book{a1,         author    = "Shasha, D. and Zhu, Y.",         title     = "High Performance Discovery in Time series, Techniques and Case Studies",         publisher = "Springer",         year      = "2004"      }     ,     @book {a2,      author    = "Shasha, D. and Zhu, Y.",         title     = "High Performance Discovery in Time series, Techniques and Case Studies",         publisher = "Springer",         year      = "2014"     }


title: Strange behaviour of WinEdt 8

text: After I compile a document containing math content in WinEdt, keep it open, switch to another task (say opening the browser and viewing the tex.stackexchange.com site) and then when I return, I get the document math content like the below picture. When I close and open the document also, It is the same. What is the issue? ![enter image description here](http://i.stack.imgur.com/bvBdV.png) The output the corresponding code generates is: ![enter image description here](http://i.stack.imgur.com/BzPXp.png) # Note There are no issues with the compilation. But I am not able to understand, what code I have written when I view it next time. Here is my source code: # Mainfile:               \documentclass[12pt, a4paper]{book}     \usepackage{setspace}     \usepackage[many]{tcolorbox}     \usepackage[detect-all]{siunitx}     \DeclareSIUnit\gauss{G}     \usepackage[pagestyles]{titlesec}     \usepackage{amsmath}     %\usepackage{empheq}     %%--------tcolorbox setting for the SI Units display---------%%     \newtcolorbox{siunit}{enhanced,       colframe=red!60!black,colback=yellow!50!white,arc=4pt,boxrule=1pt,       drop fuzzy shadow,before=\begin{center},after=\end{center},hbox}     %\tcbset{highlight math style={enhanced,     %  colframe=red!60!black,colback=yellow!50!white,arc=4pt,boxrule=1pt,     %  drop fuzzy shadow}}     \newtcbox{\picturebox}[1][]{nobeforeafter,math upper,tcbox raise base,       enhanced,watermark graphics=example-grid-100x100bp.jpg,% from package mwe       colback=white,frame hidden,boxrule=0pt,arc=10pt,       watermark stretch=1.00,watermark opacity=0.4,#1}     %%--------Chapter and Section headings display------------%%     \makeatletter     \renewcommand{\thechapter}{\Roman{chapter}}     \titleformat{\chapter}[display]     {\bfseries\LARGE\filleft} %\centering doesn't work only \filleft     {\filleft\MakeUppercase{\chaptertitlename} \Huge\thechapter}     {4ex}     {\titlerule     \vspace{2ex}%     \filright}     [\vspace{2ex}     \titlerule]          \renewcommand{\thesection}{\Roman{section}}     \titleformat{\section}     {\Large\bfseries}     {}{1em}{}     \titlespacing{\section}     {-2.15pc}{3.5ex plus .1ex minus .2ex}{1.5ex minus .1ex}          \titlespacing*{\paragraph} {0pt}{3.25ex  plus 1ex minus .2ex}{0.35em}     \makeatletter          \newpagestyle{mystyle}{     \headrule \sethead[\thepage][][\chaptertitlename\ \thechapter. \chaptertitle]     {\sectiontitle}{}{\thepage}}          \begin{document}     \pagestyle{mystyle}     \frontmatter     \begin{titlepage}          \end{titlepage}     \mainmatter     \include{magnetic}     \end{document}       # magnetic.tex:               \chapter{Magnetic Materials}     \section{Introduction}     Magnetic materials have had various applications in ancient and modern society. A magnetic compass made of lodestone (magnetite) was used for navigation since the north pole of a compass point toward the south pole of Earth's magnetic field. In the modern era, magnetism and magnetic materials find applications in various fields.          \section{Origin of Magnetic properties of materials}     Magnetic properties of materials have their origin in :     \begin{enumerate}     \item Permanent magnetic moments of their atoms and$/$or     \item Induced magnetic moments due to the change of motion of the electric charges of the atoms in an external magnetic field.     \end{enumerate}     The magnetic moments of atomic nuclei are generally neglected as they are very small.          \paragraph{Permanent magnetic moment of atoms}is due to the orbital and spin motions of unpaired electrons (i.e., electrons in the incompletely filled valence shell). Electrons in completely filled valence shells have no magnetic moment.(Eg. He, Ne, Ar etc). Some of the important terms in the study of magnetic materials is given below.          \paragraph{Magnetic fields}are generated by movement of electric charges. \textit{\bfseries Magnetic field} is the region of space where moving charges, current carrying elements or other magnetic objects will experience a force.          \paragraph{Magnetic moment}of a magnet is a quantity that determines the force the magnet can exert on electric currents and the torque that a magnetic field will exert on it. A loop of electric current generates a \textit{magnetic dipole field}. \textit{Magnitude} of the magnetic dipole moment is the product of the current and the area of the loop. Magnetic dipole is often represented schematically as an arrow. The head of the arrow is the North pole.\par     \begin{siunit}     SI unit :  Ampere. square metre (\si{\ampere\square\meter})     \end{siunit}          \paragraph{Magnetic Field lines} run from the North pole to the South pole.     \paragraph{Magnetic Flux}The group of magnetic field lines emitted outward from the north pole of a magnet is called \textit{magnetic flux}.\par     \begin{siunit}     SI~unit :  Weber (\si{\weber})     \end{siunit}     One weber is equal to $1$ x $10⁸$ magnetic field lines. Direction of flux at any point in space indicates the direction of force that would be experienced by a North pole placed at that point.          \paragraph{Intensity of Magnetization M}A Material with a net (nonzero) magnetic moment is magnetized. \textit{Intensity of Magnetization M} is the magnetic moment per unit volume within the material.\par     \begin{siunit}     SI unit :  Ampere per metre (\si{\ampere\per\meter})     \end{siunit}     M depends on the following:     \begin{enumerate}     \item Number density of magnetic dipole moments within material.     \item Magnitude of the magnetic dipole moments.     \item The arrangement of the magnetic dipoles within the material and so on.     \end{enumerate}          \paragraph{Magnetization M}in materials mainly arises from spins of unpaired electrons within the material and to a lesser extent from their orbital motion.          \section{Magnetic field}     A \textbf{magnetic field} is a field of force produced by moving electric charges, by electric fields varying with time and by the \textbf{intrinsic} magnetic field of elementary particles due to their spin. Magnetic field is a vector field and is most commonly defined in terms of the Lorentz force that it exerts on moving electric charges. The magnetic field can be visualized as magnetic field lines.\par     There are two separate but closely related fields to which the name 'magnetic field' can refer:     A magnetic \textbf{B} field called \textit{magnetic induction} or \textit{magnetic flux density} \par     %{\centering \tcbox{SI unit :  tesla, T}} %%tcolorbox not properly aligned when using \centering -- thought will complete in a single line     \begin{siunit}     SI unit :  tesla, \si{\tesla}     \end{siunit}     and  a magnetic \textbf{H} field called \textit{magetic field strength} or \textit{magnetizing field}\par     %{\centering \tcbox{SI unit :  Ampere per metre $A.m⁻¹$}}     \begin{siunit}     SI unit :  Ampere per metre (\si{\ampere\per\meter})     \end{siunit}     Magnetic field strength \textbf{H} is measured in \si{\ampere\per\meter}, and magnetic flux density \textbf{B}, measured in \si{\newton\meter\per\ampere}, also called tesla (\si{\tesla}).          \paragraph{Magnetic flux density or magnetic induction B}\textit{Magnetic Flux density} \textbf{B} is the amount of magnetism induced in a body and it is a function of the \textit{magnetizing force} \textbf{H}.     The \textit{magnetic induction}, \textbf{B} is defined as the amount of magnetic flux through a unit area taken perpendicular to the direction of the magnetic flux.     \begin{siunit}     \begin{minipage}{0.75\linewidth}     SI unit  : Weber per metre square (\si{\weber\per\square\meter}) or tesla (\si{\tesla})     \par     CGS unit  : gauss ($\SI{1}{\tesla} = \SI{10000}{\gauss}$)     \end{minipage}     \end{siunit}          \paragraph{Manetic field strength, H}Magnetic field strength \textbf{H} is the amount of magnetizing force. Magnetic field strength is a vector quantity whose magnitude is the strength of a magnetic field at a point in the direction of the magnetic field at that point.     \begin{siunit}     SI~unit  : Ampere~per~metre (\si{\ampere\per\meter})     \end{siunit}          \section{Relation between B and H}     \textit{In free space or outside of a material (i.e., in vacuum) the \textbf{B} and \textbf{H} fields are indistinguishable (they only differ by a multiplicative constant).}     \begin{gather*}     B = \mu_{0}.H \quad \text{(in vaccum)} \\     \mu_{0}         → \text{magnetic permeability of free space (vacuum)}     \end{gather*}     where $\mu_{0} = 4\pi~\text{x}~10⁷ N.A⁻²~(H.m⁻¹)$ \par     Inside magnetic material,  $B = \mu.H = \mu_{0}.H + \mu_{0}.M $ where $\mu$ is the \\ \textit{magnetic permeability of medium}.          \paragraph{Magnetic Permeability $\mu$}refers to the degree of magnetization of a material in response to an applied magnetic field.          \begin{siunit}     SI~unit  : Newton~per~square~Ampere (\si{\newton\per\square\ampere})     \end{siunit}     The relation between $\mu$ and  $\mu₀$ is given by $μ= \mu₀.\mu_r$ where $\mu_r$ is the relative permeability of the medium. $\mu_r  = 1$ for free space (vacuum) and  $\mu_r  > 1$  for magnetic materials. The larger the value of $\mu_r$, the larger will be the degree of magnetization of the material in an external magnetic field.\par     Unlike \textbf{B}, magnetization \textbf{M} only exists inside a magnetic material. \\Therefore, field lines of \textbf{M} begin and end near magnetic poles.\par     Magnetic flux density \textbf{B} inside a magnetic material with intensity of  magnetization \textbf{M} is given by     \begin{align}     B &= \mu.H \notag \\     B &= \mu₀.H + \mu₀.M     \intertext{As $μ= \mu₀.\mu_r$,}     B &= \mu₀.\mu_r.H \notag \\     B &= \mu₀(H + M) \label{eq:2}     \end{align}     Using equation~\eqref{eq:2}, it is obtained that $χ= (M/H) = \mu_r-1$      Notice in the second file, how characters have changed example for (`\mu` and `\chi`) I am using WinEdt 8 and Windows 7 professional


title: How do I turn on page numbering with classicthesis?

text: How do I turn on page numbering with `classicthesis`? I'm using TeXworks, with the pdfLaTeX setting. Here's what I have so far:                \documentclass[10pt,letterpaper]{book}      \usepackage{classicthesis}           \begin{document}      \title{Book Title}      \author{My Name}      \maketitle           \tableofcontents           \chapter{Introduction}      \section{This Document}      This is some text.      \end{document}      Am I doing something wrong, or is there some other command I need to use to turn on page numbering?


title: Creating and importing custom tikz symbol

text: I created a custom symbol switch and I wanted to include it in my block diagram, by using the node command but it failed (compile error). Here is what I did:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{shapes, arrows, fit}     \begin{document}          \newcommand\switch[0] {         \begin{tikzpicture}             \draw (0, 0) -- (1, 0) (1, 1) -- (2, 0) -- (3, 0);             \draw [->, thick] (2, 1) .. controls +(left:5mm) and +(up:5mm) .. (1, 0);         \end{tikzpicture}     }          My symbol is \switch     \end{document}      Any idea is welcome. Thanks in advance. **Edit** I am sorry for the misunderstanding. I meant when I import this symbol in my block diagram, the compile fails: Undefined control sequence. Here is my entire code:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \begin{document}          \newcommand\switch[0] {         \begin{tikzpicture}             \draw (0, 0) -- (1, 0) (1, 1) -- (2, 0) -- (3, 0);             \draw [->, thick] (2, 1) .. controls +(left:5mm) and +(up:5mm) .. (1, 0);         \end{tikzpicture}     }          \tikzstyle{block} = [draw, fill=gray!20, rectangle,          minimum height=2em, minimum width=4em]     \tikzstyle{sum} = [draw, fill=gray!20, circle, node distance=1cm]     \tikzstyle{input} = [coordinate]     \tikzstyle{output} = [coordinate]     \tikzstyle{pinstyle} = [pin edge={to-,thin,black}]     \tikzstyle{integrator} = [draw, fill = gray!20, rectangle, minimum height = 2.5em, minimum width = 2em]     \tikzstyle{gain} = [draw, fill = gray!20, rectangle, minimum height = 2em, minimum width = 2em]          % The block diagram code is probably more verbose than necessary     \begin{tikzpicture}[auto, node distance=2cm,>=latex']         % We start by placing the blocks         \node [input, name=input] {$\omega_R(z)$};         \node [sum, right of=input] (sum) {};         \node [\switch, right of=sum] (switch1){};         \node [block, right of=sum] (Gc) {$G_c(z)$};         \node [block, right of=Gc, node distance = 2.5cm] (B0) {$B_0(z)$};         \node [block, right of = B0] (Gp) {$G_p(s)$};         %\node [block, right of = Gp] (integrator) {$\frac{1}{s}$};                % node distance=3cm] (B0) {System};         % We draw an edge between the Gc and B0 block to          % calculate the coordinate Mz. We need it to place the measurement block.          \draw [->] (Gc) -- node[name=Mz] {$M(z)$} (B0);         \node [block, right of = B0] (Gp) {$G_p(s)$};         \node [integrator, right of = Gp] (integrator1) {$\frac{1}{s}$};         \node [output, right of = integrator1] (output) {};         \node [integrator, below of = Gp] (s) {$s$};         \node [gain, below of = B0] (gain1) {$\frac{1}{K}$};              % Once the nodes are placed, connecting them is easy.          \draw [draw,->] (input) -- node {$\omega_R(z)$} (sum);         \draw [->] (sum) -- (switch1);         \draw [->] (switch1) -- node {$e(z)$} (Gc);         \draw [->] (B0) -- node {} (Gp);         \draw [->] (Gp) -- node {$\omega(s)$} (integrator1);         \draw [->] (integrator1) -- node [name=y] {$\theta (s)$}(output);         \draw [->] (y) |- (s);         \draw [->] (s) -- node {$rad/s$} (gain1);         \draw [->] (gain1) -| node[pos=0.99] {$-$}              node [near end] {$\omega(z)$ (LSB)} (sum);     \end{tikzpicture}          \end{document}


title: Framed float box, spanning two columns in paracol

text: I'm looking for a simple, framed, float box-environment that has (or can have by construction) a star equivalent (like figure* or table*) so that it may span both columns in the `paracol` environment. An enumeration of what I'm looking for:   1. Simple environment that may contain text,   2. which provides a framed box around that text   3. and has a `*` equivalent (e.g. figure*) for the purpose of spanning two columns in a `paracol` environment. Does such an environment exist? I'm asking this as a means of accomplishing the ultimate goal that motivated two other questions I previously asked:   * Floats Analogue of framed   * tcolorbox Spanning Two Columns in {paracol} Environment


title: Setting a default horizontal spacing value for math mode

text: Is there a way to set a default value for the horizontal spacing in LaTeX math mode? I'm constantly writing               $foo \; bar \; baz$      Where the `\;` macro sets the space that I am happy with. Is there a command I can add to my preamble so that               $foo bar baz$      displays as if those words were interspersed with `\;`?


title: fontspec cannot find fonts on Ubuntu

text: I recently migrated to Ubuntu from Mac OS. I installed TexLive and it works. However, `fontspec` doesn't work, no matter what fonts I use. This goes for fonts native to Ubuntu and fonts that I have installed in `~/.fonts/` myself. I know that these fonts are installed, because I can use them in `LibreOffice`, including those that I have installed myself. However, if I load `fontspec`, I invariably get the error:               *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \oldstylenums with arg. spec. 'm' on line 128.     *************************************************     ) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty     (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty     (/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1enc.def)     (/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmr.fd)kpathsea:make_tex:     Invalid fontname `[lmroman10-regular]', contains '['          ! Font EU1/lmr/m/n/10=[lmroman10-regular]:mapping=tex-text at 10.0pt not loadab     le: Metric (TFM) file or installed font not found.      <to be read again>                     relax      l.100 \fontencoding\encodingdefault\selectfont      A M(non)WE is:               \documentclass[utf8,12pt,letterpaper]{article}     \usepackage{fontspec}     \setmainfont[Ligatures={Common,TeX},Contextuals=NoAlternate]{DejaVuSerif.ttf}     \begin{document}     test     \end{document}      I compile in `xelatex` (this is necessary since I will want to use CJK). I've googled and googled and reinstalled `TexLive` several times, rebooted the system, etc. I'm out of ideas. All help greatly appreciated!


title: How to arbitrarily center these drawings?

text: I have adapted the following to draw lines from the center of a circle out to _n_ equally spaced points on a circle (the _n_ th roots of unity, or the points of an _n_ -gon, or a star graph). I need to be able to freely manipulate **EDIT:four** parameters: 1) the radius of the circle 2) the number _n_ 3) the center of the circle. **EDIT:** **4) the angle of inclination of the star (i.e. ability to rotate star)** With the LaTeX below I am able to do the first two, but I cannot center the circles. I need to be able to have the second circle centered at one of the points of the first circle, and I need to be able to do this _generally_ (i.e. recursively, _n_ -gon after _n_ -gon, basically building rooted trees). (I also need to be able to specify the colors of arbitrary edges and points, as the LaTeX below shows -- I assume that any technique that solves my problem with 3) will not prevent me from doing this). Thanks in advance for your help.               \documentclass[portrait]{article}     \usepackage{tikz}     \usepackage{animate}     \usepackage[top=1in,bottom=1in,right=1in,left=1in]{geometry}     \begin{document}          \begin{tikzpicture}[scale=5.3,cap=round,>=latex]              \foreach \x in {0,60,...,360} {                 % lines from center to point                 \draw[gray] (0cm,0cm) -- (\x:.1cm);                 % dots at each point                 \filldraw[black] (\x:.1cm) circle(0.2pt);                  }          \filldraw[black] (0,0) circle(0.2pt);     \filldraw[red] (0:.1cm) circle(0.2pt);     \draw[red] (0cm,0cm) -- (0:.1cm);                     \end{tikzpicture}               \begin{tikzpicture}[scale=5.3,cap=round,>=latex]              \foreach \x in {0,120,...,360} {                 % lines from center to point                 \draw[gray] (0,0cm) -- (\x:.1cm);                 % dots at each point                 \filldraw[black] (\x:.1cm) circle(0.2pt);         }          \filldraw[black] (0,0) circle(0.2pt);     \filldraw[red] (0:.1cm) circle(0.2pt);     \draw[red] (0cm,0cm) -- (0:.1cm);                     \end{tikzpicture}     \end{document}


title: Footnotes in longtable captions

text: Is there a way to put a footnote in longtable caption?               \documentclass{book}     \usepackage{longtable}          \begin{document}            \begin{longtable}{|c|}         \caption{Table          %    \footnote{Footnote}    % Uncommenting results in error.         } \\            \hline               Something \\         \hline             \end{longtable}          \end{document}


title: Changing "and" to "&" and removing Oxford comma in bibliography

text: I need to change the "and" to "&" and remove the Oxford comma in my bibliography. I saw a solution here for removing the oxford comma that suggests changing the .bst file, but I'd prefer not to do that if possible. It also suggests using `bibstyle=trad-unsrt` option, but I am not using that `bibstyle`. I could not find any suggestions on how to change the "and" to "&," but it is difficult to search for because of the "&." EDIT March 31st, 2014 9:02PM EST: I found out how to remove the penultimate comma in the author list when " _et al_ " is **not** present (thanks @cfr). However, the issue remains when " _et al_ " is present. EDIT March 31st, 2014 10:21 EST: I found out how to change "and" to "&" and incorporated the code to my MWE. Here is an image of my citations as is: Image 1. ![enter image description here](http://i.stack.imgur.com/kI6k6.png) The comma before " _et al_ " in the first citation is the one I'd like to remove. Below is my MWE.               \documentclass [12pt]{article}     \usepackage[     backend=bibtex,     citestyle=numeric,     isbn=false,     bibstyle=authoryear,     maxnames=3, % Max number of names before "et al" starts     minnames=3, % Must show at least three names for citations and bibliography     firstinits=true, % Removes period after first name intial      terseinits=true, % Removes period after first name intial      sorting=none] % List citations in order they appear     {biblatex}          \DeclareFieldFormat[article]{volume}{\textbf{#1}\addcomma\space} % Bolds volume of citation and adds comma after volume     \DeclareFieldFormat{pages}{#1} % No prefix for the "pages" field in the bibliography     \renewcommand*{\revsdnamepunct}{} % Removing the comma after last name in bibliography      \renewcommand*{\revsdnamepunct}{} % Removing the periods after first name intial in bibliography     \renewcommand{\labelnamepunct}{\addspace} % Removes period after year in bibliography     \DeclareFieldFormat[article]{title}{#1}  % Remove quotes from journal title in bibliography     \DeclareNameAlias{sortname}{last-first} % Lists all authors with last name first in bibliography     \renewcommand*{\finalnamedelim}{\addspace\bibstring{and}\space} % Removes comma after penultimate name          \AtBeginBibliography{% Replaces "and" with "&" in bibliography     \renewcommand*{\finalnamedelim}{%     \ifnumgreater{\value{liststop}}{2}{}{}%     \addspace\&\space}%     }          \usepackage{xpatch}          \xpatchbibmacro{name:andothers}{ % Makes the "et al" italicized bibliography     \bibstring{andothers}%     }{%     \bibstring[\emph]{andothers}%     }{}{}          \renewbibmacro{in:}{% Removes "In" from bibliography entries     \ifentrytype{article}{}{%     \printtext{\bibstring{in}\intitlepunct}}}          \defbibenvironment{bibliography}     {\list      {\printfield[labelnumberwidth]{labelnumber}} % Adds numbers to references and wraps the text for each bibliography entry     {\setlength{\labelwidth}{\labelnumberwidth}%      \setlength{\leftmargin}{0pt}%      \setlength{\labelsep}{\biblabelsep}%      \setlength{\itemsep}{\bibitemsep}%      \setlength{\itemindent}{\labelwidth}%      \addtolength{\itemindent}{\labelsep}%      \setlength{\parsep}{\bibparsep}}%      \renewcommand*{\makelabel}[1]{\hss##1}}      {\endlist}      {\item}          \DeclareFieldFormat{labelnumberwidth}{#1.} % Adds a period after each reference number in bibliography          \usepackage{filecontents}     \begin{filecontents*}{test.bib}          @article{author2014,     author = {Author, A. B. and Author, A. B. and Author, A. B.},     journal = {Journal of the happy but frustrated biblatex user},     pages = {1070--1074},     title = {{Biblatex hurts so good}},     volume = {10},     date = {2014}     }     @article{author2013,     author = {Author, A. D. and Author, A. B. and Author, A. B. and Author, A.B},     journal = {Journal of the happy but frustrated biblatex user},     pages = {1070--1074},     title = {{Biblatex hurts so good}},     volume = {10},     date = {2013}     }     \end{filecontents*}          \bibliography{test.bib}          \begin{document}          Be excellent, Dudes \supercite{author2013,author2014}          \printbibliography          \end{document}


title: "Chapter" appearing at the start of every chapter

text: I'm using a template from a website, and every time a new chapter starts, 'Chapter 3' for example appears and its quite absurd. How do I edit this feature out of the code?


title: preview-latex in emacs auctex: empty boxes?

text: _I originally postedthis question directly on the Auctex mailing list but did not receive a response. I'll hopefully get more luck on the TeX Exchange._ I was recently reminded by this post regarding availability of preview-latex. After pressing C-c C-p C-b, I get small empty boxes next to my equations. That is, the png images aren't displayed correctly. I looked into the temporary directories and the png files are indeed created. They're just not being displayed correctly in emacs. Does anyone know how to fix this? After getting that to work, I would also like to set the "font" color in the png files to be green since I have a black background in emacs (currently set to white for testing). How could I modify this? FYI, I am using AucTeX 11.86 with Emacs 23 in Ubuntu 11.04. Also, this error was reproduced with a simple LaTeX file (below), and emacs was started without the init file (loaded AucTeX and preview-latex manually). foo.tex:               \documentclass{article}     \begin{document}     Let $x=1$.  %%     Then     \[     \lim_{x\rightarrow \infty} x^{x}     \]     is undefined.  %%     \end{document}      UPDATE 9/16/2011: Right clicking on the emtpy box, I get an option for "view error". On one of it, the error is:               gs -dOutputFile\=\(_region_.prv/tmp27138kzR/pr1-16.png\) -q -dSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r105.443x105.424     GS>{DELAYSAFER{.setsafe}if}stopped pop/.preview-BP currentpagedevice/BeginPage get dup null eq{pop{pop}bind}if def<</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get 1 ne or{.preview-BP 0 0 0 setrgbcolor clippath fill 1 1 1 setrgbcolor}{pop}ifelse}bind/PageSize[1 1]>>setpagedevice/preview-do{[count 3 roll save]3 1 roll dup length 0 eq{pop}{setpagedevice}{ifelse .runandhide}stopped{handleerror quit}if aload pop restore}bind def [(_region_.prv/tmp27138kzR/preview.ps)(r)file]aload exch dup 0 setfileposition 224768()/SubFileDecode filter cvx .runandhide aload pop dup dup 224768 setfileposition 288()/SubFileDecode filter cvx<<>>preview-do     Error: /typecheck in --setfileposition--     Operand stack:        --nostringval--   (_region_.prv/tmp27138kzR/preview.ps)   (r)   (r)   (r)   226987   226987   226987   226885   226885   226885   226732   226732   226732   226613   226613   226613   226461   226461   226461   226312   226312   226312   226196   226196   226196   226078   226078   226078   225954   225954   225954   225848   225848   225848   225750   225750   225750   225626   225626   225626   225528   225528   225528   225056   225056   225056   224768     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   %loop_continue   --nostringval--   --nostringval--   false   1   %stopped_push   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--     Dictionary stack:        --dict:1163/1684(ro)(G)--   --dict:0/20(G)--   --dict:79/200(L)--     Current allocation mode is local     Current file position is 31     GS<48>      Any thoughts on how to fix this??? Thanks.


title: Automatically avoid more than one node when drawing a path

text: ## Background Andrew Stacey's answer to Automatically connect nodes without overlapping other nodes or connections presents code to make a path avoid a node by going through a corner of that node (instead of through the node itself). In it's current state it only lets you specify _one_ point to go through. I would like to be able to specify several points to be able to avoid several nodes. (In chat I was advised to make a new question for this issue since it's a different question.) Note that I will also be happy with answers not building on Andrew's code. ## Problem Tree diagrams may contain many nodes and it may be hard to draw them so that no path crosses no node. Andrew's code helps to avoid one node but not several. Here follows a minimal example to illustrate what I mean (note that there may be many more nodes in a tree digrams). Given these nodes               \node(a) {\(A\)};     \node(b1) at ($(a)+(1,-0.5)$){\(B_1\)};     \node(b2) at ($(b1)+(0,0.5)$){\(B_2\)};     \node(b3) at ($(b2)+(0,0.5)$){\(B_3\)};     \node(c1) at ($(b1)+(2,0)$){\(C_1\)};     \node(c2) at ($(c1)+(0,0.5)$){\(C_2\)};     \node(c3) at ($(c2)+(0,0.5)$){\(C_3\)};     \node(d) at ($(c2)+(1,0)$){\(D\)};      is there a method to draw a path from `(a)` to `(d)` and specify that the path should avoid `(b2)` but also any other node _without_ manually specifying angles for the path? With Andrew's code I can specify only one node to avoid and although it helps to avoid the node I specify, `(b2)`, the path ends up crossing other nodes (the red paths in the image). I would like to be able to _also_ specify it to avoid `(b1)`, `(b3)`, `(c1)`, `(c2)` and `(c3)` (so that I get a result such as the green paths in the image). ![Example of correct and incorrect paths](http://i.stack.imgur.com/Zu5JX.png) The code to produce the image:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{calc}          \makeatletter     \tikzset{       through point/.style={         to path={%           \pgfextra{%             \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax             \pgfmathsetmacro{\pt@sx}{\pgf@x * 0.03514598035}%             \pgfmathsetmacro{\pt@sy}{\pgf@y * 0.03514598035}%             \tikz@scan@one@point\pgfutil@firstofone#1\relax             \pgfmathsetmacro{\pt@ax}{\pgf@x * 0.03514598035 - \pt@sx}%             \pgfmathsetmacro{\pt@ay}{\pgf@y * 0.03514598035 - \pt@sy}%             \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax             \pgfmathsetmacro{\pt@ex}{\pgf@x * 0.03514598035 - \pt@sx}%             \pgfmathsetmacro{\pt@ey}{\pgf@y * 0.03514598035 - \pt@sy}%             \pgfmathsetmacro{\pt@len}{\pt@ex * \pt@ex + \pt@ey * \pt@ey}%             \pgfmathsetmacro{\pt@t}{(\pt@ax * \pt@ex + \pt@ay * \pt@ey)/\pt@len}%             \pgfmathsetmacro{\pt@t}{(\pt@t > .5 ? 1 - \pt@t : \pt@t)}%             \pgfmathsetmacro{\pt@h}{(\pt@ax * \pt@ey - \pt@ay * \pt@ex)/\pt@len}%             \pgfmathsetmacro{\pt@y}{\pt@h/(3 * \pt@t * (1 - \pt@t))}%           }           (\tikztostart) .. controls +(\pt@t * \pt@ex + \pt@y * \pt@ey, \pt@t * \pt@ey - \pt@y * \pt@ex) and +(-\pt@t * \pt@ex + \pt@y * \pt@ey, -\pt@t * \pt@ey - \pt@y * \pt@ex) .. (\tikztotarget)         }       }     }     \makeatother          \begin{document}          \begin{tikzpicture}     % Nodes     \node(a) {\(A\)};     \node(b1) at ($(a)+(1,-0.5)$){\(B_1\)};     \node(b2) at ($(b1)+(0,0.5)$){\(B_2\)};     \node(b3) at ($(b2)+(0,0.5)$){\(B_3\)};     \node(c1) at ($(b1)+(2,0)$){\(C_1\)};     \node(c2) at ($(c1)+(0,0.5)$){\(C_2\)};     \node(c3) at ($(c2)+(0,0.5)$){\(C_3\)};     \node(d) at ($(c2)+(1,0)$){\(D\)};     % Boundaries     \draw[thick] ($(a)+(-0.2,0.9)$) to ($(d)+(0.2,0.9)$);     \draw[thick] ($(a)+(-0.2,-0.9)$) to ($(d)+(0.2,-0.9)$);     % Andrew's code ends up crossing a node     \draw[->,red] (a) to[through point={(b2.north east)}] (d);     \draw[->,red] (a) to[through point={(b2.north west)}] (d);     \draw[->,red] (a) to[through point={(b2.south west)}] (d);     \draw[->,red] (a) to[through point={(b2.south east)}] (d);     \draw[->,red] (a) to[through point={(b2.north)}] (d);     \draw[->,red] (a) to[through point={(b2.south)}] (d);     % Manually specifying angles to show acceptable results     \draw[->,green] (a) to[out=10,in=120] (d);     \draw[->,green] (a) to[out=15,in=163] (d);     \draw[->,green] (a) to[out=-12,in=196] (d);     \draw[->,green] (a) to[out=-10,in=240] (d);     \end{tikzpicture}          \end{document}


title: How to write a comment/description?

text: ![How to write a comment/description? ](http://i.stack.imgur.com/NtiIS.png) I want to write comment in a document that is written in latex. Please give me any solution to write like this sample document. please


title: Table with text wrapping?

text: Row 1 has one line and centered for each cell. Row 2. Column 1 has two (2) lines. each line centered.   Row 2. Column 2 has one line. centered horizontal and vertical.   Row 2. Column 3 has text wrapping.justified. Row 3 and 4 repeat Row 1.


title: Expansion inside \AtBeginDocument

text: I'd like to expand a macro inside `\AtBeginDocument`, although I guess the concrete macro does not matter.               \documentclass{article}          \makeatletter     \@for\x:=1,2,3\do{%       \AtBeginDocument{\@input@{helper\x .tex}}%     }     \makeatother          \begin{document}     Do something with the definitions from helper1.tex etc.      \end{document}      The file inclusion works without the `\AtBeginDocument{...}`, and of course it does not work with it, as `\x` is not expanded at call time. I have the feeling the right amount of `\expandafter`s in the right places will do the job, but I don't see it.


title: XeTeX: "ß" compiles as "SS", German umlauts work

text: I have a problem with XeLaTeX. Although German umlauts (äöü) work, "ß" compiles to "SS". I use TeX Live 2011 on Debian x64. See this minimal example:               \documentclass{minimal}     \usepackage[T1]{fontenc}     \usepackage[naustrian]{babel}          \begin{document}     Das "`s"' in "`daß"' muß (Achtung, "`muss"' schreibt man normal so) einsam bleiben,     könntest Du auch "`welches"' schreiben.     \end{document}      compiles to > Das „s“ in „daSS“ muSS (Achtung, „muss“ schreibt man normal so) einsam > bleiben, könntest Du auch „welches“ schreiben. (You might think the problem is related to `babel`, but I tried it without `babel` as well - `babel` just makes the quotation marks work right but doesn't harm the "ß").


title: Using tfrupee with texlive in ubuntu 12.04

text: I am using Ubuntu 12.04. I have full TeXlive. I wanted Indian rupee symbol. I downloaded `tfrupee` from CTAN. I did following:               unzip tfrupee.zip       cd tfrupee/       sudo cp -rv fonts/type1/tfrupee/ /usr/share/texmf/fonts/type1/       sudo cp -rv fonts/afm/tfrupee/ /usr/share/texmf/fonts/afm/       sudo cp -rv fonts/tfm/tfrupee/ /usr/share/texmf/fonts/tfm/       sudo cp -rv fonts/map/dvips/tfrupee/ /usr/share/texmf/fonts/map/dvips/       sudo cp -rv fonts/source/tfrupee/ /usr/share/texmf/fonts/source/       sudo cp -rv tex/latex/tfrupee/ /usr/share/texmf/tex/latex/       sudo texhash       sudo updmap-sys --enable Map=tfrupee.map      Now, Kile recognizes `tfrupee` package, but it does not recognize `\rupee` symbol. Please help.


title: How to make the amsxtra \accentedsymbol work with subscripts etc.?

text: The `amsxtra` package provides the `\accentedsymbol` command which typesets the argument and stores the result. This can speed up LaTeX compilation significantly if lots of accents etc. are used frequently. The problem is that `\accentedsymbol` typesets only one size, so you need to have different macros for all math styles. ## Question How can I define a command similar to `\accentedsymbol` that works properly in all math display styles? ## Comments The solution probably involves using `\mathchoice`. Here is a minimal working example that implements a `\mathchoice` solution by hand. Is this the best solution? (Some issues about `\mathchoice` are discussed in the references below.) How can this be automated? Since the goal here is performace, is `\mathchoice` a good option? (The TeXbook warns that it is slow, but since I am only typesetting saved boxes, maybe this is fine. It seems to work well with intermediate sized problems I have tested.)               \documentclass{standalone}     \usepackage{amsxtra}          \accentedsymbol\vkbad{\vec{\mathbf{k}}}          \accentedsymbol\vkD{\displaystyle \vec{\mathbf{k}}}     \accentedsymbol\vkT{\textstyle \vec{\mathbf{k}}}     \accentedsymbol\vkS{\scriptstyle \vec{\mathbf{k}}}     \accentedsymbol\vkSS{\scriptscriptstyle \vec{\mathbf{k}}}     \newcommand{\vk}{\mathchoice{\vkD}{\vkT}{\vkS}{\vkSS}}          \begin{document}     This is bad: $\vkbad = x_{\vkbad}$.  This is good: $\vk = x_{\vk}$.     \end{document}      ![Sample output.](http://i.stack.imgur.com/SUisY.png) ## References   * Is there a test for the different styles inside maths mode?   * Problem with \mathpalette and \mathchoice   * Proper use of \mathchoice


title: Placement of ellipsis

text: Consider the following example:               \documentclass{article}     \begin{document}     $(1-\theta_1) \dots (1-\theta_m)$     \end{document}      ![output](http://i.stack.imgur.com/E36ma.jpg) Isn't the ellipsis supposed to be vertically centered since they indicate multiplication? **Update** I'm now fully convinced that I'm wrong. To everyone with access to The TeXbook, have a look at page 172. `:)`


title: using the multirow package with tex4ht to generate tables in html document

text: I am trying to generate a html document using latex and I am experiencing some minor bug with tex4ht and the multirow package (I am working with MikTex 2.9 and WinEdt 7). It appears that the "multirowed" items are not vertically centered on the htlm output while this is the case when using PDFLatex. Here is a simple example illustrating the issue (taken from the multirow package documentation):               \documentclass[12pt,a4paper,onecolumn]{article}          \usepackage{multirow}          \begin{document}          \newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}}     \begin{tabular}{|c|c|}     \hline     \multirow{4}*{Common g text} & Column g2a\\     & Column g2b \\     & Column g2c \\     & Column g2d \\     \hline     \multirow{3}*{Common g text} & Column g2a\\     \cline{2-2}     & Column g2b \\     \cline{2-2}     & Column g2c \\     \hline     \multirow{4}*{Common g text} & Column g2a\\\cline{2-2}     & Column g2b \\\cline{2-2}     & Column g2c \\\cline{2-2}     & Column g2d \\     \hline     \multirow{4}*{\minitab[c]{Common \\ g text}} & Column g2a\\     & Column g2b \\     & Column g2c \\     & Column g2d \\     \hline     \end{tabular}          \end{document}      the resulting pdf looks good: pdf table but not the html version: html table Has anybody experienced such issue? Thanks!


title: Unusual graphics and caption placement

text: Here is a picture from an Oxford University Press publication, showing two images a small one at the left and a larger one at the right. The unusual part is that the caption of the right image is also placed on the left page. ![example layout](http://i.stack.imgur.com/Yn4KB.jpg) I am sure there might be another way and I tried a couple, but in order to achieve the layout, I placed the captions using the header of the left page. There are two issues that concern me.   1. First is to ensure that no more than one image floats on the left page (otherwise the captions will all go amiss). To try and prevent it I have set, the `\topnumber=1`. I would however like to have this one changed later on. At what point will it be safe to change it?   2. Adding the images to the List of Figures (can't use normal techniques) since both captions appear on the same page, but the images on different pages.  My aim is to have a fully automated solution without any author intervention other than to type the relevant two-image macro `\doubletakeimage{matron}{stuartpearson}`. The MWE is simplified a bit, as I took out the width and height calculations as well as additional formatting commands. Also the captions are currently fixed for ease of readability and specified in the `ps@caption` command.               \documentclass{book}     \makeatletter     \usepackage[showframe=true]{geometry}          \newgeometry{left=74.8mm,top=27.4mm,headsep=2\baselineskip,%     marginparsep=8.2mm,marginparwidth=49.4mm,textheight=49\baselineskip,headheight=\baselineskip}     \@twosidefalse \@mparswitchfalse % one side option     \reversemarginpar                      %% Stick the caption in the head might as well place the first picture also?     \def\asidecaption{\parbox{4.2cm}{{\bfseries Image \thefigure}\par\lorem}%           }     \def\ps@caption{%          \let\@oddfoot\@empty\let\@evenfoot\@empty%         \def\@evenhead{%             \begin{picture}(0,0)%                 \refstepcounter{figure}                \put(-150,-80){\asidecaption\par}%                 \refstepcounter{figure}                \put(-150,-370){\asidecaption}%             \end{picture}%           }%         \let\@oddhead\@evenhead%         \let\@mkboth\@gobbletwo%         \let\chaptermark\@gobble%         \let\sectionmark\@gobble%      }     \def\doubletakeimage#1#2{%       \renewcommand{\topfraction}{.95}  % ensure seecond image will not float away       \begin{figure}[t]         \thispagestyle{caption}         \includegraphics[width=\textwidth]{#1}%       \end{figure}       \begin{figure}[tp]        \hspace*{-\marginparwidth}\includegraphics[height=0.9\textheight]{#2}      \end{figure}     }     \newcommand\lorem{Fusce adipiscing justo nec ante. Nullam in enim.      Pellentesque felis orci, sagittis ac, malesuada et, facilisis in,      ligula. Nunc non magna sit amet mi aliquam dictum. In mi. Curabitur      sollicitudin justo sed quam et quadd. \par}          \usepackage{graphicx}     \usepackage{lipsum}     \graphicspath{{chapters/}}          \renewcommand{\topfraction}{.95}     \renewcommand{\bottomfraction}{.7}     \renewcommand{\textfraction}{.04}     \renewcommand{\floatpagefraction}{.92} % have a high one don't encourage it     \setcounter{topnumber}{1}     \setcounter{bottomnumber}{0}     \setcounter{totalnumber}{3}     \begin{document}          \doubletakeimage{matron}{stuartpearson}     \lipsum[1-4]     \doubletakeimage{matron}{stuartpearson}     \lipsum[1-4]     \end{document}      Any suggestions to alternatives and improvements in the coding are welcomed and appreciated.


title: Table and Longtable environments reproduce different spacing in LOT

text: I have been using the table and longtable commands quite a lot for my thesis, and I've observed they reproduce different spaces in the list of tables. Here is the MWE:               \documentclass[reqno,12pt,oneside]{report} % right-side equation numbering, 12 point font, print one-sided           \usepackage{csm}             \usepackage{amsmath}     \usepackage{tabu}     \usepackage{longtable}     \usepackage{booktabs, multicol, multirow}     \usepackage{setspace}    % Allows you to specify the line spacing     \onehalfspacing           % \onehalfspacing for 1.5 spacing, \doublespacing for 2.0 spacing.          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}               % Table of contents, list of figures, etc.     \tableofcontents     % Required     \listoftables        % Required if there is more than one table          \startthechapters          \chapter{Examples of using table option}     Here are tables produced by table and tabular commands.      \begin{table}[!h]     \centering     \caption{Tabular table}     \vspace{1em}         \begin{tabular}{ | l | l | l | p{5cm} |}         \hline         Day & Min Temp & Max Temp & Summary \\ \hline         Monday & 11C & 22C & A clear day with lots of sunshine.           However, the strong breeze will bring down the temperatures. \\ \hline         Tuesday & 9C & 19C & Cloudy with rain, across many northern regions. Clear spells         across most of Scotland and Northern Ireland,         but rain reaching the far northwest. \\ \hline         Wednesday & 10C & 21C & Rain will still linger for the morning.         Conditions will improve by early afternoon and continue         throughout the evening. \\         \hline         \end{tabular}     \end{table}          \begin{table}[!h]     \centering     \caption{Colored rows}     \vspace{10pt}     \begin{tabular}{lll}     odd     & odd   & odd \\     even    & even  & even\\     odd     & odd   & odd \\     even    & even  & even\\     \end{tabular}     \end{table}          \chapter{Examples of using longtable option}          \begin{longtabu}{ll}     \caption{Longtabu table} \\      Longtable & Longtable \\     Longtable & Longtable \\     Longtable & Longtable \\     Longtable & Longtable \\     Longtable & Longtable \\     \end{longtabu}          \begin{longtable}{ll}     \caption{Longtable example} \\      \toprule     Longtable & Longtable \\     Longtable & Longtable \\     Longtable & Longtable \\     Longtable & Longtable \\     Longtable & Longtable \\     \end{longtable}          \begin{table}[!h]     \centering     \caption{Here again tabular environment}     \vspace{10pt}     \begin{tabular}{lll}     odd     & odd   & odd \\     even    & even  & even\\     odd     & odd   & odd \\     even    & even  & even\\     \end{tabular}     \end{table}      W     Look at the list of tables. When the longtable or longtabu commands are used, they create the less space between the entries. It is desirable for me to have spaces as in the \textbf{table environment}.      \end{document}      The style I'm using is the Rackham style modified for my school's requirement. It is called the 'csm' style, so the file should be saved as 'csm.sty'. Below I'm posting the 'csm.sty' file itself.               % This is an option style (substyle) for writing a dissertation     % in the Rackham required format using reportx.sty.  -- jin ji, 1/88     % Modified on 05/19/88, jj.     % Modified on 12/13/88, for "CHAPTER" in toc and \@makecaption, jj.     % Modified on 01/08/89, for sections in loa (look for \@sect), jj.     % Modified on 89/11/29  by tex     %          Removed the last three lines of file which consisted of     %          <blank line>     %          % Get something else     %          \input indent     % Modified on 07/24/1992 by Roque D. Oliveira.     %          \startappendices was modified to work     %          with the New Font Selection Scheme.     %          Further (similar) changes may be needed for other macros.     % Modified Sep. 2008 by Jason Gilbert: Obsolete code removed or updated to      %          better conform to LaTeX2e, list of abbreviations added,      %          made copyright page cleaner, fixed Appendices, Bibliography,      %          margins, title page, frontispiece, bottom-center page numbers,     %          two-side printing, added in-dissertation abstract and abstract     %          that prints separately at the end.          \typeout{  }     \typeout{Substyle `rac' for Rackham dissertation.}     \typeout{  }          %-- Page styles --          \def\ps@chappage{% The first page of each chapter has bottom-center page numbers -jj.      \def\@oddhead{}      \def\@oddfoot{\hfil \rm \thepage \hfil}      \let\@evenhead\@oddhead       \let\@evenfoot\@oddfoot     }          \def\ps@plain{%     % \def\@oddhead{\hfil \rm \thepage \hfil} % These two lines of code make top-center page numbers on other pages -jg     % \def\@oddfoot{}      \def\@oddhead{} % These two lines of code make bottom-center page numbers on other pages -jg      \def\@oddfoot{\hfil \rm \thepage \hfil}      \let\@evenhead\@oddhead       \let\@evenfoot\@oddfoot     }          %-- Margins --     \if@twoside \oddsidemargin 0.5in \evensidemargin 0in \marginparwidth .6in \textheight=8.95in     \else \oddsidemargin 0.5in \marginparwidth .9in \textheight=9.0in\fi% left margin=1in + oddsidemargin, marginparwidth: text box for margin notes     \topmargin -0.65in \headheight 0.35in \headsep 0.35in \footskip 0.5in % header and footer margins     \textwidth=6.0in % width of the text body on a page     % The top margin = 1in plus vspace. For some reason, need to subtract 0.35in also. -jg     \def\vertadjust{\vspace{-0.35in}} % Required for proper vertical spacing. -jg     \def\twoinmar{\vertadjust\vspace{0.25in}} % Two inch top margin -jg     \def\twohalfinmar{\vertadjust\vspace{1.5in}} % Two and a half inch top margin -jg               %-- Front pages --          % jj: This \ttlpg is the same as \titlepage in report.sty.     \def\ttlpg{\@restonecolfalse \if@twocolumn \@restonecoltrue \onecolumn      \else \newpage \fi \thispagestyle{empty} \c@page \z@}          \def\titlepage#1#2{      \ttlpg      \begin{singlespace}      \hbox{ }      \twohalfinmar      \begin{center}      \begin{onehalfspacing} % For the `Large' font size, this will look single spaced. -jg     \vspace{2in}         {\Large\MakeUppercase{#1} \mbox{}} \\      \end{onehalfspacing}       \vfill       by \\       \vspace{2ex} % ex is the height of the lowercase 'x' for the current font. -jg       #2 \\           \end{center}           \end{singlespace}     }          \def\initializefrontsections{           \setcounter{page}{1}   % -- begins with "ii"      \pagestyle{chappage}   % -- numbers at bottom      \renewcommand{\thepage}{\roman{page}}   % roman numeral     }          \def\frontispiece{      \ttlpg      \hbox{ }      \if@twoside \clearpage\hbox{}\thispagestyle{empty} \fi      \twoinmar     }               %-- Table of contents and lists --          \def\dotfill{\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfill}     \def\producetableofcontents{\tableofcontents}     \def\producelistoffigures{\listoffigures}     \def\producelistoftables{\listoftables}     \def\producelistofmaps{\listofmaps}     \def\producelistofappendices{\listofappendices}     \def\producelistofabbreviations{\listofabbreviations}          % jj: The only difference is \dotfill instead of \hfil.     \def\l@chapter#1#2{\pagebreak[3]      \vskip 1.0em plus 1pt \@tempdima 1.5em \begingroup % em is the width of capital M for the current font.      \parindent \z@ \rightskip \@pnumwidth      \parfillskip -\@pnumwidth      {\leavevmode #1}\dotfill \hbox to\@pnumwidth{\hss #2}\par      \endgroup     }          \def\l@chap{\@dottedtocline{1}{1.0em}{1.5em}}     \def\l@section{\@dottedtocline{2}{2.5em}{3.0em}}     \def\l@subsection{\@dottedtocline{3}{5.5em}{3.0em}}     \def\l@subsubsection{\@dottedtocline{4}{8.5em}{3.0em}}          \setcounter{tocdepth}{3} % Number of section layers to show in TOC (i.e. section, subsection, subsubsection)     \setcounter{secnumdepth}{3} % Number of subsection layers to allow in document          \def\l@figure{\@dottedtocline{1}{1.0em}{3.5em}}     \let\l@table\l@figure     \let\l@map\l@figure     \let\l@anything\l@figure     \def\l@appendix{\@dottedtocline{1}{1.0em}{2.5em}}     \let\l@abbreviation\l@figure          \def\tableofcontents{%      \newpage      \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn\fi      \hbox{ }      \twoinmar      \centerline{\large\bf TABLE OF CONTENTS}      \vspace{0.25in}      \begin{onehalfspace}       \@starttoc{toc}\if@restonecol\twocolumn\fi      \end{onehalfspace}      }          \def\listoffigures{%      \newpage      \addcontentsline{toc}{chapter}{LIST OF FIGURES}      \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn\fi      \hbox{ }      \twoinmar      \centerline{\large\bf LIST OF FIGURES}      \vspace{0.25in}      \begin{singlespace}       \@starttoc{lof}\if@restonecol\twocolumn\fi       \addtocontents{lof}{\noindent\underline{\bf Figure}\hfill\rm\protect\newline}      \end{singlespace}     }          \def\listoftables{%      \newpage      \addcontentsline{toc}{chapter}{LIST OF TABLES}      \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn\fi      \hbox{ }      \twoinmar      \centerline{\large\bf LIST OF TABLES}      \vspace{0.25in}      \begin{singlespace}       \@starttoc{lot}\if@restonecol\twocolumn\fi       \addtocontents{lot}{\noindent\underline{\bf Table}\hfill\rm\protect\newline}      \end{singlespace}     }          %-- Start chapters --          \def\thechapter {\@arabic\c@chapter}     \def\thesection {\@arabic\c@chapter.\@arabic\c@section}     \def\thefigure {\@arabic\c@chapter.\@arabic\c@figure}     \def\thetable {\@arabic\c@chapter.\@arabic\c@table}     \def\theequation {\@arabic\c@chapter.\@arabic\c@equation}          \newcounter{map}[chapter]     \def\themap{\@arabic\c@chapter.\@arabic\c@map}     \def\fps@map{tbp}     \def\ftype@map{1}     \def\ext@map{lom}     \def\fnum@map{Map \themap}     \def\map{\@float{map}}     \let\endmap\end@float     \@namedef{map*}{\@dblfloat{map}}     \@namedef{endmap*}{\end@dblfloat}          \def\startthechapters{%      \def\@chapapp{CHAPTER}      \addtocontents{toc}{\protect\mbox{ }\protect\newline\noindent{CHAPTER}\protect\newline}      \addtocontents{toc}{\hbox{ }}      \clearpage % This has to be before the rest.      \if@twoside \ifodd\c@page \else \ttlpg \hbox{ }\fi\fi % For two-sided printing, make sure Chapter I starts on right-hand page. jg      \clearpage      \setcounter{chapter}{0}      \setcounter{page}{1} % -- ...always begin with ii.      \renewcommand{\thepage}{\arabic{page}}      \pagestyle{plain}      \def\tocname{toc}     }          \def\@chapter[#1]#2{%      \ifnum \c@secnumdepth >\m@ne       \refstepcounter{chapter}       \typeout{\@chapapp\space\thechapter.}       \addtocontents{toc}{\hbox{ }}       \addcontentsline{toc}{chap}{\protect\numberline{\hbox{ }\hfill\thechapter.\hspace{5pt}}{\MakeUppercase{#1}}}       \addtocontents{toc}{\hbox{ }}      \else       \addtocontents{toc}{\hbox{ }}       \addcontentsline{toc}{chap}{#1}       \addtocontents{toc}{\hbox{ }}      \fi      \if@twocolumn \@topnewpage[\@makechapterhead{#2}]      \else \@makechapterhead{#2} \@afterheading \fi     }          \def\@makechapterhead#1{%      \hbox{ }      \twoinmar      {\parindent 0pt \raggedright       \ifnum \c@secnumdepth >\m@ne       \centerline{\large\bf \@chapapp{} \thechapter} \par       \vskip 0in \fi       \begin{center}        \centerline{\MakeUppercase{\large\bf #1}}        %\large\bf #1       \end{center}       \nobreak      }      \@afterindenttrue     }          \def\section{\@startsection{section}{1}{\z@}{3.25ex plus 1ex minus      .2ex}{2.3ex plus .2ex}{\normalsize\bf}}     \def\subsection{\@startsection{subsection}{2}{\z@}{3.25ex plus 1ex minus      .2ex}{1.3ex plus .2ex}{\normalsize\bf}}     \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{3.25ex plus      1ex minus .2ex}{1.3ex plus .2ex}{\normalsize\bf}}          \long\def\@caption#1[#2]#3{%      \addtocontents{\csname ext@#1\endcsname}{\hbox{ }}      \addcontentsline{\csname ext@#1\endcsname}{#1}{\protect\numberline{\csname       the#1\endcsname}{\ignorespaces\protect\small\protect\normalsize\rm #2}}      \par      \begingroup       \@parboxrestore       \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces\protect\small\normalsize\rm #3}       \par      \endgroup     }          \long\def\@makecaption#1#2{      \vskip 10pt      \setbox\@tempboxa\hbox{#1: #2}      \ifdim \wd\@tempboxa >\hsize       \setbox\@tempboxa\hbox{#1: }       \def\@tempdimj{\hsize}       \advance\@tempdimj -\wd\@tempboxa       \hbox to\hsize{#1: \parbox[t]{\@tempdimj}{#2}}      \else \hbox to\hsize{\hfill\box\@tempboxa\hfill}      \fi}          %-- Appendices and bibliography --          \def\startappendices{\par      \def\thechapter {\Alph{chapter}}      \def\theappendix{\Alph{chapter}}      \def\thesection{\theappendix.\arabic{section}}      \def\theequation{{\rm \theappendix}.\arabic{equation}}      \def\thefigure{{\rm \theappendix}.\@arabic\c@figure}      \def\thetable{{\rm \theappendix}.\@arabic\c@table}      \def\themap{{\rm \theappendix}.\@arabic\c@map}           \setcounter{chapter}{0}      \setcounter{section}{0}      \def\@chapapp{APPENDIX}      \pagestyle{plain}      \clearpage      \hbox{}      \if@twoside \ifodd\c@page \else\thispagestyle{empty} \clearpage\hbox{}\fi\fi      \thispagestyle{chappage}      \addcontentsline{toc}{chapter}{APPENDIX}      \hbox{ }      \vertadjust      \vfill      \centerline{\large\bf APPENDICES} % The half title page      \vfill     }      So my question is: why are there different spaces in the list of tables as shown in the following figure? ![list of tables](http://i.stack.imgur.com/sz34X.png) I appreciate your help.


title: Hline and Cline in multirow/multicolumn environment

text: Why when I using using multirow and multicolumn, my horizontal line does not appear? This is my MWE:               \documentclass[parskip]{scrartcl}     \usepackage[margin=15mm]{geometry}          \usepackage{multirow}     \begin{document}     \begin{table}     \begin{tabular}{c|c|c|c|c|c|c}     \multirow{2}{*}{Iterasi} & \multicolumn{3}{c}{ Ketinggian rata-rata (\%)}& \multicolumn{3}{c}{Luas Sebaran (\%)} \\      \cline{2-6}     \end{tabular}     \caption{Test}     \label{tabel  stiffness}     \end{table}     \end{document}


title: Should I place \title, \author, \date in the preamble or after \begin{document}?

text: ## The motivation for this question Forgive me if this looks very basic to you but nobody has pointed out to me yet until now in a comment to a question that the `\title` command (and thus the other two metadata commands `\author` and `\date`) should be placed in the preamble. My practice up to this point is to write them after `\begin{document}`. In titling's \thetitle, \theauthor and \thedate don't work and Best practice on organising your preamble, user doncherry mentioned to write them _"towards the end"_ of the preamble. I consulted lshort again and it seems to go towards putting these in the preamble. Here is an example code taken from lshort (page 8 in the English version).               \documentclass[a4paper,11pt]{article}     % define the title     \author{H.~Partl}     \title{Minimalism}     \begin{document}     % generates the title     \maketitle     % insert the table of contents     \tableofcontents     \section{Some Interesting Words}     Well, and here begins my lovely article.     \section{Good Bye World}     \ldots{} and here it ends.     \end{document}      However, in some on-line tutorials like this one, they are written after `\begin{document}`. ## The question: _What is the standard practice and are there advantages or disadvantages to each of these usage?_ I am aware, for example, of the answers in the above-mentioned posts; but apart from these, are there more things to consider? For one, I don't get compile errors or warnings in most cases. Although I can't remember when I had such compile errors when these commands are written elsewhere where they are not intended to be written.


title: Creative Commons logo

text: I have found the `ccicons` package to typeset Creative Commons logos, but I'm wondering if there is a package that typesets logos like this one: ![CC-BY-NC-ND](http://i.stack.imgur.com/BMymb.png) If not, how would you do that in TiKz or graphicx? **Edit:** I got the svg version of the logo, converted it to PDF with Inkscape, and I'm using the following line:               \includegraphics[width=4em]{by-nc-nd.eu.pdf}      When I build with `xelatex`, I get:               ! Unable to load picture or PDF file 'by-nc-nd.eu.pdf'.     <to be read again>                         }     l.12 ...ncludegraphics[width=4em]{by-nc-nd.eu.pdf}


title: How to get rid of the default page numbering when using `fancyhdr`

text: I want to put my page numbering at the right bottom by using `\rfoot` in `fancyhdr`, but everytime I use it, the default page numbering appears at the central bottom which makes the page having two page numbering at a time. Does anybody know how to fix it?


title: Moving the common angle to \pstVerb produces incorrect result

text: Consider the following complete code first.               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pstricks-add}          \begin{document}     \begin{pspicture}(-5,-5)(5,5)         \def\points{(0,0)(1,0)}%         \pstVerb{/Angles 0 def /CPX 1 def /CPY 0 def}         \multido{\i=1+1}{15}         {             \xdef\points{\points(!1 Angles 1 \i\space 1 sub sqrt atan add dup /Angles ED PtoC %             dup CPY add /CPY ED exch dup CPX add /CPX ED exch)(!CPX neg CPY neg)(!CPX CPY)}         }         \expandafter\psrline\points     \end{pspicture}          \begin{pspicture}(-5,-5)(5,5)         \def\points{(0,0)(1,0)}%         \pstVerb{/Angles 0 def /CPX 1 def /CPY 0 def}         \multido{\i=1+1}{15}         {             \pstVerb{Angles 1 \i\space 1 sub sqrt atan add /Angles exch def}%             \xdef\points{\points(!1 Angles PtoC %             dup CPY add /CPY ED exch dup CPX add /CPX ED exch)(!CPX neg CPY neg)(!CPX CPY)}         }         \expandafter\psrline\points     \end{pspicture}     \end{document}      It produces two outputs as follows. ![enter image description here](http://i.stack.imgur.com/t7tUp.png) ![enter image description here](http://i.stack.imgur.com/oQf9Q.png) ## Explanation When I move the definition of `Angles` from               xdef\points{\points(!1 Angles 1 \i\space 1 sub sqrt atan add dup /Angles ED PtoC %                 dup CPY add /CPY ED exch dup CPX add /CPX ED exch)(!CPX neg CPY neg)(!CPX CPY)}      to               \pstVerb{Angles 1 \i\space 1 sub sqrt atan add /Angles exch def}      why does the output become incorrect?


title: Is there a \show for catcodes?

text: In the course of attempting to out-pedant another mathematician, I wanted to `\show` the catcode of `$` to convince myself that it was a "special" character in ordinary TeX as well as LaTeX. I was just using a "dumb tex" session (that is, I invoked `tex` from the commandline with no file) so what I wanted was to be able to type:               \showcatcode$      but that didn't work. In the end, I did               \count255=\catcode`$     \showthe\count255      but that _just doesn't smell right_. What's the best way to `\show` the catcode of a token? (To be clear, the result of a `\showcatcode` should go to the terminal and the log, not in the document itself.)


title: Mutually overlapping opaque arrows

text: I have drawn a circle with two arrow shapes on top of it, and now I want the arrows to be mutually overlapping, i.e. the blue arrow's head should be above the red arrow's tail (which it is), and the red arrow's head should be above the blue arrow's tail (which it isn't). How can I achieve this? MWE:               \documentclass{minimal}          \usepackage{tikz}     \usetikzlibrary{arrows.meta}     \usetikzlibrary{shapes.arrows}          \tikzset{mainstyle/.style={circle,draw,fill=gray!40,minimum size=20}}     \tikzset{spinarrow/.style={single arrow,draw,opacity=0.8,minimum height=2cm,minimum width=0.5cm,scale=0.6}}          \begin{document}          \begin{tikzpicture}       \node[mainstyle] (a) at (0,0) {\(x\)};            \foreach \angle in {20,40,...,360}       {         \draw [black,arrows={-latex[black]}] (a.\angle) -- +(\angle:1cm);       }            \node [spinarrow,fill=red!50,shape border rotate=90] at (-0.2,0) {\(+\)};       \node [spinarrow,fill=blue!50,shape border rotate=270] at (0.2,0) {\(-\)};          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/7SnwS.png)


title: Easily change behavior of \DeclarePairedDelimiter

text: After seeing the answer to this question I realized that I preferred the way of working of Juan A. Navarro's answer:   * I.e., `\DeclarePairedDelimiter{\parens}{\lparen}{\rparen}` from `mathtools` is a great tool, it gives you      * `\parens{…}` which doesn't adjust the height,     * `\parens*{…}`, which automatically adjusts the height,     * and i.e., `\parens[\bigg]{…}`, which result in the size you specified.   * `\newdelimcommand{\parens}{\lparen}{\rparen}` from the answer I linked results in      * `\parens{…}` which automatically adjusts the height,     * `\parens*{…}`, which doesn't adjust the height,     * and i.e., `\parens[bigg]{…}`, which result in the size you specified. I prefer the second way of working than `mathtools`. But, the spacing you get is wrong (like if you were using `\left(` instead of `\biggl(`). I tried using `\usepackage{mleftright} \mleftright` before the code from Juan A. Navarro, but it didn't work. So my question is ## How could I get the style of the answer I linked but with correct spacing (like mathtools)? May be it is easier to exchange the behavior in `mathtools` starred and unstarred (plus the `bigg` instead of `\bigg`), or may be it's easier to rewrite Juan A. Navarro's code. **EDIT:** Well, reading I got here, and then here. Were the last absolutely answers my question except that the starred version doesn't work. Here is the code:               \documentclass{scrartcl}     \usepackage{mathtools}     \usepackage{etextools}     \usepackage{ifthen}          \makeatletter         \newcommand{\DeclarePairedDelimiterCase}[2]{%             \newcommand#1[1][]{%                 \ifthenelse{\equal{##1}{normal}}%                 {#2}%                 {%                     \ifthenelse{\equal{##1}{big}\OR\equal{##1}{Big}\OR\equal{##1}{bigg}\OR\equal{##1}{Bigg}}%                     {\expandnext{#2[}{\csname##1\endcsname}]}%                     {#2*}%        % standard case using \left and \right                 }%             }%         }         \newcommand{\DeclarePairedDelimiterY}[4][Temp]{%             \expandafter\DeclarePairedDelimiter\csname#2#1\endcsname{#3}{#4}%             \expandnext{\expandnext{\DeclarePairedDelimiterCase}{\csname#2\endcsname}}{\csname#2#1\endcsname}%         }         \newcommand{\DeclarePairedDelimiterXY}[6][Temp]{%             \expandafter\DeclarePairedDelimiterX\csname#2#1\endcsname[#3]{#4}{#5}{#6}%             \expandnext{\expandnext{\DeclarePairedDelimiterCase}{\csname#2\endcsname}}{\csname#2#1\endcsname}%         }     \makeatother     \DeclarePairedDelimiterY{set}{\lbrace}{\rbrace}     \DeclarePairedDelimiter{\pa}{\lparen}{\rparen}          \begin{document}          \begin{align*}         \liminf \set*{\sum}     \end{align*}          \end{document}      And then I get `lim inf{*}∑` instead of what I want `lim inf{∑}`. **EDIT2:** I realized that the one I used before had some extra options I do need:   * `\parens{…}` and `\parens[auto]{…}` should be autosize.   * `\parens*{…}` and `\parens[base]{…}` should be the basic ones (without scaling).   * The rest as I described before `\parens[bigg]{…}`, etc. to manually scale.


title: XeLaTeX forces readers to rotate their heads 90 degrees

text: My document contains some landscaped pages using `lscape` package. When I compile the input file using `latex-dvips-ps2pdf`, the landscaped pages are automatically rotated so readers don't need to rotate their heads 90 degrees.               \documentclass{article}     \usepackage{lscape}     \usepackage{blindtext}     \usepackage[english]{babel}     \begin{document}     \blindtext     \begin{landscape}     \blindtext     \end{landscape}     \blindtext     \end{document}      ## Output using latex-dvips-ps2pdf ![enter image description here](http://i.stack.imgur.com/Hs1Hg.png) However, when the input file is compiled by `xelatex`, the landscaped pages are no longer automatically rotated, so we need to rotate our heads. ## Output using xelatex ![enter image description here](http://i.stack.imgur.com/9jCI4.png) There is a statement in `lscape` documentation as follows, > I've made a minor improvement to lscape.dtx that I'd like to share with the > world. My addition makes lscape rotate the PDF "paper" { not just the text > on the page { when given the "pdftex" option. (Naturally, this works only > with pdfLaTeX.) The result is that the text is viewable online without the > reader having to rotate his/her head 90 degrees. The document still prints > normally. but when I use `\usepackage[pdftex]{lscape}`, the compilation fails. Any idea to fix it?


title: babel's \foreignlanguage works for Russian, but not for Serbian

text: I was trying to write the Serbian alphabet using:               \usepackage[serbian, english]{babel}     ...     \foreignlanguage{serbian}{D d}      But I get nothing. When I try this with e.g:               \usepackage[russian, english]{babel}     ...     \foreignlanguage{russian}{D d}      I get the correct character. So for the Serbian alphabet, this is fine until I get to the letters <Џ џ/Dž dž> and <Ћ ћ/Ć ć>. Why don't I get any character when I use Serbian, but I do when I use Russian?


title: newcommand vs. DeclareMathOperator

text: As far as I understand, whatever can be done using `DeclareMathOperator` can also be achieved using `newcommand`, but not the other way around. If this is the case, what are the circumstances where `DeclareMathOperator` is the better choice? When should I take solely `newcommand`? I found a question regarding arguments and `DeclareMathOperator`, and I wonder what other aspects should be taken into consideration when it comes to choosing which method to use when defining math operators.


title: Why is a minipage using \textwidth generating an overfull hbox?

text: In the following example, I'm using a `minipage` that should span the entire text area.               \documentclass[parskip]{scrartcl}          \setlength{\overfullrule}{10pt}          \begin{document}           before before before before before before before before before before before before before before before before before     before before before before before before before before before before before before before before before before before     before before before before before before before before before before before before before before before before before          \begin{minipage}[t]{\textwidth}     inside inside inside inside inside inside inside inside inside inside inside inside inside inside inside inside inside     inside inside inside inside inside inside inside inside inside inside inside inside inside inside inside inside inside     inside inside inside inside inside inside inside inside inside inside inside inside inside inside inside inside inside     \end{minipage}          after after after after after after after after after after after after after after after after after after after after     after after after after after after after after after after after after after after after after after after after after     after after after after after after after after after after after after after after after after after after after after           \end{document}      While this works, it also generates a warning (`Overfull \hbox (10.95003pt too wide) in paragraph at lines 11--16`). ![problem](http://i.stack.imgur.com/0uKgN.png) There are already numerous answers to similar problems, but none of the solutions I've tried so far seem to apply here. I'm using the `parsnip` option, so I understand that adding `\noindent` before the minipage environment does not change anything. I've tried to escape virtually any line break using `%`, to no avail. If I reduce the width of the minipage to `0.97\textwidth`, the warning disappears, but the minipage text is visibly narrower than the rest of the surrounding text. What is causing the warning in this case?


title: How to write any text in the others orientation

text: How to turn text orientation in the four diferent positions? ![enter image description here](http://i.stack.imgur.com/mZbqk.png) Any text.


title: Customizing title page in beamer

text: I put the following tikzpicture, borrowed from http://tex.stackexchange.com/a/86310/10898, in my beamer title page. Nevertheless, I would like to try two things. On one hand, put the tikzfigure in an horizontal way with respect to the page, and if posible, in the second case reduce the width of the title colorbox. Any hints in order to proceed???. Your help will be highly appreciated!               \documentclass[8pt,onlymath,usenames,dvipsnames]{beamer}          \usepackage{tikz}                              \definecolor{titlecolor}{RGB}{0,173,239}            \mode<presentation>{         \usetheme{Warsaw}         \usefonttheme{structurebold}         \setbeamerfont{title}{family={\fontfamily{ppl}},series=\bfseries,size=\LARGE,shape=\itshape}              \definecolor{steelblue3}{rgb}{0.31,0.58,0.8}         \colorlet{structure}{steelblue3}         \usecolortheme[named=steelblue3]{structure}              \setbeamercovered{transparent}              \definecolor{skyblue3}{rgb}{0.42,0.65,0.8}          \setbeamercolor{blocks}{fg=black,bg=skyblue3}              \definecolor{purple4}{rgb}{0.33,0.1,0.55}         \setbeamercolor{alerted text}{fg=purple4}              \setbeamertemplate{navigation symbols}{}              \let\Tiny=\tiny         \setbeamersize{text margin left=0.4cm,text margin right=0.4cm}         }          \newcommand\titlepagedecoration{%     \begin{tikzpicture}[scale=.5,remember picture,overlay,shorten >= -10pt]          \coordinate (aux1) at ([yshift=-15pt] current page.north east); %1st two triangles     \coordinate (aux2) at ([yshift=-410pt]current page.north east); %last two triangles     \coordinate (aux3) at ([xshift=-4.5cm]current page.north east); %1st two triangles     \coordinate (aux4) at ([yshift=-150pt]current page.north east);          \begin{scope}[titlecolor!40,line width=6pt,rounded corners=6pt]     \draw       (aux1) -- coordinate (a)       ++(225:5) --       ++(-45:5.1) coordinate (b);     \draw[shorten <= -10pt]       (aux3) --       (a) --       (aux1);     \draw[opacity=0.6,titlecolor,shorten <= -10pt]       (b) --       ++(225:2.2) --       ++(-45:2.2);     \end{scope}     \draw[titlecolor,line width=4pt,rounded corners=4pt,shorten <= -10pt]       (aux4) --       ++(225:0.8) --       ++(-45:0.8);     \begin{scope}[titlecolor!70,line width=2pt,rounded corners=4pt]     \draw[shorten <= -10pt]       (aux2) --       ++(225:3) coordinate[pos=0.45] (c) --       ++(-45:3.1);     \draw       (aux2) --       (c) --       ++(135:2.5) --       ++(45:2.5) --       ++(-45:2.5) coordinate[pos=0.3] (d);        \draw        (d) -- +(45:1);     \end{scope}     \end{tikzpicture}%     }          \vspace*{2.5pt}     \title[Conference-Year]{Title of the presentation}     \vspace*{.8cm}\author[Author]{\textcolor{steelblue3}{\textbf{{\Large Author}}} \\ \vspace{.5cm} }     \date{\textcolor{steelblue3}{\small\bf  Conference\\Place, Month Year}}          \begin{document}          \titlepagedecoration     \begin{frame}[plain]     \vspace*{-1cm}        \begin{columns}        \begin{column}{1.9cm}           \centering         Logo1        \end{column}                  \begin{column}{7cm}         \centering         {\textbf{\textcolor{steelblue3}{Center \\ Institute \\ Department}}}        \end{column}             \begin{column}{2cm}        \centering         Logo2        \end{column}       \end{columns}            \vspace{1cm}      \titlepage     \end{frame}          \end{document}      UPDATED: I tried with the rotating package for my first question but i didn't succeed. While for my second question, i used this code `\setbeamertemplate{title page}[default][rounded=true,shadow=true,wd=0.8\textwidth]` and now the colorbox is shorter, however it is not centered.


title: Start chapters on the left side of the PDF files

text: How is it possible to start each chapter on the left papers (odd pages). Because in Persian books, chapters start on the odd pages because it is a right to left language. I use XePersian and use this class of document: `\LoadClass[a4paper,11pt,twoside,openright]{book}`


title: Using multiple newlines (\\) within LARGE block

text: I am trying to typeset a long title using a `{\LARGE ...}`-Block. Here is a minimal example:               \documentclass{scrbook}          \begin{document}         {\LARGE Very \\ Long \\ Title}     \end{document}      And the output of (latex + dvips + ps2pdf): ![Output of the above example code](http://i.stack.imgur.com/602Es.png) Question: How do I remove the vertical space between the first and the second line? Info: If I use a `{\normalsize...}`-Block the spacing between the lines is as expected (equal vertical space between first and second line and between second and third line.


title: Why does xelatex need fontspec to output non-ASCII characters?

text: I thought the point of XeTeX was to allow Unicode to work out of the box (in addition to leveraging system fonts). So how come the following does not output anything unless I use the fontspec package?               \documentclass{article}     \usepackage{fontspec}  % must be present     \begin{document}     éʡ     \end{document}      The first character is U+00E7 (present in Latin-1) and the second is U+02A1.


title: When I load multiple font packages, which one will win?

text: I haven't used more than one font package. But I noticed some people use multiple font packages. Shortly speaking, which one will win if we load multiple font packages? Is there a rule for loading multiple font packages?


title: Abbreviations in mixed cases in small caps

text: Some guidelines suggest the use of use small caps for abbreviations. I have an issue with the following one: iTRAQ. Here are some guidelines on mixed small- upper case abbreviations. I do want to keep the small-caps version visually as close as possible to the standard one. `iTRAQ`, `i\textsc{traq}`, and `i\kern.07em\textsc{traq}` look like this with the font charter: ![enter image description here](http://i.stack.imgur.com/WQUsD.png) The _i_ in the two capitalized versions is larger than the small-caps afterwards and also _TRAQ_ is lighter than the other text. Is there a good general solution for mixed-case abbreviations? * * * **Update 1**. Charter does not use real small caps, but scales the font, that's why _TRAQ_ is so light. With `kpfonts`, which has true small caps, it looks slightly better, but still strange as the `i` is larger than the caps: ![enter image description here](http://i.stack.imgur.com/oc5aY.png) * * * **Update 2**. Using Barbara Beeton's/tugboat's solution, I am happy with the result (second variant in the image): ![enter image description here](http://i.stack.imgur.com/lNnXB.png) Using `small` in `normalsize` environment, etc., to have fake (or true?) small-caps produces an results which is, for my eyes, visually appealing. The abbreviations are slightly lighter than true small-caps, but I can life with that for the benefit of having an universal solution.


title: \draw via \pgfplotstableforeachcolumnelement fails outside {axis} environment, but works inside?

text: Consider this MWE:               \documentclass{article}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usetikzlibrary{calc}          \pgfplotstableread[col sep=space,row sep=newline,header=true]{     ts   val     0.0  0.0     1.0  1.0     1.1  4.9     2.0  2.0     2.2  4.9     4.8  0.2     }\mytable          \def\drawLines{%       \pgfplotstableforeachcolumnelement{[index]0}\of\mytable\as\cx{%         % \node{I have now cell element ‘\cx’ at row index ‘\pgfplotstablerow’;\par};         \edef\temp{ %           \noexpand\draw[%             draw=black,%             fill=none,%             opacity=0.7,%           ] let \noexpand\p1=({axis cs:\cx,0}), \noexpand\p2=({rel axis cs:0,0}),             \noexpand\p3=({rel axis cs:1,1}) in             (\noexpand\x1,\noexpand\y2) -- (\noexpand\x1,\noexpand\y3)           ; %         }         \temp       }     }          \begin{document}     \begin{tikzpicture}       \begin{axis}[extra x ticks={3.5}]     \addplot[smooth] table {\mytable};     \addplot[only marks,mark=*,mark options={color=blue}] table {\mytable};     \draw[red] let \p1=(rel axis cs:0,0), \p2=(rel axis cs:1,1), \p3=(axis cs:3.5,0)       in (\x3,\y1) -- (\x3,\y2);     \drawLines % passes no problem     \end{axis}     \drawLines % fails w/ "! Missing \endcsname inserted." \pgfcrdmth@x     \end{tikzpicture}     \end{document}      As it is, it will fail with:               ! Missing \endcsname inserted.     <to be read again>                         \pgfcrdmth@x      l.42 \drawLines                     % fails w/ "! Missing \endcsname inserted." \pgfcrdmth@x      ... but if you comment the line, marked with `% fails...` - then the document compiles successfully, and as expected? So obviously, the `\drawLines` function, which calls `\draw` via `\pgfplotstableforeachcolumnelement`, _does_ work - but only from inside an `{axis}`, not outside it? Why does this happen - and how could I get this macro to execute outside of `{axis}`, while still in `{tikzpicture}`? How can I otherwise know, which code can be ran from where? PS: As it is, this looks like Why doesn't a \foreach variable work in \draw in an \axis?, but I'm guessing that question could have been answered with the \edef\temp...\temp thing that I'm using here; which is why this problem puzzles me...


title: side-by-side equations, with equation numbers for each

text: The `align` command from `amsmath` allows me to put two equations side-by- side:               \begin{align}     x = y && a = b     \end{align}      Unfortunately for my purposes, this shows both equations under one equation number:               x = y    a = b   (1)      Is there any way to give them individual numbers, so that the output looks like this?:               x = y (1)    a = b (2)


title: Debug bibtex entries

text: Is there any way to debug bibtex entries (using biblatex) to know if the characteres are valid. I'm getting this error when printing bibliography:               Overfull \hbox (5.59329pt too wide) in paragraph at lines 83--83     \OT1/cmr/m/it/10.95 ting and Net-wor-king\OT1/cmr/m/n/10.95 , ‼ep. Mo-bi-Com '0     4, Phi-la-delp-hia, PA, USA: ACM, 2004, p‼ags. 114[]128,     ! Missing $ inserted.     <inserted text>                 $     l.83 ...ing=none, sorting=none, resetnumbers=true]      And I don't know which entry is causing the error. In biblatex I get some warnings but I don't know how to link the warning with this error. It will be nice to have a verbose for this. Thanks.


title: I need to write extra version for blind people without braille

text: I am writing a small math script and I also need to make version for blind people, but without braille. For example `\frac{1}{2}` shouldn't be literal fraction, but it should be `1 over 2`. Can I override `\frac` command to write it the way I want it? If yes, how to do it? I was told that they are using a software to read them text, but that software can't read `=`, fractions, etc... Thanks!