title: Push button issue in circuitikz

text: This must be a simple question to solve, but I'm stuck on it. According to CircuiTikZ Manual a simple push button is a `to[push button]` element in a circuit. But, in my case, it doesn't work! Show the circuit code as I developed (When a `ospst` is shown, a push button should go):               \begin{circuitikz}[american voltages]     \draw        (-1,2) node[left] {$V_{PIN}$} to[short,o-] (0,2) %de -1,2 un nodo a través de una linea a 0,2       to[R=$10K{\Omega}$] (0,0) node[ground] {} %y de ahí a R al ground       (0,2) to[ospst,-o] (0,4) node[left=1mm] {$5V$} % y del 0,2 al 0,4 se dibuja el pulsador            ;     \end {circuitikz}      I'm using LYX in Ubuntu 12.10 and loaded the packages in Preamble:               \usepackage{tikz}     \usepackage[siunitx]{circuitikz}      The package `circuitikz` is part of the package `texlive-pictures`, version 2012.2012611-4. Thanks a lot for your help


title: I am at sea with the \markboth \leftmark \rightmark and so on ! Is there a simple explanation?

text: My problem follows from my difficulties with the english explanations on the marks, from the readmes of fancyhd or titleps, in order to modify the headers. I do not understand the business behind the marks and the ones introduced by the extramarks option. From what I gather from its readme, the `titleps` package has a starred version of the marks permitting to correctly taking into account the very first subsection when it is on the same page as the the section title. This solves the bug of LaTeX (which I do not fully follows too). I do not prefer one package over the other, but the titleps gets me closer to what I want. Before the MWE, my wish is to have, with               \documentclass[twoside, a4paper, 11pt]{article}      on every page:   * top left = `\thesection--sectiontitle`   * top middle = `\thepage`   * top right = `\thesubsection--subsectiontitle` but there is a problem when we change the section, see below.   * bottom middle = `\the page` For the ToC and the bibliography, I want only "Table of Content" in the top left position and the page in the top right. With this MWE copied directly from the readme,               \documentclass[twoside, a4paper, 11pt]{article}     \usepackage[topmarks, extramarks]{titleps}     \settitlemarks*{section,subsection}               \newpagestyle{funny}{     \setfoot{\toptitlemarks Top is \thesubsection}     {\firsttitlemarks First is \thesubsection}     {\bottitlemarks Bot is \thesubsection}     \sethead{\firstextramarks{section}\thesection---\sectiontitle}     {\firstextramarks{subsection}\thesubsection---\subsectiontitle}     {\thepage}     }               \pagestyle{funny}                    \usepackage{lipsum}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \tableofcontents          \newpage          \section{first section}          \lipsum[1-3]     \subsection{first subsetion of the first section}     \lipsum[1-3]     \subsection{second subsetion of the first section}          \lipsum[1-3]     \subsection{third subsetion of the first section}     \lipsum[1-11]                    \section{second section}     \lipsum[1-11]     \subsection{first subsetion of the second section}     \lipsum[1-3]                         \subsection{second subsetion of the second section}          \lipsum[1-11]     \subsection{third subsetion of the second section}     \lipsum[1-11]               \section{thirs section}     %\lipsum[1-3]     \subsection{first subsetion of the third section}          \lipsum[1-3]                    \subsection{second subsetion of the third section}          \lipsum[1-3]     \subsection{third subsetion of the third section}     \lipsum[1-11]                                   \end{document}      However, there is a problem with the header of the ToC and on page 6, we can see that the header is adequate regarding the section, but not for the subsection as it displays the third subsection of the first section ! It should be,               top left= section two          top middle= the page          top right=blank


title: Centering an equation vertically

text: I would like to put an equation at the center of a page in beamer (viewing the page from top to bottom rather than left to right - I already know how to center an equation going from left to right). I would also like to have some text above the equation. How can I do both at once?


title: Turning a blog(with comments) into a beautiful texbook

text: I have a blog that I'd like to turn into a printed book. The blog isn't particularly mathematical, but does have some photos, and lots of text. This question: Typesetting non-scientific material for the first time provides a nice start for presenting things in a book style, and from my early experiments with the Memoir class, this seems to be a nice start. However, blog's have comments, and thus present a slightly different challenge. **What packages or commands would tastefully present comments under a blog post?**


title: With orgtbl, how to ensure that braces and dollars are not escaped?

text: The minor mode orgtbl is a wonderful tool for easily creating latex tables (you should check it out!). However, I am running into an issue with its exporter. If I have content surrounded by braces in a cell, the braces will be escaped with backslashes. Additionally, if this content contains dollars, they will be escaped too. It does not happen if the braces are delimiting arguments for a macro that `AUCTeX` knows of (see the second cell in the MWE below), but if the macro is unknown, it does happen. Surrounding content with braces, even without a macro, is sometimes desirable, for example it is required by `siunitx` for content which only looks like data. The org manual mentions the option `:no-escape t`, but it only protects `&%#_^` from escaping (no offense). However, I am almost certain that this is a change in behavior, because in the same situation, one year ago, this option was fixing the issue. "almost" is important, though... was the situation really the same? Also, I was working with a different computer, a different version of `emacs` and a different version of `org` back then, so downgrading is not an option for settling that up. So, the question(s): If it is indeed a change of behavior, what is the rationale, and is there a known work-around? And if I am wrong and it has always been like that, is there an easy work-around? Or should I try to understand `orgtbl-to-generic` and suggest a patch? MWE (both input and output):               \documentclass{article}          \usepackage{verbatim}     \usepackage{amsmath}          \begin{document}          Without no-escape:     % BEGIN RECEIVE ORGTBL Without     \begin{tabular}{ll}     Col 1 & Col 2 \\     \{Braced content\} & $\text{Math content}$ \\     \{\$\text{Braced and math!}\$\} &  \\     \end{tabular}     % END RECEIVE ORGTBL Without     \begin{comment}     #+ORGTBL: SEND Without orgtbl-to-latex :splice nil :skip 0     | Col 1                       | Col 2                 |     | {Braced content}            | $\text{Math content}$ |     | {$\text{Braced and math!}$} |                       |     \end{comment}          \vspace{2cm}          With no-escape:     % BEGIN RECEIVE ORGTBL With     \begin{tabular}{ll}     Col 1 & Col 2 \\     \{Braced content\} & $\text{Math content}$ \\     \{\$\text{Braced and math!}\$\} &  \\     \end{tabular}     % END RECEIVE ORGTBL With     \begin{comment}     #+ORGTBL: SEND With orgtbl-to-latex :splice nil :skip 0 :no-escape t     | Col 1                       | Col 2                 |     | {Braced content}            | $\text{Math content}$ |     | {$\text{Braced and math!}$} |                       |     \end{comment}          Expected output:       \begin{tabular}{ll}     Col 1 & Col 2 \\     {Braced content} & $\text{Math content}$ \\     {$\text{Braced and math!}$} &  \\     \end{tabular}            \end{document}          %%% Local Variables:      %%% mode: latex     %%% eval: (turn-on-orgtbl)     %%% TeX-master: t     %%% End:       In case someone observes a different behavior, here is my environment:   * `GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu)`   * `Org-mode version 8.2.6` The problem does not seem to be related to any latex-related modes, since it also occurs if I open the above example in `fundamental-mode` and then turn `orgtbl` on.


title: PGFPlots - no lines between marks

