title: Letter in quotation

text: I want to put entire letter as a quotation in text (which is a book), something similar to what you get with `quotation` enviroinment, but preserving positions of adress etc. How to do this?


title: Apacite compilation errors

text: I am using apacite package and can't get my bibliography to compile. I was using another style until now, which was working, but I need APA. Does it matter how I created the .bib file (I imported references from Google Scholar, and there are different citation styles there, I didn't always select APA), or will the display of the references be handled by the package no matter how the bib was generated? Some errors I get are "Case mismatch errors between keys" and "I couldn't open style file apastyle.bst". Partial example below.               \documentclass[12pt,twoside,a4paper]{book}      \usepackage[english]{babel}     \usepackage{apacite}     ...     \bibliographystyle{apastyle}     \bibliography{Bibliography}


title: Define subpart section

text: I need a section which isn’t really a part, nor a chapter. So I was trying to define a new command, \subpart, based on the \part command, but with its own numbering and which would look like this, in the middle of a new blank page: > SUBPART ONE > > **Name of the subpart** However, when I try to do so, there always are errors showing up… My approach, based on the code from I-dont-remember-where on the web:               \makeatletter     \def\@subpart[#1]{%         \ifnum \c@secnumdepth >\m@ne           \refstepcounter{subpart}%           \addcontentsline{toc}{subpart}{\thepart\hspace{1em}#1}%         \else           \addcontentsline{toc}{subpart}{#1}%         \fi         {\parindent \z@ %\raggedright                    % Commented \raggedright          \interlinepenalty \@M          \normalfont          \ifnum \c@secnumdepth >\m@ne            \Large\bfseries\hfil\partname~\thepart\hfil   %  added \hfil … \hfil for centering            \par\nobreak          \fi          \huge \bfseries %          \markboth{}{}\par}%         \nobreak         \vskip 3ex         \@afterheading}     \makeatother      I really should learn to use LaTeX correctly… Thank you for your help,   Sebastian


title: How to set UTF8 in a lstlisting? (Error received)

text: I need to copy and past some UTF8 code into a lstlisting, but unfortunately, I receive the following error : **! Package inputenc Error: Unicode char \u8:�\lst@FillFixed@\lst@EC� not set up for use with LaTeX.** **Keyboard character used is undefined** What is weird was that I didn't noticed any weird characters in my lstlisting code (it's some bash code). Furthermore I got the package in header:                \usepackage[utf8]{inputenc}      What should I do?


title: Where can I find help files or documentation for commands like \@startsection for LaTeX?

text: I can't find official documentation for the `\@startsection` command. I already looked in:   1. LaTeX Wikibook   2. LaTeX: Structured document for TEX, 2008   3. beginLatex — a book that comes with ProTeX   4. in the files that comes with MikTeX in the folder `doc` and Google. I found a lot of sites that show examples and discussions about it but I'd like to find the official help or document.


title: Unable to use pdftex if Adobe is still open

text: I'm sorry if this exact question has already been asked, but the similar duplicates I've found didn't have the same phrasing. Therefore, I'm asking a new question... I have WinEdt 7.0 on Windows 7 and I have Adobe Acrobat Pro 9.0. Whenever I open WinEdt and I compile a file, everything works like a charm. If I re- compile without closing Adobe, the compiling fails and I get an error: > Cannot Open DDE Link to: > > "C:\Progam Files (x86)\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe" > > Service: AcroviewA11 > > Topic: Control > > DDEOpen("%$('PDF-View')","%$('Acro-DDE_Service);",... All of the problems I've found on the site have been related to changing `acroview` to `acroviewA11`, but I wasn't able to find these anywhere. Can someone help me? **UPDATE:** Since I can't post answers for another 6 hours, and I have a high probability of forgetting to return here and accept an answer, I'll post my exact actions here. After going to `Options Interface->Advanced Configuration->PDF Macros->Adobe Blues`, and making the recommended changes from `AcroviewA11` to `Acroview` according to this answer, I executed the macro by going to `Macros->Execute Current Macro` (or it can be done using `Ctrl`+`Shift`+`F9`). At this point, I checked and it worked! The error occurred because I run Adobe 9 and not Adobe 11; however, I'm not sure what the precise cause of it was.


title: I get double question marks when referring to labels inside figures

text: I have some charts embedded in figures, and I want to be able to refer to them easily using the "Figure _x_ " notation. I'm doing it like this (in this order):               \documentclass[12pt,letterpaper]{article}          ...          \section*{Results}     ...we performed a linear regression to obtain a standard curve      (Figure~\ref{0:stdcurve})....          \pagebreak     \section*{Results (Graphs)}     \subsection*{Construction of Standard Graph for PNP}     \begin{figure}[h]   % Figure 1         \centering         \includegraphics[scale=1]{kinematics-res/graph0-1}         \caption{The standard curve for PNP.}         \label{0:stdcurve}     \end{figure}      However, instead of getting the output "...to obtain a standard curve (Figure 1)...", I just get "...to obtain a standard curve (Figure **??** )..." I also noticed that the PDFLaTeX compiler is generating warnings saying that it couldn't find the reference of the name `0:stdcurve`. Why am I getting these warnings?


title: Frame titles for PDF chapters in Beamer

text: Pardon me if this question has been duplicated elsewhere, I'm still coming to terms with tex terminology. I am generating a presentation in Beamer. I like the use of PDF chapters to navigate between slides as well. I use sections to break up the presentation into... sections. However, the ideal subsection heading is just the frametitle. Is there any way to automate the process of retroactively creating subsections based on input to `\frametitle`? My document is set up a bit like the following:               \documentclass{beamer}     \begin{document}          \section{Introduction}     \begin{frame}     \frametitle{Research essentials}     Researchers are responsible for many aspects of study design and protocols     \end{frame}          \begin{frame}     \frametitle{Overview}     In this presentation we will be talking about Review Boards, Funding Mechanisms, Statistical Analysis Plans, and Manuscripts     \end{frame}              \section{IRBs}          \begin{frame}     \frametitle{Institutional Review Boards}     IRBs independently review study applications to ensure that the degree of invasiveness is justified, the results of scientific interest, and the confidentiality of study participants protected     \end{frame}     \end{document}      I would like the PDF chapters left hand bar on Adobe to show the following breakdown               Introduction     - Research Essentials     - Overview     IRBs     - Institutional Review Boards


title: Looking for LaTeX templates.

text: where can I find a 'professional' document templates in LaTeX. I need two different one to the other user documentation and second for developer documentation. I know that I can safely create it myself, but I have no idea of the appearance of these documents.


title: What is the gold standard of package documentation?

text: When writing documentation for a package aimed at CTAN, what should every manual contain? Specific examples of concise yet complete documentation are valued. This is one of those (hopefully) big list questions, so please CW.


title: In an avm, can the horizontal space between the brackets be set manually?

text: I've created a simple attribute-value matrix using a custom style file `avm.sty` which is explained here. However, it is so narrow that the right bracket overlaps with the text.               \documentclass{article}     \usepackage{avm}     \begin{document}             \begin{avm}          @{0} [ \asort{walk}                 agent @{1}\\                path @{2}\\                    ]              \end{avm}     \end{document}      ![enter image description here](http://i.stack.imgur.com/uUNzx.jpg)


title: Problem with wrong header

text: I'm having a strange problem. In my code I have               \tableofcontents     \input{./path/to/my/other/texfile.tex}      My summary is well generated, but the rest of the file, which looks like this:               \chapter*{A Chapter of Definitions}          %\singlespacing          \section*{A Section}          Some text.               \begin{enumerate}       \item \textbf{Name of list}       \begin{enumerate}         \item \textbf{First item:} Text.     ...      appears in my dvi with the header `SUMMARY`, but this file didn't belong to the summary. What's the problem? How can I fix it? My messy main.tex is in this link in pastebin.


title: Vertical alignment of figures within tabular

text: \begin{tabular}{p{0.30\paperwidth}p{0.30\paperwidth}p{0.30\paperwidth}}         \rowcolor{gray} &   & \\[4ex]     \rowcolor{gray} \multicolumn{2}{l}{\hspace{1cm} \textcolor{white}{\Large \textbf{ProjektFormidlingNord}}} & \\[5ex]          \input{into_table.tex} & \multicolumn{2}{l}{\includegraphics[scale=0.5]{nav.eps}} \\     \end{tabular}      which returns the following: ![enter image description here](http://i.stack.imgur.com/P1Alw.png) If I remove the image, the table on the left that is created by an external `.tex` file is nicely aligned at the top. I dont understand why the alignment on the left table should be affected by a `.svg` figure in the next column. I hope some of you can expand my knowledge on this.


title: Changing the font for a custom environment

text: I can't figure out how to embed a command like `\textbf` or something in a newly created environment, I have:               \newenvironment{definition}       {\begin{quote}}       {\end{quote}}      I want to customize my definition environment with some additional commands, but if I try something simple like:               \newenvironment{definition}       {\textbf{\begin{quote}}       {\end{quote}}}      `pdflatex` refuses to compile a PDF. Where am I wrong? Is there a limit for a newly created environment?


title: Call macro whose name depends on macro

text: Sorry about the title, I really couldn't find a better one. I'm facing the following dilemma: I'm using the `smartref` package, in particular I'm using its `\sgetXval` macros. The thing is that I'm using the code kindly provided in this previous question of mine to determine whether a label points to (say) a section or a chapter, and I'd like to call either `\sgetsectionval` or `\sgetchapterval` accordingly. I've tried with:               \csname sget\getreftype{#1}val\endcsname{\target@counter}{#1}      but I get `Missing \endcsname inserted` errors sistematically. Bottom line: I'd like a way of _constructing_ a macro name from an arbitrary expression and then call said constructed macro name. I could post more code, but it's gonna get messy and I think this should suffice to convey the question proper, do let me know otherwise :) Edit: MNWE ;)               \documentclass{article}     \usepackage{hyperref}     \usepackage{smartref}          \addtoreflist{section}          \makeatletter     \newcounter{actual@counter}% Additional chapter counter          % Helper macro to extract the type (section,subsection...) or the type name     % out of the label reference. Works with hyperref only.     % Argument #1 is a macro of form \def\...#1...\@nil{...}     % Argument #2 is the label reference, e.g. "sect:test"     \newcommand*\@getautoref[2]{% \HyPsd@@@autoref from hyperref, modified       \expandafter\ifx\csname r@#2\endcsname\relax         ??%       \else         \expandafter\expandafter\expandafter\@@getautoref             \csname r@#2\endcsname{}{}{}{}\@nil#1\@nil       \fi     }     \def\@@getautoref#1#2#3#4#5\@nil#6\@nil{%       #6#4.\@nil}% Argument #4 = type and number, e.g. "section.1" or "subsection.1.2"          % \getreftype results in the type name, e.g. "section" or "figure".     % It remove a star, if existent, i.e. "section*" will become "section"     \newcommand\getreftype{%       \@getautoref\@@getreftype}     \def\@getreftype#1.#2\@nil{#1}     \def\@@getreftype#1.#2\@nil{\@@@getreftype#1*\@nil}     \def\@@@getreftype#1*#2\@nil{#1}          % \getautorefname results in the type prose name (plus space character),     % e.g. "section" in English or "Abschnitt" in German     % (like \autoref, but without number).     % Since the \space is hard coded inside \HyPsd@@autorefname we use our     % own version called \@getautorefname instead.     % It will work with labels to \section* etc., too.     \newcommand*\getautorefname{%         \@getautoref\@@getautorefname}     \def\@getautorefname#1.#2\@nil{\@@@getautorefname{#1}}     \def\@@getautorefname#1.#2\@nil{%       \expandafter\@@@getautorefname\expandafter{\@@@getreftype#1*\@nil}}     \def\@@@getautorefname#1{% = \HyPsd@@autorefname without \space       \ltx@IfUndefined{#1autorefname}%         {\ltx@IfUndefined{#1name}{}{\csname#1name\endcsname}}%         {\csname#1autorefname\endcsname}}     \makeatother          \newcommand{\getrefval}[2]{%       \csname sget\getreftype{#1}val\endcsname{#2}{#1}% Retrieve chapter counter from reference     }          \begin{document}       \section{An example section\label{sec:anExampleSection}}       \section{Another example section\label{sec:anotherExampleSection}}            \getrefval{sec:anExampleSection}{\csOne}       \getrefval{sec:anotherExampleSection}{\csTwo}            % here, \csOne should contain "1" and \csTwo should contain "2"     \end{document}      (this is a somewhat modified version of the code in the linked question, I didn't need the extra flexibility of having a starred and non-starred version of the macros defined therein, so I just deleted the corresponding code). I get the error when trying to use `\getrefval`.


title: Some simple surface drawing using addplot3 for pgfplots won't compile

text: I am having trouble compiling even some very simple surface drawing using `pgfplot` and `addplot3`, for example please see the attached code, I keep getting error saying `\begin{axis} on input line 8 ended by \end{document}`, and if I commented those two lines of `addplot3` out, it is okay, so I am guessing it is not the problem of Tex-live on Ubuntu. Googled but nobody seems to have a similar issue with this. Any idea?               \documentclass{minimal}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}     \begin{axis}     \addplot3[surf,domain=0:10,samples=40, shader=interp]     {x*y};     \end{axis}     \end{tikzpicture}          \end{document}


