title: Sideways Table not created

text: \begin{sidewaystable}[tbp]       \centering        \captionsetup{labelformat=empty}         \caption{Table 3(a). Market Leverage Linear Regressions  }             \hspace*{-1cm}\begin{tabular}{rrrrrrrr}        % \toprule             \hline%         \multirow{Dependent variable} & \multirow{Market } & \multirow{Leverage} & \multirow{ (= Debt/(Debt} & \multirow{+} & \multicolumn{2}{r}{\multirow{Market Value }} & \multirow{of Equity)} \\             \hline%       %  \midrule               &       &       &       &       & \multicolumn{2}{r}{} &  \\         Estimation Method & Pooled OLS without time Dummies  & Pooled OLS with time Dummies & OLS Firm Clustered Standard Errors & OLS Time Clustered & \multicolumn{2}{r}{Fama- Macbeth} & Newey West \\         \multirow{Intercept} & 0.26  & 0.22  & 0.26  & 0.26  & \multicolumn{2}{r}{0.257} & 0.257 \\               & (\textless.0001) &  (\textless.0001) & (\textless.0001) & -0.004 & \multicolumn{2}{r}{-0.003} & (\textless.0001) \\         \multirow{\pie(dynamics)} & 0.55  & 0.68  & 0.55  & 0.55  & \multicolumn{2}{r}{0.643} & 0.643 \\               & (\textless.0001) & (\textless.0001) & (\textless.0001) & (\textless.0001) & \multicolumn{2}{r}{(\textless.0001)} & (\textless.0001) \\               &       &       &       &       & \multicolumn{2}{r}{} &  \\         \multirow{/beta_1 (Operating Profit Margin )  } & -1.96E-03 & -1.55E-03 & -1.96E-03 & -1.96E-03 & \multicolumn{2}{r}{-0.001} & -0.001 \\               & -0.0004 & (\textless.0001) & (\textless.0001) & -0.002 & \multicolumn{2}{r}{-0.019} & -0.001 \\         \multirow{/beta_2 (Market to Book Ratio)} & -0.01 & -0.01 & -0.01 & -0.01 & \multicolumn{2}{r}{-0.033} & -0.033 \\               & (\textless.0001) & (\textless.0001) & (-0.002) & (-0.018) & \multicolumn{2}{r}{-0.04} & (-0.067) \\         \multirow{/beta_3 (Current Assets Change) } & 5.19E-05 & 5.11E-05 & 5.19E-05 & 5.19E-05 & \multicolumn{2}{r}{3.59E-05} & 3.59E-05 \\               & (-0.0259) & (-0.01) & (-0.004) & (-0.057) & \multicolumn{2}{r}{-0.225} & -0.015 \\         \multirow{/beta_4 (Average Borrowing Cost)} & -2.04E-03 & -3.29E-03 & -2.04E-03 & -2.04E-03 & \multicolumn{2}{r}{-0.005} & -0.005 \\               & (-0.2984) & (-0.04) & (-0.299) & (-0.334) & \multicolumn{2}{r}{-0.02} & (0.005 \\         \multirow{Y\_2006} & \multirow{} & -0.183 & \multirow{} & \multirow{} & \multicolumn{2}{r}{\multirow{}} & \multirow{} \\               &       & (\textless.0001) &       &       & \multicolumn{2}{r}{} &  \\         \multirow{Y\_2008} & \multirow{} & -0.093 & \multirow{} & \multirow{} & \multicolumn{2}{r}{\multirow{}} & \multirow{} \\               &       & -0.001 &       &       & \multicolumn{2}{r}{} &  \\         \multirow{Y\_2009} & \multirow{} & 0.244 & \multirow{} & \multirow{} & \multicolumn{2}{r}{\multirow{}} & \multirow{} \\               &       & (\textless.0001) &       &       & \multicolumn{2}{r}{} &  \\         \multirow{Y\_2010} & \multirow{} & -0.146 & \multirow{} & \multirow{} & \multicolumn{2}{r}{\multirow{}} & \multirow{} \\               &       & (\textless.0001) &       &       & \multicolumn{2}{r}{} &  \\         \multirow{NT (Total Observation)} & \multirow{320} & \multirow{320} & \multirow{320} & \multirow{320} & \multicolumn{2}{r}{\multirow{320}} & \multirow{320} \\               &       &       &       &       & \multicolumn{2}{r}{} &  \\         N (Firms) & 40    & 40    & 40    & 40    & \multicolumn{2}{r}{40} & 40 \\         T = NT/N & 8     & 8     & 8     & 8     & \multicolumn{2}{r}{8} & 8 \\         SSE   & 12.23 & 7.9   & -     & -     & \multicolumn{2}{r}{\multirow{}} & \multirow{} \\         MSE   & 0.04  & 0     & 0.2   & 0.2   & \multicolumn{2}{r}{} &  \\         R-Square & 0.45  & 0.6   & 0.5   & 0.45  & \multicolumn{2}{r}{} &  \\               &       &       &       &       & \multicolumn{2}{r}{} &  \\         Godfrey test for Auto Correlation &       &       & \multirow{} & \multirow{} & \multicolumn{2}{r}{\multirow{}} & \multirow{} \\               &       &       &       &       & \multicolumn{2}{r}{} &  \\         AR (1) & 38.6  & 0.75  &       &       & \multicolumn{2}{r}{} &  \\               & (\textless.0001) & -0.39 &       &       & \multicolumn{2}{r}{} &  \\         AR (2) & 46.5  &       &       &       & \multicolumn{2}{r}{} &  \\               & (\textless.0001) &       &       &       & \multicolumn{2}{r}{} &  \\         AR (3) & 60.9  &       &       &       & \multicolumn{2}{r}{} &  \\               & (\textless.0001) &       &       &       & \multicolumn{2}{r}{} &  \\               &       &       &       &       & \multicolumn{2}{r}{} &  \\         \multicolumn{6}{r}{( ) Indicates significance P values} & \multicolumn{2}{r}{\textit{}} \\             \hline%        % \bottomrule             \hspace*{-1cm}\end{tabular}%          \end{sidewaystable}%      The error it gives               l.258 \caption     {Table 3(a). Market Leverage Linear Regressions }     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>      \let      l.258 \caption     {Table 3(a). Market Leverage Linear Regressions }     Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)          ! Missing number, treated as zero.     <to be read again>      \def      l.258 \caption     {Table 3(a). Market Leverage Linear Regressions }     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>      \def      l.258 \caption     {Table 3(a). Market Leverage Linear Regressions }     Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)               ! LaTeX Error: \begin{lrbox} on input line 225 ended by \end{minipage}.          See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...           l.258 \caption     {Table 3(a). Market Leverage Linear Regressions }     Your command was ignored.     Type I <command> <return> to replace it with another command,     or <return> to continue without it.          Adding sideways figure on right hand page          ! LaTeX Error: Not in outer par mode.          See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...           l.258 \caption     {Table 3(a). Market Leverage Linear Regressions }     You've lost some text. Try typing <return> to proceed.     If that doesn't work, type X <return> to quit.          ! Missing } inserted.     <inserted text>      }     l.258 \caption     {Table 3(a). Market Leverage Linear Regressions }     I've inserted something that you may have forgotten.     (See the <inserted text> above.)     With luck, this will get me unwedged. But if you     really didn't forget anything, try typing `2' now; then     my insertion and my current dilemma will both disappear.          ! Argument of \@xmultirow has an extra }.     <inserted text>      \par      l.262 \multirow{Dependent variable} &     \multirow{Market } & \multirow{Lev...     I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.          ! Missing number, treated as zero.     <to be read again>      D     l.262 \multirow{Dependent variable} &     \multirow{Market } & \multirow{Lev...     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Missing number, treated as zero.     <to be read again>      \unskip      l.262 \multirow{Dependent variable} &     \multirow{Market } & \multirow{Lev...     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>      \unskip      l.262 \multirow{Dependent variable} &     \multirow{Market } & \multirow{Lev...     Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)               Overfull \vbox (12.0pt too high) detected at line 262     []          ! Argument of \@xmultirow has an extra }.     <inserted text>      \par      l.262 ...ependent variable} & \multirow{Market } &     \multirow{Leverage} & \mu...     I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.          ! Missing number, treated as zero.     <to be read again>      M     l.262 ...ependent variable} & \multirow{Market } &     \multirow{Leverage} & \mu...     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Missing number, treated as zero.     <to be read again>      \unskip      l.262 ...ependent variable} & \multirow{Market } &     \multirow{Leverage} & \mu...     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>      \unskip      l.262 ...ependent variable} & \multirow{Market } &     \multirow{Leverage} & \mu...     Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)               Overfull \vbox (12.0pt too high) detected at line 262     []          ! Argument of \@xmultirow has an extra }.     <inserted text>      \par      l.262 ...multirow{Market } & \multirow{Leverage} &     \multirow{ (= Debt/(Debt}...     I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.          ! Missing number, treated as zero.     <to be read again>      L     l.262 ...multirow{Market } & \multirow{Leverage} &     \multirow{ (= Debt/(Debt}...     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Missing number, treated as zero.     <to be read again>      \unskip      l.262 ...multirow{Market } & \multirow{Leverage} &     \multirow{ (= Debt/(Debt}...     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>      \unskip      l.262 ...multirow{Market } & \multirow{Leverage} &     \multirow{ (= Debt/(Debt}...     Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)               Overfull \vbox (12.0pt too high) detected at line 262     []          ! Argument of \@xmultirow has an extra }.     <inserted text>      \par      l.262 ...w{Leverage} & \multirow{ (= Debt/(Debt} &     \multirow{+} & \multicolu...     I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.          ! Missing number, treated as zero.     <to be read again>      (     l.262 ...w{Leverage} & \multirow{ (= Debt/(Debt} &     \multirow{+} & \multicolu...     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Missing number, treated as zero.     <to be read again>      \unskip      l.262 ...w{Leverage} & \multirow{ (= Debt/(Debt} &     \multirow{+} & \multicolu...     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>      \unskip      l.262 ...w{Leverage} & \multirow{ (= Debt/(Debt} &     \multirow{+} & \multicolu...     Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)               Overfull \vbox (12.0pt too high) detected at line 262     []          ! Argument of \@xmultirow has an extra }.     <inserted text>      \par      l.262 ...multirow{ (= Debt/(Debt} & \multirow{+} &     \multicolumn{2}{r}{\multi...     I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.          ! Dimension too large.     \@xmultirow ...mpdima \@tempcnta \dp \@arstrutbox      \ifnum \@tempcnta <0\@temp...     l.262 ...multirow{ (= Debt/(Debt} & \multirow{+} &     \multicolumn{2}{r}{\multi...     I can't work with sizes bigger than about 19 feet.     Continue and I'll use the largest value I can.          ! Missing number, treated as zero.     <to be read again>      \unskip      l.262 ...multirow{ (= Debt/(Debt} & \multirow{+} &     \multicolumn{2}{r}{\multi...     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>      \unskip      l.262 ...multirow{ (= Debt/(Debt} & \multirow{+} &     \multicolumn{2}{r}{\multi...     Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)          ! Argument of \@xmultirow has an extra }.     <inserted text>      \par      l.262 ...lticolumn{2}{r}{\multirow{Market Value }}     & \multirow{of Equity)} \\     I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.          ! Missing number, treated as zero.     <to be read again>      M     l.262 ...lticolumn{2}{r}{\multirow{Market Value }}     & \multirow{of Equity)} \\     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Missing number, treated as zero.     <to be read again>      \unskip      l.262 ...lticolumn{2}{r}{\multirow{Market Value }}     & \multirow{of Equity)} \\     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>      \unskip      l.262 ...lticolumn{2}{r}{\multirow{Market Value }}     & \multirow{of Equity)} \\     Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)               Overfull \vbox (12.0pt too high) detected at line 262     []          ! Missing } inserted.     <inserted text>      }     l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I've put in what seems to be necessary to fix     the current column of the current alignment.     Try to go on, since this might almost work.          ! Missing \cr inserted.     <inserted text>      \cr      l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I'm guessing that you meant to end an alignment here.          ! Missing } inserted.     <inserted text>      }     l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I've put in what seems to be necessary to fix     the current column of the current alignment.     Try to go on, since this might almost work.          ! Missing \cr inserted.     <inserted text>      \cr      l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I'm guessing that you meant to end an alignment here.          ! Missing } inserted.     <inserted text>      }     l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I've put in what seems to be necessary to fix     the current column of the current alignment.     Try to go on, since this might almost work.          ! Missing \cr inserted.     <inserted text>      \cr      l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I'm guessing that you meant to end an alignment here.          ! Missing } inserted.     <inserted text>      }     l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I've put in what seems to be necessary to fix     the current column of the current alignment.     Try to go on, since this might almost work.          ! Missing \cr inserted.     <inserted text>      \cr      l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I'm guessing that you meant to end an alignment here.          ! Missing } inserted.     <inserted text>      }     l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I've put in what seems to be necessary to fix     the current column of the current alignment.     Try to go on, since this might almost work.          ! Missing \cr inserted.     <inserted text>      \cr      l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I'm guessing that you meant to end an alignment here.          ! Missing } inserted.     <inserted text>      }     l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I've put in what seems to be necessary to fix     the current column of the current alignment.     Try to go on, since this might almost work.          ! Missing \cr inserted.     <inserted text>      \cr      l.262 ...icolumn{2}{r}{\multirow{Market Value }} &     \multirow{of Equity)} \\     I'm guessing that you meant to end an alignment here.


title: Trying to get Cyrillic output from Cyrillic input, all I get are?

text: Can anyone help me? I've looked here and around Google, but all the code which people claim works for them doesn't work for me. For example, if I use XeLaTeX on:               \documentclass{book}     \usepackage[paperwidth=5in,paperheight=8in,      top=0.75in,  bottom=0.75in,      inner=0.75in,outer=0.75in ]{geometry}     \usepackage{setspace}          \usepackage{libertine}     \usepackage[russian]{babel}           \begin{document}          \begin{titlepage}     \vspace*{\stretch{2}}     \begin{center}     \huge      Либертарианские уроки \\     \textit{Южного Парка}          \vspace{\stretch{1}}     \Large     Libertarian Philosophy in \\     \textit{South Park}          \vspace{\stretch{4}}     \normalsize     Брандон Симпсон     \end{center}     \end{titlepage}          \end{document}      I get the English output as normal, but the Cyrillic characters are all rendered as ?????? I thought maybe the problem was with TeXShop, but if I open the .pdf with Preview or Acrobat, it's all ???s... Any advice? I've been using LaTeX for a long time, but haven't had to write in Cyrillic, and don't know much about fonts/encoding/etc. thank you


title: How to give color and style to one table in lyx

text: I have been trying to do something like this in Lyx. ![enter image description here](http://i.stack.imgur.com/Dk6di.jpg) As you can see is a very simple style that I been trying to reproduce but without any success. I know there are to many questions related to this but I tried some of the answers but nothing seems to work. I also wanna know if there is a color package with a color like the one that I show in the image, I remembered reading something like this in another question that I can no find. I used the `xcolor` package but when I tried to generate the PDF, there was always an error except when I used the "basic" colors. Thanks a lot


title: Centering tables in document class apa6

text: I'm using the `apa6` class in `doc` mode for my thesis. Now, when I create a table and try to center it on a page, the table is centered alright. The caption, however, still floats on the left of the page where the table used to be. This what it looks like: ![Table with incorrectly positioned caption](http://i.stack.imgur.com/Uyu7M.png) I would like the caption to align with the left side of the table. This is basicly what my .tex-file looks like:               \documentclass[doc]{apa6}          \usepackage[american,ngerman]{babel}     \usepackage[style=apa,sortcites=true,sorting=nyt]{biblatex}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \shorttitle{Some title}          \begin{document}          \begin{table}[htbp]         \center         \caption{Some caption}         \label{table1}         \begin{tabular}{lcc}             \toprule             Test1 & 1 & 2\\             Test2 & 1 & 2\\             Test3 & 1 & 2\\             \bottomrule         \end{tabular}     \end{table}          \end{document}


title: Are there any LaTeX packages for multicolumn typesetting besides multicol?

text: I'm going to need two-column layout (more advanced than LaTeX's `\twocolumn` - I'll need changing the number of columns without starting a new page or column balancing); however, due to the nature of the (commercial) project, I do not want to use `multicol` because of its license (and yes, I read it carefully, and in my opinion the "moral obligation" to pay a strictly positive fee lies on me, and I would very much prefer to avoid this.). Is there any other (free) LaTeX package which would enable multicolumn typesetting? (I _am_ considering using ConTeXt, too, but since there are multiple authors who supply manuscripts in LaTeX, and I have a tested template (read: document class) which I only need to modify, this would be rather a drastic step.)


title: How to reference equations using letters and numbers

text: Sometimes it is convenient to refer to a group of equations by a letter and a number. For example:               2+1   (A1)     2+4   (A2)     x^4   (B3)     x^e   (B4)      Placing `\tag{A\theequation}\label{eqn:thisone}\stepcounter{equation}}` instead of just `\label{eqn:thisone}` works, but seems hacky (especially manually stepping the counter). Is there a better way?


title: Cross References using multiple documents

text: I'm trying to solve a problem that's come up in producing a large document that I'm breaking up into smaller ones. The basic structure is this. A main document (`main.tex`) that includes formatting info for the whole project, and individual files for chapters (`part1.tex`, `part2.tex`, etc). I need to produce a lot of cross-references, mostly to enumerate items within a part, but ideally also to some elements across parts. My basic workflow is editing LaTeX documents in emacs using the RefTeX capabilities to produce cross-references. My problem is that when RefTex automatically supplies me with labels (and I'm not willing to give up that convenience), it'll start numbering the labels from scratch for each part. Thus, `part1.tex` might look like this.               \begin{enumerate}     \item first thing in part 1.\label{item:1}     \item second thing in part 1.\label{item:2}     \end{enumerate}     Reference to \ref{item:1}      Correspondingly, `part2.tex` might look like this.               \begin{enumerate}     \setcounter{enumi}{2}     \item first thing in part 2.\label{item:1}     \item second thing in part 2.\label{item:2}     \end{enumerate}     Reference to \ref{item:1}      (NB: I've got the `\setcounter` command just to ensure that the numbers differ between the two parts so I can see whether the cross-referencing works properly.) The main document that calls these is the basic `main.tex`.               \documentclass{book}          \begin{document}     \input{part1}     \input{part2}     \end{document}      The problem is that, because RefTeX starts over in the labels it provides, the cross-references are screwed up. Both of the references in `part1.tex` and `part2.tex` shown above will be "3", the number of the enumerate item the last `\label{item:1}` is attached to. In the past, I've simply brute-forced the issue. When it came time for a final compile, I search-and-replaced all of the labels in my code to include unique prefixes for each input-file. For example, all of the `item:xx` labels in `part1.tex` would be turned into `item-part1:xx` labels, mutatis mutandis for `part2.tex`. But that is ugly, and surely there must be a better way. I don't know if there are packages that solve this problem for me (I looked at `xr`, but couldn't get it to work out for me), or if there is a way to customize RefTeX so that, when it automatically produces labels within one of the parts, it's automatically aware of the labels that are in use in all of the other parts and hence ensures that no duplicates will be created. For what it's worth, I'm running TeX on OSX, in case that matters.


title: Tikz - Drawing in the unit circle

text: I am working on learning how to use tikz for mathematical drawings and I am currently trying to make... well... if you read or typeset the code you will get the idea. If you look at the results the lines on either side of the y axis are not touching the top/bottom of the circle. However, I think they should (assuming I did my math right). Any given point of the unit circle is `(sin(\x),cos(\x))` I know `cos(\x)` is `\x/8` thus `sin(\x)` is `1-\x/8*\x/8` (according to everyone fav trig identity). Then when I draw a line, `(\x/8,0) -- +(0,1-\x/8*\x/8)` this should reach the top. What am I doing wrong? Thanks for your time. My Code:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{backgrounds,calc}          \begin{document}     \begin{tikzpicture}[scale=3]       \coordinate [label=left:$O$] (O) at (0,0);       %Draw the Circle around it all       \draw[semithick] (0,0) circle (1);       %Draw lines to the top       \foreach \x in {-4,...,4}         \draw[red,very thick] (\x/8,0) -- +(0,1-\x/8*\x/8);     \end{tikzpicture}     \end{document}


title: Problem with the geometry package reset option

text: Page 11 of the geometry package manual says that the `reset` option > sets back the layout dimensions and switches to the settings before geometry > is loaded. On page 30 there is a slightly different description: > The [reset] option cancels all the options specified before reset, except > pass. However, the following code               \documentclass{article}     \showthe\textwidth     \usepackage[textwidth=50pt,reset]{geometry}     \showthe\textwidth      produces the output               > 345.0pt.     l.2 \showthe\textwidth          > 430.00462pt.     l.4 \showthe\textwidth      So, `\textwidth` doesn't return to the value it had before `geometry` was loaded. What am I doing wrong?


title: Custom chunk hooks in knitr

text: _[Cross-posted from SO]_ I am trying to create a chunk hook that can produce a `\floatfoot{}` as part of the output from a chunk. Hopefully the following example makes clear what I am trying to achieve: ## 1. .Rnw file Here is the knitr file.               \documentclass[a4paper]{article}     \title{Learn Moar knitr!}     \author{Foo Bar}     \date{\today}          \usepackage{blindtext}     \usepackage{floatrow}     \begin{document}     \blindtext          <<label=plotWithNotes, fig.lp='fig:', fig.cap='This is a figure'>>=     plot(rnorm(100), rbinom(n = 100, size = 1, prob = 0.5))     @          \end{document}      ## 2. LaTeX chunk               \begin{figure}[]     \includegraphics[width=\maxwidth]{figure/plotWithNotes} \caption[This is a figure]{This is a figure\label{fig:plotWithNotes}}     \end{figure}      ## 3. floatfoot The markup `\floatfoot{}` provided by the `floatrow` package produces a footnote to the graph, and to show its use, I modify the LaTeX chunk above.               \begin{figure}[]     \includegraphics[width=\maxwidth]{figure/plotWithNotes} \caption[This is a figure]{This is a figure\label{fig:plotWithNotes}}     \floatfoot{\emph{Note:} This is a footer to the plot and contains some information about the plot.}     \end{figure}      Is there any way I can generate the text inside floatfoot above using a chunk option?


I just want to have the following simple equation. But the latex told me "! Missing number, treated as zero. problem" I have no idea what's going on here               \[L\mathaccent N(\mu ,{\sigma ^2})\]      Error message:               ! Missing number, treated as zero.     to be read again,     N     l.245 \[L\mathaccent N     (\mu ,{\sigma ^2})\]      Kind Regards SL


title: how do we give authors names and affiliations details in biblatex package

text: I am making a research article using latex file. For that I want to display the bibliography in author-year order and also I need to mention the citations with author and year (if more than two authors then i need to give et.al). For that I used the following format:               \documentclass[a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=authoryear,maxnames=2]{biblatex} % newly added     %\usepackage[style=authoryear,sortcites,sorting=ynt,backend=biber]{biblatex}     %\usepackage{hyperref}     \addbibresource{biblatex-examples.bib}     \begin{document}     Filler text \parencite{wassenberg},\parencite{cicero},\parencite{companion},\parencite{angenendt}.     \printbibliography     \end{document}      So it is working but when i am giving the title for document along with authors and affiliations information it is not working ... it is giving the errors. And also i need the packages to display the figures which are in `.eps` format. Hence I request you to provide any suggestions and answers how to resolve the above need so that i am very grateful if I got the above to you.


title: Rotating Mathematical Symbols without losing quality

text: I need to use the symbol \subsetneq rotated by 45 degrees. I can obtain the required symbol with               \rotatebox[origin=c]{45}{$\subsetneq$}       or equivalently with               \begin{rotate}{45}     $\subsetneq$     \end{rotate}      but in both cases the quality loss on the symbol is very high. Does anybody know of a better way to do this? Thanks Here is an example:               \documentclass[xcolor=dvipsnames]{beamer}     \usepackage{xcolor, enumerate, MnSymbol, mathtools, graphicx, textpos, rotating}     \begin{document}     \frame{     \begin{rotate}{45}     $\subsetneq$     \end{rotate}     }     \end{document}      From the log file:               Here is how much of TeX's memory you used:      17736 strings out of 493921      321014 string characters out of 3144864      378011 words of memory out of 3000000      20634 multiletter control sequences out of 15000+200000      20133 words of font info for 55 fonts, out of 3000000 for 9000      841 hyphenation exceptions out of 8191      49i,14n,53p,451b,552s stack positions out of 5000i,500n,10000p,200000b,50000s      <C:\Users\Carapelle\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\mnsymbol      \dpi1244\MnSymbolD12.pk>     Output written on untitled-4.pdf (1 page, 7035 bytes).     PDF statistics:      46 PDF objects out of 1000 (max. 8388607)      3 named destinations out of 1000 (max. 500000)      43 words of extra memory for PDF output out of 10000 (max. 10000000)


title: place bullet items in tabular form

text: I would like to get the items to show up with the bullet in a tabular form, however, when I try to place the items in a table, I get an error...here is the code:               \documentclass[11pt,a4paper,sans]{moderncv}      \moderncvstyle{casual}      \moderncvcolor{blue}          \usepackage{lipsum}      \usepackage[scale=0.75]{geometry}          \firstname{John}      \familyname{Smith}               \title{Curriculum Vitae}     \address{Street}{City, St. 1111}     \mobile{(000) 000 0000}     \email{uname@email.com}          \begin{document}          \makecvtitle               \section{Coursework}               \cventry{2012--Present}{1\textsuperscript{st} Year Analyst}{\textsc{Lehman Brothers}}   {Los Angeles}{}{Developed spreadsheets for risk analysis on exotic derivatives on a wide array of commodities (ags, oils, precious and base metals), managed blotter and secondary trades on structured notes, liaised with Middle Office, Sales and Structuring for bookkeeping.     \newline{}\newline{}     Detailed achievements:     \begin{itemize}     \item class 1      \item class 2      \item class 3      \item class 4      \end{itemize}}          \end{document}      How can I get the items to show up as:               o class 1     o class 2     o class 3     o class 4


title: Hyperlinking problems when using subequations, hyperref and cleveref

text: # **The problem** Hi. I'm currently writing my thesis and have my equations numbered within sections. I also use `subequations` from `amsmath`. When I use `amsmath`, `hyperref` and `cleveref` together, however, I get 2 warnings about destinations with the same identifier. The result is that `\cref{eq:2a}` gets the correct number in the pdf but the hyperlink points to `eq:1a`. # **A MWE**               \documentclass{book}          \usepackage{amsmath}     \usepackage{hyperref}     \usepackage{cleveref}          \numberwithin{equation}{section}          \begin{document}     This is a test.          \section{Section 1}          \begin{subequations}\label{eq:1}     \begin{align}     x=y\label{eq:1a}     \end{align}     \end{subequations}          \section{An error}          \begin{subequations}\label{eq:2}     \begin{align}     1=2\label{eq:2a}     \end{align}     \end{subequations}          \end{document}      # **The aux** Sure enough,               \newlabel{eq:1}{{0.1.1}{1}{Section 1\relax }{equation.0.0.1.1}{}}     \newlabel{eq:1@cref}{{[equation][1][0,1]0.1.1}{1}}     \newlabel{eq:1a}{{0.1.1a}{1}{Section 1\relax }{equation.0.0.1a}{}}     \newlabel{eq:1a@cref}{{[equation][1][0,1]0.1.1a}{1}}     \@writefile{toc}{\contentsline {section}{\numberline {0.2}An error}{1}{section.0.2}}     \newlabel{eq:2}{{0.2.1}{1}{An error\relax }{equation.0.0.1.1}{}}     \newlabel{eq:2@cref}{{[equation][1][0,2]0.2.1}{1}}     \newlabel{eq:2a}{{0.2.1a}{1}{An error\relax }{equation.0.0.1a}{}}     \newlabel{eq:2a@cref}{{[equation][1][0,1]0.2.1a}{1}}      # **Warnings**               pdfTeX warning (ext4): destination with the same identifier (name{equation.0.0.1a}) has been already used, duplicate ignored     pdfTeX warning (ext4): destination with the same identifier (name{equation.0.0.1.1}) has been already used, duplicate ignored      # **What to do?** All packages have been updated too. So I've tried a few things that can get this to work without any warnings but none is an ideal solution from my point of view.   1. Remove all `subequations`   2. Remove line `\numberwithin{equation}{section}`   3. Remove package `cleveref`   4. Remove package `hyperref` This in no doubt related to Hyperref jumps to the wrong equation if the equation has a \tag and cleveref is used and also Cross-references linking to wrong equations using `hyperref` but I can't manage to use those Q&As to help me here. I'd really appreciate it if anybody could shed some light on this issue or suggest a workaround. Thanks in advance!


title: Define command for bold list-item

text: I have a set of commands for producing various kinds of specific list-items, such as               \newcommand{\staritem}{\item[$\star$]} % not really, but you get the gist      All the ones I currently have can be used in the same way as `\item`, that is, just specify the item type at the start of the paragraph, and then write text as normal. Now, I want to create a `\bolditem` command, that produces an `\item` and wraps the text in `\textbf{...}`. However, I'd like to make it available with the same syntax (so the users don't have to wrap the entire item text in braces). Is this possible? How?


title: Format tables with points under each other

text: so I have this rather complicated table and I am trying to format the cells so that all points in one row are under each other. What I tried so far was to edit the "\multicolumn{1}{l}" to include siunix code for the appropriate formatting. This works more or less alright, but not for the alpha entries, where it always places a 0 before the `.` and not for the entries for the range where there is not `.` but a `-` instead. Does anyone have an idea for formatting the table to achieve the desired result? Maybe there is a better way than changing each multicolumn entry individually? Thank you for any ideas! Mil               \begin{table}       \centering       \caption[Descriptive Statistics for the Employed Scales]{Descriptive Statistics for the Employed Scales\vspace{-0.25cm}}        \makebox[\textwidth][c]{\begin{tabular}{rrrrrrrrrrrrrrrrrrrrr}            \toprule               & \multicolumn{6}{c}{\boldmath{}\textbf{$t_1$}\unboldmath{}} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{6}{c}{\boldmath{}\textbf{$t_2$}\unboldmath{}} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{6}{c}{\boldmath{}\textbf{$t_3$}\unboldmath{}} \bigstrut\\        \cline{2-7}\cline{9-14}\cline{16-21}       &    &    &    & \multicolumn{2}{c}{\textbf{range}} &    &    &    &    &    & \multicolumn{2}{c}{\textbf{range}} &    &    &    &    &    & \multicolumn{2}{c}{\textbf{range}} &  \bigstrut\\        \cline{5-6}\cline{12-13}\cline{19-20}       & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$M$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$SD$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textbf{$\alpha$}\unboldmath{}} & \multicolumn{1}{l}{\textbf{pot.}} & \multicolumn{1}{l}{\textbf{actual}} & \multicolumn{1}{l}{\textbf{skew}} & \multicolumn{1}{l}{\textbf{}} & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$M$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$SD$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textbf{$\alpha$}\unboldmath{}} & \multicolumn{1}{l}{\textbf{pot.}} & \multicolumn{1}{l}{\textbf{actual}} & \multicolumn{1}{l}{\textbf{skew}} & \multicolumn{1}{l}{\textbf{}} & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$M$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$SD$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textbf{$\alpha$}\unboldmath{}} & \multicolumn{1}{l}{\textbf{pot.}} & \multicolumn{1}{l}{\textbf{actual}} & \multicolumn{1}{l}{\textbf{skew}} \bigstrut\\            \toprule            Prompt engagement & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{l}{2.91} & \multicolumn{1}{l}{1.46} & \multicolumn{1}{l}{.90} & \multicolumn{1}{l}{0-6} & \multicolumn{1}{l}{0-6} & -0.22 & \multicolumn{1}{c}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} &  \bigstrut[t]\\            Prompt pursuit & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.25} & \multicolumn{1}{l}{0.57} & \multicolumn{1}{l}{.65} & \multicolumn{1}{l}{0-5} & \multicolumn{1}{l}{0-5} & \multicolumn{1}{l}{-0.35} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} \\            Motivational reg. & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.44} & \multicolumn{1}{l}{1.02} & \multicolumn{1}{l}{.87} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.18} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} \\            TV intrinsic & \multicolumn{1}{l}{4.38} & \multicolumn{1}{l}{0.99} & \multicolumn{1}{l}{.89} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.44} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.26} & \multicolumn{1}{l}{0.92} & \multicolumn{1}{l}{.88} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{0.03} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.23} & \multicolumn{1}{l}{0.84} & \multicolumn{1}{l}{.87} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.18} \\            TV attainment & \multicolumn{1}{l}{4.45} & \multicolumn{1}{l}{0.93} & \multicolumn{1}{l}{.90} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.3-6} & \multicolumn{1}{l}{-0.41} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.59} & \multicolumn{1}{l}{0.90} & \multicolumn{1}{l}{.90} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{0.01} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.55} & \multicolumn{1}{l}{0.85} & \multicolumn{1}{l}{.90} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{0.02} \\            TV instrumental & \multicolumn{1}{l}{5.00} & \multicolumn{1}{l}{0.69} & \multicolumn{1}{l}{.79} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{3-6} & \multicolumn{1}{l}{-0.38} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.22} & \multicolumn{1}{l}{0.83} & \multicolumn{1}{l}{.81} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.31} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.12} & \multicolumn{1}{l}{0.87} & \multicolumn{1}{l}{.87} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.26} \\            Metacognitive mon. & \multicolumn{1}{l}{3.77} & \multicolumn{1}{l}{0.80} & \multicolumn{1}{l}{.81} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.31} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.95} & \multicolumn{1}{l}{0.70} & \multicolumn{1}{l}{.80} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-5.6} & \multicolumn{1}{l}{-0.46} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.96} & \multicolumn{1}{l}{0.68} & \multicolumn{1}{l}{.86} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-5.7} & \multicolumn{1}{l}{-0.75} \\            Metacognitive reg. & \multicolumn{1}{l}{4.22} & \multicolumn{1}{l}{0.66} & \multicolumn{1}{l}{.81} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{2.1-6} & \multicolumn{1}{l}{-0.03} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.05} & \multicolumn{1}{l}{0.75} & \multicolumn{1}{l}{.88} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.6-6} & \multicolumn{1}{l}{-0.13} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.17} & \multicolumn{1}{l}{0.68} & \multicolumn{1}{l}{.88} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-5.9} & \multicolumn{1}{l}{-0.61} \\            Persistence & \multicolumn{1}{l}{4.49} & \multicolumn{1}{l}{0.67} & \multicolumn{1}{l}{.75} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{3-6} & \multicolumn{1}{l}{0.08} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.16} & \multicolumn{1}{l}{0.81} & \multicolumn{1}{l}{.80} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.14} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.12} & \multicolumn{1}{l}{0.72} & \multicolumn{1}{l}{.79} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.7-6} & \multicolumn{1}{l}{-0.29} \\            Elaboration & \multicolumn{1}{l}{4.28} & \multicolumn{1}{l}{0.80} & \multicolumn{1}{l}{.82} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.4-6} & \multicolumn{1}{l}{-0.05} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.05} & \multicolumn{1}{l}{0.85} & \multicolumn{1}{l}{.86} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.6-6} & \multicolumn{1}{l}{-0.13} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.12} & \multicolumn{1}{l}{0.84} & \multicolumn{1}{l}{.89} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.8-6} & \multicolumn{1}{l}{-0.08} \\            Perform. Approach & \multicolumn{1}{l}{3.51} & \multicolumn{1}{l}{1.19} & \multicolumn{1}{l}{.90} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.01} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.36} & \multicolumn{1}{l}{1.21} & \multicolumn{1}{l}{.95} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.01} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.42} & \multicolumn{1}{l}{1.22} & \multicolumn{1}{l}{.94} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.20} \\            Perform. Avoidance & \multicolumn{1}{l}{3.83} & \multicolumn{1}{l}{1.24} & \multicolumn{1}{l}{.92} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.33} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.71} & \multicolumn{1}{l}{1.25} & \multicolumn{1}{l}{.94} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.30} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.71} & \multicolumn{1}{l}{1.28} & \multicolumn{1}{l}{.94} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.47} \\            Mastery Approach & \multicolumn{1}{l}{4.48} & \multicolumn{1}{l}{0.76} & \multicolumn{1}{l}{.76} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{2-6} & \multicolumn{1}{l}{-0.22} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.34} & \multicolumn{1}{l}{0.75} & \multicolumn{1}{l}{.77} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{2-6} & \multicolumn{1}{l}{-0.14} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.18} & \multicolumn{1}{l}{0.74} & \multicolumn{1}{l}{.79} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.28} \\            Mastery Avoidance & \multicolumn{1}{l}{4.10} & \multicolumn{1}{l}{0.87} & \multicolumn{1}{l}{.74} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.18} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.23} & \multicolumn{1}{l}{0.78} & \multicolumn{1}{l}{.74} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.3-6} & \multicolumn{1}{l}{-0.24} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.09} & \multicolumn{1}{l}{0.82} & \multicolumn{1}{l}{.76} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.31} \\            Boredom & \multicolumn{1}{l}{2.02} & \multicolumn{1}{l}{0.88} & \multicolumn{1}{l}{.73} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-5} & \multicolumn{1}{l}{0.72} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{2.92} & \multicolumn{1}{l}{1.02} & \multicolumn{1}{l}{.87} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{0.32} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{2.92} & \multicolumn{1}{l}{0.94} & \multicolumn{1}{l}{.85} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{0.43} \\            Pleasure & \multicolumn{1}{l}{4.65} & \multicolumn{1}{l}{0.96} & \multicolumn{1}{l}{.85} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.58} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.58} & \multicolumn{1}{l}{0.89} & \multicolumn{1}{l}{.84} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.22} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.55} & \multicolumn{1}{l}{0.91} & \multicolumn{1}{l}{.82} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.48\vspace{0.2cm}} \\            \toprule            \multicolumn{21}{l}{\hspace{0.9cm}\vspace{-0.5cm}\footnotesize \textit{Note.} $N=330$ in $t_1$; $N=328$ in $t_2$; $N=298$ in $t_3$. $\alpha$ represents Cronbach's Alpha. Prompt pursuit is presented as a global scale.            }             \bigstrut[t]\\            \end{tabular}%            }       \label{tab:scales}%     \end{table}        ![enter image description here](http://i.stack.imgur.com/4gDzT.gif)


title: Referencing book IEEE

text: I am using both TeXworks and Texmaker to write my thesis and have to somehow do my references. Moreover everything is supposed to be written using a 'book' environment. I have found that JabRef is used for the IEEE referencing style that I want to use but I cannot use it in a book. It is obvious that I am doing something silly because I can use it in articles. Is there any template that could be provided?


title: Help me fix "Underfull \hbox" warning

text: I meet the trouble with an "Underfull `\hbox`" warning with this code:               \documentclass[12pt,a4paper,final]{book}     %\usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{makeidx}     \usepackage{graphicx}     \usepackage[utf8]{vietnam}     \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \author{Phuong}     \title{Đáp áp Bộ đề ôn tập học kỳ I khối 11 năm 2011-2012}     \def\labelitemi{Câu}     \begin{document}     \begin{center}     \textbf{ĐỀ 1}     \end{center}     \newcounter{qcounter}     \begin{list}{Câu \Roman{qcounter}: \\}{\usecounter{qcounter}}     \item \hspace*{\fill} \\         \begin{enumerate}         \setcounter{enumi}{0}         \item~ Tìm tập xác định của hảm số $y = \sqrt{\frac{1-\cos{x}}{2+\sin{x}}}$         \item~ Giải các phương trình sau:\hspace*{\fill} \\         \end{enumerate}     \end{list}          \end{document}      The warning appears for the line:               \item \hspace*{\fill} \\      Please help me avoid this warning.


title: Problems with nested comments and figures

text: Now this problem is probably too localized, but I do not see anywhere else to get help solving it. I have a large amount of important files, and these stopped compiling after switching from MikTex to TexLive (I reinstalled windows) after some fiddling I found out that some of the figures halt the compilation               \documentclass[10pt]{article}     \usepackage{tikz,tkz-euclide}     \usepackage{comment}     \usepackage{kantlipsum}     \includecomment{foo}     \includecomment{fuu}     \includecomment{figurer}     \begin{document}     \begin{foo}     \kant[1]     \begin{fuu}     \kant[3]     \begin{figurer}     \begin{figure}[!htbp] \centering     \begin{tikzpicture}       \tikzset{venn circle/.style={draw,circle,minimum width=6cm,fill=#1,opacity=0.4}}     \begin{scope}       \node (D) at (2,4) {$\overline{\,F\,}\cap\overline{\,J\,}=2$};      \end{scope}         \node (C) at (2,0) {};           \tkzDrawCircle[R,fill=gray,opacity=0.4](C,5.25cm)       \node [venn circle = red] (A) at (0,0) {};       \node [venn circle = blue] (B) at (0:4cm) {};       \node at (barycentric cs:A=1/2,B=1/2) {$F\cap J=10$};          \node  at (0,0) {$J=16$};       \node  at (0:4cm) {$F=8$};     \end{tikzpicture}       \end{figure}     \end{figurer}     \kant[4]     \end{fuu}     \end{foo}     \end{document}      Here is a somewhat minimal example, if the tikzpicture is change to something simpler like a line, the file compiles just fine. Now, my question is how do I get nested comments and the tikzpicture enviroment to become friends for all types of plots and diagrams?


title: Unwanted Line Drawn Between Ends of Curves in 3D

text: Okay, this was about one of the technical pitfalls and how to avoid it, which was solved quite easily by adding `samples y=0` as recommended by Francis. **Initial Question** The following does two turns of a helix and then joins the start and finish with a straight line for some reason. Plus there's some nasty overlapping happening in the smoothing process. **MWE** ![MWE Output](http://i.stack.imgur.com/MyIhf.jpg)               \documentclass{standalone}          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{pgfplots}     \usepackage{mathtools}          \pgfplotsset{compat=1.9}          \begin{document}     %     \par\begin{tikzpicture}     %     \begin{axis}[         scale=3,         x={(-0.6cm,-0.3cm)}, y={(.6cm,0.0cm)}, z={(0cm,.2cm)},         xlabel={$x$}, ylabel={$y$}, zlabel={$z$},         axis lines=middle, axis on top,         xtick={-1,1}, ytick={-1,1},ztick={4,8},         enlargelimits=true         ]     \addplot3[smooth, thick, color=green, domain=0:720] ({2*sin(x)},{2*cos(x)},{2*x/180});     %     \end{axis}     %     \end{tikzpicture}     %     \end{document}


title: Conditional syntax highlighting for the same function, possibly using delimiters

text: Is there any way to conditionally highlight syntaxes in `minted`? I have the same name for an argument of a function as well as a function itself, messing up the syntax highlighting pretty badly. A workaround is to differentiate between `<function> =` and `<function>(` in their totalities, but this would apply the colour to the equals sign and brace respectively, leading to a pretty ugly output. Is it possible to still only colour the `<function>` part, using the equals to sign (`=`) or brace (`)`) only as a delimiter, but keeping the colour scheme (for these signs) intact?


title: Manually break lines like auto-breaking in lstlisting

text: I would like to decide where the long line should break, but with actions pre-/postbreak and without advancing in line numbering. I've tried that one:               \documentclass{article}     \usepackage{color, xcolor, listings}     \def\postbreak{\raisebox{0ex}[0ex][0ex]{\ensuremath{\hookrightarrow\space}}}     \lstset{postbreak=\postbreak,         breaklines=true, breakatwhitespace=true,         basicstyle=\small\ttfamily,         xleftmargin=2em,xrightmargin=1em,         numbers=left,frame=single     }     \begin{document}         \begin{lstlisting}             Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id mattis velit, ut ultricies massa.             In lacus libero, porttitor quis urna id.         \end{lstlisting}         \begin{lstlisting}[escapeinside={@}{@}]             Lorem ipsum dolor sit amet,@\newline\postbreak@ consectetur adipiscing elit.@\newline\postbreak@ Praesent id mattis velit,@\newline\postbreak@ ut ultricies massa.             In lacus libero, porttitor quis urna id.         \end{lstlisting}         \begin{lstlisting}             Lorem ipsum dolor sit amet,       consectetur adipiscing elit.        Praesent id mattis velit,           ut ultricies massa.             In lacus libero, porttitor quis urna id.         \end{lstlisting}     \end{document}      but it brokes line spacing and frames around listing. ![img](http://i.imgur.com/bWfmHe1.png) The first box is what I get normally, second box is what I get, when I try to put linebreaks, and third is what I would like to get, but without placing spaces by hand in the listing (as it can broke, when some styles change)


title: Generating random conversions

text: I am working on a system to randomly generate some exercises on unit conversion. The students get a exercise like > 27.89 mm = ...... hm I achieved this whit the use of a random value generator and the `ifthen` package. But something is going wrong whit the spacing of this package. This is the code I use whit one table of how it should be and one table that is randomly generated:               \documentclass{article}          \newcommand{\randFloat}{         \reinitrand[first=0, last=100, counter=var]         \rand\arabic{var}.\rand\arabic{var}         }     \newcommand{\randGrooth}{         \reinitrand[first=1,last=7,counter = grooth]         \rand         \ifthenelse{\arabic{grooth} = 1}{mm}{             \reinitrand[first=1,last=6,counter = test]             \rand             \ifthenelse{\arabic{test} = 1}{cm}{                 \reinitrand[first=1,last=5,counter = test]                 \rand                 \ifthenelse{\arabic{test} = 1}{dm}{                     \reinitrand[first=1,last=4,counter = test]                     \rand                     \ifthenelse{\arabic{test} = 1}{m}{                         \reinitrand[first=1,last=3,counter = test]                         \rand                         \ifthenelse{\arabic{test} = 1}{dam}{                             \reinitrand[first=1,last=2,counter = test]                             \rand                             \ifthenelse{\arabic{test} = 1}{hm}{km}                         }                     }                 }             }         }     }          \usepackage{calc}     \usepackage{ifthen}     \usepackage{lcg}          \begin{document}          \begin{table}     \centering     \begin{tabular}{ll}     44.36 mm =& \hspace*{10 ex} m\\     56.28 dm=& \hspace*{10 ex} km     \end{tabular}     \end{table}          \begin{table}     \centering     \begin{tabular}{ll}     \randFloat \randGrooth =& \hspace*{10 ex} \randGrooth\\     \randFloat \randGrooth =& \hspace*{10 ex} \randGrooth       \end{tabular}     \end{table}          \end{document}


title: making multiple tables with for loop

text: I have a following problem: I need to create a multipage document, containing single table on each page. The table is same for all pages, pages differ from each other by page number only. To make the generation of the document easier, I tried to define a table and then "multiply" it with `\tikz \foreach` directive:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \tikz{ \foreach \x in {1,2,3}{     \begin{tabular}{||c|c|c|c|c||}     Username & Sample & Filename & Sequence & Comments \\ \hline      & & & & \\      & & & & \\     \end{tabular}     }}     \end{document}      However, in this case there is no tet in table and loop doesn't work at all, if `\newpage` is used after the table. Why does the `\foreach` fails to work, or may be there is more proper way making such document?


title: What documentation visually explains the various available commands to control the vertical distance between two lines of text?

text: I have a title page containing several lines of text, e.g.:               Series          Title          Author          Institution      I would like to fine-tune the distances between the lines, however, I do not understand which tools are proper for the task, what they actually do, and what the various available units of measure (such as `pt`, `mm`, and `em`) really mean once rendered on the page.   * Much of the documentation I have found, such as LaTeX/Paragraph Formation seems to focus on formatting entire paragraphs, whereas, I need more detailed control of specific areas.   * I have found various tools to control this, such as `\strut`, `\linebreak`, `\vspace`, and `\parskip`, which seem to have similar effects on a document, but am unsure precisely how they work and in what situations they should be used. I'm looking for any documentation, preferably with some example illustrations, explaining:   * What commands are available for controlling vertical distance?   * What are the proper situations in which to utilize these tools?   * What text height and baseline measurements or ratios are available to these various controls? Although I am currently using this with a title page, I am looking for information related to a wider variety of situations that one might encounter when making a document.


title: Why do I get an empty page before my title page?

text: Unfortunately, I get two empty pages before my title page. This is a code example:               \documentclass[english,12pt, a4paper]{article}     \usepackage{babel}      \usepackage{times}     \usepackage{graphicx}      \usepackage{float}     \usepackage{units}     \usepackage[top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}     \usepackage{fancyhdr}     \usepackage[bf]{caption}          \begin{document}          \begin{titlepage}     \begin{center}     \title{title}     \author{Name Name}     \maketitle     \end{center}     \end{titlepage}          \linespread{1.1}     \pagestyle{fancy}     \lhead{Name Name}          \section*{Abstract}      The first page has no page number, the second with the title and author does has a 2 and the next one starts again with 1...


title: Replace one string of symbols including a carriage return

text: This is borderline but I do not how to do this in Texstudio. I want to replace all the               \[     \begin{myenv}      by,               \begin{equation*}     \begin{myenv}      Same with the closures,               \end{myenv}     \]      to               \end{myenv}     \end{equation*}      The thing is that there is a carriage return put with the ENTER key of the keyboard. I am on windows if it changes something.


title: Writing Linear Temporal Logic in LaTeX

text: I am writing some LTL (Linear Temporal Logic) statements in LaTeX and am having issues finding any packages online or information as to this can be done. Any help would be appreciated.


title: Is there an "Appending \let"?

text: After               \def\MyText{\textbf{My Text}}     \let\MySaved\MyText      `\MySaved` and `\MyText` have the same `\meaning`. What I would like to have further down in the document is               % \MyText = \textbf{My Text}     \def\MyText{\textit{More Text}}     \let\MySaved{\MySaved \MyText}     % \MySaved = \textbf{My Text} \textit{More Text}      but obviously `\let` does not allow a group of tokens in the second argument. Is there any way to append like this with the same specific (non-)expansion properties `\let` has?


title: How can I create this game-tree in Latex?

text: I have the following figure: ![Game tree](http://i.stack.imgur.com/xKLGX.jpg) As of now I create this in Word/Powerpoint and paste the screenshot in a LaTeX file. Is there a way to create this natively? Also, what would be the advantage of doing so? The tables are just place holders and actual table design/content may change. But I prefer if it could be editable and not fixed. I'm not sure I even know where to start or how to go about it. I've never needed to draw anything in LaTeX before.


title: Mini-alignment of a single equation?

text: So I have this problem, whereupon I would like to do some 'mini-alignment'. I have googled for ways to do this, but I get results based on aligning whole equations. Here is my current output: ![enter image description here](http://i.stack.imgur.com/ZuLQf.png) What I would like to do, is:   * Bring the "11" a little to the left.   * Push the second and third lines a little to the right.  It is those small things that I am not really privy as to how to change. But they make all the difference in the aesthetics. The code I used was this:               \begin{eqnarray}     \lefteqn{\mathbf{S}[k,m] \bigl\rvert_{k \neq k_s}  = \overbrace{\bigg[v_R^2[k,m] + v_I^2[k,m] \bigg]} ^{\gamma}  + }   \\     &\begin{rcases}     & \delta[k - k_q]\bigg[ q_R^2[k,m] + q_I^2[k,m] \bigg]  + \nonumber \\     & \delta[k - k_q]\bigg[ 2q_R[k,m]v_R[k,m] + 2q_I[k,m]v_I[k,m]\bigg]     \end{rcases}\footnotesize{g}     \end{eqnarray}


title: XeLaTeX: lost \perp in Cambria math?

text: Occasionally I noted that `Cambria Math` fonts or the `unicode-math` package might have wrong definition of `\perp` math symbol. Attached picture shows that `\perp` is not printed properly while `\bot` is. ![enter image description here](http://i.stack.imgur.com/SgmyR.png) This test is produced by the following code.               \documentclass{article}     \usepackage{ifpdf,ifxetex}     \ifpdf         \usepackage[utf8]{inputenc} % source file encoding         \usepackage[T1]{fontenc} % cyrillic font encoding     \fi          \ifxetex         \usepackage{fontspec}             %\defaultfontfeatures{Mapping=tex-text}             \setmainfont{Cambria}         \usepackage[math-style=TeX]{unicode-math}             \setmathfont{Cambria Math}     \fi     \begin{document}%         \[             p_{\perp}             ,\qquad             \vec{A} \perp \vec{B}         \]         \[             p_{\bot}             ,\qquad             \vec{A} \bot \vec{B}         \]     \end{document}      The missing character is reported in the log file:               Missing character: There is no вџ‚ in font Cambria Math/ICU:script=math;languag     e=DFLT;+ssty=0;!     Missing character: There is no вџ‚ in font Cambria Math/ICU:script=math;languag     e=DFLT;!      [1]      This same file can be conditionally compiled with both `xelatex` and `pdflatex` just to check that standard fonts use same glyph to print both `\bot` and `\perp`. So, I guess that error may reside in the `unicode-math` package. Could somebody check is this guess correct? I would also appreciate any advice how to redefine the `\perp` command to make it working for a while before the problem will be corrected by the font/package developers.


title: Japanese flashcards

text: I wanted to make some flashcards for learning japanese. I've found the `flashcard` class and some japanese output package (`ucs`, `CJK`). But they don't seem to work together. I've coded the following as an example:               \PassOptionsToPackage{a4paper}{geometry}     \documentclass[avery5371,frame]{flashcards}          \usepackage[encapsulated]{CJK}     \usepackage{ucs}     \usepackage[utf8]{inputenc}     \usepackage[english,german,brazilian]{babel}     \newcommand{\cjktext}[1]{\begin{CJK}{UTF8}{cyberbit}#1\end{CJK}}               %\cardbackstyle[\small\selectlanguage{english}]{empty}     %\cardfrontstyle[\selectlanguage{german}\Large]{headings}     \cardfrontfoot{\cjktext{日本語}}          \begin{document}               \begin{flashcard}{\cjktext{がくせい}}     1) student     \end{flashcard}     \end{document}      The *.pdf file was build without any errors by pdflatex, but the *.pdf itself doesn't contain any of the japanese character. Does anyone know how I could fix this, or does perhaps anyone know packages or classes which are more adequate here?


title: Nanoletters submission problem - pdf figures

text: I'm trying to submit a paper to Nano Letters. However, the site states it only accepts figures in pdf or tiff format instead of my usual eps format. So I tried replacing the figures with their pdf counterpart, but it does not work. It simply states that the figure is missing. Can't give you much of an error list, as it is part of the online incorporated submission system. How to incorporate figures in pdf format? Any other physicist encountered this problem with the ACS site?


title: \ref counter for equation off by one for labels in align environment

text: I'm having an issue where the \ref command typesets a number 1 higher than it should be for equations in align; equations are numbered correctly but the references are off.A \ref call to the last equation in align just prints ??. The equation environment works correctly.               \documentclass{pnastwo}     \usepackage[xdvi]{graphicx}     \usepackage{amsmath}     \usepackage{xfrac}     \usepackage{refcount}          \begin{document}     \begin{article}          \begin{align}       vt=d\\\nonumber       \label{eq:1}     \end{align}          \begin{align}       \frac{d}{t}=v\\\nonumber       \label{eq:2}     \end{align}          \begin{equation}       t=\frac{d}{v}\\\nonumber       \label{eq:3}     \end{equation}          Here is the first reference: \ref{eq:1}          And here is the second: \ref{eq:2}          And here is the third: \ref{eq:3}          \end{article}     \end{document}      produces Here is the first reference: 2 And here is the second: ?? And here is the third: 3


title: Strange expansion of a macro inside an environment

text: I'm, I should confess, a total newbie. I'm trying to generate invoices with LaTeX, so I'm using the fp package. But the strange thing is that calculations occur many times when they should only occur once per product. Here's my LaTeX file, below, can you please help me understand why it's behaving like this? And help me improve it? The two important pieces of it are probably the environment `invoice` and the macro `product`. For each product I multiply the unit price times the quantity, get that amount and add it to the total amount of the invoice called `TotalHT`               \documentclass[a4paper,12pt]{article}          \usepackage[frenchb]{babel}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{array}     \usepackage{tabularx}     \usepackage{fancyhdr}     \usepackage{textcomp}     \usepackage{fltpoint}     \usepackage[nomessages]{fp}     \RequirePackage{numprint}          % - Page and Headers Style {{{     \setlength{\parindent}{0pt}     \pagestyle{fancy}     \fancyhf{}      \renewcommand{\headheight}{51pt}     \lhead{\nous}     %\rhead{\nous}     \renewcommand{\headrulewidth}{0.125mm}     % - }}}          % - New Commands {{{          \def\TotalHT{0}          % set standard decimal position (numprint package)     \nprounddigits{2}          \newcommand{\nous}{         \small{             \textsf{%                 \textsc{My Company}\\                 My address\\             }         }     }          \newcommand{\client}[1]{%         \vspace{1cm}         \begin{flushright}             \small{\textsf {#1}}         \end{flushright}     }          \newcommand{\numero}[2]{%         \vspace*{1cm}         \begin{center}             \Huge{\textbf{Facture n° #1}}\\             \textsf{\small{Du #2}}         \end{center}     }          \newcommand{\firstth}[1]{         \multicolumn{1}{|l|}{#1}     }          \newenvironment{invoice}{%         \ignorespaces         \small         \tabularx{\textwidth}{|X|r|c|r|}         \hline         \firstth{Designation} & Unit Price. & Qty. & Amount\\         \hline     }%     {%         \endtabularx%     }          \newcommand{\product}[3]{%         \FPround\p{#2}{2}          \FPeval\m{\p * #3}         \FPround\m\m{2}         \FPadd\TotalHT\TotalHT\m         \global\let\TotalHT\TotalHT         \message{t \TotalHT  prod #1}         #1 &          \FPround{\p}{#2}{2}\numprint\p &         #3 &         \FPround\p{#2}{2}          \FPeval\m{\p * #3}         \numprint\m\\          \hline     }               \newcommand{\totalttc}{         \FPround\TotalHT\TotalHT{2}         & \multicolumn{2}{r|}{\textbf{Total TTC}} & \numprint\TotalHT \\         \cline{2-4}     }          \newcommand{\enlettres}[1]{         \vspace*{1cm}         \textsf{Arrêter la présente facture à la somme de \textbf{#1}.}     }          % - }}}          \begin{document}     \numero{01/2010}{17/03/2010}          \client{         My Client Sarl.\\         His address\\         His phone     }          \begin{invoice}         \product{product One}{1000.00}{1}         \product{product Two}{2000}{1}         \product{product Three}{3000.00}{1}         \product{Product Four}{5000.00}{1}         \totalttc     \end{invoice}          \enlettres{Cent dix-sept milles cinq cents euros et zéro centimes}     \end{document}      Whenever I run this through pdflatex, I have the message `\message{t \TotalHT prod #1}` appear more than once for each product. But then again, in the table that's generated in the PDF I have exactly one row per product, but the total is wrong. Thanks a lot for helping me understand this! P.S. three brackets in comments like `% - }}}` and `% - New Commands {{{` are just here for folding in vim


title: Display ".\integrate blah" in monospaced font (like \texttt and \verb)

text: I'm trying to display the following: .\integrate blah in a monospaced font. For everything else I've wanted to put in a monospace font, `\texttt` or `\verb` has worked fine, but it doesn't with this. I've worked out that I need to escape the `\` in the text, but replacing it with `\\\` gives a newline. What should I use to escape the \ in LaTeX?


title: Change the equation font locally

text: I want to change the equation font to mathbf in a single equation environment, `equation` or `align`. How do I do that? I tried               \begin{align}     \begin{mathbf}     equation1 \\     equation2     \end{mathbf}     \end{align}      and               \begin{align}     \mathbf{     equation1 \\     equation2     }     \end{align}      with no luck. It seems as if `\\\` breaks the `\mathbf` environment..?


title: Positive and Negative power in matrices and fixed size

text: I'd like to create a matrix that has some positive power and negative power. I'd like to have an alignment to right, so for example:               \begin{array}{rr}        3 \times 10^3 & 2 \times 10^3 \\        3 \times 10^{-3} & 2 \times 10{-3}     \end{array}      In this case, the column alignment isn't good, because the negative sign at the exponent takes a little space, so the numbers aren't aligned. How can I fix this? (I think I should add a little space at the positive power too) Then...is want to create 3 matrices in the page that should result aligned, indipendently from the values they have. For example if I write the previous matrix and then this:                 \begin{array}{rr}           0 & 0 \\           0 & 1        \end{array}      they won't be aligned because the second is smaller than the first. Is there a way to set a fixed size to both matrices?


title: Animation using a sequence of images in a single pdf file

text: I have a sequence of images in one pdf file. The first page in the pdf corresponds to the first step in the animation, the second page corresponds to the second step in the animation and in general, the `n th` page corresponds to the `n th` step in the animation. I want to run this animation from he pdf file in a single beamer frame and run the animation with a gap of `1 second` between each page of the pdf. How do I go about doing this? I use `pdflatex`. Let us say the pdf file has 100 pages and each page contains the image sequentially for the animation and the name of the pdf file is `animation.pdf`.


title: My lstlisting environment only shows "2" above the first line, instead of numbers before each line, when Hebrew is enabled

text: > **Possible Duplicate:**   >  `backgroundcolor` in `lstset` does not work I've recently changed my document skeleton and now my code segments, defined with `\begin{lstlisting}...\end{lstlisting}`, changed from looking like this:               1 code line     2 code line     3 code line      to looking like this:               2       code line       code line       code line      My listing definition is as follows:               \usepackage{listings}     \lstset{basicstyle=\ttfamily\scriptsize,emph={fence},emphstyle={\underbar},numbers=left,escapeinside={(*@}{@*)}}      After pruning my configuration I was able to pinpoint the culprit:               \RequirePackage[hebrew,english]{babel}      Apparently the lstlisting environment has an issue with Hebrew. How can I solve this?


title: how to extend shaded to full page width?

text: I use "shaded" to indicate the reader that the text is about something special. This works fine but i can not extend the box to the full page with. How is this possible? I use LYX and i can imagine that this can be done with renewcommand in some way?! Any hints for this?![this is how it should be](http://i.stack.imgur.com/Qrqtk.png) And this is how it currently looks like: ![current appearance](http://i.stack.imgur.com/jSX37.png) The problem with "shaded" is currently: 1) the width is only the width of the text 2) footnotes which are included in some text within the "shaded" area are not shown anywhere (the numbering works) MWE:               \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{luainputenc}     \usepackage{color}     \definecolor{shadecolor}{rgb}{0.171875, 0.6640625, 0.8828125}     \usepackage{float}     \usepackage{framed}     \usepackage{graphicx}     \usepackage{babel}     \begin{document}          \section{Document}          Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam     nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,     sed diam voluptua.               \subsection{Sub}          Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam     nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,     sed diam voluptua.Lorem ipsum           Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam     nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,     sed%     \footnote{Footnote lj7898786576%     } diam voluptua.Lorem ipsum dolor sit amet, consetetur sadipscing elitr,     sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam     erat, sed diam voluptua.               \subsection{Sub 2}          \begin{shaded}%     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam     nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,     sed diam voluptua.Lorem ipsum dolor sit amet%     \footnote{Some footnote within the shaded area%     }, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt     ut labore et dolore magna aliquyam erat, sed diam voluptua.Lorem ipsum     dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod     tempor invidunt ut labore et dolore magna aliquyam erat, sed diam     voluptua.          \begin{figure}[H]     \begin{centering}     \includegraphics[scale=0.5]{testIllustration}     \par\end{centering}          \caption{Figure}     \end{figure}               Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam     nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,     sed diam voluptua. At vero eos et accusam et justo duo dolores et     ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem     ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing     elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore     magna aliquyam erat, sed diam voluptua.\end{shaded}          some other text          Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam     nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,     sed%     \footnote{Footnote asdfasdf%     } diam voluptua.Lorem ipsum dolor sit amet, consetetur sadipscing elitr,     sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam     erat, sed diam voluptua.               \subsection{Sub 3}          Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam     nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,     sed diam voluptua. At vero eos et accusam et justo duo dolores et     ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem     ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing     elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore     magna aliquyam erat, sed diam voluptua. At vero eos et accusam et     justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata     sanctus est Lorem ipsum dolor sit amet.     \begin{description}     \item [{SOMETHING}] justo duo dolores et ea rebum. Stet clita kasd gubergren,     no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum     dolor sit amet, consetetur sadipscin     \item [{Other}] t justo duo dolores et ea rebum. Stet clita kasd gubergren,     no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum     dolor sit amet, consetetur sadipscin     \end{description}     t justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea     takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor     sit amet, consetetur sadipscint justo duo dolores et ea rebum. Stet     clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor     sit amet. Lorem ipsum dolor sit amet, consetetur sadipscint justo     duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata     sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,     consetetur sadipscint justo duo dolores et ea rebum. Stet clita kasd     gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.     Lorem ipsum dolor sit amet, consetetur sadipscin     \end{document}


title: Margincaption (floatrow) in outer margin (twoside)

text: I'm using Want figure height to ignore side caption height to place a caption into the outer margin. Unfortunately, i can get it only to work with left pages. On right pages i can't muster bringing the float into the outer margin. Working with left pages (caption in outer margin): ![Margincaption at the outer margin](http://i.stack.imgur.com/1vcXp.png) Not working with right pages (caption in binding margin): ![Margincaption in binding margin](http://i.stack.imgur.com/ROfyq.png) PS: Is it possible to get a proper top, bottom alignment with this `\smashcaption` hack? It is always a bit off. CODE:               \documentclass[twoside]{book}     \usepackage[         letterpaper,         includemp,         headheight=0.5in,          left=1.25in,         width=6.75in,         marginparsep=0.25in,         marginparwidth=2in,         bottom=1in,         top=1in]         {geometry}          \usepackage{lipsum}     \usepackage{blindtext}     \usepackage{floatrow}          \makeatletter     \newcommand*\smashcaption{             \def\FR@makecaption##1##2{%                     \vbox to\z@{%                             \vss                             \captionfont                             {\captionlabelfont##1}\caption@lsep##2%                             \par                             \vss                     }%             }%             \caption     }     \makeatother               %\floatsetup[table]{}          \begin{document}          \blindtext          \thisfloatsetup{%     floatwidth=\linewidth,     capposition=beside,     capbesideposition={bottom,outside},     capbesideframe=yes,     capbesidewidth=\marginparwidth,     capbesidesep=quad,     floatrowsep=qquad}     \begin{figure}[h]     \makebox[\textwidth][l]{     \rule{4.5in}{0.5in}     }     \smashcaption{Nulla malesuada porttitor diam. Donec felis erat, congue non, volut- pat at, tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec nonummy pellentesque ante. Phasellus adipiscing semper elit. Proin fer- mentum massa ac quam. Sed diam turpis, molestie vitae, placerat a, mo- lestie nec, leo.}     \label{fig}     \end{figure}          \blindtext[4]          \thisfloatsetup{%     floatwidth=\linewidth,     capposition=beside,     capbesideposition={bottom,outside},     facing=no,     capbesideframe=yes,     capbesidewidth=\marginparwidth,     capbesidesep=quad,     floatrowsep=qquad}     \begin{figure}[h]     \makebox[\textwidth][r]{     \rule{4.5in}{0.5in}     }     \smashcaption{Nulla malesuada porttitor diam. Donec felis erat, congue non, volut- pat at, tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec nonummy pellentesque ante. Phasellus adipiscing semper elit. Proin fer- mentum massa ac quam. Sed diam turpis, molestie vitae, placerat a, mo- lestie nec, leo.}     \label{fig}     \end{figure}          \blindtext[2]     \end{document}


title: Managing number of authors shown in a citation

text: I'm using `\bibliographystyle{phil_review}` and when I cite a paper with more than two authors it automatically appears as 'XX et. al.' What's the simplest way to control for the number of authors required before this happens?


title: Preserve node and font size when scaling

text: I am using tikz for many pictures in my thesis, but I am not really clear on how to scale the pictures to fit my needs... I generally use "\node"s which I connect with line segments. I draw and fill the nodes to make them small black circles. I use a different node style to create nodes without draw/fill to place text in them. Unfortunately most of the coordinates for nodes are generated by another program. As a consequence, the coordinates are all in between 0 and 1. Since that is much too small for me, I scale the pictures up by passing scale=... to the tikzpicture. Unfortunately this also scales the size of the nodes and the fontsize which is equally annoying. I would like to scale the coordinates of all my nodes without scaling either the node or the font size. Is that possible using tikz?


title: Compound fractions (i.e., "mixed numbers") look bad in displaystyle

text: I find that in display mode, fractions that represent simple rational numbers look way too big. For instance, consider this case:               $$    a = \frac12(b+c)    $$      The fraction gets inordinately large compared to everything else in the line. I understand that it's display mode, and that's supposed to happen, but the value of it is for fractions with complex contents, giving them space to spread out and not be squished. For a simple rational number, it seems like it's far too large. This problem is worsened in the case of (what US elementary schools call) compound fractions, or mixed numbers. Consider this:               $$    \vec v = \left\langle 3\frac12,-6,0 \right\rangle    $$      This comes out with one enormous fraction larger than everything else dominating the scene, enlarging the angle brackets, and not looking at all like it is part of a single numerical value with the preceding 3. My solution in such situations has been to put `\textstyle` at the front of the display math, but that has two disadvantages. First, it seems stupid to say, "display--no wait, not display!" Second, it makes everything in the whole section textstyle, not just the fractions. The way I'm currently handling this is as follows, where mn stands for "mixed number."               \def\mn#1#2#3{#1{\textstyle\frac{#2}{#3}}}     ...     $$    \vec v = \left\langle \mn312,-6,0 \right\rangle    $$     $$    a = \mn{}12(b+c)    $$      Is there a common way to handle this I don't know about? Does it not look ugly to anyone else? Is my solution sensible? Thoughts welcome.


title: Efficient ways to anonymize a document

text: Many academic journals practice double-blind peer review which means that the author is required to blind their document by removing any references that can reveal the author's identity. How can I take advantage of the power of TeX and friends to blind or anonymize a document? Or more bluntly put: how do people successfully blind their LaTeX documents? Here are some techniques I can think of:   * Search and replace terms such as one's name and one's affiliation.   * Use macros to write sensitive terms, e.g. `\newcommand\myname{N.N.}`, and replace the definition when blinding.   * Keep sensitive information in separate documents which are not included into the main document when it is blinded.   * Use version control so that the blinding changes can easily tracked and reversed. Answers which goes into detail on how to implement any of the outlined techniques above or their respective merits will also be appreciated.


title: First line of ltxtable/longtable indented

text: I am using the `ltxtable` package to be able to set the `longtable` to `\textwidth` I have `\setlength{\parindent}{0pt}'` in the preamble. The first line of each `longtable` is indented, how do I get rid of that? Example               \subsubsection*{Test}     \label{test}          \begin{filecontents}{longtab.tex}         \begin{longtable}{p{0.5\textwidth}p{0.1\textwidth}X}         \addtocounter{table}{-1}          one &   & two \\          three &   & four \\         \end{longtable}%     \end{filecontents}     \LTXtable{\textwidth}{longtab}


title: A Theorem solution that works with Nath

text: I'd like to use some theorem environment. But I'm using the `nath` package, which is unfortunately incompatible with every solution I've found. I don't need anything very fancy, just the following features:   * (Basic) Automatic numbering of theorems and being able to redefine the words for "Theorem", "Lemma", etc, since I'm not writing in English.   * (Needed) Being able to reference theorems so that `\magicref{that-first-lemma-of-section1}` produces "Lemma 1.1" and not just "1.1".   * (Optional) Being able to give names to important results to that `\magicref{very-important-named-theorem}` produces "Pi's Theorem" instead of "Theorem 3.1.4".   * (Optional) I don't even know exactcly what would be the interface to this, but it's not rare to see texts in which "Theorem 2.71" defines some especial objects, like `\psi_{2.7.1}` that are referenced elsewhere. I'd like to that in a easy way.


title: How to center the box header text in baposter

text: I am writing a poster using baposter class. I want to centre the text in header box(for one particular headerbox not all). Here is the minimum working example.               \documentclass[pdftex, british,a0paper, fontscale=.32]{baposter}     \usepackage{titling}     \usepackage{enumitem}     \usepackage{color}     \usepackage{xcolor}     \usepackage{booktabs}     \usepackage{graphicx}     \title{My Poster}     \author{Apurba Paul}     \begin{document}     \begin{poster}{     {}     {\thetitle}     {theauthor}     {}}     \headerbox{Box title}{name=box1, column=0, row=0}{%     content here     }     \end{document}      I watn the "Box title" to be appear in the center of the box header not at the left side.


title: Auto update a list/section of key points beamer

text: Is there a way in Beamer to keep a dedicated portion of each slide for "key questions," or "key points" section that automatically accumulates questions or points? Sort of like in the below:               -----------------------------------------------------     | Slide 1                                | Key Points: |     | other content of the slide can go here |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     -----------------------------------------------------          -----------------------------------------------------     | Slide 2                                | Key Points: |     | Key Point 1                            | Key Point 1 |     | other content of the slide can go here |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     -----------------------------------------------------          --------------------------------------------------------     | Slide 1                                | Key Points: |     | Key Point 2                            | Key Point 1 |     | other content of the slide can go here | Key Point 2 |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     |                                        |             |     -------------------------------------------------------


title: Using tikz overlay / remember picture option with forest trees

text: I want to connect two forest trees with an arrow, in a similar way it is discussed here for plain tikz trees. However, it seems to be impossible to add options to the forest environment in a similar fashion. Simply referencing the nodes will only place the arrow to the right of the right tree. (To avoid confusions: I don't speak about the `$\Rightarrow_G$` in the first forest environment, but the bended one, that should connect two specific nodes.)               \documentclass{beamer}     \usepackage{tikz}     \newcommand{\false}{\mathbf{f}}     \usetikzlibrary{calc, positioning}     \usetikzlibrary{arrows}     \usepackage{forest}     \setbeamercovered{transparent}     \begin{document}          \begin{frame}{}            % Tree 1     \begin{forest}         [$\sigma$, calign=last             [$a$]             [{\langle \sigma, \{1,2\},\false \rangle}%                      , math content, calign=first, baseline, draw=blue, ellipse,  name = replaceNode                 [$\sigma_*$]                 [$a$]             ]         ]       \node at (current bounding box.east)             [anchor=west]             {$\Rightarrow_G$};     \end{forest}     %     % Tree 2     \begin{forest}         [$\sigma$, calign=last             [$a$]             [$\sigma$, calign=last                 [$b$]                 [{\langle \sigma, \{1,2\},\false \rangle}%                      , math content, calign=first, baseline, name = t1                     [$\sigma$, calign=first                         [$\sigma_*$]                         [$a$]                     ]                     [$b$]                 ]             ]         ]     \end{forest}     %     % This arrow should connect two nodes of both trees.     \begin{tikzpicture}     \draw[->, black, dashed, bend angle=45, bend left] (replaceNode) to (t1);     \end{tikzpicture}               \end{frame}          \end{document}      There seems to be the workaround of putting both trees in the same forest environment with a phantom parent node. However, I would appreciate an overlay solution for better modularity of my graphics, especially if more than two trees are involved.


title: Link LaTeX output warnings back to Problems View in Texlipse / arara

text: I am using arara to compile my latex sources in Eclipse using Texlipse. Is there any way to re-direct the warnings generated into the "Problems View" of Eclipse as it happens when one uses the default builder provided by Texlipse? In principle, the error messages are relayed and it seems to work correctly.


title: Stacked symbol doesn't align properly. Why?

text: A modified equals sign used represent use of L'Hopital's Rule isn't aligning well with other equals signs. How would I fix that? I'd prefer to do so without manually fiddling with spaces, if possible. My code is as follows:               \documentclass{article}          \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{commath} % Absolute value with /abs{}          \newcommand{\limq}[2]{\displaystyle\lim_{#1 \to #2}}          \begin{document}          \begin{align*}     \limq{n}{\infty} \abs{\frac{a_{n+1}}{a_n}} & = \limq{n}{\infty}\abs{\frac{\frac{(n+1)^2}{2^{n+1}}}{\frac{n^2}{2^n}}} \\     & = \limq{n}{\infty} \abs{\frac{(n^2+2n+1)2^n}{(2n^2)2^n}} \\     & \stackrel{\text{(H)}}{=}  \limq{n}{\infty} \abs{\frac{2n}{4n}} \\     & = 1/2     \end{align*}          \end{document}      The output: ![Pesky L'Hopital's Rule](http://i.stack.imgur.com/1YSHb.png) I tried moving the ampersand to the right of each symbol, but that just ended up shifting the (H) slightly to the left of the ordinary equals signs.


title: How to get a bigger bracket? I have tried \left and \right

text: I have the following code. The problem is the outer brackets are the same size as the inner bracket so it doesn't look that nice. I have tried \left and \right and it doesn't make a difference. The code is below, any help will be appreciated.                    $Card$\left((X\times \{0\})\cup (Y\times \{1\})\right)$