text: I am starting playing with plots in latex.   In my preample I have:               \usepackage{pgfplots}     \pgfplotsset{width=12cm,compat=1.9}      My plots code: (first is copy from from tutorial, second is my attempt)               \begin{tikzpicture}         \begin{axis}[xlabel=Cost,ylabel=Error]         \addplot[color=red,mark=x] coordinates {         (2,-2.8559703)         (3,-3.5301677)         (4,-4.3050655)         (5,-5.1413136)         (6,-6.0322865)         (7,-6.9675052)         (8,-7.9377747)         };         \end{axis}     \end{tikzpicture}     \begin{tikzpicture}         \begin{axis}[ymin=0, ymax=12, xtick={25,50,75,100,125,150}, grid=major, xlabel=x label,         ylabel=ylabel]         \addplot[color=blue,mark=x] coordinates {         (25,1)         (50,1.87)         (75,2.79)         (100,3.78)         (125,4.83)         (150,5.83)         };         \addlegendentry{legend 1}         \addplot[color=black,mark=o] coordinates {         (25,1)         (50,2.91)         (75,4.27)         (100,5.91)         (125,7.82)         (150,9.00)         };         \addlegendentry{legend 2}         \end{axis}     \end{tikzpicture}      And result:   ![enter image description here](http://i.stack.imgur.com/5a9Ox.png) My question is: Why my plot do not have line between ticks? Am I missing something? EDIT: I am using Ubuntu 13.10 with Kile 2.1.3. I downloaded PGFPlots 1.9 from sourceforge and pointed `TEXINPUTS` system variable to its location.   I am posting full document. It produces pdf with content identical to image posted above. First plot has lines between marks, second does not. (preamble is pretty large, because it will be my master thesis)               \documentclass[a4paper,oneside,12pt]{report}          \usepackage[OT4]{polski}     \usepackage[utf8]{inputenc}           \usepackage{graphicx}     \usepackage{setspace}     \usepackage{indentfirst}     \usepackage{titlesec}     \usepackage{nameref}     \usepackage{zref-user,zref-lastpage}     \usepackage{fancyhdr}     \usepackage{listings}     \usepackage{enumerate}     \usepackage{pgfplots}     \pgfplotsset{width=12cm,compat=1.9}          %listings configuration     \lstset{     language=SQL,     basicstyle=\small\sffamily,     numbers=left,     numberstyle=\tiny,     frame=tb,     columns=fullflexible,     showstringspaces=false     }          \onehalfspacing     \titleformat*{\section}{\normalsize\bfseries}          \setlength{\parindent}{1cm}          \begin{document}     \pagestyle{plain}          \begin{tikzpicture}         \begin{axis}[xlabel=Cost,ylabel=Error]         \addplot[color=red,mark=x] coordinates {         (2,-2.8559703)         (3,-3.5301677)         (4,-4.3050655)         (5,-5.1413136)         (6,-6.0322865)         (7,-6.9675052)         (8,-7.9377747)         };         \end{axis}     \end{tikzpicture}          \begin{tikzpicture}       \begin{axis}[ymin=0, ymax=12, xtick={25,50,75,100,125,150}, grid=major, xlabel=x label,     ylabel=ylabel]         \addplot[color=blue,mark=x] coordinates {         (25,1)         (50,1.87)         (75,2.79)         (100,3.78)         (125,4.83)         (150,5.83)         };         \addlegendentry{legend 1}         \addplot[color=black,mark=o] coordinates {         (25,1)         (50,2.91)         (75,4.27)         (100,5.91)         (125,7.82)         (150,9.00)         };         \addlegendentry{legend 2}       \end{axis}     \end{tikzpicture}          \end{document}


title: Footnotes or sidenotes in tables with tufte-latex?

text: It might be extremely simple to solve my problem, but I can't figure it out... I use the `tufte-book` class and I have a table inside it. In the documentation of the `tufte-book` class it is written that: > Any \footnotes will automatically be converted to sidenotes. So, I tied to attach a footnote ( _NOT_ a **tablenote**!), which would amount to a sidenote, to one entry, but the `tablefootnote` package is no use, I get the error:               No counter 'Hfootnote' defined. \end{table}      This suggests that the hack with `\footnotemark` and manually setting the counter would not work either. Needless to say that the `\sidenote` command does not work either. Neither does `tabularx`. My code with `\sidenote` does not compile at all (Minimal Non-Working Example that is...):               \documentclass{tufte-book}%          \usepackage{amsmath}%     \usepackage{amsfonts}%     \usepackage{amssymb}%     \usepackage{graphicx}%          \begin{document}          \begin{table}[htb]         \centering         \caption{Principal elementary particles}             \begin{tabular}{c||c|c|c|c} \hline                  & electron & proton & neutron & photon \\ \hline \hline                 symbol & e$^-$ ($\beta^-$) & p$^+$ (H$^+$) & n$^0$ & $\gamma$ \\ \hline                 el. charge [C] & $-1.602176487 \times 10^{-19}$ & $1.602176487 \times 10^{-19}$ & $0$ & $0$ \\ \hline                 mass\sidenote{at stand-sill} [kg] & $9.10938215 \times 10^{-31}$ & $1.672621637 \times 10^{-27}$ & $1.67492729 \times 10^{-27}$ & $0$ \\ \hline             \end{tabular}         \label{tab:PrincipalElementaryParticles}     \end{table}          \end{document}


title: Additional separation between require and algorithm

text: \usepackage{algorithm}     \usepackage{algorithmic}     ...     \begin{algorithm}     \caption{A good name}     \begin{algorithmic}         \REQUIRE something usefull         \STATE $i \leftarrow 1$     \end{algorithmic}     \end{algorithm}      This works fine but there is only a line above and below the algorithm and between the caption and require. Is it possible to add an additional line between require and the first statemenent because it looks confusing especially if the requirement is long?


title: Indenting in a description environment margin problem

text: I have a problem with the solution in this post if I don't want bold text for the items. I changed the code as described below. But the text of the item (e.g. Animal1:) is now in the left margin of the document (I would like to have it at the left boarder like the normal text of the document). I have no idea why this happens, because with the bold text it works fine. Would be nice if someone has an idea.               % arara: pdflatex           \documentclass{scrbook}     \usepackage{calc}     \makeatletter     \newcommand{\DESCRIPTION@original@item}{}     \let\DESCRIPTION@original@item\item     \newcommand*{\DESCRIPTION@envir}{DESCRIPTION}     \newlength{\DESCRIPTION@totalleftmargin}     \newlength{\DESCRIPTION@linewidth}     \newcommand{\DESCRIPTION@makelabel}[1]{\llap{#1}}%     \newcommand{\DESCRIPTION@item}[1][]{%       \setlength{\@totalleftmargin}%        {\DESCRIPTION@totalleftmargin+\widthof{#1}-\leftmargin}%       \setlength{\linewidth}        {\DESCRIPTION@linewidth-\widthof{#1}+\leftmargin}%       \par\parshape \@ne \@totalleftmargin \linewidth       \DESCRIPTION@original@item[#1]%     }     \newenvironment{DESCRIPTION}       {\list{}{\setlength{\labelwidth}{0cm}%            \let\makelabel\DESCRIPTION@makelabel}%        \setlength{\DESCRIPTION@totalleftmargin}{\@totalleftmargin}%        \setlength{\DESCRIPTION@linewidth}{\linewidth}%        \renewcommand{\item}{\ifx\@currenvir\DESCRIPTION@envir                                \expandafter\DESCRIPTION@item                             \else                                \expandafter\DESCRIPTION@original@item                             \fi}}       {\endlist}     \makeatother     \usepackage{blindtext}          \begin{document}     \begin{DESCRIPTION}         \blindtext         \item[Animal1:] \textbf{Lion}\\         A lion is ... \blindtext         \item[Animal2:] \textbf{Elephant}\\             An elephant is ...     \end{DESCRIPTION}     \end{document}


title: Remove reference to footnote number in bibliography

text: When creating my bibliography it adds a number behind the book which links to the number of the footnote like: > Finkenzeller 2012 > > Finkenzeller, Klaus: RFID-Handbuch. Hanser, Carl GmbH + Co., 2012 5 As you can see its the number 5. How can I remove this number? At the moment im just using this for bib:               \bibliography{Bibliographie}      \bibliographystyle{natdin}


title: calendar symbol

text: Similar to Symbol for Phone Number in Resume, is there a LaTeX command for a calendar symbol? ![enter image description here](http://i.stack.imgur.com/qPzBM.png)


title: Horinzontal Rule issues and help

text: I am almost done with my resume but the only issue is providing horizontal line to add spacing and a sense of cleanliness in the article. Here is the style that I am looking for- ![enter image description here](http://i.stack.imgur.com/x0cb7.png) But if I use `\hrulefill` it won't just start from the bottom of the heading and needs a line break for it to give the effect. Secondly - is there a way to reduce the spacing between 2 `\items` bullets? ![enter image description here](http://i.stack.imgur.com/pSWof.png) Here is the code for it ! I am not able to use `\hline` since I am not very familiar with it. `\rule` works almost similar to `\hrule` so same issues with it! Other than this I wanted the rule to be a bit larger than the heading as in first image~ Please not that `\headtitle` is a custom command that I using for simplifying my work~               {\bfseries{FREELANCER CONTRIBUTION}}          \hrulefill          \headtitle{Freelancer Author}{Linux / Online Magazines}{2009-2013}     \begin {itemize}     \item Published more than 30 artciles across various print and online magazines.     \item Worked on popular publications like Linux Journal , Linux Pro Magazine, Linux For     You \par(now Open Source for You) and Muktware.     \item Covered major critique  on Secure Boot , GPT, Gnome Extensions, Overclocking etc.     \end{itemize}      Kindly help :) Regards


title: problems using apa6e with biblatex-apa

text: As in apa6e and biblatex-apa I'm trying to use `apa6e` and `biblatex-apa` together and having problems. Before I arrived at these problems, over the course of many hours of much reading, I first managed to get BibTeX working as expected in a simple input file (by modifying `sample2e.tex`). Then I managed to get `apa6e` working as expected based on the author's example in **apa6e.pdf** (which uses `apacite`). But when I try to get `apa6e` working with `biblatex-apa`, I end up with problems. Here's my input file:               \documentclass{apa6e}          \usepackage[american]{babel}     \usepackage{csquotes}          % biblatex     \usepackage[style=apa]{biblatex}     \bibliography{biblatex-apa-test-references}          \title{An Example Document}     \shorttitle{Psychology: the end}     \author{Silly Name}      \authornote{\dots}     \abstract{\dots}          \begin{document}          \maketitle          This is an example input\cite{7.01:2} file.  Comparing it with     the output it generates can show you\cite{7.01:3a} how to     produce a simple document of your own.          \printbibliography          \end{document}      Attempting to typeset this in TeXShop by running LaTeX, then BiBTeX (which based on console messages, does seem to correctly call `biblatex` rather than BiBTeX), then LaTeX again, I get the following error message which I am having great difficulty (no doubt due to my lack of experience with TeX and co.) decoding.               (./test6.aux) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1ptm.fd)     *geometry* driver: auto-detecting     *geometry* detected driver: pdftex     (./test6.bbl)     Underfull \hbox (badness 10000) in paragraph at lines 18--18      []\OT1/ptm/m/n/12 An Ex-am-ple Doc-u-ment           Underfull \hbox (badness 10000) in paragraph at lines 18--18      []\OT1/ptm/m/n/12 Silly Name           Underfull \hbox (badness 10000) in paragraph at lines 18--18      []\OT1/ptm/m/n/12 Author Note      [1{/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     Underfull \hbox (badness 10000) in paragraph at lines 18--18      []\OT1/ptm/m/n/12 Abstract      [2]     Underfull \hbox (badness 10000) in paragraph at lines 18--18      []\OT1/ptm/m/n/12 An Ex-am-ple Doc-u-ment           Underfull \hbox (badness 10000) in paragraph at lines 25--25      []\OT1/ptm/b/n/12 References      ./test6.tex:25: Undefined control sequence.     <argument> \mkbibdateapalongextra      (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1pcr.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1ztmcm.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omlztmcm.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omsztmcm.fd)     (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omxztmcm.fd)     Overfull \hbox (8.03372pt too wide) in paragraph at lines 25--25     [][]  \OT1/ptm/m/n/12 Gilbert, D. G., Mc-Cler-non, J. F., Ra-bi-novich, N. E.,      Sugai, C., Plath, L. C., As-gaard, G., ... Botros,      ./test6.tex:25: Undefined control sequence.     <argument> \mkbibdateapalongextra                                        {year}{month}{day}\iffieldundef {endyear}{...     l.25      I tried many different sources in several different `*.bib` files before eventually trying the `.bib` database shown above and included with `biblatex- apa`. All trials gave a similar error. Can someone help? I'm impressed that the poster above was able to do anything with `apa6e` and `biblatex-apa`, and if I only had her problem of having the reference page title show up in bold, I'd be really happy. If you need to know, my tools are from a fresh installation of MacTeX that I immediately updated using the TeX Live Utility. I've checked my versions for `apa6e` (v0.3) and `biblatex-apa` (v4.2), and I think these are current.


title: italic font in LyX?

text: How does one generate italic font in LyX? I just want to select some text and click something in the menu system or type a keyboard shortcut to do this. I have previously found it in the menu system, but it's not in a place that's intuitive for me so I cannot find it quickly.


title: Variable length blocks and long itemize

text: I have defined two block environments, one with fixed width, the other with variable length (the second based on a definition here). Generally things work. However, when I have a long line in an itemize environment within the variable length block, it doesn't wrap around and runs wide. My code and what it generates are below. Is there any way to fix the definition so that itemized lines properly wrap? Thanks much.               ![\documentclass\[table,xcolor=pdftex,dvipsnames\]{beamer}          \newenvironment<>{problock}\[1\]{%       \begin{actionenv}#2%           \def\insertblocktitle{#1}%           \par%           \mode<presentation>{%             \setbeamercolor{block title}{fg=white,bg=blue!50!white}            \setbeamercolor{block body}{fg=black,bg=blue!20}            \setbeamercolor{itemize item}{fg=blue}            \setbeamertemplate{itemize item}\[triangle\]          }%           \usebeamertemplate{block begin}}         {\par\usebeamertemplate{block end}\end{actionenv}}          \newenvironment<>{varproblock}\[2\]\[.9\textwidth\]{%       \setlength{\textwidth}{#1}       \begin{actionenv}#3%           \def\insertblocktitle{#2}%           \par%           \mode<presentation>{%             \setbeamercolor{block title}{fg=white,bg=blue!50!white}            \setbeamercolor{block body}{fg=black,bg=blue!20}            \setbeamercolor{itemize item}{fg=blue}            \setbeamertemplate{itemize item}\[triangle\]          }%           \usebeamertemplate{block begin}}         {\par\usebeamertemplate{block end}\end{actionenv}}          \begin{document}          \begin{frame}     \begin{problock}{Definition}     Given a countably infinite set $\cal{D}$ (documents), a Web of Linked Data is a tuple $W = ( D, adoc, data )$ where:     \begin{itemize}     \item $D \in \cal{D}$,      \item $adoc$ is a partial mapping from URIs to $D$, and     \item $data$ is a total mapping from $D$ to finite sets of RDF triples.     \end{itemize}     \end{problock}          \begin{varproblock}\[8cm\]{Definition}     A Web of Linked Data  $W = (D, adoc, data)$ contains a data link from document $D \in \cal{D}$ to document $D' \in \cal{D}$ if there exists a URI $u$ such that:     \begin{itemize}     \item $u$ is mentioned in an RDF triple $t \in data(D)$ and     \item $D' = adoc(u)$.     \end{itemize}     \end{varproblock}          \end{frame}     \end{document}][2]


title: Custom headline in LaTeX Beamer?

text: I'm trying to modify some themes in Beamer and nearly have what I want. The last step is to change the headline to display the sections in the presentation. What I have so far is: ![enter image description here](http://i.stack.imgur.com/JhBop.png) however, I would like the top (headline) bar to be solid black and list the sections similarly to ![enter image description here](http://i.stack.imgur.com/8NQ0z.png) I've tried loading themes and modifying themes, but nothing seems to work. If anyone has any recommendations, please post an answer. I appreciate your help and time. Minimum Example:               \documentclass{beamer}     \usetheme{Warsaw}          \title[Short Title]{Long Title}     \author[Short Name]{Long Name}     \institute[Short Inst.]     {Long Inst.}     \date{October 1, 2012}          \begin{document}     \section{Section 1}     \begin{frame}     \frametitle{Section 1}     Hello World!     \end{frame}          \section{Section 2}     \begin{frame}     \frametitle{Section 2}     Hello World!     \end{frame}          \end{document}      Theme:               \ProvidesPackageRCS $Header: /home/vedranm/bitbucket/beamer/base/themes/theme/beamerthemeWarsaw.sty,v d02a7cf4d8ae 2010/06/17 09:11:41 rivanvx $          \mode<presentation>          %% Themes     % Outer themes     \useoutertheme{shadow}     % Color themes     \usecolortheme{orchid}     \usecolortheme{whale}     % Rounded boxes and shadows     \useinnertheme[shadow=true]{rounded}     % Solid \item symbols     \useinnertheme{circles}          %% Custom colors     \setbeamerfont{block title}{size={}}     \setbeamercolor{structure}{fg=red}     \setbeamercolor{item}{fg=red}          % Hide navigation symbols     \setbeamertemplate{navigation symbols}{}          %% Title block     \definecolor{beamer@darkred}{RGB}{190,0,0}     \setbeamercolor*{title}{use=structure,fg=white,bg=beamer@darkred}          %% Bottom infolines     \setbeamertemplate{footline}     {       \leavevmode%       \hbox{%       % Name and institution       \begin{beamercolorbox}[wd=0.5\paperwidth,ht=2.3ex,dp=1.25ex,right]{title in head/foot}%         \usebeamerfont{title in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}\hspace{1em}       \end{beamercolorbox}%\hspace*{-0.5pt}%       % Short title       \begin{beamercolorbox}[wd=0.41\paperwidth,ht=2.3ex,dp=1.25ex,left]{author in head/foot}%         \usebeamerfont{author in head/foot}\hspace{1em}\insertshorttitle       \end{beamercolorbox}\hspace*{-0.5pt}%       % Frame counter       \begin{beamercolorbox}[wd=0.1\paperwidth,ht=2.3ex,dp=1.25ex,right]{author in head/foot}%         \usebeamerfont{author in head/foot}\insertframenumber{}\hspace{1pt}/\hspace{1pt}\inserttotalframenumber\hspace*{4ex}            \vskip0pt%     }          \mode     <all>


title: Latex to XML using pdflatex

text: I am writing Latex to `XML`. While compiling `pdflatex` we generate a `xml` file using `\immediate\write{text}` in tagged commands. But how can i get normal text to `XML` file. Can any one explain with samples.


title: Problem with \and within \hypersetup{pdfauthor=...}

text: I use a custom macro to set the author of both my document and its metadata. It had worked fine until I started writing a document with a colleague. This is the code:               %----------------------------------------------------------------------------------------     %    PDF INFO     %----------------------------------------------------------------------------------------     \newcommand*{\mytitle}{Equacions diferencials}     \newcommand*{\myauthor}{Alfredo Hernández \and John Smith}      \newcommand*{\myuni}{Universitat Autònoma de Barcelona, Departament de Física}     \newcommand*{\mydate}{\normalsize 2013-2014}          \usepackage{hyperxmp}     \hypersetup{pdfauthor={\myauthor}, pdftitle={\mytitle}}          %----------------------------------------------------------------------------------------     %    TITLE SECTION AND DOCUMENT BEGINNING     %----------------------------------------------------------------------------------------     \newcommand{\horrule}[1]{\rule{\linewidth}{#1}}     \title{         \normalfont         \small \scshape{\myuni} \\ [25pt]          \horrule{0.5pt} \\[0.4cm]         \huge \mytitle \\         \horrule{2pt} \\[0.5cm]     }     \author{\myauthor}     \date{\mydate}          \begin{document}      As I understand it, the command `\and` is the proper way to set more than one authors. The problem is that `hypersetup` crashes when trying to write the metadata (of course, if I delete \and, the document renders perfectly). Do you know any workaround to keep using \myauthor command in the metadata and the title itself? * * * **SOLUTIONS THAT MAY WORK:**   1. I have tried using `&` between the authors, but ShareLatex tells me that `\cr` is better. However, I don't know what the `\cr` command does and I want to avoid using code I don't know, also I don't even know if that is a proper solution in terms of coding.   2. I think that using \author1 and \author2 could solve my problem, (`\author{\author1 \and \author2}`; `\hypersetup{pdfauthor={\author1 , \author2}`), but again, I don't think this is the best solution.


title: Printing full date in bibliography (BibLaTeX)

text: How can I get biblatex to print the full date in the references? I could have sworn it used to do this all by itself and I've got some old files where I've managed this, but I can't see anything in the .tex file or in the biblatex manual that says how to do it.               \documentclass{article}     \usepackage[style=authoryear-icomp,backend=biber]{biblatex}          \begin{filecontents}{references.bib}         @article{Article,       title = {This is a Title},       author = {Author, Some},       journal = {Journal},       location = {The City},       publisher = {Publisher},       date = {2014-04-23}     }     \end{filecontents}     \addbibresource{references.bib}               \begin{document}     Citing \cite{Article}.     \printbibliography     \end{document}      ![Lack of full date in bibliography](http://i.stack.imgur.com/AqKtM.png)


title: Where the .bst file comes in

text: On page 29 of Tame the Beast, it says "Roughly speaking, BibTEX reads three files, in the following order: The .aux file first, where it finds the name of the style file to be used, the name of the database(s), and the list of cited entries. The .bst file is read next, and the .bib file last." When I compile by LaTeX and BibTeX, the files I have are `.aux`, `.bbl`, `.bib`, `.blg`, `.dvi`, `.log`, `.pdf`, `.tex`. Why do I not need a `.bst` file? If I want to use a `.bst` file that I make up on my own, can I?


title: Table organization when there are many \multicolumn and \multirow sections

text: I am recreating a table that utilized many merged cells (excel) but in reality, this was an offensive creation that goes against most, if not all, rules for formatting tables. Can anyone suggest alternative layouts to this method of grouping cells? ![enter image description here](http://i.stack.imgur.com/F6Klm.png)               \begin{table}[htbp]\footnotesize       \centering       \caption{Add caption}         \begin{tabular}{cccrrr}         \toprule         \multirow{6}[1]{*}{\begin{sideways}40\% of index\end{sideways}} & \multirow{6}[1]{*}{\begin{sideways}\textbf{Exposure Index}\end{sideways}}                &       30\%  & \multicolumn{3}{l}{Surface temperature} \\               &       & 10\%  & \multicolumn{3}{l}{Access to Green Space} \\               &       & 10\%  & \multicolumn{3}{l}{Tree Canopy Shading} \\               &       & 18\%  & \multicolumn{3}{l}{Dwellings in high rises (>5 storeys)} \\               &       & 18\%  & \multicolumn{3}{l}{Rented dwellings in older high-rises (after 1986)} \\               &       & 15\%  & \multicolumn{3}{l}{Population density} \\         \cmidrule{1-6}         \multirow{24}[3]{*}{\begin{sideways}60\% of index\end{sideways}} & \multirow{24}[3]{*}{\begin{sideways}\textbf{Sensitivity Index}\end{sideways}} & 25\%  & \multicolumn{3}{l}{Low income persons (2005, after tax LICO)} \\               &       & 5\%   & \multicolumn{3}{l}{Low income persons among children (aged 0-5)} \\               &       & 5\%   & \multicolumn{3}{l}{Renter Household Spending >=50\% of income on housing} \\               &       & 5\%   & \multicolumn{3}{l}{Low-income renters spending >=50\% of income on housing} \\               &       & 10\%  & \multicolumn{3}{l}{Persons not speaking English} \\               &       & 5\%   & \multicolumn{3}{l}{Recent immigrants (2001-2006)} \\               &       & 5\%   & \multicolumn{3}{l}{No high school certificate among adults (aged 25+)} \\               &       & 5\%   & \multicolumn{3}{l}{Racialized groups} \\               &       & 10\%  & \multicolumn{3}{l}{Disability among persons age 25-64} \\               &       & 5\%   & \multicolumn{3}{l}{Emergency visits 2004-2008 for circulatory disease (age standardized rate)} \\               &       & 5\%   & \multicolumn{3}{l}{Emergency visits 2004-2008 for respiratory disease (age standardized rate)} \\         \cmidrule{3-6}               &       & \multirow{13}[1]{*}{15\%} & \multicolumn{1}{c}{\multirow{13}[1]{*}{\begin{sideways}\textbf{Senior Sensitivity Index}\end{sideways}}} & \multicolumn{1}{c}{10\%} & Frail seniors (age 75+ with a disability) among total population in private households \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{10\%} & Low income (2005, after tax LICO) and living alone among seniors (age 65+) \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{20\%} & Low income among seniors \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{10\%} & Low income among seniors living alone \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Senior families paying >= 30\% on housing \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Unattached seniors paying >= 30\% on housing \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{10\%} & Seniors not speaking English \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Recent immigrants (1996-2006) among seniors \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & No high school certificate among seniors \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Seniors in racialized groups \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Unattached seniors with disability \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Disability among persons age 65-74 \\               &       &       & \multicolumn{1}{c}{} & \multicolumn{1}{c}{5\%} & Emergency visits 2004/05 among persons age 65-74 \\         \bottomrule         \end{tabular}%       \label{tab:addlabel}%     \end{table}%


title: Location of .bst files

text: I'm using Windows, and I found my `.bst` files (such as `plain.bst`) inside the directory `MiKTeX 2.8/bibtex/bst/base`. If I want to add a new `.bst` file of my own, should I add it into this directory, or can I add it into the same directory as the `.tex` file?


title: Inline alignment of tikz graphic

text: # How it should look like I want to achieve the following result using `TikZ`. The graphic should be aligned to the right of the text body and to the top of the line's text it is placed in. Besides, the graphic should "overlay" the following lines. ![Desired result](http://i.stack.imgur.com/7fxxB.png) # What I tried so far and how it looks The graphic itself should be placed inside a command and is more complex than the one inside this MWE. I played around a lot with `baseline`, `overlay`, `xshift`, `yshift` and a lot more, but couldn't get it work ... Neither the alignment, nor the "overlay".               \documentclass[parskip=half]{scrartcl}          \usepackage{tikz}     \usepackage{xparse}          \NewDocumentCommand \goodluck { } {       \hfill       \tikz[baseline=1.75cm, overlay]{%         % Do some more complex TikZ stuff         \fill[blue] (0, 0) rectangle (1, 1);         \fill[red] (0, 1) rectangle (1, 2);       }     }          \setlength{\parindent}{0pt}               \begin{document}          Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli Bli          Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla \goodluck          Blub Blub Blub Blub Blub Blub Blub Blub Blub Blub Blub Blub Blub Blub           \end{document}      ![Tikz result](http://i.stack.imgur.com/9eMeO.png)


title: Is ConTeXt compatible with the memoir class?

text: Is ConTeXt compatible with the `memoir` class?


title: Does LaTeX takes into account the DPI of an image ? Or just the pixels?

text: Two images with same resolution (nb of pixels width and height) but with a ration of 2:1 in DPI one will display two times bigger than the other ?


title: Syntax Highlighting for Plain TeX

text: I would like to find out what options there are for applying syntax highlighting to Plain TeX, to turn Plain TeX documents into highlighted HTML. The aim is to facilitate sharing tracked changes to the Plain TeX document. The document I wish to work with is fairly simple, but it does hand define several fonts, a bibliography environment, and make heavy use of `\halign` macros. Some automatic or semi-automatic handling of these would be an advantage. At a pinch I could do this with a `sed` script, but I would rather save myself some time. Pygments does not seem to have support for Plain TeX. Emacs' AUCTeX has `TeX- mode` for Plain TeX, but although I seem to recall that it is possible to export HTML from AUCTeX, I cannot recall any details.


title: Force LaTeX to obey spaces in math mode

text: I have experienced a very frustrating feature of LaTeX. I have used `bnf.tex` to be able to write a BNF grammar definition. As I found the notation `<some text>` very convenient, I decided to use it through the entire document. This might be a bad idea, but now I would rather not change the whole source. Here are my macros:               {\catcode`\ =\active{\global\let =\ }}     \gdef<{\ensuremath{\langle}%        \ifmmode\catcode`\ =\active\relax\fi%        \begingroup\sf}     \gdef>{\/\endgroup\ensuremath{\rangle}%        \ifmmode\catcode`\ =10\relax\fi%        \relax}      It works very well, except when argument to complex math commands. So               <cou cou>     $<cou cou>$     and $\sqrt{<cou cou>}$      will keep their inner space, but               $$\frac{<cou cou>}{E}$$     and $\Instr{<cou cou>}{E}$      will lose their's, looking like `<coucou>`. In fact, any solution formatting the text between `<` and `>` as normal (`\sf`) text in both math and normal mode would be very useful here :-) Here is a full file containing the examples:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8x]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}          \DeclareMathOperator{\instr}{Instr}     \newcommand{\Instr}[2]{\instr(#1,#2)}          \catcode`\>\active     \catcode`\<\active          {\catcode`\ =\active{\global\let =\ }}          \begingroup              \gdef<{\ensuremath{\langle}%             \ifmmode\catcode`\ =\active\relax\fi%             \begingroup\sf}         \gdef>{\/\endgroup\ensuremath{\rangle}%             \ifmmode\catcode`\ =10\relax\fi%             \relax}          \endgroup          \begin{document}          <cou cou>          $<cou cou>$          $$\frac{<cou cou>}{E}$$          $\Instr{<cou cou>}{E}$          \end{document}


title: How to change the font of my TeX editor on Mac?

text: I use an editor named TeXShop, but there appears to be no choice for the font in this editor. The font here is not for appearing in the final pdf file, but the font in the editor when I type.


title: TikZ picture on the entire frame in beamer without using overlays

text: I have a `beamer` presentation with several TikZ diagrams that spread across the entire frame, i.e., use the full screen size. I am using the overlay option to make sure the picture captures the entire frame:               \begin{tikzpicture}[overlay, remember picture]       ...     \end{tikzpicture}      The problem is that these diagrams are messed up on the notes pages, that can't align them properly. Is there a way to make a TikZ picture spread across the full page? I tried using a node that is as large as the entire frame, but it was displayed with some margin between it and the top and left edges of the frame. **Edit** When not using an overlay or background template, the result is shifted to the right:               \begin{frame}       \begin{tikzpicture}         \node[minimum width=\paperwidth, minimum height=\paperheight, anchor=north west] (a) {};         \draw [very thick] (a.north west) -- (a.south east);         \draw [very thick] (a.north east) -- (a.south west);       \end{tikzpicture}     \end{frame}      ![The X is not on from the corners](http://i.stack.imgur.com/slYk5.png)


title: Tikz, rotate, how to specify a point as rotating center?

text: When I use `rotate` on a node, it seems to be rotated against its `west`(As in figure (up) and (middle)), however, what I meant is to rotate it against its `center`, like (bottom) of figure shows. I didn't find such a parameter in manual.... ![enter image description here](http://i.stack.imgur.com/B93GN.png) * * *               \begin{tikzpicture}     [sampleA/.style={text width=1cm, text height=2cm},     sampleB/.style={text width=1.5cm, text height=.5cm},     every node/.style={draw, rectangle, align=center}]     %% up      \node (A) at (0,0) [sampleA] {A};     \node[sampleB] (B)  [right=.1cm of A] {B};     %% middle     \node (A) at (0,-3) [sampleA] {A};     \node (B) [sampleB, right=.1cm of A, rotate=-90] {B};     %% bottom     \node (A) at (0,-7) [sampleA] {A};     \node (B) [sampleB, right=.1cm of A, rotate=-90, xshift=-.8cm, yshift=.5cm] {B};     \end{tikzpicture}      * * * **UPDATE** I tried to use `round around`, but it fails:               \node (A) at (0,-7) [sampleA] {A};     \node (B3) [sampleB, right=.1cm of A, rotate around={-90:(B3.center)}, xshift=-.8cm, yshift=.5cm] {B};      Error says: > Package pgf Error No shape named B3 is known.


title: Text on the left, figure on the right

text: I have one technical text with the small figures, which must be placed on the right side of text. I tried manny solutions /wrapfig package, table, 2 columns package, etc./ but I can't get this to work. When the picture gets too low, it is drawn in the footer area. So I'm starting from blank. What should I use to write text with the following specifications:   1. Text /TEXT/ should be placed on the left side and the picture /FIG/ should be placed on the right - not up, not down and certainlly not the next page from the TEXT - should start on the SAME page. Pictures are small (cca. 5 cm, and the text should be in the landscape mode). The TEXT may be one paragraph or more so it is desirable (but not required) to stay in the left place, while figures stays on the right.   2. When the FIG gets placed too low on the page, so it gets drawn over the bottom text margin, both TEXT and FIG should start on the next page, while leaving empty space on the bottom of the page /no vertical aligning/.   3. The whole process of aligning must be automatic, so when I replace picture with slightly larger one, the whole process must be handled automatically /no manual pagebreaks and stuff/.   4. The TEXT may or may not flow around the FIG, but the margins must be rellatively small /5mm/. How can I do that?


title: How to fake mid-caps with LaTeX? (I.e. How to stretch characters of a font?)

text: # Background As discussed in this question, one would often like to use small caps for abbreviations, however, mixed case acronyms such as OpenMP look rather odd (see example 2 below): ![rendered example](http://i.stack.imgur.com/AgBj8.png) The problem is that most fonts provided with LaTeX (and most of the fonts bundled with an OS) provide only a single small cap shape that is so close to the x-height of the font that there is insufficient height contrast to distinguish the small caps from the lower case letters. (The "O" looks almost like a lower-case "o" but with a strange weight in this example previous example.) The typographic solution is to use a font with mid-capitals (mid-caps) – capitals with a weight similar to small caps but with a height somewhat larger than the x-height of the font, but relatively few fonts support this. Many fonts do provide real small caps. # Question How can I _fake_ mid-caps in a font that has x-height small caps within LaTeX? # Discussion Of course, the best solution is to use a properly designed font, or to use a program like FontForge to add these to the font (provided that the font license permits modification), but this can be a lot of work and is impractical in many situations (such as submitting an article to the arXiv, so I am looking for a programatic solution within LaTeX or pdfLaTeX. (Excellent XeLaTeX or LuaLaTeX solutions may be of interest generally, but will not satisfy the arXiv need.) Here are several possible solutions:   1. A simple solution is to scale down the full caps. This works even for fonts that do not provide small caps, but is not acceptable typographically. I do not consider this a potential solution. Edit: As Barbara Beeton points out, Knuth's original Computer Modern fonts have multiple design sizes, so scaling by a full step size as done by the `\SMC` macro in `ltugboat.cls` does a much better job with these fonts than one would first expect. If your fonts have multiple design sizes (sometimes called optical sizes, or multiple masters), then this scaling might be acceptable. (See also selecting optical size.)   2. The simplest acceptable solution is to scale up the small caps. As long as the scale factor is not too large (less than 105% or so), then this is reasonable, but not ideal solution. An implementation using the relsize package is provided below. The problem with this solution is that some fonts need even more scaling, and even scaling up from small caps increases the visual weight too much.   3. A better solution that I do not presently see how to implement is to provided a different horizontal and vertical scale factor. The weight of the font can be better maintained with a vertical scaling of 107% for example but a horizontal scaling of 105% (see this discussion). One could implement this with scaleboxes for each letter, but I suspect this might have spacing/performance problems. (Maybe the scaling could be done once in the preamble, and cached in a precompiled preamble?)   4. The best automatic solution would probably be to interpolate between the small caps and full caps. This should provide an excellent way to preserve the weight even for large scaling factors. Is this possible programatically? (This is how I would start trying to design a set of mid-caps using an external program like FontForge.) Here is an implementation of 1 to 3:               \documentclass{minimal}     \usepackage{relsize}     \usepackage{graphicx}     \renewcommand\RSpercentTolerance{0}     \newcommand{\mcfactor}{1.07}     \usepackage[tracking=smallcaps]{microtype}     \SetTracking{encoding=*, shape=sc}{25}     \usepackage[sc]{mathpazo}          \newcommand\fakesc[1]{{\relscale{0.8}\MakeUppercase{#1}}}     \newcommand\relsc[1]{{\relscale{1.09}\textsc{#1}}}     \newcommand\fullsc[1]{\scalebox{1.06}[1.09]{\textsc{#1}}}          \begin{document}     \begin{enumerate}     \item[0. ] Some text for visual context \textsc{o}pen\textsc{mp} followed by       some more text.     \item[1. ] Some text for visual context \fakesc{o}pen\fakesc{mp} followed by       some more text.     \item[2. ] Some text for visual context \relsc{o}pen\relsc{mp} followed by       some more text.     \item[3. ] Some text for visual context \fullsc{o}pen\fullsc{mp} followed by       some more text.     \end{enumerate}     \end{document}      ![samples of methods 1 to 3](http://i.stack.imgur.com/u7fZq.png) These are probably not the optimal parameters for Palatino, but give a flavour of the problem. Option 0 is the standard small caps option. The capitals are way to small for the needed contrast. Option 1 uses scaled full-caps: the height is nice but the letters have become too thin. Option 2 uses scaled small caps at 109%. This is still not quite enough, but even here the horizontal weight is becoming too heavy. Option 3 scales horizontally by only 106% which looks better. Unfortunately, even more contrast would be better, but to keep the weight under control distorts the letters too much. Can anyone implement the interpolation (option 4)? I really think that would work best.


title: Variables in TikZ and other basic programming concepts

text: I'm discovering TikZ. I'm using it to draw a fairly complex automaton (something around 20 states). I did it the all manual way (ie by specifying all the states and all the connections). Though it was _very_ long and _really_ boring, so now I try to do it the correct way (ie by doing some looping). Though I encounter a kinda big problem: I'd like to program a bit but I don't know what are the common tools (ie variables and things like that) available to me. I do know the basis of TeX and even started reading the TeX book, but I'm not advanced in it yet and still lack the basis. Here for example I'd like to loop through a list of node and link it to the next one. For that I'd like to memorize the last node I went through so that it can be the departure of my next link (I tried to provide a MWE but my actual automaton is way bigger). My attempt:               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{arrows, automata}          \begin{document}     \begin{tikzpicture}            \node[initial,state]    (A)                    {A};       \node[state]            (B) [right of=A]       {B};       \node[state]            (C) [right of=B]       {C};       \node[state, accepting] (D) [right of=C]       {D};                 \newcommand\from{A}       \foreach \to in {B, C, D}       {         \path (\from) edge [-] (\to);         \renewcommand\from{\to};       }     \end{tikzpicture}     \end{document}      I tried `\def` instead of `\newcommand` and `\renewcommand`, but to no avail. So what I'd like is a pointer towards a good tutorial where I could grab all those basic principles, because the TikZ/pgf manual is large and I didn't find the info I need. The principles I'd like to learn are the basis of TikZ programming. PS: I guess my question must have been asked before. However I didn't find an answer in the questions I got as a result for my research.


title: Getting hyperref to work with \citeyear and \citeyearpar in biblatex

text: When used in concert with the `hyperref` package, `biblatex` automatically creates hyperrefs for citations but not if they are inserted using `\citeyear` or `\citeyearpar`.   Is it possible to add a hyperref to year only citations?               \documentclass{article}          \usepackage[backend=biber,natbib=true, style=authoryear-comp]{biblatex}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @article{ref1,       author = {Doe, John D.},       title = {Hyperrefs to citations},       journaltitle = {Links Everywhere},       volume = {1},       date = {2000},       pages = {1--2},     }          \end{filecontents}          \addbibresource{\jobname.bib}          \usepackage{hyperref}          \begin{document}          citet -- \citet{ref1}          citeyear -- \citeyear{ref1}          citeyearpar -- \citeyearpar{ref1}          \printbibliography          \end{document}      ![enter image description here](http://i.stack.imgur.com/XOyWj.png)


title: XeLaTeX: How to specify a different font family for Latin text within non-Latin text?

text: In a XeLaTeX document whose main language is non-Latin (in the sense of using non-Latin alphabet), I'd like the Latin text to be typeset with a different font family from that of the main text. How do I do that in an automatic, document-wide manner? For example, suppose that the main language is Thai and the XeLaTeX source is as follows:               \documentclass{article}          \usepackage{polyglossia}     \usepackage{fontspec}     \setdefaultlanguage{thai}     \newfontfamily\thaifont{Thonburi}          \begin{document}     ดาวพุธมีหลุมอุกกาบาตจำนวนมากจนดูคล้ายดวงจันทร์ ภูมิลักษณ์ที่เด่นที่สุดบนดาวพุธ คือ แอ่งแคลอริส (Caloris Basin)     \end{document}      I'd like the phrase 'Caloris Basin' to be typeset with Cambria instead of Thonburi. Trial and error doesn't lead me to the desired result so far.


title: Cancel the use of \baselineskip when at the top of page

text: I've defined a macro `\myaddress` which prints my address at the end of a document, cf. Simplify how I write my address in documents. That macro includes the use of `\vspace{\baselineskip}` to separate it from previous text. But when that address happens to be the first thing on a new page, it looks wrong that there is a baselineskip at the top of the page, as seen in the picture below. How can I redefine my macro so that `\vspace{\baselineskip}` is canceled out when the address ends up at the top of a new page?               \documentclass{article}     \usepackage{lipsum}     \usepackage[showframe, pass]{geometry}     \newcommand{\myaddress}{\parindent=0pt\vbox{% \vbox prevents page break         \vspace{\baselineskip}         My name\\         My university\\         My department\\         My address\\         My e-mail}}     \begin{document}     \lipsum[1-5]     \myaddress     \end{document}      ![enter image description here](http://i.stack.imgur.com/AikA6.png)


title: show subsections in the outline

text: I have been trying to show my subsections in the out line but could not manage to do it. I used the following command:               \setcounter{tocdepth}{4}     \setcounter{secnumdepth}{4}      I can see all my subsections in the chapter but can not see them in the outline. Am I missing something? I see up to the subsubsection. I do not see \paragraph and \subparagraph in my outline.               \documentclass{report}     \chapter{sectioning}     \listfiles          \makeindex     \begin{document}          \setcounter{tocdepth}{4}     \setcounter{secnumdepth}{4}     \section{titles}     \subsection{subtitles}     \subsubsection{subsubtitles}     \paragraph{subsubsubtitles}     \end{document}


title: How to draw penrose diagrams with TikZ

text: ![enter image description here](http://i.stack.imgur.com/gvKJ3.jpg) I know `tikz` can be used to generate plots and I have familiarized myself with the basics of generating an axis and adding coordinates, but I have no idea how I could get a figure like this for example, even though it is just a bunch of lines essentially. Could anyone advise? Or is there another program I should be using for such diagrams..


title: typesetting long lists of numbers - is automatic tabling possible?

text: I have quite a lot of lists of numbers I need to put into my document. I am not sure how best to typeset them. Inspired by reading Add \midrule Every 5 Lines Automatically the other day, I sort of wondered whether it's possible to use a tabular environment and automatically generate newlines every _n_ numbers, where I could vary _n_ - right now I have just manually created a table, but I want to change _n_ and now I have to go through and move all the `\\\` and insert extra `&`... I have absolutely no idea where to begin with this idea though! Here's my current table:               \documentclass[12pt, a4paper, oneside, fleqn]{report}     \usepackage{geometry}     \geometry{       top=2.5cm,       left=3.5cm,       bottom=2.5cm,       right=2.5cm,       includehead,       headheight=28pt,       headsep=18pt,       showframe,     }          \usepackage{siunitx}     \usepackage{array,booktabs}               \begin{document}                 \begin{tabular}{ @{} *{10}{S[table-format=4]} @{} }        16&   38&  49&  51&  55&  57&  59&  61&  63&  66  \\       70&   72&  74&  79&  81&  83&  85&  87&  89&  92  \\       95&   97&  99& 101& 104& 106& 109& 111& 113& 116 \\       119& 122& 125& 128& 131& 133& 135& 138& 141& 144  \\       146& 148& 151& 154& 157& 159& 161& 163& 167& 170 \\       173& 176& 179& 180& 185& 187& 193& 199& 205& 207 \\       210& 212& 214& 217& 219& 222& 224& 226& 230& 232 \\       236& 239& 242& 243& 246& 249& 252& 254& 260& 262 \\       265& 267& 269& 275& 280& 282& 294& 296& 299& 303 \\       306& 323& 327& 329& 335& 345& 347& 350& 354& 356 \\       360& 366& 371& 373& 375& 377& 379& 381& 383& 386 \\       389& 398& 401& 404& 407& 410& 414& 416& 426& 428 \\       432& 434& 439& 445& 457& 515& 546& 552& 559& 566 \\       571& 573& 646& 662& 668& 756& 867& 906& 921& 1027 \\       1046& 1121& 1133& 1191& 1194& 1271& 1479& 1509& 1513& 1521 \\       1536& 1574& 1579& 1585& 1587& 1626& 1639& 1643& 1652& 1658 \\       1671& 1786& 1805& 1884& 1991& 2019& 2094& 2119& 2213& 2239 \\       2245& 2271& 2321& 2398& 2701& 2741& 2819& 2889& 2907& 2910 \\       2919& 2939& 2944& 2948& 2951& 2958& 2977& 2985& 2988& 2991 \\       2993& 3002& 3008& 3014& 3027& 3029& 3036& 3047& 3049& 3053 \\       3058& 3064& 3069& 3087& 3093& 3098& 3105& 3107& 3110& 3127 \\       3136& 3151& 3160& 3165& 3168& 3175& 3178& 3207& 3228& 3244 \\       3248& 3252& 3256& 3263& 3281& 3303& 3309& 3312& 3322& 3339 \\       3375& 3378& 3411& 3438& 3440& 3442& 3444& 3446& 3448& 3450 \\       3452& 3454& 3458& 3467& 3476& 3484& 3491& 3497& 3499& 3504 \\       3506& 3509& 3518& 3522& 3527& 3540& 3555& 3575& 3577& 3580 \\       3582& 3586& 3589& 3599& 3653& 3658& 3661& 3943& 4032& 5130 \\       5368& 5371& 5379& 5381& 5383& 5397& 5399& 5401& 5403& 5405 \\       5455& 5480& 5483& 5485& 5492& 5502& 5507& 5509& 5517& 5558 \\       5988& 5992& 5994& 6003& 6350& 6463& 6601& 6962& 6980& 6982 \\       6985& 6987& 6989& 6991& 6993& 6995& 6997& 7267& 7269& 7424 \\       7426& 7428& 7885& 8007     \end{tabular}            \end{document}      I am not even sure this is the best way to display a list of numbers - does it even look OK? I think it looks marginally better than the randomly spaced list I had before I inserted the `tabular`, and a lot better than the comma separated list I tried.


title: How to write a user manual for a class in two languages?

text: Most classes and packages on ctan, offer a `.dtx` file, which when processed will automatically produce a user manual. In most cases such classes use the author's mother language. As for example yfonts is written in German. In my opinion any such classes and packages they should offer documentation at least in English as well as a second language. This can be done by either the author or one of the many volunteers. Is there a convention or a recommended convention for doing so? Can one give an example, how to go about for example extending the `yfonts` documentation to English? What about if a third language is introduced, cramming everything into the `.dtx` file would render it unreadable. Using `babel` and Beamer's `translate`, would be tedious and prone to errors when the primary author makes an update. Do we need an extension to `docstrip` for this?


title: How to cite the web page address as the reference?

text: I would like to cite a web page in the IEEE style. But I am not sure how to edit the bib code in the JabRef.


title: Is it possible to replace empty space in form with dots?

text: I want to create an empty form which will have several blocks. After adding text to boxes empty spaces will be replaces with dots. Is it possible?               \documentclass[10pt]{extarticle}          \usepackage[top=6.5cm,left=1.0cm]{geometry}     \usepackage[pdfpagemode=None,pdfstartview=FitH]{hyperref}     \usepackage{eso-pic}     \usepackage{graphics}     \usepackage{calc}     \usepackage{graphicx}     \usepackage{color}     \usepackage{textpos}     \usepackage[utf8]{inputenc}     \usepackage{type1ec}     \usepackage[T2A]{fontenc}     \usepackage[english,russian,french]{babel}     \usepackage{hyperref}          \usepackage{multicol}     \usepackage{epstopdf}          \usepackage{booktabs}     \begin{document}          \pagestyle{empty}     \begin{Form}     \begin{tabular}{ l@{} r@{} r r}     \Large{МЕНЮ} & & & \\     \hspace{22em} & \hspace{10em} &  \hspace{3em} & \\       \TextField[bordercolor=white,borderwidth=0,width=3.4in,name=name.1,format={var f =     this.getField('name.1');f.textFont = 'Europe';f.userName = 'first     name'},value=Nazv,charsize=10pt]{} & \TextField[bordercolor=white,borderwidth=0,width=1in,name=qual.1,format={var f =     this.getField('qual.1');f.textFont = 'Europe';f.userName = 'first     name'},value=qual,charsize=10pt]{} & \TextField[bordercolor=white,borderwidth=0,width=0.5in,name=number.1,format={var f =     this.getField('number.1');f.textFont = 'Europe';f.userName = 'first     number'},value=00.00,charsize=10pt]{} & \TextField[bordercolor=white,borderwidth=0,width=0.2in,name=price.1,value=p.]{}  \\     \end{tabular}     \end{Form}          \end{document}      Maybe it's possible to create a new layer, so first layer will be with form and if there will be letters than dots under this layer will be invisible. Also can I create an item which will add new form same as existing one in document? As far as I can understand Adobe editor can do this. But I don't want to use Adobe ed and my javascript code is buggy.


title: An in line Exercise environment

text: In my lecture notes I want to leave some work as exercises and plan to give solutions later in the text. For example, "The proof of this theorem is left as an exercise (Exercise 1.2)". It must also have a label so that it could be referred later. I think I need an in line Exercise environment. This post answers my question. In the last answer in this post Werner has proposed that it could done in a better way may be with macros. I have too many of them so would be very difficult to do it with \lipsum \begin \end every single time.


title: Two sideways tables on one page

text: I want to put two sideways tables next to eachother. For landscape this is possible by putting the two tabulars in one landscape (How to put two tables in one landscape page). Is something like this also possible for sidewaystables? Both tables are a page length wide, but not so long, so I want to put them horizontally next to each other.


title: How to rectify this error? When I used multirow tag its overlaps the next cell

text: \begin{tabular}{ p{2.2cm}p{2.2cm}p{2.2cm}p{7cm} }          \hline     \multicolumn{1}{c}{\bfseries Approach} & \multicolumn{1}{c}{\bfseries Technique Used} & \multicolumn{1}{c}{\bfseries Premise considered} & \multicolumn{1}{c}{\bfseries Attributes} \\ \hline          \multirow{2}{*}{Virtual forces} & Potential Fields [16] & Location information and range & Balanced deployment with the help of repulsive mechanism, when in proximity to obstacles. \\ \cline{2-4}      & DSS Algorithm [17]   & Location information & A profitable scheme to conserve energy during deployment of a WSN divided into clusters. \\      \hline          \multirow{2}{*}{Computational Geometry} & Co-Fi [18] & Location information & Distributed scheme to conserve energy and provide regulated coverage fidelity. \\ \cline{2-4}      & VEC, VOR, Minmax [19] & Location information & Identify coverage holes and enabling sensors to move away from dense area. \\       \hline          \end{tabular}


title: Undefined control sequence \maketitle prints

text: I got the code, listed below as a template from my university. But when i try to delete '\price', i get the following error;               ! Undefined control sequence.     \maketitle ...prints } \par {Price: \euro \@price                                                        } \par \par \par } \par \c...     l.37 \maketitle      * * *               \documentclass[pdftex,10pt,a4paper]{book}          \usepackage{minitoc}          \usepackage{amsthm}          \usepackage{amsmath}          \usepackage{listings}          \usepackage{color}          \usepackage{fancyhdr}          \usepackage{float}          \usepackage{geometry}          \usepackage[square,authoryear]{natbib}          \usepackage[pdftex,colorlinks=true]{hyperref}          \usepackage[pdftex]{graphicx}          \usepackage{wrapfig}          \usepackage{notes}          \usepackage[official]{eurosym}          \usepackage{watermark}          \title{Lecture Notes}          \course{Name of the Course}          \university{Twente University.}          \faculty{Faculty of Electrical Engineering, Mathematics and Computer Science (EEMCS)}          \author{Author 1\\ Author 2 \\ ... \\ Author $n$}          \prints{17}          \date{Date}          \num{Reference Number}          \courseid{Course Number}          \prints{Number of Prints}          \price{Price}          %\BackgroundEPS{images/bg.eps}{80}{100}{2}          \input{preamble.tex}          \begin{document}          \maketitle      **And this is the preamble.tex file;**               \newtheorem{thm}{Theorem}[section]          \newtheorem{cor}[thm]{Corollary}          \newtheorem{lem}[thm]{Lemma}          \theoremstyle{definition}          \newtheorem{defin}[thm]{Definition}          \lstset{ %          basicstyle=\footnotesize,       % the size of the fonts that are used for the code          numbers=left,                   % where to put the line-numbers          numberstyle=\footnotesize,      % the size of the fonts that are used for the line-numbers          stepnumber=2,                   % the step between two line-numbers. If it's 1 each line      will be numbered          numbersep=5pt,                  % how far the line-numbers are from the code          backgroundcolor=\color{white},  % choose the background color. You must add           \usepackage{color}          showspaces=false,               % show spaces adding particular underscores          showstringspaces=false,         % underline spaces within strings          showtabs=false,                 % show tabs within strings adding particular underscores          frame=single,           % adds a frame around the code          tabsize=2,          % sets default tabsize to 2 spaces          captionpos=b,           % sets the caption-position to bottom          breaklines=true,        % sets automatic line breaking          breakatwhitespace=false,    % sets if automatic breaks should only happen at whitespace          escapeinside={\%*}{*)}          % if you want to add a comment within your code     }          \renewcommand{\bibname}{Recommended Reading}          \DeclareGraphicsExtensions{.pdf,.png}          \dominitoc


title: \bibnamedelima unavailable in encoding T1

text: Updated question: I am using xelatex / biber on Mac OS X 10.8.5 to write up a dissertation. My source is:               \documentclass[12pt]{report}     \usepackage{fontspec}     \usepackage[backend=biber]{biblatex}     \addbibresource{bib}          \begin{document}          \cite{Svensson2012}      \printbibliography          \end{document}      The bibliography is:               @article{Svensson2012,         title = {{Intellectual property law compliance in Europe: Illegal file sharing and the role of social norms}},         volume = {{14}},         shorttitle = {{Intellectual property law compliance in Europe}},         pages = {1147–1163},         number = {7},         journaltitle = {{New media \& society}},         author = {Svensson, M\textbackslash{}a ans and Larsson, Stefan},         date = {2012},         }     }      The author's name is Måns in the original and the bibliography is automatically generated. It is the `\textbackslash` which is causing the problem. If I remove it the problem goes away. When I run xelatex I hit the following error:               ! LaTeX Error: Command \\bibnamedelima unavailable in encoding EU1.      I am using biber version 1.8. I am afraid I don't really understand font encodings and/or how they interact with biber in this way. I would appreciate help.


title: Copy/paste an existing (Word *.doc) 'pretty looking' bibliography into LaTeX

text: How can I add the list of references into LaTeX? I have a formatted references list in Word and would like to use it in LaTeX. I do not need the connections/the reference in the text itself (cite). Upcoming problems are:   * signs    * List item Cheers!!


title: Cross-referencing to self-made counters in Alignat environment

text: I am using the `alignat` environment for equations. Now, I want to refer to some places in this environment. I have made a counter to do so.               \documentclass[a4paper]{article}     \usepackage[fleqn]{amsmath}     \usepackage{amssymb}     \usepackage{mathtools}               \newcommand{\scounter}{\newcounter{ct} \setcounter{ct}{0}}     \newcommand{\pcounter}{\refstepcounter{ct} \arabic{ct}}               \begin{document}          \scounter     \begin{alignat*}{20}     & \text{First object: } \pcounter. \label{one}\\     & \text{Second object: } \pcounter. \label{two} \\     \end{alignat*}          Now I want to reference to the first object: \ref{one}.     \end{document}      Latex does not give the reference, although it does give the following Error: `Multiple \label's: label 'one' will be lost \end{alignat}`. Can anyone tell me how to make the referencing work? Thanks! P.S. I do not want to use the regular referencing method (with the equation numbers displayed at the right of every line). This is because I want to display the values of the counter above equality signs, using `\stackrel`.


title: Checking if a PDF file is open

text: How do I check if the PDF file produced by LaTeX is currently opened by an application or not?


title: ! Missing $ inserted (normal text in Bmatrix)

text: \begin{Bmatrix}\text{Of what nacion.}\\text{Of what countrée.}\\text{Of what auncetours.}\\text{Of what parentes.}\end{Bmatrix}      Apparently, I'm supposed to insert $ but I don't know where.


title: Include Adobe Illustrator files (ai) with XeTeX

text: Adobe Illustrator files are PDF compatible. That is a regular PDF reader, ex. Sumatra-pdf, can open and view them. I was hoping it would be possible to have xetex (with xelatex) and `graphicx` to include Adobe Illustrator files directly without having to go into Illustrator and save as a PDF manually. This would simplify my workflow and make it much quicker to make changes to figures in Illustrator and then compile the xetex document to see how it looks in the text. Does anyone know if this is possible? What versions of PDF are supported (is this determined by the `graphicx` package)? Are there other PDF importing methods? Edit: in the `.log` there isn't much information:               File: image.pdf Graphic file (type QTm)      <use  "image.pdf" >      I renamed it to `.pdf` from `.ai`, otherwise it won't work at all, however, the image doesn't appear in the document. Edit 2: Here is an .ai file from the latest illustrator version (CS5) if anyone wants to play around: _link removed_


title: setting tabs by declaration rather than by example

text: Is it possible to set tab stops in some sort of initial formatting declaration, abstractly? The code examples I see around town all show tabs being set by example, with `\=` in the first line of actual text within the tabbing environment. But I would like to avoid that; my first line will never have enough text in it to fill out up to the place where the tab is to be set.


title: Fitting display math with luatex?

text: I took a latex file and edited it to be more readable on my phone. Specifically, I used the geometry package to typeset it on pages measuring 3x4. I set the text to be left justified to keep words from running outside of my margins. Now I would like to be able to get the display math to fit in the small paper size. I was editing the overlong display equations one by one, but that is too tedious. I was hoping there was a fix using luatex. I am open to any idea that fits the equations on to the page. For example, a sufficient solution would be to turn every equation into a picture and shrink the picture to fit.


title: Set ticks precision with pgfplotsset

text: First, this forum has been a great resource for me for some time now. I recently started using `pgfplots` and `tikz`, so some things I still need to figure out. I hope my question will be clear and the MWE is ok... I export my plots from Matlab using `matlab2tikz`. Some of my data happens to be in a range as shown, where standard precision on the ticklabels is not sufficient to distinguish them (everything is labeled as "1" on the y-axis). I can do the format change manually in each plot, but I really would rather do it using `\pgfplotsset` before my actual `tikzpictures` begin. What should I add to the `\pgfplotsset` command to achieve this?               \documentclass{article}     \usepackage{tikz,pgfplots}          \begin{document}         \pgfplotsset{%         every axis plot post/.append style={line width = 2pt}}               \begin{tikzpicture}     \begin{axis}     [title=Trying to set precision with pgfplotsset]     \addplot +[domain=0:1] {(x+rnd)/4000+1};     \end{axis}     \end{tikzpicture}%          \begin{tikzpicture}     \begin{axis}[     title=Precision set manually inside tikzpicture,         /pgf/number format/.cd,         fixed,precision=4]     \addplot +[domain=0:1] {(x+rnd)/4000+1};     \end{axis}     \end{tikzpicture}          \end{document}


title: Special Axis Style Customization

text: I want to design a special axis label style. The x-axis is a straight line, no arrow. Below the end of this line is the actual label, it consists of an arrow with the label in the middle of the arrow. The arrow is exactly as long as the line itself. So far I constructed it like this:               \begin{tikzpicture}     \draw (-.5,0)--(6.5,0) ;     \draw [->,>=stealth] (5.5,-.5) -- (6.5,-.5) node [midway, fill=white, inner sep = 2pt]{$r$};     \end{tikzpicture}      While this looks the way I want it to look I'm not happy with this constructive way, I'd rather have a solution by nodes. However, when I tried to to this with nodes I didn't manage to align everything properly. How can I achieve this?


title: lstaddons: Dynamic linewidth calculation

text: I use the package called "lstaddons" (creator, initial question) to get colored line backgrounds on listings. I want to color the whole line to the frame. What I miss there is a dynamic calculation of the linewidth. You can adjust the linebackgroundsep, which moves the colorbox to the left. And through linebackgroundwidth you can set the width of the box. My question is: Is there any opportunity to calculate the linewidth dynamic through a macro? I tried this one, but i think its a bit crappy...               \newdimen\lstwidth     \newdimen\lstxleftmargin     \lstxleftmargin = 15pt     \lstwidth = 0pt     \advance\lstwidth by \linewidth     \advance\lstwidth by -\lstxleftmargin   % Minus xleftmargin     \advance\lstwidth by 1pt            % Minus Rand rechts      and in the listing settings:               \lstset{         linebackgroundcolor={\ifodd\value{lstnumber}\color{codegray}\fi},         linebackgroundsep=3pt,      % lstaddons: fills the line from the left frame         linebackgroundwidth={\lstwidth}, % lstaddons: ... to the right         frame=lr,         numbersep=10pt,         xleftmargin=\lstxleftmargin,         xrightmargin=5pt     }


title: Inject LaTeX code 1:1 with LuaLaTeX

text: I would like to automate the creation of some `beamer` slides using LuaLaTeX. These are my first steps with LuaLaTeX so please excuse my ignorance.               \documentclass{beamer}          \begin{document}          \directlua{       for i=0, 5 do         tex.print("\unexpanded{\\begin{frame}}")         tex.print("Math: $x_{" .. i .. "}$")         tex.print("\unexpanded{\\end{frame}}")       end     }          \end{document}      The example compiles and gives the expected result; 6 frames with x_0,1,2,3,5 on it. I'm a bit unhappy about the additional `\unexpand`s and `\`s before `\begin` and `\end`. Is there a dedicated LuaTeX command that just inserts latex code 1:1 to the document?


title: Bibliographic style for manually added bibliography

text: I am using the `thebibliography` environment inside a LaTeX document. Right now, the entries appear in PDF like: > [1] DACUNHA-CASTELLE, D., et DUFLO, M., Probabilites et statistique- > problemes a temps mobile, Masson paris Milan Barcelone, 1993. > > [2] DOEBLIN, W., Sur les sommes d ‘ un grand nombres des variables > aleatoires independantes, Bull. Soc. Math. France, 53(1939), 23-32, 35-64. I would like to appear the numbered items followed by a dot, with no paranthesis, smth as: >   1. DACUNHA-CASTELLE, ... >   2. DOEBLIN, W., Sur les sommes... > I suppose I should specify a style inside the `\bibliographystyle` command, but which one? Thanks.


title: Memoir, babel[french] and @makecaption

text: I'm having a problem with the `memoir`, the `babel`, and `caption` packages: when compiling a document, the log returns the warning:               Package frenchb.ldf Warning: The definition of \@makecaption has been changed,     (frenchb.ldf)                frenchb will NOT customise it;     (frenchb.ldf)                reported on input line 8.      The thing is that the French `babel` is supposed to make `:` an active character, and as a result, put a space before and after it. But since the `@makecaption` macro is somehow redefined, the spaces are lost. How to force the behaviour for the typography around the `:` to be correct ? Here is a MWE:               \documentclass[a4paper,12pt,twoside,openright,final]{memoir}     \usepackage[T1]{fontenc}     \usepackage[english,francais]{babel}     \begin{document}          Blah blah blah (\ref{fig:Figure})          \begin{figure}     \caption{Xxxxx}     \label{fig:Figure}     \end{figure}     \end{document}


title: fontspec features not working correctly in floating environment

text: The fontspec properties seem to work not correctly inside a floating environment, if used with LuaLaTeX.               \documentclass{article}          \usepackage{fontspec}          \begin{document}     {     \fontspec[Color=FF0000]{DejaVu Sans}     This is a test for fontspec.     }          \begin{table}     {     \fontspec[Color=FF0000]{DejaVu Sans}     This is a test for fontspec.     }     \end{table}     \end{document}      This little example works well with XeLaTeX, but compiled with LuaLaTeX Version beta-0.70.2 (TeX Live 2012), the text inside the table environment is printed black instead of red. Is there some way to fix this behavior with LuaLaTeX? Using XeLaTeX is not really a workaround since I depend heavyly on LuaLaTeX's capabilities.


title: Delimiters as math symbols (and not delimiters)

text: I am currently using delimiters (brackets, [ and ], to be precise) as symbols in math equations. Of course, the compilator considers the brackets as delimiters, and the spacing is thus not very pleasant. See for example               $a=]_ib$      against a more aesthetically pleasing (but very ad-hoc)               $a=\ ]_i\,b$      Is there a way to define a command that will print [ and ] as regular symbols (and so add spacing accordingly)? Before anyones points me to this question, the correct answer in this case was to reverse the order of delimiters. I would like to define them so they are not delimiters at all. I still use regular brackets as delimiters sometimes, so defining a new command would be better (symbols brackets always have an index). Thanks!


title: pdfTeX warning (ext4): destination with the same identifier (nam e{page.1}) has been already used, duplicate ignored

text: I get the following warning > >     pdfTeX warning (ext4): destination with the same identifier > (name{page.1}) >     has been already used, duplicate ignored >   when compiling the following document:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{hyperref}          \title{[Title]}     \author{N.N.}          \begin{document}          \begin{titlepage}     \maketitle     \thispagestyle{empty}     \end{titlepage}          \tableofcontents     \thispagestyle{empty}          \newpage          \section{[Section]}          \end{document}      I have tried find ways to get rid of this warning by searching in other places and I have read PDFTeX destination … ignored and the other question in this place pdfTeX warning: destination with same identifier has been already used, duplicate ignored (weird behavior).


title: Can I use Wolfram Mathematica fonts in XeTeX / LuaTeX?

text: Wolfram _Mathematica_ comes with full (?) set of math fonts. Is it possible to use these fonts in XeLaTeX and LuaLaTeX? I mean something like               \usepackage[math-style=ISO,bold-style=ISO]{unicode-math}     \setmathfont[range=...]{Mathematica1}     \setmathfont[range=...,Bold]{Mathematica1b}     \setmathfont[range=...,???]{Mathematica1m}     \setmathfont[range=...,???]{Mathematica1mb}     \setmathfont[range=...]{Mathematica2}     . . .     \setmathfont[range=...]{Mathematica7}


title: Epstopdf does not compile *.eps

text: I work in WinEdt + MikTex 2.8 and mostly compile the source through PdfTexify. In order to compile eps figures in this mode I used the package epstopdf, but recently it stopped working. This is quite strange, as I can't recall what I changed in the settings of WinEdt for example. Just to eliminate this latter possibility, I re-installed WinEdt and I'm pretty sure that the settings of WinEdt are now by default - e.g. the pdf reader is set to Acrobat (before re- installing it was Sumatra). However, the problem have not gone - here is the text:               [18]MiKTeX GPL Ghostscript 8.60: **** Could not open the file ../plots/contourML-eps-converted-to.pdf .     **** Unable to open the initial device, quitting.          LaTeX Warning: Reference `fig:cs1' on page 19 undefined on input line 1146.          ! Package pdftex.def Error: File `../plots/contourML-eps-converted-to.pdf' not      found.          See the pdftex.def package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.1156 ...=true,width=5cm]{../plots/contourML.eps}          ?           Process has been terminated ...      Does anybody have an idea, hot to resolve the problem?


title: How can I hide (or blur) some code in a listing?

text: I have a code listing to write in a report, but I'd like to blur or hide some code parts with a colored box (of same length as the hidden text), so that readers cannot see the hidden parts. (Another requirement is that readers should not be able to copy & paste the hidden text from the PDF.) As an example, I would like `b=c;` in the listing below to be hidden by a black box (or blurred). For that, I define a `\confidentiel` for hiding text in a black box. It works fine on normal text ouside a listing block. However, it doesn't work inside an `mcode` listing block: instead of producing a black box, `\confidentiel{code to hide or blur}` gets printed _verbatim_. I'm using the `mcode` package to display Matlab code, but I suppose the `listings` package (rather than `mcode`) is to blame here, because `mcode` uses the `listings` package; the problem likely occurs no matter which `listings` language is used. Any idea? ![enter image description here](http://i.stack.imgur.com/2zQOx.png)               \documentclass{article}          \usepackage{tikz} %to be used with package below:     \usepackage[confidentiel]{optional}     \newlength\heightconf     \newlength\widthconf     \newcommand\confidentiel[1]{%     \opt{confidentiel}{%      \settoheight{\heightconf}{#1}%      \settowidth{\widthconf}{#1}%      \tikz{\node[inner sep=0pt,rectangle,draw,anchor=base,text height=\heightconf,text width=\widthconf,fill=black]{};}%     }%     \opt{libre}{#1}}          % package to display matlab code:          \usepackage[framed,numbered,autolinebreaks,useliterate]{mcode}          %starting document      \begin{document}            \confidentiel{this text is hidden with black box}       this text is not hidden              \begin{lstlisting}         for i=1:3 do              a=b;             \confidentiel{b=c;}             c=d         end          \end{lstlisting}     % the code above does not hide b=c; but     % prints literaly \confidentiel{b=c} but i don't want that !          \end{document}


title: Formulae PNG anti-aliasing

text: I would like to render formulae in PNG format for use in various websites. The problem is, every rendering tool I've come across seems to assume a particular background color to perform anti-aliasing, resulting in nasty color fringes when the image is displayed on a different background color. Is there a way to perform the anti-aliasing in the alpha-channel so that the equation will look nice and crisp no matter what color the background it'll be displayed on is? Or is it not possible?


title: Package clash in multilingual report

text: I m workig on multilingual report. Below code is part of my code (Pls consider it as MWE). In the code below there is package clash error               ! LaTeX Error: Option clash for package inputenc.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.33 \usepackage                     [russian]{babel}      Also chinese font cannot be printed. How can i avoid it?               \documentclass[11pt,table,a4paper]{article}     \usepackage{array,ragged2e}     \usepackage{graphicx}     \usepackage[framemethod=TikZ]{mdframed}     \usepackage{lipsum}     \usepackage[top=.5cm, bottom=2cm, left=1cm, right=1cm]{geometry}     \usepackage{wrapfig}     \usepackage{comment}     \usepackage{parskip}     \usepackage{framed}     \usepackage{sidecap}     \usepackage{setspace}     \usepackage[scaled]{uarial}     \usepackage{tikz}     \usepackage{lipsum}      \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[utf8]{inputenc}     \usepackage{fancyhdr}     \usepackage{transparent}     \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage{hyphenat}     \usepackage{xstring}     \usepackage{forloop}     \usepackage{collcell}     \usepackage{longtable}     \usepackage{makecell}     \usepackage{varwidth}     \usepackage{CJKutf8}     \usepackage[T2A]{fontenc}     %\usepackage[koi8-r]{inputenc}     %\usepackage[russian]{babel}          \begin{document}       Это мой первый многоязычный докладе.     \newline     This is my first multilingual report.     \newline     这是我的第一个多语种的报告。     \end{document}      I m in great need. Pls help me out.


title: Replace the `$$ ... $$` macro with the `\[ ... \]` macros? - Prefer the way LaTeX lays it out, but `$` are faster to write

text: Is there a way to replace the `$$ ... $$` macro with the `\\[ ... \\]` macros? (and replace inline mathmode as well) I realised the only way I can write the `\sum_{i=1}^{10} t_i` is between the `\\[ ... \\]` LaTeX maths-mode. It also seems to layout the maths nicer (bigger, with gaps). However, `$$ ... $$` is faster to write... so is there a way to replace the `$$ ... $$` macro, to act in the LaTeX fashion?


title: How to transform Google docs tables into Latex Tables?

text: I usually do all of my tables using Google Docs spreadsheet. This is a good and quick way to organize information and create quick tables. Now I am writing a document in Latex and I would like to port the tables. I tried downloading the sheet as a CSV file and then using the `csvsimple` package to convert it into latex, but this has several faults (does not copy cell borders, does not respect page width and height, etc), and in the end with all the configurations it is almost just as complex as creating the tables myself. I recognize some of the problems are inherent to the CSV file format (no package can _guess_ information that the CSV file does not contain), so I was wondering: Is any other way of quickly porting my Google Doc tables to latex? Here is a link with a simple set of three tables and a graph that I would like to port to latex: ![enter image description here](http://i.stack.imgur.com/ivX99.png)


title: Changing the dot size in the table of contents

text: Can one change the size of the dots in the table of contents, those that run between the section name and the page? Eilon


title: Use of underline and siunitx in a table

text: I have a table of numbers that are aligned using the 'S' format of siunitx (so they are aligned by the decimal point). I need to mark the statistically significant numbers somehow, and using bold font or asterisks to mark these don't make them stand out very well. I am not allowed to use colour in the table, so I was thinking of trying underlining. However, if I use `\underline{}`, the underlined numbers are no longer aligned by the decimal point and are left aligned instead. Is there any way I can underline items whilst keeping them aligned by the decimal point? Here is a basic version of the code for the table I have so far:               \documentclass{article}     \usepackage{etoolbox,siunitx,booktabs,threeparttable,multirow,array,graphicx}     \robustify\bfseries     \robustify\tnote          \begin{document}     \sisetup{detect-weight=true,detect-inline-weight=math,table-align-text-post=false}     \begin{table}         \caption{Insert caption here}         \centering         \begin{threeparttable}[b]             \begin{tabular}{SS}             \toprule             {Column 1} & {Column 2}\\             \midrule             7.1 & 4.2\\             \underline{8.7} & 6.5\\             9.3 & \underline{1.0}\\             \bottomrule              \end{tabular}         \end{threeparttable}     \end{table}     \end{document}      Not sure how to post an image of what the output looks like. I did have a search online for anyone asking a similar question, but couldn't find anything.


title: Fit inside enumerate

text: ![](http://i.stack.imgur.com/B1LBo.jpg)               \begin{enumerate}       \item $\mathcal{D}(m)=0$ for $m\in\mathbb{Z}$,            \item $\mathcal{D}(x^{-1})=-x^{-1}\sigma(x^{1})\mathcal{D}(x)$,            \item $\mathcal{D}(x^{n})=\left( {\sigma ({x^{n - 1}}) + \sigma ({x^{n - 2}})x + ... + \sigma (x){x^{n - 2}} + {x^{n - 1}}} \right)\mathcal{D}(x)$,            \item $\mathcal{D}(x^{-n})=- \left( {\sigma ({x^-n}){x^-1} + \sigma ({x^{-(n - 1)}}){x^-2} + ... + \sigma ({x^-2}){x^{-(n - 1)}} + \sigma ({x^-1}){x^-n}} \right)\mathcal{D}(x)$ for $n\geq1$.     \end{enumerate}      How can I fit the last equation in article'paper size?


title: Cannot get 'pygmentize' to work correctly on mac

text: I am using TeXworks on Mac osX 10.7.5 and I'm trying to compile some python code within my tex file but with limited success. My tex file looks like:               \documentclass[12pt,A4]{article}     \usepackage{minted}     \begin{document}          \begin{minted}{python}              def __init__(self, x, y):              self.x=x             self.y=y          \end{minted}          \end{document}      When I run the tex file with the command:               pdflatex --shell-escape path.tex      I get the following error:               ! Package minted Error: You must have `pygmentize' installed to use this packag     e.      The strange thing is, when I run the command, then type "quit". The PDF is produced as expected but how can I get it to produce the file without the error? I have installed the latest version of minted and pygments. The terminal finds pygmentize:               ucbthsa-2:bin ucbthsa$ which pygmentize     /Library/Frameworks/Python.framework/Versions/Current/bin/pygmentize      I have had a look at another similar question but it has not helped


title: page header logo overlapping page header text

text: I am using the following LaTeX source to place a logo into page header:               \pagestyle{fancy}     \chead{\includegraphics[width=1.5cm,keepaspectratio]{./docs/log4cplus}}     \setlength{\headheight}{47.0pt}     \addtolength{\topmargin}{-4\baselineskip}      Unfortunately, when the text is long, it overlaps the logo: ![overlapping text/logo](http://i.imgur.com/xB8yWHi.png?1) Can I fix this by raising the logo a little bit or by inserting some vertical white space on pages where the header text is too long/overlaps?


title: How to remove annoying header and footer for some pages that are intentionally made landscape?

text: I am writing a book where some tables need wider space. The only solution is to make the tables in intentionally-made landscape pages. Unfortunately, there are annoying headers and footers on the landscape pages. How to remove those annoying header and footers? The following is my "minimal" code snippet:               \documentclass{book}     \usepackage[a4paper,margin=20mm]{geometry}     \usepackage{lscape}     \usepackage{lipsum}     \usepackage{calc}     \usepackage{longtable,array}          \begin{document}     \chapter{One}     \lipsum[1]     \section{One One}     \lipsum[2]          \pagestyle{empty}     \begin{landscape}     \begin{longtable}{|m{0.4\textwidth-2\tabcolsep-1.5\fboxrule}|m{0.6\textwidth-2\tabcolsep-1.5\fboxrule}|}     \hline     a & b\\\hline     c & d\\\hline     \end{longtable}     \end{landscape}     \pagestyle{plain}          \lipsum[3]     \end{document}      * * * **EDIT 1:** I made a correction in the column width, i.e., changing `2\fboxrule` to `1.5\fboxrule`. The former calculation is wrong because the rule between 2 columns should NOT be calculated twice. I slipped a little here. * * * **EDIT 2:** Herbert's solution is the final answer.


title: How to use Windows fonts with memoir class

text: I am writing my thesis using the `memoir` class within MiKTeX on Windows 7. However, I want to use some of the Windows fonts (e.g., `Cambria`). Is it possible to be done?


title: Why does \vspace*{0pt} add vertical space?

text: I'm trying to format the title of the table of contents using the `tocloft` package. It inserts code that looks like the following.               \par     \vspace*{\cftbeforetoctitleskip}%     % code to typeset \contentsname      The `\vspace*` is adding unwanted space. Here's a minimal example demonstrating the problem.               \documentclass{article}     \usepackage{showframe}     \begin{document}     \vspace*{0pt}%     ASDF     \end{document}      Compare that to `\vspace{0pt}` (or simply omitting the `\vspace` line altogether). The difference between `\vspace` and `\vspace*` is clear. With the star, it expands to               \dimen@\prevdepth     \hrule \@height\z@     \nobreak     \vskip#1%     \vskip\z@skip     \prevdepth\dimen@      and without the star, it expands to just the two `\vskips`. Why is there the extra space? (And bonus question: Doesn't this make `\vspace*` sort of worthless since the star only has a use when TeX is discarding items?) **Edit:**   I was able to fix my real problem (with the table of contents) by using `\patchcmd` from `etoolbox`.


title: Tikz overrides one of my defined colors when I use left color, middle color and right color, how to fix this?

text: So I want to gradually change colours across the `double arrow` from white, to olive, to green. How to stop tikz from overriding my middle color?               \documentclass[landscape]{article}     \usepackage[a2paper]{geometry}     \usepackage{tikz}     \usetikzlibrary{fadings,shapes.arrows,shadows,arrows,positioning,shapes}          \pagenumbering{gobble}          \begin{document}          \begin{tikzpicture}[scale=2,node distance=1cm, auto,baseline=-.5ex]          \node (dummy) at (-5,-8) {};           \begin{scope}[remember picture,overlay,shift={(dummy.center)}]          \node[double arrow,left color=white,middle color=olive!70, right color=green!35,very thick, inner sep=1em, minimum size=3em, text centered,draw] {I \hspace{1cm} L O V E \hspace{1cm} M Y\hspace{1cm} J O B};          \end{scope}          \end{tikzpicture}     \end{document}


title: Vertical alignment of fonts of different sizes on same line

text: In XeTeX, if I have a line with two font sizes, how can I arrange to have the smaller font aligned to either the center or top of the line? e.g.               \newfontinstance\biggoth[Color=000000,Scale=5.0]{Cloister Black}     \newfontinstance\smallgoth[Color=000000,Scale=2.0]{Cloister Black}               \biggoth Hello \smallgoth World      The "Hello" aligns to the bottom of the line. I'm grateful for any thoughts and input.


title: How do I set a variable inside of \rlap

text: Two questions please about this code example: 1) Why does `\rlap` prevent me from setting a variable?   2) How do I set a variable from within an `\rlap` that is visible outside of `\rlap`? I'm using MikTex 2.8. Thanks for any clue!               \documentclass{article}     \newif\ifmycheck     \begin{document}     \rlap{\mychecktrue}     % \mychecktrue     \ifmycheck     Check True!     \else     Check False!  % always takes this path!     \fi     \end{document}