title: geometry, fancyhdr: \fancyfoot[C]{\thepage} is not really centered

text: After switching from the `report` class to the `book` class and starting to use the `fancyhdr` package to control headers/footers, the page numbers in my footers are no longer centered. This is my `fancyhdr` setup:               \usepackage{fancyhdr}     \fancypagestyle{plain}{%     \fancyhf{} % clear all header and footer fields     \fancyfoot[C]{\thepage} % except the center     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}}     %activate the style:     \pagestyle{plain}          \usepackage{geometry}     \geometry{a4paper} %paper format     \geometry{left=27.5mm,right=27.5mm,bottom=27.5mm,top=27.5mm} %margins With this the page numbers are placed off-center. On even pages they are to the right of the center and on odd ones they are to the left of it. What I want is a perfectly centered (with respect to the page) pagenumber in the footer of even and odd pages alike (like it was when I used the `report` class and no `fancyhdr`s).


title: Only Select Code without Line Numbers

text: I'm writing a LaTeX document and want to include several listings for source code examples. Is there a way to disable the selection of line-numbers when selecting the source code? My prof just wants to copy/paste the source code from the final pdf-file without manually removing all the line numbers afterwards. Does anyone know how to fix this problem?


A PDF output is obtained by compiling the following code.               \documentclass{article}     \usepackage{xcolor}     \usepackage{listings}          \lstset     {         language={[LaTeX]TeX},             numbers=left,             numbersep=1em,             numberstyle=\tiny,         frame=single,         framesep=\fboxsep,         framerule=\fboxrule,         rulecolor=\color{red},         xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,         xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,         breaklines=true,         basicstyle=\small\tt,         keywordstyle=\color{blue},         commentstyle=\color[rgb]{0.13,0.54,0.13},         backgroundcolor=\color{yellow!10},         tabsize=2,         columns=flexible,         morekeywords={maketitle},     }          \begin{document}          \begin{lstlisting}     \documentclass{article}     \usepackage{listings}     \title{Sample Document}     \author{John Smith}     \date{\today}     \begin{document}     \maketitle     Hello World!     % This is a comment.     \end{document}     \end{lstlisting}          \end{document}      I attempted to copy the code only inside Acrobat Reader. Unfortunately, the line numbers also got copied as shown on the following screen shot. ![enter image description here](http://i.stack.imgur.com/SyOza.png) The line numbers are useful, but readers want not to copy them. Is there a LaTeX trick to prevent a PDF viewer from copying the line number?


title: Upgraded from Texlive 2013 to 2014 and pstbarcode no longer works

text: \documentclass[border=10pt]{standalone}     \usepackage{pst-barcode}     \usepackage{auto-pst-pdf}     \begin{document}     \begin{pspicture}(0.7in,0.7in)         \psbarcode{http://www.kernel.org}{}{qrcode}     \end{pspicture}     \end{document}      Is anything special required in tl2014 to continue using pstbarcode?               ! Package auto-pst-pdf Error:"shell escape" (or "write18") is not enabled:     auto-pst-pdf will not work!.     See the auto-pst-pdf package documentation for explanation.     Type H <return> for immediate help.... Or turn off auto-pst-pdf.}


title: Nested standalone files with standalone package

text: Is it possible to nest files with the standalone package? I have something like the following: In A.tex:               \documentclass{article}     \usepackage{standalone}     \begin{document}     \input{B}     \end{document}      B.tex:               \documentclass{standalone}     \begin{document}     \begin{table}       \input{C}     \end{table}     \end{document}      C.tex is               \documentclass{standalone}     \begin{document}     \begin{tabular}{ l l r r }          A & B & C & D     \end{tabular}      \end{document}      A and C compile fine, but when compiling B.tex I get errors starting with :               ! LaTeX Error: Not in outer par mode.      and complaining from there. Is what I'm trying to do -- where A.tex includes B.tex includes C.tex -- possible? Possible with floats?


title: How to change the font size during the new defined environment?

text: I want to change the font size of the new environment defined as below:               \newsavebox{\ieeealgbox}     \newenvironment{boxedalgorithmic}     {\begin{lrbox}{\ieeealgbox}     \begin{minipage}{\dimexpr\columnwidth-2\fboxsep-2\fboxrule}     \begin{algorithmic}}     {\end{algorithmic}     \end{minipage}     \end{lrbox}\noindent\fbox{\usebox{\ieeealgbox}}}      and the environment is used like below:               \begin{table}[ht]               \caption{...}      \centering     \begin{boxedalgorithmic}     ...     \end{boxedalgorithmic}     \label{alg}     \end{table}      I really don't know how to change the font size of the content in the Table.


title: Separating the preamble to another file

text: What is the best practice for separating the preamble to a dedicated file? I've seen two variants:   1. A package: preamble.sty and `\usepackage{preamble}`   2. A .tex file: preamble.tex and `\input{preamble}` Which one is to be preferred?


title: Package for energy budget trees

text: Is there a package that can typeset trees used for energy budgets? ![enter image description here](http://i.stack.imgur.com/0mqBI.png) The image is an extract from _Dynamic Energy and Mass Budgets in Biological Systems_ by B.Kooijman which is easily identifiable as having been typeset using LaTeX. Unfortunately I have only a PDF of the book.


title: Usage of TeX in unnatural fields

text: > **Possible Duplicate:**   >  LaTeX in Industry   >  In what ways can TeX be used beyond document production? TeX has limited usage: mathematics, physics, linguistics, chemistry, biology, most of which is a branch of science. I'm interested in usage of TeX in any unnatural fields: newspapers, advertisements etc.


title: Beyond of the LaTeX

text: > **Possible Duplicate:**   >  In what ways can TeX be used beyond document production? What else can we create in LaTeX besides aesthetically beautiful typeset documents? I know we can create theses, monographs, books, we can draw using PSTricks or TikZ and create slides with Beamer, but what else can we do? I do not know, but how to create mailers? How to create animations? These are just a few suggestions. What else can we create in LaTeX? How to go beyond LaTeX?


title: In what ways can TeX be used beyond document production?

text: Most people use TeX and its many varieties to create printed documents, such as reports, books, flyer's, etc. Occasionally, I have found software that uses TeX markup for other purposes, for e.g., the flashcard software, Anki can use TeX to render on-screen flash cards.   * Beyond producing typical printed documents, what other applications does TeX have?   * Are there any other software programs which use TeX for other purposes?


title: Is there an `ex` unit equivalent for the capital 'X' in LaTeX

text: In LaTeX, the `ex` unit represents the height of a _lowercase_ ' **x** ' in the current font. Is there a length in LaTeX that represents the height of a capital ' **X** '?


title: Url of the picture in final PDF

text: Using ConTeXt I want to create a pdf with pictures from the internet. I don't want to include those pictures into the pdf, but I want only links to these pictures, and the pictures themselves shall be loaded when viewing the pdf. I tried to use this code:               %interface=en translate-file=utf-8     \starttext     \externalfigure[http://userserve-ak.last.fm/serve/_/36375617/Lucie+Jones+Lucie+PNG.png][type=png]     \stoptext      I used this command for the compilation:               texexec --pdf --tex=pdfetex --int=en file.tex      But in the final pdf there is only this error message:               name: dummy     file: Lucie+Jones+Lucie+PNG     state: unknown      Is it possible to have the external figures in the final pdf (using ConTeXt)?


title: Overspaced paragraphs

text: \documentclass[12pt, a4paper]{book}%, oneside               \begin{document}     \chapter{Current Approach}\label{chap:background}          \pagebreak          \section{Approximation}     Nunc accumsan iaculis odio, vel pretium neque condimentum non. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In et facilisis arcu. Vestibulum non massa augue. Proin lobortis dignissim velit, quis pulvinar ipsum vestibulum vel. Nulla vitae ipsum ante. Maecenas eu arcu at elit luctus dictum nec eget magna. Vivamus eu faucibus eros. \\               Nunc accumsan iaculis odio, vel pretium neque condimentum non. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In et facilisis arcu. Vestibulum non massa augue. Proin lobortis dignissim velit, quis pulvinar ipsum vestibulum vel. Nulla vitae ipsum ante. Maecenas eu arcu at elit luctus dictum nec eget magna. Vivamus.\\          Nunc accumsan iaculis odio, vel pretium neque condimentum non. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In et facilisis arcu.\\          Nunc accumsan iaculis odio, vel pretium neque condimentum non. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos m.\\          The algorithm works as shown in Figure 1.2.          \pagebreak          \section{Exact algorithm}     previously, generated a depth first tree for every instance, now it is generated for only one instance          optimization using bit vectors          problem with the search tree being too huge (State the complexity)          Why, contrary to X's solution, iterative deepening might not be used in this approach          \end{document}      The above code generates a 3 page document, one of which is shown below: ![enter image description here](http://i.stack.imgur.com/S5APU.jpg) As you can see, the spacing between the paragraphs is enormous. Now my question is, what might be the cause of such a problem, and what could be a possible solution?


> **Possible Duplicate:**   >  \pagebreak vs \newpage In LyX/LaTeX, What is the difference between "Page Break" and "New Page"? They both seem to do the same to me.


title: Chapter header is not placed right before pagebreak

text: I have a document that is followed by a set of appendices. In one of these appendices, I want to include flowcharts as figures that take a whole page. The way I want it to look is as follows: * * * First page: > Appendix H > > Flowcharts of main functions Then each flowchart on a separate page in this format: > Sectionheader: 'First flowchart' > > Figure (the flowchart) * * * The problem is that the chapter headings on the first page are not placed right (or at least not looking nice), near the bottom of the page. My code is:               \documentclass[10pt,a4paper]{book}          \usepackage{amsmath}     \usepackage{verbatim}     \usepackage{graphicx}     \usepackage{booktabs}     \usepackage{float}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{mcode}     \usepackage{pdfpages}     \usepackage{natbib}     \usepackage{listings}     \usepackage{enumitem}     \usepackage[official]{eurosym}     \bibliographystyle{chicago}     \usepackage{hyperref}          \begin{document}          %Frontpage, some text          \frontmatter          %Abstract, TOC, introduction etc... (via \include)          \mainmatter           %Some chapters main text (via \include)          \appendix          %Actual problem below          \chapter{Flowcharts of the main functions}          \pagebreak          \section{Some flowchart title}              \begin{figure}[H]         \centering         \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{path/filename.pdf}         \caption{Flowchart caption}         \label{somelabel}     \end{figure}      \end{document} Without the pagebreak or the 'H' placement the sectionheaders are placed on the first page, which I don't want. I hope anyone can help. This is my first question here (all other questions I had I was able to find here already!), so if I need to provide more details of any kind please let me know.


title: Control space between paragraph and table in LaTeX

text: I have large white space between paragraph and table in a LaTeX file, see the following figure. ![enter image description here](http://i.stack.imgur.com/xAxXO.png) how to control this space? MWE is uploaded in this link MWE the paper should not exceed 1 page


title: Converting LaTeX to HTML but keeping equations as LaTeX

text: I'm using tex4ht for conversion of heavily maths loaded LaTeX files into HTML to be able to serve them in a web app. Can successfully convert all equations to MathML and jsMath. But as equations are not web optimized, some of them are rendered wrongly or dont even get rendered as they are in original PDF's. So I decided to use maths as LaTeX as I think Mathjax can handle LaTeX equations better than jsMath or MathML. Have already seen tex4ht leaving equations unchanged, tex4ht leaving equations unchanged - including \\[...\\] and \\(...\\) and TeX4HT Equation unchanged with newcommand or def command I can manage to leave inline maths as they are but struggling with aligned standalone maths. For example:               After a time $t$, the ground state $\ket{g}$ and the excited state $\ket{e}$ will each have accumulated a phase that is proportional to their energies:     \begin{align}     \ket{\psi(0)} \to \ket{\psi(t)} = \frac{e^{-iE_1 t/\hbar}}{\sqrt{2}} \ket{g} + \frac{e^{-iE_2 t/\hbar}}{\sqrt{2}} \ket{e}\, .     \end{align}     We can take out the factor $e^{-iE_1 t/\hbar}$ as a global unobservable phase, and obtain     \begin{align}\label{eq:atomequator}     \ket{\psi(t)} = \frac{1}{\sqrt{2}} \ket{g} + \frac{e^{-i(E_2 - E_1)t/\hbar}}{\sqrt{2}} \ket{e}\, .     \end{align}      So I can get tex4ht not to convert **$\ket{g}$** in first line into image but having issues with maths within **{align}**. I'm using michal-h21's .cfg file described in this answer: http://tex.stackexchange.com/a/165119/52068 any help would be greatly appreciated. PS: I'm not a LaTeX expert and did not write the documents myself. So I somehow need to find a way to workout the LaTeX I have without modifying or with minimum amount of modification.


title: Problem aligning multiple pgfplots due to different axis label sizes

text: I have two plots that comes back to back in my paper. One of these plots is generated from 1000 data samples while the other one from 320. The problem that I'm, facing right now, is that plots are aligned by right-most axis labels (1,000 and 320). This result in a situation where actual right side border of the plots are not aligned. To make it clear, please consider the following MWE:               \documentclass[11pt,twocolumn]{article}     \usepackage{lipsum}     \usepackage{pgfplots}     \usepackage{tikz}          \begin{document}     \lipsum[1-3]     \begin{figure}[t]     \centering         \resizebox{\linewidth}{!}{         \begin{tikzpicture}             \def\UpperBound{2.112528}             \def\LowerBound{-0.092346}                 \begin{axis}[                 scale only axis,                 xmin             = 0,                 xmax             = 1000,                 ymin             = -0.292346,                 ymax             = 2.312528,                 y                = 30,                       width            = 0.5\textwidth,                 height           = 0.25\textwidth,                 grid style       = {dashed, ultra thin},                 grid             = major,                 xtick            = {0,250,...,1000},                 ytick            = \empty,                 tick label style = {font=\small}                 ]                 \addplot[thick, blue] table [x expr=\coordindex, y index=0]{values.csv};                                  \draw[thin, green, dashed]  (axis cs:\pgfkeysvalueof{/pgfplots/xmin},\UpperBound) --                                  (axis cs:\pgfkeysvalueof{/pgfplots/xmax},\UpperBound);                                       \draw[thin, red, dashed]    (axis cs:\pgfkeysvalueof{/pgfplots/xmin},\LowerBound) --                                  (axis cs:\pgfkeysvalueof{/pgfplots/xmax},\LowerBound);                 \end{axis}             \end{tikzpicture}             }     \caption{A caption.}     \end{figure}          \begin{figure}     \centering         \resizebox{\linewidth}{!}{                   \begin{tikzpicture}                 \begin{axis}[                     scale only axis,                     grid             = major,                     xmin             = 0,                     xmax             = 320,                     width            = 0.5\textwidth,                     height           = 0.15\textwidth,                     grid style       = {dashed, ultra thin},                     xtick            = {0,80,...,320},                     ytick            = \empty,                     tick label style = {font=\small}                     ]                     \addplot[thick, blue] table [x expr=\coordindex, y index=0]{error_file.csv};                 \end{axis}             \end{tikzpicture}             }     \caption{Another caption.}     \end{figure}     \end{document}      resulting in: ![enter image description here](http://i.stack.imgur.com/nnj8g.png) ![enter image description here](http://i.stack.imgur.com/yE0KW.png) Is there any option to bring the right-most value inside the canvas of the plot such that outer most of the plot becomes the right border? (and other labels as well) Or perhaps rotate the labels like gnuplots (although I prefer _not_ to resort to the latter). ![enter image description here](http://i.stack.imgur.com/RKKmA.png) Data for MWE File1, File2


title: In biblatex, treat periods in journal as abbreviation dots

text: I would like to consistently have a comma between the journal and volume number for article references using `biblatex` with `biber` as the backend. Unfortunately, the punctuation between the journal and volume is not consistent. Journals whose last word is abbreviated have no comma between the journal and the volume, and the word "Vol." is capitalized. Journals whose last word is not abbreviated have a comma and the word "vol." is not capitalized. I can fix the capitalization by un-commenting the commented lines in the below MWE, but the comma problem is quite perplexing. Apologies if this fix is in an answer somewhere, but I cannot find it (or at least, I don't know what to search for!). Current output:   [1] First Author. “Blah Blah 2”. In: _Am. J. Phys._ Vol. 72, no. 3 (Mar. 2004), pp. 367–375.   [2] Second Author. “Blah blah”. In: _Energy Fuel_ , vol. 27, no. 12 (Dec. 2013), pp. 7778–7789. Expected output:   [1] First Author. “Blah Blah 2”. In: _Am. J. Phys._ , vol. 72, no. 3 (Mar. 2004), pp. 367–375.   [2] Second Author. “Blah blah”. In: _Energy Fuel_ , vol. 27, no. 12 (Dec. 2013), pp. 7778–7789. MWE:               \documentclass{article}     \usepackage{filecontents}     \usepackage[         backend=biber,         citestyle=numeric-comp,     ]{biblatex}     \addbibresource{\jobname}     % \DefineBibliographyStrings{english}{%         % volume = {\lowercase{v}ol\adddot}, % avoid capitalization after dots.     % }     \DeclareFieldFormat[article]{volume}{\bibstring{volume}\addspace #1}     \DeclareFieldFormat[article]{number}{\bibstring{number}\addspace #1}     \renewbibmacro*{volume+number+eid}{%       \printfield{volume}%       \setunit{\addcomma\space}%<---- was \setunit*{\adddot}%       \printfield{number}%       \setunit{\addcomma\space}%       \printfield{eid}}     \renewbibmacro*{journal+issuetitle}{%       \usebibmacro{journal}%       \setunit*{\addcomma\addspace}%<---- was \setunit*{\addspace}%       \iffieldundef{series}         {}         {\newunit          \printfield{series}%          \setunit{\addspace}}%       \usebibmacro{volume+number+eid}%       \setunit{\addspace}%       \usebibmacro{issue+date}%       \setunit{\addcolon\space}%       \usebibmacro{issue}%       \newunit}          \begin{filecontents*}{\jobname.bib}     @article{York2004,     author = {Author, First},     journal = {Am. J. Phys.},     month = mar,     number = {3},     pages = {367--375},     title = {{Blah Blah 2}},     volume = {72},     year = {2004}     }     @article{Baumgardner2013a,     author = {Author, Second},     journal = {Energy Fuel},     month = dec,     number = {12},     pages = {7778--7789},     title = {{Blah blah}},     volume = {27},     year = {2013}     }     \end{filecontents*}          \begin{document}     \nocite{*}     \printbibliography     \end{document}


title: Historische Zeitschrift Style capitalizing first letter problem

text: I am using Historische Zeitschrift Style and the probem I have is that it capitalises some of the things it shouldn't. Let me try to explain. Here is my MWE:               \documentclass[a4paper,11pt]{scrartcl}     \usepackage[latin1]{inputenc}     \usepackage{csquotes}     \usepackage{blindtext}     \usepackage{filecontents}     \usepackage{hyperref}     \hypersetup{         colorlinks,          citecolor=black,          filecolor=black,          linkcolor=black,          urlcolor=black     }     \begin{filecontents}{\jobname.bib}      @incollection{athanasius1998,         Address = {Berlin/New York},         Author = {{Athanasius Alexandrinus}},         Booktitle = {Athanasius Werke - Die dogmatischen Schriften},         Call-Number = {TH: Vb 17.02-1.1.2},         Date-Added = {2010-10-16 13:24:30 +0200},         Date-Modified = {2014-03-13 17:12:32 +0000},         Editor = {Marin Tetz and others},         Keywords = {source},         Pages = {109-175},         Publisher = {Walter de Gruyter},         Read = {No},         Series = {Urkunden zur Geschichte des Arianischen Streites 318-328},         Shortauthor = {Ath.},         Shorttitle = {Ar. 1},         Title = {Oratio I contra Arianos},         Volume = {1, Tl. 1, Lfg. 2},         Year = {1998}}     @incollection{evagrius2011,         Address = {Paris},         Author = {{Evagrius Scholasticus}},         Booktitle = {{\'E}vagre Le Scholastique: Histoire Eccl{\'e}siastique - Livres I-III},         Call-Number = {TH: Va1.05/542},         Date-Added = {2013-08-24 12:11:20 +0000},         Date-Modified = {2014-03-30 11:54:31 +0000},         Editor = {Joseph Bidez and Leon Parmentier},         Keywords = {source},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {Evagr.},         Shorttitle = {h.e.},         Title = {Historia ecclesiastica},         Volume = {542},         Year = {2011}}     \end{filecontents}     \usepackage[ngerman]{babel}     \usepackage[style=historische-zeitschrift, maxnames=2, hyperref=true, backref=true, backrefstyle=none, backend=bibtex,idemtracker=true]{biblatex}     \bibliography{\jobname}     %     \makeatletter     \renewbibmacro*{footcite}{%       \global\boolfalse{cbx@loccit}%       \global\boolfalse{cbx@seenote}% NEW!       \ifciteseen         {\iffieldundef{shorthand}            {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}               {\usebibmacro{footcite:ibid}}               {\usebibmacro{footcite:note}}}            {\usebibmacro{footcite:shorthand}}}            {\iffieldundef{usera}              {\usebibmacro{footcite:full}}{\printnames{author}%            \setunit{\addcomma\space}%            \printfield{title}\isdot%              {\setunit{\addcomma\space}%               \usebibmacro{in:}%               \printfield{usera}%               \setunit*{\addspace}%               \printfield[default]{volume}}}}          \usebibmacro{footcite:save}}     \makeatother     %     \begin{document}     \blindtext\footcite[See][S. 56]{athanasius1998}     \blindtext\footcite[See][S. 22]{evagrius2011}     \blindtext\footcite[See][S. 11]{athanasius1998}     \blindtext\footcite[See][S. 12]{evagrius2011}     \end{document}      When I compile that this is what I get: ![enter image description here](http://i.stack.imgur.com/VR5wo.png) The letter "W" (marked with the red arrow) should here be small but because `Shorttitle` of that entry has a dot at the end (h.e.) it capitalises the first letter in the brackets. If you compare it with the previous entry (Ar. 1) you will notice that that one doesn't have capital "W". So how do I make it stop capitalising "W"? Thanks in advance for your help!


title: Exclude listings from LoL

text: Is there a way to exclude a specific listing from being printed in the LoL? I put one in a figure environment for the sake of not being printed on two seperate pages. But now I have the figure as well as the listing in the toc               \documentclass{article}          \usepackage{tikz}     \usepackage{listings}               \begin{document}     \lstlistoflistings     \listoffigures     \begin{figure}     \begin{lstlisting}[caption=Listing]          \end{lstlisting}     \caption{Figure}     \end{figure}          \end{document}      **Update:** I used this to have a special listing caption for all _real_ listings.               \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{%       \parbox{\textwidth}{\colorbox{gray}{\parbox{\textwidth}{\bf\sffamily\smaller#1#2#3}}\vskip-1pt}}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white}


title: Subfigures not appearing on a same line

text: > **Possible Duplicate:**   >  Multiple subfigures not appearing on the same line I have tried this code to put two images with together under a same caption. The subfigures do not appear on the same line. Moreover, even in the table of content they are presented as different tables, separately.               \documentclass{article}     \usepackage[demo]{graphicx}     \usepackage{caption}     \usepackage{subcaption}         \blindtext \blindtext \blindtext         \begin{figure}                 \centering                 \begin{subfigure}[b]{0.5\textwidth}                         \centering                         \includegraphics[width=\textwidth]{C:/Thesis/Latex/thesis_1(1)/Figur/study.jpeg}                 \rule{35em}{0.3pt}                         \caption{the distribution of the nodes in the study site}                         \label{fig:sensor3}                 \end{subfigure}%                     \hfill                  \begin{subfigure}[b]{0.48\textwidth}                         \centering                         \includegraphics[width=\textwidth]{C:/Thesis/Latex/thesis_1(1)/Figures/coord.jpeg}                    \rule{35em}{0.3pt}                         \caption{the coordinates of nodes according to the Swiss coordinate system}                         \label{fig:tiger}                 \end{subfigure}                 \caption{The Grand St. Bernard wireless sensor network deployment} \label{fig:Sensor}            \FloatBarrier         \end{figure}         \end{document}      Problem happened in plotting: ![enter image description here](http://i.stack.imgur.com/ZTBWl.png)


title: Offset in page numbers in pdf viewer due to roman numbering of frontmatter makes printing difficult

text: My PDF document generated with LaTeX has roman numbering for the frontmatter. My problem is: if I want to print a certain range of pages, it is very difficult to select them, because my PDF Viewer (`Skim.app` or `Preview.app` in `MacOS X 10.6.8`) seems to count the pages from the beginning of the PDF (1 = first page of PDF), but it displays the correct page numbers of the document (so page 1 is the first page of the mainmatter). Is there a way to solve this so that the page numbers displayed are the same like those I have to enter in the printing dialog? Here is a simple example:               \documentclass{scrbook}          \usepackage{hyperref}          \begin{document}          \frontmatter          \section{Here starts the Frontmatter}     text frontmatter          \mainmatter          \section{here starts the mainmatter}          text mainmatter: in my PDF viewer this is page 1, but when I would like to print it, I'd have to print page 3 (selecting page 1 in the print dialog would print page i, the first page of the PDF)          \backmatter          \section{here comes the backmatter}     text backmatter          \end{document}


title: problem with installling texlive in windows 7

text: I am new to latex. I am trying to install Texlive in my windows PC. But I am facing the following problem.![Partial download of ..... is found, removing it](http://i.stack.imgur.com/CmbwE.png) The installation is in the same stage for more than one hour, but no change. I tried googling, no solutions found. Any help would be really appreciated. Thanks,


title: Trouble manually controlling endfloat's ToC and header behavior

text: In my thesis, I would like to have   * each figure and table on its own page at the end of each chapter (easy with `endfloat`)   * The first figure of each chapter begins its own section that goes into the ToC, but no section title appears in the actual document.   * same as the previous point, but with tables   * the page header for the figure and table sections reflects the change Either I end the document with `\processdelayedfloats` and:   * the header correctly changes with the Tables section, but Tables stays in the header into the Figures section   * the ToC shows neither Tables nor Figures. Or I uncomment the last few lines and:   * the Tables header continues into the new section for 1 page, then changes to the new section   * the ToC gets updated, but the page numbers for Figures and Tables are both the first non-float page.   * `hyperref` links the Figures and Tables ToC entries to neither the page listed nor the first table/figure. For as awesome the idea of the `endfloat` package is, it seems to be poorly implemented in my opinion. Any help in this problem (as well as understanding how this package works) would be appreciated. MWE:               \documentclass[oneside]{memoir}          \usepackage[nolists,nomarkers,noheads,tablesfirst]{endfloat}     %%%%%%%%%%%%% stop endfloat from marking both headers %%%%%%%%%%%%%          \usepackage{etoolbox}             \makeatletter             \patchcmd{\efloat@process}{\markboth}{\@gobbletwo}{}{}             \makeatother         \AtBeginTables{\addcontentsline{toc}{section}{Tables}\markright{Tables}}         \AtBeginFigures{\markright{Figures} \addcontentsline{toc}{section}{Figures}}          \usepackage{lipsum}          \makepagestyle{mainMatter}     \makeoddfoot{mainMatter}{}{\thepage}{}     \makeoddhead{mainMatter}{\leftmark}{}{\rightmark}     \makeheadrule{mainMatter}{\linewidth}{\normalrulethickness}     \makepsmarks{mainMatter}{%         \nouppercaseheads         \createmark{section}{right}{nonumber}{}{. \ }         \createmark{chapter}{left}{shownumber}{Chapter }{: \ }}          \usepackage{hyperref}          \begin{document}     \tableofcontents*     \pagestyle{mainMatter}     \chapter{My Chapter}     \section{My Section}     \lipsum[1]     \begin{figure}     \centering     \fbox{{\HUGE a figure}}     \caption{A Figure placed here}\label{fig:a fig}     \end{figure}     \lipsum[1]     \begin{table}       \centering       \caption{Cool table}         \begin{tabular}{lc}        A  & 100 \\        B & 41 \\        C  & 17 \\        X?!  & 0 \\         \end{tabular}       \label{tab:my table 1}     \end{table}          \begin{figure}     \centering     \fbox{{\HUGE another figure}}     \caption{A Figure placed here}\label{fig:a fig 2}     \end{figure}          \begin{table}       \centering       \caption{boring table}         \begin{tabular}{c|c}     A & B \\         \end{tabular}       \label{tab:my table 2}     \end{table}     \lipsum[1]     \processdelayedfloats     \section{Frustrated}     Note that if you uncomment the line below, suddenly the ToC gets updated (incorrectly) and the next page has a new header.     \lipsum[1-8]          \end{document}


title: pgfplotstable: not printing string type values

text: I have some data in a csv file I wanted to turn into a table, but pgfplotstable does not print any `string type` values. All I'm getting is the numbers, but I also need those string values. The example is from here. ![table with stuff missing](http://i.stack.imgur.com/djVtX.png) MWE:               \documentclass{article}          \listfiles     \usepackage{filecontents}     \usepackage{pgfplotstable}          \begin{filecontents}{data.csv}     Name,Surname,Age     Albert,Einstein,133     Marie,Curie,145     Thomas,Edison,165     \end{filecontents}          \begin{document}          \begin{tikzpicture}     \pgfplotstabletypeset[         col sep=comma,         header=has colnames,         columns={Name,Surname,Age},         columns/Name/.style={column type={c|},string type},         columns/Surname/.style={column type={c|},string type},      ]{data.csv}          \end{tikzpicture}     \end{document}


title: Need a new command that modifies the uppercase letters in its argument

text: I was trying to write a new command for expected value operator, such that if its argument is a uppercase letter then it will replace it with a `\mathrm` one, e.g. from `E(X)` to `E(\mathrm{X})`; and will expand lowercase letter as is. For a single letter, I can simply do the following               \documentclass{article}     \usepackage{mathtools}          \newcommand{\E}[1]{\mathrm{E}     \lparen     \ifnum `#1=\uccode`#1     \mathrm{#1}     \else #1     \fi     \rparen}          \begin{document}          \[\E{X}\]          \end{document}      However, if the input is a series of characters, say `e^{tX}`, this methods will blunder. I'd like to know if there is a method to check the "uppercaseness" of an argument and modify it accordingly. **Remark** : This command is only for notation of random variables, so I still want uppercase letter italic elsewhere.


title: Undefined control sequence \oiiint

text: I am trying to generate the triple integral in the following equation (The preamble is large, due to other requirements)               \documentclass[11pt,headings=small,fleqn]{scrreprt} % highest level is chapter     %\documentclass[12pt,journal,compsoc]{report}     \usepackage[Glenn]{fncychap} %To add a rectangle at the beginning of each chapter     \usepackage[greek,english]{babel} % for English text only     %\usepackage[ngerman]{babel} % for German text only     %\usepackage{ngerman}        % for German text only     \usepackage{mathtools}    %To split equations     \usepackage{amsmath}     \usepackage{esint}     \usepackage{mathdesign}     \usepackage[ansinew]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{rotating}     \usepackage{multirow}     \usepackage{microtype} % improves font spacing, needs pdfTEX >= 1.20     \usepackage{hyperref}  % hyperlinks          \usepackage{graphicx}     \usepackage{subfigure}          \usepackage{makeidx}         \begin{flalign}         \frac{\partial}{\partial t}\oiiint \rho dv + \oiint \rho \stackrel{\rightarrow}{V}\cdot \stackrel{\rightarrow}{ss}=0         \end{flalign}      But I keep getting the error `undefined control sequence \oiiint` Can any one help please?


title: absolute position changing in TikZ environments

text: I am working on slides in beamer with a modified version of the Torino theme. When drawing with TikZ, the absolute positioning seems to not work as expected. In particular, when I have two tikzpicture environments and I reference back to the previous one from the latter, the coordinates are off.               \begin{frame}       \begin{tikzpicture}[overlay, remember picture]         \coordinate (topcorner) at (0,0);         \coordinate (rightcorner) at (5,-2);         \coordinate (bottomcorner) at (3,-2);         \draw (topcorner) -- (rightcorner);       \end{tikzpicture}%            \begin{tikzpicture}[overlay, remember picture]         \draw (topcorner) -- (bottomcorner);       \end{tikzpicture}     \end{frame}      Specifically, the line in the second tikzpicture is drawn lower than it should be, corresponding with the spacing for the paragraph between the tikzpicture environments. The first line is drawn on (0,0) -- (5,-2) whereas the second line more or less corresponds with (0.95,0) -- (3.95,-2). If there is no paragraph or newline between the environments, then the problem does not occur. Furthermore, the problem does not occur in a blank LaTeX document (i.e. there does not appear to be anything at fault with the above code), nor does it occur when I revert to the clean Torino theme. Apparently, some of the alterations that I have made seem to have an effect on the absolute positioning of TikZ. However, even after considerable effort, I am not able to create a minimally working example. This makes it hard to pinpoint whether some package, option, custom command ... is at fault. Hence my question: Which settings/packages/options/ ... might affect the absolute positioning in TikZ from not working as expected? Any plausible causes? I seem to remember having the very same problem a couple of years ago, though I fail to remember whether the problem was ever resolved back then. **edit with an MWE** After solving the problem, finding an MWE is trivial. To keep my slides nice and clean, I tend to use a large auxiliary file that loads the required packages, defines some useful commands ... . The structure is as follows: I have a file preamble.tex containing               \documentclass{beamer}     \usepackage{tikz}      Furthermore, the actual file (e.g. slides.tex) has the following lines:               \include{preamble}          \begin{document}       ... (the frame defined above)     \end{document}      This does not work however and causes the absolute positioning of TikZ to fail.


title: pythontex - reading data from a file

text: This is about a file location problem while using `pythontex` (which works great!) I have some python code within `\begin{pylabblock} \end{pylabblock}` where I am reading in data from a file in the current directory ## code fragment               filename = str(os.getcwd()+'/testdata1.dat')          x = xyread(filename)[0]     y = xyread(filename)[1]      the `xyread` fails - it cannot find the file in the `getcwd()` BUT if I place a copy of the `testdata1.dat` in a subdirectory that `pythontex` creates during compile, it works (my tex file is named `test3.tex` and `pythontex` creates `pythontex-files- test3/` and if `testdata1.dat` is in that directory, it works)


title: Difference between [h] and [H] in float position

text: I'm trying to choose the positions of my tables but I can't figure out the difference between `[H]` and `[h]`. I've seen both advised over my search. If I use `[h]` the row spacing is different than `[H]` use.


title: Indentation in footnote

text: I have a small Problem with indentation in LaTeX footnotes:                  \documentclass[draft,12pt,a4paper]{article}        \usepackage[footnote,printonlyused]{acronym}        \begin{document}        foo\footnote{foo: this footnotetext explaines what foo is}        bar\footnote{bar: this very very very very very very very long text explains in  two lines what bar is, it would be nice if this line is indented behind the colon, starting below the 'this'}        \end{document}      As you can see in the example, I repeat the word that has the footnote attached in the footnote again, everything works fine so far. But if I have too much text in the footnote, so that it spawns over more than one line in the footnotes, it looks 'wrong': the text in the second line starts at the beginning of the line, not as it should be below the first letter after the colon and the following space. How can I adjust the space in front of the second line, so that the text starts more towards the middle of the page? example as is at the moment:                    foo¹          bar²          -----------          ¹ foo: this footnotetext explaines what foo is          ² bar: this very very very very very very very long text explains in  two lines what bar          is, it would be nice if this line is indented behind the colon, starting below the 'this'      example as it should look:                    foo¹          bar²          -----------          ¹ foo: this footnotetext explaines what foo is          ² bar: this very very very very very very very long text explains in  two lines what bar                 is, it would be nice if this line is indented behind the colon, starting below                  the 'this'


title: bibtex ignores MACROs in bst style

text: So I created my custom bst file using "latex makebst" it mostly works fine and I slowly get a rudimentary hang how the .bst thing works. Mostly thanks to this guide http://ftp.univie.ac.at/packages/tex/info/bibtex/tamethebeast/ttb_en.pdf However, my months are not replaced. For example I want {feb} to be replaced with Feb. Notice the capital F and the dot. There are entries in the file like MACRO {feb} {"Feb."} but they seem to be ignored. I also tried some of the journal macro abbreviation but bibtex seems to ignore them too. PS: Also for example plain.bst defines MACRO {feb} {"February"} but month = {feb}, from the bib database keeps being just "feb" What could I be doing wrong?


title: Multiple slides on one frame beamer

text: I am doing a presentation for my thesis. I need to put a many slides by section or subsection (I mean by frame) and in each slide I put the text that I need. Any help please!


title: About "markdown" like syntax in latex

text: What I mean with markdown like syntax, is for example using `*...*` or `**...**` instead of `\emph{...}` or `\(...\)` or `\begin{blabla}...\end{blabla}`. It seems to be possible to use this "markdown" kind of syntax in latex:               \catcode`\*=\active     \def*#1*{\emph{#1}}      There are many _subjectives_ reasons why one may prefer the one or the other. One may argue that `*...*` is more readable, someone else may find `\emph{...}` better readable. One may say it is more clear what is the beginning and what is the end with LaTex syntax, the other may say that you must blind if you don't understand what is the beginning and the end with `*...*`. I would like to understand if there are any _objective_ reasons to not use these "markdown like" commands in LaTeX ? I thought that LaTeX may be not really designed to process those kind of commands that doesn't have a clear beginning and end and therefore may cause errors ? Or is it totally fine to use this kind of syntax ? Another question is, could I somehow define `...` in LaTeX ? I tried:               \catcode`\`=\active     \def`#1`{\emph{#1}}      But this doesn't work.


title: The pdf generated by xetex cannot be "copy-and-paste"

text: I just began to use xelatex generating my resume. As a matter of fact, I want the generated pdf file to be searchable, and the contents can be "copy-and- paste". But some parts of the pdf can be well searched and copied, while some other contents would become "concatenation" of all characters without spaces after copy-and-paste and the rest would be unable to be searched or copied. When I describe it as "some.. and some...", it because these phenomenona seem to have no pattern. Worse still, when I merge two pages of resume into one file, all of the contents are unable to be searched and copied. Here is an example: The original PDF-- ![enter image description here](http://i.stack.imgur.com/BK1Qa.png) The copy-and-paste result in TextEdit: ![enter image description here](http://i.stack.imgur.com/zcO4n.png) in which the first line does not have any space, and the second does not even have the first character, but the other lines are ok. And if I merge two of this kind of pdf files together and then copy-and-paste the same paragraph, I will have: ![enter image description here](http://i.stack.imgur.com/GOhg8.png) By the way, I am using Mac OS 10.9 with XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012). There are two kinds of warnings popping up while generating the pdf:               *************************************************     * LaTeX warning: "xparse/redefine-command"     *     * Redefining document command \textsubscript with arg. spec. 's' on line 25.     *************************************************      and several               Underfull \hbox (badness 10000) in paragraph at lines      And the header of the tex file is borrow from other's template, which is quite simple:               \documentclass[letterpaper,12pt]{article}     \usepackage[margin=0.7cm,vmargin=0.7cm]{geometry}     \usepackage{float}     \usepackage{fontspec}     \usepackage{xltxtra}     \usepackage{setspace}     \defaultfontfeatures{Ligatures={TeX}}     \setmainfont[BoldFont={* Bold},ItalicFont=Adobe Jenson Pro Italic]{Adobe Jenson Pro}     \setsansfont[BoldFont={* Bold}]{Futura Std}     \newfontfamily\condensed{Adobe Caslon Pro}     \singlespace     \setlength{\parindent}{0mm}     \usepackage{color}     \definecolor{lightgrey}{gray}{0.65}     \definecolor{grey}{gray}{0.3}     \begin{document}     ....     \end{document}      Thanks in advance...


title: Reading (input) a file whose name is created with a label

text: I don't want to get into the details of why I want to do this, but I would like to:   * create a new counter called `filenumber`;   * create a file whose filename is `\jobname\thefilenumber.txt` and write to it;   * read (input) the content from that file. Here's my mwe:               \documentclass[11pt]{article}          \usepackage{newfile}          \newcounter{filenumber}     \newoutputstream{outputfile}          \newcommand{\createoutputfile}[2]{%       \refstepcounter{filenumber}\label{#1}            \openoutputfile{\jobname\thefilenumber.txt}{outputfile}       \addtostream{outputfile}{#2}       \closeoutputstream{outputfile}     }               \begin{document}          \createoutputfile{timmyfile}{Hello world!}          Timmy, what would you like to tell the world?          Timmy's answer has been written to:\\     {\ttfamily \jobname\ref{timmyfile}.txt}          Timmy's answer: \input{\jobname1.txt}          %% The following does not work     \makeatletter     %{\@@input \jobname\ref{timmyfile}.txt}     \makeatother          \end{document}      I know that `\input` isn't expandable, but even using TeX's `\@@input`, I can't manage to input the file if I try to construct the filename using the label created earlier. Uncommenting the `\@@input` line actually has the perverse effect of creating 50 identical files (numbered from 1 to 50) containing "Hello world!". If I use `\include` instead of `\input` to trace what is happening, the .aux file contains the following:               \relax      \newlabel{timmyfile}{{1}{1}}     \@input{stackexchange_read_filename_from_ref1\hbox {}.txt.aux}      It seems that the reference is being expanded to `1\hbox {}`. Could this be the issue? How can I fix this and input a file whose filename is created using a label in such a way?


title: Using a table: alignment issues and cell labels

text: I'm using tables with the `tabular` environment, with cells containing `tikzpicture`. I would like to center the contents of the cells both vertically and horizontally, and have little labels in the top left corner of each cell. As far as I've looked, the alignment problem is fixable with some tweaks, such as `\setlength\extrarowheight{..}` before the table, and `[..]` after line breaks inside the table. The `\def\arraystretch{..}` approach also works to give more padding, but in a way that I don't fully understand, so I'm not using that. This is my current code of a table of graphs:               \documentclass{article}     \usepackage{array,tikz}          \tikzset{nnode/.style={circle,draw=black,inner sep=1.4pt,fill}}          \begin{document}          \setlength\extrarowheight{3pc}     \begin{tabular}{|>{\centering\arraybackslash}m{7pc}                     |>{\centering\arraybackslash}m{7pc}                     |>{\centering\arraybackslash}m{7pc}|}     \hline\begin{tikzpicture}     \node[nnode] (a) at (0,0){};     \node[nnode] (b) at (1,0){};     \draw (-.5,0) circle (.5);     \draw (1.5,0) circle (.5);     \draw (a) to (b);     \end{tikzpicture}     &     \begin{tikzpicture}     \node[nnode] (a) at (0,0){};     \node[nnode] (b) at (1,0){};     \draw (-.5,0) circle (.5);     \draw (1.5,0) circle (.5);     \draw (a) to (b);     \end{tikzpicture}     &     \begin{tikzpicture}     \node[nnode] (a) at (0,0){};     \node[nnode] (b) at (1,0){};     \draw (-.5,0) circle (.5);     \draw (1.5,0) circle (.5);     \draw (a) to (b);     \end{tikzpicture}     \\[2pc]\hline     \begin{tikzpicture}     \node[nnode] (a) at (0,0){};     \node[nnode] (b) at (1.5,0){};      \draw (.75,0) circle (.75);     \draw (a) to (b);     \end{tikzpicture}     &     \begin{tikzpicture}     \node[nnode] (a) at (0,0){};      \node[nnode] (b) at (1.5,0){};      \draw (.75,0) circle (.75);     \draw (a) to (b);     \end{tikzpicture}     &     \begin{tikzpicture}     \node[nnode] (a) at (0,0){};      \node[nnode] (b) at (1.5,0){};      \draw (.75,0) circle (.75);     \draw (a) to (b);     \end{tikzpicture}     \\[2pc]\hline     \end{tabular}          \end{document}      The result is this: ![enter image description here](http://i.stack.imgur.com/uaZwI.png) I have several issues with this.   * Why are the elements of the last column displaced? I think this might have to do with the `[2pc]` I have at the end of the rows, but I'm not sure. The general placement of the graphs isn't centered either, but I've found that alignment in tables is a common issue, and probably the horizontal and vertical alignment of a `tikzpicture` has been resolved somewhere (a link to such a place would be appreciated!), so I won't focus on that.   * How could I put in labels in each top left corner of each cell? I would want each of the labels to be individually editable, with the end result looking something like this (of course, with the graphs centered both vertically and horizontally): ![enter image description here](http://i.stack.imgur.com/C4aH9.png) I know that there are several other packages for making tables (and making tables with `tikz` seems too cumbersome), but I couldn't decide which one was suited best for this. I've thought of padding the cells instead of centering (a mix of both which I've used here), but again, no one approach solves all my queries. Any and all tips pertaining to these problems are appreciated!


title: Chapters on odd pages in single-sided document

text: I must use the `book` class but I want the same margins in all pages, so I wrote:               \documentclass[oneside]{book}      However, I still need the chapters to begin on odd pages. Is it possible?


title: Rotated xymatrix takes up too much space

text: When I do this...               \documentclass{minimal}     \usepackage[all]{xy}          \begin{document}     This text should come directly before the diagram.     \[ \xymatrix@ru{     \bullet \ar[rd] \ar[d] \\     \bullet \ar[r] \ar[rd] & \bullet \ar[rd] \ar[d] \\     & \bullet \ar[r] \ar[rd] & \bullet \ar[d] \\     & & \bullet     } \]     This text should come directly after the diagram.     \end{document}      ... there is a bunch of empty space between the bottom of the diagram and the second line of text. When I remove the `@ru`, it becomes apparent that the rotated `xymatrix` is taking up the same amount of vertical space as the unrotated one, even though the rotated matrix is much smaller vertically. Is this a bug, or a feature? Either way, how can I prevent this behavior?


title: Placing Works Cited (or references) in another document

text: I have a document which uses the standard `\cite` to cite a reference. At the end of my document, I have a `\bibliography` to place the **References** section there. However, the fellowship I'm applying to asks to submit the essay and references in different documents. Is there any way I can split the two from each other. That is to say, have the essay on one document, and the references on another? There is one way I can think of doing this but it doesn't use LaTeX. I have a software that can print anything to PDF. I can use it to print the essay pages to a PDF and name it `Essay.pdf`, and then use it to print only the references seciton to PDF and name it `Works_Cited.pdf`. I didn't know what Tags this question fell under, so I apologize if I chose the wrong tags.


title: Change subsection number increment from .1 to .01 -eg 1.02,1.03, etc

text: As the title states, I would like the subsections to increment by .01 instead of .1. Any help would be greatly appreciated. thank you.               \documentclass[]{article}          \begin{document}          \title{APA Ethics Code}     \author{Author}     \date{Today}     \maketitle          \section*{Preamble}     Psychologists are committed to increasing scientific and professional knowledge of behavior and people's understanding of themselves and other antd to the use of such knowledge to improve the condition of individuals, organizations,a and society.  Psychologists respect and protect civil and human rights and the central importance of freedom of inquiry and expression in research, teaching, and publication.  The strive to help the public in developing informed judgements and choices concerning human behavior.  In doing so, they perform many roles, such as researcher, educator, diagnostician,therapist, supervisor, consultant, administrator, social interventionist, and expert witness.  The Ethics Code provides a common set of principals and standards upon which psychologists build their professional and scientific work.          This Ethics Code is intended to provide specific standards to cover most situations encountered by psychologists.  It has as its goals the welfare and protection of the individuals and groups with whom psychologists work and the education of members, students, and the public regarding ethical standards of the discipline.          The development of a dynamic set of ethical standards for psychologist's' work-related conduct requires a personal commitment and lifelong effort to act ethically, to encourage ethical behavior by students, supervisees, employees, and colleagues; and to consult with others concerning ethical problems.          \section*{General Prinicipals}     This section consists of General Principles.  General Principles, as apposed to Ethical Standards, as aspirational in nature.  Their intent is to guide and inspire psychologists toward the very highest ethical ideals of the profession.  General Principles, in contrast to Ethical Standards, do not represent obligations and should form the basis for imposing sanctions.  Relying upon General Principles for either of these reasons distorts  both their meaning and purpose.          \subsection*{Principal A: Beneficence and Nonmaleficence}     Psychologist strive to benefit those with whom they work and take care to do no harm.  In their professional actions psychologists seek to safeguard the welfare and rights of those with whom they interact professionally and other affected persons, and the welfare of animal subjects of research.  When conflicts occur among psychologists; obligations or concerns, they attempt to resolve these conflicts in a responsible fashion that avoids or minimizes harm.  Because psychologists; scientific and professional judgments and actions may affect the lives of others, they are alert to and guard against personal, financial, social, organizational, or political factors that might lead to misuse of their influence.  Psychologists strive to be aware of the possible effect of their own physical and mental health on their ability to help those with whom they work.          \subsection*{Principle B: Fidelity and Responsibility}     Psychologist establish relationships of trust with whom they work.  They are aware of their professional and scientific responsibilities to society and to the specific communities in which the work.  Psychologists uphold professional standards of conduct , clarify their professional roles and obligations, accept appropriate responsibility for their behavior, and seek to manage conflicts of interest that could lead to exploitation or harm.  Psychologists consult with, refer to, or cooperate with other professionals and institutions to the extent needed to serve the best interests of those with whom they work.  They are concerned about the ethical compliance of their colleagues' scientific and professional conduct.  Psychologists strive to contribute a portion of their professional time for little or no compensation or personal advantage.          \subsection*{Principle C: Integrity}     Psychologists seek to promote accuracy, honesty, and truthfulness in the science teaching, and practice of psychology.  In these activities psychologists do not steal, cheat, or engage in fraud, subterfuge, or intentional misrepresentation of fact.  psychologists strive to keep their promises and to avoid unwise or unclear commitments.  In situations in which deception may be ethically justifiable to maximize benefits and minimize harm, psychologists have a serious obligation to consider the need for, the possible consequences of, and their responsibility to correct any resulting mistrust or other harmful effects that arise form the use of such techniques.     \subsection*{Justice}      Psychologists recognize that fairness and justice entitle all persons to access to and benefit from the contributions of psychology and to equal quality in the processes, procedures, and services being conducted by psychologists.  Psychologists exercise reasonable judgement and take precautions to ensure that their potential biases, the boundaries of their competence, and the limitations of their expertise do not lead to or condone unjust practices.     \section*{ETHICAL STANDARDS}          \subsection{Resolving Ethical Issues}     \end{document}


title: Problem with \xymatrix in svjour3

text: I attempt to compile the following               \newcommand{\arb}[1]{\ar@<-.15ex>[#1]\ar@<.15ex>[#1]\ar@<-.075ex>[#1]\ar@<.075ex>[#1]\ar[#1]}     \[\xymatrix{     & \arb{rr}^<<<<{}="1"^g & & \arb{dr}_<<<<{}="5"^f &\\     \arb{ur}^h \ar[rr]^>>>>>>{}="2"_>>>>>>{}="3"^k \arb{dr}_c &\ar[ur]^d\ar[dr]_e & &\\     & \arb{rr}^<<<<{}="4"_b & &\arb{ur}^<<<<{}="6"_a &     \ar@{=>}"1";"2"^{T}     \ar@{=>}"3";"4"^{V}     \ar@/_.6pc/@{=>}"5";"6"^{U}     }     \;\qquad     \xymatrix{     &\arb{rr}^>>>>>>{}="1"^g\ar[dr] & & \arb{dr}^f &\\     \arb{ur}_>>>>{}="5"^h \arb{dr}^>>>>{}="6"_c & &\ar[rr]^<<<<{}="2"_<<<<{}="3"& &\\     & \arb{rr}^>>>>>>{}="4"_b  \ar[ur]& &\arb{ur}_a &     \ar@{=>}"1";"2"^{A}      \ar@{=>}"3";"4"^{C}      \ar@/^.6pc/@{=>}"5";"6"^{B}}     \]      and I get the error               [2][3]<xymatrix     !Missing $ inserted.     <inserted text>         $     l.157 }      When I hit "go to error" the space `\;\qquad` is highlighted. I'm using the header               \documentclass[draft]{svjour3}     \usepackage{amscd,amssymb} %amsxtra,amsmath}     \usepackage[pdftex]{hyperref}     \usepackage{natbib}     \input xy     \xyoption{all}     \usepackage[v2,cmtip]{xy}      Please help. I'm trying to prepare the manuscript for submission. Thanks in advance!


title: Inline code and short verb with minted

text: I it possible to use minted for inline code and to add a short verb sing for minted? Like `\lstMakeShortInline|` in `listings.sty`?               \documentclass{article}          \usepackage{minted}        \newminted{tex}{}        \newmint[ltx]{tex}{}          \begin{document}     Normal Text \ltx|\inline \Verb \not \inline|     \begin{texcode}     \Display \verbatim     \end{texcode}     Normal Text %|\not \working|     \end{document}


title: Giving a custom environment a name

text: I have defined a custom environment:               \documentclass[11pt]{article}     \usepackage[table,hyperref]{xcolor}     % Better control over color     \usepackage[colorlinks=true, linkcolor=DarkBlue, citecolor=DarkBlue, urlcolor=DarkBlue, breaklinks=true]{hyperref}          \usepackage[nameinlink]{cleveref}     \newcommand{\questid}[1]{\renewcommand{\givenquestid}{#1}}     \newcommand{\questtitle}[1]{\renewcommand{\givenquesttitle}{#1}}          \newcommand{\givenquestid}{REQUIRED!}     \newcommand{\givenquesttitle}{REQUIRED!}     \newcounter {questc}     \newenvironment{quest}%     {         \small         \rowcolors{1}{}{lightgray}     }%     {         \refstepcounter{questc}\label{quest:\givenquestid}         Something goes here.     }     \crefname{questc}{Quest}{Quests}     \begin{document}     \begin{quest}         \questid{1}         \questtitle{Collect wolf pelts}     \end{quest}     \end{document}      I'd like to use `\nameref` to reference the environment by title. That is, I'd like to have `\nameref{quest:1}` spit out a reference that reads: "Quest 1: Collect wolf pelts." How can I specify the name formatting within the custom environment?


title: Inline listings crash when argument ends in "Error" under the Python language

text: Well, this is honestly the strangest thing I've ever seen concerning LaTeX. A friend of mine encountered what I can only describe as a bug in `listings`; can it be resolved? See the minimal example below with errors.               \documentclass{article}          \usepackage{listings}          \lstMakeShortInline[language=Python]"          \begin{document}     "ThisIsAFakeError".     "ThisIsAFakeErro".     \end{document}      ## Error message:               ERROR: Missing } inserted.          --- TeX said ---     <inserted text>                      }     l.8 "ThisIsAFakeError".          --- HELP ---     TeX has become confused. The position indicated by the error locator     is probably beyond the point where the incorrect input is.               ERROR: Undefined control sequence.          --- TeX said ---     \lst@eaten ->".          l.8 "ThisIsAFakeError".          --- HELP ---     TeX encountered an unknown command name. You probably misspelled the     name. If this message occurs when a LaTeX command is being processed,     the command is probably in the wrong place---for example, the error     can be produced by an \item command that's not inside a list-making     environment. The error can also be caused by a missing \documentclass     command.


title: Defining procedures in algorithmic

text: Is there any support for procedures/methods in the `algorithmic` package? Of course one could use several algorithms to define each method/procedure however because LaTeX usually doesn't put more than three float environments on one page the environments have the bad behaviour to appear pages after they are mentioned. Perhaps there isn't a command that handles this, however I am quite sure there must be an elegant workaround.


title: Changing the font size

text: When I change my first line from               \documentclass{report}      to               \documentclass{report}[12pt]      the font size of the resulting pdf doesn't increase. I am using `pdflatex` to compile tex to pdf.


title: own bibliography style with biblatex

text: My bibliography has to look like this: > name, givenname; name2 ,givenname2: title. edition location : publisher, > Year. e.g. > Weck, Manfred; Brecher, Christian: Werkzeugmaschinen. 6.Auflage Berlin : > Springer, 2005. my `bib`-file looks like this:               @BOOK{weck,       title = {Werkzeugmaschinen},       publisher = {Springer},       year = {2005},       author = {Manfred Weck and Christian Brecher},       address = {Berlin},       edition = {6.Auflage}     }      my `tex` file like this:               \usepackage[backend=biber, bibstyle=alphabetic,  sorting=nyt]{biblatex}          \DeclareBibliographyDriver{book}{       \printnames{author}%       \setunit{\addcolon}       \newunit\newblock \printfield{title}%       \setunit{\adddot}       \newunit\newblock \printfield{edition}%       \newunit \printlist{location} %       \setunit{\addcolon}       \newunit \printlist{publisher}       \setunit{\addcomma}       \newunit \printfield{year}       \finentry}      but my bibliography looks like this > Manfred Weck and Christian Brecher. Werkzeugmaschinen. 6.Auflage Berlin. > Springer. 2005 So the name has to come first and if there are more than one author there has to be a `;` in between. semicolons and colons seem to be ignored, there's always a dot.


title: Height of figure + caption textheight

text: I have a figure with a 3 line caption. I would like to insert the figure as tall as possible. If I use               \includegraphics[height=\textheight]{file}      The figure is as high as the textblock and the caption is at the footnote position. Is it possible to set the height the figure, so the caption is aligned with the bottom of the textblock?


title: How come it always says \tikzlibrary{calc} is missing?

text: Whenever I put 2 trees onto a document, the system always tells me I am missing `\tikzlibrary{calc}` on the second tree (I have the same line for both trees) on this line `\draw[dashed,rounded corners=10]($(1-1) + (-.2,.25)$)rectangle($(2-2) +(.2,-.25)$);` even though I have it right above it.


title: pgfplots - Manual file (.pdf) asks me if I want to save the changes

text: Why does the manual for `pgfplots` have that prompt? I use it like every other file: I search for things, copy them, close it. That's it. The prompt is only for this very file.


title: amsthm environment and colorbox

text: I'd like to customize the `amsthm` command a little bit but I cannot find the relevant lines in the (undocumented?) .sty.   1. How can I put a colorbox on the _name_ of the environment              \newtheoremstyle{Coloredtheo}%     {3pt}    %Space above     {3pt}    %Space below     {}       %Body font     {}       %Indent amount     {\bf \colorbox{blue}}    %Theorem head font     {}       %Punctuation after theorem head     {0.25em} %Space after theorem head     {}       %Theorem head spec      where the blue box should be of the size of the theorem head.   2. how I can remove the brackets of the optional parameter `\begin{theorem}[Schwarz inequality]...` should not be (Schwarz inequality) but Schwarz inequality.


title: \eqref in italic math environnment

text: When using the `amsthm` package with the `\eqref` command, things may not be correct. When the main font of a theorem is italic, the `\eqref` is non-italic while `\ref` is italic. Please, see the provided code. Is all this consistent?               \documentclass[12pt,fleqn]{book}     \usepackage{amsmath,amsthm}     \newtheorem{theorem}{Theorem}     \begin{document}     \begin{equation}\label{eq:1}     \cos \pi=-1     \end{equation}     \begin{theorem} In Equation~(\ref{eq:1}) or in Equation~\eqref{eq:1}...     \end{theorem}     \end{document}


title: Adjusting vertical space between TOC entries using Beamer

text: I have a rather lengthy table of contents for a presentation. Beamer is not compressing the vertical space between TOC entries, but instead running the last item off the bottom of the output! Is there a way to control this spacing? I have tried               \begin{spacing}{0.9}     \tableofcontents     \end{spacing}      with the `setspace` package, but I don't think this is compatible with Beamer.


title: ToC figures and text overlap

text: I am using XeLaTeX and memoir to write a longer text with several parts, chapters and sections. When printing the \tableofcontents I get a spacing problem with 2-figure numbers almost overlapping the relevant section name, as per enclosed picture. I am aware that the memoir manual has a section dedicated to this theme, but the most part of it is doubledutch to me. Is there any easy way to avoid this problem? ![A partial view of my ToC](http://i.stack.imgur.com/C2U2R.png)


title: How do I select font for an environment?

text: I use `\usepackage{fouriernc}`. Now, I want to select the font `chancery` for theorem environment. How can I choose the font for an environment, for example, theorem environment?               \documentclass{book}     \usepackage{amsmath,amsthm}     \usepackage{fouriernc}     \newtheorem{theorem}{Theorem}     \usepackage{lipsum}     \begin{document}     \chapter{These Real Numbers}     \lipsum[1-2]     \begin{theorem}     \fontfamily{qzc}\selectfont\large     This is a theorem Pythagore     $$a^2 + b^2 = c^2.$$     \end{theorem}     \end{document}      How can I input `\fontfamily{qzc}\selectfont\large` at `\newtheorem{theorem}{Theorem}` before `\begin{document}`?


title: installing FontPro (support for Minion Pro, Myriad Pro, & Cronos Pro) with MiKTeX 2.9

text: The Minion Pro distribution available on CTAN seems to be out of date. One issue with `pdftex` was reported on this question (`$\epsilon$` is undefined using MinionPro). The most up-to-date scripts (see Christian Clason's answer) can be found found at: https://github.com/sebschub/FontPro/ I'm currently using MiKTeX 2.9, and would like to know if there is a set of instructions for installing the new scripts on Windows. `xelatex` doesn't require FontPro obviously, but I wish to stick to `pdftex` so use can be made of `microtype`.


title: How do I prevent a command from being invoked by a user while not disabling it?

text: Let's say I'm working on a LaTeX document collaboratively with someone else. I have defined a bunch of command aliases (such as `\true` for `\top` and `\false` for `\bot`); their precise purpose doesn't matter for this TeX.SE question, but it's partly to make it easy for us to use "working macros" while fine-tuning things under the hood independently (e.g., there are different ways of representing the two boolean values in math and computer science, and perhaps I want to easily change this stylistic decision later on). Also, I think that some commands shouldn't be used by others (or me), because they might be outdated, dangerous, etc. What is the most elegant way to prevent a command or a set of commands from being directly invoked by users? I understand that loaded packages might still rely on them, so a starter might be something like               \makeatletter     \let\hardtoinvoke@commandname\commandname       \renewcommand{\commandname}{}     \makeatother      after all packages are loaded (the `@` ensures that users cannot easily invoke this macro). What caveats are there? What is the cleanest way of disabling some commands for "direct" use? For the sake of having an example, let's say we want to do this for a 0-argument macro such as `\top` as well as something with a more complicated argument structure such as `\raisebox`. Can one easily generalize this to some sort of very general `\hidecommand` command? Update 1: Also, without the `\let`-line, the macro really will not be usable by others (is that right?). Update 2: The `\let`-`\def` difference might actually make what I want _impossible_ , because for `\def`, things will be looked up at the time of use, not the time of definition. Thus, loading any package that uses `\def...\commandname...` somewhere inside would have the consequence that I won't be able to disable `\commandname` without breaking things, is that right? I'm asking because there might be clever `@`-tricks (perhaps something that invokes an error message only if called outside of an `@`-environment), but I feel that a proper solution might not be easy.


title: Funny stuff in a Beamer title irreparably messes with the PDF metadata

text: I have the following `beamer` presentation:               \documentclass{beamer}     \usepackage{hyperref}          \title{%     \parbox{.25\textwidth}{funny}%     \parbox{.5\textwidth}{Real Title}%     \parbox{.25\textwidth}{stuff}}          \hypersetup{pdftitle={Real Title}}          \begin{document}     Hello, World!     \end{document}      and no matter what I try (removing `hyperref` and using `\pdfinfo`, for example), the title always comes out as the entire ASCII portion of the `\title`, less control sequences: > .25funny.5Real Title.25stuff Is there no way to _absolutely_ set the title of the PDF using only LaTeX? (I know metadata editors exist, but this could be considered a bug in some lines of thought.) * * * I should note that the problem is not reproducible in `article`.


title: Is it possible to embed source code in a regular text with "listings"?

text: I want to write something like               In order to avoid a RuntimeException      where `RuntimeException` appears with a code font. I've tried something like               \begin{lstlisting} In order to avoid a RuntimeException \end{lstlisting}      but it was of no avail. Any suggestions? If it isn't possible, could anyone point out what's the font being used by default by `listings`?


title: Draw a spiral on a sphere

text: My goal is to visualize **_damped magnetic precession_**. Wikipedia features an image, but it doesn't quite capture one essential constraint. Namely, that the magnetization **M** should be normalized. So the curve shown in the following picture should lie on the sphere. ![damped precession](http://upload.wikimedia.org/wikipedia/commons/e/ec/Damped_Magnetization_Precession.jpg) So what I want to show is:   * The vectors **M** and **H_eff** with **M** on the sphere.   * A spiral lying on a sphere.   * **-M x H_eff** being orthogonal to **M** and **H_eff**   * **M x dM/dt** pointing towards **H_eff** (This is not exactly correct, but rather an approximation). The tangent of the spiral at the endpoint of **M** should be a linear combination of **MxdM/dt** and **-MxH_eff** (to be more exact: **alpha MxdM/dt - MxH_eff** for some positive alpha), so the picture on Wikipedia looks fine concerning this requirement. I have found a similar picture in the following answer: http://tex.stackexchange.com/a/56617/50081 How can this be achieved with any of the modern plotting tools for LaTeX? **Edit:** As Christian pointed out one could start by generating the spiral via projection of a flat spiral. This is my first try using pgfplots.               \documentclass{minimal}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \xdef\w{10}          \begin{axis}[%         axis equal,         axis lines = none,         xlabel = {$x$},         ylabel = {$y$},         zlabel = {$z$},         enlargelimits = 0.5,         ticks=none,     ]         \addplot3[%             opacity = 0.2,             surf,             z buffer = sort,             samples = 21,             variable = \u,             variable y = \v,             domain = 0:180,             y domain = 0:360,         ]         ({cos(u)*sin(v)}, {sin(u)*sin(v)}, {cos(v)});              \addplot3+[color=blue,domain=0:4*pi, samples=100, samples y=0,no marks, smooth](             {x*cos(deg(x))/sqrt(\w*\w+x*x)},             {x*-sin(deg(x))/sqrt(\w*\w+x*x)},             {\w/sqrt(\w*\w+x*x)}             );     \end{axis}     \end{tikzpicture}     \end{document}


title: Citing webpage with ~ in address

text: Here is the exact webpage I want to cite:                   \bibitem{BrouwerSRG}A. Brouwer.         Strongly Regular Graphs table         http://www.win.tue.nl/~aeb/graphs/srg/srgtab1-50.html         \filbreak      Now, if I type this in and compile, the `~` does not show up at all. A professor recommended using `$\sim$aeb` and then later said he was mistaken to use that and instead I should use `\~{}aeb`. When I use `$\sim$aeb`, it seems to look correct, though perhaps the `~` is a little big. If I use `\~{}aeb`, it does not look right at all, it looks like a superscript `~`. If I do `\~aeb` only, it puts the `~` above the `a`, so definitely not right. I don't know much about bibliographies, but I'm just using `\begin{thebibliography}{45}` to start up my references, in case that matters. Any ideas?


title: Two rotated tables in one page

text: I'm writing a paper using the `IEEEtran` style, which uses two column per page. At some point, I had to make some two big tables, so I used `\sideways` to rotate them. The pages' height fill all available space, but they are thin, and I could (and should) put two of them in the same page. I'm defining my tables like this:               \begin{table*}[h]       \centering       \caption{Performance of Second Based Operators applied to the clown image.}       \label{tab:sodclown}         \begin{sideways}       \begin{tabular}{ ccc }       ...       \end{tabular}       \end{sideways}     \end{table*}      How can I do so that they are in the same page if it is possible?


title: Q: tikz tree using mindmap library

text: Is there an easy possibility to achieve a simple tikz tree using it's own mindmap library?


title: Place "see also" after page numbers in index

text: I'm creating an index using makeidx. When I have a "see also" cross-reference in an entry, I want it to appear _after_ the listing of page numbers. But instead it appears _before_ the listing. Here's what I want the output currently looks like: > quantifiers _see also_ numbers, cardinal, 2 Here's what I want the output to look like: > quantifiers 2, _see also_ numbers, cardinal Is there a straightforward way to change this behavior, say, in my index style file?


title: How can I compile different .tex file on click on typeset in TeXShop? (MacTeX 2011)

text: My problem is that I want to have different `.tex` files for the preamble, the presentation aroundings (my target is a `beamer` PDF file) and the content of the presentation. Mostly I'll be working on the content file. I even think about partitioning this content `.tex` file into several chapter files for a better overview. My problem with this solution is that I have to open the `presentation.tex` file to typeset the whole `beamer` PDF for looking at the results of my previous changes on the content files. (My `presentation.tex` file includes the preamble and the content.) Is there any way to get TeXShop to always typeset one particular file (my `presentation.tex`) although I'm currently working on a different one (e.g. the `content.tex`)? A shortcut? A command in the `.tex` file? An option in TeXShop? Anything?


title: Biblatex: Per-entry changes to citation field

text: This should be a relatively quick question. I'm using Biblatex's authoryear(-icomp, not that that really matters here) citation style, but there are a small number of works where the author-year format makes no sense, and I'd rather have them show up as author-title. For example, I would like that for the following bibliography entry               @BOOK{JahizBayaan,       title = {al-Bayān wa-al-tabyīn},       author = {al-Jāḥiẓ, Abū ʻUthman ibn Baḥr},       editor = {Hārūn, ʻAbd al-Salām Muḥammad},       year = {1968},       owner = {Alexander},       timestamp = {2011.12.23}     }      the command               \citet{JahizBayaan}      produce > Al-Jahiz ( _Al-Bayaan wa-Tabyiin_ ) rather than what I currently get, which is > Al-Jahiz (1968) I could obviously make a command specifically for this author, or for works of this type, but I would really like it if there was a way to do this per-entry in the bibliography.


title: created a fixed page number of an index entry

text: _(First, I would like to state that I am aware that this is a ridiculous and idiotic question. It is for the purpose of a ridiculous and idiotic joke.)_ I'd like to use `\index` to add an entry that will have a fixed page number no matter where the index entry is located. Is there anything that can be used to do this within the LaTeX document? (I'd rather not edit the `ind` file because re-compiling the document would probably eliminate the entry.)


title: Inserting single character in only one column

text: I just want to know how to insert a single character like `$` in only one column of a table. To be precise I don't want that character in my heading, but in all other data rows of the corresponding column. I tried it by using `{\@$}`, but it didn't help me much.


title: How to cite a lecture note

text: I need to cite a lecture note in my poster, that I found by google search. What are the standard field I should include in bibtex? The lecture note I am interested in is: this


title: Writing a macro with parameters

text: I'm trying to write a macro which should be able to do several different yet somewhat similar things. I thought that instead of writing different macros for every thing, I should be able to write just one macro and let me choose when I'm writing the document, which option to choose. I think an example is the best way to describe what I want: suppose I have a macro `\mark[2]` which can mark things. I want to be able to use it like this: `\mark[direction=up]{a}{b}` if I want it to mark the object above it, `\mark[arrow=yes, direction=right]{a}{b}` if I want an arrow (and the mark to be to the right of it), and so on. Obviously I'd want to be able to set what's the default, so in the first example, no arrow will show up. I'll be glad for any help.


title: Running figure numbering

text: I want to use running figure numbering so I used a trick form this website http://www.tex.ac.uk/cgi-bin/texfaq2html?label=running-nos.               \documentclass[a4paper, 11pt]{scrbook}     \usepackage{chngcntr}     \counterwithout{figure}{chapter}     ...     \begin{appendix}     \chapter{Algorithms}     ...     \end{appendix}      It kind-of-works: The figures numbers look like this e.g. `Figure 2.:`, `Figure 3.:` ... How can i get rid of the `.`? Is there a fix or a better solution?


title: Follow up question: TeX accents do not seem to work with fontspec and xe/lua/latex

text: This is a follow up to this question. How would the same look for the dot above? That is, what's the standard definition for `\.` ? Or does somebody in the meantime know a better solution to the whole problem? (The funny thing is that the whole issue cropped up when switching to TeX Live 2011 from the version coming with Ubuntu 11.04. Flying accents used to work with that version together with `fontspec`.) **A minimal example:**               \documentclass{minimal}     \usepackage{fontspec}     \defaultfontfeatures{Mapping=tex-text}     \setmainfont{Garamond Premier Pro}     \begin{document}     \.m ṁ     \end{document}      With texlive-2011, this gives two missing characters, while with the Ubuntu 11.04 version, the one with the flying accent appeared correctly. I am aware that the Ubuntu 11.04 version of `fontspec` did not pull in `xunicode`, but there I included it separately, so the problem should have nothing to do with this.


title: Seeing figures inside a tex/latex buffer in emacs

text: Quite often while typing in emacs I will LaTeX a file just to see whether I am including the right figures in the right order. Is there an emacs package that will either:   * show the figure within the latex source file or   * show the figure when the mouse hovers over an `\includegraphics` command? The idea is to truly ignore the typesetting while one is typing and to delay the latex iterations as long as possible.               \documentclass{article}     \usepackage{graphicx}          \begin{document}          Some text...          \includegraphics{figure.pdf}          Some more text...          \end{document}      In the example above, I'd like emacs to show me the content of 'figure.pdf' whenever I hover over `\includegraphics`.


title: TeXnicCenter & MiKTeX – "directory where the executable is located"?

text: I have a 64-bit System running Windows 7. I installed MiKTeX and then tried to install the TeXnicCenter editor. All went well until I clicked on the TeXnicCenter icon on my desktop and was asked > Enter the full path of the directory where the executable (latex, tex, etc) > of your TeX-distribution is located I answered `C:\Program Files (x86)\TeXnicCenter` \- which is where the TeXnicCenter download went! But there is a problem - the error message is as follows: > The application 'LaTeX' has not been found in the directory of your TeX- > distribution is located > > Please enter the directory where the executiable files (`tex.exe`, > `latex.exe`, etc) are located. I am beginning to wonder if there is something else I should have downloaded other than the TeXnicCenter system? Can anyone help?