title: Why is there conflict between bioinfo.cls and \usepackage{multicols}?

text: Why does the behavior listed here occur? Just to recap, the bioinformatics template (available here and elsewhere) leads to overwritten headers when used in conjunction with `\usepackage{multicols}`. Why does this happen? An example of what I am referring to is here: ![enter image description here](http://i.stack.imgur.com/MmNta.png) Note that this example does _not_ contain any usage of the multicol package; its very existence is leading to the conflict. Just to be clear, I am trying to understand this from the perspective of a LaTeX user; this is not imperative to any particular assignment or paper right now. I want to know the answer in the pursuit of getting better at TeX and LaTeX. EDIT: Here is the code for the example above:               \RequirePackage[demo]{graphicx}  % omit 'demo' option from real document     \documentclass{bioinfo}     %\documentclass{article}     \copyrightyear{2014}     \pubyear{2014}     \usepackage{multicol}          \begin{document}     \firstpage{1}          \title[QTL Analysis]{Evaluation of a QTL Dataset}     \author[Robert R. Gotwals]{Robert R. Gotwals\,\footnote{to whom correspondence should be addressed}}     \address{$^{1}$Department of XXXXXXX, Address XXXX etc.}          \history{Received on XXXXX; revised on XXXXX; accepted on XXXXX}     \editor{Gotwals}     \maketitle          \begin{abstract}          Here's the abstract.           \section{Keywords:} first, second, third, fourth          %\section{Contact:} \href{cowbell@ncssm.edu}{gotwals@ncssm.edu}     \end{abstract}          \section{Introduction}     \subsection*{Get funky!}     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore. Figure \ref{thrombin} is a display of thrombin.      It's a long, long story...      My hard drive was nearly full, and the computer wouldn't boot into Windows anymore.     Had a bunch of problems, MFT corruptions, BSODs, disk read errors...     Nothing worked. Then... in February or so, my sister gave me her old computer to use.     My brother removed all the stuff and reformatted it, and then whilst I was sleeping he put my HDD in sister's computer. The computer was now with two HDDs, and working again. (Mine is a MAXTOR and hers a Samsung)     About two days later I was prompted with a BSOD, about software. Looking up on Google (with an old machine) I find a solution but it would mean all my program settings would be deleted, or changed. Didn't care. So I did what was written on the article. Don't remember what happened next, but I know for sure that some programs wouldn't work, or had issues, including the antivirus (avast!), which would give me an error every hour or so.      There wasn't a way to reinstall, it failed. So I just installed Avira. Stayed with it for some time until I noticed the sound was slowing down randomly, and chopping. I updated the audio drivers but it didn't work. Then I tried a number of things, but no luck. I uninstalled Avira (which was also giving me some errors), and the sound kind of improved, but it was still bad.     Whatever...     The Samsung hard drive also kept disappearing, both from Windows and BIOS, so anything stored on it wouldn't be accessible anymore. It would also make the dreaded clicking noise.          \subsection*{What ever }          Now the most recent stuff... and what is bugging me... this Saturday I was playing some games installed on my sister's hard drive. It was all okay until a clicking noise appeared. The game froze. That happened for a while until a BSOD came, which made me turn off the computer. I immediately thought the HDD was horrible and untrusted, or that a cable was loose.     The computer kept giving me a BSOD.     Left it alone for some time.     Midnight comes, I try starting up the computer, and the click strikes again. But this time with my HDD.     The BSOD was either there, or NTLDR failure, or the drive simply wouldn't be recognised.     It was probably dead, and there was nothing I could do to help.     I got to bed.     Waking up, mum says my computer is faster than ever.      That was strange, since it was very slow before. But who cares, the hard drive wasn't dead after all. Or so I thought.     Turns out my brother had formatted the Samsung drive (sister's) without telling me, or asking for permission.     Everything that I had was lost, or at least missing.     I then took a peek and Windows said my drive had:     232 GBs of 232 GBs total.     I am now hopeless. I am pretty sure I lost everything, but perhaps there is a small chance of recovering my data. Never made any backups, since there was no way to. I don't have any external drives with me, and the computers we have available have very small capacity.      It was over 200 GB of data. Everything was important to me. I had thousands and thousands of folders. It would take a long time to search and copy the files.     My mum who knows nothing about computers, told me it might be empty because it's borked. But she also doesn't believe that my stuff is missing.     I can access it fine without any errors. I don't want to put anything there, though, in fears of (hidden) data getting overwritten. All my fault, I'm           \begin{figure}[ht!]     \includegraphics[scale=0.25]{Thrombin.png}     \caption{Thrombin}     \label{thrombin}     \end{figure}          \end{document}


title: xtab error \@sharp -> {\captionsize

text: I started learning `xtab` package. Just for a trial, I wanted to try the code given in the documentation. But it generates the error:                 \@sharp ->{\captionsize \bfseries \tablename \ \thetable{} -- concluded fro....      l.20 \begin{xtabular}{|l|p{0.5\textwidth}|}           ?      Here is the code:               \documentclass[12pt]{article}     \usepackage{xtab}     \begin{document}     \topcaption{The principal xtab package commands} \label{tab:xtab}     \tablefirsthead{\hline \multicolumn{1}{|c|}{\textbf{Command}} &     \multicolumn{1}{c|}{\textbf{Effect}} \\ \hline }     \tablehead{\multicolumn{2}{c}%     {{\captionsize\bfseries \tablename\ \thetable{} --     continued from previous page}} \\     \hline \multicolumn{1}{|c|}{\textbf{Command}} &     \multicolumn{1}{c|}{\textbf{Effect}} \\ \hline }     \tablelasthead{\multicolumn{2}{c}%     {{\captionsize\bfseries \tablename\ \thetable{} --     concluded from previous page}} \\     \hline \multicolumn{1}{|c|}{\textbf{Command}} &     \multicolumn{1}{c|}{\textbf{Effect}} \\ \hline }     \tabletail{\hline \multicolumn{2}{|r|}{{Continued on next page}} \\ \hline}     \tablelasttail{\hline \hline}     \begin{center}     \begin{xtabular}{|l|p{0.5\textwidth}|}     \verb|\begin{xtabular}{...}| & This is equivalent to the normal     \verb|\begin{tabular}{...}| environment.     You supply the specification of the columns     just as for the normal \Lenv{tabular} environment.     \\     &     All commands that can be used within a \Lenv{tabular}     environment can also be used within     the \Lenv{xtabular} environment.     \\     &     Unlike the \Lenv{tabular} environment which prevents page breaking     within the tabular, the \Lenv{xtabular} allows page breaking, so that     tabulars can extend automatically across several pages.     ... ... ...     \verb|\tablelasttail{...}| & The contents of this command are inserted before     the final (internal) \verb|\end{tabular}| of the table.     \\     &     For example, you might want to note that this is where     the table ends.     \\     \end{xtabular}     \end{center}     \end{document}


title: How to obtain proper justification with XeLaTeX and fontspec package?

text: I'm trying to obtain a justified paragraph with greek text using XeLaTeX and `fontspec` package, but there is always a word that exceed the right alignment. Note that with LaTex and the default greek font the given output is correct, with hyphenation, while with XeLaTeX and `fontspec` (and any greek font) there isn't hyphenation.               \documentclass[12pt]{article}     \usepackage[a4paper,top=2cm,bottom=1cm,left=3cm,right=3cm]{geometry}          \usepackage{fontspec}          \setmainfont{Palatino Linotype}          \usepackage[doublespacing]{setspace}          \setlength\parindent{0pt}               \begin{document}               Ἐν Μεγάροις ἰδὼν τὰ μὲν πρόβατα τοῖς δέρμασιν ἐσκεπασμένα, τοὺς δὲ παῖδας αὐτῶν γυμνούς, ἔφη, “λυσιτελέστερόν ἐστι Μεγαρέως εἶναι κριὸν ἢ υἱόν.” πρὸς τὸν ἐντινάξαντα αὐτῷ δοκόν, εἶτα εἰπόντα, “φύλαξαι,” “πάλιν γάρ με,” ἔφη, “παίειν μέλλεις;” ἔλεγε τοὺς μὲν δημαγωγοὺς ὄχλου διακόνους, τοὺς δὲ στεφάνους δόξης ἐξανθήματα. λύχνον μεθ' ἡμέραν ἅψας, “ἄνθρωπον,” φησί, “ζητῶ.” εἱστήκει ποτὲ κατακρουνιζόμενος· τῶν δὲ περιεστώτων ἐλεούντων, παρὼν Πλάτων ἔφη, “εἰ βούλεσθ' αὐτὸν ἐλεῆσαι, ἀπόστητε,” ἐνδεικνύμενος φιλοδοξίαν αὐτοῦ. ἐντρίψαντος αὐτῷ κόνδυλόν τινος, “Ἡράκλεις,” ἔφη, “οἷον με χρῆμ' ἐλάνθανε  τὸ μετὰ περικεφαλαίας περιπατεῖν.”           \end{document}      ![enter image description here](http://i.stack.imgur.com/s0Rpj.png) UDPATE: Although the solution proposed by egreg works good with standard margin, changing the margin dimension will result in a text with overfull lines. So i used the parameter               \tolerance=10000      following the instructions found here : http://www.tex.ac.uk/cgi- bin/texfaq2html?label=overfull. It seems to work properly:               \documentclass[12pt]{article}     \usepackage[a4paper,top=2cm,bottom=1cm,left=6cm,right=6cm]{geometry}          \usepackage{fontspec}     \usepackage{polyglossia}          \setmainfont[Ligatures=TeX]{Palatino Linotype}     \setmainlanguage[variant=polytonic]{greek}          \setlength\parindent{0pt}     \tolerance=10000          \begin{document}          Ἐν Μεγάροις ἰδὼν τὰ μὲν πρόβατα τοῖς  δέρμασιν ἐσκεπασμένα, τοὺς δὲ παῖδας αὐτῶν      υμνούς,  ἔφη, “λυσιτελέστερόν ἐστι Μεγαρέως  εἶναι  κρι-ὸν ἢ υἱόν.” πρὸς τὸν ἐντινάξαντα      αὐτῷ δοκόν, εἶτα εἰπόντα, “φύλαξαι,” “πάλιν γάρ με,” ἔφη,  “παίειν μέλλεις;” ἔλεγε τοὺς      μὲν δημαγωγοὺς ὄχλου διακόνους, τοὺς δὲ στεφάνους δόξης ἐξανθήματα. λύχνον μεθ' ἡμέραν      ἅψας,  “ἄνθρωπον,”   φησί, “ζητῶ.” εἱστήκει ποτὲ κατακρουνιζόμενος· τῶν δὲ περιεστώτων       ἐλεούντων, παρὼν Πλάτων ἔφη, “εἰ βούλεσθ' αὐτὸν ἐλεῆσαι, ἀπόστητε,” ἐνδεικνύμενος      φιλοδοξίαν αὐτοῦ. ἐντρίψαντος αὐτῷ κόνδυλόν τινος, “Ἡράκλεις,” ἔφη, “οἷον με χρῆμ'      ἐλάνθανε τὸ μετὰ περικεφαλαίας περιπατεῖν.”           \end{document}      ![enter image description here](http://i.stack.imgur.com/XAdwL.jpg)


title: Align and Center equations

text: I have the following equations . I just want to center them , such that the equality '= ' signs are one below the other. I tried \begin{align} but, that pushes them all to the left of the page.               \newcommand{\nrm}[1]{\left \lVert {#1} \right \rVert}          $$ \nrm{e} ^2 _{L_2(I)} = \langle e,e \rangle_{L_2(I)} $$     $$ = \langle e, -\phi '' \rangle_{L_2(I)} $$     $$ = \langle e' ,\phi ' \rangle_{L_2(I)} $$     $$ = \langle e ,\phi  \rangle_{a} $$      How do I do it?


title: \autocap command is not working

text: The following command is just a shortcut to avoid me to write two very long words I use often. I would like to capitalize the first letter of the first word at the beginning of a sentence.               \newcommand{\es}{\autocap{e}dslqk dlqsmd}      However `\es text.` (i.e. the command at the beginning of a sentence) does not print `Edslqk dlqsmd` but `edslqk dlqsmd`. How can I capitalize this letter automatically?


title: IEEEtran: IEEEParstart overlapping letters

text: I'm creating a `IEEEtran` document, I noted that if I use:               \documentclass[twoside]{IEEEtran}     \begin{document}     \IEEEPARstart{?`}{Qu\'e} es lo que es tan inusual en la microelectr\'onica?. La respuesta es     que es uno de esas raras tecnolog\'ias en las que la ciencia precedi\'o al arte y la ingenier     \'ia. La ciencia, en este caso es una contribuci\'on de notables como Wilson, Schottky, Pauli     Fermi, Dirac y Davydov, por nombrar s\'olo unos pocos. Para la mayor\'ia de las otras tecnolo     g\'ias, por el contrario, la secuencia es al rev\'es.     \end{document}      The result is: ![IEEEParstarResult](http://i.stack.imgur.com/zVUzC.jpg) How can I prevent the inverted question mark from overlapping the 3rd text line?. Is there a way to change the IEEEParstart letters size (to simplify the procedure)?


title: Fault tree : problem with anchoring gates

text: I am trying to modify the Fault tree e.g. from Tikz where the nodes are the objects like gates instead of text boxes, and would even elimiate text boxes from few paths if possible. This is my code so far.               \documentclass[border=10pt]{standalone}     \usepackage{tikz}     \usetikzlibrary{trees,calc,shadings,shapes.gates.logic.US,positioning,arrows}     \usetikzlibrary{shapes,snakes}          \begin{document}          \begin{tikzpicture}      [     % Gates and symbols style         and/.style={and gate US,thick,draw,fill=red!60,rotate=90,             anchor=east,xshift=-1mm},         or/.style={or gate US,thick,draw,fill=blue!60,rotate=90,             anchor=east,xshift=-1mm},         be/.style={circle,thick,draw,fill=green!60,anchor=north,             minimum width=0.7cm},         tr/.style={buffer gate US,thick,draw,fill=purple!60,rotate=90,             anchor=east,minimum width=0.8cm},         sq/.style={regular polygon,regular polygon sides=4,thick,draw,fill=orange!60,anchor=north, scale=0.2},     % Label style         label distance=3mm,  every label/.style={blue},     % Event style         event/.style={rectangle,thick,draw,fill=yellow!20,text width=2cm, text centered,font=\sffamily,anchor=north},         event2/.style={rectangle,draw=white, fill=white,},         and2/.style={and gate US,draw,fill=red!60,rotate=90, scale=0.5 },     % Children and edges style         edge from parent/.style={very thick,draw=black!70},         edge from parent path={(\tikzparentnode.south) -- ++(0,-1.05cm)-| (\tikzchildnode.north)},         level 1/.style={sibling distance=4cm,level distance=1.5cm, growth parent anchor=south,nodes=event},         level 2/.style={sibling distance=3cm, level distance=2cm},         level 3/.style={sibling distance=3cm},         level 4/.style={sibling distance=3cm}         ]     %% Draw events and edges         \node (g1) [event] {System Failure}                 child {node (e1) {Midplane}}                 child {node [event] (e2) {k/n}                     child {node [sq] (e2a) {1}}                     child {node [sq] (e2b) {2}}                     child[level distance=20mm] {node (e2c) [or, scale=0.4] {}                         child {node [sq] (e2c1) {x}}                         child {node [sq] (e2c2) {y}}                     }                     child {node [sq] (e2d) {4}}                 }                 child {node (e3) {Cooling}}                 child {node (e4) {Power domain 1}}                 ;     %  Remove what follows if no gates are required        \node [or]   at (g1.south)   []  {};        \node [be]   at (e1.south)   []  {};        \node [and]   at (e2.south)   []  {};        \node [be]   at (e3.south)   {};        \node [be]   at (e4.south)   {};     \end{tikzpicture}          \end{document}      As you can see, i am clearly struggling with the blue OR gate in the middle. Where am I going wrong?


title: Compressing multiple consecutive references while using biblatex with chem-acs style loaded

text: I am currently referencing by using:               \documentclass[12pt,a4paper,bibliography=totoc]{scrreprt}     \usepackage[ngerman]{babel}     \usepackage[backend=biber,bibstyle=chem-acs,sorting=none,biblabel=brackets,sortcites=true]{biblatex}     \addbibresource{references.bib}     \begin{document}     Somebody told me.\cite{James2003,Allendorf2009,Rowsell2004}     \printbibliography     \end{document}      Supposing that the file references.bib contains:               @article{James2003,     author = {James, S. L.},     journal = {Chem. Soc. Rev.},     number = {5},     pages = {276--288},     title = {{Metal-organic frameworks}},     volume = {32},     year = {2003}     }          @article{Rowsell2004,     author = {Rowsell, Jesse L.C. and Yaghi, Omar M.},     journal = {Microporous Mesoporous Mater.},     pages = {3--14},     title = {{Metal-organic frameworks: a new class of porous materials}},     volume = {73},     year = {2004}     }          @article{Allendorf2009,     author = {Allendorf, M. D. and Bauer, C. A. and Bhakta, R. K. and Houk, R. J. T.},     journal = {Chem. Soc. Rev.},     number = {5},     pages = {1330--1352},     title = {{Luminescent metal-organic frameworks.}},     volume = {38},     year = {2009}     }      Running latex -> biber -> latex -> latex -> dvips -> ps2pdf (need this procedure for other reasons) gives:               Somebody told me.[1, 2, 3]      How can I get compressed consecutive references like               Somebody told me.[1-3]      The cite and natbib packages provide compressing but are incompatible with biblatex. biblatex has a numeric-comp style but I need bibliography formatting of chem-acs. The biblatex documentation refers to the sortcites=true option which seems to indeed sort the numbers within the brackets but doesn't provide compressing. Thanks for your help!


title: Is this copyright information sufficient for distributing theme files?

text: I need to distribute theme files to several colleagues, and the templates I'm working off of all have this header:               Copyright year by name <email>          This file may be distributed and/or modified          1. under the LaTeX Project Public License and/or     2. under the GNU Public License.          See the file doc/licenses/LICENSE for more details.      I read through the Beamer manual's copyright section, am I interpreting it correctly that this is all I need to include in the file? EDIT: Since the theme files don't have to be placed in the LaTeX distribution location (they'll also work in the compiling directory) I wanted to clear that last line up some. I was going to specify a more specific path, but it turns out I can't find the correct doc/licenses/* files either. Looking at LICENSE which I found on what looks like CTAN, none of the other files are there. I can't find `manifest-code.txt`, I can't find `manifest-documentation.txt`, and I can't find the plain text version of the license. I can't even find that directory in either of the LaTeX distributions I have access to. Since I know the license is in the Beamer manual, I'll just direct to that with               See the Section 'Licenses and Copyright' in the Beamer manual for more details.


title: TikZ: How to set a node on an exact position on a line?

text: to set a node on a line the usual way should be something like this:               \begin{tikzpicture}         % place nodes         \node[draw] at (0, 0)   (a) {A};         \node[draw] at (5, 0)   (b) {B};              \node[draw] at (0, -2)  (c)     {C};         \node[draw] at (5, -2)  (d)     {D};              % draw edges         \draw[] (a) -- (b)  node[near start, above] {$x(kT)$};         \draw[] (c) -- (d)  node[near start, above] {$y(kT)$};     \end{tikzpicture}      But here i find it a little bit annoying, that the position of the node depends on the length of the line (what i try to illustrate in the above example). What i want is, that the nodes are exactly on the same position. To achieve this i have to write this:               \begin{tikzpicture}         % place nodes         \node[draw] at (0, -4)  (a2)    {A};         \node[draw] at (3, -4)  (b2)    {B};              \node[draw] at (0, -6)  (c2)    {C};         \node[draw] at (5, -6)  (d2)    {D};              % draw edges           \draw[] (a2.east)   -- (b2) node[at start, above right] {$x(kT)$};         \draw[] (c2.east)   -- (d2) node[at start, above right] {$y(kT)$};     \end{tikzpicture}      So my question is, is there a more intuitive way to do such things (something like the `near start`/`at start` node option)?


title: Exclude numbered section from toc

text: I want to exclude a section from the table of contents, but would still to assign it a number and be able to refer to it. This was basically adressed here. However, I also modified my section headers and **don't know how this modification can be taken into account** when typesetting the section that is excluded from the toc.               \documentclass{article}               \usepackage{titlesec}     \titleformat{\section}{\large\bf}{\thesection}{8pt}{\large}          \begin{document}          \section*{\refstepcounter{section}\label{sec:A}\thesection Section A} % from link provided     \section*{\refstepcounter{section}\label{sec:B}\thesection\hspace{8pt} Section B}     \section{Section C}          \end{document}      The problem is visualised here: ![enter image description here](http://i.stack.imgur.com/hVXId.jpg)


title: Modifying default headings style in ConTeXt

text: I would like to change the heading defaults so that every level of heading is in the same font size as the body font, only the face would be changed for different levels (bold, italic, bold italic, etc.). How would one go about doing that? I’ve tried to search for this information in the files _ConTeXt an excursion_ , _ConTeXt the manual_ , and the ConTeXt garden wiki, without luck (which, I realize, doesn’t mean the information isn’t there, just that if it is, I couldn’t find it `;‑)`). I would need to use the default heading commands and not a custom defined heading command. That is, the document is created via pandoc, and I can therefore only change the template being used for the conversion. I guess the needed command would start something like:               \setuphead[something, I don't know what][something, again I don't know what]     \starttext     \subject{Heading text}          body text.     \stoptext      Uhh, goes to show my ConTeXt-fu is very limited.


title: How to left align a text in IEEEeqnarray environment?

text: I am using `IEEEeqnarray` environment and want to left align a text. How to do that?               \documentclass[a4paper, 10pt, conference]{ieeeconf}     \usepackage{amsmath} % assumes amsmath package installed     \interdisplaylinepenalty=10000     \begin{document}     \begin{IEEEeqnarray}{C}         p(t) = \sum_{k=1}^M a_k \cos(k\w_f t + \phi_k) = \sum_{k=1}^M h_k(t) \label{eq:pli} \\     \text{where}          h_k(t) = a_k \cos(k\w_f t + \phi_k)  \label{eq:plih}     \end{IEEEeqnarray}     end{document}


title: Change paper size in winedt

text: I am using sig-alternate-2013 (http://www.sheridanprinting.com/typedept/sig- alternate-2013.cls), which is supposed to print in US letter page size (8.5x11 inches), but I am now printing in A4 size (21x29.7 cm), how should I change it? I am currently using WinEdt 8, there is some suggestions here: http://www.acm.org/sigs/publications/sigfaq#a5 but I can't get it work.


title: Why do these aligned equations pop to the right?

text: \documentclass[a4paper]{article}     \usepackage{mathtools}     \usepackage{amssymb,amsmath}     \usepackage{mathtools}%voor Aboxed     \usepackage{bm}          \begin{document}               \begin{align*}     \overrightarrow{a_{G'_1}} = \overrightarrow{a_{G'_2}} = \overrightarrow{a_{G'}}\\     \centerline\text{met }\overrightarrow{a_{G'_1}} &=     \overrightarrow{\alpha_1}\times(\overrightarrow{r_G}-\overrightarrow{r_E}) +     \overrightarrow{\alpha_2}\times (\overrightarrow{v_{G,1}'}-\overrightarrow{v_E'}) + \overrightarrow{\omega_2}\times (\overrightarrow{v_{G,1}'}-\overrightarrow{v_{F,1}'})\\ & \Downarrow \overrightarrow{v_{F,1}'} = \overrightarrow{\omega_1}\times (\overrightarrow{r_F}-\overrightarrow{r_E})     =     \begin{vmatrix}     \overrightarrow{e_x'} & \overrightarrow{e_y'} & \overrightarrow{e_z'}\\     \omega_1 & 0 & 0\\l_1 & l_4 & 0\\\end{vmatrix}     \Rightarrow \text{test}\\     \end{align*}          \end{document}      renders ![enter image description here](http://i.stack.imgur.com/clvCx.png) Why are they too much to the right and how can I center them?


title: can you fix this?

text: Can you fix this? There are several horrors!               \begin{tabular}{ | c | c | c | c | }      \hline                         Modelo & Gl & SC & F \\     \hline     \beta'=(\beta_0,\beta_1) & 2   & \beta'X'Y  & $\frac{(SSE_r-SSEc)/(k-g)}{SSE_c/(n-[k+1])}$\\     Residual                 & n-2 & Y'Y-\beta'X'Y & \\      \hline        Total & n & \textbf{Y'Y} & asd\\      \hline      \end{tabular}


title: Clicking on a link I don't jump to the **exact** location of the label, just somewhere around it

text: When I label an equation and later have a reference to it, then by clicking the corresponding link the pdf I jump to that equation, with the equation being exactly at the top of the page. Same goes for footnotes. **But** when I just insert a label in the text (for example near a theorem for the purpose to have a link to that theorem in my text) and later in the text have a reference to it and then click on the corresponding link in the pdf, I **don't** jump **exactly** to the place where the label was (meaning it isn't at the top of the page like equations ans footnotes anymore), just to right page - with the place where the label was being somewhere around the middle. What can I do so that the link will send me to the place where the label was, with it being at the top of the page (like for equations) ? P.S. I use LxY 2.


title: Getting shaded boxes in lists to indent

text: I'm trying to make a list which also contains theorems in shaded boxes. I'm currently using the framed package to do this. However, the shaded boxes do not properly "tab" inward to align with the list's item. Instead, the left side of the shaded box extends all the way to the margin.               \documentclass{article}     \usepackage{framed, amsthm}     \usepackage[svgnames]{xcolor}     \definecolor{shadecolor}{named}{AliceBlue}     \newtheorem{theo}{Theorem}          \newenvironment{thm}{\begin{shaded*}\begin{theo}}{\end{theo}\end{shaded*}}          \begin{document}          \begin{itemize}         \item First item             \begin{thm} Theorem in shaded box. \end{thm}          \item Second item     \end{itemize}          \end{document}      The shaded box surrounding the theorem is not indented, but rather extends all the way to the left margin. Is there any way to get around this, or another package you'd recommend to accomplish this?


title: How can I add dot after the subsection number?

text: ![subsectionnumbering](http://i.stack.imgur.com/Jq37K.png) I use `\usepackage{secdot}` so I achieved dot after **section** numbering. But I can't for subsection


title: How do I invoke cm-super?

text: I have installed `cm-super` from the command line in Ubuntu. I can see the `.pfb` files in `usr/share/texmf/fonts/type1/public/cm-super`. I am still not sure how to invoke them in LaTeX. This page: http://www.tex.ac.uk/ctan/fonts/ps-type1/cm-super/INSTALL indicates that I have to manually update updmap files? Really? Is it that complicated? Do I need to make sure of the presence of anything other than the .pfb files?


title: How do I install two fonts into a document?

text: I want to install two fonts `tgchorus` and `fouriernc` into a document. The font `tgchorus` for content of chapters, section, subsection and `fouriernc` for remain. I don't know to install. How must I do?


title: Why does a space destroy my keywords in listingspackage?

text: I am using the following:               \usepackage{listings}         \lstset{           language=C,           keywordstyle=\color{pantone309!90},           morekeywords={             omp,             parallel,             \#pragma             }         }      When i now write this               \begin{lstlisting}     #pragma     #define         #pragma         #define     \end{lstlisting}      It looks like this:![Output of my example](http://i.stack.imgur.com/a5Cs8.png) How can i fix this, so that it all pragmas are highlighted as keyword ?


title: How to position a table at the right margin and at the exact height of the current line?

text: I'm trying to position the table such that the top of the table would have the same height as the text next to it, but there's always an exceedingly annoying line that I can't seem to get rid of. ![](http://i.imgur.com/ETREFKi.png) Basically, I just want the table to move up a height of one line.               \item \begin{minipage}[t]{0.5\textwidth} Multiply the value of each region with its     corresponding probability,  then sum up the results. \end{minipage} \begin{minipage}     [t]{4cm} \begin{tabular}[t]{|r|l|} \hline Probability & Region \\ \hline 0.0077 & -3 \\     \hline 0.0462 & -2 \\ \hline 0.2462 & -1 \\ \hline 0.4077 & 0 \\ \hline 0.2385 & 1 \\     \hline 0.0462 & 2 \\ \hline 0.0077 & 3 \\ \hline \end{tabular} \end{minipage}


title: Enhancement of bloques tikz library

text: **I'll let this question open for a few more days if someone posts an interesting answer** I came across bloques library for tikz (http://www.ctan.org/tex- archive/graphics/pgf/contrib/bloques), found it quite nice but I soon noticed it was lacking some options, so I decided to rework it / extend features. I achieved this style file so far:               \usepackage{tikz,circuitikz}     \usepgflibrary{shapes.misc}     \usetikzlibrary{calc,arrows,decorations.pathmorphing,backgrounds,positioning,fit,shadows}          \newcommand{\horizdist}{1.5cm}     \newcommand{\verticdist}{1.2cm}     \newcommand{\phasedist}{3.5cm}     \newcommand{\minheight}{0.7cm}     \newcommand{\textsize}{\footnotesize}     \newcommand{\backgroundcolor}{white}     \newcommand{\colortext}{black}     \newcommand{\linecolor}{black}     \newcommand{\dark}{0}     \newcommand{\linetype}{thick}          \newcommand{\bShadow}{\renewcommand{\dark}{1}}     \newcommand{\bColorB}[1]{\renewcommand{\backgroundcolor}{#1}}     \newcommand{\bColorT}[1]{\renewcommand{\colortext}{#1}}     \newcommand{\bColorL}[1]{\renewcommand{\linecolor}{#1}}          \newcommand{\bDownTo}[3]{         \node[above of=#1, node distance=\verticdist, \linetype, fill=\backgroundcolor] (#2) {\textsize{#3}};         \draw[-latex, \linetype] (#2) -- (#1);     }          \newcommand{\bUpTo}[3]{         \node[below of=#1, node distance=\verticdist, \linetype, fill=\backgroundcolor] (#2) {\textsize{#3}};         \draw[-latex, \linetype] (#2) -- (#1);     }          \newcommand{\bRightTo}[3]{         \node[left of=#1, node distance=\horizdist, \linetype, fill=\backgroundcolor] (#2) {\textsize{#3}};         \draw[-latex, \linetype] (#2) -- (#1);     }          \newcommand{\bLeftTo}[3]{         \node[left of=#1, node distance=\horizdist, \linetype, fill=\backgroundcolor] (#2) {\textsize{#3}};         \draw[-latex, \linetype] (#2) -- (#1);     }          \newcommand{\bPlusDown}[2]{         \node [draw=\linecolor, circle,minimum size=1.5em, right of=#1, node distance= \horizdist,\linetype, fill=\backgroundcolor, drop shadow={opacity=\dark}] (#2) {};         \node [draw=gray!50, cross out, minimum size=1.0em, right of=#1, node distance= \horizdist, thin] {};            \node [left of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \node [below of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \draw [-latex,\linetype] (#1) -- (#2);               }          \newcommand{\bPlusUp}[2]{         \node [draw=\linecolor, circle,minimum size=1.5em, right of=#1, node distance= \horizdist,\linetype, fill=\backgroundcolor, drop shadow={opacity=\dark}] (#2) {};         \node [draw=gray!50, cross out, minimum size=1.0em, right of=#1, node distance= \horizdist, thin, draw=gray!50] {};          \node [left of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \node [above of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \draw [-latex, \linecolor] (#1) -- (#2);                     }          \newcommand{\bMinusDown}[2]{         \node [draw=\linecolor, circle,minimum size=1.5em, right of=#1, node distance= \horizdist,\linetype, fill=\backgroundcolor, drop shadow={opacity=\dark}] (#2) {};         \node [draw=gray!50, cross out, minimum size=1.0em, right of=#1, node distance= \horizdist, thin] {};            \node [left of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \node [below of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$-$}};         \draw [-latex,\linetype] (#1) -- (#2);               }          \newcommand{\bMinusUp}[2]{         \node [draw=\linecolor, circle,minimum size=1.5em, right of=#1, node distance= \horizdist,\linetype, fill=\backgroundcolor, drop shadow={opacity=\dark}] (#2) {};         \node [draw=gray!50, cross out, minimum size=1.0em, right of=#1, node distance= \horizdist, thin, draw=gray!50] {};          \node [left of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \node [above of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$-$}};         \draw [-latex, \linecolor] (#1) -- (#2);             }          \newcommand{\bMinusPlus}[2]{         \node [draw=\linecolor, circle,minimum size=1.5em, right of=#1, node distance= \horizdist,\linetype, fill=\backgroundcolor, drop shadow={opacity=\dark}] (#2) {};         \node [draw, cross out, minimum size=1.0em, right of=#1, node distance= \horizdist, thin, draw=gray!50] {};          \node [left of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \node [above of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$-$}};         \node [below of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \draw [-latex, \linecolor] (#1) -- (#2);                 }          \newcommand{\bPlusMinus}[2]{         \node [draw=\linecolor, circle,minimum size=1.5em, right of=#1, node distance= \horizdist,\linetype, fill=\backgroundcolor, drop shadow={opacity=\dark}] (#2) {};         \node [draw, cross out, minimum size=1.0em, right of=#1, node distance= \horizdist, thin, draw=gray!50] {};          \node [left of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \node [above of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \node [below of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$-$}};         \draw [-latex, \linecolor] (#1) -- (#2);                 }          \newcommand{\bMinusMinus}[2]{         \node [draw=\linecolor, circle,minimum size=1.5em, right of=#1, node distance= \horizdist,\linetype, fill=\backgroundcolor, drop shadow={opacity=\dark}] (#2) {};         \node [draw, cross out, minimum size=1.0em, right of=#1, node distance= \horizdist, thin, draw=gray!50] {};          \node [left of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \node [above of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$-$}};         \node [below of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$-$}};         \draw [-latex, \linecolor] (#1) -- (#2);                 }          \newcommand{\bPlusPlus}[2]{         \node [draw=\linecolor, circle,minimum size=1.5em, right of=#1, node distance= \horizdist,\linetype, fill=\backgroundcolor, drop shadow={opacity=\dark}] (#2) {};         \node [draw, cross out, minimum size=1.0em, right of=#1, node distance= \horizdist, thin, draw=gray!50] {};          \node [left of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \node [above of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \node [below of = #2, node distance = 0.45em] () { \color{\colortext}\tiny{$+$}};         \draw [-latex, \linecolor] (#1) -- (#2);                 }          \newcommand{\bGain}[3]{         \node [draw=\linecolor, circle, right of = #1, node distance= \horizdist, minimum size = 1.5em, \linetype, fill=\backgroundcolor, drop shadow={opacity=\dark}] (#2) { \color{\colortext}\textsize{#3}};          \draw [-latex, \linecolor] (#1)--(#2);     }          \newcommand{\bGainBackDown}[4]{         \node [draw=\linecolor, circle, below right of = #1, node distance=\horizdist+.1cm, minimum size = 1.5em, \linetype, fill=\backgroundcolor, drop shadow={opacity=\dark},anchor=west] (#3) { \color{\colortext}\textsize{#4}};         \draw [-latex, \linecolor] (#2)|-(#3);         \draw [-latex, \linecolor] (#3)-|(#1);     }          \newcommand{\bGainBackUp}[4]{         \node [draw=\linecolor, circle, above right of = #1, node distance=\horizdist+.1cm, minimum size = 1.5em, \linetype, fill=\backgroundcolor, drop shadow={opacity=\dark},anchor=west] (#3) { \color{\colortext}\textsize{#4}};         \draw [-latex, \linecolor] (#2)|-(#3);         \draw [-latex, \linecolor] (#3)-|(#1);     }          \newcommand{\bGainBackUpCross}[4]{         \node [draw=\linecolor, circle, above left of = #1, node distance=\horizdist+.1cm, minimum size = 1.5em, \linetype, fill=\backgroundcolor, drop shadow={opacity=\dark},anchor=east] (#3) { \color{\colortext}\textsize{#4}};         \draw [-latex, \linecolor] (#1)|-(#3);         \draw [-latex, \linecolor] (#3) -- ++(-\horizdist/2,0) -- ($(#2)-(0,\verticdist)$) -- (#2);     }          \newcommand{\bGainBackDownCross}[4]{         \node [draw=\linecolor, circle, below left of = #1, node distance=\horizdist+.1cm, minimum size = 1.5em, \linetype, fill=\backgroundcolor, drop shadow={opacity=\dark},anchor=east] (#3) { \color{\colortext}\textsize{#4}};         \draw [-latex, \linecolor] (#1)|-(#3);         \draw [-latex, \linecolor] (#3) -- ++(-\horizdist/2,0) -- ($(#2)+(0,\verticdist)$) -- (#2);     }          \newcommand{\bTF}[3]{                \node [draw=\linecolor, rectangle, right of = #1, node distance= \horizdist, minimum height = \minheight, \linetype, fill=\backgroundcolor, drop shadow={opacity=\dark}] (#2) {\color{\colortext}\textsize{#3}};             \draw [-latex, \linecolor] (#1)--(#2);     }          \newcommand{\bTFForthUpCross}[4]{         \node [draw=\linecolor, rectangle, above right of = #1, node distance=\horizdist+.1cm, minimum height = \minheight, \linetype, fill=\backgroundcolor,drop shadow={opacity=\dark},anchor=west] (#3) { \color{\colortext}\textsize{#4}};         \draw [-latex, \linecolor] (#1)|-(#3);         \draw [-latex, \linecolor] (#3) -- ++(\horizdist/2,0) -- ($(#2)-(0,\verticdist)$) -- (#2);     }          \newcommand{\bTFForthDownCross}[4]{         \node [draw=\linecolor, rectangle, below right of = #1, node distance=\horizdist+.1cm, minimum height = \minheight, \linetype, fill=\backgroundcolor,drop shadow={opacity=\dark},anchor=west] (#3) { \color{\colortext}\textsize{#4}};         \draw [-latex, \linecolor] (#1)|-(#3);         \draw [-latex, \linecolor] (#3) -- ++(\horizdist/2,0) -- ($(#2)+(0,\verticdist)$) -- (#2);     }          \newcommand{\bMarkNode}[2]{         \node[fill=\linecolor,circle,inner sep=0pt,minimum size=.5em,right of = #1, node distance= \horizdist] (#2) {};         \draw [\linecolor] (#1)--(#2);     }          \newcommand{\bOut}[3]{         \node[right of=#1, node distance= \horizdist] (#2) {\color{\colortext}\textsize{#3}};         \draw [-latex, \linecolor] (#1)--(#2);     }      I was able with this example to draw the block diagram of a RL load and it's corresponding control in synchronous reference frame (for those who know about that, but it's just for the example purpose).               \documentclass{standalone}     \usepackage{amsmath}     \usepackage{tikz}     \usepackage{bloquesshapes} % above sty file          \begin{document}          \begin{tikzpicture}         \bShadow         \node (1) at (0,0) {\color{\colortext}\textsize{$i_{sc\alpha}$}};         \bMinusUp{1}{2}         \bDownTo{2}{3}{$i_{s\alpha}$}         \bMinusPlus{2}{3}         \bTF{3}{4}{$\dfrac{1}{sl}$}         \bMarkNode{4}{5}         \bGainBackUp{3}{5}{6}{$r$}         \bOut{5}{7}{$i_{s\alpha}$}         \node (A) at (0,-\phasedist) {\color{\colortext}\textsize{$u_{s\beta}$}};         \bMinusDown{A}{B}         \bUpTo{B}{C}{$u_{i\beta}$}         \bMinusMinus{B}{C}         \bTF{C}{D}{$\dfrac{1}{sl}$}         \bMarkNode{D}{E}         \bGainBackDown{C}{E}{F}{$r$}         \bOut{E}{G}{$i_{s\beta}$}         \bGainBackUpCross{E}{3}{H}{$\omega l$}         \bGainBackDownCross{5}{C}{8}{$\omega l$}     \end{tikzpicture}          \begin{tikzpicture}[>=stealth']         \bShadow         \node (1) at (0,0) {\color{\colortext}\textsize{$i_{sc\alpha}$}};         \bMinusUp{1}{2}         \bDownTo{2}{3}{$i_{s\alpha}$}         \bMarkNode{2}{3}         \bTF{3}{4}{$\frac{1+sT_n}{sT_i}$}         \bMinusDown{4}{5}         \bOut{5}{7}{$u_{cm\alpha}$}         \node (A) at (0,-\phasedist) {\color{\colortext}\textsize{$i_{sc\beta}$}};         \bMinusDown{A}{B}         \bUpTo{B}{C}{$i_{s\beta}$}         \bMarkNode{B}{C}         \bTF{C}{D}{$\frac{1+sT_n}{sT_i}$}         \bPlusUp{D}{E}         \bOut{E}{G}{$u_{cm\beta}$}         \bTFForthDownCross{3}{E}{H}{$\dfrac{\omega T_n}{sT_i}$}         \bTFForthUpCross{C}{5}{8}{$\dfrac{\omega T_n}{sT_i}$}     \end{tikzpicture}          \end{document}      The graphical result is quite nice in my opinion. ![illustration](http://i.stack.imgur.com/Yhykj.png) I would appreciate:   * any idea on how to actually make in a simpler way the same drawing   * a `\bStart`command who take as input a node name, a node position (x,y) and a node label (the trick has to be found for the node position)   * a fix for the `\bMarkNode` (delete white space around the thick dot)   * a less trick way for `$r$` and `$\omega l$` nodes (vertical alignment)   * for more flexibility I had to increase complexity with a variable amount of arguments for the commands, something that was not present with bloques; any idea is welcome **All shapes of the same kind take the same number of arguments**


title: Is a command with an argument before and after the command possible?

text: I'm trying to create a `LaTeX3` command that works the same whether its argument comes before or after the command. For example, I'd like to define `\squared` to be used as either `\m\squared` or `\squared\m` where `\m` is defined as `\mathrm{m}`. Both should yield `$\mathrm{m}^2$`. Here's the markup I've been working with.               \documentclass[10pt]{article}     \usepackage{xparse}          \newcommand*{\unit}[2]{\ensuremath{#1\;#2}}     \newcommand*{\metre}{\ensuremath{\mathrm{m}}}     \newcommand*{\m}{\metre}          \DeclareDocumentCommand \square { m } {%            \IfNoValueTF #1 {%         $^2$       }{%         $#1^2$       }%     }%          \begin{document}          The command used as a prefix gives \square\m.          The command used as a postfix gives \m\square\ .          \end{document}      The first example typesets correctly except for a line break that I can't explain, but the second example also has a line break between the `\m` and the exponent. I tried making the argument optional but that didn't work either. It's okay if the construct I have in mind isn't possible since I can make slightly different commands for use before and after the argument.


title: LaTeX symbol for "divides precisely"

text: I sometimes need to write that a certain prime `p^k` _precisely divides_ a number `n`, meaning that `p^k | m` but it is not the case that `p^{k+1} | m`. It is often written as: `p^k || m`, where the symbol in the middle is supposed to look like a pair of vertical lines close to one another. Is there a good way to write this in LaTeX? I am aware of the following possibilities, none of which is fully satisfactory:   1. `p^k \Vert n` gives a nice pair of vertical lines, but the spacing looks wrong.   2. `p^k \mid\mid n` gives the right spacing between numbers and the symbol, but the lines are very far apart.   3. `p^k \mid \!\!\: \mid n` and `p^k \ \Vert \ n` look about right, but I hear that manually adding spacing is sometimes risky. Are there any better possibilities?


title: By default, how much do ^ and _ raise and lower the text box in superscript and subscript respectively?

text: I'm trying to define a set of commands for superscript and subscript, but cannot use the characters `^` and `_` in doing so. I've been able to define the correct font size by using `\check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont`, but can not work out the default values for how much the text box is raised and lowered. How does TeX/LaTeX define these values?


title: Problems with amsbook, lstdoc, and sections

text: The code               \documentclass{amsbook}     \usepackage{lstdoc}     \begin{document}     \chapter{Chapter}     \section{Section}     \end{document}      produces the error messages `Missing } inserted. [\section{Section}]` and `or forgotten \endgroup. [\section{Section}]` What is going on there? It works fine if one replaces `amsbook` by `book`. Any suggestions?


title: Order of references, tables/figures, and appendices using apa6 class

text: According to APA 6th edition, the order of a manuscript should be: Title Page, Abstract, Body, References, Footnotes, Tables, Figures, Appendixes. I am trying to typeset a manuscript with the class apa6 with apacite reference style, but the order of the last few parts doesn't seem to follow this. After the body (ignoring footnotes for now), it produced an order of tables/figures, appendix, reference. Here is a working example:               \documentclass[man,apacite]{apa6}     \usepackage[american]{babel}          \title{This is the title}     \author{Joe Williams}     \affiliation{University A}     \leftheader{Left header}     \abstract{This is the abstract}     \keywords{APA style}          \begin{document}          \maketitle          Content of the article.     This is what we cite \cite{Smith2013}.     Table~\ref{tab:the_able} has some info.          \begin{table}     \caption{A complex table.}     \label{tab:the_able}     \begin{tabular}{l l}     cell 1 & cell 2 \\     \end{tabular}     \end{table}          \appendix          \section{The Appendix}     Stuff I want to put in the appendix.          \bibliography{ref}          \end{document}      whereas the file "ref.bib" has the following content.               @article{Smith2013,         Author = {Smith, A.},         Journal = {Psychological Review},         Number = {1},         Pages = {23-45},         Title = {{This is the title}},         Volume = {6},         Year = {2013}}      How can I fix this? Or, is there a way to arbitrarily reorder these different parts?


title: What's the best way to cite a photo from wikimedia?

text: I'm wanting to cite this image here, in a piece of work I'm doing. As I'm using `biblatex` what's the best method of citing it?


title: Why is parskip=half messing up the spacing in mdframed?

text: without parskip: ![no parskip](http://i48.tinypic.com/66hg0n.png) parskip=half: ![parskip half](http://i45.tinypic.com/nvzcdw.png)               \documentclass[parskip=half]{scrartcl}          \usepackage{blindtext}          \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{thmtools}          \usepackage[framemethod=TikZ]{mdframed}     \colorlet{shadecolor}{gray!25}          \newmdtheoremenv[       innerlinewidth=0pt,middlelinewidth=0pt,       outerlinecolor=shadecolor,outerlinewidth=3pt,       skipabove=\topskip,skipbelow=\topskip,       ]{example}{Example}             \begin{document}          \begin{example}       \blindtext     \end{example}          \end{document}


title: How to change subcaption font size in Lyx?

text: I want to set the font for captions and sub-captions in my Lyx document to 'large'. There is no issues with changing size of captions, but I can't change sub-captions. Here are the preambles I try to use and the errors I get. The errors are not caused by 'caption' package. Here are two preambles that I tried to use. With `subfigure` package:               \usepackage[large]{subfigure}     \usepackage[margin=10pt,font=large,labelfont=bf, labelsep=endash]{caption}      With `subcaption` package:               \usepackage[font+=large]{subcaption}     \usepackage[margin=10pt,font=large,labelfont=bf, labelsep=endash]{caption}      In both cases I receive following errors:               \begin{document}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.           \subfloat                    [ ---    ]{\begin{centering}     Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.      Lyx MWE can be downloaded here. LaTex verson (I used Lyx option Export-> LaTeX(plain) to create it) can be downloaded here.


title: tabulation minted xelatex

text: When I use tabulation inside the `minted` environment in `pdflatex`, they show as normal (several spaces). But when I use `xelatex`, they appear as `^^I`. Example (before each letter a b c, there is space-tabulation-space) :               \documentclass{standalone}     \usepackage{minted}          \begin{document}     \begin{minipage}{6cm}     \begin{minted}{c}         a    b   c       \end{minted}     \end{minipage}     \end{document}      In pdflatex I obtain : ![result from pdflatex](http://i.stack.imgur.com/zXyMb.png) Using xelatex, I obtain : ![result from xelatex](http://i.stack.imgur.com/lgyt9.png) I tried different things to obtain the same behavior for tabulation in xelatex, but did not succeed. How can I do to obtain correct tabulation in `minted` under xelatex ?


title: Really wide hat symbol

text: Is there any way to get a hat wider than widehat? Why doesn't               \widehat{abcdefghijklmnopqrstuvwxyz}      really go over all of it?


title: Fatter Computer Modern

text: I very much like the design of the Computer Modern fonts, except that the strokes (mostly the hairlines) are too thin and "spindly", so not well suited to low-resolution devices like computer screens. I guess I'm not alone -- I often see complaints about this. This problem could be solved just by re- running Metafont with some "fatter" parameter values, couldn't it? Has anyone done that? A few things I discovered by myself:   1. Alan Hoenig created a package called MathKit. The idea is to define sets of parameters that make the Computer Modern fonts look like standard ones (Times, Palatino, etc.) The Cambria font is nice and fat. I suppose one could use MathKit to create a CM fat-alike of Cambria. Of course, I could just use Cambria, but CM just looks "nicer" to me (somehow).   2. Metafont has parameters like "blacker" that are intended to adjust rasterization according to the properties of the output device. In ancient times, people used to fiddle with these parameters quite a bit to get good output on the printers of the day (which typically had resolutions of 200 to 300 dpi). Of course, none of this helps if you're using outline fonts rather than bitmap ones. When using outline fonts, the OS or the viewing app handle the rasterization, and it's beyond your control.   3. Something could perhaps be done by adjusting the hinting of the CM outline fonts, but hinting seems like a black art that hardly anyone knows much about. The standard Y&Y/Blue Sky CM fonts were hinted by real experts, so no further hinting exercise is likely to produce better results, presumably.   4. One could use a smaller design size, as suggested by NauC in the answer below. This will produce thicker strokes. It will also produce wider characters, but I was thinking I might be able to narrow them again using `fontspec`'s "FakeStretch". The end result (if I'm lucky) will be characters with thicker hairlines. To try out the idea from #4, I used the following code:               \documentclass[a4paper,10pt]{memoir}     \usepackage{fontspec}     \defaultfontfeatures{Scale=MatchLowercase}          \begin{document}     \raggedright          \chapter{Motivation}     \section{Background Material}     bedbugs in flowery bloomers.          \fontspec[OpticalSize=0, FakeStretch = 0.876]{Latin Modern Roman 7 Regular}     bedbugs in flowery bloomers.          \fontspec[OpticalSize=0, FakeStretch = 1.09]{Latin Modern Roman 17 Regular}     bedbugs in flowery bloomers.          \end{document}      and I got these results: ![three bedbugs](http://i.stack.imgur.com/o5ior.jpg) At huge sizes like this, any rasterization looks fine, of course. I provided the images just so that people could see the outline differences. The important thing (to me) is that the second line looks better than the first one at small sizes in a PDF viewer, so I'm happy with the progress. I am a raw beginner with TeX/LateX, so maybe someone with more expertise can improve my solution. Now I need to figure out how to do the same thing with math.


title: Citation not shown in pdf

text: I have some troubles with citations and biber. I'm citing a paper several times and point to different sections in that paper. But sometimes the citation is not shown in the pdf. I can't comprehend when they are not shown. In one section they are shown properly, and in the other section simply a space appears. First I use               \cite{Shani2011}      and the second time I use the same (copy and paste)               \cite{Shani2011}      Inside the Bib reference, the paper is also shown properly. I got no errors in my console, just a few `Overfull \hbox...` and `!h float specifier changed to !ht` warnings, and one `No backend specified, using Biber backend`. I don't know why this biber warning occurs, my command to compile in texmaker is (% references the current document name):               "/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode %.tex|     "/usr/texbin/biber" %|     "/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode %.tex|     "/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode %.tex|     open %.pdf      Does anyone know where I can start to debug this? **==========================================** **EDIT** Ok, here is a minimum example:               \documentclass[12pt,a4paper]{article}     \usepackage[english,ngerman]{babel}     \usepackage[authordate]{biblatex-chicago}           \bibliography{Bibliography2}          \begin{document}         \cite{Shani2011} blabla. \cite{Shani2011} blabla     \end{document}      This produces               Shani und Gunawardana 2011 blabla.  blabla      The second citation doesn't gets printed into the pdf. But I found out, if I cite between the two Shani2011 another paper, it works. This               \begin{document}         \cite{Shani2011} blabla. \cite{Shani2009} blabla \cite{Shani2011} blabla     \end{document}       produces this               Shani und Gunawardana 2011 blabla. Shani 2009 blabla Shani und Gun- awardana 2011 blabla      So I don't know why this doesn't work. Any ideas? **EDIT** Here is the Bibliography2.bib:               @article{Shani2011,     author = {Shani, Guy and Gunawardana, Asela},     title = {{Evaluating recommendation systems}},     year = {2011}     }          @article{Shani2009,     author = {Shani},     title = {{Evaluating recommendation systems}},     year = {2011}     }      **EDIT** Here is the content of the Masterthsis.blg:               [1] Config.pm:361> INFO - This is Biber 1.5     [302] Config.pm:364> INFO - Logfile is 'Masterthesis.blg'     [1209] biber-darwin:193> INFO - === Tue Mar  5, 2013, 10:19:55     [1210] Biber.pm:327> INFO - Reading 'Masterthesis.bcf'     [1426] Biber.pm:619> INFO - Found 1 citekeys in bib section 0     [1841] Biber.pm:2976> INFO - Processing section 0     [2305] Biber.pm:3086> INFO - Looking for bibtex format file 'Bibliography2.bib' for section 0     [2449] bibtex.pm:764> INFO - Found BibTeX data source 'Bibliography2.bib'     [4823] Biber.pm:2860> INFO - Overriding locale 'en_US.UTF-8' default tailoring 'level = 4' with 'level = 2'     [4823] Biber.pm:2860> INFO - Overriding locale 'en_US.UTF-8' default tailoring 'variable = shifted' with 'variable = non-ignorable'     [4823] Biber.pm:2866> INFO - Sorting 'entry' list 'nyt' keys     [4824] Biber.pm:2870> INFO - No sort tailoring available for locale 'en_US.UTF-8'     [5115] bbl.pm:462> INFO - Writing 'Masterthesis.bbl' with encoding 'ascii'     [5116] bbl.pm:535> INFO - Output to Masterthesis.bbl


title: How do I create a forward reference to a user-defined counter?

text: I have created a counter to count enclosures:               \newcounter{enclosure}{0}      At the bottom of each enclosure I put:               \addtocounter{enclosure}{1}\vfill\hfill\Enclosure \arabic{enclosure}\clearpage      And that works perfectly. However, at the page before the enclosures I need to put this at the bottom (if there are three enclosures):               ENCLOSURES (3)      I would like to make the value in the parenthesis reflect the last value of the `enclosure` counter. I've tried `\ref` and `\label` but that grabs the section counter, not these counters. Here is a complete example:               \documentclass[10pt]{article}        \begin{document}     \newcounter{enclosure}     \noindent     Total Enclosures: \\     \stepcounter{enclosure} Enclosure \arabic{enclosure}\\     \stepcounter{enclosure} Enclosure \arabic{enclosure}\\     \stepcounter{enclosure} Enclosure \arabic{enclosure}\\     \stepcounter{enclosure} Enclosure \arabic{enclosure}\\     Total Enclosures: \arabic{enclosure}     \end{document}      I want the Total Enclosures to be the same at the top as the bottom. Thanks.


title: Output all entries in Gloss, no text being produced

text: I'm trying to use `gloss` to output a entries from a `.bib` file like a dictionary in alphabetical order. For some reason I can't get it to output anything except the title. I'm using TexWorks in windows. MWE:               \documentclass{article}     \usepackage{fullpage} %use 1'' margins instead of default latex margins     \usepackage{indentfirst} %indents first paragraph     \usepackage[refpages]{gloss}          \usepackage{filecontents}     \begin{filecontents*}{style.bib}     @gd{test,     word = {test},     definition = {test entry}     }     \end{filecontents*}          \makegloss          \begin{document}     \emph{The Rensselaer Polytechnic} Style Guide     \gloss[nocite]{*}     \printgloss{style}{}     \end{document}


title: Hyperref warning - Token not allowed in a PDF string

text: When compiling a beamer presentation and using the following `\author` command               \author{Name \\ \texttt{my.email@domain.com}}      I get the following hyperref warning in my logfile               Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):     (hyperref)                removing `\\' on input line 15.               Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):     (hyperref)                removing `\new@ifnextchar' on input line 15.      I understand that this has to do with hyperref setting the PDF metadata, where the linebreak does’t make much sense and should be removed. Trying to set               \hypersetup{pdfauthor={Name}}      does’t change the situation, seems like hyperref is still looking at the author command. How do I get the desired display of author name with email and still keep hyperref happy?


title: Hyperref - Token not allowed

text: > **Possible Duplicate:**   >  Hyperref warning - Token not allowed in a PDF string The following code:               \subsection{The classes $\mathcal{L}(\gamma)$}      generates the errors:               Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):     (hyperref)                removing `math shift' on input line 1938.               Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):     (hyperref)                removing `\gamma' on input line 1938.               Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):     (hyperref)                removing `math shift' on input line 1938.      What do I have to do to keep `\gamma` in the subsection, so that it is also listed in the table of contents?


title: How do you allow math-mode characters to be displayed in the PDF index?

text: I have a few greek characters and subscripts in some chapter titles. When I use `hyperref` to create a PDF index, these math-mode characters are dropped from the titles in the index. Is it possible to get any of these rendered properly in the document index? Maybe this depends on the PDF viewer? If it matters, I'm using evince.


title: Token not allowed in a PDF string: hyperref warning affecting the bookmarks in the PDF

text: I have written a text in documentclass book and I have quite a lot of maths into subsections titles. These titles are of course correctly rendered in the pdf page but are not in the bookmarks: for example here it appears `2tt2+1` instead of what we'd expect out of `$\frac{2t}{t^2+1}$`. In particular **fractions** and **powers** make the issue.   An excerpt of my logfile with some variants of the warn:               Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):     (hyperref)                removing `math shift' on input line 189.     Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):     (hyperref)                removing `math shift' on input line 189.     [17] [18]     Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):     (hyperref)                removing `math shift' on input line 243.     Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):     (hyperref)                \kern 2.16713pt     (hyperref)                removed on input line 243.      I have read the answers to this question because my **warnings** all look a lot like the second and third warning mentioned there, but then I got **errors** both using `\texorpdfstring`+`\texttwosuperior` to try to fix powers, and also when adding options `pdfencoding=auto,psdextra` to hyperref package.   Is there a way to fix at least a part of such warnings?   I use MikTeX 2.9 and TeXnicCenter.      Known that the question is the one above, I think this would affect the quality of the pdf only sideways, would you agree with it, in typography/LaTeX point of view?   * * * Sorry if I wrote inappropriately, I had met this question before but I am not using beamer and my problem is not with author or metadata. My doubt was more related with this topic I linked above. Anyway after comments in **this** page I had a sensible improvement in my pdf output.


title: Custom class creating compilation problems

text: I tried adding my preamble to a new class file called `labs.cls`, in the same directory as my `lab1.tex` file. I then changed the preamble of my tex file to `\documentclass{labs}`. When I try to compile the tex file, I get this error:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9)     entering extended mode     (F:\Coding\phy-182\formal_lab_reports\1_formal_lab\lab1.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,     croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     (F:\Coding\phy-182\formal_lab_reports\1_formal_lab\labs.cls     Document Class: labs 2014-03-16 Formal lab style for Miami University     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo"))     (C:\Users\Nate\AppData\Roaming\MiKTeX\2.9\tex\latex\fancyhdr\fancyhdr.sty)     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\mh\mathtools.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\calc.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\mh\mhsetup.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty"     For additional information on amsmath, use the `?' option.     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amstext.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty"))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty")))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\was\gensymb.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.cfg")))     ! Missing = inserted for \ifnum.     <to be read again>                        -     l.2          ?      this is my class file:               \ProvidesClass{labs}[2014-03-16 Formal lab style for University]     \NeedsTeXFormat{LaTeX2e}          \LoadClass[letterpaper]{article}     \RequirePackage{fancyhdr}     \RequirePackage{mathtools}     \RequirePackage{gensymb}     \RequirePackage[margin=1in]{geometry}     \fontsize{12}{14}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0.4pt}     \linespread{2}     \AtBeginDocument{\thispagestyle{empty}}     \lhead{Nathan Mara}      Is there something that I'm doing wrong in this class file? I get the same error with even this tex file:               \documentclass{labs}          \begin{document}          \end{document}


title: Linewidth is Larger than the actual Linewidth

text: Ok I am creating a simple CV and in have the following problem. My `\linewidth` is actually larger than linewith. I tried to add `\noident` as stated on the following link overfull hbox despite of width=\linewidth I attach a minimal example and an image of the produced output where the problem is obvious.               \documentclass{article}     \usepackage{showframe}          \begin{document}     \fboxrule=1pt          \noindent     \fbox{     \begin{minipage}{0.9575\linewidth}     \begin{center}         {\huge  \textbf{Curiculum Vitae}} \\ \vspace{0.5cm}         {\LARGE  \textbf{My Very Long Name}}     \end{center}     \end{minipage}     }          \noindent     \fbox{     \begin{minipage}{\linewidth}     \begin{center}         {\huge  \textbf{Curiculum Vitae}} \\ \vspace{0.5cm}         {\LARGE  \textbf{My Very Long Name}}     \end{center}     \end{minipage}     }          \end{document}      ![enter image description here](http://i.stack.imgur.com/7UVrZ.png)


title: Flush \thanks to the left margin and turn of text justification

text: I use `footmisc` to modify the layout of my footnotes such that the footnote marker and the footnote text flush to the left margin, and I turn off the justification and hyphenation in the footnotes with `\raggedright`. How can I do these things in the argument of the `\thanks` command? Since I tend to use the package `titling` for modifying `\maketitle`, I assume it's best to stick to that package for modifying `\thanks` as well. The problem is that I understand almost nothing of the documentation for that package.               \documentclass{article}     \usepackage[flushmargin,hang]{footmisc}         \renewcommand{\footnotelayout}{\raggedright}     \begin{document}     \title{My title\thanks{These are the people I wish to thank. I need to add more words to      demonstrate that there is right-edge justification in this line.}}     \maketitle     A sentence.\footnote{A footnote which I intend to be long enough to demonstrate that      there is no right-edge justification.}     \end{document}      ![enter image description here](http://i.stack.imgur.com/IqD2X.png)


title: Plus sign in the middle of a ring

text: I would like to draw in `chemfig` the following picture: ![enter image description here](http://i.stack.imgur.com/Z2ALH.jpg) But I am struggling with the "+" sign in the middle of the circle. Is there a way to draw it? Thank you! What I have so far is this:               \documentclass{article}     \usepackage{chemfig}     \begin{document}          \chemfig{       N**[0,-150,dash pattern=on 2pt off 2pt]5(         (-R)-(-R^1)-[,,1,2]{+\hspace{0.3cm}}|{O}-[,,2,1]--       )     }          \end{document}      which does the work, but I really don't like the way it is done (e.g. it does not scale).


title: Keeping consistent twoside margins across different pagenumbering styles

text: I'm writing a report which needs to be bound, and as such I'd like to use the twoside option. However, the first few pages of the report are causing some issues with the ordering. In the MWE below, the title page has no displayed page number, and is a verso page. The pages for the abstract and table of contents switch to roman numbering, and as a result the title page and abstract page are both verso. The page numbers for the actual report have arabic numbering, and this results in pages 4 and 5 both being verso. What is the best way to keep the correct margins across these numbering switches? Perhaps something like using a hidden counter for the page numbers used by twoside to determine the margins would work, but I don't know how to do that.               \documentclass[a4paper,11pt,twoside]{article}          \author{A Name}     \title{A Title}          \begin{document}     \maketitle     \thispagestyle{empty}     \newpage     \pagenumbering{roman}          \begin{abstract}       We discuss the joys of \LaTeX     \end{abstract}     \newpage     \tableofcontents     \newpage     \mbox{}     \newpage          \pagenumbering{arabic}     \section{One}     \section{Two}          \end{document}


title: Subsection numbering with prefix

text: How to set custom subsection numbering? I want to have prefix "KAT/" before number, it should look like this: KAT/001 Client - blablabla KAT/002 Visit - blablabla KAT/003 User - blablabla What is important - I used               \setcounter{secnumdepth}{0}      in order to turn off numbering, I just want to have that custom numbering inside one specific section.


title: Table skipping section?

text: I have one main section along with 5 subsections. One of the subsections has a table that cannot fit in half a page, and hence needs to be fitted in the next one. However, the table skips all the other subsections !! How can I fix this ? Here is the pic : note:(The table should be under subsection 1.4.2) ![enter image description here](http://i.stack.imgur.com/R5VtL.png) Code used :               \begin{table}[h]     \centering     \caption{Resources}     \label{resource}         \begin{tabular}{|l |l |p{10cm}| }     .     .     .         \hline         \end{tabular}     \end{table}


title: Referencing the contents of lasttikznode, and overlaying them on a node

text: I am trying to solve How to rotate a composition of Tikz nodes correctly, without rotating the text of their labels?; and I found tikz pgf - Problem with "append after command" and "insert path". This gave me the following idea - define a style, such that it simply places another node on top of the "current" one, with a colored background so the new node obscures the old, and with the same contents of the "current" node, but rotated. This is how far I got:               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{positioning}     \usetikzlibrary{fit}          % http://tex.stackexchange.com/questions/55722/problem-with-append-after-command-and-insert-path     \makeatletter     \def\mymacro{     \begin{scope}     % { % MUST have this group! or scope!       \setbox\tikz@figbox=\box\pgfutil@voidb@x       \node at (\tikzlastnode) [fill=yellow] {\rotatebox{180}{YY}}; %     % }     \end{scope}     }     \makeatother          \tikzstyle{drc} = [draw, rectangle, line width=1pt, align=center,     append after command={\pgfextra{\mymacro}},     % insert path={\pgfextra{\mymacro}}, % no \tikzlastnode     ]          \begin{document}          \begin{tikzpicture}[line width=3mm]     \node[drc] at (0,0) {\ \ A};     \node[drc] at (1,1) {B\ \ };     \end{tikzpicture}     \end{document}      This is the output: ![test61.png](http://i.stack.imgur.com/vpnNX.png) The problems/questions are:   * The appended node is _behind_ the original node, so its fill cannot obscure the original node - any way to get it in front of the original node?    * I'm just having the letters `YY` for a test - but I'd rather "extract" the text of `\tikzlastnode`; however, it seems that `\tikzlastnode` is basically just the name of the last node, not an "object reference". In any case, is there a way to extract and reuse the text of `\tikzlastnode`?


title: Updating picture after \pause

text: I'm trying to make a slide where I'd start showing with a picture and then adding one by one items (in a \itemize structure) and I'd like the same picture to change for another one once introduced the third item. Is there a way to do that without making a total new slide? Cheers.


title: How to define command with *

text: > **Possible Duplicate:**   >  Defining starred versions of commands I have some user command:               \newcommand{\mysection}[1]{\section{#1}}      Now I need to use command:               \mysection*{name of section}      But this case works bad. How I must define `\mysection*` command? Can anybody help me? This must be some like that:               \newcommand{\mysection*}[1]{\section*{#1}}


title: How do I write a starred macro?

text: > **Possible Duplicate:**   >  Defining starred versions of commands I want to write a macro that has a starred version, e.g.               \newcommand*{\blah}{{\bfseries blah}}     \newcommand*{\blah*}{{\itshape blah}}      but when I do that I get an error: "Command already defined" I looked through latex.ltx, but couldn't figure it out. Thanks.


title: automatic list/table rendering

text: i'm looking for a solution to automatically render data lists. In the current scenario, my input data is a list of strings, which should be displayed in a three column list w/ sequential numbers:               +--------------+-------------+------------+     | 1  xyzxyz    | 2  sadsdasd | 3  sadasdf |     | 4  dfasdfas  | 3  23ea3ad  | 4  898sd   |     |                   .....                 |     +-----------------------------------------+      For now, it's enough having a fixed number of items (in my case: 30), so I've just defined 30 different macros with the values, which are then referenced by the template, where everything's just hardcoded. Of course, that's pretty static, so I'm looking for a better solution, where the tex input just defines the data like that: \putItem{xyzxyz}   \putItem{sadsdasd}   \putItem{dfasdfas}   \putItem{23ea3ad}   \putItem{898sd}   ... Does anyone have a good idea ? thx


title: Problem with horizontal and vertical centering of multiline cells in a table

text: I'm having difficulties perfectly centering (both horizontally and vertically) a few cells in my table. Here is a screenshot of what it looks like right now: ![Screenshot of my table](http://i58.tinypic.com/1z5l0ti.png) The problem line is the one which begins with "Courant", "Champ magnétique", etc. The text is rather centered, but is frustratingly slightly aligned to the left... Here is my code:               \begin{table}[h]     \centering     \caption{Variation de l'amplitude de la force électromotrice en fonction du courant circulant dans des bobines d'Helmholtz à une fréquence de rotation de la bobine d'induction constante ($(40\pm2)$ Hz)}     \label{tableau1}     \begin{tabular}{|>{\centering\arraybackslash}m{1.25cm}|>{\centering\arraybackslash}m{1.25cm}|>{\centering\arraybackslash}m{1.25cm}|>{\centering\arraybackslash}m{1.25cm}|>{\centering\arraybackslash}m{1.3cm}|>{\centering\arraybackslash}m{1.3cm}|>{\centering\arraybackslash}m{2cm}|>{\centering\arraybackslash}m{2cm}|}     \hline     \multicolumn{2}{|>{\centering\arraybackslash}m{2.5cm}|}{Courant} & \multicolumn{2}{>{\centering\arraybackslash}m{2.5cm}|}{Champ magnétique} & \multicolumn{2}{>{\centering\arraybackslash}m{2.6cm}|}{Force électromotrice expérimentale (amplitude)} & \multicolumn{2}{>{\centering\arraybackslash}m{4cm}|}{Force électromotrice théorique (amplitude)} \tabularnewline     \hline     $I_1$ & $\Delta I_1$ & $B$ & $\Delta B$ & $\epsilon_{Exp. 0}$ & $\Delta \epsilon_{Exp. 0}$ & $\epsilon_{Th. 0}$ & $\Delta \epsilon_{Th. 0}$ \tabularnewline     \hline     (A) & (A) & (mT) & (mT) & (V) & (V) & (V) & (V) \tabularnewline     \hline     0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \tabularnewline     \hline     0,55 & 0,04 & 0,50 & 0,04 & 0,10 & 0,04 & 0,90 & 0,02 \tabularnewline     \hline     1,00 & 0,04 & 0,91 & 0,05 & 0,20 & 0,04 & 0,16 & 0,04 \tabularnewline     \hline     1,50 & 0,05 & 1,36 & 0,07 & 0,28 & 0,04 & 0,25 & 0,05 \tabularnewline     \hline     2,00 & 0,05 & 1,81 & 0,08 & 0,39 & 0,04 & 0,32 & 0,07 \tabularnewline     \hline     2,50 & 0,06 & 2,3 & 0,1 & 0,47 & 0,04 & 0,41 & 0,09 \tabularnewline     \hline     3,20 & 0,06 & 2,9 & 0,1 & 0,57 & 0,04 & 0,5 & 0,1 \tabularnewline     \hline     3,52 & 0,07 & 3,2 & 0,1 & 0,66 & 0,04 & 0,6 & 0,1 \tabularnewline     \hline     \end{tabular}     \end{table}      Thanks!


title: Correct way to typeset a bold and dotted math symbol?

text: OK, I've seen related questions which indicate that you only bold the main symbol and not subscripts, and a few other almost related questions. But what about when you are using a bold math symbol dotted? That is, I have a letter which represents a vector. We've been writing vectors as bold letters, i.e `\mathbf{u}`. We represent the first time derivative of this symbol by putting a dot on it. Should I bold the dot or not? That is choice:   1. `\mathbf{\dot{u}}`, or    2. `\dot{\mathbf{u}}` _Edit_ : All things equal, I prefer the way choice 2 looks.


title: How to place footnote under TABLE in ConTeXt?

text: I need to place footnotes, declared inside `\bTABLE` `\eTABLE`, just under the table, delimited with a short rule.               |----------|     |   table  |     |----------|     _______      *footnote      I also need to `\placetable` this table correctly. This               \usemodule  [simplefonts][size=12pt]     \setmainfont[dejavusans][expansion=quality,protrusion=quality]     \setupTABLE[frame=on,offset=1mm]          \starttext          \startlocalfootnotes     \placetable[right,none]{}{       \bTABLE       \bTR \bTD text \eTD            \bTD other \footnote{text} \eTD \eTR       \bTR \bTD[nc=2] very long \footnote{not very} text \eTD \eTR       \eTABLE       \placelocalfootnotes     }     \stoplocalfootnotes          \stoptext      variant does not work. `\placefigure` just doing nothing. The table is not aligned to right.


title: \printbibliography is always blank (warnings given)

text: I cannot get a bibliography working using biblatex. Even the most basic example doesn't work.               \documentclass{article}           \usepackage{filecontents}          \begin{filecontents*}{refs.bib}     @BOOK         {KandR,          AUTHOR  = "Kernighan, Brian W. and Ritchie, Dennis M.",          TITLE   = "{The C Programming Language Second Edition}",          PUBLISHER = "Prentice-Hall, Inc.",          YEAR = 1988         }     \end{filecontents*}          \usepackage{biblatex}      \addbibresource{refs.bib}           \begin{document}           Hello \cite{KandR}     \printbibliography           \end{document}      As far as I can understand, I run the following commands on the file (test1.tex):               pdflatex test1        (This gets some warnings, but ignore)     biber test1     pdflatex test1      biber gives a warning:               WARN - Warning: Found biblatex control file version 2.5, expected version 2.3      The second pdflatex command gives warnings:               LaTeX Warning: Citation 'KandR' on page 1 undefined on input line 20.     LaTeX Warning: Empty bibliography on input line 21.     LaTex Warning: There were undefined references.       I have tried several things already:   * Using the bibtex command gives:              The top-level auxiliary file: test1.aux     I found no \citation commands---while reading file test1.aux     I found no \bibdata command---while reading file test1.aux     I found no \bibstyle command---while reading file test1.aux        * Using [backend=biber] doesn't change anything Some notes:   * Windows 8   * MikTex 2.9   * TeXworks \-


title: Make LaTeX prefer bottom to top for float placement

text: As explained in this comprehensive answer on floats, the order of the `[htb]` parameters does not matter and if you allow all of them, LaTeX tries first to place them in the 'here' position, then top, then bottom. I would like to change this order to here, bottom, top. Now, of course I could ban the top position outright using `[hb]`, but that's not really what I want. I just want LaTeX to strongly prefer the bottom position to the top, just like it currently prefers top to bottom. Is there a (resonable) way to achieve that?


title: Extend vertical line in table

text: The following code:               \documentclass[12pt]{article}     \begin{document}          \begin{table}[t]     \centering     \begin{tabular}{c|cccccccc}     \hline     id & \multicolumn{4}{c|}{Col1} & \multicolumn{4}{c}{Col2}\\       & 0.5 & 1.0 & 3.0 & 5.0 & 0.1 & 0.5 & 1.0 & 3.0 \\     \hline     $1$  & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 \\     $2$  & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 \\     $3$  & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 \\     $4$  & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 \\     $5$  & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 \\     $6$  & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 \\     \hline     \end{tabular}     \end{table}          \end{document}      produces a table that looks like this: ![enter image description here](http://i.stack.imgur.com/vcwGv.png) I need to make it so the vertical line will extend to the second row too and stop there. How can I do this?


title: How to move a figure to an other page?

text: I make two pictures with TikZ in two figures at top of each secion.   I refer their position at the end of each section.   Can you suggest a way to move them arbitrarily?   ## My problem is lables They should make before using them.   Here is my entire code to show an example of a table (splited by lines) which forced me to locate the figure at the beginning of the section:               \documentclass{article}     \usepackage[a4paper]{geometry}          % and other necessary packages          \begin{document}     \section{جلسه اول}          \begin{figure}     \centering     \subfloat[سوال اول و دوم]{\label{fig:J55VH}     \begin{tikzpicture}     \filldraw [black] (.5,.5) rectangle (.75,.75);       \foreach \x in {.125,.375,...,1.125}         \foreach \y in {.125,.375,...,1.125}           \draw (\x,\y) +(-.125,-.125) rectangle ++(.125,.125);     \end{tikzpicture}}     \caption{جلسه اول(خانه‌های مشکی حذف شده‌اند.)}     \end{figure}          \begin{prob}     شکل     \ref{fig:J55VH}     را با تعداد کافی از مهره‌ی     \ref{fig:LP}     بپوشانید.     \end{prob}          \begin{prob}     شکل     \ref{fig:J55VH}     را با تعداد کافی از مهره‌ی      \ref{fig:3t1}     بپوشانید.     \end{prob}          \end{document}


title: The TeXbook: Spiral or hard-cover binding?

text: I would like to purchase Donald Knuth's TeXbook, and I have noticed that there are two versions available. One is a spiral-bound edition, usually sold by itself. The other is a hard-cover edition, available both by itself or as part of a boxed set of five volumes (Knuth's Computers and Typesetting series). The price difference between the two is minimal, so I'm unsure which to purchase. If anyone here owns one or both editions, perhaps they could answer at least some of the questions below, to help me make up my mind.   1. Can the hard-cover edition stay open when placed on a surface (like many mathematics textbooks), or does it have to be propped open by the reader (like many hard-cover novels, which usually have very tight bindings)?   2. What is the cover of the spiral-bound edition like? Does it stand up well to repeated handling?   3. I have read reviews of the spiral-bound edition stating that the pages often fall out from the end of the book. Is this a serious problem?   4. Are there any other considerations to bear in mind when making a choice between these two editions?


title: ConTeXt mkIV and XML: how do you define a self-closing tag with no content to pass?

text: I am using TEI Lite, and trying to typeset with ConTeXt. TEI Lite defines `<divGen type='toc' />` to signal the Table of Contents, which in ConTeXt is `\completecontents` Now I am trying this:               \startxmlsetups xml:divGen[@type='toc']                     \completecontents     \stopxmlsetups      but it's not working. How do I map this self-closing tag to the ConTeXt Table of Contents command?


title: Custom titlemarks

text: My title marks are not working as I want them to. I had to move away from using the native `section` and `subsection`and therefore my title marks does not work. I had a look at the `extramarks` feature of the `titelps` package but can't figure it out especially to use alongside the `titlesec` package. On page 3 of this MWE this is the idea of what I want: ![Correct](http://i.stack.imgur.com/mPXjW.png) However, this is what I get because the `section` and `subsection` does not register: ![Problem](http://i.stack.imgur.com/mCBiZ.png) How do I add `Section` and `Subsection` into the title marks? Or else how do I force `section` and `subsection` to still increment and actually work in the title marks? This question relates to the discussion in one of my old questions. Calculating the exact width of text and the lettrine Please run in **XeLaTeX.**               \documentclass[pagesize=pdftex, fontsize=12]{scrbook}     \usepackage[paperwidth=15.6cm, paperheight=23.4cm, top=2cm,bottom=1cm, left=1cm, right=1cm]{geometry}     \usepackage[pagestyles]{titlesec}     \usepackage{lettrine}     \usepackage{xltxtra}     \usepackage{tocloft}     \usepackage{etoolbox}     \usepackage[toc]{multitoc}     \usepackage{setspace}     \usepackage{needspace}     \usepackage{calc}     \usepackage{fix2col} %fixes numbering of the sections in the header for two columns          \defaultfontfeatures{Mapping=tex-text}     \setmainfont{Times New Roman}          \usepackage{polyglossia}          \setmainlanguage{spanish}           \renewcommand{\thesection}{\arabic{section}}     \renewcommand{\thesubsection}{\arabic{subsection}}          \setcounter{tocdepth}{0}     \setcounter{secnumdepth}{2}          % sets the marks to be used (section and subsection)     \setmarks{section}{subsection}          % definition of the page style with required headers     \newpagestyle{Biblestyle}{       \setheadrule{.02pt}       \sethead[\thepage][\chaptertitle][\firsttitlemarks\thesection:\ifthesubsection{\firsttitlemarks\thesubsection}{1}---\bottitlemarks\thesection:\bottitlemarks\thesubsection]{\firsttitlemarks\thesection:\ifthesubsection{\firsttitlemarks\thesubsection}{1}---\bottitlemarks\thesection:\bottitlemarks\thesubsection}{\chaptertitle}{\thepage}     }          \addtokomafont{disposition}{\rmfamily\mdseries}          \newcommand{\newtocname}{\LARGE{TABLA DE LOS LIBROS DEL}}     \renewcommand*\cfttoctitlefont{\huge\hfill}     \renewcommand*\cftaftertoctitle{\hfill}     \renewcommand{\cftchapdotsep}{\cftdot}     \renewcommand{\cftpartfont}{\bfseries}     \renewcommand{\cftchapfont}{\mdseries}     \cftpagenumbersoff{part}     \renewcommand{\cftchappagefont}{\hfill\mdseries}     \setlength{\cftbeforetoctitleskip}{-4.7em}     \setlength{\cftaftertoctitleskip}{1pt}     \setlength{\cftbeforechapskip}{.1em}     \setlength{\cftbeforepartskip}{.1em}     \setlength{\columnsep}{3em}     \setlength\columnseprule{.4pt}          \newcommand{\Sectionnumber}{%       \sbox\Sectionbox{\smash{\raisebox{-\baselineskip}{%         \fontsize{2.2\baselineskip}{0}\selectfont\theSection}}\enspace}}          \newcounter{Section}     \newcounter{Subsection}[Section]     \newlength{\Sectionwidth}     \newif\ifFirstSubsection     \newsavebox{\Sectionbox}          \makeatletter     \newcommand{\Section}{%       \par\vskip\z@ \@plus 2\p@       \FirstSubsectiontrue\clubpenalty\@M       \refstepcounter{Section}\stepcounter{Subsection}%       \Sectionnumber\setlength{\Sectionwidth}{\wd\Sectionbox}%       \hangindent\Sectionwidth\hangafter-2       \leavevmode\llap{\box\Sectionbox}\ignorespaces}     \newcommand{\Subsection}{%       \par\clubpenalty\@clubpenalty       \ifFirstSubsection         \ifnum\prevgraf=\@ne\nobreak\hspace*{\Sectionwidth}\fi         \FirstSubsectionfalse       \fi       \refstepcounter{Subsection}\textbf{\theSubsection}\enspace\ignorespaces}     \makeatother          \parindent=0pt     \parskip=0pt          \begin{document}     \frontmatter     \renewcommand{\contentsname}{\newtocname}     \tableofcontents          \mainmatter     \setlength\columnseprule{0pt}     \pagestyle{Biblestyle}          \twocolumn[\vspace{-0.5cm}\center{\textbf{\Huge{Génesis}}}\vspace{0.5cm}]          \addtocounter{chapter}{1}     \renewcommand{\chaptertitle}{Génesis}     \setcounter{section}{0}          \Section EN el principio crió Dios los cielos y la tierra.     \Subsection Y la tierra estaba desordenada y vacía, y las tinieblas estaban sobre la haz del abismo, y el Espíritu de Dios se movía sobre la haz de las aguas.     \Subsection Y dijo Dios: Sea la luz: y fué la luz.     \Subsection Y vió Dios que la luz era buena: y apartó Dios la luz de las tinieblas.          \Section Y FUERON acabados los cielos y la tierra, y todo su ornamento.     \Subsection Y acabó Dios en el día séptimo su obra que hizo, y reposó el día séptimo de toda su obra que había hecho.     \Subsection Y bendijo Dios al día séptimo, y santificólo, porque en él reposó de toda su obra que había Dios criado y hecho.     \end{document}


title: A big thick question mark

text: I'm using `\ding{52}` and `\ding{56}` from the `pifont` package to get nice satisfying thick ticks and crosses. I'd like a question mark `?` that fits with these. `\textbf{?}` is too small, and not thick enough. (And ideally, I'd like it to be a bit more "hand drawn".) Does anyone have a suggestion? (Either a way to get a `?` that looks good with the `pifont` ticks and crosses, or a way to do all three in a consistent way other wise? Here's an example of the code I'm using.                 \begin{itemize}[<+->]       \item[\onslide<+->{\ding{56}}] Foo       \item[\onslide<+->{\ding{52}}] Bar       \item[\onslide<+->{\ding{52}}] Stuff       \item[\onslide<+->{\textbf{?}}] Things       \end{itemize}


title: How to get spacing in math mode without just repeating fixed spaces (tilde ~)?

text: I'm looking for a way to move text in my equation, instead of just shoving multiple `~~~~` until it's in the right position. I'm quite new to LaTeX, what exactly would be the command? I'm also looking for a way such that this command won't move the position of anything anything before it, but of course moves forward everything in front. Right now I have:               \begin{equation*}     \begin{aligned}     \frac{\partial \Psi}{\partial x} &= 0     \mbox{ for } 0 \leq y \leq b \\     \frac{\partial \Psi}{\partial y} &= 0     \mbox{ for } 0 \leq x \leq a \\     \end{aligned}     \end{equation*}      I'm trying to increase the distance between the end of the fraction and the start of the text "for".


title: How to trim / clip / crop graphics without trial and error?

text: Often I include graphics with the trim option. Everytime I have to start a trial and error search for the right values. Is it possible to do it more straight forward?


title: TikZ: turning edges into arrows using "child" notation

text: I'm using TikZ for the first time to draw a simple Kripke model, and I'm using the `child` notation to produce new nodes. How can I turn my edges into arrows?               \begin{tikzpicture}       \node [circle,draw] (q0) {}       child {node [circle,draw] (q1) {$p$}         child {node [circle,draw] (q4) {$p$}           child {node [circle,draw] (q7) {$p\land q$}}           child {node [circle,draw] (q8) {$p\land q$}}           child {node (q9) {} edge from parent[->, dashed]}}         child {node [circle,draw] (q5) {$q$}}         child {node (q6) {} edge from parent[dashed]}}       child {node [circle,draw] (q2) {$p$}}       child {node (q3) {} edge from parent[dashed]};     \end{tikzpicture}      I know how to change the color or thickness of all edges by passing an option at the beginning of `\begin{tikzpicture}`, but I can't turn them into arrows. Also, while we're at it, is there a way to label these edges? Or am I left with simply using `node` notation for all my nodes? Thanks for all your help,   Piotr


title: Instant Rebuild & View of LaTeX Buffer in AUCTeX

text: Is there a command in latex-mode when using Emacs+AUCTeX that combines `TeX- command-buffer` and `TeX-view` into one single instant redisplay command? I don't see the point in having two separate key combos for this operation.


title: Includegraphics maximum width

text: With `\includegraphics` I can give the width of the resulting image (which would be scaled). How can I give a maximum width of the image? That is, if the original is smaller than X, I'd like to keep the smaller image, if the image is larger than X, then the image width should be X. Using `pdflatex`/`graphicx`.


title: Short version of emph?

text: Is there something like a short version of `\emph`? What I want is something comparable to `\lstShortInline` or what the `shortvrb` provides, just not for the `\verb` command but for the `\emph` command instead. E.g. instead of `This is an \emph{important} test.`, I want to write `This is an |important| test.` or something similiar.


title: Customizing chapter's titles in the Bringhurst style

text: I use `classic thesis` and I wondered if someone tried to customize the title of the chapters in the way Robert Bringhurst did in his _The Elements of typographic style_ ? If it was the case, please let me know.


title: Shading faces of solid (described using using \parametricplotThreeD)

text: Does anyone know how to shade only one of the faces of a solid whose faces are described using parametricplot? For example, shade the faces of the solid below? In general, how to color each of the sides with different colors/patterns? It might be necessary to change the whole code (?) Thank you!               \documentclass[pstricks,border=2mm]{standalone}     \usepackage{pstricks}     \begin{document}              \begin{pspicture}(-1.5,-1)(2.5,2)         \psset{unit=2cm,Alpha=70,Beta=15,fillstyle=solid}         %\psgrid         \pstThreeDCoor[linecolor=gray,xMin=0,xMax=2,yMin=0,yMax=2,zMin=0,zMax=1.5]              \pstThreeDLine[linecolor=lightgray]{-}(1,-0.1,0)(1,0.1,0)         \pstThreeDPut(1,-0.2,0.1){$1$}              \pstThreeDLine[linecolor=lightgray]{-}(-0.1,1,0)(0.1,1,0)         \pstThreeDPut(-0.3,1,0.1){$1$}              \pstThreeDLine[linecolor=lightgray]{-}(-0.1,0,1)(0.1,0,1)         \pstThreeDPut(-0.3,-0.3,1){$1$}                   \parametricplotThreeD[linecolor=black,%          linewidth=.5pt,xPlotpoints=200,%         plotstyle=curve,arrows=-](0,90){%          t cos %          0 %          t sin}%         \parametricplotThreeD[linecolor=black,%          linewidth=.5pt,xPlotpoints=200,%         plotstyle=curve,arrows=-](0,90){%          t cos %          t sin %          0}%         \parametricplotThreeD[linecolor=black,%          linewidth=.5pt,xPlotpoints=200,%         plotstyle=curve,arrows=-](0,90){%          t cos %          t sin %          t sin }%         \parametricplotThreeD[linecolor=black,%          linewidth=.5pt,xPlotpoints=200,%         plotstyle=curve,arrows=-](0,1){%          0 %          1 %          t}%         \parametricplotThreeD[linecolor=black,%          linewidth=.5pt,xPlotpoints=200,%         plotstyle=curve,arrows=-](0,1){%          0 %          t %          1}%          \parametricplotThreeD[linecolor=black,%          linewidth=.5pt,xPlotpoints=200,%         plotstyle=curve,arrows=-](0,1){%          0 %          0 %          t}%              \psline[linewidth=0.5pt]{->}(1.2,-0.6)(0.5,-0.3)         \put(1.3,-0.7){$x^2+y^2=1$}              \psline[linewidth=0.5pt]{->}(-1.1,0.5)(-0.4,0.35)         \put(-2.2,0.5){$x^2+z^2=1$}              \end{pspicture}     \end{document}


title: How can I set lateral margins to every paragraph, but not other elements?

text: I would like to obtain narrow paragraphs within wide pages, so that section titles, figures, tables, may all be wide, and paragraphs may all be narrow.               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}          \setlength{\parindent}{0pt} % so we can see better what is happening          \newenvironment{narrowpar}% I’d like every paragraph to follow these rules.     {\begin{list}{}{%     \setlength{\listparindent}{\parindent}%     \setlength{\itemindent}{\parindent}%     \setlength{\leftmargin}{2cm}%     \setlength{\rightmargin}{2cm}%     }\item }%     {\end{list}}          \begin{document}              \section{A section title that ranges across the page}          This is a paragraph (Loret Ipsum So On). And below, an equation that can make use of the whole page width:          \begin{equation}     p v = R T     \end{equation}          Here is another paragraph.          \begin{narrowpar}     This very text looks exactly the way I would like my paragraphs to look. But unfortunately it forces me to insert code manually before and after every paragraph in the source file.     \end{narrowpar}          \end{document}      ![what I wish to obtain](http://i.stack.imgur.com/BMvH1.png) Said in a different way, I am trying to control lateral space ("padding left and right" in HTML/CSS speak) for all paragraphs, without using page margins. I would appreciate any help...