title: UTF8 Encoding/Mapping in the pdf with PdfTeX (Application to Fourier Font)

text: After many search, I have found how to have a pretty good UTF8 mapping (which give no bad result on Acrobat Pro accessibility checking) for `lmodern` and `amsfonts`. The code needed is in the minimal example below (Maybe some of you maybe interested so I commented it a little). But now, I decided to change my font to the one of the `fourier` package and I have some difficulties to figure how to get proper UTF8 encoding in the output pdf with this font. Normally I should add commands like the following:               \pdfglyphtounicode{<IdentifierSymbol>}{<UTF8Code>}      But I don't know where to find what I have called call the `<IdentifierSymbol>` and `<UTF8Code>`. I have done many test but without success. I would greatly appreciate your help. Here is the minimal example to show the difference of UTF8 mapping when using Fourier fonts instead of Latin Modern font. You can see the difference by copy-pasting the content or by an accessibility check if you have Acrobat Pro.               \documentclass[]{article}          %PdfTeX settings for a correct UTF 8 Mapping     %------------------------------------------------------     \usepackage{ifpdf}     \ifpdf    \input{glyphtounicode.tex}    %Part of modern distribution           %%%\input{glyphtounicode-cmr.tex}     %Additionnal glyph: You must grab it from pdfx package           \pdfgentounicode=1     \else  %Place here the settings for other compilator     \fi               %Encoding + cmap (to get proper UTF8 mapping)     %------------------------------------------------------     \usepackage{cmap}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}               %NB: CHANGE lmodern AND fourier TO SEE THE PROBLEM OF MISSING UNICODE CHARACTERS     %     You can see this on Acrobat Pro with acessibility checking or simply by copy-pasting the content.     %     Of course copy paste is not perfect in both case but it is better with lmodern     %------------------------------------------------------     \usepackage{lmodern}     \usepackage{fourier}               %AMS Math + UTF8 mapping of ams symbols     %------------------------------------------------------     \usepackage{amsmath}      \usepackage{amssymb} % I load it after Fourier else I have more incorrect utf8 mapping (with \geqslant for example)     %Correct UTF8 mapping for ams fonts     \ifdefined\pdffontattr% \ifdefined is part of the e-TeX extension, which is part of any modern LaTeX compiler.          \immediate\pdfobj stream file {umsa.cmap}         {\usefont{U}{msa}{m}{n}\pdffontattr\font{/ToUnicode \the\pdflastobj\space 0 R}}         \immediate\pdfobj stream file {umsb.cmap}         {\usefont{U}{msb}{m}{n}\pdffontattr\font{/ToUnicode \the\pdflastobj\space 0 R}}     \fi               %Start document     %------------------------------------------------------     \begin{document}          Issue with mapsto : ${\mathcal F} : \boldsymbol{\eta} \in {\mathbb{R}}^{np}\ \mapsto {\mathcal F}\left(\boldsymbol{\eta} \right)\in \mathbb{R}$          \bigskip     Issue with sqrt : $\sqrt{X}$          \bigskip     Issue with parenthesis : $X \geqslant \left(\frac{1}{2}\right)^2$          \bigskip     Issue with sum : $\sum_{n=0}^\infty X^n$          \end{document}


title: $$, \[ \] and equation environment alignment

