title: Put a marginpar before or after word it is supposed to be aligned to?

text: I am putting marginpars into the text to help the reader find important terms in my text. Now, where am I supposed to put the marginpar so that it aligns with the term? `Let us define \marginpar{Ipsum}\emph{Ipsum}: ...` or `Let us define \emph{Ipsum}\marginpar{Ipsum}: ...` (Bonus: Will putting it after the colon mess anything up?) `Let us define \emph{Ipsum}:\marginpar{Ipsum} ...`


title: How to change section style using sciposter

text: I am trying to get rid of the default "boxedsections" with shadows used in the sciposter class and replace them with either "plainboxedsections" or "plainsections". In the manual three heading options are mentioned, but not how to switch between them.


title: Is it possible to use hyperref, subfigure, and memoir together?

text: I asked a question about how to use subfigure with memoir. I got some great tips, but now pdflatex is making all subfigure hyper-refs point to the first couple subfigures. It also gives me this error:               destination with the same identifier (name{subfigure.3}) has been already used, duplicate ignored      for every subfigure (except the first one at any index, i.e., the first {subfigure.n} gets no error for every n.) I was pointed to this, but hyperref is the last package loaded. Has anyone gotten this working? * * * Solution: Make sure that               \newsubfloat{figure}      follows               \usepackage{hyperref}


title: How to input open intervals

text: I want to write open and half-open intervals using the following notation:               ]a, b[     ]a, b]     ]-∞, b]      When writing them just like that in the LaTeX source, the spacing doesn't come out right. For example, for this equation:                \(X = ]-\frac{π}{2}, +\frac{π}{2}[\)      the minus sign is typeset as a binary operator. I can solve this by surrounding the whole value in braces, but then the spacing around the equal sign is still not correct. For other combinations of intervals and operators, different spacing inconsistencies arise. What is the correct and easy way to input intervals in order to avoid having to take care of this at all?


title: How to prevent verbatim from generating linebreak?

text: I tried:               \begin{verbatim} is_terminating() \end{verbatim} function can be implemented as follows:      But the text after verbatim section will be printed in a next line, is there a way to prevent this happen? Thank you.


title: BibTeX: .bst Style is Applied on Bibliography, but not on The Citations

text: I'm not a very experienced `LaTeX` used. ## What I Created:   * a `.tex` file using `LyX`   * a `.bib` bibliography using `JabRef`   * also my own suitable `.bst` style for `BibTeX` using `custom-bib`'s `makebst` ## `pdflatex`'s Output: (the `.pdf` file produced by `pdflatex file.tex` - converted to plain text)               Meine QuellenangabeLundberg vgl. 2003, 3, direkt vor dem restlichen     Text.          Literatur                           # German for bibilography         Lundberg, Ulla-Lena (2003). Selbstporträt mit Flügeln. Stuttgart: Klett-         Cotta.      ## My Problem: The bibliography is perfect this way, but the citations in the text aren't acceptable:               Text beforeLundberg vgl. 2003, 3 text after      But I'd like the citations to be like:               Text before (vgl. Lundberg 2003: 3) text after      That's the way my `.bst` file styles citations. But it seems like my `.bst` file is applied just on the bibliography, but not on the citations in the text. ### [Update] Using `\citep` instead of `\citealt`, my citation `\citep[vgl.][3]{Lundberg}` now look like this:               Text before (vgl. Lundberg, 2003, 3) text after      How can I replace the `,` before the page number by colon and space (`:`)? (To like like this:)               Text before (vgl. Lundberg, 2003: 3) text after      ## My Question: How can I get `LaTeX` to **style the citations** in the text as described above? - I want my **`.bst` style** to get applied on my citations too. Thanks for your ideas, for your answers. - If my question isn't clear this way, please write a comment to inform me about that. ## The Sources:               % file.tex     \documentclass[12pt,ngerman]{article}     \usepackage{helvet}     \renewcommand{\familydefault}{\sfdefault}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage[authoryear]{natbib}          \makeatletter     \@ifundefined{date}{}{\date{}}     \makeatother          \usepackage{babel}     \begin{document}     \bibliographystyle{file}     Meine Quellenangabe\citealt[vgl.][3]{Lundberg}, direkt vor dem restlichen Text.     \bibliography{file}          \end{document}               % file.bib     @BOOK{Lundberg,       title = {Selbstporträt mit Flügeln},       publisher = {Stuttgart: Klett-Cotta},       year = {2003},       author = {Ulla-Lena Lundberg},       timestamp = {2013.01.07}     }               % file.bbl     \begin{thebibliography}{1}     \providecommand{\natexlab}[1]{#1}     {\catcode`\|=0\catcode`\#=12\catcode`\@=11\catcode`\\=12     |immediate|write|@auxout{\expandafter\ifx\csname       natexlab\endcsname\relax\gdef\natexlab#1{#1}\fi}}          \harvarditem{Lundberg}{2003}{Lundberg}     Lundberg, Ulla-Lena \harvardyearleft 2003\harvardyearright{}.     \newblock Selbstporträt mit Flügeln.     \newblock Stuttgart: Klett-Cotta.          \end{thebibliography}


title: How to get refcheck output to TeXnicCenter?

text: I'm using TeXnicCenter. And I'm using the `refcheck` package to display unreferenced labels. This works just fine. Problem is that the log output (that is actually written to the `.log` file) from `refcheck` is not displayed in TeXnicCenter (the regular log info from `pdflatex.exe` is displayed without problems). Is there a way to display it?


title: Increasing spacing between the rows of a table containing both equations and words

text: Below is some code I am working with.               \begin{tabular}{l|m{4.75in}}     Equation 1 & $y^{10} + x^{6} + 7x^{3} + 6y^{11}$\\\hline     Equation 2  & $\begin{alignedat}{1}(n + 1)^{2}u_{n + 3} &+ (n^{4} + 4n^3 + 3n^{2} + 2n + 1)u_{n + 2} + (5m^{9} + 6m^{7} + m^{6})u_{n + 1} + p^{7} \\&+ (n^{20} + n^{19} + n^{18} + n^{17} + n^{16} + n^{15} + 5n + 2)u_{n + 10}\end{alignedat}$\\\hline     Notes & This is some equation\\\hline     \end{tabular}      How does one increase the vertical spacing between Equation 1 and Equation 2? In the output the top of Equation 2 touches the horizontal line from the bottom part of Equation 1. I've tried `\renewcommand{\arraystretch}{1.5}` but that doesn't seem to work with the `alignedat` environment. Since I have many of these tables with similar code, it would also be nice if I didn't have to go through each one manually.


title: Vertical trees with TikZ

text: > **Possible Duplicate:**   >  Drawing a directory listing a la the tree command in TikZ Is there a way to configure the trees drawn by TikZ to have child nodes at the same level listed below each other? Basically, I want something similar to the output of the `tree` command in a Command Prompt.               \documentclass{article}     \usepackage{tikz}          \begin{document}          \section*{TikZ tree}     \begin{tikzpicture}     \node {toplevel}          child { node {Foo}                 child { node {foo} }                 child { node {bar} }                 child { node {baz} }         }         child { node {Bar}             child { node {foo} }             child { node {bar} }             child { node {baz} }         }         child { node {Baz}             child { node {foo} }             child { node {bar} }             child { node {baz} }         };     \end{tikzpicture}          \section*{Desired tree structure}     \begin{verbatim}     toplevel     |-- Foo     |   |-- foo     |   |-- bar     |   `-- baz     |-- Bar     |   |-- foo     |   |-- bar     |   `-- baz     `-- Baz         |-- foo         |-- bar         `-- baz     \end{verbatim}          \end{document}


title: gradient of color in one cell follow up question

text: So I have a gradient in my cell using TikZ, which is nice. However I still have a few problems:   1. The text itself has its color changed, whereas I would want only the background color to be changed. The horizontal line beneath the text also faces the same problem (it's a `\hline`, since I'm inside a tabular).   2. The vertical lines aren't aligned with the rest of my tabular, if I just add `|c|` to the initial `c` in the multicolumn function. Link to the related question: Gradient color in one cell of a table.


title: latex chapter not included in table of content

text: I have created chapter by               \chapter{"one"}      I want this to be visible in my table of contents but when I do `\tableofcontents`. I cannot see them. Can anyone tell me how to include chapters in table of contents? I am using latex in ubuntu 12.04. For instance if `\chapter{"one"}` is in page 20 and is the third chapter. Then in table of contents I should see `3\. One 20` Something like this. ## Edited version Here is a small sample latex script. I have used acm template:               \documentclass[prodmode,acmtap]{acmlarge}          \acmArticle{n}          \usepackage[ruled]{algorithm2e}     \SetAlFnt{\algofont}     \SetAlCapFnt{\algofont}     \SetAlCapNameFnt{\algofont}     \SetAlCapHSkip{0pt}     \IncMargin{-\parindent}     \renewcommand{\algorithmcfname}{ALGORITHM}          % Title portion     \title{Sample text}     \author{Sadiksha}          \begin{document}          \maketitle     \pagebreak          \tableofcontents     \pagebreak          \chapter{ABC}     this is a content          \end{document}      I can see a title page, table of contents with no `ABC` in it, just `Contents`. The link to the template is: http://www.acm.org/publications/latex_style/acm- large-v1-3.zip


title: How do I make such a table in LaTeX?

text: Probably a very simple and maybe stupid question, but I haven't yet been able to figure out how to make a table like this in LaTeX: ![enter image description here](http://i.stack.imgur.com/jnucK.jpg) So basically all that I want is the horizontal and vertical line that I drew to be boldfaced and then the rest of the columns and rows not to be separated by any lines. How could I do this in the easiest way? Thank you in advance.


title: No text=none in TikZ?

text: In TikZ, there are `draw=none` and `fill=none` options to turn off stroking and filling operations. However, there doesn't appear to be a corresponding `text=none` option. If I try `\tikz \node[text=none] {X};`, I get the error message "Package xcolor Error: Undefined color `none'." (The `text=red` option does work as expected.)   * Is there indeed no `text=none` option?   * What are alternatives? Is it reasonable to use `text opacity=0`, or is there something better? I'm asking because I would like to create an "empty" node of the same size as a given image or text. By referencing the anchors of this "empty" node, I can then animate the image or text moving in to occupy the same space. The following is an example of what I'm trying to accomplish. It uses `text opacity=0` based on @percusse's suggestion.               \documentclass{minimal}     \usepackage{animate}     \usepackage{tikz}          \usetikzlibrary{calc}          \begin{document}          \begin{animateinline}[autoplay,loop]{10}       \multiframe{11}{iframe=0+1}{         \begin{tikzpicture}[every node/.style={draw}]           \node[text opacity=0] (source) {Text};           \node[text opacity=0] (target) at (2,2) {Text};                \node at ($(source)!\iframe/10!(target)$) {Text};         \end{tikzpicture}       }     \end{animateinline}          \end{document}        * Given this ultimate goal, is it preferable to use something like `\node {\phantom{Text}};`?


title: Problem with insert table of contents with hyperref

