title: Printing references using biblatex doesn't work with tables and figures

text: This is the my document:               % !BIB TS-program = biber     \documentclass{llncs}          \usepackage[ngerman,british]{babel}      \usepackage[british]{babel}     \usepackage{microtype}     \usepackage[pdftex]{graphicx}         \usepackage{hyperref}      \usepackage{xcolor}     \usepackage[export]{adjustbox}     \usepackage{csquotes}          % Citation styles     %\usepackage{apacite}     \usepackage[style=apa,backend=biber]{biblatex}     \DeclareLanguageMapping{british}{british-apa}     \addbibresource{Bibliography-Linked_Media.bib}          \definecolor{light-gray}{gray}{0.95}     \setlength{\skip\footins}{10mm}          %Modifying the table settings     \usepackage{tabularx}     \usepackage{array}     \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}     \setlength{\tabcolsep}{10pt}     \renewcommand{\arraystretch}{1.6}     \let\oldtabular\tabular     \renewcommand{\tabular}{\scriptsize\oldtabular}          %Modifying the table caption     \usepackage{caption}      \captionsetup[table]{skip=7pt}          \begin{document}     \title{Title}          %For a single author     \author{Author Name}          %For a single institute     \institute{Institution\\ \email{name@domain.com}}          \maketitle          \begin{abstract}     The main goal of this project is to offer a perspective on the economic growth of nations and how this can be linked to religion and education. Crossing data for recent years, this study will open the door to discussion on topics such as capitalism, governmental policies on education, and spirituality. Hopefully, we will offer foundations to answer the following questions: have educated people abandoned their beliefs? Are religious countries wealthier than secular ones? Are rich countries promoting atheism or is it the opposite way?     \end{abstract}          \section{Introduction}          %\subsection{First Subsection}     Religion, which can be understood as ``\textit{a set of rituals, rationalized by myths, which mobilizes supernatural powers for the purpose of achieving or preventing transformations of state in man and nature} \parencite{wallace}'', has changed the lives of generations, moulding economic and political aspects of history in the process. Take for instance the Knights Templar that, fuelled by the desire to propagate Christian faith (and incited by politicians, of course), embarked on a bloodthirsty journey against heretics \parencite{knights}. Or perhaps, to mention an opposite example, we should think of the Renaissance era, a period of time where religion occupied a secondary place against human intellect, something that allowed arts and science to flourish, reaching heights never seen before. All in all, the impact of religion on humanity is undeniable.           This study will help people evaluate if that influence continues on present times. Nations that in the days of yore were eminent religion bastions (e.g. Italy) are now secular states \parencite{secular}. It would be interesting to know if economical growth, often times associated with neoliberalism, has contributed to that fact. There is another component on this equation: education. For example, in the Medieval Period religion dominated all the aspects of society \parencite{middle}, making it complicated to tag religion as trickery because there was no substantial knowledge to debate against the established notion of the existence of a god.           \section{Methods}     \subsection{Sources}     A great amount of information could be found on Internet. Most of these studies have been published by prestigious organisations such as the World Bank or the United Nations. Nonetheless, in spite of the quality of those documents, not all the required parameters for this project could be found in one single site. Therefore, it was necessary to plan ahead to collect the pertinent data so as to come up with a customised data base for the project.          Some of the aforementioned pages allowed users to apply some filters to narrow the data before exporting the information. That feature came in handy because in no few cases there were too many parameters that were of no use for this project. When this feature was not available, the data was sorted directly on Microsoft Excel. Fortunately enough, the downloaded files came in formats that this program could handle.          \subsection{Rules}     In order to have the right content on the visualisation, it was required to filter the corpus of information and establish some rules to connect one parameter to the other. I will briefly explain the methods employed to do that:     \subsubsection{Anchor}     The word anchor refers to a pivot, a central point. Analogous to a black body that is surrounded by planets, this primary information will play the central role in the study. In our case, we started obtaining a world statistic about countries and religion.     \subsubsection{Satellites}     The other parameters \textit{orbited} around our anchor. For instance, since we had a list of countries, our second data base file contained a relation between countries and GDP Per Capita. One can see this method as an assemblage, where pieces began to connect with each other.      \subsubsection{Single versus multiple files}     All the parameters were collected on a single document. This approach had its positive and negative sides. On the one hand, it proved easy to maintain and alter figures on a single file. On the other hand, having all the information in one place increased the overall size of the file. Weighing the pros and cons, the single-file method was chosen.           \subsection{Content of the data base}          The final data base comprises of six columns: ``Country,'' ``Religion,'' ``GDP Per Capita,'' ``Importance of Religion (\%),'' ``Years of Compulsory Education,'' and  ``Average of  Years of Schooling of Adults (25+).'' An excerpt of the final result can be seen in Table~\ref{tab:excel}. In the following sections the sources from which the data was gathered will be detailed.          \subsubsection{First and second parameters: Country and Religion}     We required to know which was the major religion in each country. This information was obtained from the ARDA website\footnote{ARDA: http://www.thearda.com}, which allows user to access statistics on religion. In the document ``Cross-National Socio-Economic and Religion Data, 2011'' \parencite{arda-religions} the amount of data was rather dense. Information for each nation included not only the major religion, but also many other variants. Therefore, a filter was applied to gather only what was relevant; in this case, the column ``I-RELIGION (Largest religion by proportion).'' Each country was assigned a number code from 1 to 5, which corresponded to the following values: ``Catholic,'' ``Orthodox Christian,'' ``Other Christian,'' ``Muslim,'' ``Buddhist,'' and ``Other.'' It was not a problem to find and replace those numeric values with the name of the religion. Both ``Country'' and ``Religion'' parameters became the \textit{anchor} of this project.           \subsubsection{Third parameter: GDP Per Capita}     Here it was necessary to a list of countries and their respective GDP Per Capita. As stated in The World Bank website\footnote{The World Bank: http://www.worldbank.org/}, this measurement is ``\textit{the gross domestic product (GDP) converted to international dollars using purchase power parity rates.}'' This is a commonly used indicator, for it shows the relative performances of the nations. The study ``Countries Compared by Economics GDP Per Capita \parencite{nationmaster-gdpppp}'' was obtained from the Nation Master\footnote{Nation Master: http://www.nationmaster.com/} website.           \begin{table}[!htb]     \caption{Lowest and highest entries ordered according to their GDP}\label{tab:excel}     \begin{center}         \begin{tabular}{ | p{1.5cm} | C{1,6cm} | C{0.9cm} | C{1.2cm} | C{1.5cm} | C{1.2cm} | }         \hline         Country & Religion & GDP Per Capita & Importance of Religion (\%)& Years of Compulsory Education & Average of  Years of Schooling of Adults (25+) \\ \hline         Burundi & Catholic & 251 & 98 & 6 & 3 \\          \hline         \end{tabular}         \end{center}     \end{table}             \subsubsection{Fourth parameter: Importance of Religion (\%)}     One crucial aspect we wanted to take into consideration was the importance people gave to religion on their lives. The hypothesis was that poorest nations were more religious than their richer ones. This could be corroborated thanks to he study ``Gallup Global Reports \parencite{gallup-importance}'' done by the American consulting company Gallup\footnote{Gallup: http://www.gallup.com}. Since the results we found were sorted by countries, it was an straightforward process to link the information to our main table which, at this point, already contained the following columns: ``Country,'' ``Religion,'' and ``GDP Per Capita.'' For those countries whose figures were absent, a median response percentage was assigned; a simple conditional formula evaluated the GDP Per Capita  and assigned a value according to another study produced by Gallup: ``Religiosity Highest in World's Poorest Nations \parencite{gallup-religiosity}.''           \subsubsection{Fifth parameter: Years of Compulsory Education}     On this matter the Nation Master website also offered a whole lot of valuable information. In the study ``Duration of compulsory education \parencite{nationmaster-compulsory},'' a list of nations along the number of years a child must be enrolled in elementary school was depicted. To complement missing gaps, another data base (``Duration of Compulsory Education around the World  \parencite{chartsbin-compulsory}'') was used from the ChartsBin\footnote{Chartsbin: http://chartsbin.com} website.          \subsubsection{Sixth parameter: Average of Years of Schooling of Adults (25+)}     Whereas the last study focused on elementary education, ``Mean years of schooling (of adults) (years)  \parencite{undp-adult_schooling}'' was oriented toward adults that continue their education (college and postgraduate studies.) This documentation was extracted from the United nations Development Program (UNDP) page\footnote{UNDP: https://data.undp.org}.          \subsection{Technology}     After some research, the Highcharts\footnote{Highcharts: http://www.highcharts.com} website offered a chart library written in JavaScript. It does not need any client side plug-ins like Flash or Java. The customisation of the information was performed using JSFiddle\footnote{JS Fiddle: http://jsfiddle.net}, an online tool to test and share JavaScript, CSS, HTML or CoffeeScript. Once the data was completed, the page was saved and stored locally for the final adjustments.          \section{Results}     \subsection{Visualisation}     The final outcome  can be seen in Figure \ref{Fig:finalchart}. On the vertical axis, the chart shows the list of countries. These entries are sorted according to their GDP value. Therefore, nations do not appear in alphabetical order.          \begin{figure*}[ht!]            \includegraphics[width=1.0 \textwidth, cfbox=light-gray]{./images/final_chart}         \caption{Final visualisation}         \label{Fig:finalchart}     \end{figure*}          On the matter of interaction, the legend also functions as a basic filter. By clicking on the labels, user can hid or show one or all the parameters. This option was useful to perform a more specific comparison of data. An additional feature of this chart is that it incorporated a function to print or download the chart in different formats.          \subsubsection{Written survey} All participants completed the survey without problems. Concerning the grading, using a values that went from 1 (poor) to 5 (very good) was not a good choice, for students were accustomed to the German grading system that work in the inverse order: 1 (very good) to 5 (poor). This will be taken into consideration for future studies. The complete results of the surveys could be found in Table~\ref{tab:results}.          \begin{table}[!htb]     \caption{Project visualisation sheet results}\label{tab:results}     \begin{center}         \begin{tabular}{ | p{2cm} | C{0.8cm} | C{0.8cm} | C{0.5cm} | C{0.5cm} | C{0.5cm} | C{0.5cm} | }         \hline         Name & Gender & Age & Q1 & Q2 & Q3 & Q4 \\ \hline         Ana & F & 28 & 4 & 3 & 5 & 4 \\          Canny & F & 29 & 3 & 1 & 1 & 1 \\          \hline         \end{tabular}         \end{center}     \end{table}             \section{Discussion}     On a second version of this project information will be divided into pieces to facilitate comprehension.           A suggestion done by a participant of the study was to use the ``Human Development Index indicator\footnote{UNDP: http://data.un.org/DocumentData.aspx?id=324},'' which ranges from 0.304 to 0.955. Prior to the delivery of this paper, a new version was uploaded to the server which shows some improvements\footnote{Visualisation (v.002): http://tinyurl.com/mhol697}.          \section{Acknowledgements}     I would like to thank you.          \printbibliography          \end{document}      Here's the .bib file               @misc{nationmaster-gdpppp,         Howpublished = {Countries Compared by Economy GDP Per capita. International Statistics at NationMaster.com},         Keywords = {gdp},         Note = {[Online; accessed June 05, 2014] \url{http://www.nationmaster.com/country-info/stats/Economy/GDP/Per-capita/PPP}},         Title = {Countries Compared by Economy GDP Per capita. International Statistics at NationMaster.com},         Url = {http://www.nationmaster.com/country-info/stats/Economy/GDP/Per-capita/PPP},         Year = {n.d.},         Bdsk-Url-1 = {http://www.nationmaster.com/country-info/stats/Economy/GDP/Per-capita/PPP}}          @misc{nationmaster-compulsory,         Howpublished = {Countries Compared by Education Duration of compulsory education. International Statistics at NationMaster.com},         Keywords = {compulsory,education},         Note = {[Online; accessed June 04, 2014] \url{http://www.nationmaster.com/country-info/stats/Education/Duration-of-compulsory-education}},         Title = {Countries Compared by Education Duration of compulsory education. International Statistics at NationMaster.com},         Url = {http://www.nationmaster.com/country-info/stats/Education/Duration-of-compulsory-education},         Year = {n.d.},         Bdsk-Url-1 = {http://www.nationmaster.com/country-info/stats/Education/Duration-of-compulsory-education}}          @misc{nationmaster-religion,         Howpublished = {Countries Compared by Religion > Major religion(s). International Statistics at NationMaster.com},         Keywords = {countries,religion},         Note = {[Online; accessed June 08, 2014] \url{http://www.nationmaster.com/country-info/stats/Religion/Major-religion(s)}},         Title = {Countries Compared by Religion > Major religion(s). International Statistics at NationMaster.com},         Url = {http://www.nationmaster.com/country-info/stats/Religion/Major-religion(s)},         Year = {n.d.},         Bdsk-Url-1 = {http://www.nationmaster.com/country-info/stats/Religion/Major-religion(s)}}          @misc{chartsbin-compulsory,         Howpublished = {Duration of Compulsory Education around the World},         Keywords = {compulsory,education},         Note = {[Online; accessed June 04, 2014] \url{http://chartsbin.com/view/xo6}},         Title = {Duration of Compulsory Education around the World},         Url = {http://chartsbin.com/view/xo6},         Year = {n.d.},         Bdsk-Url-1 = {http://chartsbin.com/view/xo6}}          @misc{gallup-importance,         Howpublished = {Gallup Global Reports},         Keywords = {countries,importance,religion},         Note = {[Online; accessed June 09, 2014] \url{http://www.gallup.com/poll/128210/gallup-global-reports.aspx}},         Title = {Gallup Global Reports},         Url = {http://www.gallup.com/poll/128210/gallup-global-reports.aspx},         Year = {n.d.},         Bdsk-Url-1 = {http://www.gallup.com/poll/128210/gallup-global-reports.aspx}}          @webpage{undp-adult_schooling,         Date-Modified = {2014-07-14 13:57:34 +0000},         Howpublished = {UNDP},         Keywords = {education, adults},         Lastchecked = {June 10 2014},         Title = {Mean years of schooling (of adults) (years) | Data | United Nations Development Programme},         Url = {https://data.undp.org/dataset/Mean-years-of-schooling-of-adults-years-/m67k-vi5c},         Year = {n.d.},         Bdsk-Url-1 = {https://data.undp.org/dataset/Mean-years-of-schooling-of-adults-years-/m67k-vi5c}}          @misc{arda-religions,         Howpublished = {Cross-National Socio-Economic and Religion Data, 2011},         Keywords = {countries,religions},         Note = {[Online; accessed June 13, 2014] \url{http://www.thearda.com/Archive/Files/Downloads/ECON11_DL2.asp}},         Title = {Cross-National Socio-Economic and Religion Data, 2011},         Url = {http://www.thearda.com/Archive/Files/Downloads/ECON11_DL2.asp},         Year = {n.d.},         Bdsk-Url-1 = {http://www.thearda.com/Archive/Files/Downloads/ECON11_DL2.asp}}          @misc{gallup-religiosity,         Howpublished = {Religiosity Highest in World's Poorest Nations},         Keywords = {religiosity,poorest,countries},         Note = {[Online; accessed June 11, 2014] \url{http://www.gallup.com/poll/142727/Religiosity-Highest-World-Poorest-Nations.aspx}},         Title = {Religiosity Highest in World's Poorest Nations},         Url = {http://www.gallup.com/poll/142727/Religiosity-Highest-World-Poorest-Nations.aspx},         Year = {n.d.},         Bdsk-Url-1 = {http://www.gallup.com/poll/142727/Religiosity-Highest-World-Poorest-Nations.aspx}}          @webpage{middle,         Author = {Simon Newman},         Date-Modified = {2014-07-14 14:00:12 +0000},         Howpublished = {The Finer Times: War, Crime and History Resource},         Keywords = {religion,middle age},         Lastchecked = {July 4, 2014},         Title = {Religion in the Middle Ages},         Url = {http://www.thefinertimes.com/Middle-Ages/religion-in-the-middle-ages.html},         Year = {n.d.},         Bdsk-Url-1 = {http://www.thefinertimes.com/Middle-Ages/religion-in-the-middle-ages.html}}          @book{knights,         Author = {Norman Housley & Malcom Barber},         Keywords = {knights,templar},         Publisher = {Aldershot, England: Ashgate},         Title = {Knighthoods of Christ: essays on the history of the Crusades and the Knights Templar, presented to Malcolm Barber},         Year = {2007}}          @book{wallace,         Author = {Anthony Wallace},         Keywords = {history,religion},         Publisher = {New York: Random House},         Title = {Religion: an anthropological view},         Year = {1966}}          @misc{hdi,         Howpublished = {Human Development Index and its components},         Keywords = {development,countries},         Note = {[Online; accessed July 11, 2014] \url{http://data.un.org/DocumentData.aspx?id=324}},         Title = {Human Development Index and its components},         Url = {http://data.un.org/DocumentData.aspx?id=324},         Year = {n.d.},         Bdsk-Url-1 = {http://data.un.org/DocumentData.aspx?id=324}}          @webpage{secular,         Date-Modified = {2014-07-14 13:57:23 +0000},         Howpublished = {Answers.com},         Keywords = {secular},         Lastchecked = {July 11 2014},         Title = {10 Countries That Have Secular Governments},         Url = {http://religion.answers.com/secularism/10-countries-that-have-secular-governments},         Year = {n.d.},         Bdsk-Url-1 = {http://religion.answers.com/secularism/10-countries-that-have-secular-governments}}      This is the link to the **llncs** class: http://www.wisdom.weizmann.ac.il/~tcc/tcc04/llncs.cls I presume the problem is that I'm running Biber to compile, but at the same time BibTeX is required to compile the tables and figures references. Any idea how to solve this issue? Here are the error messages I got: > LaTeX Warning: Reference `tab:excel' on page 3 undefined on input line 74. > > Overfull \hbox (5.69725pt too wide) in paragraph at lines 87--87 > []|\OT1/cmr/m/n/7 Importance > > Overfull \hbox (0.93912pt too wide) in paragraph at lines 97--97 > []|\OT1/cmr/m/n/7 Luxembourg| > > Overfull \hbox (3.25302pt too wide) in paragraph at lines 98--98 > []|\OT1/cmr/m/n/7 Liechtenstein| [3] Underfull \vbox (badness 2150) has > occurred while \output is active [4] Overfull \hbox (5.75783pt too wide) in > paragraph at lines 111--112 []\OT1/cmr/bx/n/10 Sixth para-meter: Av-er-age > of Years of School-ing of Adult s (25+)[] \OT1/cmr/m/n/10 (-20) Whereas [5] > > LaTeX Warning: Reference `Fig:finalchart' on page 6 undefined on input line > 134 . > > <./images/final_chart.jpg, id=92, 943.525pt x 551.05875pt> Overfull \hbox > (6.79999pt too wide) in paragraph at lines 137--138 [][] [6] Underfull \vbox > (badness 1931) has occurred while \output is active [7 <./image > s/final_chart.jpg>] > > LaTeX Warning: Reference `tab:results' on page 8 undefined on input line > 159. > > Overfull \hbox (2.49478pt too wide) in paragraph at lines 166--166 > []|\OT1/cmr/m/n/7 Gender| [8] ! Misplaced alignment tab character &. ...elim > H\bibinitperiod \bibinitdelim & \bibinitperiod \bibinitdel... l.192 ?


title: Acronym list extra-space beginning of page

text: I'm using `glossaries` for managing my acronyms and also using the long style for displaying the list. However I have noticed that when the change between letter/acronyms group is at the end of a page, then the next one is not started at top of the page but with the space between acronyms groups. So it is not vertically aligned. In the mwe you can see that when changing from a to b, the beginning of second page has a space that is caused by the blank row between subgroups. Can it be avoided? MWE: acronyms.tex               \newacronym{AAA}{AAA}{Acro} %     \newacronym{AA1}{AAA}{Acro} %     \newacronym{AA2}{AAA}{Acro} %     \newacronym{AA3}{AAA}{Acro} %     \newacronym{AA4}{AAA}{Acro} %     \newacronym{AA5}{AAA}{Acro} %     \newacronym{AA6}{A}{Acro} %     \newacronym{AA7}{AA}{Acro} %     \newacronym{AA8}{AA}{Acro} %     \newacronym{AA9}{AA}{Acro} %     \newacronym{A10}{AA}{Acro} %     \newacronym{A11}{AA}{Acro} %     \newacronym{A12}{AA}{Acro} %     \newacronym{A13}{bAA}{Acro} %     \newacronym{A14}{bAA}{Acro} %     \newacronym{A15}{bAA}{Acro} %     \newacronym{A16}{bAA}{Acro} %     \newacronym{A17}{bAA}{Acro} %     \newacronym{A18}{bAA}{Acro} %     \newacronym{A19}{bAA}{Acro} %     \newacronym{A20}{bAA}{Acro} %     \newacronym{A21}{bAA}{Acro} %     \newacronym{A22}{bAA}{Acro} %     \newacronym{A23}{cAA}{Acro} %     \newacronym{A24}{cAA}{Acro} %     \newacronym{A25}{cAA}{Acro} %     \newacronym{A26}{cAA}{Acro} %     \newacronym{A27}{cAA}{Acro} %     \newacronym{A28}{cAA}{Acro} %     \newacronym{A29}{dAA}{Acro} %     \newacronym{A30}{dAA}{Acro} %     \newacronym{A31}{dAA}{Acro} %     \newacronym{A32}{dAA}{Acro} %     \newacronym{A33}{dAA}{Acro} %     \newacronym{A34}{dAA}{Acro} %     \newacronym{A35}{dAA}{Acro} %     \newacronym{A36}{eAA}{Acro} %     \newacronym{A37}{eAA}{Acro} %     \newacronym{A38}{eAA}{Acro} %     \newacronym{A39}{eAA}{Acro} %      acro.tex               \documentclass{article}          \usepackage[ansinew]{inputenc}     \usepackage[english]{babel}     \usepackage[english]{translator}     \usepackage[T1]{fontenc}          \usepackage[acronym, toc, shortcuts, translate=babel]{glossaries}     \makeglossaries     \renewcommand{\glspostdescription}{} % Remove page number     \loadglsentries[type=\acronymtype]{acronyms}               \begin{document}          \ac{AAA}\ac{AA1}\ac{AA2}\ac{AA3}\ac{AA4}\ac{AA5}\ac{AA6}\ac{AA7}\ac{AA8}\ac{AA9}\ac{A10}\ac{A11}\ac{A12}\ac{A13}\ac{A14}\ac{A15}\ac{A16}\ac{A17}\ac{A18}\ac{A19}\ac{A20}\ac{A21}\ac{A22}\ac{A23}\ac{A24}\ac{A25}     \ac{A26}\ac{A27}\ac{A28}\ac{A29}\ac{A20}\ac{A21}\ac{A22}\ac{A23}\ac{A24}\ac{A25}\ac{A26}\ac{A27}\ac{A28}\ac{A29}     \vspace{10cm}               \printglossary[type=\acronymtype, style=long, nonumberlist]     \clearpage%               \end{document}


title: Hiding watermark for first page?

text: I haven't seen a question on this website that deals with hiding watermarks with `xwatermark`. Here's the preamble of the document I'm working on that is relevant:               \usepackage[printwatermark]{xwatermark}     \newwatermark*[page=1, textmark=]{}     \newwatermark*[allpages,color=gray,angle=0,scale=1,xpos=46,ypos=-134]{Some watermark}      In section 3.2 of the documentation: > If you issue any of the statements >   >   >     page=x >     pages=x-y >     pagex={x,y,z} >     firstpage >     lastpage >     allpages=true >     evenpages=true >     oddpages=true >   > > together with `printwatermark=true` but you don’t want the mark on any > particular page, we can simply set `\newwatermark[other keys,textmark=]{}` > or, to the same eﬀect, we may set `\newwatermark[other keys]{}`, where > ‘other keys’ may include the page speciﬁers. I'm trying to hide the watermark for the first page. As you see in the code above, I have `\newwatermark*[page=1, textmark=]{}`. I have also tried using `firstpage` instead of `page = 1`, and I have also tried placing this line after `\newwatermark*[allpages,color=gray,angle=0,scale=1,xpos=46,ypos=-134]{Some watermark}`. Can someone explain what I'm doing wrong? MWE: as far as I could tell, this is the minimum necessary to get the watermark to look exactly how I need it to.               \documentclass[11pt]{article}     \usepackage[margin=2cm]{geometry}     \usepackage{tikz}     \usepackage[version=3]{mhchem}     \usepackage [english]{babel}     \usepackage[printwatermark]{xwatermark}\newwatermark*[pages=2-,color=gray,angle=0,scale=1,xpos=46,ypos=-134]{\footnotesize Copyright \textcopyright\:2014 by some company.}     \begin{document}     Stuff     \newpage      More stuff     \end{document}      Received an error, as mentioned in the comments: `No end-page for page-range of watermark: ||||I have used the default end-page '5' instead.`


title: Counter increase with new page

text: How can I increase my counter with every new page and reset to 0 again when it comes to a new chapter? I know that I can link my counter to a chapter so that it can be reset on every new chapter by:               \newcounter{counter1}[chapter]      but then I have no idea how to increase it.


title: Bibtex, natbib references harvard style

text: I am having a little problem with the references of my master thesis. I need to have my references in the text as: > [Mareel and Leroy, 2003; Kintzios, S.E. and Barberaki, M.G., 2004]. or > [Reya et al., 2001]. so in my `.tex` file I have:               \citep{MareelLeroy, Kintzios}      and in my `.bib` file:               @article{MareelLeroy,     Author = {Mareel, M. and Leroy, A.},     Title = {{Clinical, cellular, and molecular aspects of cancer invasion}},     Journal = {{Physiological Reviews}},     Year = {{2003}},     Volume = {{83}},     Number = {{2}},     Pages = {{337-376}},     Month = {{Apr}}          }          @article{Reya,     Author = {Reya, T. and Morrison, S.J. and Clarke, M.F. and Weissman, I.L.},     Title = {Stem cells, cancer, and cancer stem cells},     Journal = {Nature},     Year = {2001},     Volume = {414},     Number = {6859},     Pages = {105-111},     Month = {Nov}     }          @BOOK{Kintzios,     title = {Plants that fight cancer},     publisher = {U.S. CRC Press},     year = {2004},     author = {{Kintzios, S.E. and Barberaki, M.G.}},      booktitle = {Plants that fight cancer},     pages = {296}     }      In my reference list I get: > Kintzios, S.E. and Barberaki, M.G. Plants that fight cancer. U.S. CRC Press, > 2004. > > M. Mareel and A. Leroy. Clinical, cellular, and molecular aspects of cancer > invasion. Physiological Reviews, 83(2):337–376, Apr 2003. In the text I have what it should be, but in my reference list I always get the initial in front of the last name. All my references are listed alphabetically on last name, but still the initials are at front. That makes everything quit messy and not very clear. So, I am looking for a solution: **how do I get the initials after the last name but still leaving the reference notation in my text the way it was?** So: in my text: > [Mareel and Leroy, 2003; Kintzios, S.E. and Barberaki, M.G., 2004]. and > [Reya et al., 2001]. and in my reference list: > Mareel M. and Leroy A. Clinical, cellular, and molecular aspects of cancer > invasion. Physiological Reviews, 83(2):337–376, Apr 2003. ??? I already tried some things:   * I know Kintzios is a book and Mareel an article, but I only have the problem with my articles and so I only need a solution for this   * I tried to leave out the komma (,) between the last name and the initials in the bib file, but then I only get the initials in my text   * I tried to switch the last name and the initials of place, that doesn't work either   * I tried to place dubble { around the authors in the bib file, then I get what I want in the reference list, but the "et al." is lost in my text. So then I get the whole list of authors... So please, if someone can help me... I tried so long and I don't know what to do now... A part of my preamble:               \documentclass[11pt, a4paper, twoside, openright]{report}          \usepackage[square]{natbib}


title: Change paragraph spacing without messing up the rest of the document

text: If I use               \setlength{\parskip}{1cm plus4mm minus3mm}      Or change the lengh of parskip in anyway, it not only changes the space between paragraphs, but also the space before and after equations, the contents page, figures, titles, sections, subsections and everything else. How can I just add a vertical space between paragraphs of text? The only way I can do it at the moment is to use 4 slashes after each paragraph and then \indent at the start of each paragraph like this:               This is the first paragraph.     \\\\     \indent This is the second paragraph.      This makes the source look messy (and is also a bit too big of a gap). Is there a way to automatically insert a space after a paragraph of text, but not change anything else? Thanks!


title: Center a full selected row in a table

text: I know I can use `\multicolumn{}{}{}` to center a single cell within a table with non-centered cells, but what is the best way to center all the cells in a given row?               \documentclass{article}     \begin{document}         \begin{tabular}{*6{l}}         Name1 & Name2 & Name3 & Name4 & Name5 & Name6\\         Type1 & Type2 & Type3 & Type4 & Type5 & Type6\\ % <- center this row         Item1 & Item2 & Item3 & Item4 & Item5 & Item6\\         Item7 & Item8 & Item9 & Item10 & Item11 & Item12\\         \end{tabular}     \end{document}


title: Missing number, treated as zero

text: A follow-up question to this one Aligning subcaptions with tikz pictures vertically This is the code I am using, worked to a pretty minimal scenario:               \documentclass{article}     \usepackage{float, tikz, subfigure, array, caption, subcaption}     \usetikzlibrary{calc}          \newcommand{\alignedsublabel}[1]{%     \node at ($(current bounding box.south west)!(#1)!(current bounding box.south east)$) [anchor=base,text depth=0pt,yshift=-3ex] {\parbox{10em}{\subcaption[]{}}};%     }          \begin{document}          \begin{figure}     \begin{tikzpicture}[level/.style={sibling distance=35mm/#1}, scale=0.8]     \node [circle,draw] (z){1}        child {node [circle,draw] (a) {8}         child {node [circle,draw] (b) {6}           child {node [circle,draw] (c) {5}}           child[draw=white] {node [circle,draw,fill=gray] (d) {9}}         }         child {node [circle,draw] (g) {3}}       }       child {node [circle,draw] (j) {7}         child {node [circle,draw] (k) {2}}         child {node [circle,draw] (l) {4}}     };     \alignedsublabel{z.center}{}     \end{tikzpicture}     \caption{This is a picture of something.}     \end{figure}          \end{document}      The problem is with line 26 (`\alignedsublabel`). This results in `Missing numbers, treated as zero` errors. If I take it out, everything compiles fine. I'm not exactly sure what parts of the .log file could be relevant, but this is what it says:               <snip>     ("C:\Program Files (x86)\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"     [Loading MPS to PDF converter (version 2006.09.02).]     \scratchcounter=\count132     \scratchdimen=\dimen181     \scratchbox=\box42     \nofMPsegments=\count133     \nofMParguments=\count134     \everyMPshowfont=\toks36     \MPscratchCnt=\count135     \MPscratchDim=\dimen182     \MPnumerator=\count136     \everyMPtoPDFconversion=\toks37     ) ABD: EveryShipout initializing macros     Package caption Info: Begin \AtBeginDocument code.     Package caption Info: End \AtBeginDocument code.          ! Missing number, treated as zero.     <to be read again>                         \caption@c@figure      l.30 \alignedsublabel{z.center}          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 = inserted for \ifnum.     <to be read again>                         \caption@c@figure      l.30 \alignedsublabel{z.center}          I was expecting to see `<', `=', or `>'. Didn't.          ! Missing number, treated as zero.     <to be read again>                         \caption@c@figure      l.30 \alignedsublabel{z.center}          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.)          [1     Non-PDF special ignored!{C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}          ]     <snip>      Any ideas? Please let me know if anything else in the .log file could be helpful as well, I only thought this would be the most relevant piece of information.


title: Example/Solution Environment

text: In my document I wish to provide example questions with solutions. I am currently doing this using the `amsthm` package as follows:               \documentclass{article}          \usepackage{lmodern}     \usepackage{amssymb,amsthm}          \newtheoremstyle{examplesty}         % Name                 {}                   % Above skip                  {}                   % Below skip                 {\upshape}           % Body font                 {}                   % Indent                 {\bfseries} % Head font                 {}                   % Head body punct                 {1em}                % Space after head                 {}                   % Heading          % Examples rejig the theorem environment     \theoremstyle{examplesty}     \newtheorem{example}{Example}[section]          % Solutions use a modified proof environment     \newenvironment{solution}                    {\let\oldqedsymbol=\qedsymbol                     \renewcommand{\qedsymbol}{$\blacktriangleleft$}                     \begin{proof}[\bfseries\upshape Solution]}                    {\end{proof}                     \renewcommand{\qedsymbol}{\oldqedsymbol}}          \begin{document}      \section{Test Section}      \begin{example} This is an example problem \end{example}      \begin{solution} This is a solution to an example problem. \end{solution}     \end{document}      My problem is that the spacing between the headings and bodies is different for examples and solutions. Moreover, solutions have a period after them, which looks odd. Is it possible to rectify these issues or am I guilty of trying to hammer in a nail with an old shoe?


title: How to set preferred PDF viewer for texdoc in TeXLive 2010 pretest.

text: I had evince, installed TexLive 2010 pretest (ubuntu lucid linx, fresh install). texdoc was using evince. Then I installed kubuntu ontop, and texdoc switched to okular. Now I've installed acroread and texdoc is using it now. I want to globally set it to use evince. How do I do that? (tried all the environmental variables mentioned in the man page and no luck so far)


title: Organizational Chart / Family Tree using tikz drawing library

text: Previous questions showed how this can be done with plain tikz. I wonder if it is possible to use tikz drawing library for this purpose. Here are two previous questions that do this _without_ the use of tikz drawing library: Organisation chart in latex using tikz and Family tree with multiple marriage ties ׁHow are organizational charts / family trees different from plain graphs? The main difference is that edges are made (mostly) of horizontal and vertical segments; it seems that tikz graph drawing does not support the `-|` nor the `|-` edge styles. Yet another difference is that it is common to draw some or all children of a node right below it, as in this gallery example To clarify, I ask for a method of combining the smart algorithms for graph layout introduced in `tikz` 3 to produce similar results. One obvious reason is that although the previous examples produce beautiful output, they do not scale at all. One has to manually design and then implement the layout for each particular instance. Yet another, perhaps less obvious, reason is that the the family/organizational style can be more compact: vertically stacking children makes it possible to share parent-child edges. Even horizontal stacking is useful since it makes arrows clearer. It is often the case that you need to squeeze the layout of a given graph to fit within hard page- or other geometric constraints. Employing this style could help. Finally, yet another style for graph/tree layout could be used for making another visual distinction of trees within trees.


title: Fonts larger than \Huge?

text: How can I make text that is larger than the size of the output of `{\Huge ...}`? I would like to be able to make text arbitrarily large (even if that is done by some suboptimal scaling routine).


title: Example of system architecture picture in TikZ

text: I am looking for an example of a system architecture diagram in TikZ. I would like to draw a picture similar to this one: ![](http://i.stack.imgur.com/ulijM.gif) Therefore I search for existing shapes for: _cloud_ (Current State), _database_ and _document collection_ (Confs) or a way to learn how to draw them.


title: LuaTeX callback for single line captions

text: I am using LuaTeX and its associated callbacks (`pre_linebreak_filter`, `post_linebreak_filter` and `mlist_to_hlist`) to analyze lines and paragraphs during typesetting of a pdf document. This works fine but I encountered a problem with figure captions. For a longer caption that is broken into multiple lines, everything works as expected. `pre_linebreak_filter` reports the full text, while `post_linebreak_filter` reports a `vlist` with the individual lines. If the caption is short enough to fit into a single line (i.e. no line breaking is needed) the processing of the caption **does not generate any callbacks**. This leads to my questions:   1. Is this behavior intended, which would be in contrast to other single-line content, such as title or author lines, which DO generate these callbacks?   2. How am I able to get to know that a single-line caption is processed? **PS** : Note that the caption content shows up in the output assembly callback of `pre_output_filter`. However, paragraph affiliation information is already lost at this stage. Thus, this does not help me. **PPS** : An example would be just to add               \begin{figure}       \centering       \includegraphics{ FILENAME }       \caption{ TEXT }     \end{figure}      in an ordinary article with TEXT fitting either in a single line or not. The callbacks are linked via the following code in the TeX source               \directlua{ luatexbase.add_to_callback("pre_linebreak_filter", pre_callback, "pre_callback") }     \directlua{ luatexbase.add_to_callback("post_linebreak_filter", post_callback, "post_callback") }      In a separate Lua file, the following functions process the callbacks               pre_callback = function (head)       texio.write_nl("PRE CALLED")       -- Recursive inspection of head     end          post_callback = function (head)       texio.write_nl("POST CALLED")       -- Recursive inspection of head     end      For both short and long caption texts, both `pre_linebreak_filter` and `post_linebreak_filter` report the image itself (in form of `whatsit` nodes with subtypes 41, 40, 42, 14) and output "CALLED" in the log file. But ONLY for the long caption, the caption text itself is reported in separate callbacks (thus "PRE CALLED" and "POST CALLED" appear twice in log file). For a short caption, no callback is raised for the caption text and "PRE CALLED", as well as "POST CALLED" appear only once. **PPPS** : I am using LaTeX2e <2011/06/27> with LuaTeX 0.76.0.


title: Format multiple lines within {} argument say example \ifbool

text: Ok as a follow up to last ask, how do I format multiple commands inside a {} parenthesis so that it doesn't crash, throw an error? thanks example \ifbool{@switch}{???????????}{???????} this works: Example: doofus.sty               \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{doofus}%     [2014/01/01 v0.01a LaTeX doofus package]%\filedate\space\fileversion\space      \typeout{Package doofus, \csname ver@doofus.sty\endcsname%     ^^ Copyright (C) 2014 ^^J}          \RequirePackage{calc}     \RequirePackage{xkeyval}[2006/11/18]     \usepackage{ifthen}     \usepackage{etoolbox}          \newbool{@epubstate}     \boolfalse{@epubstate}     \DeclareOption{epub}{\booltrue{@epubstate}}     \ProcessOptions%          \ifbool{@epubstate}{\newcommand{\doofus}{\textcolor{black}{7\spadesuit}}     \newcommand{\doofustwo}{\textcolor{black}{6\spadesuit}}}     {\newcommand{\doofus}{\textcolor{red}{7\heartsuit}}\newcommand{\doofustwo}{\textcolor{red}}{6\heartsuit}}}      but i need to put 50 lines in each ifthen {}. How do I make sure it's syntacticly correct?


title: What's the best way to write e-mail addresses?

text: When trying to write an e-mail address, there are always problems with the @ sign. Solutions I've seen suggested are using some verbatim environment (more difficult in footnotes) and using a math-mode @. What is _the_ correct way to do this?


title: How to make listings code indentation remain unchanged when copied from PDF?

text: So I am using `listings` package for code examples. But there is a problem. When I copy the code examples from the final PDF document, they are usually not the same - the indentation is gone, there are random spaces after parenthesis, etc. Does anyone know how to make sure that the code that I copy from the final document is the same as I wrote it in the LaTeX document? Here is what I mean. Compile this document:               \documentclass[12pt,oneside]{memoir}          \usepackage{listings}     \usepackage[T1]{fontenc}     \usepackage{xcolor}     \usepackage{textcomp}          \definecolor{codebg}{HTML}{EEEEEE}     \definecolor{codeframe}{HTML}{CCCCCC}          \lstset{language=Awk}     \lstset{backgroundcolor=\color{codebg}}     \lstset{frame=single}     \lstset{framesep=10pt}     \lstset{rulecolor=\color{codeframe}}     \lstset{upquote=true}     \lstset{basicstyle=\ttfamily}     \lstset{showstringspaces=false}          \begin{document}          This code example prints out all users on your system:          \begin{lstlisting}[language=c]     #include <stdio.h>     #include <stdlib.h>     #include <string.h>          #define MAX_LINE_LEN 1024          int main() {         char line[MAX_LINE_LEN];         FILE *in = fopen("/etc/passwd", "r");         if (!in) exit(EXIT_FAILURE);              while (fgets(line, MAX_LINE_LEN, in) != NULL) {             char *sep = strchr(line, ':');             if (!sep) exit(EXIT_FAILURE);             *sep = '\0';             printf("%s\n", line);         }         fclose(in);         return EXIT_SUCCESS;     }     \end{lstlisting}          \end{document}      Now compile it, open it, select and copy the code example and paste it in a text editor. Here is the result I get:               # include <stdio .h>     # include <stdlib .h>     # include <string .h>     # define MAX_LINE_LEN 1024     int main () {     char line [ MAX_LINE_LEN ];     FILE *in = fopen ("/ etc / passwd ", "r");     if (! in) exit ( EXIT_FAILURE );     while ( fgets (line , MAX_LINE_LEN , in) != NULL ) {     char * sep = strchr (line , ':');     if (! sep ) exit ( EXIT_FAILURE );     * sep = '\0 ';     printf ("%s\n", line );     }     fclose (in );     return EXIT_SUCCESS ;     }      Jeez! What's this... The indentation is gone. There are spaces in included headers `<stdio .h>`, there are spaces after parenthesis `[ MAX_LINE_LEN ]`. Anyone knows how to fix this? I'd like the code examples in my book to be copy/paste-able into a text editor so people can try them out easily.


title: C++ operators ^=, <<=, >>= misinterpreted

text: I write a list of C/C++ operators of the following form : `\texttt{operator+=}, \texttt{operator-=}, \texttt{operator*=}...` The problem is that `\texttt{operator\^=}, \texttt{operator>>=}, \texttt{operator<<=}` are interpreted by latex and are not rendered as the other ones. How to solve this problem ?


title: \bigg Is not working for left parenthesis

text: \documentclass[11pt]{article}     \usepackage{xfrac, array, tabu, multirow, graphicx, setspace, dcolumn, tikz}     \usepackage[fleqn]{mathtools}     %the argument for d specifies the maximum number of decimal places     \usepackage[ngerman]{babel}     \usepackage[applemac]{inputenc}     \begin{document}          \begin{align}     x^2&=\sum_{x=1}^{30} \bigg((f_{obs}-f_{exp}\bigg)^2/f_{exp}\\     x^2&=\underline{10.55}     \end{align}     \end{document}      I cant seem to find the mistake, what am i missing?


title: How to reduce the space between the y-axis label and the plots

text: Please I need some one to help me out with this issue. I have been able to add common axes labels to two plots I made with excel successfully. Now the problem I have is that the class file (name cit_thesis11 and approved by my university) I currently use puts extra distance between the y-axis and my graphs when I centralize the plots with the axis labels and caption. The distance is normal when I use the report or article class. What code set can I use in my tex file or class file to reduce this distance. I have included two figures to show the latex outputs when I use my class file and the report class. I have also included a working extract of my code. ![enter image description here](http://i.stack.imgur.com/bICAC.jpg) ![enter image description here](http://i.stack.imgur.com/aG6of.png)               %\documentclass[12pt,draft]{report}     \documentclass[12pt,draft]{cit_thesis11}     \usepackage{graphicx}     \usepackage{subfig}     \usepackage{xcolor}          \newsubfloat{figure}     \begin{document}     \begin{figure}[!ht]     \centering     \begin{minipage}{0.5cm}     \centering     \rotatebox{90}{\textcolor{red}{Y--axis label}}     \end{minipage}%     \begin{minipage}{\dimexpr\linewidth-2.50cm\relax}%     \centering       \raisebox{\dimexpr-.5\height-1em}{\includegraphics[scale=0.4]{Figures/knockho1.eps}}\ \subfloat[\label{label1}]{} \\       \raisebox{\dimexpr-.5\height-1em}{\includegraphics[scale=0.4]{Figures/knockho1.eps}}\ \subfloat[\label{label2}]{}            \vspace*{0.1cm}\textcolor{red}{X--axis label}       \caption{This is the text that describes \protect\subref{label1} and \protect\subref{label2}.}     \end{minipage}%     \end{figure}     \end{document}


title: Coordinates of intersections

text: In axis environment I have a curve and a line intersecting it. How can I get components of intersection-1, intersection-2 etc. in axis units?               \documentclass{minimal}      \usepackage{pgfplots}     \usetikzlibrary{intersections}          \begin{document}           \begin{tikzpicture}      \begin{axis}     \addplot[name path global=GaussCurve] gnuplot[domain=48.00:56.00,samples=100] {exp(-0.5*((x-52.64)/1.82)**2)/(sqrt(2*pi)*1.82)};     \path[name path global=HelperLine] (axis cs:48,0.13288) -- (axis cs:56,0.13288);     \draw[dashed,name intersections={of=GaussCurve and HelperLine}] (axis cs:48,0.13288) -- (intersection-2);     \fill[red] (intersection-2) circle (.1cm);     \end{axis}      \end{tikzpicture}      \end{document}      e.g. how to get X component of red circle (intersection-2) This code generated by program from some data, so I can't use the presented values, it's just example.


title: No references w/ linux + apa6e

text: I recently switched from a windows box to linux mint + cinnamon. The files I normally run on windows will not print the references. I'm using texstudio with tex live. Here's a MWE:               \documentclass[leavefloats]{apa6e}     \usepackage[american]{babel}     \usepackage[style=apa,backend=biber,bibencoding=latin1]{biblatex}     \addbibresource{testb.bib}     \DeclareLanguageMapping{american}{american-apa}     \usepackage{hyperref}     \defbibheading{bibliography}{%     \section{\normalfont\refname}}          \title{title}     \shorttitle{ti}     \author{me}     \authornote{note}     \abstract{abs}     \date{\today}      \begin{document}     \maketitle          MWE          \parencite{Mcvee2005}          \printbibliography          \end{document}      The bib file is:               @ARTICLE{Mcvee2005,       author = {Mcvee, Mary B. and Dunsmore, Kailonnie and Gavelek, James R.},       title = {{Schema theory revisited}},       journal = {Review of Educational Research},       year = {2005},       volume = {75},       pages = {531-566}     }      Here's a link to the log file: http://dl.dropbox.com/u/61803503/test.log How can I get the references to print using the new linux environment with tex live. Note:   Running the following from the command line:               pdftex test.tex     bibtex test.aux      results in:               .     tyler@trinker ~/Desktop/MWE $ bibtex  test.aux     This is BibTeX, Version 0.99d (TeX Live 2012/Debian)     The top-level auxiliary file: test.aux     I found no \citation commands---while reading file test.aux     I found no \bibdata command---while reading file test.aux     I found no \bibstyle command---while reading file test.aux


title: Watermark on the first page only

text: I'm modified the following code from this post to add a couple of vertical watermarks on a page. However, the code places these watermarks on _every_ page. Is there a way to restrict watermarking to the first page or certain pages of my `amsbook`?               \documentclass{amsbook}     \usepackage{graphicx}     \usepackage{eso-pic}          \makeatletter     \AddToShipoutPicture{%     \setlength{\@tempdimb}{.5\paperwidth}%     \setlength{\@tempdimc}{.5\paperheight}%     \setlength{\unitlength}{1pt}%     \protect{\put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%     \makebox(-515,0){\rotatebox{90}{\textcolor[gray]{0.90}%        {\Huge Draft:  \today}}}     \makebox(515,0){\rotatebox{270}{\textcolor[gray]{0.90}%        {\Huge  Draft:  \today}}}}}}     \makeatother          \begin{document}          Hi     \newpage     Hi, again.          \end{document}


title: Does Windows version of TeX contain patgen?

text: I know two Windows versions of TeX -- MiKTeX and proTeXt. Do they contain patgen package? If not, what Windows version of TeX contain the package? Can MiKTeX or proTeXt import such package from TeX distribution? If yes, how to do it? If the package can be imported to Windows version, can you give a very simple example command line to show how to use it?


title: Math symbols in tt font

text: I am trying to typeset some mathematics all in typewriter font; aiming to emulate the appearance of a particular computing environment. However, `\mathtt` in math mode doesn't appear to affect the symbols. For example, in something like:               $\mathtt{\{a[1],t\}\times\{t,a[2]\}}$      the braces and `\times` symbol will be in ordinary math symbols. I can obtain the affect with something like               \newcommand{\tbl}{\textbraceleft}     \newcommand{\tbr}{\textbraceright}     \texttt{\tbl a[1],t\tbr\texttimes\tbl t,a[1]\tbr}      except that this is getting pretty clumsy, and the `texttimes` symbol is too small. And then there are symbols such as `\Rightarrow` which don't seem to have a typewriter equivalent. (There is a `\textrightarrow` for a single arrow, but I need a double arrow.) I have found that `\usepackage[T1]{fontenc}` makes no difference. So - is there any easy way of obtaining a math formula all in typewriter font, without resorting to using masses of `\text...` control sequences?


title: How to draw circled transistors

text: How to draw a circled transistor in `circuitikz`? ![enter image description here](http://i.stack.imgur.com/9fNoY.png) I did not find any info about circled transistors in `circuitikzmanual.pdf`.


title: scrbook: remove margin notes for index entries

text: I'm using the `scrbook` class. I don't like the way that my index entries are included as margin notes. How can I prevent the index entries from being shown in the margins? I consulted the KOMA-Script manual but was unable to find anything that addresses this issue. Sample code follows:               \documentclass[letterpaper,openright,12pt,chapterprefix=true,index=totoc]{scrbook}     \usepackage[english]{babel}     \usepackage{makeidx,showidx}     \title{The Title}     \author{The Author}     \date{}     \makeindex     \begin{document}     \frontmatter     \pagenumbering{roman}     \tableofcontents     \chapter*{Preface}     \addcontentsline{toc}{chapter}{Preface}     Lorem ipsum dolor sit amet, consectetur adipiscing elit.      \mainmatter     \pagenumbering{arabic}     \chapter{The Chapter Name}     \addcontentsline{toc}{chapter}{The Chapter Name}     Lorem ipsum dolor sit amet, consectetur adipiscing elit.     \index{Lorem ipsum!dolor sit amet}     Sed a tellus augue. Phasellus ut ultrices velit.     \index{Sed a tellus!augue}     \backmatter     \printindex     \end{document}


title: makeindex doesn't use indexed words

text: When I use makeindex and try to index a word using               Hello \index{World}      the entry in the generated `\printindex` looks like               indexfile, 7      instead of               World, 7      -- This issue also happens when using `World\index{World}`. The error seems to be somewhere before creating the .idx, as it looks like this **doc.idx**               \indexentry{\@indexfile |hyperpage}{7}      **doc.ind**               \begin{theindex}            \item indexfile , \hyperpage{7}          \end{theindex}      **Used packages**               \usepackage{geometry}     \usepackage{ngerman}     \usepackage[latin1]{inputenc}     \usepackage{fancyhdr}     \usepackage{makeidx}     \usepackage{showidx}     \usepackage{graphicx}     \usepackage{textcomp}     \usepackage{setspace}     \usepackage{listings}     \usepackage{color}     \usepackage{hyperref}


title: How to add a line between chapter number and chapter title

text: I was wondering if there was a way to add a line between chapter number and chapter title. As in, what I am getting now is this: ![http://imgur.com/SiGA2](http://i.stack.imgur.com/Wan9I.jpg) What I want is a horizontal line as shown: ![enter image description here](http://i.stack.imgur.com/giIzK.jpg) of the same color as the page border The code I use to start a chapter is:               \chapter{\Large REFERENCES}     \vspace*{-35pt}     \begin{enumerate}     \item C. Scott Ananian and Greg Humphreys, \textit{Theseus: A Maze-Solving Robot}, Princeton University, New Jersey, May 1997     \item Chang Yeun Chung, \textit{Micromous: Maze Solving Robot}, Universiti Teknologi, Malaysia, May 2009     \item Bob Clough, \textit{Rooter - A MicroMouse Maze Solving Robot}     \item Tondra De, Drew Hall, \textit{The Inception of Chedda: A detailed design and analysis of Micromouse}, University of Nevada, Las Vegas, Fall 2004     \item Kelly Ridge, Sanjeev Giri, Peter Shaw, Jason Flynn, \textit{MightyMouse: An Autonomous Maze Solving Robot}     \item Michael Gims, Sonja Lenz, Dirk Becker, \textit{MICROMOUSE: Microprocessor Controlled Vehicle}, University of East London, May 19999     \item Faton Avdiu, Andy Zhou, Redwan Ahmed, Emmanuel Hereira, Allen Gutierrez, Mohammad M. Hossain, \textit{MICROMOUSE}, City College of New York, Spring 2008     \item Philips Semiconductor, \textit{LPC214x User Manual}, 25$^th$ August 2005, Volume 1, Revision 1     \item Brian Beckman, \textit{The Physics of Racing}     \item Andrew N. Sloss, Dominic Symes, Chris Wright, \textit{Arm System Developer's Guide: Designing and Optimizing System Software}, Published by: Elsevier Inc., 2004     \item \textit{The amazing micromice: see how they won}, users.ece.gatech.edu/\%7Ehamblen/papers/micromouse/mmrace.pdf     \item \textit{Software Suggestions}, http://micromouseinfo.com/introduction/software.html, 5$^th$ November 2004     \item     \end{enumerate}      Also I keep getting these boxes around the section and chapter names when I use `\listoffigures` or `\tableofcontents`. ![enter image description here](http://i.stack.imgur.com/GpVdy.jpg) Is there a way to remove those?


title: How to place subfigure caption on the side?

text: Is there some way to tell `subfig` package to place subfigure captions to the left or to the right of subfigures? There is `sidecap` package which does it for the main captions, but it does not affect subfigure captions. Or, if `subfig` does not have this options, which way to do it is the best? I tried to use `tabular` environment inside the figure, but there were some problems with alignment inside cells.


title: How to make caption bold in ctable?

text: If I use               \ctable[caption = \textbf{something}]{}{}{}      the text inside the caption is bold but TABLE 1. is not ... It looks like this: > TABLE 1: **something** and i would like > **TABLE 1: something**


title: Two amsrefs bibliographies, with different label styles

text: How can I convince amsrefs to use in one `biblist` the alphabetic style and in another `biblist` the numeric style?


title: Getting "LaTeX-Box" Vim plugin  to work with biblatex (biber)

text: I am using the LaTeX-Box VIM plugin for my TeX editing and love it, but I would like to use the omnicomplete freature for Biblatex citations, is this possible?


title: Tikz mindmap problems

text: I am trying to run the TikZ example on http://www.texample.net/tikz/examples/scientific-interactions/ but I am running into some problems. I can run the simpler example http://www.texample.net/tikz/examples/computer- science-mindmap/ which creates a similar map, suggesting that I have the necessary libraries installed. I receive an error on the line               \centering\begin{tikzpicture}[mindmap,       level 1 concept/.append style={level distance=130,sibling angle=30},       extra concept/.append style={color=blue!50,text=black}]      I am running a standard installation of Miktex on Windows. The error I get is               ! Package tikz Error: I do not know what to do with the option ''level 1            concept/.append style={level distance=130,sibling angle=30}''.      Sorry that I could not make the question a bit more general, but I really like this application of TikZ but am unfamiliar with the general syntax of the package.


title: Centering split equation

text: I am quite new to TeX. I want that each line in the following equation be centered, but I cannot find how to do it.               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{equation}     \begin{split}     a & = \frac{M_{20}}{M_{00}} - x^{2}_{c}, \;\;\;     b = 2(\frac{M_{11}}{M_{00}} - x_{c}y_{c}), \;\;\;     c = \frac{M_{02}}{M_{00}} - y^{2}_{c}, \\     &\quad x_{c} = \frac{M_{10}}{M_{00}}, \;\;\;     y_{c} = \frac{M_{01}}{M_{00}}, \\     &\quad M_{ij} = \displaystyle\sum\limits_{x} \displaystyle\sum\limits_{y} x^i y^j I(x,y)     \end{split}     \end{equation}     \end{document}      Also, it would be awesome if I could write "and" after the first line ;) Thanks in advance


title: Which fonts are at my disposal with pdfLaTeX without having to resort to manual installation of them?

text: Apparently, installing fonts manually (by converting them to `fd` files and so on) on LaTeX is a bit of a hassle. But still, I would like to be able to use fonts other than the standard Computer Modern (although it is a nice font). So what fonts can I use without having to install them manually? By this I mean, which fonts are installed by standard, and which fonts can I access by including a package?


title: Numbering to start from section not chapter

text: I want chapters not to have any numbers (both in the text and in the table of contents) and the numbering in each section to start from 1. For example (both in text and toc):               Introduction     1 Section     1.1 Subsection     2 Section          Literature Review     1 Section     1.1 Subsection     2 Section      The default behavior is:               Chapter 1 Introduction     1.1 Section     1.1.1 Subsection     1.2 Section          Chapter 2 Literature Review     2.1 Section     2.1.1 Subsection     2.2 Section      The reason why I am after achieving this effect is:   * Because the document I am writing is lengthy, I need to break it into many parts, hence I really need the `subsubsection`s to be numbered (in the text and toc).   * Again because of its length, I think the chapters have a more substantial role in separating the text, therefore having the section numbers to start sharp at 1 instead of x.1 would be a good idea.


title: How can I draw one small circle and one big circle in the same system of coordinates?

text: I want to draw two circles passing through the point `M(-1, -4)` and tangent to the lines `4x+ 3y = 0` and `3 x + 4 y + 1 = 0`. The equation of circles are `(x + 1)^2 + (y +2)^2 = 4` and `(x +241)^2 + (y + 242)^2 = 338^2`. The first circle has small radius and the second has big radius. It is difficult for me to view when I draw them. My code is (I draw with Geogebra).               \documentclass[12pt]{article}     \usepackage{pstricks-add}     \pagestyle{empty}     \begin{document}     \psset{xunit=0.5mm,yunit=0.5mm,algebraic=true,dimen=middle,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}     \begin{pspicture}(-193.7,-54.03)(34.83,63.61)     \psplot[linewidth=1.2pt]{-193.7}{34.83}{(-0-4*x)/3}     \psplot{-193.7}{34.83}{(-1-3*x)/4}     \pscircle(-241,-242){338}     \pscircle(-1,-2){2}     \begin{scriptsize}     \psdots[dotstyle=*](-1,-4)     \rput[bl](-3.92,-6.74){$M$}     \end{scriptsize}     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/K4ws4.jpg) ![enter image description here](http://i.stack.imgur.com/DwP1d.jpg)


title: Draw picture next to page number

text: How can I display (draw) a picture next to the page number. At best, the "style" of the picture would be calculated automatically, depending on the current page number, e.g., draw a circle on even page numbers and a square on odd ones.


title: What is the opposite to "only marks" option in PGFPlots?

text: For some application I generate a bunch of plots automatically from a script, that means that sometimes I issue contradictory options to pgfplots objects because one is the default (within the script), for example               \addplot[red, ...bla..., blue]{ ... }     \addplot[mark=*, ...bla..., mark=+]{ ... }      Fortunately, pgfplots overwrites previous settings in order. In this occasion however, the default is "only marks" (which makes the plot not to have joining lines), what would be option to overwrite "only marks"? For example               \addplot[only marks, ...bla..., draw_lines_please]{ ... }      and makes the plot actually have joining lines by overwriting the first "only marks". (draw_lines_please replaces the option that I am looking for). (If there is one) What is the name of such option? (I guess the question also applies in the case where only marks is the global pgfplots option, but the question is specific for the case above)


title: Why doesn't \settoheight of \parbox work?

text: Consider the following code:               \documentclass[a4paper]{letter}     \usepackage{calc}     \usepackage{printlen}          \newsavebox{\foobox}     \newlength{\fooboxheight}          \savebox{\foobox}{         \parbox[t]{\textwidth}{Line 1\\Line 2\\Line 3\\Line 4}     }     \settoheight{\fooboxheight}{\usebox{\foobox}}          \begin{document}          \usebox{\foobox}               Address box height: \printlength{\fooboxheight} \uselengthunit{mm} \printlength{\fooboxheight}          \end{document}      `\fooboxheight` is 7pt / 2mm, much smaller than the height of the `\parbox`! Why is this? What should I do to get the real height of the `\parbox`? Interestingly, if the `\parbox` is surrounded by a `\frame`, everything works.


title: paragraph indentation inside an indented environment

text: I have used the thmtools-package to create a new proof environment. With the following code I indented the whole environment:               \AtBeginEnvironment{prf}{       \patchcmd\@thm{\trivlist}{\list{}{\leftmargin25pt}}{}{}       \patchcmd\thmt@original@endprf{\endtrivlist}{\endlist}{}{}     }      The problem is now that when I have multiple paragraphs inside this environment, the paragraph indentation is not visible anymore (`\setlength{\parindent}{25pt}`). How could I fix this problem? Thanks in advance. * * * This should demonstrate the problem:               \documentclass[a4paper,12pt]{article}     \usepackage{etoolbox,amsthm,thmtools}          \declaretheoremstyle[         spaceabove=\topsep,         spacebelow=\topsep,         headformat={\NAME},         headfont=\bfseries,         notefont=\normalfont,         bodyfont=\normalfont,         headindent=0pt,         headpunct={\ },         qed =\qedsymbol     ]{proof}     \declaretheorem[style=proof,name=Proof,numbered=no]{prf}          \makeatletter     \AtBeginEnvironment{prf}{%       \patchcmd\@thm{\trivlist}{\list{}{\leftmargin25pt}}{}{}       \patchcmd\thmt@original@endprf{\endtrivlist}{\endlist}{}{}     }     \makeatother          \setlength{\parindent}{25pt}               \begin{document}     \section{Section}     Some text\\     And more text          Here the paragraph is indented.          \begin{prf}     Some text\\     And more text          Here the paragraph is not (visibly) indented.     \end{prf}          \end{document}


title: no effect of \baselinestretch

text: I'm probably doing something wrong, but i can't see any effect of the command `\baselinestretch`, which should modify the vspace between lines. I read somewhere, that i should add `\selectfont` after it, but i can't see any effect either:               \documentclass[12pt]{article}     \begin{document}          {\renewcommand{\baselinestretch}{2}\selectfont coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou coucou }          \end{document}


title: How to maintain numbering and labels inside of a tabular

text: I'm using gb4e in order to number examples in my paper. I want to be able to number a tabular as an example, and then have each line of the tabular be a, b, c, etc.               \documentclass{article}     \usepackage{gb4e}     \usepackage{tipa}     \let\ipa=\textipa     \begin{document}          \begin{exe}     \ex       \begin{tabular}{l l l r}               \ipa{\;Gleg-a}&\ipa{\;Glega}&`sing. dies'&D:156\\          \ipa{\;Gleg-dk}&\ipa{\;Glegatk} & `corpse' & D:156\\          \ipa{Peww-a}&\ipa{Pewwa} & `freezes' & D:30\\          \ipa{Peww-dk}&\ipa{Pewwatk} & `frozen' & D:30\\          \ipa{ha:w\super i\super P-a}& \ipa{ha:w'a} & `has breath' & D:163\\          \ipa{ha:w\super i\super P-dk}& \ipa{ha:witk} & `having (bad) breath' & D:163               \end{tabular}     \end{exe}      I want this to appear as: > (1) > > a. first item(tab)second part(tab)gloss(tab)page number > > b. second item(tab)second part(tab)gloss(tab)page number > > c. third item(tab)second part(tab)gloss(tab)page number but with the (1) on the left side of the whole thing, and with the tabs all being aligned. Is there any way to do this? Then i could potentially reference a line of my example using \label?


title: Problem with beamer in persian/farsi

text: I tried to create slides with `beamer` and the `babel` package with Farsi option `\usepackage[farsi]{babel}`. When I run it, I have some errors. I use this code:               \documentclass[ucs]{beamer}     \usetheme{Aalborg}       \usepackage[utf8]{luainputenc}     \usepackage[T1]{fontenc}     % Or whatever. Note that the encoding and the font should match. If T1     % does not look nice, try deleting the line with the fontenc.     \usepackage{helvet}     \usefonttheme[onlylarge]{structurebold}     \setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}     \setbeamertemplate{navigation symbols}{}          % Standard packages          \usepackage[farsi]{babel}     \usepackage{fontspec}     \usepackage{amsmath}     \setmainfont[Script=Arabic,Numbers=Arabic]{XB Zar}\setsansfont[Script=Arabic,Numbers=Arabic]{XB Zar}      Setup TikZ          \usepackage{tikz}     \usetikzlibrary{arrows}     \tikzstyle{block}=[draw opacity=0.7,line width=1.4cm]          % colored hyperlinks     \newcommand{\chref}[2]{%       \href{#1}{{\usebeamercolor[bg]{Aalborg}#2}}%     }          \begin{document}     % the titlepage     %{\aauwavesbg     %\begin{frame}[plain,noframenumbering] % the plain option removes the sidebar and header from the title page       %\titlepage     %\end{frame}}     \begin{frame}     سلام     \end{frame}     \end{document}


title: funny interference between \baselinestretch and TikZ

text: The command `\baselinestretch` has a strange influence on Tikz Pictures, when it is not closed in a group (compare the two figures):               \documentclass[12pt]{article}     \usepackage{tikz}     \begin{document}         \begin{tikzpicture}[scale = 2]         \draw[very thick] (2,-0.2)+(30:1cm) arc (30:150:1cm);         \end{tikzpicture}              \renewcommand{\baselinestretch}{2}              \begin{tikzpicture}[scale = 2]         \draw[very thick] (2,-0.2)+(30:1cm) arc (30:150:1cm);         \end{tikzpicture}     \end{document}      I know that i should enclose the `\baselinestretch` in a group, but i found this effect funny ! :) (and i needed quite a long time to track this bug inside my documents...)


title: change style of all same objects in LaTeX

text: > **Possible Duplicate:**   >  Change color and background behind text of all 'description' environments How I can change style of all same objects in document? For example, `\description {}` I'm a newbee in LaTeX, so I don't know how I can make style for all document, as css in web


title: How to use a macro as the point arguments of both pspicture and \psframe?

text: I forgot the rule to use `\expandafter` such that `\rect` can be used as the point arguments of both `psframe` and `pspicture`.               \documentclass{standalone}          \usepackage{pstricks}          \def\rect{(-3,-3)(3,3)}          \begin{document}          \begin{pspicture}[showgrid=top]\rect         \psframe[linecolor=red]\rect     \end{pspicture}          \end{document}      Could you review it once more?


title: How to change the chapter number to display as text (One, Two, ...)?

text: In LaTeX, how do I change the chapter number to display as text? eg: CHAPTER ONE not CHAPTER 1; CHAPTER THIRTEEN not CHAPTER 13.


title: got a problem using BibTex in a 64bit PC

text: To insert Bibliography using BibTex, I exported my references from Zotero using the .bib extension and saved it in the folder BibTex/bib (specifically C:\swp55\TCITeX\BibTeX\bib\mybib) and chose a style C:\swp55\TCITeX\BibTeX\bst. I then inserted citation and bibliography, but I only got "?" as citation and nothing for bibliography. Please suggest me what to do, I have little if any technical background. If important my pc is 64bit.


title: How to delete web links from references in Gost style?

text: I need to remove web links like DOI and Pubmed from litterature references produced in Gost style. What functions and lines of code are responsible for that? Reference looks like: > Weyn, B. Determination of tumour prognosis based on angiogenesis-related > vascular patterns measured by fractal and syntactic structure analysis / B. > Weyn, W. A. Tjalma, P. Vermeylen et al . // Clin Oncol (RColl Radiol) . — > 2004. — Vol . 16 № 4. — P. 307–316 . — http : //www . ncbi . nlm . nih . > gov/ ,pubmed/15214656 . I need to delete http links.               %%     %% This is file `gost780s.bst',     %% generated with the docstrip utility.     %%     %% The original source files were:     %%     %% gost.dtx  (with options: `bst,sort')     %%      %% This file may be distributed and/or modified under the     %% conditions of the LaTeX Project Public License, either version 1.3     %% of this license or (at your option) any later version.     %% The latest version of this license is in     %%   http://www.latex-project.org/lppl.txt     %% and version 1.3 or later is part of all distributions of LaTeX     %% version 2005/12/01 or later.     %%      %% This file has the LPPL maintenance status "maintained".     %% Maintained by Igor A. Kotelnikov.     %% Current version: 2012.02.02     %%      %% Please, send bug report via e-mail:     %%   kia999 at mail dot ru <Igor Kotelnikov>     %% or     %%   polyama at yahoo dot com <Maksym Polyakov>     %%                     %%     %% This bibstyle attempts to format bibliography according to     %% GOST 7.80-2000 for bibliographic records.          Here a part of code:          FUNCTION {format.url}     { url empty$         { "" }            {             "\BibUrl{ " url * "}" *             urldate empty$              { "" }               { " (" bbl.urldate * ": " * urldate * ")" * }            if$ *          }       if$     }          FUNCTION {format.annote}     { annote empty$         { "" }     { after.sentence 'output.state :=       "\BibAnnote{" annote add.period$ * "}" *     }       if$     }          %%FUNCTION {format.isbn}     {       %%isbn empty$        %% { "" }        %% { "ISBN:~\href{http://isbndb.com/search-all.html?kw=" isbn *        %%   "}{" * isbn * "}" *        %% }       %%if$     }          FUNCTION {add.doi} { }          FUNCTION {add.medium} { }               FUNCTION {output.eprint.url}     {       %%  format.url output     }


title: What's the exact margin size separating two side by side minipage environments?

text: Consider the following MWE with two `minipage` environments, ideally filling `1\textwidth` in total.               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage{fouriernc,parskip,framed}     \usepackage[text={9in,6in},showframe,landscape]{geometry}          \begin{document}     %     \begin{minipage}[b][][b]{0.8\textwidth}     \begin{framed}     \end{framed}     \end{minipage}     %     \begin{minipage}[b][][s]{0.2\textwidth}     \begin{framed}     \end{framed}     \end{minipage}     %     \end{document}      With the following output ![enter image description here](http://i.stack.imgur.com/Kz2CA.png) I guess the answer is simple, but what is the exact size of the margin between the `minipage`s? `0.8\textwidth`+`0.2\textwidth` > `1\textwidth` by `1.97156pt`.


title: Two Minipages, two times itemize - how to correct alignment

text: I wanted to use a minipage to reduce the size of my itemize list               \documentclass{article}     \begin{document}     \begin{figure}[!htbp]          \begin{minipage}[b]{0.4\textwidth}          \begin{itemize}             \item a             \item b             \item c             \item d         \end{itemize}     \end{minipage}          \hfill          \begin{minipage}[b]{0.4\textwidth}         \begin{itemize}             \item e             \item f             \item g         \end{itemize}     \end{minipage}          \end{figure}     \end{document}      unfortunately i have an uneven number of entries and get the "error", that the second minipage starts its first item on the height of the second item of the first minipage.... so "e" is on the height of "b" while I want it to be at the same height as "a".


title: How to avoid uppercase function name while using Function?

text: In LaTeX, I want to define a function in my algorithm, following is my code in case:               \begin{algorithm}[h]        \begin{algorithmic}[1]            \Function{BuildPolicySet}{PolicySet PS, CCR ccr}                 blabla..            \EndFunction        \end{algorithmc}     \end{algorithm}[h]       In the pdf I got > **function** BUILDPOLICYSET(PolicySet PS, CCR ccr) Actually I don't need the function name being in uppercase. What should I do if I want the function name in the pdf to be the same as in the LaTeX code?


title: Download all dtx from CTAN

text: I've written some code to extract some help from dtx files (documented package), and I have tested it on a few packages for which I had the `.dtx`. It seems, however, that `.dtx` files are not shipped with TeXlive (or rather, `find /usr -name '*.dtx'` only came up with very few of them). I could simply go to CTAN and download package documentation one file at a time, but... that's not desirable `:)`. So how can I do that in the most efficient possible way? EDIT: it appears that the absence of dtx is normal under Ubuntu 10.04 (Lucid). Only dtx from the koma-script and a few others are included.


title: How to let \in or \notin appear above the underline when clicking the screen?

text: ![enter image description here](http://i.stack.imgur.com/1GzMc.png)               \documentclass{beamer}      \usepackage{beamerthemesplit}      \usepackage[english]{babel}     \setbeamercovered{transparent}     \begin{document}     \begin{frame}     \frametitle{1.use$\in$or$\notin$.}     (1)Suppose $A$ are the set of the countries in Asia,then：\\     China\rule[-2pt]{0.8cm}{0.5pt}$A$,USA\rule[-2pt]{0.8cm}{0.5pt}$A$,\\      India\rule[-2pt]{0.8cm}{0.5pt}$A$,UK\rule[-2pt]{0.8cm}{0.5pt}$A$.     \end{frame}     \end{document}      I try to use \pause & \invisible, but it seems doesn't work.


title: Combining different projects into one (papers into PhD Thesis)

text: My question is similar to this one, but I have a problem with relative paths when including files. Assume I have three projects which all start with               \documentclass[12pt,a4paper]{article}     \usepackage[]{}     ...     \usepackage[]{}     \begin{document}     ...     \input{parts/chapter1}     ...     \includegraphics{graphics/figure1.eps}     ...     \end{document}      All these projects include own relative paths to other resources, e.g. graphics and chapters. My goal is to build a new file that will contain all three including everything between `\begin{document}` and `\end{document}`, such that I can work on my three small projects and easily compile them into my PhD Thesis. I could get it working with package catchfilebetweentags, but with full paths only. I also found another package import that helps to recognize relative paths. But I do not know how to combine these two packages. Can one help? A simple example: main.tex               \documentclass[12pt,a4paper]{article}     \usepackage{import}     \begin{document}     1.Hello World     \subimport{test/}{inputFile.tex}     \end{document}      test/inputFile.tex               \documentclass[12pt,a4paper]{article}     \begin{document}     2.Hello World\\     \input{inputFile2.tex}     \end{document}      test/inputFile2.tex               3.Hello World      It would work if I commented `\documentclass[12pt,a4paper]{article}`, `\begin{document}`, `\end{document}` in inputFile.tex. But then I cannot compile inputFile.tex independently. Thank you!


title: How can fit a large table vertical with a picture?

text: I use column package to split sile to 2 column. one for picture and one for table. But my table was broken. Please help me fix it. Here is my code:               \RequirePackage[demo]{graphicx}     \documentclass{beamer}     \usepackage{tabularx}          \begin{document}     \begin{frame}       \begin{columns}[T]         \begin{column}{0.5\textwidth}           \centering           \includegraphics[height = 2 cm]{demo}         \end{column}         \begin{column}{0.5\textwidth}             \resizebox{\linewidth}{!}{                   \begin{tabularx}{\linewidth}{|X|c|c|c|c|c|c|}             \hline             Method& RMSE & MAE & MSE & NMSE & MAPE &Hit Rate \%\\             \hline             \multicolumn{7}{|c|}{1-step ahead}\\             \hline                 PureNN & 5.6411 & 4.1652 & 31.8224 & 0.015 & 0.0094 & 51.61\\                 WaveletNN&5.5612&4.0539&30.9271&0.0146&0.0091&53.63\\                  \hline             \multicolumn{7}{|c|}{3-step ahead}\\             \hline                 PureNN & 11.8207 & 9.0218 & 139.7278 & 0.0658 & 0.0202 & 52.23\\                         WaveletNN&10.0794&7.4881&101.5934&0.0478&0.0169&53.04\\             \hline             \multicolumn{7}{|c|}{4-step ahead}\\             \hline                 PureNN & 12.212 & 9.3179 & 149.1321 & 0.0702 & 0.0212 & 49.6\\                 WaveletNN&12.0099&9.0578&144.2389&0.0679&0.0205&52.4\\                  \hline             \multicolumn{7}{|c|}{7-step ahead}\\             \hline                 PureNN & 16.6392 & 13.35 & 276.8621 & 0.1303 & 0.0304 & 49.80\\                 WaveletNN&15.824&12.3698&250.4003&0.1179&0.0278&55.82\\             \hline             \end{tabularx}  }         \end{column}            \end{columns}     \end{frame}     \end{document}      Here my result(not right!!!): ![enter image description here](http://i.stack.imgur.com/mw2RO.png)


title: Align a linear program

text: I want to write my linear program so that it looks like in this picture: ![integer program](http://i.stack.imgur.com/eKTp1.png) meaning I want to have the following:   * text aligned to the left   * all the `x_{j}` variables to be one another   * the `i=` and `j=` statement to be again to be one under the other This is what I have so far:               \begin{equation}     \begin{split}     \text{minimize} \displaystyle\sum\limits_{j=1}^{m} w_{j}*&x_{j} \\     \text{subject to} \displaystyle\sum\limits_{j:e_{i} \in S_{j}} &x_{j} \geq 1, i=1 ,..., n\\                                              &x_{j} \in \{0,1\}, j=1 ,..., m     \end{split}     \end{equation}      I tried using multiple `&`s, but either I use them and nothing changes, or I get the following error: `Extra alingment tab has been changed to \cr \end{split}`. I have searched this error and I know that it appeares if I forget to write a `&` or I have an extra one, but this is not my case. This is the code:               \begin{equation}     \begin{split}     &\text{minimize} \displaystyle\sum\limits_{j=1}^{m} w_{j}*&x_{j} & \\     &\text{subject to} \displaystyle\sum\limits_{j:e_{i} \in S_{j}} &x_{j} \geq 1, &i=1 ,..., n\\     &                                             &x_{j} \in \{0,1\}, &j=1 ,..., m     \end{split}     \end{equation}      How can I align them in the way that I want? And also is it possible to do it without `align`? Because this program is at the end of my page and if I use `align` it gets placed on the next page and I don't want that.


title: Colorboxes that break across pages

text: I am trying to build an environment/command that allows me to place comments in the text. The idea is to have colored box that can break across pages and use the `\ttfamily` font with hyphenation. I also want to use any structure (table, enumerate, itemize, etc.) inside it. Moreover the box width is variable and the maximum is `\linewidth`. My MWE is below.               \documentclass{article}           \usepackage{blindtext}     \usepackage[showframe]{geometry}          \usepackage{xcolor}     \usepackage{calc}     \usepackage{mdframed}     \usepackage{environ,varwidth}     \newsavebox\MyTempBox     \NewEnviron{mycomment}{%     \savebox\MyTempBox{%     \begin{varwidth}{\linewidth}     \BODY     \end{varwidth}}%     \begin{mdframed}     [topline=false,     rightline=false,     bottomline=false,     leftline=false,     innerleftmargin=1ex,     innerrightmargin=1ex,     innertopmargin=1ex,     innerbottommargin=1ex,     backgroundcolor=pink,     font=\ttfamily,     userdefinedwidth=\dimexpr\wd\MyTempBox\relax     ]     \hyphenchar\font=\defaulthyphenchar\relax     \BODY     \end{mdframed}%     }%          \begin{document}          \begin{mycomment}     \blindtext     \blindtext     \blindtext     \blindtext     \blindtext     \blindtext     \end{mycomment}          \end{document}      So far it almost works, the problem is that it generates a lot of `Overfull \hbox` because the text does strictly not respect the box boundaries. If I put the second `\BODY` inside a minipage               \begin{minipage}{\linewidth}     \BODY     \end{minipage}      It works better, but I loose the break over pages feature. I think that a minipage that can break over pages can be the solution. I am not attached to the mdframed package. For example,               \newcommand{\ccomment}[1]{%     \noindent\colorbox{pink}{\begin{varwidth}{\linewidth-1em}%     \ttfamily     \hyphenchar\font=\defaulthyphenchar\relax % enable hyphenation     #1     \end{varwidth}}}      Would be ok for me, but once more I cannot use it for long text that may break across pages. Thanks.


title: Why the point is missing after the number in this enumerate list?

text: I've always used latex for writing papers and documents but I'm not really expert of templates and styles. Currently I'm working on a document and I'm using a template that was provided by a colleague. Unfortunately when I use `\begin{enumerate}` the generated list contains numbers that are not followed by points (e.g. I see `1` instead of `1.`). I tried to look in the `cls` file and I found the following code, however I wasn't able to fix it.               %% Redefine enumerate environment for closer spacing     \renewenvironment{enumerate}%     {\begin{list}{\arabic{enumi}}%           {\setlength{\leftmargin}{2.5em}%            \setlength{\itemsep}{-\parsep}%            \setlength{\topsep}{-\parskip}%%            \usecounter{enumi}}%      }{\end{list}}      How can I fix it?


title: Why does \luaexec work but the luacode environment doesn't?

text: The following code can be compiled by `lualatex` (Version beta-0.70.1-2011061410 (rev 4277)) correctly. But if I use `\begin{luacode} ... \end{luacode}` environment to replace the `\luaexec{...}` command, errors occur. Is this a bug?               ! Extra }, or forgotten \endgroup.     <template> \unskip \hfil }                               \hskip \tabcolsep \endtemplate      l.19 \end{luacode}          ?      ! Missing \endgroup inserted.     <inserted text>                      \endgroup      l.19 \end{luacode}          ?      ! Missing } inserted.     <inserted text>                      }     l.19 \end{luacode}          ?      ! LaTeX Error: \begin{tabular} on input line 8 ended by \end{luacode}.     See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.19 \end{luacode}          ? q      Here's an example               \documentclass[]{article}     \usepackage{luacode}     \usepackage[left=1cm,right=1cm]{geometry}          \begin{document}          \begin{center}          \begin{tabular}{lllllllll}          \luaexec{       num=6       for i=1,num do           for j=1,num do         ixj='$'..i..'\\times'..j..'='..i*j..'$';         tex.print(ixj)         if(j<num) then tex.sprint('&') else tex.sprint('\\\\') end          end        end      }          \end{tabular}     \end{center}          \end{document}


title: Citing patents using biblatex

text: I'm trying to use `biblatex` to cite patents. I don't need a formal bibliography; I just want inline citations. Given:               @Patent{edison793,      author = {Edison, Thomas},      number = {266793},     }     @Patent{edison580,      author = {Edison, Thomas},      number = {297580},     }      I'd like to be able to cite in three ways:   1. Edison teaches...   2. This is anticipated by the teaching of Edison (266,793)   3. Edison '793 can be distinguished from Edison '580... I'm at a loss as to how to actually accomplish citation in the formats I'd like using `biblatex`. How should I start? Do I have to create an entire custom style? (Again, I don't need the formal bibliography displayed, I just want these three ways of being able to cite).


title: Cite in caption beamer

text: \documentclass{beamer}     \usepackage[latin1]{inputenc}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{wasysym}          \usetheme{CambridgeUS}          \title{Beamer o Beamer}     \author{mishr}          \begin{document}          \begin{frame}     \titlepage     \end{frame}          %slide 0     \begin{frame}     \frametitle{Introduction}          \begin{itemize}         \item Item A \cite{author1} %This works         \item ItemB               \end{frame}          \begin{frame}     \begin{figure}         \includegraphics[scale=0.4]{fig}         \caption{Some figure\protect \cite{Author}}%This doesn't work.     \end{figure}     \end{frame}          \begin{frame}     \frametitle{Bibliography}     \bibliographystyle{abbrvnat}     \bibliography{pres}     \end{frame}      %bib file is named pres.bib I am using the above in Beamer. The citation gives me [?] after multiple runs. Citation in the text works fine. Any ideas why ? Edit: MWE added.


title: Using lua code to obtain rules of different lengths

text: I started to learning LuaLateX nowadays and I'd like to get some rules with increasing lengths, but I can't figure out why this simple code doesn't give the desired output:               \documentclass[11pt]{book}     \usepackage{xcolor}     \usepackage{luatex,pgffor, luacode, calc}     \begin{document}     \newcommand{\myrules}{         \dimen0=2cm         \luaexec{           for i=1,4 do           tex.dimen[0]=tex.dimen[0]*i           tex.print("\\color{red}\\rule{\\dimen0}{3pt}\\par")           end            }        }     \myrules     \end{document}


title: How to sync Beamer notes and pause commands?

text: I want to use `\pause` in my lecture notes, and I want a notes-only version that uncovers different notes before each pause. I thought of using the `\note<.>{"my note"}` syntax, because my understanding of '.' is that it refers to the current `beamerpauses` counter. But when I do this, as in this example, I don't get the desired effect. In fact I don't get all the notes:               \documentclass[t, 14pt]{beamer}     \setbeameroption{show only notes}           \begin{document}          \begin{frame}     \begin{itemize}     \item First things first     \note[item]<.>{Say ``first things first''}     \pause     \item Second things second     \note[item]<.>{Say ``second things second''}     \pause     \item Third things third     \note[item]<.>{Say nothing...}     \pause     \item 4th thing     \end{itemize}     \end{frame}          \end{document}      This results in: ![enter image description here](http://i.stack.imgur.com/smW57.png) Notice the first note ('Say "first thing first"') is not even present. The second note exists before the second bullet point. I looked into dropping the `\pause` command and using `\note<+>` commands, as suggested in a comment to this answer, but it only leads to pauses in my notes and not on the slides. **How do I have one note per pause command? How do I get them to pause in both the presentation and the notes mode?** I should also point out that if I use `\note<1>{...}` and `\note<2>{...}` I _do_ get the desired effect. I just don't want to keep track of how many `\pause` and overlay commands I've made, so I guess I should ask **How do you _easily_ have one note per pause command?**


title: Math text scaling in LaTeX

text: I was wondering if anyone knew of a package or command I could use to prevent TeX from scaling values in an equation. An example of this would be if you have a fraction in a fraction, the text ends up getting fairly small and hard to read. Is there a way to stop this from happening? Example:               \frac{5}{\frac{1}{2}}      the 1/2 in the denominator will be pretty small and hard to read.


title: What are the available "documentclass" types and their uses?

text: Some of the available classes of documents in LaTeX are well known and widely used, such as the `article` and `beamer` classes, while others are not so well known, such as the `standalone` class. I found this figure ![alt text](http://i.stack.imgur.com/UKMFS.png) which lists the main classes and is a good starting point, but the description is too short and still leaves one wondering when it would be more suitable to choose one class over the other and what the characteristics of each class is. Furthermore, the list is not exhaustive I think, given that I know at least one more document class that is not there (the `standalone` class, as I mentioned). So my question is: what are the available classes of documents in LaTeX, and could you provide a brief description of the class and the situations where it would be recommended? Please give only one class per answer.


title: TexShop - Command Down

text: The quick-key "Command-down" (`⌘`+`↓`) in TexShop works like an "end" (`End`) key on my Mac, and brings me to the end of the document whenever I accidentally hit it. This is driving me nuts. Is there any way to suppress this?


title: My reference only shows half

text: Here is a website reference in my `.bib` file ...               @MISC{Peston2010,     AUTHOR = {Peston, Robert},     TITLE = {The Digital Economy Bill},     URL = {www.news.bbc.co.uk/1/hi/technology/8604602.stm},     DATE = {9},     MONTH {April},     YEAR = {2010},     ACCESSED = {8 February 2012}     }      When I compile and display my PDF, it only shows "Robert Peston. The digital economy bill" It does not show the URL, Date, Month, Year and Accessed. Can anyone tell me why this isn't working? I spent a while sorting this out and decided to consult help. Also, when I compile, I get a small error "Overfull \hbox (183.18742pt too wide) in paragraph at lines 1--10". I am quite new to LaTex


title: Changing how a collection of citations is shown in Lyx

text: I am using Lyx to write a report. I import a .bib library to the report and then pick my desired sources from the list. When I reference several sources at once, they look like this [3, 4, 5, 6] in the report. How do I change it to look like this: [3-6]? Thanks!


title: What is the way to left-align labels in a tikz-timing diagram?

text: \documentclass{article}          \usepackage{tikz-timing}          \newcommand{\degr}{degr}          \begin{document}          \begin{tikztimingtable}       Clock 128\,MHz 0\degr    & H   12{2C} G \\ % ends with edge       \color{red}\tiny Clock 128\,MHz 90\degr   & [C] 12{2C} C \\ % starts with edge       Clock 128\,MHz 180\degr  & C   12{2C} G \\ % ends with edge       Clock 128\,MHz 270\degr  &     12{2C} C \\     \end{tikztimingtable}          \end{document}      I'd like all labels 'Clock...' to be left aligned.


title: Obtaining spaces in hyperlink

text: I want a hyperlink in a paper that I am writing. I'm using the `hyperref` package and then `\href{<website>}{\nolinkurl{<Thing_with_spaces>}}`. How do I go about getting spaces displayed for `<Thing_with_spaces>`?               \documentclass{article}     \usepackage{hyperref}          \begin{document}          \href{http://tex.stackexchange.com}{\nolinkurl{I Like TEX Stackexchange}}          \end{document}      What will display is `ILikeTEXStackexchange` with a little blue box around it. I would like spaces to occur between the words.


title: how to numerate Chapters in Lyx

text: I'm new working with Lyx. What I want is to numerate all the chapters in my paper. I tried this code for my first chapter:               \setcounter{chapter}{1}.      but immediately I got this error message: > \maketitle   >  Your command was ignored.   >  Type `I <command> <return>` to replace it with another command,   >  or `<return>` to continue without it. Do I need to add any package, library.... I'd really appreciate any answer.


title: Changing sorting order with natbib

text: I am writing my proposal and a professor asks me to change the multiple citation order in text, sorting by year, not alphabetically. Here is what I have now using the 'sort' option in `natbib` package: one sentence (Blogs et al, 1995; Dent et al, 1994; Smith et al, 1992) What the professor asked for is: One sentence (Smith et al, 1992; Dent et al, 1994; Blogs et al, 1995) Is there anyway to do this?