text: I'm using `scrreprt` class and I'm having troubles with different behavior of `$$` and `\[ \]`-written equations and equation environment. The problem is that alignment is not the same: `$$` equations are centered while equations in equation environment are left aligned. For example, the following code               Equations:     \begin{equation}\label{nelineq}     f(x)=0     \end{equation}     \begin{equation*}\label{nelineq}     f(x)=0     \end{equation*}     $$     f(x)=0     $$     \[ f(x)=0 \]      produces ![output](http://i.stack.imgur.com/Ewp7g.png) I would like to make all three usages consistent (not yet sure if centered or left aligned). The question is, how to **permanently change default alignments** for all three cases? But without use of `align` or similar environments (dont want to edit all existing equations). I know that `$$` is deprecated, but what about other two methods?


title: Beamer columns won't align minted code and TikZ diagram

text: I'm trying to create a two column Beamer slide, with the first column displaying a short minted code listing, and the second column displaying a TikZ diagram. Unfortunately the minted code listing is getting pushed to the bottom of the slide, despite the use of `[t]` placement specifiers both the `\begin{columns}` and `\columns` directives. Ideally I'd like the code aligned to the top of the diagram. LaTeX code is as follows:               \documentclass{beamer}     \usepackage{minted}     \usepackage{hyperref}     \usepackage{tikz}     \usepackage{verbatim}          \usetheme{CambridgeUS}          \usetikzlibrary{calc,positioning,shapes,shadows,arrows}          \usemintedstyle{default}     \definecolor{mintedbg}{rgb}{0.8,0.8,0.8}     \newminted{cpp}{bgcolor=mintedbg}     \newminted{make}{bgcolor=mintedbg}          \begin{document}          \begin{frame}[fragile]     \frametitle{Pointers}     \begin{columns}[t]     \column[t]{0.25\paperwidth}     \begin{cppcode}     int a = 5;     int * ptr = &a;      \end{cppcode}     \column[t]{0.7\paperwidth}     \begin{tikzpicture}     \tikzstyle{r}=[rectangle, outer sep=0pt, inner sep=0pt, minimum width=2.5cm, minimum height=0.5cm, draw=black!100, fill=blue!20]     \tikzstyle{textr}=[rectangle, outer sep=0pt, inner sep=0pt, minimum width=2.5cm, minimum height=0.5cm, draw=black!100]     \matrix[draw=black!100, row sep=1pt, column sep=1pt]     {     \node[textr] {Address}; \pgfmatrixnextcell \node[textr] {Data Value}; \pgfmatrixnextcell \node[textr] {Notes}; \\     \node[r, name=addr1] {0xFFFFFFA0}; \pgfmatrixnextcell \node[r, name=data1] {5}; \pgfmatrixnextcell \node {int a=5}; \\     \node[r, name=addr2] { }; \pgfmatrixnextcell \node[r, name=data2] { }; \pgfmatrixnextcell \node {}; \\     \node[r, name=addr3] { }; \pgfmatrixnextcell \node[r, name=data3] { }; \pgfmatrixnextcell \node {}; \\     \node[r, name=addr4] { }; \pgfmatrixnextcell \node[r, name=data4] { }; \pgfmatrixnextcell \node {}; \\     \node[r, name=addr5] {0xFFFFFFB0}; \pgfmatrixnextcell \node[r, name=data5] {0xFFFFFFA0}; \pgfmatrixnextcell \node {int * ptr=a;}; \\     \node[r, name=addr6] { }; \pgfmatrixnextcell \node[r, name=data6] { }; \pgfmatrixnextcell \node {}; \\     \node[r, name=addr7] { }; \pgfmatrixnextcell \node[r, name=data7] { }; \pgfmatrixnextcell \node {}; \\     \node[r, name=addr8] { }; \pgfmatrixnextcell \node[r, name=data8] { }; \pgfmatrixnextcell \node {}; \\     \node[r, name=addr9] { }; \pgfmatrixnextcell \node[r, name=data9] { }; \pgfmatrixnextcell \node {}; \\     };     \draw[line width=2pt, ->] (data5.north) .. controls (data3.north) and (addr3.south) .. (addr1.south);     \end{tikzpicture}     \end{columns}     \end{frame}          \end{document}


title: Not showing a and b for subfigures

text: I know there was a previous post about this but no matter the changes I make as shown in various posts, I can not get the caption to show a or b like it is suppose to. Instead I get Figure 1.1, Figure 1.2 and then the end caption is Figure 1.3. I want the subfigures labeled a and b and then have the overall figure labeled 1.1. (Note I looked at the previous post and modified it to look like it and it still did not work. I have the packages. Any advice would be great!               \begin{figure}[htb]       \centering       \begin{subfigure}         \includegraphics[width=0.3\textwidth]{Chapter-1/figs/Image1.pdf}           \caption[Image 1]{Image 1}           \label{fig:I1}       \end{subfigure}            \begin{subfigure}         \includegraphics[width=0.4\textwidth]{Chapter-1/figs/Image2.pdf}           \caption[Image 2]{Image2}       \end{subfigure}       \caption[Images]{Images}       \label{fig:images}     \end{figure}


title: Using LaTeX on Ubuntu with MiKTeX directory installed in Windows

text: I have been using a MiKTeX distribution installed on Windows 7, compiling my documents on an Ubuntu 12 partition. I somehow managed to change the directory where pdfLaTeX has to look for packages while compiling, choosing the same directory used under windows. I did this only because of troubles with available space in my ubuntu partition. However, I recently changed to Ubuntu 14 (the windows partition is unchanged). I am not able to compile and still it seems I have too less available space for texlive-full. Can someone explain me how to change the directory to compile from ubuntu without installing a LaTeX distribution on this partition?


title: New class prevent XeLaTeX to compile the section title

text: I created a new class, called `capitulo` to prevent a page break with every chapter. But when I activate those code lines, the section number won't print. Here's a MWE:               \documentclass[12pt,twoside,twocolumn]{constitution}     \usepackage[top=3cm, bottom=2cm, inner=3cm,outer=2.5cm]{geometry}% See geometry.pdf to learn the layout options.     \usepackage[portuguese]{babel}          \begin{document}          \capitulo{Generalidades}     \article{Denominação e Sede}     \section{} A ABCD, adiante também designada por ABCD, foi fundada a X de X de 1994 e tem a sua sede na cidade XY.      and the `constitution.cls` is:               \NeedsTeXFormat{LaTeX2e}[1994/06/01]          \ProvidesClass{constitution}[2009/05/15 v0.0.1 Document class for typesetting a constitution]          \LoadClass{report}          \RequirePackage[letterpaper,margin=1in]{geometry}     \RequirePackage[colorlinks,linkcolor=blue]{hyperref}     %\usepackage{hyperref}     \RequirePackage{titlesec}     \RequirePackage{titletoc}     \RequirePackage{paralist}          %\newcommand{\bylaw}[1]{\part{#1} \setcounter{section}{0}}     %\renewcommand{\partname}{Bylaw}          \titleclass\capitulo{straight}[\part]     \titleformat{\capitulo}[display]{\filcenter\LARGE\normalfont\bfseries}{Cap\'{\i}tulo \thecapitulo}{0pt}{\filcenter\Large\normalfont\bfseries}     \titlespacing*{\capitulo}{0mm}{*4}{*2.3}[0mm]     \newcounter{capitulo}     \renewcommand\thecapitulo{\Roman{capitulo}}          \titlecontents{capitulo}     [1.5em]     {\bfseries}     {\contentslabel{2.3em}}     {\hspace*{-2.3em}}     {\titlerule*[1pc]{.}\contentspage}          \titleclass\article{straight}[\part]     \titleformat{\article}[display]{\filcenter\normalfont\bfseries}{Artigo \thearticle}{0pt}{\filcenter\normalfont\bfseries}     \titlespacing*{\article}{0mm}{*4}{*2.3}[0mm]     \newcounter{article}     \renewcommand\thearticle{\arabic{article}}          \titlecontents{article}     [1.5em]     {\bfseries}     {\contentslabel{2.3em}}     {\hspace*{-2.3em}}     {\titlerule*[1pc]{.}\contentspage}          %TEXTO QUE ESTAVA COMENTADO     \makeatletter     \renewcommand\section{\@startsection     {section}{1}{0mm}%     {-\baselineskip}%     {-0.5\baselineskip}%     {\normalfont\normalsize\bfseries}}%     \makeatother     %TEXTO QUE ESTAVA COMENTADO          \makeatletter     \@addtoreset{section}{article}     \makeatother     \titleformat{\section}[runin]{\normalfont\scshape}     {Sec\c{c}\~ao \thesection.}{.5em}{}[\quad]          \renewcommand{\thesection}{\arabic{section}}      \renewcommand{\theenumi}{\alph{enumi}}     \renewcommand{\theenumii}{\roman{enumii}}      My question is: I want the sections to be presented as `Seccção 1` and the chapter titles to get formatted as is.


title: pgfplots ybar issue

text: I'm having trouble with pgfplots using ybar. When I try:               \begin{tikzpicture}     \begin{axis}[height=4.5cm, width=8cm, ybar, axis x line=bottom, axis y line=left, grid=none, ytick={0,10,20}, xmin=0, xmax=7, xtick={1,...,6}, x axis line style=-]     \addplot+[ybar] plot coordinates {(1,16) (2,18) (3,23) (4,13) (5,16) (6,14)};     \end{axis}     \end{tikzpicture}      I get this: ![enter image description here](http://i.stack.imgur.com/Hleyu.png) Which isn't what I wanted, since 4 should have a height of 13. Trying this:               \begin{tikzpicture}     \begin{axis}[height=4.5cm, width=8cm, ybar, axis x line=bottom, axis y line=left, grid=none, ytick={0,10,20}, xmin=0, xmax=7, xtick={1,...,6}, x axis line style=-]     \addplot+[ybar] plot coordinates {(1,16) (2,18) (3,23) (4,13) (5,16) (6,0)};     \end{axis}     \end{tikzpicture}      Gives this: ![enter image description here](http://i.stack.imgur.com/YAgm1.png) Am I doing something wrong? How come I can't get the bars to be the correct heights?


title: How do I use frontmatter without maketitle in LyX?

text: With the LyX file included below, I appear to need to use frontmatter tags. I try to preview the thing in PDF. But maketitle makes the title page appear twice with broken numbering of author addresses. I want it to be abc-numbered. Disabling maketitle (like so) makes the title page disappear. How do I get the thing working the way I expect?               #LyX 2.0 created this file. For more info see http://www.lyx.org/     \lyxformat 413     \begin_document     \begin_header     \textclass elsarticle     \begin_preamble          \renewcommand\maketitle{}     \end_preamble     \use_default_options true     \maintain_unincluded_children false     \language english     \language_package default     \inputencoding auto     \fontencoding global     \font_roman default     \font_sans default     \font_typewriter default     \font_default_family default     \use_non_tex_fonts false     \font_sc false     \font_osf false     \font_sf_scale 100     \font_tt_scale 100          \graphics default     \default_output_format default     \output_sync 0     \bibtex_command default     \index_command default     \paperfontsize default     \spacing single     \use_hyperref false     \papersize default     \use_geometry false     \use_amsmath 1     \use_esint 1     \use_mhchem 1     \use_mathdots 1     \cite_engine natbib_authoryear     \use_bibtopic false     \use_indices false     \paperorientation portrait     \suppress_date false     \use_refstyle 1     \index Index     \shortcut idx     \color #008000     \end_index     \secnumdepth 3     \tocdepth 3     \paragraph_separation indent     \paragraph_indentation default     \quotes_language english     \papercolumns 1     \papersides 1     \paperpagestyle default     \tracking_changes false     \output_changes false     \html_math_output 0     \html_css_as_file 0     \html_be_strict false     \end_header          \begin_body          \begin_layout Standard     \begin_inset ERT     status open          \begin_layout Plain Layout               \backslash     begin{frontmatter}     \end_layout          \end_inset               \end_layout          \begin_layout Title     title     \end_layout          \begin_layout Author     \begin_inset Argument     status open          \begin_layout Plain Layout     a1     \end_layout          \end_inset          author1     \end_layout          \begin_layout Author     \begin_inset Argument     status open          \begin_layout Plain Layout     a2     \end_layout          \end_inset          author2     \end_layout          \begin_layout Author     \begin_inset Argument     status open          \begin_layout Plain Layout     a3,a4     \end_layout          \end_inset          Author3     \end_layout          \begin_layout Address     \begin_inset Argument     status open          \begin_layout Plain Layout     a1     \end_layout          \end_inset          address1     \end_layout          \begin_layout Address     \begin_inset Argument     status open          \begin_layout Plain Layout     a2     \end_layout          \end_inset          Address2     \end_layout          \begin_layout Address     \begin_inset Argument     status open          \begin_layout Plain Layout     a3     \end_layout          \end_inset          address3     \end_layout          \begin_layout Address     \begin_inset Argument     status open          \begin_layout Plain Layout     a4     \end_layout          \end_inset          address4     \end_layout          \begin_layout Abstract     This paper is dedicated to...     \end_layout          \begin_layout Keywords     My, keywords     \end_layout          \begin_layout Standard     \begin_inset ERT     status open          \begin_layout Plain Layout               \backslash     end{frontmatter}     \end_layout          \end_inset               \end_layout          \begin_layout Standard     Some normal text goes here.     \end_layout          \end_body     \end_document


title: Find the furthest node in a list

text: I have nodes on a parametric path and I want to know witch node is the furthest from (0,0). I tried this ugly thing :               \documentclass[a4paper]{article}     \usepackage[marginparsep=3pt, top=2cm, bottom=1.5cm, left=1.5cm, right=1.5cm]{geometry}          \usepackage{tikz}     \usetikzlibrary{calc,intersections}          \tikzset{small dot/.style={fill=black,circle,scale=0.3},}               \newcommand{\CoorXY}[1]{%     \pgfmathsetmacro\PjX{3*cos(\A)}     \pgfmathsetmacro\PjY{5*sin(\A)}     \node[small dot,label={[font=\scriptsize]#1}] at (\PjX,\PjY) {}     }     \begin{document}     \begin{tikzpicture}          \def\tmpB{0}     \def\Max{0}     \foreach \A in {0,10,...,360} {     \CoorXY{\A} ;     \pgfmathparse{veclen(\PjX,\PjY)} ;     \let\tmpA\pgfmathresult ;     \pgfmathifthenelse{\tmpA>\tmpB}{\A}{\Max} ;     \let\Max\pgfmathresult ;     \pgfmathifthenelse{\tmpA>\tmpB}{\tmpA}{\tmpB} ;     \let\tmpB\pgfmathresult ;     \message{Max \tmpB pour \Max}     }                \end{tikzpicture}     \end{document}      but it is not working. Any idea why, and there is certainly a better idea. Thank you.


title: How can I change the font size of the title and the font size of the authors in Latex?

text: I need a font size of 16pt for the title and 12pt for the authors. I'm writing an article class document in 11pt:               \documentclass[11pt, a4paper, twocolumn]{article}


title: Inline math or \textit for author defined math constants?

text: Wondering if people here have a thought on what the best practice is here (if it matters). I used to use baskerville (well, the `baskervald` package) as my main font and charter as my math font (since baskerville has no math font). Since there was a slight difference in the style of the italicized font, I would put all author defined constant symbols (e.g., "Let _a_ be a number such that....") in text in inline math mode environments to preserve a consistent look between occurrences of that symbol in the text and in equations. Now I use Palatino (or whatever you'd call the Palatino equivalent provided by `mathpazo`) and so don't have to worry about the font matching issue, is there any difference between $a$ and \textit{a} in that case? I think I'd still prefer to use $a$ since it makes more sense semantically (math constants in math mode....), but I'm wondering if there are any downsides or really any differences at all. Is the italic math "a" any different from the italic text "a"? Is there any reason to prefer \texit{a} to $a$? Bonus Question (that would be nice, but not mandatory, for an answer to address): where can I find information about math fonts and how LaTeX calls them?


title: Need a smaller size for \sum

text: Using the following code, I get a nice emulation of the calculator screen. However, I'm looking for a way to make the summation signs smaller. Any suggestions?               \documentclass{article}     \usepackage{tikz}     \usepackage{amsmath}          \usepackage{xparse}     \newcommand\tsurd{\ensuremath{\sqrt{\phantom{i}}}}     \newcommand\txbar{\ensuremath{\overline{\text{x}}}}     \newcommand\sumx{\ensuremath{\sum{\text{x}}}}     \newcommand\sumxsq{\ensuremath{\sum{\text{x}}^2}}     \newcommand\sigmax{\ensuremath{\sigma{\text{x}}}}     \ExplSyntaxOn     \NewDocumentCommand{\calcinput}{m}     {      \tl_map_inline:nn { #1 } { ##1 \hspace{0pt} }     }     \ExplSyntaxOff               \begin{document}          \def\onevarstats{\calcinput{1-Var\ Stats}}     \def\xbar{\calcinput{\ \txbar:1.23}}     \def\mysumx{\calcinput{\ \sumx:12}}     \def\mysumxsq{\calcinput{\ \sumxsq:140}}     \def\s{\calcinput{\ Sx:3.2}}     \def\mysigmax{\calcinput{\ \sigmax:2.2}}     \def\n{\calcinput{\ n:7}}          \begin{center}     \begin{tikzpicture}[font=\large\ttfamily]     \draw (0,0) rectangle (5,-4);     \node[align=flush left,text width =5cm,      anchor=north west,inner sep=1pt] (onevarstats) {\onevarstats};     \node[align=flush left,text width =5cm,      anchor=north west,inner sep=1pt] (xbar) at (onevarstats.south west) {\xbar};     \node[align=flush left,text width =5cm,      anchor=north west,inner sep=1pt] (mysumx) at (xbar.south west) {\mysumx};     \node[align=flush left,text width =5cm,      anchor=north west,inner sep=1pt] (mysumxsq) at (mysumx.south west) {\mysumxsq};     \node[align=flush left,text width =5cm,      anchor=north west,inner sep=1pt] (s) at (mysumxsq.south west) {\s};     \node[align=flush left,text width =5cm,      anchor=north west,inner sep=1pt] (mysigmax) at (s.south west) {\mysigmax};     \node[align=flush left,text width =5cm,      anchor=north west,inner sep=1pt] (n) at (mysigmax.south west) {\n};     \end{tikzpicture}     \end{center}          \end{document}


title: Hat accent on bold greek letters in math mode

text: I would like to insert an **hat accent** on **bold letters/symbols** in **math mode**. For latin letters, e.g. the `q` char, I insert this commands in my preamble               \newcommand{\paramhat}[1]{\boldsymbol{\hat{\textbf{#1}}}}     \newcommand{\param}[1]{\textbf{\text{#1}}}      And then `\param{q}` and `\paramhat{q}` in the text and everything work as expected. But the question is: how to make this to work with **greek letters/symbols**? I need to use it on a `\theta` symbol. I've tried `$\boldsymbol{\hat{\theta}}$` but I think that the hat accent has slightly shifted to the right, as shown in the following image. ![bold theta with hat accent](http://i.stack.imgur.com/l3eka.png) There is a way to move the hat accent slightly to the left? * * * _Notes:_   * `amsmath` package loaded   * `euler` font for math   * `\usepackage[T1]{fontenc}`   * `\usepackage[utf8]{inputenc}`


title: BPChem's \IUPAC conflicting with hyperref

text: I can't compile when attempting to use `\IUPAC` inside a heading; outside a heading works fine. Minimal working example: uncomment `\section` to see the error.               \documentclass[a4paper, 11pt, titlepage]{article}      \usepackage{bpchem}          \usepackage{hyperref}           \begin{document}          %\section{\IUPAC{4,4''-bis[2-(4-meth\|oxy-2,6-di\|methyl\|phenyl)\|eth\|ynyl]\|\-5,5''\-bis\|(meth\|oxy\|meth\|oxy)-2,2':6',2''-ter\|pyr\|idine}}          \IUPAC{4,4''-bis[2-(4-meth\|oxy-2,6-di\|methyl\|phenyl)\|eth\|ynyl]\|\-5,5''\-bis\|(meth\|oxy\|meth\|oxy)-2,2':6',2''-ter\|pyr\|idine}          \end{document}


title: \setcounter{} destroyed my file, it does not compile any more

text: I was doing `\paragraph` to include a third subsection but my third subsection came out not numbered at all. I got help from someone suggesting me to use `setcounter` (see my related question: Is there a \subsubsubsection command? ). The problem is that my thesis failed to compile! I deleted the command, and my file still not working! I used:               \setcounter{tocdepth}{4}     \setcounter{secnumdepth}{4}      what could be happening??


title: Correct font size of section and subsection

text: I have the following:               \documentclass[noragright,centerchapter,12pt]{thesis}     \usepackage[margin=1in]{geometry}     \setcounter{tocdepth}{4}     \setcounter{secnumdepth}{4}     \author{cat}     \title{cat}     \adviser{cat}     \begin{document}          \maketitle          \parindent 1em%          \frontmatter     \tableofcontents          \chapter{cats}     \section{cats}     \subsection{cats}          \end{document}          "thesis.cls" is a style file provided by my university.       Can some please help me as to how I can make the font size of the subsections the same as that of section? My thesis needs to have the same font throughout...many thanks again


title: Problem with visibility and compilation for pstricks figure

text: I have been trying to find the solution to get my code to compile, which has an error message similar to this one. In his example, he was giving the wrong number of dimensions for one of his objects. However, in my example, the problem is between two almost identical lines of code. Here is a minimal working example in which commenting the second point object makes the point A appear, and removing the comment makes the image vanish:               \documentclass{article}        \usepackage{pst-solides3d}     \usepackage{fp}          \FPeval{\a}{2}     \FPeval{\b}{2}          \begin{document}         \begin{pspicture}[solidmemory](-4,-4)(10,10)             % ================== POINTS ==================                 % Doesn't show unless point B is not included             \psSolid[object=point,args=0 0 \a, name=A, text=A, pos=uc]                 % Remove this and the first point appears             \psSolid[object=point,args=0 \b \a, name=A, text=B, pos=uc]         \end{pspicture}     \end{document}      The only difference between these two is `\b` as the y input.   They are both points with 3 xyz coordinates so it's not a dimension error. Does anyone know why this would be occuring? This is the error output:               Error: /typecheck in --mul--     Operand stack:        xObservateur   --nostringval--   0.707107     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1926   1   3   %oparray_pop   1925   1   3   %oparray_pop   1909   1   3   %oparray_pop   1803   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   --nostringval--     Dictionary stack:        --dict:1174/1684(ro)(G)--   --dict:0/20(G)--   --dict:117/200(L)--   --dict:752/1012(L)--   --dict:203/300(L)--   --dict:752/1012(L)--   --dict:3/6(L)--     Current allocation mode is local     Current file position is 5441     MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1          ** WARNING ** Couldn't open font map file "kanjix.map".     ** WARNING ** Filtering file via command -->mgs.exe -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile="C:/Users/Chase/AppData/Local/Temp/mik1044.tmp" "C:/Users/Chase/AppData/Local/Temp/mik1043.tmp" -c quit<-- failed.     ** WARNING ** Image format conversion for PSTricks failed.     ** WARNING ** Interpreting special command pst: (ps:) failed.     ** WARNING ** >> at page="1" position="(262.098, 433.624)" (in PDF)     ** WARNING ** >> xxx "pst:  tx@Dict begin STP newpath   1. .setopacityalpha  1 setlin"      )     (see the transcript file for additional information)     Output written on TexSE*-*minimalExample*For*SE.pdf (1 page).     SyncTeX written on TexSE - minimalExample For SE.synctex.gz.     Transcript written on "TexSE - minimalExample For SE.log".      It also mentions this above that:               Overfull \hbox (68.33841pt too wide) in paragraph at lines 15--16     [][]      [1]      I tried looking into hbox overfull errors but none of the workaround people had seemed to work. It seems like there should be a very simple fix if it were an hob overfull error that would force everything to work out and compile onto the page, but I couldn't find it regarding figures. * * * * * * I have also provided a larger tex here which is _hopefully_ closer to the image I would want to create and insert the text into my master pdflatex file, although I can't tell what it will look like due to the issue stated above. I have asked a question with a the same essential tex here, on a different thread about the higher end goal for this figure here. This is the same tex given there but without the commented out lines, so this will not give the full desired image:               \documentclass{article}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{pst-solides3d}     \usepackage[nomessages]{fp}          \pagestyle{empty}               \def \planeLocRatio {.7}            % ratio of z location of plane and radius     \def \radius {0.5}     \def \planeLen {1}              % half of one side of the plane     \FPeval{\contAng}{pi/4}         % angle from z axis to intersection of plane at sphere edge     \FPeval{\a}{radius*cos(contAng)}    % z location at plane intersection     \FPeval{\a2}{a/2}     \FPeval{\b}{radius*sin(contAng)}    % radius of circle at plane intersection     \FPeval{\b2}{b/2}     \FPeval{\h}{radius-radius*cos(contAng)} % z distance from top of sphere to plane     \FPeval{\h2}{h/2}     \FPeval{\imgsize}{planeLen+1}  % maybe increasing this helps /hbox errors?          \begin{document}     \begin{center}         \begin{pspicture}[solidmemory](-\imgsize,-\imgsize)(\imgsize,\imgsize)                  % ==================  VIEW ===================             \psset{                 viewpoint=10 45 20 rtp2xyz,                 lightsrc=viewpoint,                 %lightintensity=1.25                 xunit=0.5cm,                 yunit=0.5cm                 }                       % ================== POINTS ==================             % origin             \psSolid[object=point,args=0 0 0, name=O, text=O, pos=br]             \psSolid[object=point,args=0 0 \a, name=A, text=A, pos=uc]          %%%%%%% Causes hbox problems, comment out everything from here to get working              \psSolid[object=point,args=0 \b \a, name=B, text=B, pos=uc]                  % ================== LINES ==================                  % origin to center of circle at plane intersection             \psSolid[object=line,linecolor=black!50,linewidth=2pt,args=O A, name=OA]             % label the equation to the side of the line midway through the line             \psProjection[object=point,definition=milieu,args=O A,text=$Rcos \theta$,pos=uc]                  % line from origin to side of sphere intersected with plane             \psSolid[object=line,linecolor=black!50,linewidth=2pt,args=O B, name=OB]             \psProjection[object=point,definition=milieu,args=O B,text=$Rsin \theta$,pos=uc]                  % line from A to B             \psSolid[object=line,linecolor=black!50,linewidth=2pt,args=A B, name=AB]                            % ================== SPHERE ==================             \psSolid[                 object=sphere,                 name=mySphere,                 r=\radius,                 ngrid=30 30,            % number of grid lines across 2 dimensions r                 grid=false,         % remove line edges                 hue=0 0.5,                 opacity=0.4,                 hollow=true,                 intersectiontype=0,                 intersectionplan=0 0 1 \a,                 intersectioncolor=(bleu)                 ](0,0,0)                  \psSolid[                 object=plan,                 name=myPlane,                 definition=solidface,                 args=mySphere 1,                 base=-1 1 -1 1,                 action=draw,                 ](A,,)                  % Just some placeholders             % Add different coloring to top surface of sphere             %??             % Add different coloring to circle where plane intersects sphere             %??                       % add some labels for each line and surface             \uput[-135](0,0){$R cos \theta$}             %??              \end{pspicture}          \end{center}     \end{document}


title: Difference between a space and a "wave" symbol (tilde/"~")?

text: As title, what is the difference between a `` and `~`? I see no differences after the compilation. MWE:               \documentclass[a4paper]{article}          \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage[colorinlistoftodos]{todonotes}          \title{Your Paper}          \author{You}          \date{\today}          \begin{document}     \maketitle          I am cool.          I~am~cool.          \end{document}


title: Write a command that dynamically calls the argument of another command

text: I would like to be able to dynamically call an argument. The following MWE is merely designed to illustrate what I want and nothing more:               \documentclass{article}          \def\aecommandA#1#2#3{%%       \typeout{==> command A ==> arg (1) is ==> #1}%%       \typeout{==> command A ==> arg (2) is ==> #2}%%       \typeout{==> command A ==> arg (3) is ==> #3}%%     }          \def\aecommandB#1#2#3{%%       \aetypeoutarg{==> command B}{1}%%       \aetypeoutarg{==> command B}{2}%%       \aetypeoutarg{==> command B}{3}%%       }     \def\aetypeoutarg#1#2{%%       \typeout{#1 ==> arg (#2) is ==> \expandafter##2}}          \pagestyle{empty}     \begin{document}          Hello:     \aecommandA{A}{B}{C}     \aecommandB{A}{B}{C}          \end{document}      I would like `\aecommandA` and `\aecommandB` to produce the same output. I've tried various things ranging from               \expandafter##2      as done in the MWE to defining a new commmand               \def\grabarg#1{%%         \ifcase#1\relax\or           ##1\or           ##2\or           ##3\or           ##4\or           ##5\or           ##6\or           ##7\or           ##8\or           ##9\fi}      Neither work. I think I may have tried a few other things, but I don't remember them off the top of my head.


title: Make an exam format with a logo

text: I am trying to make a header of an exam page but with logo. Below is my code.               \usepackage{graphicx}          \begin{document}          \firstpageheadrule     \begin{figure}[]     \includegraphics[width=20mm]{logo.png}     \label{overflow}     \end{figure}     \chead{Department of Mathematics}          \begin{questions}     Question one     \end{questions}          \end{document}      I am trying to make something like ![enter image description here](http://i.stack.imgur.com/pVxhK.png) But my code does not give a desired output. I have little clue why my code is not working. I am wondering how can I fix the code. Helps are really appreciated. Many thanks!


title: How to change the way theorems are displayed?

text: I am in the process of writing a large document containing some theorems, lemma, and propositions. Currently, I am using packages `amsmath` and `amsthm`. I defined my own environment for theorems by adding               \theoremstyle{plain}     \newtheorem{thm} {Theorem}[chapter]      to the preamble. However, I am not quite satisfied with the looks. So is there a possibility to change the way this would be displayed? I would like to have the word "Theorem" appear in _small caps_. Furthermore, I would like a line break after the theorem's title. What is the best way to do this? Are there nice packages for this purpose (prefereably without too much fiddling)?


title: When should one use \begingroup instead of \bgroup?

text: Is there ever a case when the use of `\begingroup` is preferred to `\bgroup`? Obviously, `\bgroup` is necessary in cases where you need to have balanced braces and thus cannot use `{`, but when is it necessary to use `\begingroup`? A related question would be: What's the difference between a simple group and a semi-simple group?


title: Expandable 'character scanning' command that preserves spaces

text: David Carlisle recently offered a clean and rather elegant TeX solution to a question about expandable 'character scanning' commands. Unfortunately, David's solution does not preserve spaces in the input string. Thus, given David's code:               \def\expandloop#1{\xloop#1\relax}     \def\xloop#1{%       \ifx\relax#1\else[#1]\expandafter\xloop\fi}      we see the same output whether we supply               \edef\zzzz{\expandloop{TEST1}}      or               \edef\zzzz{\expandloop{  T ES T    1 }}      Why does this happen? Is there a solution that treats space characters the same way as any others in the input string?


title: In amsart, how I can get caption spacing in tables to be like that in figures?

text: In the document class `amsart`, I get different vertical spacing around the caption in tables and figures. For instance, compare the difference:               \documentclass{amsart}     \begin{document}              \begin{figure}             \begin{center}                 \begin{tabular}{c}                     Figure                  \end{tabular}             \caption{Caption}             \end{center}         \end{figure}              \begin{table}             \begin{center}                 \begin{tabular}{c}                     Table                  \end{tabular}             \caption{Caption}             \end{center}         \end{table}     \end{document}      Is this a bug? More to the point, is there some way of getting the figure spacing in tables? If I change the document class to `article`, then the spacings become the same.


title: sidewaystable* in two-column document - emulateapj

text: I have a big table that I want to display sideways in an `emulateapj` document, but I get a weird result:               \documentclass[]{emulateapj}          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{booktabs}     \let\captionbox\relax     \usepackage[             font            =   small,             labelfont       =   bf,             labelformat =   simple,             labelsep        =   period,             margin      =   0.25in,         ]{caption}     \usepackage{longtable}     \usepackage{natbib}     \usepackage{paralist}     \usepackage{rotating}         \setlength{\rotFPtop}{0pt plus 1fil}     \usepackage[referable]{threeparttablex}          \newcommand{\fns}{}          \begin{document}          \makeatletter         \renewcommand\p@enumii{} % make \ref display only innermost label of nested list     \makeatother          %\begin{table*}     \begin{sidewaystable*}     \begin{ThreePartTable}     \begin{TableNotes} \footnotesize         \item[\dag] \label{Tbl:Src:Note:halo}       The radio source is coincident with the cluster RH.         \item[\ddag]    \label{Tbl:Src:Note:edge}       The radio source might be coincident with the cluster RH (edge of diffuse emission).     \end{TableNotes}     \begin{longtable}{cccccccc}         \caption{Radio sources analyzed in previous work\label{Tbl:Src}} \\             \toprule             {\fns(\ref{Tbl:Src:GC})} & {\fns(\ref{Tbl:Src:Name})} & {\fns(\ref{Tbl:Src:Morph})} & {\fns(\ref{Tbl:Src:FR})}                 & {\fns(\ref{Tbl:Src:Class})} & {\fns(\ref{Tbl:Src:b})} & {\fns(\ref{Tbl:Src:LOS})} & {\fns(\ref{Tbl:Src:Ref})} \\             Cluster & Source & Morph. & FR & Class & $r_{\bot}/r_c$ & LOS & Ref. \\             \midrule             \endfirsthead             \caption*{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\             \toprule             {\fns(\ref{Tbl:Src:GC})} & {\fns(\ref{Tbl:Src:Name})} & {\fns(\ref{Tbl:Src:Morph})} & {\fns(\ref{Tbl:Src:FR})}                 & {\fns(\ref{Tbl:Src:Class})} & {\fns(\ref{Tbl:Src:b})} & {\fns(\ref{Tbl:Src:LOS})} & {\fns(\ref{Tbl:Src:Ref})} \\             Cluster & Source & Morph. & FR & Class & $r_{\bot}/r_c$ & LOS & Ref. \\             \midrule             \endhead             \bottomrule             \endfoot             \bottomrule             \insertTableNotes\\             \captionsetup{position=bottom}             \caption*{\fns                 \textbf{Notes.}                     The radio sources for which RM maps have been derived and analyzed in previous works, along with some of their relevant characteristics. In this work we analyzed the sources in Coma, A2065, A2142, A2199, and Ophiuchus (italicized).                     \begin{inparaenum}[(1)]                         \item \label{Tbl:Src:GC}        Host GC name;                         \item \label{Tbl:Src:Name}  Source name;                         \item \label{Tbl:Src:Morph} Radio morphology: (H)T = (Head) Tail, (N/W)AT = (Narrow/Wide) Angle Tail;                         \item \label{Tbl:Src:FR}        Fanaroff-Riley classification;                         \item \label{Tbl:Src:Class} Source object type;                         \item \label{Tbl:Src:b}     Impact parameter relative to X-ray center;                         \item \label{Tbl:Src:LOS}       Line of sight position: $\infty$ = background source, $0$ = cluster member;                         \item \label{Tbl:Src:Ref}       RM reference:                          \begin{inparaenum}[1.]                               \item \label{Tbl:Src:Ref:Bonafede2010}  \citealt{Bonafede2010};                             \item \label{Tbl:Src:Ref:Eilek2002}     \citealt{Eilek2002};                             \item \label{Tbl:Src:Ref:Feretti1999}       \citealt{Feretti1999};                             \item \label{Tbl:Src:Ref:Govoni2001}    \citealt{Govoni2001};                             \item \label{Tbl:Src:Ref:Govoni2006}    \citealt{Govoni2006};                             \item \label{Tbl:Src:Ref:Govoni2010}    \citealt{Govoni2010};                             \item \label{Tbl:Src:Ref:Guidetti2008}  \citealt{Guidetti2008};                             \item \label{Tbl:Src:Ref:Perley1991}        \citealt{Perley1991};                             \item \label{Tbl:Src:Ref:Pizzo2011}     \citealt{Pizzo2011};                             \item \label{Tbl:Src:Ref:Taylor1993}        \citealt{Taylor1993};                             \item \label{Tbl:Src:Ref:Taylor2001}        \citealt{Taylor2001};                             \item \label{Tbl:Src:Ref:Taylor2002}        \citealt{Taylor2002};                             \item \label{Tbl:Src:Ref:Vacca2010}     \citealt{Vacca2010};                             \item \label{Tbl:Src:Ref:Vacca2012}     \citealt{Vacca2012}.                         \end{inparaenum}                     \end{inparaenum}                 }             \endlastfoot             3C 129          & 3C 129            & HT    &       & galaxy            & 1.73  & $0$       & \ref{Tbl:Src:Ref:Taylor2001}      \\                             & 3C 129.1      &       & I     & galaxy            & 0.01  & $0$       & \ref{Tbl:Src:Ref:Taylor2001}      \\             A0119           & 0053-015      & NAT   &       & E             & 0.15  & $0$       & \ref{Tbl:Src:Ref:Feretti1999}     \\                             & 0053-016      & NAT   &       & galaxy            & 0.90  & $0$       & \ref{Tbl:Src:Ref:Feretti1999}     \\                             & 3C 029            &       & I     & S             & 2.83  & $0$       & \ref{Tbl:Src:Ref:Feretti1999}     \\             A0400           & 3C 075            & T     &       & E0                & 0.24  & $0$       & \ref{Tbl:Src:Ref:Eilek2002}       \\             A0401           & A401A         & NAT   &       & galaxy            & 2.93  & $0$       & \ref{Tbl:Src:Ref:Govoni2010}      \\                             & A401B         & HT    &       & galaxy            & 4.20  & $0$       & \ref{Tbl:Src:Ref:Govoni2010}      \\             A0514           & A514A         &       & II        &               & 2.63  & $\infty$      & \ref{Tbl:Src:Ref:Govoni2001}      \\                             & A514B2            & NAT   &       & D             & 1.48  & $0$       & \ref{Tbl:Src:Ref:Govoni2001}      \\                             & A514C         &       & II        &               & 4.53  & $\infty$      & \ref{Tbl:Src:Ref:Govoni2001}      \\                             & A514D         & T     & I     & galaxy            & 2.71  & $0$       & \ref{Tbl:Src:Ref:Govoni2001}      \\                             & A514E         &       &       & QSO           & 5.32  & $\infty$      & \ref{Tbl:Src:Ref:Govoni2001}      \\             Hydra A         & Hydra A       &       &       & galaxy            & 20.0  & $0$       & \ref{Tbl:Src:Ref:Taylor1993}      \\             \textit{Coma}       & 5C 04.042     &       & II        & galaxy            & 5.77  & $\infty$      & \ref{Tbl:Src:Ref:Bonafede2010}    \\                             & 5C 04.074\tnotex{Tbl:Src:Note:edge}                                             &       & II        &               & 1.95  & $\infty$      & \ref{Tbl:Src:Ref:Bonafede2010}    \\                             & 5C 04.081\tnotex{Tbl:Src:Note:halo}                                             & NAT   & I     & cD                & 0.87  & $0$       & \ref{Tbl:Src:Ref:Bonafede2010}    \\                             & 5C 04.085\tnotex{Tbl:Src:Note:halo}                                             & WAT   & I-II  & cD                & 0.40  & $0$       & \ref{Tbl:Src:Ref:Bonafede2010}    \\                             & 5C 04.114\tnotex{Tbl:Src:Note:edge}                                             &       & I     &               & 2.04  & $\infty$      & \ref{Tbl:Src:Ref:Bonafede2010}    \\                             & 5C 04.127     &       &       & QSO           & 3.66  & $\infty$      & \ref{Tbl:Src:Ref:Bonafede2010}    \\                             & 5C 04.152     &       & II        & galaxy            & 6.68  & $\infty$      & \ref{Tbl:Src:Ref:Bonafede2010}    \\             \textit{A2065}      & A2065A            &       & II        & galaxy            & 1.96  & $\infty$      & \ref{Tbl:Src:Ref:Govoni2010}      \\             \textit{A2142}      & A2142A            & HT    & I     & galaxy            & 2.66  & $0$       & \ref{Tbl:Src:Ref:Govoni2010}      \\             \textit{A2199}      & 3C 338            &       & I     & cD2           & 0.05  & $\infty$      & \ref{Tbl:Src:Ref:Vacca2012}       \\             A2255           & Double\tnotex{Tbl:Src:Note:edge}                                             & HT    &       & galaxy            & 2.98  &           & \ref{Tbl:Src:Ref:Pizzo2011}       \\                             & Goldfish\tnotex{Tbl:Src:Note:halo}                                             & NAT   &       & galaxy            & 1.72  &           & \ref{Tbl:Src:Ref:Pizzo2011}       \\                             & TRG\tnotex{Tbl:Src:Note:halo}                                             & NAT   &       & galaxy            & 1.03  &           & \ref{Tbl:Src:Ref:Pizzo2011}       \\                             & Bean          & HT    &       & galaxy            & 11.6  &           & \ref{Tbl:Src:Ref:Pizzo2011}       \\                             & Embryo            & WAT   &       &               & 7.93  &           & \ref{Tbl:Src:Ref:Pizzo2011}       \\                             & Beaver            & NAT   &       & galaxy            & 4.33  &           & \ref{Tbl:Src:Ref:Pizzo2011}       \\                             & F1, F2, F3\tnotex{Tbl:Src:Note:halo}                                             &       &       & filaments     &       &           & \ref{Tbl:Src:Ref:Pizzo2011}       \\                             & J1712.4+6401\tnotex{Tbl:Src:Note:halo}                                             &       &       &               & 0.78  &           & \ref{Tbl:Src:Ref:Govoni2006}      \\                             & J1713.3+6347  &       &       &               & 4.35  &           & \ref{Tbl:Src:Ref:Govoni2006}      \\                             & J1713.5+6402\tnotex{Tbl:Src:Note:edge}                                             &       &       &               & 3.05  &           & \ref{Tbl:Src:Ref:Govoni2006}      \\                             & J1715.1+6402  &       &       &               & 8.14  &           & \ref{Tbl:Src:Ref:Govoni2006}      \\             A2382           & PKS 2149-158 A    &       & I     & E             & 0.44  & $0$       & \ref{Tbl:Src:Ref:Guidetti2008}    \\                             & PKS 2149-158 B    &       & I     & E             & 0.41  & $0$       & \ref{Tbl:Src:Ref:Guidetti2008}    \\                             & PKS 2149-158 C    &       & I     & E             & 0.15  & $0$       & \ref{Tbl:Src:Ref:Guidetti2008}    \\             A2634           & 3C 465            & T     & I     & cD                & 0.39  & $0$       & \ref{Tbl:Src:Ref:Eilek2002}       \\             Centaurus           & PKS 1246-410  &       & I     & cD1           & 0.34  & $0$       & \ref{Tbl:Src:Ref:Taylor2002}      \\             \textit{Ophiuchus}  & OPHIB         & HT    & I     & galaxy            & 2.50  & $0$       & \ref{Tbl:Src:Ref:Govoni2010}      \\     \end{longtable}     \end{ThreePartTable}     \end{sidewaystable*}     %\end{table*}          \end{document}      ![enter image description here](https://dl.dropbox.com/u/38245903/pdf.png) The line after loading the `rotating` package in the preamble is taken from here. How can I fix this?


title: Problem with multirow and table cell borders

text: I'm pulling my hair with the rendering of table cell borders when using `multirow` and `multicol`. In the below example, the double-lines in the table's "header" do not extend to the table top, and even more annoying, there is a gap in the top-right corner of the table. Any clues?               \documentclass{article}     \usepackage[utf8x]{inputenc}     \usepackage{multirow}     \usepackage{graphicx}     \begin{document}     \begin{figure}     \centering     \begin{tabular}{|l|c||c|c|c|c||c|c|c|c|} \hline \\     \multirow{2}{*}{} & \multirow{2}{*}{\rotatebox{90}{Target}} & \multicolumn{4}{|c||}{Banana} & \multicolumn{4}{|c|}{Pear} \\     & & \rotatebox{90}{Apple 1} & \rotatebox{90}{Apple 2} & \rotatebox{90}{Apple 3} & \rotatebox{90}{Apple 4} & \rotatebox{90}{Apple 1} & \rotatebox{90}{Apple 2} & \rotatebox{90}{Apple 3} & \rotatebox{90}{Apple 4} \\         \hline     Apple 1 & $+$ &     & $*$ & $*$ & $*$ & $+$ &     &     &     \\ \hline     Apple 2 & $+$ & $*$ &     & $*$ & $*$ &     & $+$ &     &     \\ \hline     Apple 3 & $+$ & $*$ & $*$ &     & $*$ &     &     & $+$ &     \\ \hline     Apple 4 & $+$ & $*$ & $*$ & $*$ &     &     &     &     & $+$ \\ \hline     \end{tabular}     \end{figure}     \end{document}      ![enter image description here](http://i.stack.imgur.com/cLTtU.png)


title: Breaking a proof between frames

text: I have the same question in here Proofs in Beamer In the answer, the author used `beamertemplate` to examine breaking the frames. But how can i change it to my paragraph? For example, i need to insert the following problem and its solution Problem : Solve `x^{3} - x -3=2\sqrt[3]{6x-3x^{2}}` Proof : Put `a:=\sqrt[3]{6x-3x^2}` to obtain a system `\begin{eqnarray}x^3-x-3 &=& 2a\\6x-3x^2 &=& a^3\end{eqnarray}` Add the equations up to get `x^3-3x^2+5x-3=a^3+2a` `(x-1)^3+2(x-1)=a^3+2a` Put `y:=x-1` to get `y^3+2y=a^3+2a` `(y-a)(y^2+ay+a^2+2)=0` The second factor is obviously always positive, hence `y=a\iff a=x-1` Now `(1)` yields `x^3-x-3=2x-2\iff x^3-3x=1` Put `x:=2t` to get `8t^3-6t=1\iff 4t^3-3t={1\over 2}` By addition formulas, there must exist `\phi` such that `t=\cos\phi`, yielding `\cos 3\phi={1\over 2}\iff 3\phi=\pm{\pi\over 3}+2k\pi\iff \phi=\pm{\pi\over 9}+{2k\pi\over 3},k\in\mathbb{Z}` Now `x=2\cos\phi=2\cos\left(\pm{\pi\over 9}+{2k\pi\over 3}\right)`, i.e. `x\in\left\{2\cos{\pi\over 9},2\cos{5\pi\over 9},2\cos{7\pi\over 9}\right\}` It may take more than one frame and i think the command `allowbreakframes` is useful. But i don't know how to exchange `beamertemplate` to my above paragraph. I also want to put the problem and the solution in blocks. Thanks for your listening my question!


title: Aligning across 'aligned' equation blocks

text: I'd like to format two groups of equations such that all their equal signs line up and such that I can put a big brace to the right of each block to annotate that block. The last part is easily achieved using the `aligned` environment of `amsmath`:               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align}       \left.\begin{aligned}         \alpha_X \times \alpha_Y &= \chi \        \alpha_X \times \beta_Y &= \xi \        \beta_X \times \beta_Y &= \zeta       \end{aligned}\right\} \quad X<Y \\[2em]       \left.\begin{aligned}         \Upsilon_j &= 0 \        \Psi_j &= \sqrt{\sinh E - \tan^2\tfrac{F}{2}} \        \Gamma_j &= F       \end{aligned}\right\} \quad j=1,\ldots,g     \end{align}     \end{document}      But that doesn't line up the equal signs. I guess I could achieve this with some manual horizontal white space, but I'd like something automatic. Something like the `split` environment which supports reusing the anchor points of the outside 'align' environment:               \begin{align}       A &= 0 \      BB &= AVE + VEA + EAV \      \begin{split}       CCC &= UVWXY + VWXYU + WXYUV \          &\quad {} + XYUVW + YUVWX       \end{split}     \end{align}      Is there a way to make aligned reuse the anchor points of the outside `align`? Also, is there an automatic way to additionally line up the big braces in the first example?


title: Tabbing within a table cell

text: This is a MWE but it will not work however would give the idea of what I am doing.               \documentclass[fleqn,12pt,a4paper]{article}     \RequirePackage{myPackage}     \begin{longtable}{p{2cm}p{12cm}p{1.5cm}}     १.१.१  &  वृद्धिः\textsuperscript{१/१} आत्\textsuperscript{१/१} ऐच्\textsuperscript{१/१}  &  3\\     & आत् ऐच् वृद्धिः सञ्ज्ञा स्युः &  \\     १.१.२  &  अत्\textsuperscript{१/१}  एङ्\textsuperscript{१/१} गुणः\textsuperscript{१/१}  & 3 \\     & अत् एङ् गुणः  सञ्ज्ञा स्युः & \\     \end{longtable}      ![table_tabbing](http://i.stack.imgur.com/vx5cI.png) As shown in the attached image, I want every other line to be tabbed to the right. I tried to put 4 columns and offset the text by one column but that did not give me good result. Is tabbing possible within a table? Top image is the output I am getting and the bottom image is the desired output.


title: Usage and modification of xcookybooky

text: **The Problem:** I'm trying to use the `xcookybooky` package to use a cookbook layout. I chose this, since the other recipe, cuisine, cooking and so on are not exactly working for me.But even xcookybooky needs to get some adjustments/modifications, which I do not exactly know how to accomplish. Below I attached an example pictures and code to which I will refer to. My issues are: **1.** Unicode support: It does not seem to be possible to use the degree Symbol (°) by default. I fixed this by using the `\usepackage[utf8x]{inputenc}` package. But I have read that this can cause some problems, maybe this is interfering with the other points below. **2.** The font for the recipe title (in this case "Currywurst") looks like c**p. The package author writes in his documentation, that there is an option to change the font:               \setRecipenameFont{ %pbsi % fau % fwb % fjd          cmr % default     }{T1}{m}{n}      But even this example does not work and is throwing an (unrelated?) error: "Undefined control sequence \headline". **3.** I'd like the ingredient list to start with the recipes info, directly below the recipes title. Yet I haven't found any option to temper with the margins. Maybe I have to alter the package style itself to use a multicolumn box or something? I'm open to suggestions. **4.** If I add some text as a description or as some kind of info, it is placed above the whole recipe container, since it is not using the official commands. I'd like to introduce here a new full column box under the recipes title. **Example Picture:** ![enter image description here](http://i.stack.imgur.com/4xwfP.png) **Example Code:**               \documentclass[11pt]{article}     \usepackage[utf8x]{inputenc}     \usepackage[a4paper]{geometry}     \usepackage{xcookybooky}          \setRecipeColors     {%         recipename = black,         ing = black,         inghead = black,     }          \setRecipeSizes{         recipename = \normalsize,     }          \setHeadlines{         inghead = Ingredients,         prephead = Preparation,         hinthead = Hint,         calory = energy content,         continuationhead = Continuation,         continuationfoot = Continuation on next page     }          \begin{document}          \begin{recipe}[         preparationtime = 30 min,         bakingtime = 1 hour,         bakingtemperature = 225°C,         portion = 4 portions,         source = THE INTERNET     ]{Currywurst}          Description or some info on the recipe? Nope...          \ingredients{         2   & bars      & Dark chocolate \\\         3   &           & Eggs \\         200 & ml        & Cream \\         40  & g         & Sugar \\         50  & g         & Butter     }             \preparation{         \step This is the first step for cooking a brilliant meal.         \step The second step follows...     }          \end{recipe}     \end{document}      **Source/Documentation:** http://mirror.ctan.org/macros/latex/contrib/xcookybooky/xcookybooky.pdf When I look at this list, maybe it would just be easier to modify the whole package :\


title: Tex editor able to recover all labels of a document

text: I have always used Texmaker and it totally works for me. However it is unable to automatically retrieve the list of all labels for auto completion. In particular, it does not fetch labels defined in other files and does not fetch labels defined by using macro. I always use lstnewenvironment to input different types of code but then texmaker is not able to recover the label defined by the macro. It is not a big deal but I end up switching file anytime I have to insert a ref. I believe that an editor should be able to recover all labels by the aux files shouldn't it? Is there any editor or tool able to do so?


title: Is there a itemsep equivalent for subitem?

text: So I was wondering if there is the equivalent of `itemsep` for the subitems, particularly in the `description` environment. I know I could nest many environments one in the other but it seems ugly. Exemple:               \begin{description}\itemsep2ex            \item[first item] \hfill\\             \subitem \hfill\vspace{-1ex}\\                 some text             \subitem \hfill\vspace{-1ex}\\                 some more text             \subitem \hfill\vspace{-1ex}\\                 more text            \item[second item]             \subitem some text      \end{description}      This gives me what I want, but is there a way of replacing the 3 `\vspace{-1ex}` following the subitems by a general command for all the environment? Thanks!


title: Circuitikz works with ground but does not work for rground

text: If I try to plot the following circuitikz schematic it works:               \begin{figure}[bth]         \myfloatalign         \begin{center}         \begin{circuitikz}[american voltages]         \draw             (0,0) node[ground] {}             to [V, l^=$F_{A}$] (0,2)             to [R, i^>=$v_A$, -o, l_=$Z_A$] (3,2);         \end{circuitikz}         \end{center}         \caption{Circuit representation of the actuator.}         \label{fig:actuatormodel}     \end{figure}      But when I want to use rground or sground instead of ground (I saw these nicer ground symbols in the circuitikz manual), I get the following error when compiling:               Latex Error: ./chapters/design.tex:38 Package pgfkeys Error: I do not know the key '/tikz/rground' and I am going to ignore it. Perhaps you misspelled it.      In my document setup I load tikz, circuitikz and pgfplots like this:               \usepackage{tikz}     \usetikzlibrary{chains, shapes, arrows}     \usepackage{pgfplots}     \pgfplotsset{legend style={font=\smaller}, compat=newest, plot coordinates/math parser=false}     \usepgflibrary{arrows}     \usepackage[siunitx]{circuitikz}      I use the MacTeX-2012 Distribution. Why can I use ground but not rground?


title: latex beamer appendix numbering

text: Why are the slides from appendix not numbered with letters? Is there a solution? Thank you for your help               \documentclass{beamer}     \begin{document}          \section{test1}     \begin{frame}{\insertsectionnumber.~\insertsection}      bal bla     \end{frame}          \appendix          \section{test2}     \begin{frame}{\insertsectionnumber.~\insertsection}      bla bla     \end{frame}          \end{document}


title: How can I cancel the effect of {} in untouchable macros?

text: Assuming that we cannot change the implementation of `\blackbox` that is               \def\blackbox#1{{}#1}      What should we pass to `\blackbox` such that `$\blackbox{<something we need to pass>}$` produces the same result as `$-y$`? In other words, how can I cancel the effect of `{}` defined in `\blackbox`?               \documentclass[preview,border=12pt,12pt,varwidth]{standalone}     \usepackage{amsmath}          \def\blackbox#1{{}#1}          \begin{document}     \noindent\huge     $-y$\\ % output that I want to achieve      $\blackbox{-y}$ % how can I remove the effect of {} in \blackbox?     \end{document}      ![enter image description here](http://i.stack.imgur.com/DLg1G.png) ## Real scenario I want use `\equ` for representing $-3y=59$ but if I use `\equ{}{-3y}{59}` the output is not identical because of the prefix `{}` defined in `\equ`.               \documentclass[preview,border=12pt,12pt]{standalone}     \usepackage{mathtools,booktabs}          \newcommand\specifier{%             r@{}r@{}l             @{\quad}c@{\quad}             r@{}r@{}l             @{}c}          \newcommand\act[1]{\xrightarrow{\quad\mathclap{\times #1}\quad}}     \newcommand\ope[1]{~\smash{\raisebox{.8\normalbaselineskip}{$#1$}}}     \newcommand\equ[3]{{}#1 & {}#2 & {}=#3}          \begin{document}     $         \begin{array}{\specifier}          \equ{3x}{+3y}{7} & \act{1} & \equ{3x}{+3y}{7}            \\[\jot]          \equ{3x}{}{22}   & \act{3} & \equ{3x}{}{66}   & \ope{-}  \\\cmidrule{5-7}              &&           &         & \equ{}{-3y}{59}             \\[\jot]              &&           &         & \equ{}{y}{-59/3}            \\         \end{array}     $     \end{document}      ![enter image description here](http://i.stack.imgur.com/vv3ev.png)


title: Caption spacing - table vs longtable

text: if I use both table and longtable in one document, the spacing between the caption and the table (the empty space after the caption) is different for table and longtable. I would prefer minimal (and indeed identical) spacing after the caption in both cases. Thank you. Example:               \documentclass[12pt]{article}     \usepackage{longtable, booktabs, graphicx}     \begin{document}          \begin{table}     \caption{This is the first caption}     \begin{center}     \resizebox{1\textwidth}{!}{     \begin{tabular}{@{}llllll@{}}     \toprule     \textbf{Name} & \textbf{Description} & \textbf{Unit} & \textbf{Data source} & \textbf{Time frame} & \textbf{Frequency} \\     \midrule       Name & Description & Unit & Data source & Time frame & Frequency \\     \bottomrule       \end{tabular}}     \end{center}     \end{table}          \begin{center}      \begin{longtable}{@{}p{2cm}p{1.5cm}p{3.6cm}p{1.2cm}p{1.5cm}p{1.5cm}@{}}     \caption{This is the second caption} \\     \toprule      \textbf{Author(s)} & \textbf{Area} & \textbf{Estimated relationship} & \textbf{Time frame}  & \textbf{Scope}  & \textbf{type} \\     \midrule      \endfirsthead     \multicolumn{6}{c}{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\     \toprule      \textbf{Author(s)} & \textbf{Area} & \textbf{Estimated relationship} & \textbf{Time frame}  & \textbf{Scope}  & \textbf{ type} \\      \midrule      \endhead     \midrule      \multicolumn{6}{r}{\textit{Continued on next page}} \\      \endfoot      \bottomrule      \endlastfoot     name & area & relationship & time & scope &  type \\     \end{longtable}      \end{center}     \end{document}


title: How to use margins to center a table

text: I want to realize something like in this two pictures. I want to use a part of the margins for notes (draw even tables!). I want that the margin change from odd page to even page (I think it's simple to find how but if you tell me how I will appreciate that). My problem is that when I draw a table it doesn't use the left margin so a part of it is not shown as it existed the right margin. So how to tell the table to use the left margin? My question is not only for table but for all box (listing code, figures ...etc). I have tried to `chngpage` package but it doesn't work for me. I want to have something that let me specify the left and right margin (the table should never be drawn outside this margins) and if it is small it will be centered. ![enter image description here](http://i.stack.imgur.com/frhvQ.png) ![enter image description here](http://i.stack.imgur.com/2TzaZ.png) **MWE**               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{array}     \usepackage{booktabs,caption,fixltx2e}     \usepackage{chngpage}     \usepackage{lipsum}     \usepackage[flushleft]{threeparttable}     \usepackage{hhline}     \usepackage{xcolor,colortbl}     \usepackage[top=2.5cm, bottom=2.5cm, left=8cm, right=2.5cm, heightrounded,       marginparwidth=7cm, marginparsep=3mm]{geometry}     \usepackage{hyperref}     \usepackage{minted}     \begin{document}       \lipsum[1]       \begin{adjustwidth}{-6in}{-6in}       \begin{table}       \begin{threeparttable}         \caption{\label{comparaison}  Comparaison entre JSON, XML et      multipart/form-data}     \begin{tabular}{|>{\raggedright\arraybackslash}p{2cm}|>{     \raggedright\arraybackslash}p{3cm}|>{\raggedright\arraybackslash}p{3cm}|>{     \raggedright\arraybackslash}p{3.5cm} |}     \hhline{~---}     \multicolumn{1}{c|}{} & \cellcolor{gray!30} JSON & \cellcolor{gray!30} XML &      \cellcolor{gray!30} multipart/form-data \\     \hline     \cellcolor{gray!30} Taille des données &     Trop léger et économise des ressources  &     trop verbeux mais en utilisant la compression on pourrait réduire      considérablement la taille de données &          Trop léger\\     \hline          \cellcolor{gray!30} Typage &     Il support les types de base (entier, booleen, chaîne de caractères, tableau       liste) &     Il supporte beaucoup de types de données &     non typée \\     \hline     \cellcolor{gray!30} Caractères non ASCII &     JSON est encodé en UTF-8 &     Possibilité d'encoder la requête en UTF-8 &     Possibilité d'utiliser UTF-8 comme encodage \\     \hline     \cellcolor{gray!30} données binaires &     Les données doivent être encodé (base64 par exemple) &     Comme pour le format JSON les données doivent être encodées &     C'est possible \\     \hline     \cellcolor{gray!30} Parseur Python/Java &     Il est pris en charge par Python. Besoin d'une librairie externe en Java &     Il pris en charge en Python/Java &     Pris en charge en Python/Java \\     \hline          \end{tabular}     \begin{tablenotes}           \small           \item \textbf{Source :}      \begin{itemize}      \item      \href{http://stackoverflow.com/questions/4007969/}{Réponse de manuel aldana}     \item \href{http://www.scriptol.fr/ajax/json-xml.php}{JSON ou XML, quel format      choisir?}     \end{itemize}              \end{tablenotes}       \end{threeparttable}     \end{table}     \end{adjustwidth}     \lipsum[1]          \newpage     \begin{minted}[mathescape,                    linenos,                    numbersep=5pt,                    gobble=2,                    frame=lines,                    framesep=2mm]{json}     {       "culture precedente": "Tournesol",       "culture principale" : "Blé",       "parcelle" : "BI",       "test line " : "very long long long long long long long long long long long long long long long line"       "parameters" : {         "start" : "2010-07-12 12:00:00",         "end" : "2012-01-12 12:00:00",         "pram1" : "value",         "param2" : "value"       },            "results" : {            "numeric" : ["QELS", "WCF30"],           "graph" : [{               "X" : "time",               "Y" : "QELS"           }]         }     }     \end{minted}     Voici un exemple de réponse :      \begin{minted}[mathescape,                    linenos,                    numbersep=5pt,                    gobble=2,                    frame=lines,                    framesep=2mm]{json}     {       "results" : {         "QELS" : 1.254,         "WCF30" : 200.745,         "graph" : [             "http://toulouse.inra.fr/api/files/graph.png"              ]        }     }     \end{minted}            \end{document}      **Result (Edited)** ![enter image description here](http://i.stack.imgur.com/TIqv6.png) ![enter image description here](http://i.stack.imgur.com/cV99c.png)


title: Code examples, like in the TikZ/PGF manual

text: I like very much the 'side-by-side' code examples in the TikZ/PGF manual... ![enter image description here](http://i.stack.imgur.com/gqras.png) ... and I would like to use the same thing in a manual I'm writing. I have found the source code for the `codeexample` environment that the TikZ/PGF manual uses for this purpose (specifically, it's located at `/usr/local/texlive/2012/texmf-dist/doc/generic/pgf/macros/pgfmanual-en- macros.tex`). My (probably rather basic) question is: how can I use the same `codeexample` environment in my own documents? I ask because I tried compiling the example in the related question below, but the file couldn't be found.   * Automatic linking (aka code highlight) in Till Tantau's `codeexample`


title: How to automatically separate words in inference from semantic package?

text: I'm trying to use `inference` from `semantic` package to describe static semantics of a language. I would like to separate nonterminals in inference rules with spaces without inserting them by hand. Is there a way to automatically separate the words `SimpleExpr_1 RelOper SimpleExpr_2` from following code with spaces, as if it was written as `SimpleExpr_1\ RelOper\ SimpleExpr_2` ?               \inference       {\Gamma \vdash Expr_1 : \textsc{Integer} \quad         \Gamma \vdash Expr_2 : \textsc{Integer}}       {\Gamma \vdash SimpleExpr_1 RelOper SimpleExpr_2 : \textsc{Boolean}}      Edit: I should add, that I tried solution presented here: Making mathmode obey spaces , but for reasons unknown to me it doesn't seem to apply to `inference`. Any ideas?


title: how to put odd number subfigures in multiple rows

text: There are five figures. Basically, I'd like them to displayed as following:                    |figure 1|figure 2|          |figure 3|figure 4|figure 5|      The first two figures are in the first row and the last three are in the second row. And The first row should be in the middle of the second row.


title: How to make math text lighter

text: I saw here how to make body text lighter. The command is `\font\tenrm = cmr17 at 10pt \tenrm` How can I do the same thing to math text? Note: I want to use Computer Modern, not kpfonts, etc. Here is a minimal working example:               \documentclass[]{amsart}     \begin{document}          \font\tenrm = cmr17 at 10pt \tenrm          \noindent     This experiment tested the validity of Kirchoff's current and voltage laws:      \[(i) \sum \limits_{\textrm{junction}} \! \! \! I = 0\]     \[(ii) \sum \limits_{\textrm{closed loop}} \! \! \! \! \! \! \Delta V = 0\]     using a two-loop circuit and appropriate measuring equipment. It was determined      that Kirchoff's circuit laws closely agree with observation (see Table 1).          \end{document}      When I add the command to make the body text lighter, the math font doesn't change. I would like it to be as light as the body text. I want the bold to be lighter too. This would make it look like the newer Springer books, which have very nice formatting. Thanks.


title: Printing British Symbol £?

text: How does one print the '£' symbol?


title: How to use semibold italic cmbright for bold math symbols?

text: I want to make my bold math symbols in a document using `cmbright` semibold and italic. How can I do this? `\usepackage{bm}` is close, but uses bold instead of semibold. Here is a minimal working example:               \documentclass{article}     \usepackage{cmbright}     \usepackage{bm}     \begin{document}          \[\bm{f} = e\left(\bm{E} + \bm{v} \wedge \bm{B}\right)\]     \end{document}      I am trying to replace the bold italic letters in the equation with semibold italic letters. Thanks.


title: What are the limits of \transpush for beamer frames transition?

text: I was looking at the different possibilities of transitions between two frames using Beamer and I found this one named `\transpush` which gives the impression that the slide 1 is pushed away by the slide 2. It is possible to define two options with this transition: the direction (in degrees) and the duration (in seconds). Using the following MWE I wandered what are the limits of this transition? For example replacing in the MWE the `X` by 0 or 90 is ok but if I use instead 180 to get the opposite effect of the transition yielded by the value 0, something goes "wrong". I do not get any error but the transition obtained is the same as with 0! The same goes for the values 90 and 270 or -90. Do you have the same problems or is it my slide displayer which has trouble to display the animations? Furthermore, always with the same MWE, some misalignments between the first and the second slides appear. What am I missing here? Finally, what should I do if I want only a part of the slide to move according to the transition (and for example if I want the title of the slide to remain fixed)?               \documentclass{beamer}          \begin{document}     \begin{frame}{Slide 1}       \begin{block}{Title 1}         Blah blah blah.       \end{block}     \end{frame}          \begin{frame}{Slide 2}     \transpush[direction=X,duration=1]     \begin{block}{Title 2}       Again blah blah blah!     \end{block}     \end{frame}     \end{document}


title: fixing diagram to be a good-looking diagram

text: i draw this with help of question here notice that draw doesn't looks good-looking diagram could someone fix it i think that's because of the size of the words i can't control them to make it beautiful draw               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes.geometric}     \usetikzlibrary{shapes.misc}     \usetikzlibrary{positioning}     \usepackage{caption}          \begin{document}     \begin{figure}     \centering     \begin{tikzpicture}[every node/.style={align=center}, implies/.style={double,double equal sign distance,-implies}]          \node(weak_existence) at (4,0) {Existence \\faible};     \node(pathwise_uniqueness) at (0,-4) {Unicité\\ Trajectorielle};     \node (strong_existence) [draw] at (0,0) {Existence \\forte};     \node (uniqueness_law) [draw] at (4,-4) {Unicité \\en Loi};          \draw (node cs:name=weak_existence, anchor=north east) -- (node cs:name=weak_existence, anchor=north west) % top           -- (node cs:name=pathwise_uniqueness, anchor=north west) %goes diagonally           -- (node cs:name=pathwise_uniqueness, anchor=south west) % goes down           -- (node cs:name=pathwise_uniqueness, anchor=south east) % bottom           -- (node cs:name=weak_existence, anchor=south east) % goes diagonally           -- cycle;          \draw[implies] (3.1,-2.2) -- (node cs:name=uniqueness_law, anchor=north);     \draw[implies] (1,-1.7) -- (node cs:name=strong_existence, anchor=south);     \end{tikzpicture}     \caption{by theorem 1.2 }     \end{figure}     \end{document}      ![enter image description here](http://i.stack.imgur.com/k3AQt.jpg)               begin{figure}     % First diagram     \begin{tikzpicture}[every node/.style={align=center}, implies/.style={double,double equal sign distance,-implies}]          % LEFT PART     \node[draw] (weak_existenceleft) at (-8, 0) { \text{  Existence  } \\ faible};     \node[draw] (strong_existenceleft) at (-4, 0) {Existence\\forte};          \draw[implies] (strong_existenceleft) -- (weak_existenceleft);          \node[draw] (uniqueness_lawleft) at (-8, -4) {Unicité\\en Loi};     \node[draw] (pathwiseuniquenessleft) at (-4, -4) {Unicté\\trajectorielle};          \draw[implies] (pathwiseuniquenessleft) -- (uniqueness_lawleft);          % RIGHT PART     \node(weak_existence) at (0,0) {Existence\\faible};     \node(pathwise_uniqueness) at (4,-4) {Unicté\\trajectorielle};     \node (strong_existence) [draw] at (4,0) {Existence\\forte};     \node (uniqueness_law) [draw] at (0,-4) {Unicité\\en Loi};          \draw (node cs:name=weak_existence, anchor=north west) -- (node cs:name=weak_existence, anchor=north east) % top           -- (node cs:name=pathwise_uniqueness, anchor=north east) %goes diagonally           -- (node cs:name=pathwise_uniqueness, anchor=south east) % goes down           -- (node cs:name=pathwise_uniqueness, anchor=south west) % bottom           -- (node cs:name=weak_existence, anchor=south west) % goes diagonally           -- cycle;          \draw[implies] (1,-2.4) -- (node cs:name=uniqueness_law, anchor=north);     \draw[implies] (2.9,-1.5) -- (node cs:name=strong_existence, anchor=south);     \end{tikzpicture}     \caption{by theorem 1.1.}     \end{figure}      please could you please see my last request i've tried with it               \begin{figure}          \begin{tikzpicture}[every node/.style={align=center}, implies/.style={double,double equal sign distance,-implies}, rect/.style={draw, inner sep=1em},hexa/.style={regular polygon, regular polygon sides=6, shape aspect=0.5, minimum height=1cm, draw}]          \node[rect] (weak_existence) at (0, 0) {Existence\\faible\\\\\\Unicité\\trajectorielle};     \node[rect] (strong_existence) at (8, 0) {Existence\\forte\\\\\\Unicité\\en Loi};          \node[hexa] (best) at (4,0) {La meilleure\\situation\\possible};          \draw[implies] (best) -- (strong_existence);     \draw[implies] (best) -- (weak_existence);     \end{tikzpicture}     \caption{its me }     \end{figure}      ![enter image description here](http://i.stack.imgur.com/195bs.jpg)


title: left position math formula

text: I try to write down the following equation:               \begin{equation}     \begin{flalign*}     \left \| \vec{r}_1 - \vec{r}_2 \right \| = \\      \sqrt{( r_{1,x}-r_{2,x} )^2 + ( r_{1,y} - r_{2,y} )^2 } = \\      \sqrt{( (x\cos(\Omega y)-y\sin(\Omega y))+\rho\cos(\Omega y) )^2 + ( x\sin(\Omega y)+y\cos(\Omega y) + \rho\sin(\Omega y) )^2 }     \end{flalign*}     \end{equation}      I am using the following math packages:               \usepackage{amsmath}     \usepackage{mathtools}      But instead to be write on the left side it's continuing to stay in the right side. How can I write it in a better way? Thanks a lot!


title: Proper space between hyperref textfield name and text box

text: I use LaTeX occassionally, but not sure how to get the `hypperref` text fields to tab up properly. I got sick of using OpenOffice/LibreOffice to convert out PDF's that suck and have poorly done text boxes. The Ooo document looks like so. ![enter image description here](http://i.stack.imgur.com/mQrky.png) And this is the LaTeX doc I am working with below, and what it currently looks like. I want to get something with similar clean, tabbed spacing. Any pointers? I tried scanning the hyperref docs, but I did not find what I was looking for or Google did not real smile at me today. ![enter image description here](http://i.stack.imgur.com/5FwQl.png)               \documentclass[a4paper,11pt]{article}          \usepackage{hyperref}          \hypersetup{     pdfauthor = {My Name},     pdftitle = {Blah blah blah},     pdfsubject = {Blah blah blah},     pdfkeywords = {Blah, blah, blah},     pdfcreator = {LaTeX with hyperref package},     pdfproducer = {TexWorks 0.4.3 r857 via MikTeX 2.9}}          \def \textfieldwidth {3in}          \begin{document}          \begin{Form}     \begin{tabular}{l}         \TextField[name=EmployeeName,width=\textfieldwidth]{Employee Name:} \\\\         \TextField[name=EmployeeEmail,width=\textfieldwidth]{Employee E-mail:} \\\\


title: Use variant glyphs from Mac OS X fonts under Linux

text: I would like to get the variant option from fontspec working under Linux. Unfortunately, this option which works with the AAT font system is not compatible with the OpenType font mechanism used under Linux. However, I dumped one of the Mac OS X fonts which contains such variant glyphs and I found that these variant glyphs can be easily got by using their name. Indeed their name are composed like this: `"<name of the standard glyph>.<variant number>"`. For instance to get the second variant of a "d", just use the: `\XeTeXglyph\XeTeXglyphindex "d.2"`. For a "é", it would be: `\XeTeXglyph\XeTeXglyphindex "eacute.2"` etc. Thus I developed a little command to get the corresponding variant if present or use the default one otherwise:               \newcommand\variantChar[2]{%       \@tempcnta=\XeTeXglyphindex "#1.#2"\relax         \ifnum\@tempcnta>0         \XeTeXglyph\@tempcnta       \else         #1       \fi}      Right now I would like to construct a command which takes two arguments: the first one would be the variant number and the second one the sentence to write by using that variant. Unfortunately I don't know exactly how can I parse character by character the second argument and call the `\variantChar` command. Last but not least, I would be interested by knowing a way to get the name of a glyph in order to take into account complexe glyphs name like `"eacute"` or ligature glyphs like `"ft"` etc. Is there a such command which takes as argument the glyph and returns the glyph name? Otherwise do you know an other way to use variant glyphs available in MacOS X fonts under Linux?


title: Jobname of inputted file?

text: \begin{filecontents}{foo.tex}     \def\foo{\jobname}     \end{filecontents}     \documentclass{article}          \begin{document}     \input{foo}     \foo     \end{document}      This outputs the jobname of the _main file_ not "foo". How can I define a macro that outputs the jobname of the inputted file? `\edef` doesn't work either.


title: How do you make a reference from all page numbers to the ToC?

text: Hey fellow LaTeX users. Is there any way to make the page numbers in a document `hyperref`back to the header of the TOC? It would be very useful in my document so I quickly could jump back and forth to the ToC.


title: Include images in TOC?

text: I've got a large document whose table of contents is being generated by the usual `\tableofcontents` command. I'd really like to include a small image next to each line in the TOC. How can I do that? EDIT: Answering the question in the comment below, I'm using Article, and I'd like a different image for each SubSection.


title: How to get text above and below double harpoon (reversible reaction) symbols in an equation

text: I'm working on the Chemwiki Dynamic Textbook Project at UC Davis, California and I've run into a problem. I need to formulate a symbol containing double harpoons (as in a reversible reaction, e.g. `\rightleftharpoons`); however, I need to have text both above and below the harpoons. I have an image I can email, but I can't post with an image because I'm new to this. I can find code for `\overleftrightarrow` and `\underleftrightarrow`, but that's not quite what I need. I need both, on the same expression. If anyone has a minute to help me, I would greatly appreciate it!


title: How to comment in an R-chunk?

text: I'm quite new to both R and LaTeX, but I'm trying to work with both, using Sweave. I know you can comment in R using # and in LaTeX by using %. However, when I write a #comment in an R-chunk (between <<>>= and @) I get an error: > Error: 'filename.Rnw' is not ASCII and does not declare an encoding > > Execution halted I also tried it with % but that obviously didn't work (same error btw). How can I put a comment in an R-chunk?


title: Accessing the n-th coordinates of a plot

text: \begin{tikzpicture}       \begin{axis}         \addplot coordinates {           (1,1) (2,4) (3,9) (4,16)         };         \draw (axis cs:0,0) -- (axis cs:3,9);       \end{axis}     \end{tikzpicture}      I can easily draw a line between two points in a coordinate system. Here, I got a few coordinates of y=x². I can draw a line from the origin of the coordinate system (0,0) to (3,9), which is laying on the plot. (3,9) is the 3rd coordinate of the plot. Would it be possible to write somthing like               \draw (axis cs:0,0) -- (plotcs:3);      to access the coordinates of the 3rd tuple in a plot?


title: Replace all standard LaTeX fonts with [arbitrary fonts] for journal submission

text: A physics journal I'm submitting to requests that image files not contain any non-standard fonts. Standard fonts, as far as they are concerned, are: Times- Roman, Times-Italic, Times-Bold, Times-BoldItalic, Helvetica , Helvetica- Oblique, Helvetica-Bold, Helvetica-BoldOblique, Courier, Courier-Oblique, Courier-Bold, Courier-BoldOblique, Symbol. I'm using the following code to generate a standalone pdf file and I can't seem to get rid of all the "non-standard" LaTeX fonts, specifically "CMMI10" and "CMSY7". Note that I am using XeLaTeX to compile the code.               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{verbatim}     \usepackage{mathspec}          \setallmainfonts{Times New Roman}     \setallsansfonts{Arial}     \setallmonofonts{Courier New}          \begin{document}              \pgfplotsset{every axis plot post/.append style={line width=1.0pt}}         \pgfplotsset{grid style=dotted}         \begin{tikzpicture}             \begin{loglogaxis}                 [clip marker paths=true,                 xlabel=background field amplitude $B_{\text{a}}$ / T,                 ylabel=losses $Q$ / J/cycle/m,                 xmin=2e-3, xmax=5e-2,                 ymin=1e-4, ymax=1e-1,                 xtick={2e-3,5e-3,1e-2,2e-2,5e-2},                 xticklabel style={/pgf/number format/.cd,fixed,precision=3},                 xticklabel={%                     \pgfmathfloatparsenumber{\tick}%                     \pgfmathfloatexp{\pgfmathresult}%                     \pgfmathprintnumber{\pgfmathresult}%                  },                 minor xtick={3e-3,4e-3,6e-3,7e-3,8e-3,9e-3,1.1e-2,1.2e-2,1.3e-2,1.4e-2,1.5e-2,1.6e-2,1.7e-2,1.8e-2,1.9e-2,3e-2,4e-2},                 grid=major                 ]                  \end{loglogaxis}         \end{tikzpicture}          \end{document}      Any ideas how to strip the two remaining fonts from my file?


title: Nested expressions in equations

text: Is it possible to type something like this (in math mode): > A = B and put something below the = sign (such as `x\rightarrow\something`)?


title: Using a Local Font for a Few Maths Symbols

text: To be compatible with my publisher, I had to make my own font (using fontforge) for a few math symbols. However, I could not figure out how to get latex to use my font, so I ended up just making a pdf/eps with just one symbol for each symbol and including the pdf/eps as a graphic. This works, but now compilation takes forever even when there's only a few pages. So, how do I get latex to use my font directly rather than include graphics? I need a solution that lets my coauthors simply check out our directory and compile (possible with special flags and stiff) via both latex and pdflatex on both Windows and Linux (assuming they have appropriate packages in the miktex and texlive suites installed). That is, any solution that requires me to put files anywhere besides the directory with my latex files or subdirectories thereof unfortunately does not suffice. Any help would be most appreciated (if there is a solution at all). I'm not an advanced user, so detailed instructions would be desirable. I have access to both Windows and Linux (specifically Ubuntu) machines for creating any necessary files. Thank you!


title: Total number of citations

text: I am trying find an easy way to get the total number of citations in my thesis (in the final document - not in my Libary.bib file!). I know that I can use \citenum{last_entry} to get the number of the last entery, but in case there is a new entry added later, this doesn't give me the total number of citations anymore. I found the package \usepackage{totcount} helpfull, because it give you a super easy way to get the total number of figures, tables, etc. My questions is: Is there a similar command for the total number of citations? I searched quite a bit, but didn't find anything helpful. Just in case this info is needed - I use a numeric output such as: [1] P. Drude, Physikal. Zeitschr. 1, 161 (1900) Example of how I currently use the package totcount for the total number of figures, tables:               \documentclass{book}     \usepackage{totcount}     \newtotcounter{bibitems}     \newtotcounter{figure}     \regtotcounter{table}          \begin{document}     The total number of figures is \total{figure}, and the total number of tables is \total{table}.                    \begin{figure}     [...]     \end{figure}          \begin{figure}     [...]     \end{figure}                    \begin{table}     [...]     \end{end}          \begin{table}     [...]     \end{end}          \end{document}


title: A problem with thmtools

text: I updated my TeXLive yesterday and `thmtools` is being problematic... Running `pdflatex` on the following minimal example               \documentclass{article}     \usepackage{thmtools}     \begin{document}     Hello     \end{document}      is resulting in               (/opt/TeX/2011/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/opt/TeX/2011/texmf-dist/tex/latex/base/size10.clo))     (/opt/TeX/2011/texmf-dist/tex/latex/thmtools/thmtools.sty     (/opt/TeX/2011/texmf-dist/tex/latex/thmtools/thm-patch.sty     (/opt/TeX/2011/texmf-dist/tex/latex/thmtools/parseargs.sty))     (/opt/TeX/2011/texmf-dist/tex/latex/thmtools/thm-kv.sty     (/opt/TeX/2011/texmf-dist/tex/latex/graphics/keyval.sty)     (/opt/TeX/2011/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     (/opt/TeX/2011/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (/opt/TeX/2011/texmf-dist/tex/generic/oberdiek/etexcmds.sty     (/opt/TeX/2011/texmf-dist/tex/generic/oberdiek/ifluatex.sty)))          ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.277     \ifthmt@isnumbered\else *                                        \fi     ?       The particular file where this happens, `tex/latex/thmtools/thm-kv.sty`, has not changed (and I had no problem with the package a couple of days ago!), so something else is causing the error. I have no idea how to chase it, though. Ideas?


title: Macro for the average width of a character

text: How can i made a macro similar to `\averagecharwidth` of ConTeX in LaTeX, that calculates the average width of a character based on the frequency of that character into my document ? that macro is show in this post. ![enter image description here](http://i.stack.imgur.com/igNuI.png)


title: Mirrored cylinder in TikZ

text: How can I draw the following mirrored cylinder, together with the mirrored “Muon”, in TikZ? Thanks in advance! ![mirrored cylinder](http://i.stack.imgur.com/LGLRR.jpg)


title: How to keep track of necessary changes ("todo") for a large document?

text: Working on my Ph.D. thesis I use the `fixme` package to add notes and comments to my `pdflatex` document and I have defined several types of notes for easily seeing the difference between "substantial" changes (like "text might be wrong" or "there is some info missing") and "cosmetic" changes (like "alignment of this table is not perfect" ...). I have loads of notes in my document now and I'm quite desperate, as it seems impossible to get an overview of the changes to make and to sort them in order to be sure to do the most important ones first and make some time management and planning not to loose too much time just for creating one beautiful graph. Does anyone have a good solution or workflow to   * efficiently edit a large document like a thesis or book    * and keep track of notes, ideas and things to do? _Some thoughts:_   It would be great if there was a possibility to create kind of an "anchor" in the source code (or pdf), so that I could jump there with a hyperlink from the todo note directly. I think that I'd need an external solution which allows me to sort, re-arrange and tag those notes for prioritizing and overview - maybe with a mind map or a table which can be filtered, sorted and rearranged.   On the other hand, I'd like to leave them in the latex document, so that while looking at a certain page I can see the corresponding notes. But it does not make much sense to type them in the LaTeX-editor and then re-type them in the external application again, but all that sounds very complicated to me. :-(


title: Custom text instead of line numbers in algorithmic

text: In an algorithm using the `algorithmic` package, I would like to display for some lines a special symbol (e.g. a `+`), instead of their line number. Is this possible? **Edit:** Here's a minimal working example.               \documentclass{article}          \usepackage{algorithm}     \usepackage{algorithmic}          \begin{document}          \begin{algorithm}[tb]       \caption{My algorithm}     \begin{algorithmic}[1]       \STATE{foo}       \STATE{bar}     \end{algorithmic}     \end{algorithm}          \end{document}


title: tikz: placing nodes relative to the bounding box coordinates

text: I have a `tikzpicture`,in this case a blue rectangle, that will produce a `bounding box`, here visualized by the green background. I would now like to place a `node` in the top left corner of the `bounding box`. In this case, since I know the `absolute coordinates` it is easy to do, but that is not always the case, especially when using external graphics or drawing three dimensional objects in rotated coordinate systems. It would therefore be handy, to be able to place the `nodes` relative to the `bounding box`. In the `axis` environment, nodes can be placed in relative coordinates using `rel axis cs`. In this case the code would be `\node at (rel axis cs:0,1) [anchor=north west] {node content}`. Since in my example, there is no pre- defined `axis`,this is not possible here. Is there something similar for a plain `tikzpicture`?               \documentclass[10pt,crop]{standalone}          \usepackage{tikz}          \usetikzlibrary{backgrounds}          \begin{document}          \begin{tikzpicture}[tight background,background rectangle/.style=      {fill=green},show background rectangle] \path[draw=black,fill=blue]      (0,-1) -- (-1,0) -- (1,2) -- (2,1) -- cycle;      \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/B6rDK.png)


title: Resize epslatex (gnuplot) graphics for Beamer slides

text: I have created some graphics in gnuplot using `set terminal epslatex color` and I rather liked them in my paper. However, once I tried to put them into Latex Beamer slides the way I put them into my paper,they where to big. I reference the genrerated *.tex file like this:               \begin{figure}[htp]        \input{./path/to/*.tex}     \end{figure}      This file contains the labels and axises, which are in latex and make it look so nice. The file in turn references the actual graph (a pdf file, generated from the corresponding eps file, which gnuplot made) using an `\includegraphics` Now I want to resize it to, say 90% of the free space on a slide. Setting `\includegraphics[keepaspectratio=true,height=0.7\paperheight]` alone won't do, since then the picture is smaller, but the labels are still the same. How do I make both smaller: the stuff in the *.tex file and the included image? Bonuspoints, when I do not have to go back to gnuplot and regenerate the graphics from scratch.


title: LaTeX document without \documentclass

text: I need to create a really simple document template for other people to fill in and compile (e.g., they need to provide a name and email address). I could distribute it as a `.cls` file and a template `.tex` file, but I think it might be easier to just distribute it as a single file. It appears that one can compile a document without a `\documentclass` without any warnings. For example, despite not having a `\documentclass` line, the following is a complete MWE:               \renewcommand\normalsize{\fontsize{10pt}{12pt}\selectfont}     \begin{document}     Hello world     \end{document}      Where the entire "class" is `\renewcommand\normalsize{\fontsize{10pt}{12pt}\selectfont}`. What are the drawbacks of defining the entire "class" within the `.tex` file and not using a `\documentclass` line? **EDIT** To add a little more about what I am doing. I created a custom class that was not based on any other class. I then took David Carlisle idea and changed               \documentclass{myclass}      to               \documentclass{article}     \makeatletter     %  your definitions     \makeatother      but this caused conflicts of things that were defined in both `myclass` and the `article` class. It probably would have been better to use the `minimal` class, but I realized that I didn't need the `\documentclass{article}` before I thought about the `minimal` class.