text: Why do I get some error like > Paragraph ended before `\Hy@setref@link` was complete when I insert table of contents in `book` class documents and the error dissapear when I place a comment in `\usepackage{hyperref}`?


title: Table and longtable format

text: ![enter image description here](http://i.stack.imgur.com/Vzytg.png) I have written LaTeX code for the table I showed but the output is going over the page and doesn't look like same. I mean the cell values are scattered. In every cell numbers are arranged as up and down. What is the problem In my code? How to control the cell width? Can I transfer the code into long table format?               \documentclass[12pt,a4paper]{article}     \begin{document}     \begin{table}         \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|l|lll}         ~    & ~                                & ~                              & ~                                       & ~                              & ~                              & ~                              & ~                                & ~                                & ~                                 & ~                                       & ~                                 & ~                              & ~                                       & ~                              \\ \hline         ~    & Full                             & 2000                           & 2001                                    & 2002                           & 2003                           & 2004                           & 2005                             & 2006                             & 2007                              & 2008                                    & 2009                              & 2010                           & 2011                                    & 2012                           \\ \hline         Low  &  Consumer Staples\\ 15.83\%      &  Utilities 14.50\%             &  Consumer Staples 16.70\%               &  Consumer Staples 21.20\%      &  Consumer Staples\\ 17.49\%    &  Consumer Staples 10.04\%      &             Consumer            Staples             8.73\% &            Consumer            Staples             9.66\% &  Healthcare 12.58\%               &            Consumer            Staples             28.83\%      &  Healthcare 16.10\%               &  Healthcare 13.59\%            &  Consumer Staples 14.21\%               &  Consumer Staples 11.12\%      \\ \hline         2    &  Healthcare\\ 17.70\%            &  Consumer Staples\\ 15.92\%    &  Utilities 16.81\%                      &  Utilities 22.49\%             &           Utilities           18.67\%       &  Utilities 10.70\%             &  Financials 10.25\%              &  Healthcare 11.46\%              &              Consumer            Staples             12.77\% &  Healthcare 28.84\%                     &             Consumer            Staples             16.64\% &  Consumer Staples 14.53\%      &  Healthcare 15.89\%                     &  Healthcare 11.28\%            \\ \hline         3    &              Utilities\\             19.48\%       &  Materials 15.97\%             &  Materials 19.12\%                      &  Materials 24.66\%             &  Industrials 20.74\%           &  Healthcare 12.64\%            &  Consumer Discretionary 10.51\%  &  Utilities 13.34\%               &  Utilities 13.66\%                &  Telecom 35.05\%                        &  Telecom 20.70\%                  &  Telecom 17.02\%               &  Telecom 19.31\%                        &  Telecom 13.98\%               \\ \hline         4    &  Industrials\\ 23.36\%           &  Financials 17.23\%            &  Healthcare 20.95\%                     &  Industrials 25.87\%           &  Healthcare 21.83\%            &  Financials 12.94\%            &  Industrials 10.78\%             &  Consumer Discretionary 13.66\%  &  Consumer Discretionary 17.31\%   &  Utilities 39.31\%                      &  Utilities 22.22\%                &  Utilities 17.17\%             &  Utilities 23.33\%                      &  Utilities 15.96\%             \\ \hline         5    &  Consumer Discretionary\\ 24.04\% &  Industrials 17.69\%           &  Industrials 22.17\%                    &  Healthcare 26.78\%            &  Materials 22.13\%             &  Industrials 13.39\%           &  Healthcare 10.79\%              &  Financials 14.59\%              &  Telecom 17.74\%                  &  Consumer Discretionary 42.57\%         &  Consumer Discretionary 26.25\%   &  Information Technology 19.66\% &  Energy 23.96\%                         &  Energy 16.62\%                \\ \hline         6    &  Energy\\ 24.87\%                &  Healthcare 18.97\%            &  Energy 27.71\%                         &  Consumer Discretionary 32.04\% &  Energy\\ 22.85\%              &  Materials 13.44\%             &  Utilities 11.71\%               &  Telecom 15.40\%                 &  Energy 18.37\%                   &              Information             Technology          42.94\% &           Energy          27.60\%             &  Energy 19.78\%                &              Consumer            Discretionary           26.55\% &  Industrials 18.50\%           \\ \hline         7    &  Telecom\\ 25.50\%               &  Consumer Discretionary 23.06\% &  Consumer Discretionary 28.20\%         &  Energy 32.63\%                &  Telecom 23.01\%               &  Consumer Discretionary 14.31\% &  Telecom 11.88\%                 &  Industrials 16.47\%             &  Financials 19.46\%               &  Industrials 43.58\%                    &  Information Technology 29.74\%   &  Consumer Discretionary 21.12\% &  Information Technology 26.91\%         &  Consumer Discretionary 18.52\% \\ \hline         8    &  Materials\\ 26.92\%             &  Energy\\ 26.09\%              &  Financials 28.02\%                     &  Financials 36.18\%            &  Consumer Discretionary 24.72\% &  Energy 14.86\%                &  Materials 12.69\%               &  Energy 16.48\%                  &  Industrials 19.96\%              &  Energy 46.89\%                         &  Industrials 30.94\%              &            Industrials             21.95\%     &  Industrials 27.78\%                    &  Information Technology 19.30\% \\ \hline         9    &  Financials\\ 28.33\%            &  Telecom 42.68\%               &  Telecom 37.31\%                        &  Telecom 39.65\%               &  Financials 26.17\%            &  Telecom 14.87\%               &  Information Technology 15.49\%  &  Information Technology 19.03\%  &  Information Technology 20.43\%   &  Financials 50.61\%                     &  Materials 41.26\%                &  Materials 26.86\%             &  Materials 30.38\%                      &  Materials 21.68\%             \\ \hline         High &  Information Technology\\ 34.91\% &  Information Technology 52.46\% &            Information             Technology          58.59\% &  Information Technology 53.73\% &  Information Technology 37.15\% &  Information Technology 26.39\% &  Energy 16.23\%                  &  Materials 19.45\%               &  Materials 23.87\%                &  Materials 53.86\%                      &  cc                               &  Financials 43.69\%            &  Financials 27.01\%                     &  Financials 33.02\%            \\ \hline         \end{tabular}     \end{table}     \end{document}      **EDIT:**                    \documentclass[12pt,a4paper]{article}     \usepackage{amsmath}\usepackage{amssymb}\usepackage{tabularx} \usepackage{comment}     \oddsidemargin-16mm     \usepackage{graphicx} \usepackage{hyperref} \usepackage[english]{babel}     \usepackage{lscape}     \usepackage{rotating}     \newcommand{\specificthanks}[1]{\@fnsymbol{#1}}% Inserts a specific \thanks symbol     \usepackage[left=1.25in, right=1.0in, top=1.25in, bottom=1.0in]{geometry}     \usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables for horizontal lines     \newcommand{\piRsquare}{\pi r^2}     \begin{document} \baselineskip=22pt     \begin{landscape}     \maketitle     %\begin{table}     %    \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|l|lll}       \begin{tabular}{|*{15}{p{7mm}|}}         ~    & ~                                & ~                              & ~                                       & ~                              & ~                              & ~                              & ~                                & ~                                & ~                                 & ~                                       & ~                                 & ~                              & ~                                       & ~                              \\ \hline         ~    & Full                             & 2000                           & 2001                                    & 2002                           & 2003                           & 2004                           & 2005                             & 2006                             & 2007                              & 2008                                    & 2009                              & 2010                           & 2011                                    & 2012                           \\ \hline         Low  &  Consu\-mer Staples  15.83\%      &  Utili\-ties 14.50\%             &  Consu\-mer Staples 16.70\%               &  Consu\-mer Staples 21.20\%      &  Consu\-mer Staples 17.49\%    &  Consu\-mer Staples 10.04\%      &             Consu\-mer            Staples             8.73\% &            Consu\-mer            Staples             9.66\% &  Health\-care 12.58\%               &            Consu\-mer            Staples             28.83\%      &  Health\-care 16.10\%               &  Health\-care 13.59\%            &  Consu\-mer Staples 14.21\%               &  Consu\-mer Staples 11.12\%      \\ \hline     \end{tabular} % prematurely     \begin{comment}         2    &  Healthcare\\ 17.70\%            &  Consumer Staples\\ 15.92\%    &  Utilities 16.81\%                      &  Utilities 22.49\%             &           Utilities           18.67\%       &  Utilities 10.70\%             &  Financials 10.25\%              &  Healthcare 11.46\%              &              Consumer            Staples             12.77\% &  Healthcare 28.84\%                     &             Consumer            Staples             16.64\% &  Consumer Staples 14.53\%      &  Healthcare 15.89\%                     &  Healthcare 11.28\%            \\ \hline         3    &              Utilities\\             19.48\%       &  Materials 15.97\%             &  Materials 19.12\%                      &  Materials 24.66\%             &  Industrials 20.74\%           &  Healthcare 12.64\%            &  Consumer Discretionary 10.51\%  &  Utilities 13.34\%               &  Utilities 13.66\%                &  Telecom 35.05\%                        &  Telecom 20.70\%                  &  Telecom 17.02\%               &  Telecom 19.31\%                        &  Telecom 13.98\%               \\ \hline         4    &  Industrials\\ 23.36\%           &  Financials 17.23\%            &  Healthcare 20.95\%                     &  Industrials 25.87\%           &  Healthcare 21.83\%            &  Financials 12.94\%            &  Industrials 10.78\%             &  Consumer Discretionary 13.66\%  &  Consumer Discretionary 17.31\%   &  Utilities 39.31\%                      &  Utilities 22.22\%                &  Utilities 17.17\%             &  Utilities 23.33\%                      &  Utilities 15.96\%             \\ \hline         5    &  Consumer Discretionary\\ 24.04\% &  Industrials 17.69\%           &  Industrials 22.17\%                    &  Healthcare 26.78\%            &  Materials 22.13\%             &  Industrials 13.39\%           &  Healthcare 10.79\%              &  Financials 14.59\%              &  Telecom 17.74\%                  &  Consumer Discretionary 42.57\%         &  Consumer Discretionary 26.25\%   &  Information Technology 19.66\% &  Energy 23.96\%                         &  Energy 16.62\%                \\ \hline         6    &  Energy\\ 24.87\%                &  Healthcare 18.97\%            &  Energy 27.71\%                         &  Consumer Discretionary 32.04\% &  Energy\\ 22.85\%              &  Materials 13.44\%             &  Utilities 11.71\%               &  Telecom 15.40\%                 &  Energy 18.37\%                   &              Information             Technology          42.94\% &           Energy          27.60\%             &  Energy 19.78\%                &              Consumer            Discretionary           26.55\% &  Industrials 18.50\%           \\ \hline         7    &  Telecom\\ 25.50\%               &  Consumer Discretionary 23.06\% &  Consumer Discretionary 28.20\%         &  Energy 32.63\%                &  Telecom 23.01\%               &  Consumer Discretionary 14.31\% &  Telecom 11.88\%                 &  Industrials 16.47\%             &  Financials 19.46\%               &  Industrials 43.58\%                    &  Information Technology 29.74\%   &  Consumer Discretionary 21.12\% &  Information Technology 26.91\%         &  Consumer Discretionary 18.52\% \\ \hline         8    &  Materials\\ 26.92\%             &  Energy\\ 26.09\%              &  Financials 28.02\%                     &  Financials 36.18\%            &  Consumer Discretionary 24.72\% &  Energy 14.86\%                &  Materials 12.69\%               &  Energy 16.48\%                  &  Industrials 19.96\%              &  Energy 46.89\%                         &  Industrials 30.94\%              &            Industrials             21.95\%     &  Industrials 27.78\%                    &  Information Technology 19.30\% \\ \hline         9    &  Financials\\ 28.33\%            &  Telecom 42.68\%               &  Telecom 37.31\%                        &  Telecom 39.65\%               &  Financials 26.17\%            &  Telecom 14.87\%               &  Information Technology 15.49\%  &  Information Technology 19.03\%  &  Information Technology 20.43\%   &  Financials 50.61\%                     &  Materials 41.26\%                &  Materials 26.86\%             &  Materials 30.38\%                      &  Materials 21.68\%             \\ \hline         High &  Information Technology\\ 34.91\% &  Information Technology 52.46\% &            Information             Technology          58.59\% &  Information Technology 53.73\% &  Information Technology 37.15\% &  Information Technology 26.39\% &  Energy 16.23\%                  &  Materials 19.45\%               &  Materials 23.87\%                &  Materials 53.86\%                      &  cc                               &  Financials 43.69\%            &  Financials 27.01\%                     &  Financials 33.02\%            \\ \hline         \end{tabular}     \end{table}     \end{comment}          \end{landscape}     %          \end{document}


title: Redefine a value during runtime inside another macro

text: I would like to redefine a value **during runtime**. More precisely, I'm creating my own environment and in the preamble I would like to change a value and set it back afterward.               \newenvironment{reptheorem}[1]%     {%     \makeatletter%     \def\@thmcounterend{new}%In this environment, @thmcounterend has a new value     \makeatother%     }%     {%     \makeatletter%     \def\@thmcounterend{old}%We reset @thmcounterend to its previous value.      \makeatother%     }      Obviously this code doesn't work since the \def is not executed when the environment is created but later. Any idea?


title: Altering only header \hline colors with longtabu and colortbl

text: I'm trying to make a table with the following properties:   1. If the table is very long, the header should be repeated on each new page.   2. Each row should be separated by a line.   3. The line immediately after the header row should be black, whereas all the other lines should be gray. To achieve this, I'm using the `longtabu` environment, together with `colortbl` to change the color of the lines between the rows. According to the `colortbl` documentation, `\arrayrulecolor{}` will change the color of any lines after the statement. As such, I figured the following would work as expected:               \documentclass[letterpaper,10pt]{report}          \usepackage[margin=1in]{geometry}     \usepackage{longtable}     \usepackage{tabu}     \usepackage{colortbl}          \definecolor{light-gray}{gray}{0.8}          \begin{document}          \begin{longtabu}{ l l }     \arrayrulecolor{black} % Make the header line black.     Column 1 & Column 2 \\     \hline     \endhead     \arrayrulecolor{light-gray} % Any other lines that come after the header are gray.     Foo & Bar \\     \hline     Foo & Bar \\     \hline     % ... More lines ...     Foo & Bar \\     \hline     Foo & Bar     \end{longtabu}          \end{document}      However, despite the fact that the header is properly repeated, the `\arrayrulecolor{black}` line _isn't_ - i.e., only the very first header line is black, while the rest are `light-gray`. I tried Googling, but I can't seem to find a good example of how to do this. How can I achieve the table style I'm looking for?


title: Biblatex: Inconsistent name-format

text: I use biblatex to manage my references. It works quite well, except for this strange behaviour:               [1] Agresti, A. and Finlay, B. Statistical Methods for the Social Sciences.         3rd ed. Prentice Hall, 1997.     ...          [3] L. Brozovsky and V. Petricek. “Recommender System for Online Dating Service”. In: CoRR         abs/cs/0703042 (2007).      As you can see, article-references have a different name-format than do book- references. I want to force the following style: surname, first-letter-of- firstname. How can I do it? The following commands are used to create the bibliography.               \usepackage[style=ieee,backend=bibtex]{biblatex}     \addbibresource{db.bib}      \printbibliography[heading=bibnumbered]          @book{medianmean,         author={{Agresti, A. and Finlay, B.}},         title={Statistical Methods for the Social Sciences},         publisher={Prentice Hall},         edition={3},         year={1997}     }          @article{DBLP:journals/corr/abs-cs-0703042,         author    = {Brozovsky, L. and Petricek, V.},         title     = {Recommender System for Online Dating Service},         journal   = {CoRR},         volume    = {abs/cs/0703042},         year      = {2007},         ee        = {http://arxiv.org/abs/cs/0703042},         bibsource = {DBLP, http://dblp.uni-trier.de}     }


title: Indenting inside enumerate in Latex

text: I am trying to do an enumerate in Latex that ends up in the following way:   1. First Step.      1. Second Step     2. Third Step   2. Fourth Step I am trying to use \indent before an \item, but it doesn't work. Here is what I am trying to do in Latex:               \begin{enumerate}          \item start here          \indent \item continue here          \end{enumerate}      How can I get this to work? Thank you very much!


title: Fontspec warning : "rename-feature-not-exist"

text: I want to use `Xepersian` package. But I get this error while compiling with Xelatex. > fontspec warning : "rename-feature-not-exist" Can some one help me with this?               \documentclass{article}     \usepackage{xepersian}     \begin{document}     آزمایش     \end{document}


title: Certain hyperlinks (memoir+hyperref) placed too low

text: I tend to use the `memoir` class together with the `hyperref` package, in order to have my table of contents, the lists of tables and figures, and the bibliography be hyperlinked. While all links to chapters, sections, and the like link to the correct positions in the document, the links to the table of contents, the lists of tables and figures, and the bibliography appear too low, approximately where the first item in these respective listings would be placed, but not just to the above-left of these lists' headings. Here is a minimal working example:               \documentclass{memoir}       % using the memoir class here is necessary       % for all the desired hyperlinks to be created     \usepackage{hyperref}          \begin{document}          \tableofcontents          \section{A section}     This is the only section.          \listoftables     \listoffigures          \begin{thebibliography}{9}     \end{thebibliography}          \end{document}      (It might be necessary to enlarge the display in your pdf-reader to notice this effect.) Is it possible to correct the hyperlink targets so that they point directly to the respective headings (here, "Contents", "List of Tables", "List of Figures", and "Bibliography")? (Note: I am aware of the `hypcap` package but not sure whether/how it can be used to address this.)


title: The badness value is always 10000

text: I use WinEdt8.1 to create my TeX files and I prefer PDFTeX instead of TeX or LaTeX. I noticed that when I create an underfull box (horizontal or vertical) the badness value is always 10000. For example in that code               \hbox to250pt{\hskip0pt minus50pt\vrule height1pt width249pt}      the badness value should be 0.0008 [97]:               L= 249 . . . l=250 => D=-1 < 0     r=-(D/Y)=1/50 => badness = min(100*r^3,10000)=0.0008      But it is always 10000. I am sure you can say something...


title: Is there already an amsalpha.bbx?

text: I searched but did not find one. If it does not yet exist, is there a project on biblatex style files for AMS journals?


title: Where to store macros for TeXstudio

text: I'm switching from Winedt to TeXstudio. I have lots of Winedt macros and I would like to write new ones for TeXstudio. Now I read about available macro functions, but I still don't understand where I should store the macro file? If I add macro to that form **Macros->Edit** Macros, it appears in `.INI` file (one line like `Macros\0=test`). But its hard to edit such a macros. Question, is it possible/simple to load javascript macros from files? It would be great to have a **Macros** directory, where you could store all your macros.


title: Bad position equation number Lualatex

text: If a math display is too wide, then the `\eqno` appears on the next line on the left instead of on the right as it should. Does anyone know how to solve this problem? This is an example:               \documentclass[a4paper]{article}         \usepackage[cmex10]{amsmath}         \usepackage{amsfonts}         \usepackage{mathtools}         \usepackage{mathptmx}          \newcommand{\E}{\mathbb{E}}          \newcommand{\si}[1]{\ensuremath{\sigma_{#1}^{2}}}          \begin{document}          \begin{equation}        C=        \begin{bmatrix}         {C_{11} } & {C_{12} }  \\         {C_{21} } & {C_{22} }  \\     \end{bmatrix}=     \begin{bmatrix}         \E\left[ {\left( {X-m_{X}} \right)^{2}} \right] & \E\left[ {\left( {X-m_{X}} \right)\left( {Y-m_{Y}} \right)} \right] \\         \E\left[ {\left( {X-m_{X}} \right)\left( {Y-m_{Y}} \right)} \right] & \E\left[ {\left( {Y-m_{Y}} \right)^{2}} \right]      \end{bmatrix}=     \begin{bmatrix}         \si{X} & C_{XY} \\         C_{XY} & \si{Y} \\     \end{bmatrix}     \end{equation}          \end{document}      _Added by Hendrik Vogt:_ The same happens with plain LuaTeX.               \hsize=2cm     $$a^2+b^2=c^2\eqno(1)$$     \bye      Ouput after compilation with `luatex`: ![eqno in the left](http://i.stack.imgur.com/LSL2P.png) Ouput after compilation with `pdftex`: ![eqno in the right](http://i.stack.imgur.com/T0N3o.png) Dear friends: I think the next code is a posible, and provisional solution:               \usepackage{environ}          \NewEnviron{equationw}     {     \begin{equation}\begin{split}     \BODY     \end{split}\end{equation}     }


title: Making an anonymous PDF file using PDFLaTeX

text: When writing a referee report for a journal, it would be preferrable to have the resulting PDF file generated by pdflatex be completely anonymous. Does one need to take special actions to ensure this? For example, if any references to file names with their paths are included anywhere in the resulting file, that will result in information (my home directory is `/home/mariano/...` for example)


title: Is there a way to forget node names between TikZ pictures?

text: I have a document with several TikZ pictures in it. I generally use simple names for the nodes such as:               \node (A) at .....      \node (B) at .....      and so forth. Because of this I have name clashes between the various pictures. That's generally not a problem. However I find myself in a position where I may or may not have defined a certain node within a given picture. So I use the following snippet to test whether the node has been defined:               \makeatletter     \long\def\ifnodedefined#1#2#3{%%       \@ifundefined{pgf@sh@ns@#1}{#3}{#2}}     \makeatother      Unfortunately this fails if I've already created a node by the same name in another picture. Is there a way to scope the definitions of nodes or is there a way to undefine nodes once you no longer need them? **P.S.** I'm aware that I could embed each picture in a `standalone` file and import it using `\includegraphics`. Unfortunately, this approach will not work for the document I'm creating. **MWE**               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}          \makeatletter     \long\def\ifnodedefined#1#2#3{%%       \@ifundefined{pgf@sh@ns@#1}{#3}{#2}}     \makeatother          \setlength{\parindent}{0pt}     \pagestyle{empty}     \begin{document}               There's no node \textbf{D} here, so I draw a triangle:\par     \begin{tikzpicture}            \coordinate (A) at (0,0);       \coordinate (B) at (1,0);       \coordinate (C) at (1,1);     %  \coordinate (D) at (0,1);            \ifnodedefined{D}         {  \draw (A) foreach \myn in {B,C,D} {  -- (\myn) } --cycle;  }         {  \draw (A) foreach \myn in {B,C}   {  -- (\myn) } --cycle;  }          \end{tikzpicture}                         There is a node \textbf{D} here, so I draw a square:\par     \begin{tikzpicture}            \coordinate (A) at (0,0);       \coordinate (B) at (1,0);       \coordinate (C) at (1,1);       \coordinate (D) at (0,1);            \ifnodedefined{D}         {  \draw (A) foreach \myn in {B,C,D} {  -- (\myn) } --cycle;  }         {  \draw (A) foreach \myn in {B,C}   {  -- (\myn) } --cycle;  }          \end{tikzpicture}                              There isn't supposed to be a node \textbf{D} here.  I'm expecting a     triangle, but get a square.\par     \begin{tikzpicture}            \coordinate (A) at (0,0);       \coordinate (B) at (1,0);       \coordinate (C) at (1,1);     %  \coordinate (D) at (0,1);            \ifnodedefined{D}         {  \draw (A) foreach \myn in {B,C,D} {  -- (\myn) } --cycle;  }         {  \draw (A) foreach \myn in {B,C}   {  -- (\myn) } --cycle;  }          \end{tikzpicture}          \end{document}      produces: ![enter image description here](http://i.stack.imgur.com/7uvhv.png)


title: How to use the footnotebackref package with \footnotemark and \footnotetext?

text: I am using `footnotebackref` to have links and back links between footnote marks and footnote texts. But the example below produces this error:               ! Undefined control sequence.     <argument> \BackrefFootnoteTag           l.5 \footnotetext{My note.}      My sample document is:               \documentclass{book}     \usepackage{footnotebackref}     \begin{document}     Some text\footnotemark.     \footnotetext{My note.}     \end{document}      **Note:** The following code runs without error (but second back link is linked to first note).               \documentclass{book}     \usepackage{footnotebackref}     \begin{document}     Prenote\footnote{First note}.     \newpage     Some text\footnotemark.     \footnotetext{My note.}     \end{document}


title: Will cruft from a previous compile ever change the final look of my document

text: Ok, this has been bugging me for a while; Will cruft left over from a previous run of LaTeX ever change how my document looks? Would the following procedures ever give me different results: I compile my document until it stabilizes (All references resolved and such) then edit my document and recompile until it stabilizes. vs. I compile my document until it stabilizes (All references resolved and such) then edit my document. Now I delete everything but my *.tex and *.bib files and recompile until it stabilizes. I'm probably just asking this due to being used to all the cruft word leaves in old documents, but it has been bugging me for a while. Does LaTeX save math and such things in the *.aux and such, and would it ever arrive at a different solution due to this saved information? I only included the compile until it stabilizes bit, as I don't want answers about references and things; I know that in any situation where you have to compile more then once you will obviously get a different outcome if you delete the intermediate files. I'm interested in the final document as I'd share it with someone. If this is the case, then I should be careful to always delete the intermediate files and recompile before sharing my document with anyone.


title: remove italics from align

text: \begin{align*}     P2P &- Peer-to-Peer Network\\     %.....     \end{align*}      I have a Abbreviation page in my PDF. For aligning all the '-' I am using align*. All the content inside align shows up in italics. How do I make the content inside align appear normal and not italic?


title: System of linear equations wobbles

text: I tried to illustrate how to solve a system of linear equations but I don't come along with the different approaches to position the equations. They are shifted at some slides, e.g. if an arrow is displayed or even if some variables are only colored! Here's my simple but not so minimal looking example:               \documentclass[dvipsnames,mathserif]{beamer}          \usepackage{tikz}     \RequirePackage{color}     \usepackage{amsmath}          \newcommand{\ma}[1]{\textcolor[named]{Magenta}{#1}}     \newcommand{\cy}[1]{\textcolor[named]{Cyan}{#1}}          \begin{document}          \tikzstyle{every picture}+=[remember picture]          %%%%%%%% Folie  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \frame     {       \frametitle{LGS (without anything)}       %===========================        \begin{alignat*}{4}         x_1\    &+\ 2x_2\   &          &+\ x_4\     &=\ 1\\         x_1\    &+\ 2x_2\   &+\ 2x_3\  &+\ 3x_4\    &=\ 5\\         2x_1\   &+\ 4x_2\   &          &+\ 3x_4\    &=\ 5\\                 &           &  3x_3\   &+\ 2x_4\    &=\ 3       \end{alignat*}               }          \frame     {       \frametitle{LGS (with arrow)}       %===========================       \begin{alignat*}{5}               &          &  3x_3\   &+\ 2x_4\   &=\ 3 &\tikz{\node (n1){};} \\         x_1\  &+\ 2x_2\  &+\ 2x_3\  &+\ 3x_4\   &=\ 5 \\         2x_1\ &+\ 4x_2\  &          &+\ 3x_4\   &=\ 5 \\          x_1\ &+\ 2x_2\  &+\ x_4\   &=\ 1       &\tikz{\node (n2){};}       \end{alignat*}            \begin{tikzpicture}[overlay]         \path<2>[blue,<->,thick] (n1.east) edge [out= 330, in= 30] (n2.east);       \end{tikzpicture}       }          %%%%%%%% Folie  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \frame     {       \frametitle{LGS (colored variables and with arrow)}       %===========================       %\normalsize       \begin{alignat*}{5}                   &               &\cy{3x_3}\  &+\ \cy{2x_4}\ &=\ \cy{3} &\tikz{\node (n3){};} \\         x_1\      &+\ 2x_2\       &+\ 2x_3\    &+\ 3x_4\      &=\ 5 \\         2x_1\     &+\ 4x_2\       &            &+\ 3x_4\      &=\ 5 \\         \ma{x_1}\ &+\ \ma{2x_2}\  &            &+\ \ma{x_4}\  &=\ \ma{1} &\tikz{\node (n4){};}       \end{alignat*}            \begin{tikzpicture}[overlay]         \draw[blue,<->,thick] (n3.east) to [out= 330, in= 30] (n4.east);       \end{tikzpicture}     }          %%%%%%%% Folie  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \frame     {       \frametitle{LGS (colored variables)}       %===========================                 \begin{alignat*}{4}         \ma{x_1}\ &+\ \ma{2x_2}\ &              &+\ \ma{x_4}\  &=\ \ma{1}\\             x_1\  &+\ 2x_2\      &+\ 2x_3\      &+\ 3x_4\      &=\ 5 \\            2x_1\  &+\ 4x_2\      &              &+\ 3x_4\      &=\ 5 \\                   &              &\cy{3x_3}\    &+\ \cy{2x_4}\ &=\ \cy{3} \\        \end{alignat*}          }          \frame     {       \frametitle{LGS (again without anything)}       %===========================        \begin{alignat*}{4}         x_1\    &+\ 2x_2\       &          &+\ x_4\     &=\ 1\\         x_1\    &+\ 2x_2\       &+\ 2x_3\  &+\ 3x_4\    &=\ 5\\         2x_1\   &+\ 4x_2\       &          &+\ 3x_4\    &=\ 5\\                 &               &  3x_3\   &+\ 2x_4\    &=\ 3       \end{alignat*}               }          \end{document}


title: How can I have a horizontally shaded block title in beamer?

text: \documentclass{beamer}     \usetheme{Rochester}          \setbeamertemplate{block title}[horizontal shading][left=black, right=white]          \begin{document}     \begin{frame}       \frametitle{MWE}       \begin{block}{Title}         Test       \end{block}     \end{frame}     \end{document}      The template `sidebar canvas left` can be set in this fashion; is there any way the same can be done for block titles using templates?


title: \maketitle text before title

text: I want my page to look something like this (using `\documentclass{article}`): > text > > title > > text but I can't get it right, it puts my title on the next page leaving my first text paragraph on separate page. What should I do?


title: Compilation problem with WinEdt

text: I am writing my PhD thesis with WinEdt and recently started to see the following error message. I didn't edit any settings nor change anything in the configurations. Can anybody help?               Runaway argument?     {\blx@citepunct@i {\blxcitecmd {footcite}}{{}}{345{masaryk.1965a}. Alle\ETC      ! Paragraph ended before \blx@xsantitizeafter was complete.     <to be read again>


title: emacs auctex: how to get \frac{}{} and \bm{}?

text: How can I find out (in AUCTeX) if `\frac{}{}` and `\bm{}` have predefined keyboard shortcuts? I couldn't find these two.


title: Multiple listings using range markers and PGF's \foreach

text: I've been trying to include multiple code snippets from a unique source file by using `listings`'s range markers (named lines) and PGF's `\foreach` macro:               \foreach \x in {1,2,...,8} {       \lstinputlisting[linerange=P\x-FIN\ P\x]{programas.py}     }      It doesn't work: no code is inserted at all. When passing the range name explicitly to `\lstinputlisting` (without using `\foreach`'s counter), then the code is inserted correctly:               \lstinputlisting[linerange=P1-FIN\ P1]{programas.py}      Minimum (non-)working example: https://gist.github.com/1371840 How could I make it work? Is it listing's or foreach's fault?


title: How to reduce space before \paragraph

text: I am using `\documentclass[11pt]{article}` and I would like to reduce the space very slightly that is put in before each `\paragraph{Some text}`. A MWE.               \documentclass[11pt]{article}     \begin{document}     \section{Intro}     Hello     \paragraph{A paragraph}     Some more text          And we continue.     \end{document}


title: inputenc errors caused by different LaTeX environments?

text: On my iMac, `\usepackage[utf8]{inputenc}` get's me               Package inputenc Error: Keyboard character used is undefined.        I don't get this error on my MacBook. Conversely, `\usepackage[latin1]{inputenc}` causes the same error on my MacBook, but not on my iMac. Both machines use the same MacTeX / TeXLive-2013 distribution, and I use the same editor (TextMate 2.0) on both. Could I somehow have created different LaTeX environments on each machine? How should I go about finding what causes this problem? _Note: I also posted this question onlatex-community.org._


title: Figure: how to have "Figure 1.5" in bold

text: First of all, sorry if it's a nooby question. I'm fairly new to latex, and only know the basics right now. But I'm learning every day! So... I'd like to have my figure captions with the word `Figure x.x` in bold, but the rest normal. Ideally, that would be in the header of the file, so that it applies to all the figures in my document. If it's not possible, is there a way to have a different ... distance to the edge of the page, so it's different from normal text? So for example, you would have:               Normal text blah blah blah.          [actual figure]     Figure 1.5: figure caption      I tried to use stuff like `\usepackage[font=bf]{caption}`, but it tells me I don't have `caption.sty` (or `figure.sty` if I replace `caption` by `figure`). I'd be also surprised if we needed a new package only for that. Is there a way to achieve one of the two? [edit] I've installed the caption package. It might be easier to get this done now.


title: Fast solution to unidentified citations and references

text: I'm working on a medium size document, with lots of citations and cross references (Latex inserts ?? where it can not find the citation or crossed reference). What is the way to find the unidentified references through latex and its generated files?


title: How to print out to "log" without affecting anything else (lua print equiv)

text: lua's `print` is very effective for my debugging purposes but I can't easily use it in TeX because of all the macro expansion issues. All it does is print the text to the window (console window or whatever; I use WinEdt) but doesn't effect output in any way. I've tried `\the`, `\showthe`, and `\message` and none seem to work well. Is there any easy way that will allow me to print macro and register values for debugging purposes?


title: Change the textwidth in a graphic caption?

text: Following a minimal code from somebody who asked why it produces a longer line for caption text of the figure, than a line in the main text.               \documentclass[12pt]{article}     \usepackage{array,latexsym,amsthm,amsfonts}     \usepackage[dvips,dvipdf]{graphicx,color}     \setlength{\textwidth}{7.0in}      \setlength{\textheight}{9.0in}     \setlength{\oddsidemargin}{-.25in}      \setlength{\topmargin}{0in}     \setlength{\tabcolsep}{0.09in}          \title{test}     \begin{document}          \maketitle          aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa                \begin{figure}[h,t,b]     \includegraphics[scale=.25]{b.eps}     \caption{The triangular lattice with faces labelled as close-packed (C) and empty (O), the corresponding planar modification, and its generator.}     \end{figure}          \end{document}      I failed to reproduce the problem he has. But I think the solution may be to set up the textwidth for the figure caption, to match it with the textwidth in the main text. So I wonder how to set the textwidth for the figure caption?


title: How to plot parabola in the selected segment using TikZ

text: I want to plot this: ![area below parabola](http://i.stack.imgur.com/K83Qo.png) I know, that I can find intersections using TikZ (tried `\shade` but don't know how to plot parabola only in a segment), but I don't know how to plot this R figure, and S+T, and U+V. How can I plot this? New detail: How [domain] works?               \tipc{[x=1cm,y=1cm]            \def\xmin{0}       \def\xmax{10}       \def\ymin{0}       \def\ymax{10}       \draw[style=help lines, ystep=1, xstep=1] (\xmin,\ymin) grid       (\xmax,\ymax);            % axes       \draw (-.25,-.25) node[auto] {0};       \draw[->] (\xmin,\ymin) -- (\xmax,\ymin) node[right] {$Q$};       \draw[->] (\xmin,\ymin) -- (\xmin,\ymax) node[above] {$P$};       \draw[red] (2,2) parabola (8,8) node[right,black] {$S$};       \draw[blue] (8,2) parabola (2,8) node[left,black] {$D$};       \draw[dashed]  (5,0) node[below] {$q_A$} -- (5,3.5);       \draw[dashed] (3.72,-0.5) -- (3.72,2.5) -- (6.27,2.5) -- (6.27,-0.5);       \draw[<->] (3.72,-0.5) node [below] {$q_s$}  -- ++(2.55,0) node [midway,below] {$Im$}       node [below] {$q_d$};       \begin{scope}             \draw[color=red!30,domain=1.72:3]                 (5,3.5) parabola  (2,8)  |- (3.72,3.5);         \end{scope}     }      ![enter image description here](http://i.stack.imgur.com/3f3Mx.png)


title: Set up vim with latex-suite to use latexmk

text: Today I started using vim in combination with the latex-suite plugin, and so far I love it. Other editors also make using LaTeX easier by providing code completed and such, but latex-suites's versatility seems unmatched. The only issue that I have so far is that I want to keep using my latexmk setup. At the moment, I store a .latexmkrc file in my working directory, and run `latexmk --pdf --pvc file.tex` from a terminal. How can I combine latexmk and latex-suite such that I can keep using latex- suite's useful set-up with the error windows at the bottom? Here is a screenshot to clarify which "error window" I mean: ![vim with latex-suite, error window](http://i.stack.imgur.com/wMWgg.png) * * * I have **updated** my vimrc according to Aditya's proposal. Here is the relevant part:               filetype plugin on     set grepprg=grep\ -nH\ $*     filetype indent on     let g:tex_flavor='latex'          let g:Tex_DefaultTargetFormat = 'pdf'     let g:Tex_CompileRule_pdf = 'latexmk -pdf -pvc $*'     set iskeyword+=:      When pressing `\ll` now, nothing happens at all. Any thoughts would be greatly appreciated!


title: Aligned columns in qtree?

text: I am currently taking a sentential logic class and we've just begun the chapter on truth-trees, so I've been looking into how to generate truth-trees with the `qtree` package. I think I've been able to get the syntax down for the tree itself, but was wondering if there was a way to put columns with aligned captions for each branch on either side of the tree. Here's an idea of what I'm trying to accomplish: ![http://i.imgur.com/7vF6A.png](http://i.stack.imgur.com/1JPwG.png) Edit 1: The above image isn't actually the tree I created. Mine actually looks more like ![generated tree](http://i.imgur.com/C7eOV.png) Here's my source code, from Lyx.               \documentclass[english]{article}     \usepackage[OT1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{geometry}     \geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{qtree}          \makeatother          \usepackage{babel}     \begin{document}     $\mbox{\Tree[.A\&\ensuremath{\sim}B [.C [.\ensuremath{\sim}A\ensuremath{\vee\sim}C [.A [.\ensuremath{\sim}B [.\ensuremath{\sim}A \ensuremath{\otimes} ] [.\ensuremath{\sim}C \ensuremath{\otimes} ] ] ] ] ] ]}$     \end{document}      Edit 2: I've managed to get a little bit closer to what I want by using three trees in an eqnarray environment. The question I guess I'm asking now is whether or not there's a way to make branches in `qtree` invisible. ![thirdtree](http://i.imgur.com/kqXvO.png)               \documentclass[english]{article}     \usepackage[OT1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{geometry}     \geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{qtree}          \makeatother          \usepackage{babel}     \begin{document}          \begin{eqnarray*}     \mbox{\Tree[.1.\\2.\\3.\\4.\\5. [.6. ] ]} &      \mbox{\Tree[.A\&\ensuremath{\sim}B\\C\\\ensuremath{\sim}A\ensuremath{\vee\sim}C\\A\\\ensuremath{\sim}B [.\ensuremath{\sim}A\\\ensuremath{\otimes} ] [.\ensuremath{\sim}C\\\ensuremath{\otimes} ] ]} &      \mbox{\Tree[.SM\\SM\\SM\\1,\&D\\1,\&D [.3,\ensuremath{\vee}D ] ]}     \end{eqnarray*}     \end{document}


title: How can I force to print exactly at the end of the line?

text: I would like to force a linebreak, but at the same time I would like to force LaTeX to print at the and of the line, so I would like no space at the and of the line!


title: Constant alignment of centered text on different lines

text: I want to have multiple lines with three sections: a left-justified column, a center-justified middle column, and a right-justified last column. For any line this is mostly done with \hfill. The problem is then center column is not center-justified, and I would like the center column to line up across different instances of these multi-columns lines. Also, there is other text between these lines so I can't use a single table. The following .tex demonstrates the issue:               \documentclass{article}     \usepackage{tabularx}     \begin{document}               % one line, Column two floats in between one and three     \noindent Column one \hfill Column two \hfill Column three              %multiple lines     \noindent Column one              %this line is absolutely centered and is aligned with any other      {\centering \textbf{Column two} \\}          \hfill Column three          Ea vero quando definiebas vix. Velit facete referrentur sit ei. Cu eam exerci labore expetendis. Vel an pertinax inciderint, at suas volumus scriptorem sea, at sed utroque perfecto consulatu.           \noindent This column one is a bit longer \hfill Not lined up \hfill Column three changed          \noindent This column one is a bit longer          {\centering \textbf{Is lined up} \\}          \hfill Column three changed          \noindent This column one is a bit  longer \begin{center} no good \end{center} \hfill Column three changed          \noindent This column is a bit longer {\centering Not centered} \hfill Column three changed          % try with tables     \hrulefill          \noindent \begin{tabular*}{\textwidth}{lcr}     Column one & Column two & Column three \\     \hspace{0.30 \textwidth} & \hspace{0.30 \textwidth} & \hspace{0.30 \textwidth}      \end{tabular*}          Ea everti utamur ullamcorper sed, id duo exerci ceteros apeirian, nam ex oratio prodesset. Cu summo oratio populo eum, in euismod sanctus mel, no accumsan explicari elaboraret his.           \noindent \begin{tabular*}{\linewidth}{lcr}     This column one is a bit longer & New column two & Column three changed \\     \hspace{0.30 \linewidth} & \hspace{0.30 \linewidth} & \hspace{0.30 \linewidth}      \end{tabular*}          \end{document}      For the first attempts using \hfill, the center column's are not aligned since the other columns are different. The second instances are lined up right (in bold), but span three lines instead of one. Several attempts to try to make a single line do not work. I also tried using tables (below the \hrulefill) but it adds an extra vertical space I don't want, and I have to manually tweak the \textwidth multiplier to match the margins. In the worst case I could do this and add negative vspace, but I wonder if there is a better way?


title: Mysterious empty page + subsequent "Overfull \vbox has occurred while \output is active" during a long string of sectioning commands

text: Document in question: http://pastebin.tlhiv.org/nJhaYvfN Page 3 is typeset as a blank page, while page 4 has the overfull (by almost 160pts!) `\vbox` during a long string of sectioning commands.


title: What does \\* do?

text: I have some code, and when I use `\\\\*`, it causes some things to become unaligned, but when I use `\\\`, the alignment is correct. What's the difference?


title: On pdf export LyX document is incomplete

text: As noted above the lower sections of the document seem to be cut off. The sections seem to be considered to be on the "last" page of the document but in reality they should continue to flow to the next page. The table of contents still shows them, and it looks fine in HTML export... But PDF and DVI end at page 7 incorrectly. Also I notice that after section 4.5 (the last bit of typing before it is just skeleton) it adds an extra page and a half of whitespace.. I tried removing different parts of the document but to no avail. Here is the source(Sorry for "censoring" a little of it.. but it shows the problem all the same)               % Preview source code          %% LyX 2.0.7 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{geometry}     \geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}     \usepackage{babel}     \usepackage{array}     \usepackage[unicode=true,pdfusetitle,      bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,      breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]      {hyperref}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}          \makeatother          \begin{document}          \title{Project Scope \& Feature Set}          \maketitle          \part{Document Purpose \& History}               \section{Document Purpose}               \paragraph{The purpose of this document is to provide a high level overview     of features to be developed during the build phase of the project.     At this time the document should not contain any references to look     \& feel or to the access levels required to use select functionality.     Those belong in the Design \& Feature Placement documents respectively.}               \section{Team Members}          \begin{tabular}{|c|c|c|}     \hline      Role & First Name Last Name, Initials & E-Mail Address\tabularnewline     \hline      Document Owner & {*}{*}{*}{*} & {*}{*}{*}{*}{*}\tabularnewline     \hline      Editor & {*}{*}{*}{*} & {*}{*}{*}{*}{*}\tabularnewline     \hline      \end{tabular}               \section{Document History}          \begin{tabular}{|c|>{\raggedright}p{10cm}|c|}     \hline      Editor & Change & Date\tabularnewline     \hline      {*}{*}{*} & Completed public home page requirements round 1 & February 4th, 2014\tabularnewline     \hline      {*}{*}{*} & Initial Document Creation - Purpose \& Team Member segments completed. & February 4th, 2014\tabularnewline     \hline      \end{tabular}          \newpage{}          \tableofcontents{}          \newpage{}               \part{Feature Requirements}               \section{Public Home Page}               \subsection{Process}          There is no process for the public home page. It is a stand alone     page with no pre-requisites.               \subsection{Entry Points}     \begin{enumerate}     \item Direct Linking from one of the following places:          \begin{enumerate}     \item Search engine results     \item Browser bookmark     \item Referal from another user     \item Ad click     \item Referal from another site     \end{enumerate}     \item Website Banner or Navigation Home Button click.     \item User logout button click.     \end{enumerate}          \subsection{Exit Points}     \begin{enumerate}     \item Browser tab or window close.     \item Loss of power.     \item URL change via user input.     \item Browser back button click.     \item Navigation menu click.     \item Footer link click.     \item User search executed. (\nameref{sec:User-Search-Results})     \item {*}{*}{*}{*} search executed.     \item User authentication executed.     \item User registration button click. (\nameref{sec:User-Registration})     \item User profile button clicked.     \item Promotional user clicked.     \item Promotional {*}{*}{*}{*} clicked.     \end{enumerate}          \subsection{Fields}     \begin{enumerate}     \item All header fields @see Site Chrome:Fields     \item All user search fields @see User Search:Fields:Basic     \item All {*}{*}{*}{*} search fields @see {*}{*}{*}{*} Search:Fields:Basic     \end{enumerate}          \subsection{Requirements}     \begin{enumerate}     \item Render the header and footer according to the requirements laid out     in @see Site:Chrome     \item Render the user search form according to the requirements laid out     in @see User Search:Basic     \item Render the {*}{*}{*}{*} search form according to the requirements     laid out in @see {*}{*}{*}{*} Search:Basic     \item Render the search results according to the requirements laid out in     either @see User Search Results:Basic or @see {*}{*}{*}{*} Search     Results:Basic depending on the user's last executed search.     \item Render promotional users based on some criterion. Criterion TBA.     \item Render promotional {*}{*}{*}{*}s based on some criterion. Criterion     TBA.     \end{enumerate}          \section{User Registration\label{sec:User-Registration}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}               \section{Authentication\label{sec:Authentication}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}               \section{User Profile\label{sec:User-Profile}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}               \section{User Dashboard\label{sec:User-Dashboard}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}               \section{{*}{*}{*}{*} Creation\label{sec:censored-Creation}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}               \section{{*}{*}{*}{*} Profile\label{sec:censored-Profile}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}               \section{{*}{*}{*}{*} Dashboard\label{sec:censored-Dashboard}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}               \section{User Search\label{sec:User-Search}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}               \section{User Search Results\label{sec:User-Search-Results}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}               \section{{*}{*}{*}{*} Search\label{sec:censored-Search}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}               \section{{*}{*}{*}{*} Search Results\label{sec:censored-Search-Results}}               \subsection{Process}               \subsection{Entry Points}               \subsection{Exit Points}               \subsection{Fields}               \subsection{Requirements}     \end{document}


title: No automatic page breaking after inserting figure

text: > **Possible Duplicate:**   >  Overfull box and broken pagination I'm currently using Latex for the first time in about a year, and I've run into some trouble. I have two images in my document so far, using the code:               \documentclass[12pt]{article}     \usepackage[top=2cm,bottom=4cm,left=3.2cm,right=3.2cm]{geometry}          \usepackage{setspace}     \onehalfspacing     \usepackage{lipsum}     \usepackage{graphicx}     \graphicspath{{./images/}}     \usepackage{float}     \usepackage{subfigure}     \usepackage{wrapfig}     \usepackage{listings}               \begin{document}          \title{Title}     \date{}     \maketitle          \section{Introduction}     Blahblahblah.          \section{Recommendations}     \subsection{sub1}     \subsubsection{subsub1}     \subsubsection{subsub2}     \subsection{sub2}     \section{Recommendations}     \subsection{sub1}     \subsubsection{subsub1}     \subsubsection{subsub2}      \subsection{sub2}     \section{Recommendations}     \subsection{sub1}     \subsubsection{subsub1}     \subsubsection{subsub2}     \subsection{sub2}     \section{Recommendations}     \subsection{sub1}     \subsubsection{subsub1}     \subsubsection{subsub2}     \subsection{sub2}     \section{Recommendations}     \subsection{sub1}     \subsubsection{subsub1}     \subsubsection{subsub2}     \subsection{sub2}     \section{Recommendations}     \subsection{sub1}     \subsubsection{subsub1}     \subsubsection{subsub2}     \subsection{sub2}          \end{document}        This seems to have inserted the images as I would like, however, on the page containing the second image, all subsequent text seems to overun the bottom of the page, and the document ends. The page containing the first image ends as normal (page number, bottom margin, etc). I've never encountered this issue before, and looking at previous .tex files, this is the same method I used.


title: Problems with line-break in Chapter Title using a custom Command for Chapter

text: If you have to force a line break in a chapter title, this would be possible doing so:               \chapter[][A Long title that has to be broken,\\ how sad is this!]      But in my document I had to define my own chapter command, in order to have a chapter author and a subtitle:               \newcommand\Chapter[3][]{%       % Last char of the title        \StrRight{#2}{1}[\lastchar]%       % Put to \       \chapter[#2%         % We want a point in the ToC between title and subtitle         \if\relax\detokenize{#3}\relax%         \else%           % But not if there is a ?           \if\lastchar? %           \else%             % Or a !             \if\lastchar! %             % If not set a point                     \else%             . %             \fi%           \fi%         \fi%       #3]{#2\\[2ex]\Large\Large#3}       \chaptermark]{\markboth{%       \if\relax\detokenize{#1}\relax  #2%       \else  #1\fi }{}%       }}      This works as expected, but not with a line break:               \Chapter[A Long title]{A Long title that has to be broken,\\ how sad is this!}{Some boring subtitles}       With the line break I get an error:               ! Paragraph ended before \@firstoftwo was complete.     <to be read again>     \par     l.2 ...how sad is this!}{}     I suspect you've forgotten a `}', causing me to apply this      How ever, the line break works, but on the page before there appears the part after the line break on an extra page. What did I wrong? Here is a complete working example:               \documentclass[10pt,twoside]{memoir}     \usepackage{xstring}          \usepackage{fontspec}     \usepackage{xltxtra}          \newcommand{\chapterauthor}          \renewcommand*{\cftchapterdotsep}{\cftdotsep}     \settocdepth{chapter}     \renewcommand{\cftchapterfont}{\normalfont}     \renewcommand{\cftchapterpagefont}{\normalfont}          \makeatletter     \DeclareRobustCommand\authortoctext[1]{%     {\addvspace{10pt}\nopagebreak\setlength{\parindent}{0em}\relax     \rightskip \@tocrmarg\relax     \itshape#1\par\addvspace{-7pt}}}     \makeatother     \newcommand\authortoc[1]{\needspace{3\baselineskip}%       \gdef\chapterauthor{#1}%       \addtocontents{toc}{\authortoctext{%         \needspace{2\baselineskip}%   Vgl. http://tex.stackexchange.com/questions/134016     #1}}}               \renewcommand{\afterchaptertitle}{%          \vskip\onelineskip\begin{large}\normalfont\textit{\Large\chapterauthor}\end{large}     \vspace{4ex}     \vskip\onelineskip}          \newcommand\testchain[1]{%       \StrRight{#1}{1}[\lastchar]%       \IfStrEq{\lastchar}{?}{false}{true}%     }               \newcommand\Chapter[3][]{%       % Last char of the title        \StrRight{#2}{1}[\lastchar]%       % Put to \       \chapter[#2%         % We want a point in the ToC between title and subtitle         \if\relax\detokenize{#3}\relax%         \else%           % But not if there is a ?           \if\lastchar? %           \else%             % Or a !             \if\lastchar! %             % If not set a point                     \else%             . %             \fi%           \fi%         \fi%       #3]{#2\\[2ex]\Large\Large#3}       \chaptermark]{\markboth{%       \if\relax\detokenize{#1}\relax  #2%       \else  #1\fi }{}%       }}               \begin{document}     \tableofcontents*                  \Chapter[A Long title]{A Long title that has to be broken,\\ how sad is this!}{Some boring subtitles}         \end{document}


title: What can I do if a listing is too wide to fit in my two-column document?

text: I am writing a IEEE document with a LaTeX template I downloaded from the IEEE webpage. I inserted some MATLAB code into the document through the `mcode` package. It looks something like this:               \usepackage[framed]{mcode}     .     .(document)     .     \begin{lstlisting}      MATLAB code     \end{lstlisting}      The code looks great, whith the right font and colours but the problem is that the IEEE template defines a two-column document, and the code exceeds margins and doesn't fit. Is there any way to fix this?


title: How to make a given LaTeX template compatible with my LyX file?

text: I have already written my entire thesis in LyX. But my university has a fixed LaTeX format in which I've to turn my thesis in. Kindly advise.


title: Force TeXworks to refresh bib file

text: I don't quite know the mechanics behind bibliography and BiBTeX. I am using _TeXworks_ to write a document, I modify the bib file with an external application. When I typeset the document (`Ctrl`+`T`), it gives the same error displaying the old version of the line. I am sure I have changed and saved the file. I fiddle with the application a bit, and typeset again it reloads the newest version. How do I force TeXworks to reload the fresh version of the bib file?


title: How to horizontally align equations in multicols package

text: I'm using the `multicols` package to write formulas side by side, as               \begin{multicols}{2}     \begin{eqnarray}     ...     \end{eqnarray}     \columnbreak     \begin{eqnarray}     ...     \end{eqnarray}     \end{multicols}       but they are found not to be horizontally aligned. The text is less than a page, so I want to use `multicols` only for a fraction of the page. How can I obtain this?


title: Math equation bug

text: I have the following formula, the problem is that once I add \begin{equation} ...\end{equation} I receive an error message, but If I add the same formula between two $..$ it is work properly. any one tell me how to make it in term of \begin{equation} .... My formula is:                \begin{equation}          \hat{\gamma_{i}}=\sqrt{N}   \frac{\sum_{i=1}^{N}{(X(i)-\hat{\mu})}^3}     {[\sqrt{\sum_{i=1}^{N}{(X(i)-\hat{\mu})}^2}]^3}          \end{equation}      Thanks in advance


title: Math equation problem help

text: I got the following message based on the code below, any one tell me how to debug it: ! Missing $ inserted. $ My code is:               \documentclass[11pt]{article}          \usepackage{amsmath}     \usepackage{amssymb}          \begin{document}          \begin{equation}          \hat{\gamma_{i}}=\sqrt{N}\frac{\sum_{i=1}^{N}{(X(i)-\hat{\mu})}^3}{[\sqrt{\sum_{i=1}^{N}{(X(i)-\hat{\mu})}^2}]^3}          \end{equation}          \end{document}


title: How to avoid orphan line of multipage tabular?

text: There is an orphan line on page 2. How to get rid of it? ## Minimal Code               \documentclass{article}     \usepackage[a4paper,margin=5cm,landscape]{geometry}     \usepackage{longtable,array}               \usepackage{pstricks}     \def\pic{\begin{pspicture}(5,5)\psframe(5,5)\end{pspicture}}     \def\row{\pic&\pic\\\hline}          \begin{document}          \begin{longtable}{|*{2}{m{0.4\linewidth}|}}     \hline     \row\row\row     \end{longtable}          \begin{longtable}{|*{2}{m{0.4\linewidth}|}}     \hline     \row\row\row     \end{longtable}          \end{document}


title: TikZ: Bug with multiple decorations "at position 1"?

text: If I try to put two decorations on the same path, both at position 1, only the first shows up:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,decorations.markings}     \begin{document}      \begin{tikzpicture}       \node (0)                     {};       \node (1) [right       of=0]  {};       \node (2) [below right of=1]  {};       \path (0) edge[out=0, in=135, postaction={decorate,        decoration={         markings,         mark=at position 1 with {\arrow[>=diamond, yellow] {>}; },         mark=at position 1 with {\arrow[>=open diamond]    {>}; } } }] (2);      \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/dpNT7.png) Via a hack (modifying one of the position to be very close, but not exactly equal to 1)...               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,decorations.markings}     \begin{document}      \begin{tikzpicture}       \node (0)                     {};       \node (1) [right       of=0]  {};       \node (2) [below right of=1]  {};       \path (0) edge[out=0, in=135, postaction={decorate,        decoration={         markings,         mark=at position 0.999 with {\arrow[>=diamond, yellow] {>}; },         mark=at position 1     with {\arrow[>=open diamond]    {>}; } } }] (2);      \end{tikzpicture}     \end{document}      ...I get the output I expected from for the first image: ![enter image description here](http://i.stack.imgur.com/SECyO.png) I also get the expected result if the decorations are at the same point different from 1:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,decorations.markings}     \begin{document}      \begin{tikzpicture}       \node (0)                     {};       \node (1) [right       of=0]  {};       \node (2) [below right of=1]  {};       \path (0) edge[out=0, in=135, postaction={decorate,        decoration={         markings,         mark=at position 0.5 with {\arrow[>=diamond, yellow] {>}; },         mark=at position 0.5 with {\arrow[>=open diamond]    {>}; } } }] (2);      \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/pOicl.png) # Question: Why is this happening?


title: Upright subtitle in BibLaTeX

text: I am using BibLaTeX with backend biber and philosopy-modern as style. What I am looking for: I want the subtitles of books, collections etc. in the bibliography to appear in upright font, i.e. not in italics as the maintitle. Some months ago I found a solution (if I am right I redefined the title in the main document via `\renewbibmacro*{title ...}`), but inadvertently I now changed some characters and I can't remember how to reestablish my definition. What I had not done was to copy `\newbibmacro*{title ...}`, redefine it between `\makeatletter` and \makeatother simly by removing `[titlecase]` in front of `{subtitle}` (at least it doesn't work any longer). Does anybody have any idea? (I don't attach an example, because the problem remains the same with other biblatex-styles, different biber-options, redefinitions of various parts of the `biblatex.def` ...)


Does ConTeXt have any limits to how many items can be used in a document? Is there a maximum restriction on the number of macros, footnotes, cross- references, or counters that can appear in a document?


title: Typesetting single quotes

text: How can the single quote character be typeset as the ascii character `'` in a LaTeX document? For instance, consider the document:               \documentclass{standalone}          \usepackage[T1]{fontenc}          \begin{document}          \texttt{Note that alpha''' is a valid Haskell identifier.}          \end{document}      The output produced by pdflatex is ![single quote in typeset document](http://i.stack.imgur.com/TUnov.png) Notice how the first two quotes are typeset differently than the third one. The third one is bigger further away from the second. With other fonts this become more evident. Adding to the preamble:               \usepackage{dejavu}      gives the result ![single quotes with dejavu](http://i.stack.imgur.com/jjunN.png) I want all of them typeset the same way, as the ascii single quote character `'`. Any clues?


title: Email contact in beamer

text: I am using `\documentclass[9pt]{beamer}`. I put               \title{}     \author{sam \& jony}     \institute{}      Then I want to put email address of authors, how to do so?


title: bibtex techreport entry - authors from different institutions

text: I need to cite this report: http://www.aaafoundation.org/pdf/usRAPIIIFinalReport.pdf It was written by two groups of authors from two institutions. The report was sponsored by some other organizations. It was prepared for yet another organization. So now the question is: what should I fill in each field in a bibtex `@techreport` entry?


title: Spacing around a character in math mode

text: I'd like to use a character that looks like $\sim$, but has spacing like $\neg$ (in particular, which doesn't leave a huge gap to its right). I know I could do this by defining a symbol which expands to $\sim\hspace{-1pt}$, with 1pt replaced by some amount that looks about right to me, but is there a better way to do this (for instance, which doesn't rely on my guess about what spacing looks about right)?


title: Using the flush left align environment flalign

text: When using the `flalign`, I either get LHS and the `=` on te far left and the RHS on the far right. ![enter image description here](http://i.stack.imgur.com/lsUHM.png)               \begin{flalign}     x & = & 1     \end{flalign}      Or I the equation centers itself when I try ![enter image description here](http://i.stack.imgur.com/UfU1U.png)               \begin{flalign}     x & = 1     \end{flalign}      How can I get everything on the LHS?


title: How can I use the Vim LaTeX-Suite multiple compile option with BibTeX and the -aux-directory option?

text: I have a document composed of several subfiles and so have used the `-aux- directory` command to put all of the temporary files in a subfolder, 'auxdir', to keep my working folder clear (and me sane). I now, however, can't use the multiple compile feature of Vim LaTeX-Suite, presumably because the algorithm it follows (here) will only run BibTeX if it finds a `\bibdata` line in the aux file, which it can't seem to do if the aux file isn't in the same directory. The result is that the bibliography isn't compiled at all unless I turn off the `-aux-directory` option, or unless I manually run BibTeX on the aux file. I'm hoping there's a simpler way someone could point out to me!


title: \mathbbm in exponent of equation

text: I am trying to put a blackboard `1` (indicator function; I'm using the `bbm` package) in the exponent of an equation, something like               \begin{align*}       f(x) = \mathbbm{1}(x = 1) \\  % works       p(x) = q^{\mathbbm{1}(x = 1)} % does not work     \end{align*}      I've also tried putting in a `\protect` before `\mathbbm`, to no avail. The error is               dfTeX error: /usr/local/texlive/bin/i386-linux/pdflatex (file bbm8): Font bbm8 at 600 not found      EDIT: As several kind commenters have pointed out, this code compiles in isolation. I have determined that the source of problem is likely something in my style file since changing the document class to `book` works just fine. Any pointers of what to look for in the `.cls` file?


title: How can I stop LaTeX from converting two hyphens to a single hyphen when loading package fontenc?

text: In the following minimal test document, I can have two hyphens appear as two hyphens (which is what I want):               \documentclass[letterpaper]{article}          \begin{document}     A hyphen: \texttt{-}          Two hyphens: \texttt{--}          Three hyphens: \texttt{---}          \end{document}      _But_ in this second test document where I load the `fontenc` package, I get different behavior; the single hyphen is displayed; the double hyphen is collapsed to a single hyphen, and the triple hyphen is collapsed to a double hyphen:               \documentclass[letterpaper]{article}     \usepackage[T1]{fontenc}          \begin{document}     A hyphen: \texttt{-}          Two hyphens: \texttt{--}          Three hyphens: \texttt{---}     \end{document}      I read that loading `fontenc` is a Good Idea, so I want to do that; but I want my double hyphen too. Have I missed something terribly obvious? System: MiKTeX 2.8 on Windows XP Pro.


title: renewcommand \cite[99]{Turing} vs. \cite{Turing}

text: I use \cite commands both as `\cite[99]{Turing}` and `\cite{Turing}`. I wish to redefine the command as it follows:               \let\oldcite\cite     \renewcommand{\cite}[2]{[\oldcite[#1]{#2}]}      but then if I try just to use `\cite{Turing}`, I get an error.               \documentclass[a4paper,10pt]{article}     \usepackage{biblatex}     \bibliography{prova}     \let\oldcite\cite     \renewcommand{\cite}[2]{[\oldcite[#1]{#2}]}     \begin{document}     text     \cite{99}{Turing} % Ok, but I would like to type \cite[99]{Turing}      \cite{Turing}      %error ! Paragraph ended before \blx@xsanitizeafter was complete.     \printbibliography      \end{document}


title: Brace delimited sets of equations inside AMS align with common alignment

text: I would like to extend the following way of typesetting equations with a trailing brace to more than one set of equation.               \documentclass{article}     \usepackage{amsmath}     \begin{document}     This works     \begin{equation}     \left. \begin{split}     a&= b \\     c&= d     \end{split}\qquad\right\}\label{eq1} \\     \end{equation}     Here the alignment is off     \begin{align}     \left. \begin{aligned}     a&= b \\     c&= d     \end{aligned}\qquad\right\}\label{eq1} \\     \left. \begin{aligned}      aaaaaaaaaaaaaaaa&= b \\     c&= ddddddddddddddddddddddddddddddddddd     \end{aligned}\qquad\right\}\label{eq1}     \end{align}     \end{document}      How can I fix it so that the latter two sets are aligned?


title: Table with offset rows

text: How can I make a table that looks like this: ![enter image description here](http://i.stack.imgur.com/1Iqoh.jpg) where column 2's values are centered between column 1's values.


title: Commands defining espacement around floats

text: > **Possible Duplicate:**   >  How to define different spaces below float and non float listing? What are the commands that define the espacement before and after a float? I use the `\captionof` command provided by Koma classes in order to have captioned tables that stay in particular places. However, they are very close to each other. My first idea was to use something like `\vspace{1em}` but I would rather have them spaced just as tables inside floats. What are the commands that define the espacement before and after a float. Here is an example:               \documentclass{scrartcl}          \begin{document}     Here is a table:           \begingroup     \centering     \begin{tabular}{cc}       a&b\\       c&d\\     \end{tabular}     \captionof{table}{Well, a table.}     \endgroup          This is so close! Don't you think? This is so close! Don't you think? This is so close! Don't you think? This is so close! Don't you think? This is so close! Don't you think? This is so close! Don't you think? This is so close! Don't you think? This is so close! Don't you think?           \begin{table}       \centering       \begin{tabular}{cc}         a&b\\         c&d\\           \end{tabular}       \caption{Another table, quite similar.}     \end{table}               \end{document}      Which gives: ![Space after float](http://i.stack.imgur.com/6ovwd.png) The vertical space I am talking about is marker by the red double arrow.


title: How to get rid of jaggies in math symbols in concrete and ccfonts?

text: `concrete` and `ccfonts` packages render math symbols not in vector form but as bitmapped. How can I get rid of this? I added an example snapshot from free latex math fonts,Fig.4 which seems to have same behavior . You can see the difference in math and text characters. I have no problem with Euler version of math symbols ![enter image description here](http://i.stack.imgur.com/8xZIV.png)


title: Accessing the middle of a path

text: In the following example, I'd like to move the dotted vertical lines to the (horizontal) center of the _arrows_ connecting the lower elements. For example, the right dotted line should be centered with regard to the arrow connecting `l2` and `l3`. The best I could do is centering it _between the nodes_ `l2` and `l3`, which looks bad since the arrows are of different length. ![enter image description here](http://i.stack.imgur.com/w9cnz.png)               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{calc,arrows}          \begin{document}          \begin{tikzpicture}[x=2cm, every path/.style={>=latex'}]          \node (h1) at (.5, 1) {$\{S1,S2\}$};     \node (h2) at (2, 1) {$\{S4\}$};     \node (l1) at (0, 0) {$\{S5, S6\}$};     \node (l2) at (1, 0) {$\{S5, S7\}$};     \node (l3) at (2, 0) {$\{S4\}$};              \draw[->] (-.75, 1) -- (h1);     \draw[->] (h1) -- (h2);     \draw[->] (-.75, 0) -- (l1);     \draw[->] (l1) -- (l2);     \draw[->] (l2) -- (l3);          \draw[dotted] ($ (l2) !.5! (l3) $) to ++(90:1);     \draw[dotted] ($ (-.75,0) !.5! (l1) $) to ++(90:1);     \end{tikzpicture}          \end{document}


title: How do I make en/em dashes work in Myriad when using it with MinionPro

text: I'm using MinionPro for the body of a document and Myriad for figure/table captions. Because I can't load packages MinionPro and Myriad at the same time, I load the Myriad fonts for the sans-serif fonts using a `\renewcommand{\sfdefault}{\Myriad-LF}` call in the preamble. Then I set the figure/table captions to use the sans-serif font using package `caption`. This works great, except that the en dashes (`\--`) and em dashes (`\---`) are not properly interpreted as long dashes; they're displayed as two or three hyphens. A minimal working example is below. Any ideas?               \documentclass[12pt]{article}          % Set fonts (Minion Pro, Myriad):     \usepackage[lf]{MinionPro} % 'lf' option to use full-height (lining) figures          % We can't use package Myriad here as it conflicts with MinionPro, so     % instead we declare the Myriad fonts manually.     % Set body sans serif (\textsf) text to Myriad with lining figures:     \renewcommand{\sfdefault}{Myriad-LF}          % Set math sans serif (\mathsf) alphabet to Myriad with lining figures:     \SetMathAlphabet{\mathsf}{normal}{OML}{Myriad-LF}{m}{n}     \SetMathAlphabet{\mathsf}{bold}{OML}{Myriad-LF}{b}{n}          \usepackage[margin=10pt,font={small,sf},labelfont={sf,bf},labelsep=endash]{caption}          \begin{document}     Some text.     \begin{figure}       \centering       \ldots       \caption{The mass of the coal storage piles ranged from 8--20 megatonnes.}       \label{fig:coal}     \end{figure}     \end{document}      This outputs the following, with the incorrect dash highlighted. ![mwe image](http://i.stack.imgur.com/u99WH.png)


title: revtex incompatible with stfloats?

text: Very similar to this one: revtex incompatible with dblfloatfix? Is revtex known to be incompatible with stfloats? In this MWE, the second figure is just gone (with a "Float cannot be placed" warning):               %\documentclass[twocolumn]{article}     \documentclass[twocolumn]{revtex4-1}     \usepackage{stfloats}     \usepackage{lipsum}     \begin{document}       \begin{figure*}[t]         \caption{I'm here in both cases!}       \end{figure*}       \lipsum[1-5]       \begin{figure*}[b]         \caption{I'm gone with revtex!}       \end{figure*}       \lipsum[1-5]     \end{document}      Using article instead works, and removing stfloats makes the figure appear (but on top of the third page, instead of bottom of second).


title: Reference custom styles

text: I am new to LaTeX basically a perl developer, I am trying to automate Bibliographies styles by providing separate tags for each and every fields like shown in the below, and also I am trying to create the output for that coding like I shown below, I am getting errors when a newline is inside bibitem and also creating extra space, how to rectify this updated Sample:               \documentclass{article}     \newcommand\JRNL[1]{#1}     \newcommand\AUGRP[1]{{#1}}     \newcommand\AUTHOR[1]{#1}     \newcommand\SNM[1]{#1}     \newcommand\INITS[1]{#1}     \newcommand\SEP[1]{#1}     \newcommand\ATITLE[1]{#1}     \newcommand\JTITLE[1]{{\em #1}}     \newcommand\VOLUME[1]{#1}     \newcommand\YEAR[1]{#1}     \newcommand\FPAGE[1]{#1}     \newcommand\LPAGE[1]{#1}          \begin{document}          \begin{thebibliography}{9}          \bibitem{bib1}     \JRNL{\AUGRP{\AUTHOR{\INITS{A.}\SEP{ }\SNM{Chorry}}\SEP{, }     \AUTHOR{\INITS{B.}\SEP{ }\SNM{Patkddds}}\SEP{, `}}     \ATITLE{intersections in spaces}\SEP{', }     \JTITLE{Ser. A}\SEP{ }     \VOLUME{117}\SEP{ (}     \YEAR{2010}\SEP{) }     \FPAGE{1095}\SEP{--}     \LPAGE{1106}\SEP{.}}          \end{thebibliography}          \end{document}      Output: > A. Chorry, B. Patkddds, ` _Intersections in spaces_ ', Ser. A. **117** > (2010), 1095--1106. actual problem for me is, I just need to hide the space created by Latex inside bibitem after the single newline character, is it possible to Deactivate the automatic space created by latex after that single newline??, other style related things, i managed myself, for example:               \VOLUME{117}\SEP{ (}     \YEAR{2010}\SEP{) }      I don't want the automatic space generated by Latex after "(" My output is looking like this > A. Chorry, B. Patkddds, ` _Intersections in spaces_ ', Ser. A. **117** ( > 2010), 1095--1106. Please guide me


title: Unicode char \u8:â not set up for use with LaTeX

text: Somewhere in my Bib file this character is used. I havo no clue what character this is and cannot find the corresponding 'real' one. My typestting aborts on this character. I do use               \usepackage[utf8]{inputenc}      \input{ix-utf8enc.dfu}      to load 'windows' characters. my bib file is quite extensive 100+ articles any suggestions would be welcome to resolve


title: How can I align this?

text: \documentclass{article}     \usepackage{mathtools}     \usepackage{amsthm}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}          \begin{document}          \begin{equation*}     R = \left(\begin{array}{cc} cos \theta & -sin\theta \\ sin\theta & cos\theta\end{array}\right) \hspace{45 pt}\mbox{The rotation matrix}     \end{equation*}     \begin{equation*}     yA = \left(\begin{array}{cc} ya & yb \\ yc & yd\end{array}\right) \hspace{45 pt}\mbox{Scaling $A$ by $y$}     \end{equation*}          \end{document}


title: \newcommand argument confusion

text: I'm trying to work through _LaTeX Beginner's Guide_ by Stefan Kottwitz. Here's where I got stumped:               \documentclass{article}     \newcommand{\keyword}[2][\bfseries]{{#1#2}}     \begin{document}     \keyword{Grouping} by curly braces limits the     \keyword{scope} of \keyword[\itshape]{declarations}.     \end{document}      The output adds boldface to "Groupings" and "scope," while "declarations" is italicized. I do not understand this syntax. I vaguely get that `\bfseries` is the "default" and `\itshape` got specifically subbed in for "declarations" but I cannot follow Kottwitz's explanation: > Let's look again at the bold marked line in the code. By using > `[\bfseries]`, we introduced an optional parameter. We refer to it with > `#1`. Its default value is `\bfseries`. Since we used a declaration this > time, we added a pair of braces to ensure that only the keyword is affected > by the declaration. Later in the document, we gave `[\itshape]` to > `\keyword`, changing the default formatting to italics. Can I get a second opinion/explanation of what is going on here?


title: \citealp putting parentheses in citation inappropriately

text: I am using WinEdt with MikTeX 2.9 in a Windows 7 environment. I am having issues being able to get text in parentheses working correctly with a citation, specifically that when the document prints to PDF I get extraneous parentheses that should be removed by the `natbib` command I am using. I wish to have the following text:               (cited in Axelrod 1997)      But I keep getting:               (cited in Axelrod (1997))      I have tried using two methods to remove the extraneous pair of brackets. First I tried:               \citep[cited in]{Axelrod2}      and then I tried:               \citetext{cited in \citealp{Axelrod2}}      but both give me the same result: two sets of parentheses. Could someone please advise me where I am going wrong? I have the `natbib` reference document, and I was copying from the examples in there. I am using a document template created for my university and I have the following packages and options being loaded:               \usepackage[english]{babel}     \usepackage{amsmath,amsthm}     \usepackage{amsfonts}     \usepackage[a4paper,layout=a4paper,             bindingoffset=4cm,left=0cm,right=2cm,             head=2.5cm, bmargin=2cm]{geometry}     \usepackage{microtype}     \usepackage{verbatim}     \usepackage{graphicx}     \usepackage{url}     \usepackage[round]{natbib}      \usepackage{listings}     \usepackage{booktabs}      \usepackage{multirow}     \RequirePackage[l2tabu, orthodox]{nag}     \usepackage{cleveref}


title: Problem with natbib and "To appear" and "In Preparation"

text: The following citations produce a text that reads `Meier (To Appear,I)` although the .aux file contains the right information:               \relax      \citation{a,c}     \bibdata{SM}     \bibcite{c}{{1}{In Preparation}{{Meier}}{{}}}     \bibcite{a}{{2}{To Appear}{{Meier}}{{}}}     \bibstyle{natbib.myfullname}      Is there a way to fix this?               \documentclass{article}          \usepackage{filecontents}          \usepackage{natbib}          \begin{filecontents}{SM.bib}      @incollection{a, author={Max Meier}, title={My first paper}, year={To Appear}}      @incollection{c, author={Max Meier}, title={My first paper}, Year={In Preparation}}     \end{filecontents}               \begin{document}     \citet{a,c}               \bibliography{SM}          \bibliographystyle{natbib.myfullname}          \end{document}