title: Getting "Dimension too large" using psgraph and listplot

text: I am trying to setup a chart. Sometimes the y-Axis Value range gets a little narrow. And in one of those cases I ran into the infamous "Dimension too large" error as seen below. How can I circumvent that error, it seems to be related to the integrated AXIS parameters in the optional parameters of psgraph. hence...               \begin{psgraph}[optionals... going to axis](xmin,ymin)(xmax,ymax){width,length}     \end{psgraph}      I hope the following qualifies as a MWE... ;)                  \documentclass[a4paper,12pt, headsepline, parskip, headinclude]{scrbook}         \usepackage{pstricks-add}              \begin{document}             \def\dataI{%             40 0.01             30 0.008             15 0.001             0 0}                  \large Works fine\\             \normalsize Using y-Max = 0.1 and Dy = 0.02                  \psset{xunit=1cm,yunit=1cm,plotstyle=line,tickstyle=top,axesstyle=frame}             \begin{psgraph}[Dx=5,Dy=0.02](0,0)(0,0)(40,0.1){0.4\textwidth}{0.4\textwidth}                 \listplot[linecolor=red]{\dataI}%             \end{psgraph}                  \large Throws an error trying to magnify \emph{y} by one magnitude                  \small\begin{verbatim}             % ! Dimension too large.             % <recently read> \p@              %             % l.59 ...,0)(40,0.01){0.4\textwidth}{0.4\textwidth}             %             % I can't work with sizes bigger than about 19 feet.             % Continue and I'll use the largest value I can.             \end{verbatim}             \normalsize Using y-Max = 0.01 and Dy = 0.002                  \psset{xunit=1cm,yunit=1cm,plotstyle=line,tickstyle=top,axesstyle=frame}             \begin{psgraph}[Dx=5,Dy=0.002](0,0)(0,0)(40,0.01){0.4\textwidth}{0.4\textwidth}                 \listplot[linecolor=red]{\dataI}%             \end{psgraph}         \end{document}


title: difficulty correctly identifying all parameters affecting vertical placement within lists

text: I'm trying to align the baseline of the first line of a list environment with the baseline of a box. After working on this in various forms, I thought I was ready to tackle this issue. I also thought I was making good progress. But testing my approach in various situations has revealed that I'm still missing something. I'm feeling a bit sheepish about asking yet another question about lengths and vertical alignment. But after working on this over the past 24 hours, I feel I'm out of ideas of what to do next. My MWE consists of three parts:   1. A file, `newlist.tex`, which defines a new environment to facilitate aligning a listing environment with a box's baseline,   2. A file, `showandtell.tex`, which contains several macros designed to help show the heights and values involved,    3. And the file to wrap around the MWE. The file `newlist.tex`               \makeatletter     %%  A box to line up against                                                     \newsavebox{\aeQuickBox}     \def\aeQuick{\savebox{\aeQuickBox}{Tq \rule[-2ex]{0.1pt}{3ex}jay}%%'                  \usebox{\aeQuickBox}%%'                  \setlength{\dp\aeQuickBox}{\dp\aeQuickBox}}     %% THE STRUT                                                                     \newlength{\ae@strut@ht}     \setlength{\ae@strut@ht}{0.7\baselineskip}     \newcommand{\aestrut}{\makebox[0pt][r]{\rule{2pt}{\ae@strut@ht}}}     %% MY LIST                                                                       %% new lengths created for access outside of environment                         \newlength{\ae@enum@topsep}     \newlength{\ae@enum@partopsep}     \newlength{\ae@enum@parsep}     \newlength{\ae@enum@parskip}     \newenvironment{alignedenum}       {\begingroup          \begin{list}            {\bfseries\textbullet}            {%% horizontal dimensions                                                         \setlength{\labelwidth}{1.5em}%%'             \setlength{\labelsep}{0.5em}%%'             \setlength{\itemindent}{0em}%%'             \setlength{\leftmargin}{\dimexpr                                                     \wd\aeQuickBox + 0.5em                                       +\labelwidth +\labelsep -\itemindent                                     \relax}%%'             %% vertical dimensions                                                           %% test whether `\partopsep` has been added             \ifvmode               \global\setlength{\ae@enum@partopsep}{\partopsep}%%'             \else               \global\setlength{\ae@enum@partopsep}{0pt}%%'             \fi             %% next is true only if this environment is within another list             \ifnum\@listdepth>1\relax               \global\setlength{\ae@enum@topsep}{\topsep}%%'             \else               \global\setlength{\ae@enum@topsep}{0pt}             \fi            \global\setlength{\ae@enum@parsep}{\parsep}%%'            }%%'            %% set \ae@enum@parskip here because wrong value of `\parskip` is             %% called within arguments to `list` environment.            \global\setlength{\ae@enum@parskip}{\parskip}%%"            %% avoid `\lineskip` if being aligned with a very deep box            \nointerlineskip            \myremovevspace       }       {\end{list}\endgroup}          %% VERTICAL SPACE REMOVAL                                                        \newcommand{\myremovevspace}       {%%\par\nointerlineskip         \vspace{%%'          -\dimexpr                       \ae@strut@ht             +\ae@enum@topsep             +\ae@enum@partopsep             +\ae@enum@parsep             +\ae@enum@parskip             +\dp\aeQuickBox        \relax}}          \makeatother      The file `showandtell.tex`               \usepackage{xcolor}     \makeatletter     %% cumulative lengths for stacking and making lengths visible                    \newlength{\ae@tmp@dim@a}     \newlength{\ae@tmp@dim@b}     \newlength{\ae@tmp@dim@c}     \newlength{\ae@tmp@dim@d}     %% COLORS                                                                        %%   orange = strut height                                                       %%   blue   = topsep                                                             %%   gray   = parskip + parsep                                                   %%   red    = aeQucikBox depth                                                   \newcommand{\aeStackLengths}       {\bgroup        %%'----------------------------------------------------------------------        \setlength{\ae@tmp@dim@a}{0pt}%%%'        \setlength{\ae@tmp@dim@b}{\dimexpr\ae@tmp@dim@a+\ae@strut@ht\relax}%%'        \setlength{\ae@tmp@dim@c}{\dimexpr\ae@tmp@dim@b+\ae@enum@topsep}%%'        \setlength{\ae@tmp@dim@d}{\dimexpr\ae@tmp@dim@c+\dimexpr\ae@enum@parskip+\ae@enum@parsep+\ae@enum@partopsep}%%'        %%'----------------------------------------------------------------------        \color{orange!80}%%'        \raisebox{\ae@tmp@dim@a}[0pt][0pt]{\makebox[0pt][l]{\rule{3pt}{\ae@strut@ht}}}%%'        \color{blue!70}%%'        \raisebox{\ae@tmp@dim@b}[0pt][0pt]{\makebox[0pt][l]{\rule{3pt}{\ae@enum@topsep}}}%%'        \color{gray!50}%%'        \raisebox{\ae@tmp@dim@c}[0pt][0pt]{\makebox[0pt][l]{\rule{3pt}{\dimexpr\ae@enum@parskip+\ae@enum@parsep+\ae@enum@partopsep}}}%%'        \color{red}%%'        \raisebox{\ae@tmp@dim@d}[0pt][0pt]{\makebox[0pt][l]{\rule{3pt}{\dp\aeQuickBox}}}%%'        \egroup       }          %%--------------------------------------------------------------------------     %% VISUALLY REP FOR DIMS                                                         %%--------------------------------------------------------------------------     %% show baseline                                                                 \newcommand{\aeshowbaseline}{\makebox[0pt][l]{\color{blue}\rule{0.1pt}{1ex}\rule{2in}{0.1pt}}}     %% show depth                                                                    \newcommand{\aeshowdepth}{\makebox[0pt][r]{%%'       \color{red}%%'       \rule[-\dp\aeQuickBox]{2.25in}{0.1pt}%%'       \rule[-\dp\aeQuickBox]{0.1pt}{\dp\aeQuickBox}%%'       \makebox[0pt][l]{\rule[-\dp\aeQuickBox]{1.5in}{0.1pt}}%%'       }}          %%--------------------------------------------------------------------------     %% SHOW VALUES FOR DIMS                                                          %%--------------------------------------------------------------------------     \usepackage{pgffor}     \newcommand\aeshowbox[1]       {\begin{minipage}[t]{2in}\tiny\ttfamily           \foreach \x in {#1}{ \makebox[1cm][r]{\x}  =  \the\csname \x\endcsname\\ }       \end{minipage}}     \def\aeshowLengths{\aeshowbox{topsep,partopsep,parsep,parskip,%%'                                   ae@enum@topsep,ae@enum@partopsep,ae@enum@parsep,ae@enum@parskip}}     \makeatother      The wrapper file:               \documentclass{article}     \input{newlist}     \input{showandtell}     \usepackage{lipsum}     \begin{document}          \noindent       \aeshowbaseline\aeQuick  \par       \begin{alignedenum}         \item \aestrut\aeStackLengths\aeshowbaseline\, My first line: \aeshowLengths         \item second line       \end{alignedenum}          \begin{enumerate}       \item \aeshowbaseline\aeQuick             \begin{alignedenum}               \item \aestrut\aeStackLengths\aeshowbaseline\, My first line: \aeshowLengths               \item second line             \end{alignedenum}     \end{enumerate}          \begin{enumerate}       \item  \verb=\par= inserted              \begin{enumerate}                \item \aeshowbaseline\aeQuick \par                      \begin{alignedenum}                        \item \aestrut\aeStackLengths\aeshowbaseline\, My first line: \aeshowLengths                        \item second line                      \end{alignedenum}              \end{enumerate}     \end{enumerate}          \begin{enumerate}       \item No \verb=\par= inserted              \begin{enumerate}                \item \aeshowbaseline\aeQuick                       \begin{alignedenum}                        \item \aestrut\aeStackLengths\aeshowbaseline\, My first line: \aeshowLengths                        \item second line                      \end{alignedenum}              \end{enumerate}     \end{enumerate}          \end{document}      These produce: ![enter image description here](http://i.stack.imgur.com/oHDF9.png) As seen from the image, everything seems to be working fine until I've buried my new environment within two other lists. I don't understand how I've not taken into account all the space. I'm also finding it difficult to locate the documentation for how the various parameters are set at each list level. I can't find much of anything useful in `source2.pdf`.


title: lemma numbering like 1.2.2 Lemma

text: definition numbering like the below output, im getting the default numbering only. 1.1 Lemma 1.2. Proposition how to do this using in latex coding:               \documentclass[fleqn]{gsm-l}          \usepackage[]{weblink}          \begin{document}          \setcounter{chapter}{0}          \setcounter{section}{0}          \chapter{LINEAR SPACES}          \begin{proposition}          text          \end{proposition}           \subsection{subsection1}          text           \begin{lemma}          text     \end{lemma}     \begin{corollary}      text     \end{corollary}           \subsection{subsection2}          text          \begin{remark}           text          \end{remark}          \end{document}       Output: > Linear Spaces > > Proposition 1.0.1. text > > 1.0.1. Subsection1. text > > lemma 1.0.2. text > > corollary 1.0.3. text > > 1.0.2. subsection2. text > > remark 1.0.4. text Expected output: > Linear Spaces > > 1.0.1. Proposition%its in small caps% text > > 1.0.2. Subsection1%its in small caps% text > > 1.0.3. lemma%its in small caps% text > > 1.0.4. corollary%its in small caps% text > > 1.0.5. subsection2%its in small caps%. text > > 1.0.6. Remark%its in small caps% text **without using`\newtheorem` `\newenvironment` `\theoremstyle` `\renewcommand`** **only`\newcommand` is allowed** weblink


title: Embedding 3D PRC model in LaTeX with custom views visibilities (movie15)

text: I'm using the movie15 package to include 3D graphics in my LaTeX document. I have model in PRC file format (generated by Asymptote). You can find all files of interest + my pdf output here: http://www.2shared.com/file/mAWb_VP_/surfaces.html . I'm getting the pdf output, views are changing the camera position correctly, but... visibility settings of certain parts seems to be ignored. The "Show Blue" view should hide yellow and green plane, but it doesn't. No difference if I use parts names from the model tree in Adobe Reader, or those generated by 3Dgetview option from movie15 package. Neither of those work for me. Does anyone have any clue what is wrong? Here is the testing **surface.tex** file:               \documentclass[12pt,a4paper]{report}          \usepackage[utf8]{inputenc}     \usepackage[3D]{movie15}     \usepackage{hyperref}          \begin{document}          \includemovie[     poster,     3Dlights=Headlamp,     label=surfaces,     toolbar=true,     3Daac=30.276689431853366585,     3Dc2c=0 0 1,     3Dcoo=0 0 -1040.755370793648580729,     3Droll=0,     3Droo=1040.755370793648580729,     3Dbg=1 1 1,     3Dviews2=views.vws,     ]{388.45125pt}{248.93pt}{surfaces.prc}          \movieref[3Dgetview]{surfaces}{View parameters!}          \end{document}      and the views file **views.vws** :               VIEW={Show All}       COO=0 0 -1040.75537109375       C2C=0 0 1       ROO=1040.75537109375       AAC=30.276688383008686       BGCOLOR=1. 1. 1.       LIGHTS=Headlamp       RENDERMODE=Solid     END          VIEW={Show Blue}       COO=-187.2486572265625 -24.813243865966797 -976.3198852539062       C2C=0.33296605944633484 -0.0709739476442337 0.9402639269828796       ROO=1180.2327931698283       ROLL=66.06585852059459       AAC=30.276688383008686       BGCOLOR=1. 1. 1.       LIGHTS=Headlamp       RENDERMODE=Solid       PART={surface_yellow.a0d4eb333793f1bba7202ad56b4ba57a10a0a0d4eb333793f1bba7202ad56b4ba54da02840}         VISIBLE=false       END       PART={surface_green.a0d4eb333793f1bba7202ad56b4ba57a10d0a0d4eb333793f1bba7202ad56b4ba54da02840}         VISIBLE=false       END     END      Like I said above, I also tried names like surface_yellow or a0d4eb3337..., neither of it worked. I'm using Windows 7 Ultimate with TeXLive 2010, Adobe Reader 9.4.6. I'll be glad for any help.


title: Dictionary for TeXstudio: “No dictionary Available”

text: I have trouble spell checking my document in TeXstudio. When I press spellcheck, I get the error `No dictionary Available`. Am I supposed to install a dictionary separately? How? Any suggestion?


title: How to add a single axis label to multiple graphs

text: Please I need someone to help me address this problem. I have three graphs that I created using excel and I have been able to save them as eps files. I've been able to use the `\raisebox` command to arrange the graphs in the order I want but adding the axis title has being a big problem for me. Please find attached a picture showing what I need to achieve. I have also included a working extract of my code. ![Task](http://i.stack.imgur.com/ZAd6U.jpg)               \documentclass{article}     \usepackage{graphicx}     \usepackage{subfig}     \newsubfloat{figure}     \begin{document}     \begin{figure}[htb]       \centering       \raisebox{\dimexpr-.5\height-1em}{\includegraphics[scale=0.4]{Figures/knockho1.eps}}\ \subfloat[\label{label1}]{} \\[\topskip]       \raisebox{\dimexpr-.5\height-1em}{\includegraphics[scale=0.4]{Figures/knockho2.eps}}\ \subfloat[\label{label2}]{}       \caption{This is the text that describes \protect\subref{label1} and \protect\subref{label2}.}     \end{figure}     \end{document}


title: Percent signs disappearing from verbatim block (ltxdoc class)

text: Is the following expected:               \documentclass{ltxdoc}     \begin{document}     \begin{verbatim}     % why is my percent sign gone?     \relax % not here     \end{verbatim}     \end{document}      ![missing percent](http://i.stack.imgur.com/UTEEr.png)


title: Turning parts of text on and off

text: Is there a way to turn certain parts of the text on and off in LyX/Latex ? I'm thinking of having something like an environment (lets call it "TL" for "traffic light") and a parameter `t` such that if I set for example `t=0` (meaning the light shows "red") at the beginning, all pieces of my text that lie within the TL-environment aren't displayed in the compiled document - whereas if I set `t=1` ("green") they are displayed ? (I asked about _something like_ such an environment following the idea that LyX maybe has special mechanism to do this - so any solution, not necessarily "hard-coded" ones via environments are welcome as long as they are easy to implement.)


title: Spacing preceding a subscript?

text: In a document I'm writing, I have a line               \documentclass{article}     \usepackage{amsmath,amssymb}          \begin{document}     \operatorname{Tor}_1(\mathbb{Z}/(r),B)= _rB\simeq\cdots     \end{document}      However, the subscripted `r` becomes a subscript behind the `=` but I want it to be a subscript preceding the `B`, with a space between that and the `=`. I changed it to               \documentclass{article}     \usepackage{amsmath,amssymb}          \begin{document}     \operatorname{Tor}_1(\mathbb{Z}/(r),B)=\ _rB\simeq\cdots     \end{document}      by putting a `\` after the `=` to force a split, but of course it introduces an extra space which looks unusual. Is there a better way to go about this?


title: Multiple Figures in LaTeX

text: I have generated a large number of figures (about 400) and I'd like to place, for example, 20 figures per page (4*5). I've looked for the solution on the Web but all I've found is solutions for small number of figures (13 figs.) and they all use the `\includegraphics` command for every single figure which in my case that would be ridiculously time consuming. I'd like to ask if there is any other way I can build my final document (in PDF). Also, my figures have `*.ps` extension which latex shows the error message               ! LaTeX Error: Unknown graphics extension: .ps.      even by using `\usepackage{epstopdf}` command. I'll appreciate your help in advance. I read the github page (introduced by this user) but, honestly, I didn't get it. I just compiled the following lines (as a test for the first 10 figures):               \long\def\putgraphic#1{%     \setlength\fboxsep{0pt}     \setlength\fboxrule{0pt}     \fbox{%     \begin{minipage}[b]{0.2\textwidth}%      \centering      \vspace{3.8pt}\fbox{%      \includegraphics[width=0.98\textwidth,height=2.3cm,keepaspectratio]{./images/#1}}%       \vspace{0.2cm} #1%\captionof{figure}\relax       \vspace{0.2cm}%       \end{minipage}}\hfil     }     \DeclareRobustCommand{\putcaption}[1]{\captionof{figure}{#1}}     \makeatletter     \def\alist{0001.eps,0002.eps,0003.eps,0004.eps,0005.eps,0006.eps,0007.eps,0008.eps,0009.eps     ,0010.eps}          \@for \i:=\alist\do{%     \expandafter\putgraphic{\i}%     }      \putcaption{Weaving and pottery artifacts from Arizona.}      but I get the               ! Undefined control sequence      error message and then it addresses a curly bracket (the lonely one before the last line). I'm new with LaTeX, so I'd be thankful if you could walk me through this step by step. Oh, by the way, I found this page but I couldn't figure the solution. I hope by preamble you mean the followings:               \documentclass[pdftex,12pt,a4paper]{article}     \usepackage{times}     \usepackage{amsfonts}     \usepackage{amsmath,wasysym}     \usepackage{graphicx}     \usepackage{epstopdf}     \graphicspath{{../pdf/}{F:\...\...\...\...\abc}}     \usepackage{floatrow}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{lipsum}     \usepackage{graphicx}     \usepackage{overpic}     \usepackage[font=small,labelfont=bf]{caption}     \usepackage{here}     \usepackage{booktabs}     \usepackage[colon,authoryear]{natbib}     \usepackage{fixltx2e}     \usepackage{float}     \usepackage{tabularx}     \usepackage{siunitx}     \usepackage{fancyhdr}     \usepackage{cleveref}     \usepackage{lscape}     \usepackage{longtable,rotating}     \usepackage{chngcntr}     \usepackage{makeidx}     \makeindex      \usepackage[refpage]{nomencl}     \makenomenclature     \linespread{1.3}


title: Follow-up: Underline + strike-through using soul

text: This is a follow-up question to Mixing underline and strike-out. This time, I'm specifically interested in an implementation using `soul` (that doesn't require multiple compilations to stabilize). I would like to use `soul` to create an (underline) + (strike-through) command `\textulst` that would combine `\textul` with `\textst` and still allow line- breaks within. Thus far I'm unable to properly combine the two, as `soul` uses the same underlining for _both_ the (regular) underline and the strike-through. Here's my (unsuccessful) attempt at generating `\textulst`: ![enter image description here](http://i.stack.imgur.com/DqEPi.png)               \documentclass{article}     \usepackage{soul}          \makeatletter     \def\SOUL@ulstunderline#1{{%         \setbox\z@\hbox{#1}%         \dimen@=\wd\z@         \dimen@i=\SOUL@uloverlap         \advance\dimen@2\dimen@i         \rlap{% Draw underline             \null             \kern-\dimen@i             \SOUL@ulcolor{\SOUL@ulleaders\hskip\dimen@}%         }%         \SOUL@stpreamble% Switch to draw over-strike         \rlap{%             \null             \kern-\dimen@i             \SOUL@ulcolor{\SOUL@ulleaders\hskip\dimen@}%         }%         \unhcopy\z@     }}     \def\SOUL@ulsteverysyllable{%         \SOUL@ulstunderline{%             \the\SOUL@syllable             \SOUL@setkern\SOUL@charkern         }%     }     \def\SOUL@ulstsetup{%       \SOUL@ulsetup       \let\SOUL@everysyllable\SOUL@ulsteverysyllable     }     \DeclareRobustCommand*\textulst{\SOUL@ulstsetup\SOUL@}          \makeatletter          \begin{document}     Here is \textul{some text}.          Here is \textst{some text}.          Here is \textulst{some text}.     \end{document}


title: pdflatex and \hyphenation

text: EDITEDx2. Here is a fairly short latex file.               \documentclass[12pt]{amsart}     \newcommand{\calG}{\mathcal{G}}     \newcommand{\calP}{\mathcal{P}}     \hyphenation{lem-ma none-the-less un-pa-ram-e-ter-ized}     \begin{document}     \subsection{Projection to holes is coarsely Lipschitz}     The following lemma is used repeatedly throughout the paper.     \begin{itemize}     \item     for any hole $X$ for $\calG$, the projection $\pi_X(\calP)$ is an     $A$--unparameterized quasi-geodesic and     \item     foobar.     \end{itemize}     \end{document}      When I use `pdflatex` (pdfTeX 3.1415926-1.40.11-2.2 (TeX Live 2010/Fink)) I get a pair of overfull hbox errors. If I replace `lemma` in the body by `lem\\-ma` and replace `unparameterized` by `unparame\\-terized` then the warnings go away. Suggestions?


title: How to get this font

text: I would like to typeset sanskrit in the font given at this page: http://www.sanskritweb.net/sansdocs/gita-dev.pdf Devanagari typesetting uses a different font. Can anyone tell as to how i can use this font.


title: TikZ: Rectangle spanning a submatrix, as a node

text: I specify the corners of a rectangle, spanning a certain submatrix of a matrix, and want this rectangle to be a node. The minimal example is:               \documentclass{standalone}          \usepackage{tikz,pgf}          \usetikzlibrary{scopes,arrows,calc,shapes.misc,shapes.arrows,chains,matrix,positioning,decorations.pathmorphing,shapes}          \begin{document}          \newcommand{\bbrect}[2]{\draw (B-#1-2.north west) rectangle (B-#2-2.south east)}          \begin{tikzpicture}         \ttfamily         \matrix (B) [matrix of nodes, ampersand replacement = \&] {             \hline             {0} \& {12}\\             {1} \& {7}\\             {2} \& {2}\\             {3} \& {2}\\             {} \& {2}\\             {} \& {2}\\             {} \& {2}\\             {} \& {2}\\             };         \bbrect{1}{1};         \bbrect{2}{2};         \bbrect{3}{8};     \end{tikzpicture}          \end{document}      How to achieve this?


title: Switching to different font size(s) locally

text: Inside a 12pt document I like to switch in an environment to a font size of 10pt. The macros like `\normalsize`, `\large`, `\small` etc. should all work like in a 10pt document. I'm aware that this isn't good typography and might look bad in general. I'm planning to use it for the labels inside a `tikzpicture`. The task (I don't like to call it a "problem") is that I have some `standalone` `tikzpicture` documents which are using 10pt when compiled standalone, but can be also inserted into 12pt documents where the text does not fit any more in some places. I know it could be fixed by changing all distances to one of the font size specific units `em` or `ex`, but don't like to change several figures and maybe add this as a feature to the `standalone` package.


title: Change font size in the middle of a document or for individual included .tex file

text: I'm writing a lengthy project which needs to be in `12pt`, but my appendices make use of `\small` and `\tiny` commands which only align correctly in `10pt` since there is a large amount of numerical data in multiple columns across the pages (these get too squished together and overlap in any higher font size). I have separate sections and `\include` those files, and wish only to set the appendix section in a smaller font. I reference to the appendix and it contains many figures so can't make it a separate document. I'm trying to use `\fontsize{10}{12}\selectfont` but it's not working. Sometimes it doesn't change anything, at the moment it makes the font slightly smaller but not `10pt` size. Code:               \documentclass[12pt]{article}          \usepackage{graphicx}     \usepackage{multicol}      \includeonly{intro,theory,appendix}          \begin{document}          \include{intro}     \include{theory} %...etc               {\fontsize{10}{12}\selectfont       %<---this doesn't work     \include{appendix}     }          \end{document}      I'm fairly new to LaTeX and self taught, so most of my help comes from googling and ending up here, but I'm really stuck at this one and the solutions to similar questions don't seem to work for me. This solution makes the font size correct but seems to add the page margins twice in the appendix, so that the whole appendix text is too far down and too far to the right.


title: customized \footcite command

text: Based on an answer on new line for doi eprint url in the bibliography with biblatex, a question arose on the possible use of the `\footcite` command with the provided new style. This `\footcite` command seems to be a good compromise for rather long scripts where you do not want to disturb the main text with things like [Author Year] (authoryear style) or when you want to provide more information than [1] (numeric style). So, the question is how to create a personal biblatex style based on the numeric style that would provide information in a footnote when `\footcite` is used. Minimal information here should be thought for each case `@article`, `@book`, `@phdthesis`, `@inproceedings` but would just indicate contracted author names, title, year... The link to the main reference in the bibliography section should be added as well in the footnote.


title: Rotate text in Thumbindex using thumbs package

text: I am using the "thumbs" package to generate tumb indices on my pages with the chapter information in them.               \addthumb{First Section}{\thesection}{white}{lightgray}      What I would like to do is to rotate the text by 90°. I tried the "rotating" package, which does not work for me:               \addthumb{First Section}{\begin{sideways}\parbox{5cm}{\centering \Large \textbf{\thesection}}\end{sideways}}{white}{lightgray}      The term on its own does work fine, just not in the thumbindex environment. Is there any possibility to achieve that? Thank you for any advice! UPDATE: * * *               \documentclass[a4paper,10pt,titlepage]{article}     \usepackage[ansinew]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage{color}     \usepackage[width=1cm, height=1.2cm, eventxtindent=5pt, oddtxtexdent=5pt]{thumbs}     \usepackage{rotating}          \begin{document}          \section{Intro} \label{chap:1}     \addthumb{First Section}{\thesection}{white}{lightgray}          text          \end{document}      * * *


title: How to rotate a picture in 3 dimensions?

text: I have a picture like this: ![College Logo](http://i.stack.imgur.com/LTLQE.png) I want to use this picture rotated like this (inline with the text as well as separately): ![Rotated College Logo](http://i.stack.imgur.com/9JYkH.png) Is there a way to achieve this?


title: Rescale paragraph to fit margins or detect used width of paragraph

text: I want to write a command or similar that allows me to rescale a given paragraph to fit a given frame, keeping the aspect ratio. The problem is that the paragraph is usually manually set and not automatically wrapped (and thus I do not know its width). To give an example, using the `adjustbox` package, I can combine `minsizebox` and `maxsizebox` to define `almostwhatiwant` in the following way (the boxes generated with `displayconstraint` are just for illustration):               \documentclass{article}     \usepackage{adjustbox}     \newcommand{\displayconstraint}[1]{\fbox{\begin{minipage}[l][3cm]{5cm} #1 \end{minipage}}}     \newcommand{\almostwhatiwant}[1]{\maxsizebox{5cm}{3cm}{\minsizebox{5cm}{3cm}{#1}}}     \begin{document}\noindent         \displayconstraint{\almostwhatiwant{test}} % example 1         \displayconstraint{\almostwhatiwant{t}}\\ % example 2         \displayconstraint{\almostwhatiwant{test\\test test}} % example 3         \displayconstraint{\almostwhatiwant{\parbox{\linewidth}{test\\test test}}} % example 4     \end{document}      renders the following: ![enter image description here](http://i.stack.imgur.com/mb0bu.png) The first two examples (top row) are rendered as desired, but as soon as I want to make linebreaks, I encounter the problem that I have to use a paragraph-like environment (otherwise, the third example happens), for which I have to specify a linewidth. This allows me to format the text in the way I want, but its width as used by the rescaling boxes is now the specified linewidth and thus the result is dissatisfactory (example 4). I am aware of many other approaches to this problem, but they all eventually fail due to similar reasons or require me to do something manually (like detecting the longest line of the paragraph). I could fix this problem, if I could somehow detect the actual width of a paragraph or crop a paragraph to its actual content.


title: Positioning relative to page in TikZ

text: Consider the following: Let's say I have a dot. I would like to be able to position this dot anywhere on the page: at the corner, in the middle, anywhere. So far, despite poring over manuals and experimenting, I can not figure out how to do this. It seems logical that there would be some system that would place a conceptual grid on the page and then allow for an exact placement within that grid. I'm sure it exists, but I can't seem to find it. I can make the dot, and all sorts of other shapes, but I just don't seem to have any control over where these shapes appear on the page. I'm sure this is an obvious question and I have overlooked something.


title: Font size difference between LatexIt and regular compilation

text: I am currently write my PhD thesis and have a lot of pictures to make and use the tikz and pgf packages. I am using LatexIt on Mac to first design my pics and then copy/paste them into my actual thesis. The problem is that there are difference between the 2 compilations, mainly on font sizes. For instance, I draw a rectangle and put text in it. It may fit well in LatexIt but overflow in my regular document. I tried to use scale and resizebox commands, with no success. Do you have any clue on what I am doing wrong ?


title: wrapfig Positioning (Footer is overlapping figure)

text: I have something like the following:               Long paragraph with footnote.\footnote{footnote shtuff here}          Another long paragraph without a footnote.          \begin{wrapfigure}{r}{.5\textwidth}         % figure shtuff here     \end{wrapfigure}      The output is rather frightening: ![Output](http://i.stack.imgur.com/Us6GL.png) How can I fix this? There are no figures previous this one and I don't mind raising it up on the page.


title: polar chart heat map

text: I was wondering if anyone could help me with making a polar heat map. To the template i chosen is http://www.texample.net/tikz/examples/polar-coordinates- template/ what i would like to do is to colour the squares (like in darts) using colour scale from red to blue. the radius should be the x-axis, that is, the series of squares starting from inner circles to outer circles could be coloured according to some specified set of number values(1(blue)-1000(red)). Am I making any sense?? also i don't need the grid. thank you


title: Misalignment of text in other cells when figure is placed in table (bounding box problem)

text: Here is my code:               \documentclass[10pt]{article}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{bigints}     \usepackage[pdftex]{graphicx}     \graphicspath{{C:/Users/Sam/Desktop/PaperFigures/}}     \DeclareGraphicsExtensions{.pdf,.png}     \begin{document}     \begin{center}     Table 3. Voltage Loop Results     \linebreak     \begin{tabular}{| p{3cm} | p{2cm} | p{3cm} | l |}      \hline     Loop Equation & Experimental Value & Loop Description & Loop Figure \\ \hline     $-V_{E}+ V_{1} - V_{d} - V_{4} = 0$ & & Through battery, down right side of resistor                       complex. Current Flow: $E \rightarrow R_{1} \rightarrow R_{d} \rightarrow  R_{4}$ &    \includegraphics[scale=0.2]{CircuitFigure3} \\ \hline     \end{tabular}     \end{center}     \end{document}      This is what is rendered: ![Messed up TeX](http://i.stack.imgur.com/cM16p.png) Here is the .pdf of the image if you want to compile this yourself and check it out: ![Title it "CircuitFigure3"](http://i.stack.imgur.com/YRtia.png) How can I change my code such that the text in the other columns (I realized just now my headers are in the wrong column but that does not matter) will be aligned with the top \hline after the column headers? Also, how can I make the text I write in the cells not stagger so that it fits the "best possible", which ends up looking ugly... I don't want to automatically space out like that. I need to finish this lab report tonight, so if anyone can help it is greatly appreciated! Thank you! EDIT: The problem has been solved!


title: How can I indent verbatim blocks?

text: I have blocks surrounded by `\begin{verbatim}` and `\end{verbatim}`. I'd like to indent these about half an inch. I'm using pandoc to write pdfs via XeLaTeX and the default.latex pandoc template, so I'd like not to create a new environment, but to revise the behavior of verbatim in default.latex so that it is indented a little.


title: biblatex and German juristic commentaries

text: I need to get my manuscript ready for my publisher, and can't seem to get a few things fixed with `biblatex`. I'm using `biblatex` with the `biblatex- juradiss` style together with `jurabook` as a document class. The publisher wants to have a certain kind of publication in German jurisprudence, commentaries, to be typeset like this: > MK-StGB- _Author_ Edition § X Rn. Y "MK-StGB" is the shorttitle, and § X Rn. Y are the references. Commentaries have multiple authors that comment on different parts of a law codex. Therefore I need to pass over the respective authors in the reference. Here my code with an example:               \documentclass[twoside,compact,centeredpartsintoc,a4paper,fncontinued,12pt]{jurabook}     \usepackage[applemac]{inputenc} % Mac-Kodierung. Achtung: ≠ UTF-8     \usepackage[T1]{fontenc} % Damit Trennung besser klappen     \usepackage[ngerman]{babel} % Deutsche Sprache     \usepackage{graphicx} % Zum Einbinden von Grafiken     \usepackage{soul} % Kapitälchen. Achtung: Bei UTF-8 -> soulutf8     \usepackage{times} % Ach ja, die Times     \usepackage{eurosym}     \setjbookstyle{partintro}{\LARGE}     \setjbookstyle{part}{\LARGE}     \usepackage[hang]{footmisc}     \usepackage{parskip}     \setlength{\parindent}{0pt}     \setlength{\parskip}{1ex}     \usepackage{textcomp}      \usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2.4cm,paper=a4paper]{geometry}     \usepackage{csquotes}     \usepackage[backend=bibtex8,     uniquename=true,     sorting=nyvt,     sortcites=true,     maxnames=3,     idemtracker=false,     ibidtracker=false,     useprefix=false, %von an (true) oder aus (false)     style=biblatex-juradiss,safeinputenc]{biblatex}     \bibliography{Literatur}     %\include{anpassungen_verlag} % Die Anpassungen für den Verlag     \begin{document}     Dies zielt normhistorisch wohl darauf ab, klarzustellen, dass kein Unternehmen     außerhalb des Anwendungsbereichs von Abs. 2 steht.\footnote{Siehe hierzu     \cite[Radtke][§ 14 Rn. 88]{mueko:band1}.}     \end{document}      And this is the commentary:               @commentary{mueko:band1,         Date-Added = {2009-10-28 09:12:21 +0100},         Date-Modified = {2013-03-07 08:07:59 +0000},         Edition = {2},         Editor = {Heintschel-Heinegg, Bernd},         Howcited = {MK-StGB-Bearbeiter},         Publisher = {C.H. Beck},         Shorttitle = {MK-StGB},         Title = {M{\"u}nchener Kommentar zum Strafgesetzbuch},         Volumetitle = {1 ({\S}{\S} 1-37)},         Year = {2011}}      I don't get "Radtke" to appear behind the title, as I pass it over to `biblatex` in the prenote field. Can I somehow suppress the prenote field before the reference and put it behind the short title? Morevover, I don't seem to be able to get rid of all the commas after the author. Can anybody help or somehow put me on the right track? Thanks so much in advance!


title: Chapter turns into Appendix in TOC

text: I am writing my PhD thesis, using documentclass Thesis. To compile the table of contents, I write the following. However, in the pdflatex-file, this correctly produces 1. Introduction, and 2.Mychapteronename, with its full toc. Yet what should be Chapter 3 appears as appendix A...Would anyone know why this happens? Thanks, Eva               \mainmatter % Begin numeric (1,2,3...) page numbering          \pagestyle{fancy} % Return the page headers back to the "fancy" style          \chapter{Introduction}     \include{./Chapters/Introduction/introductionthesis}     {\addtocontents{toc}{\vspace{2em}}          \chapter{Mychapteronename}     \include{./Chapters/Chapter1/nameofchapteronefile}     {\addtocontents{toc}{\vspace{2em}}          \chapter{Mychaptertwoname}     \include{./Chapters/Chapter2/nameofchaptertwofile}     {\addtocontents{toc}{\vspace{2em}}          \backmatter


title: Need to plot a lattice and the topological building of a torus!

text: as told in the title I need to plot a lattice on the plane (not the standard one with basis (1,0), (0,1) ) and I'd like to show up how to build a torus starting from its topological square... If anyone could help it would be really appreciated!


1.0.1 Is it possible to automatically enumerate sentences in LaTeX? 2.0.1 I want to thoroughly work through and criticize a longer text. 2.0.2 To facilitate quoting, I would like to typeset the text and enumerate the sentences in this way. 2.0.3 Some time ago, I saw this done in a complex game ruleset. 2.1.1 In the old ruleset, the enumeration was typeset in subscript. 2.1.2 The sentence enumeration was a continuation of the chapter enumeration. 2.1.3 In all aspects except adding the sentence number, the text should be typeset in the normal way. 2.1.4 The numbering should be added automagically without the use of a `\beginsentence` macro. 3.0.1 In case this works at all, is it possible to additionally reference sentences by their numbers [labels], and have the label automatically updated in case the numbering in the text changes? 3.0.2 Of course, 2.1.4 implies something along the lines of `\begin{sentencenumbering}` or so.


title: Add 'Page' above page numbers in Table of Contents

text: I am using my school's latex cls file. Unfortunately, since this package was last updated, we are now required to add the word 'Page' above the topmost page number on each page of the Table of Contents. This cls file includes the following bit of code, which puts 'Page' at the top of the first page, but not any subsequent pages (see attached)               \newcommand\chapteruaf{     \if@arabic\relax\else\if@chapterone\setcounter{page}{1}\else\relax\fi\fi     \@chapteronefalse                         \if@openright\cleardoublepage\else\clearpage\fi                         \thispagestyle{myheadings}%                                                                                \global\@topnum\z@                         \@afterindentfalse                         \secdef\@chapter\@schapteruaf}     \def\@schapteruaf#1{\if@twocolumn                        \@topnewpage[\@makeschapterheaduaf{#1}]%                                                                                \else                        \@makeschapterheaduaf{#1}%                                                                                \@afterheading                      \fi}     \def\@makeschapterheaduaf#1{%                                                                                {\parindent \z@ \centering         \reset@font         \normalsize \bfseries  #1\par                                                                                \vspace{-18.3pt}\hspace{143mm} Page                                                                                \nobreak       }}      First page of the TOC: ![alt text](http://i.stack.imgur.com/faXXG.png) second page of the TOC: ![alt text](http://i.stack.imgur.com/N0XCn.png) Any thoughts here? I have played with this a bit, and can't get it to work. Thanks.


title: How to add a custom .sty file to MiKTeX Portable?

text: How do I add a custom .sty file to MiKTeX Portable? Adding it to `.\tex\latex\misc` and then refreshing the database doesn't work -- Xetex still avoids searching for the file altogether, outside of the current `.tex` file directory.


title: TikZ rectangle split and edges

text: This is my first time posting in this site So I have the following code:                \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes.multipart}     \usetikzlibrary{arrows}     \usetikzlibrary{positioning}          \begin{document}          \begin{figure}       \begin{centering}         \begin{tikzpicture}[->, >=stealth',shorten >=1pt,auto, main node/.style={rectangle,fill=lightgray!10,draw, minimum size=1cm, minimum width=2.875cm, minimum height=1cm, node distance=5cm}, t_object node/.style={circle,fill=lightgray!10, draw, node distance=2cm}]                \node[main node, rectangle split, rectangle split parts=4] (t_object)           at (0,0) {\quad \ Object $o_{1}$ \nodepart{second}\quad Old Versions$_{}$             \nodepart{third} \quad Latest Version$_{}$           \nodepart{fourth}\quad Lock};                     % object O1           \node[t_object node] (O1_0) [right of=t_object, above of=t_object, node distance=4cm] {$v: 5$};           \node[t_object node] (O1_1) [below of=O1_0] {$v: 11$};           \node[t_object node] (O1_2) [below of=O1_1] {$v: 13$};           \node[t_object node] (O1_3) [below of=O1_2] {$v: 29$};                \path (t_object.second) edge [dashed] node [above, sloped, ->] {} (O1_0);           \path (t_object.second) edge [dashed] node [above, sloped, ->] {} (O1_1);           \path (t_object.second) edge [dashed] node [above, sloped, ->] {} (O1_2);           \path (t_object.third) edge node [above, sloped, ->] {} (O1_3);                     %\path (C) edge node[below, sloped, ->] {} (O1_1);           %\path (B) edge node[below, sloped, ->] {} (O1_0);              \end{tikzpicture}       \end{centering}     \end{figure}                         \end{document}      which creates: ![enter image description here](http://i.stack.imgur.com/yVoOY.png) Of course, this is not what I want to do, i want the arrows to start form the right part of the rectangle, not the left. Any ideas how to do it?


title: How do I include PSTricks pictures in a LaTeX document?

text: I use LaTeX regularly, and several times I have included `.eps` images. I am learning how to use PSTricks. I have used it to create `.ps` and `.pdf` files with images. There is plenty of free information on the web, but I haven't seen the answer to this question: how do you include the pictures that PSTricks produces in your LaTeX file?


title: Accolade to take objects together in TikZ

text: Is there a way to draw an accolade (`{`-symbol) that groups things together in TikZ? I want the accolade to group let's say three rectangles. That means the top of the upper reactangle must be the top of the accolade, and the bottom of the lower triangle the bottom of the accolade. Of course I can draw an accolade using a node, but I haven't found a way yet to make sure the size meets this constraint. Is there a solution or a workaround for it?


title: Subset arrows in xymatrix

text: Is it possible to make an arrow in xymatrix that is a subset symbol?


title: Cannot import .sty latex. CustomThesis.sty file not found

text: I am trying to use the solution here Converting sty and bst files to lyx layout in order to import the sty files defined for the document type I need to write. I am actually writing my thesis. The files are available at http://www2.imm.dtu.dk/teaching/thesis/thesis-template-2012.zip, but I cannot find a way to use the .sty file in Lyx. I have followed scrupulously answer cited before but I get the following error:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian) (format=pdflatex 2013.4.30)  9 JUL 2013 16:42     entering extended mode      restricted \write18 enabled.      %&-line parsing enabled.     **newfile2.tex     (./newfile2.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo     aded.          (/usr/share/texlive/texmf-dist/tex/latex/base/report.cls     Document Class: report 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@chapter=\count80     \c@section=\count81     \c@subsection=\count82     \c@subsubsection=\count83     \c@paragraph=\count84     \c@subparagraph=\count85     \c@figure=\count86     \c@table=\count87     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     ) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty     Package: fontenc 2005/09/27 v1.99g Standard LaTeX package     (/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def     File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file     LaTeX Font Info:    Redeclaring font encoding T1 on input line 43.     )) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty     Package: inputenc 2008/03/30 v1.1d Input encoding file     \inpenc@prehook=\toks14     \inpenc@posthook=\toks15     (/usr/share/texlive/texmf-dist/tex/latex/base/latin9.def     File: latin9.def 2008/03/30 v1.1d Input encoding file     ))          ! LaTeX Error: File `LukeThesis.sty' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)          Enter file name:      ! Emergency stop.     <read *>           l.15 ^^M          *** (cannot \read from terminal in nonstop modes)               Here is how much of TeX's memory you used:      465 strings out of 495059      4571 string characters out of 3182030      47487 words of memory out of 3000000      3725 multiletter control sequences out of 15000+200000      4403 words of font info for 15 fonts, out of 3000000 for 9000      14 hyphenation exceptions out of 8191      23i,0n,17p,163b,37s stack positions out of 5000i,500n,10000p,200000b,50000s     !  ==> Fatal error occurred, no output PDF file produced!      Anybody has some hints? The LukeThesis.layout file in the ./lyx/layout folder is the following:               \DeclareLaTeXClass[report, LukeThesis.sty]{report (LukeThesis)}               Preamble              \usepackage{LukeThesis}     EndPreamble               Format 35     Input stdclass.inc     Input numreport.inc          Style Bibliography         TopSep                4         LabelString           "Bibliography"         LabelFont           Series              Bold           Size                Huge         EndFont     End


title: Hyphenation not working in cover letter template

text: I can't find the reason why **hyphenation doesn't work** in cover letter template document listed below.               %% start of file `template_en.tex'.     %% Copyright 2006-2010 Xavier Danaux (xdanaux@gmail.com).     %     % This work may be distributed and/or modified under the     % conditions of the LaTeX Project Public License version 1.3c,     % available at http://www.latex-project.org/lppl/.               \documentclass[11pt]{article}               \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{marvosym}     \usepackage{ifpdf}     \ifpdf       \usepackage[pdftex]{graphicx}     \else       \usepackage[dvips]{graphicx}\fi          \pagestyle{empty}          \usepackage[scale=0.775]{geometry}     \setlength{\parindent}{0pt}     \addtolength{\parskip}{6pt}          \def\firstname{Joe}     \def\familyname{Doe}     \def\FileAuthor{\firstname \familyname}     \def\FileTitle{\firstname \familyname's cover letter}     \def\FileSubject{Cover letter}     \def\FileKeyWords{\firstname \familyname, Cover letter}          \renewcommand{\ttdefault}{pcr}          \usepackage{url}     \urlstyle{tt}     \ifpdf       \usepackage[pdftex,pdfborder=0,breaklinks,baseurl=http://,pdfpagemode=None,pdfstartview=XYZ,pdfstartpage=1]{hyperref}       \hypersetup{         pdfauthor   = \FileAuthor,%         pdftitle    = \FileTitle,%         pdfsubject  = \FileSubject,%         pdfkeywords = \FileKeyWords,%         pdfcreator  = \LaTeX,%         pdfproducer = \LaTeX}     \else       \usepackage[dvips]{hyperref}     \fi               \begin{document}     \sffamily   % for use with a résumé using sans serif fonts;     %\rmfamily  % for use with a résumé using serif fonts;     \hfill%     \begin{minipage}[t]{.6\textwidth}     \raggedleft%     {\bfseries Joe Doe}\\[.35ex]     %\small\itshape%     %street and number\    %postcode city\\[.35ex]     \Telefon~phone 515-515-15\    \Letter~\href{mailto:joe.doe@gmail.com}{joe.doe@gmail.com}     \end{minipage}\\[1em]     %     \begin{minipage}[t]{.4\textwidth}     \raggedright%     {\bfseries Big Company}\\[.35ex]     \small\itshape%     16 Westbourne Avenue, Rhyl, Wales LL18 1UK     \end{minipage}     \hfill % US style     %\\[1em] % UK style     \begin{minipage}[t]{.4\textwidth}     \raggedleft % US style     \today     %April 6, 2006 % US informal style     %05/04/2006 % UK formal style     \end{minipage}\\[2em]     \raggedright     Dear Sir or Madam:\\[1.5em]     %     Denote simple fat denied add worthy little use. As some he so high down am week. Conduct esteems by cottage to pasture we winding. On assistance he cultivated considered frequently. Person how having tended direct own day man. Saw sufficient indulgence one own you inquietude sympathize.           Attachment apartments in delightful by motionless it no. And now she burst sir learn total. Hearing hearted shewing own ask. Solicitude uncommonly use her motionless not collecting age. The properly servants required mistaken outlived bed and. Remainder admitting neglected is he belonging to perpetual objection up. Has widen too you decay begin which asked equal any.           Consider now provided laughter boy landlord dashwood. Often voice and the spoke. No shewing fertile village equally prepare up females as an. That do an case an what plan hour of paid. Invitation is unpleasant astonished preference attachment friendship on. Did sentiments increasing particular nay. Mr he recurred received prospect in. Wishing cheered parlors adapted am at amongst matters.           Affronting imprudence do he he everything. Sex lasted dinner wanted indeed wished out law. Far advanced settling say finished raillery. Offered chiefly farther of my no colonel shyness. Such on help ye some door if in. Laughter proposal laughing any son law consider. Needed except up piqued an.           Savings her pleased are several started females met. Short her not among being any. Thing of judge fruit charm views do. Miles mr an forty along as he. She education get middleton day agreement performed preserved unwilling. Do however as pleased offence outward beloved by present. By outward neither he so covered amiable greater. Juvenile proposal betrayed he an informed weddings followed. Precaution day see imprudence sympathize principles. At full leaf give quit to in they up.           %Yours sincerely,\\[2em] % if the opening is "Dear Mr(s) Doe,"     Yours faithfully,\\[2em] % if the opening is "Dear Sir or Madam,"     %     %\includegraphics[scale=0.75]{signature_blue}\    {\bfseries Joe Doe}\    %     \vfill%     {\slshape I hereby authorize you to process my personal data included in my job application for the needs of the recruitment process (in accordance with Personnel Protection Act dated 29.08.1997 no 133 position 883)}     %{\slshape Attachment: curriculum vit\ae{}}     \end{document}


title: Page width problem in CV (Koma-script)

text: I am trying to compile my CV using the `scrartcl` document class. I am struggling a lot to reduce the margin on the right side of the page. If e.g. the university name is too long, it will follow on the next line (I'd rather avoid it if possible). This also leaves a lot of white space on the right side. How can I produce a better output? I attach the compiled .pdf. Here follows the code:               %----Preamble          \documentclass[paper=a4, fontsize=11pt DIV=18]{scrartcl}     \reversemarginpar % Move the margin to the left of the page      \newcommand{\MarginText}[1]{\marginpar{\raggedleft\itshape\small#1}}      \usepackage[nochapters]{classicthesis}      \usepackage[LabelsAligned]{currvita}      \renewcommand{\cvheadingfont}{\LARGE\color{Maroon}}     \usepackage{hyperref}      \hypersetup{colorlinks, breaklinks, urlcolor=Maroon, linkcolor=Maroon}     \newlength{\datebox}     \settowidth{\datebox}{Nov 2012 - Feb 2013}          \newcommand{\NewEntry}[3]{     \noindent\hangindent=2em\hangafter=0      \parbox{\datebox}{     \small \textit{#1}}     {\hspace{0.2em} #2}      { #3  \vspace{0.5em} }     }           \newcommand{\Description}[1]{\hangindent=2em\hangafter=0\noindent\raggedright\footnotesize{#1}\par\normalsize\vspace{1em}}          %----------------------------------------------------------------------------------------     \begin{document}          \thispagestyle{empty}           % ----- NAME AND CONTACT INFORMATION SECTION          \begin{cv}{\spacedallcaps{My Name}}\vspace{1.5em}     \noindent\spacedlowsmallcaps{Personal Information}\vspace{0.5em}     \NewEntry{current position} {\textit{Researcher, Blabla university}}      \NewEntry{address} {\textit{longer address goes on a new line that is not indented, this is another problem }}          \NewEntry{email}{\href{mailto:bla.blabla@bla.uk}{bla.blabla@bla.uk}}     \NewEntry{Twitter}{@blabla}     \vspace{1em}          \noindent\spacedlowsmallcaps{Main interests}\vspace{1em}     \Description{Political behaviour, political economy, research methods, EU politics}\vspace{2em}          %------ WORK EXPERIENCE     \noindent\spacedlowsmallcaps{Work Experience}\vspace{1em}          \NewEntry{Mar 2013} {Research Assistant, \textsc{blabla university}}          \Description{\MarginText{Blabla Univ.} Assistanship for the blabla ebook on the African history.\\ Reference: Prof. Name \textsc{Surname}\ \ $\cdotp$\ \ BlaBla University\ \ $\cdotp$\ \ \href{mailto:Bla@BlaBla.uk}{bla@blabla.uk}}          %------------------------------------------------     \NewEntry{Nov 2012--Feb 2013}{Research Assistant, \textsc{Longer University Name that goes on New Line}}          \Description{\MarginText{Longer University} Longer names of the university create problems because they will end up in a new line while leaving plenty of space on the right part of the page.\\ Reference: Prof. Name \textsc{Surname}\ \ $\cdotp$\ \ Longer Name University \ \ $\cdotp$\ \ \href{mailto:bla.bla@blabls.uk}{bla.bla@blabla.uk}}          \vspace{1em} % Extra space between major sections          %------ OTHER INFORMATION     \spacedlowsmallcaps{General interests}\vspace{1em}     \Description{\MarginText{}Electric guitar\ \ $\cdotp$\ \ bicycle travelling\ \ $\cdotp$\ \ }          \end{cv}          \end{document}      ![enter image description here](http://i.stack.imgur.com/xPdqs.png)


title: how to fix an equation's error

text: I would like to write this equation: ![enter image description here](http://i.stack.imgur.com/MxG5k.png) Having made the following code:               \begin{equation*}     \hat{V}(\hat{\beta}_1)= \frac{\displaystyle{\sum_{i=1}^{n} (x_i-\bar{x})^2 \hat{u}_i^2}}{\left( \displaystyle{\sum_{i=1}^{n} (x_i-\bar{x})^2\right)^2 }} \xrightarrow[P]{\text{\textlatin{White se}}} V(\hat{\beta}_1)= \frac{\displaystyle{\sum_{i=1}^{n} (x_i-\bar{x})^2 \sigma_i^2}}{\left( \displaystyle{\sum_{i=1}^{n} (x_i-\bar{x})^2\right)^2 }}      \end{equation*}      It shows me > ! Missing } inserted. } but I can't find where } is missing.


title: Configuring vim-latex when installed using pathogen

text: I've followed the instructions in this question to install `vim-latex` using `pathogen`. Now I'd like to have `vim-latex` compile using `pdflatex` instead of the default `latex`. The instructions on the `vim-latex` page refer to creating a file called: > `$VIM/ftplugin/tex.vim`, where `$VIM` corresponds to `~/.vim` for *nix > machines and `~/vimfiles` for windows machines Where should this file go when I'm using `pathogen`, and hence have no `$VIM/ftplugin` folder, rather a `$VIM/bundle/` folder?


title: MinionPro.sty not found

text: Good evening, I'm trying to use the MinionPro package with my ClassicThesis environment for my thesis and I have a difficulty : I downloaded this script in the terminal of my mac, but, when I compile my file, I have the following message : MinionPro.sty not found. Can anyone tell me where is the bug in the following script ? Thanks so much for your help !


title: How to print a length accurately and with user-controlled rounding?

text: Tried the printlen package, but it seems to not understand what 2.5in means:               \documentclass{minimal}      \usepackage{printlen}      \uselengthunit{in}      \begin{document}      \newlength{\advertwidth}      \setlength{\advertwidth}{2.5in}      \printlength{\advertwidth}      \end{document}       Typesetting the above yields `2.50049 in` --- is there something better? NB - in addition to the above, the project in question needs the packages:               \usepackage{calc,geometry,xcolor,graphicx,csvsimple}      the last in particular, conflicts w/ the answers initially provided.


title: Multipage tables - vertical centering in cells

text: I know there were many topics like this but I read a lot of them and it is impossible to understand them for me or they just dont work. I want **ALL cells to be centered vertically**. I would also like to know how to change it for example to 'bottom' or 'top', so code should be simple and clear. Also, I would like to be able to change horizontal alignment. Remember, its **multipage table.** If my request is impossible to achieve in simple way or I must use again something overcomplicated pls just paste code and i will use it. **Minimal Working Code** (and some trash i tried to use):               \documentclass{report}     \usepackage{longtable}     \usepackage{multirow}     \usepackage{adjustbox}     \usepackage{array}     \usepackage{polski}     \usepackage[utf8]{inputenc} %kodowanie znakĂłw, zaleĹĽne od systemu     \usepackage[T1]{fontenc} %poprawne skĹ‚adanie polskich czcionek               \begin{document}     \renewcommand{\arraystretch}{1.5}          \begin{longtable}{|c|c|c|c|c|c|c|} %umozliwia rozszerzenie tabeli do kilku stron     \cline{1-7}      \multicolumn{1}{ |c| }{\multirow{2}{*}{ \parbox[t]{2cm}{Mięśnie} } } &      \multicolumn{5}{ c| }{Palce ręki} & \multicolumn{1}{ |c| }{\multirow{2}{*}{ \parbox[t]{2cm}{Nadgarstek}} } \\ \cline{2-6}     \multicolumn{1}{ |c|  }{} & \parbox[t]{0,9cm}{Kciuk} &      \parbox[t]{1,9cm}{Wskazujący} & Środkowy & Serdeczny & Mały & \multicolumn{1}{ c|  }{} \\ \cline{1-7}     {\parbox[t]{3cm}{\textbf{flexor \\digitorum \\superficialis}\\(zginacz \\powierzchowny \\palców)} } &      $\surd$ &     \adjustbox{valign=m}{ $\surd$} & \multirow{1}{*}{x} & $\surd$ & $\surd$ & $\surd$\\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}     {flexor digitorum profundus\\asd\\asd\\asd\\asd\\asd} } &      x & $\surd$ & $\surd$ & $\surd$ & $\surd$ & $\surd$\\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{extensor \\digitorum} } &      x & $\surd$ & $\surd$ & $\surd$ & $\surd$ & x\\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{flexor \\policis longus} } &      $\surd$ & x & x & x & x & $\surd$\\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{extensor policis longus} } &      $\surd$ & x & x & x & x & $\surd$ \\ \cline{1-7}     \multicolumn{1}{ |l| }{ \parbox[t]{3cm}{pronator teres} }  &      x & x & x & x & x & $\surd$ \\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{flexor \\carpi radialis} } &      x & x & x & x & x & $\surd$ \\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{palmaris longus} } &      x & x & x & x & x & $\surd$ \\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{flexor carpi \\ulnaris} } &      x & x & x & x & x & $\surd$ \\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{pronator \\quadratus} } &      x & x & x & x & x & x\\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{brachioradialis} } &      x & x & x & x & x & x\\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{extensor carpi radialis longus} } &      x & x & x & x & x & $\surd$\\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{extensor carpi radialis brevis} } &      x & x & x & x & x & x\\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{supinator} } &      x & x & x & x & x & x\\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{extensor\\ digiti minimi} } &      x & x & x & x & $\surd$ & x\\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{extensor\\ carpi ulnaris} } &      x & x & x & x & x & x \\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{obductor pollicis longus} } &      x & x & x & x & x & x \\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{extensor pollicis brevis} } &      $\surd$ & x & x & x & x & x \\ \cline{1-7}     \multicolumn{1}{ |l| }{\parbox[t]{3cm}{extensor indicis} } &      x & $\surd$ & x & x & x & x\\ \cline{1-7}     \caption{Aktywność mięśni podczas ruchu palców i nadgarstka \cite{praca_detekcja}}     \end{longtable}               \end{document}      ![Table fragment](http://i.stack.imgur.com/5wbAA.jpg)


title: Unbalanced binary tree with forest

text: How can one draw an unbalanced binary tree - with missing nodes using the forest package?


title: Undesired pagebreak between section header and figure

text: I am trying to compose a page with a section header and a couple of figures: they should stay on the SAME page, but there is no way to force them to, an extra page is always added between the section and the first figure. Here is the incriminated code:               \subsection{Lipsum} % this works OK     \lipsum[1- 3 ]          \FloatBarrier  % attempt implementing suggestions from this forum     \newpage     \subsection{Graphs}     \begin{figure}[H]           \centering           \includegraphics[width=0.5\hsize,height=0.3\vsize,keepaspectratio] {Figures/fig00001.png}           \\{ Figure 001: Pipponzolo }     \end{figure}          \begin{figure}[H]           \centering           \includegraphics[width=0.5\hsize,height=0.3\vsize,keepaspectratio] {../Figures/WashEagle.png}           \\{ Figure 002: Washington Eagle }     \end{figure}       \FloatBarrier      the suggestions from Latex Section header and figure won't print on same page did not work. Wrapping the page between `\begin{samepage}` and `\end{samepage}` did not work either. I am at the end of my rope: any suggestions?


title: Draw block diagram with a switch

text: I'm trying to draw a simple block diagram that looks like this: ![source-filter-diagram](http://i.stack.imgur.com/hkadq.png) `schemabloc` seems to be the package to use, but then again, it doesn't have the switch symbol that I need. `circuitikz` doesn't seem to be working either. How would I draw this diagram using `tikz` or any other method?


title: How to rewrite this command using \newenvironment?

text: I once defined a customized latex command, which works well. And now I would like to convert it into a latex environment using \newenvironment command. However, I failed after trying several ways. Could you help me, please? The definition of my own latex command is               \newcommand{\smallbox}[1]{         \tikzstyle{mybox} = [draw=red, rectangle,inner sep=5pt, inner ysep=5pt]         \begin{center}             \begin{tikzpicture}                 \node [mybox] (box){                     \begin{minipage}{0.85\textwidth}                          #1                     \end{minipage}                 };            \end{tikzpicture}         \end{center}     }      Let's call the to-be-defined enviroment "smallenvironment" for the moment. And I would like that, the following command               \smallbox{This is a small box!}      is equivalent to               \begin{smallenvironment}         This is a small box!     \end{smallenvironment}      Thanks!


title: Change the tag for equations

text: I want to show my equations in the form (Eq. 1) instead of (1). I am trying using `\tag` but this changes completely.


title: Append characters after line numbers when using the `listings` package?

text: Is it possible to add some characters, like colons, to the line numbers when these are displayed in the `listings` package? There is the `numberstyle` option, but that only seems to affect stuff _before_ the line numbers.


title: Two consecutive greater-than signs

text: How do I produce the output >> in a LaTeX Beamer presentation? When I write `>>` or `\textgreater\textgreater`, I get this symbol, which I believe to be the guillemet(»): ![»](http://i.stack.imgur.com/QsIk9.png) I do not want this symbol. I want literally two greater-than symbols, in the context of > Use >> to append to a file, as in `date >> dates`


title: Incomplete \ifx

text: I am trying to define a function _Lettrine_ from the _lettrine_ one. I did it here successfully, but I need to add an optional argument to be able to use more _lettrine_ features like _ante_ :               \documentclass{article}     \usepackage{lettrine}          \def\eqifcase #1#2#3{\eqifcaseA #1#2#1{#3}\end }          \def\eqifcaseA #1#2#3{\ifx #1#2\eqifcaseDo{#3}\fi \eqifcaseA #1}          \def\eqifcaseDo #1\fi #2\end{\fi #1}          \def\LettrineX #1#2{\vspace{-4ex}\lettrine[lines=1,findent=-0.1em         \ifx\dummy#2\dummy\empty\else,#2\fi%         ]{#1}{}}     \newcommand*{\Lettrine}[2][x]{\LettrineX{#2}{#1}}          \begin{document}\thispagestyle{empty}     \section{section 1}     \Lettrine[ante=«]{P}owerfull macro ! »     \section{section 2}     \Lettrine{P}owerfull macro !          \end{document}      It does not compile, with the error:               $ pdflatex MWE_lettrine_command7.tex      This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode     (./MWE_lettrine_command7.tex     LaTeX2e <2011/06/27>     Babel <3.9f> and hyphenation patterns for 15 languages loaded.     (/usr/share/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-dist/tex/latex/base/size10.clo))     (/usr/share/texmf-dist/tex/latex/lettrine/lettrine.sty     (/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)     Loading lettrine.cfg     (/etc/texmf/tex/latex/lettrine.d/lettrine.cfg)) (./MWE_lettrine_command7.aux))     ! Incomplete \ifx; all text was ignored after line 17.     <inserted text>                      \fi      <*> MWE_lettrine_command7.tex      If I add a `\expandafter` before `lettrine`, it changes nothing, but I am a newbbie for this kind of stuff. If I comment the `\ifx` line of code, it does compile and work. The following `\ifx` MWE reproduces the same kind of architecture with the `ifx` expression inside an optional argument in a demonstration function. It compiles and works successfully:               \documentclass{article}     \usepackage{lettrine}          \newcommand*{\Test}[2][xxx]{option=#1; argument=#2}          \def\testX #1#2{%       \Test[\ifx\dummy#2\dummy\empty\else,#2\fi]{#1}%     }          \newcommand*{\test}[2][]{\testX{#2}{#1}}          \begin{document}\thispagestyle{empty}     With one argument:  "\test{MAIN-ARG---ONLY-ONE}"\par     With two arguments: "\test[OPTION=2]{MAIN-ARG}"     \end{document}      Result: ![enter image description here](http://i.stack.imgur.com/7AXYW.png) I have quite no more hair at trying to figure out what I am doing wrong. Any idea please?


title: Batch file to run latexdiff

text: If you have experience using `latexdiff`, you may know that it depends on `Perl` and the command is `latexdiff draft.tex revision.tex > diff.tex` Yet, every time I need to open up a Windows cmd console and type the command, which bores me. So I wrote a batch file to run it, i.e. write the aforementioned command into a `.bat` file, click it. However, the command executed become as follows, where you can find there was `1` added before `>` and the error information. Why and How to solve it? ![enter image description here](http://i.stack.imgur.com/uch8c.png)


title: Translate content in fields in bibliography entries (biblatex)

text: I have in the `@thesis` entries in my `.bib` file the names of institutions and types written in the local language of the thesis. I need to translate these to English. As an example, I need to translate institution names like > Universitetet i Oslo > > Universitetet i Bergen > > Høgskolen i Agder to > University of Oslo > > University of Bergen > > Agder University College and translate type names like > Hovedoppgave > > Hovedfagsavhandling > > Masteroppgave to > Main subject thesis > > Main subject thesis > > MA thesis Based on similar conversions I've done (Change US postal codes (CA) to AP stylebook abbreviations (Calif.) in bibliography (biblatex)), I have a vague idea what to do, but I don't know how to accurately implement it:               \DeclareSourcemap{       \maps[datatype = bibtex]{         \map{           \step[fieldsource = institution,               match = , % <- strings like "Universitetet i Oslo", "Universitetet i Bergen"               replace = ] % <- strings like "University of Oslo", "University of Bergen"         }         \map{           \step[fieldsource = type,               match = , % <- strings like "Hovedoppgave", "Masteroppgave"               replace = ] % <- strings like "Main subject thesis", "MA thesis"         }       }     }      * * * **EDIT** There seems to be a problem doing this when the string I need to replace contains non-ascii characters like `æøå`:               \documentclass{article}     \usepackage[style = authoryear-comp]{biblatex}     \usepackage{fontspec,filecontents}     \begin{filecontents}{\jobname.bib}     @THESIS{aasen2004,         AUTHOR = "Anita Aasen",         INSTITUTION = "Universitetet i Oslo",         TITLE = "Språklig nivellering i Oslo-regionen",         TYPE = "Hovedfagsoppgave i nordisk språk og litteratur",         YEAR = "2004",         SUBTITLE = "Ungdommers valg av språklige varianter i Follo"}     \end{filecontents}     \DeclareSourcemap{       \maps[datatype = bibtex]{         \map{            \step[fieldsource = type,               match = {Hovedfagsoppgave i nordisk språk og litteratur},                replace = {Main subject thesis}]         }       }     }     \addbibresource{\jobname.bib}     \begin{document}     \nocite{*}     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/5Gs0J.png)


title: Installing Sweave for Miktex 2.9 on Windows 7

text: I've been looking everywhere, but my computer (Windows 7) just won't install the `Sweave.sty` package for Miktex 2.9. I tried to put it in a folder respecting the TDS standard, and then to install it, locally. The Package Manager won't accept any folder I suggest as a local package repository > error: this folder doesn't seem to be a local repository. I added the direction to the roots, but it just won't find the `sweave.sty` package. I updated the database several times, with the texhash prompt in the console, and using the button. I tried to follow the instructions on: https://stat.ethz.ch/pipermail/r-help/2010-February/229033.html and http://docs.miktex.org/manual/localadditions.html It always gives me the same error message: > Package Sweave could not be found. On my other computer I have a local repository in the User folder, and I always have to put the directory of the Sweave file in the preamble of my document. At least, that works, but as I would like to keep my file reproducible, I would prefer to know how to properly install Sweave. Maybe its because I changed the basic directory shown in the console to the local folder where my LaTeX document is. I use the WinEdt editor. Maybe it has something to do with Ghostscript, I have no idea whether this is installed or what it is used for. I try to find out about that next. Can anyone give me a hint what to try next? I tried to be as precise as I could.


title: Problem with Texmaker version 4.0.2, scrolling

text: I was using Texmaker version 4.0.1 as editor on my MacBook Air Moutain Lion 10.8.3 and this morning I downloaded the 4.0.2 version of Texmaker. I have some problem with the scrolling with the trackpad, it is highly non fluid! I would like to reinstall the previous version but I realized that I just threw away the previous one to the trash. Does anyone know where to find the previous version of Texmaker on the web? it seems impossible to me... Thank you.


title: How can I set up autocompletion for \langle and \rangle?

text: I use Texstudio for taking notes in class, and I would really like to set up an autocompletion scheme such that typing in "\langle" would bring up "\rangle". How can I do this? Thank you


title: Ampersands broken in tikz-cd 0.9?

text: I was just upgraded to `tikz-cd` 0.9 (with `pgf` 3.0.0). The following code now breaks:               \documentclass{article}          \usepackage{amsmath}          \usepackage{tikz}     \usepackage{tikz-cd}          \begin{document}     \[       \begin{gathered}         \begin{tikzcd}           1 & 2 \\           3 & 4         \end{tikzcd}         \\         \begin{tikzcd}           5 & 6 \\           7 & 8         \end{tikzcd}       \end{gathered}     \]     \end{document}      * * *               Runaway argument?     ! Forbidden control sequence found while scanning use of \pgfutil@ifnextchar.     <inserted text>                      \par      l.11     \begin{tikzcd}      It works if either I comment out the `gathered` environment (and the `\\\` between the diagrams) or I put the old `tikz-cd.sty` in the directory with the `.tex` file. It does _not_ work to do this:                 \begin{gathered}         \begin{tikzcd}[ampersand replacement=\&]           1 \& 2 \\           3 \& 4         \end{tikzcd}         \\         \begin{tikzcd}[ampersand replacement=\&]           5 \& 6 \\           7 \& 8         \end{tikzcd}       \end{gathered}      That doesn't even change the error:               Runaway argument?     ! Forbidden control sequence found while scanning use of \pgfutil@ifnextchar.     <inserted text>                      \par      l.11     \begin{tikzcd}                            [ampersand replacement=\&]      In fact, I originally ran across this when some code of mine that uses `ampersand replacement` broke.


title: Why does \vspace, after section heading, sometimes jump/snap in discrete steps?

text: Well, this is one question that I've had for a long time, and one that always gets me extremely irritated. However, this time I'm even somewhat happy - that I can _ask_ the question _at all_ ; and that is thanks to the power of animated .gif `:)` This is the thing - sometimes there are some designs I'd like to replicate in Latex; usually you read your manuals, you change your lengths, things happen. However, sometimes - and especially after section headings - I'd like to say, lift up or push down the starting paragraph after the section a bit; however, without redefining the master section after skip. And so I usually insert a `\vspace{\length}` after the section heading, and start tuning `\length`; text starts moving, and then, if I move it for say 1 pt, it almost jumps into that direction; I decrease that to 0.5 pt - the text is as if not moved at all ?! ( _and then I start trying`\vspace*`, or `\ \\\\[\length]`, or whatever works_). And I always want to ask about this - but I can never think of anything better than " _Why does Latex jump vertical space_ ", and arguably no-one would understand what is going on `:)`. Well, finally, this is what I mean by "jumping" or "snapping" in "discrete steps" (atest_animate_10_p.gif, 900KB): ![atest_animate_10_p.gif](http://i.stack.imgur.com/CiIvZ.gif) The MWE for that image is below (compiled with `pdflatex`) - however, it is a `bash` script which generates 100 PDFs, and then extracts images from them, and finally composes the images into an animated gif. Basically, for each "frame" (PDF), the script changes a parameter that ends up as a length, `\mylen`, which is used at only one place: `\ \\\\[\mylen]`. `\mylen` is increased by a constant step (less than a pt) for each frame; and is written out as the first word in the paragraph. Notice that instead of a smooth transition, the paragraph "snaps" into place and doesn't move for certain values - and then when it starts moving again, it "jumps" more than usual. And this is actually at some step size of ( _Note that you may have some hiccups in your browser while the gif loads; once it is loaded, however, the jumps should be noticeable when the paragraph doesn't move - and the number indication changes nonetheless... although, some frames from the gif may still end up being dropped_ ) Well, whenever I come to this problem, I get frustrated of the difficulty to explain it verbally. And then I think, fine - let me cook up an MWE, will be easier for others. Then I write up something minimal, toss `\lipsum[1]` in there - and I cannot demonstrate a problem anymore !! Damn, that always gets me! That is why, the first .gif (and the MWE) is set to `\lipsum[1-10]` - to demonstrate the problem; however, this is what happens if, say, `\lipsum[1-2]` is used instead (atest_animate_02_p.gif, 899KB): ![atest_animate_02_p.gif](http://i.stack.imgur.com/FhYMX.gif) That is - everything goes smooth, as expected ( _also built with`pdflatex`_). I discovered more-less by accident, that you cannot demonstrate this "jumpiness" unless you use enough text in paragraphs, so it flows over to the next page! Finally, I thought, for fun, to generate such an animated gif, but with `lualatex` and `lua-visual-debug` - and this certainly explains something more (atest_animate_10_l.gif, 1599KB): ![atest_animate_10_l.gif](http://i.stack.imgur.com/kjr6q.gif) Namely, here it is noticeable that when the paragraphs "lock" into vertical position - one of those blue lines starts going "up", and then it "jumps down"; what does that mean, however, is beyond me `:)` So, if anyone can explain what is happenning here - and is there a possibility for "smooth" vertical positioning of overflown paragraphs, please post back... Many thanks in advance for any answers,   Cheers! Here is the MWE script code (atextest.sh):               #!/bin/bash          # to force exit loop:     trap 'echo Control-C trap caught; cleanup; exit 1' 2 #traps Ctrl-C (signal 2)          MYFN="atest"     MYFNIMG="${MYFN}_img"     MYFNTEX=${MYFN}.tex     MYFNIN="${MYFN}-input"     MYFNINTEX=${MYFNIN}.tex          function cleanup() {       echo rm ${MYFNTEX} ${MYFNINTEX} -rf ${MYFN} -rf ${MYFNIMG}       rm ${MYFNTEX} ${MYFNINTEX}       rm -rf ${MYFN}       rm -rf ${MYFNIMG}     }                    mkdir ${MYFN}     mkdir ${MYFNIMG}          cat > ${MYFNTEX} <<EOF     \documentclass[10pt,a4paper]{article}     \providecommand{\myparam}{0.0pt}% fallback definition     \tracingonline=0 % suppress stdout (still dumps start)          % tex.se: 47576     \usepackage{ifxetex,ifluatex}     \newif\ifxetexorluatex     \ifxetex       \xetexorluatextrue     \else       \ifluatex         \xetexorluatextrue       \else         \xetexorluatexfalse       \fi     \fi          \ifluatex       \usepackage{lua-visual-debug} % tlmgr install lua-visual-debug     \fi     \ifxetexorluatex       \usepackage{fontspec}       \defaultfontfeatures{Ligatures=TeX}       \setmainfont[Scale=1.0]{Junicode}       \newfontfamily\myfontfam[Scale=1.0]{Junicode}     \fi          \usepackage[a4paper]{geometry}     \geometry{twoside,inner=2.5cm,outer=3.5cm,top=2.5cm,bottom=2.5cm}          \makeatletter     \renewcommand{\section}{\@startsection     {section}%                   % the name     {1}%                         % the level     {\z@}%                       % the indent / 0mm     {-\baselineskip}%            % the before skip / -3.5ex \@plus -1ex \@minus -.2ex     {2pt}%          % the after skip / 2.3ex \@plus .2ex     {\centering\fontsize{11}{12}\selectfont\bfseries}} % the style     \makeatother          \usepackage{lipsum}               \newlength{\mylen}     \setlength{\mylen}{0pt}     \setlength{\mylen}{\myparam}          \begin{document}          \ifxetexorluatex       \myfontfam     \fi       \fontsize{10}{12.3}\selectfont          \title{Testing Title}     \date{October 31, 1000}     \author{John Doe\\\\ Somewhereland}          \maketitle          \clearpage          \input{${MYFNINTEX}}     \clearpage          \end{document}     EOF          cat > ${MYFNINTEX} <<EOF          \section*{Introductory words of introduction}          \vspace{\baselineskip}     \vspace{2pt}     \begin{center}     \textbf{Something else here, some other words}     \end{center}          %\vspace{\mylen}     \ \\\\[\mylen]          \makebox[2cm][r]{\the\mylen}, \lipsum[1-10] %[1-2]               \bigskip               \bigskip          EOF          MYPARAM="2.0pt"     JOBNAME="atest1"          #~ CROPPARAMS=320x240+100+400     CROPPARAMS=400x400+150+100          CMDNAME="pdflatex"     #~ CMDNAME="xelatex"     #~ CMDNAME="lualatex"          for ix in $(seq 0 1 100); do       iy=$(wcalc -EE -q \($ix-50\)/50*30);       INDEX=$(printf "%03d" $ix) ;       JOBNAME="${MYFN}${INDEX}" ;       MYPARAM="${iy}pt"       echo "             $CMDNAME - $JOBNAME - $MYPARAM" ;       (${CMDNAME} -output-directory="${MYFN}" -jobname="${JOBNAME}" "\def\myparam{${MYPARAM}}\tracingonline=0\input{${MYFNTEX}}" 2>&1 1>/dev/null);       convert -density 150 -crop ${CROPPARAMS} +repage ${MYFN}/${JOBNAME}.pdf[1] ${MYFNIMG}/${JOBNAME}.png ;     done          GRAY=""     #~ GRAY="-type grayscale"     echo convert -delay 5 -loop 0 ${MYFNIMG}/\*.png ${GRAY} ${MYFN}_animate.gif     convert -delay 5 -loop 0 ${MYFNIMG}/*.png ${GRAY} ${MYFN}_animate.gif               # view results     #~ evince ${MYFN}/${JOBNAME}.pdf     #~ display ${MYFNIMG}/${JOBNAME}.png     eog atest_animate.gif 2>/dev/null          cleanup # remove tmp files


title: Relative shadow on TikZ figure

text: Consider the following very nice TikZ drawing of the Sun--Earth--Moon system from Jubobs (see here): **Code**               \documentclass{article}          \usepackage{lmodern}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}[scale=2.5]       \def\rS{0.3}                             % The Sun's radius.       \def\Earthangle{30}                      % Angle with respect to horizontal.       \def\rE{0.1}                             % The Earth's radius.                                                % Major radius of the Earth's elliptical orbit = 1.       \def\eE{0.25}                            % Excentricity of the Earth's elliptical orbit.       \pgfmathsetmacro\bE{sqrt(1 - \eE^2)}     % Minor radius of the Earth's elliptical orbit.       \def\Moonangle{-45}                      % Angle with respect to horizontal.       \pgfmathsetmacro\rM{0.7*\rE}             % The Moon's radius.       \pgfmathsetmacro\aM{2.5*\rE}             % Major radius of the Moon's elliptical orbit.       \def\eM{0.4}                             % Excentricity of the Earth's elliptical orbit.       \pgfmathsetmacro\bM{\aM*sqrt(1 - \eM^2)} % Minor radius of the Moon's elliptical orbit.       \def\offsetM{30}                         % Angle offset between the major axes of the Earth's and the Moon's orbits.            % This function computes the direction in which light hits the Earth.       \pgfmathdeclarefunction{f}{1}{%         \pgfmathparse{%           (-\eE + cos(#1) <  0) * (180 + atan(\bE*sin(#1)/(-\eE + cos(#1))))           +           (-\eE + cos(#1) >= 0) * atan(\bE*sin(#1)/(-\eE + cos(#1)))         }       }            % This function computes the distance between the Earth and the Sun,       % which is used to calculate the varying radiation intensity on the Earth.       \pgfmathdeclarefunction{d}{1}{%         \pgfmathparse{sqrt((-\eE + cos(#1))^2 + (\bE*sin(#1))^2)}       }            % Draw the elliptical path of the Earth.       \draw[thin,color=gray] (0, 0) ellipse (1 and \bE);            % Draw the Sun at the right-hand-side focus.       \shade[%         top color=yellow!70,%         bottom color=red!70,%         shading angle={45},%       ]({sqrt(1-\bE^2)}, 0) circle (\rS);            % Draw the Earth at \Earthangle.       \pgfmathsetmacro{\radiation}{100*(1 - \eE)/d(\Earthangle)^2}       \colorlet{Earthlight}{yellow!\radiation!blue}       \shade[%         top color=Earthlight,%         bottom color=blue,%         shading angle={90 + f(\Earthangle)},%       ]({cos(\Earthangle)}, {\bE*sin(\Earthangle)}) circle (\rE);       %\draw ({cos(\Earthangle)}, {\bE*sin(\Earthangle) - \rE}) node[below] {Earth};            % Draw the Moon's (circular) orbit and the Moon at \Moonangle.       \draw[thin, color=gray, rotate around={{\offsetM}:({cos(\Earthangle)}, {\bE*sin(\Earthangle)})}]         ({cos(\Earthangle)}, {\bE*sin(\Earthangle)}) ellipse ({\aM} and {\bM});       \shade[%         top color=black!70,%         bottom color=black!30,%         shading angle={45},%       ]({cos(\Earthangle) + \aM*cos(\Moonangle)*cos(\offsetM) - \bM*sin(\Moonangle)*sin(\offsetM)},%         {\bE*sin(\Earthangle) + \aM*cos(\Moonangle)*sin(\offsetM) + \bM*sin(\Moonangle)*cos(\offsetM)}) circle (\rM);     \end{tikzpicture}          \end{document}      **Output** ![output](http://i.stack.imgur.com/u2Ggp.jpg) **Question** I would very much like to have the shadow of the Moon (i.e., the darkest part of the Moon drawing) at the side opposite to the Sun no matter where the Earth and Moon is drawn relative to the Sun. Can anyone help me do that? (I don't know TikZ so it is a "please do it for me" question; sorry!) **Update** Here is Tom Bombadil's answer as an animation using the `animate` package.               \documentclass{article}          \usepackage[       hmargin=2.4cm,       vmargin=3cm     ]{geometry}     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{lmodern}     \usepackage{animate}               \def\rS{0.3}                             % The Sun's radius.     \def\Earthangle{30}                      % Angle with respect to horizontal.     \def\rE{0.1}                             % The Earth's radius.                                              % Major radius of the Earth's elliptical orbit = 1.     \def\eE{0.25}                            % Excentricity of the Earth's elliptical orbit.     \pgfmathsetmacro\bE{sqrt(1 - \eE^2)}     % Minor radius of the Earth's elliptical orbit.     \def\Moonangle{-45}                      % Angle with respect to horizontal.     \pgfmathsetmacro\rM{0.5*\rE}             % The Moon's radius.     \pgfmathsetmacro\aM{2.5*\rE}             % Major radius of the Moon's elliptical orbit.     \def\eM{0.4}                             % Excentricity of the Earth's elliptical orbit.     \pgfmathsetmacro\bM{\aM*sqrt(1 - \eM^2)} % Minor radius of the Moon's elliptical orbit.     \def\offsetM{30}                         % Angle offset between the major axes of the Earth's and the Moon's orbits.          % This function computes the direction in which light hits the Earth.     \pgfmathdeclarefunction{f}{1}{%       \pgfmathparse{%         (-\eE + cos(#1) <  0) * (180 + atan(\bE*sin(#1)/(-\eE + cos(#1))))         +         (-\eE + cos(#1) >= 0) * atan(\bE*sin(#1)/(-\eE + cos(#1)))       }     }          % This function computes the distance between the Earth and the Sun,     % which is used to calculate the varying radiation intensity on the Earth.     \pgfmathdeclarefunction{d}{1}{%       \pgfmathparse{sqrt((-\eE + cos(#1))^2 + (\bE*sin(#1))^2)}     }          \def\animation#1{%     \begin{tikzpicture}[scale=5]        % Changing parameters for animation.        \pgfmathsetmacro{\Earthangle}{\iA}         \pgfmathsetmacro{\Moonangle}{12*\iA}             % Draw the elliptical path of the Earth.       \draw[thin, color=gray] (0, 0) ellipse (1 and \bE);            % Draw the Sun at the right-hand-side focus.       \shade[%         inner color=yellow!70,%         outer color=orange!70,%       ]({sqrt(1 - \bE^2)}, 0) circle (\rS);            % Draw the Earth at \Earthangle.       \pgfmathsetmacro{\radiation}{100*(1 - \eE)/d(\Earthangle)^2}       \colorlet{Earthlight}{yellow!\radiation!blue}       \shade[%         top color=Earthlight,%         bottom color=blue!75!black,%         shading angle={90 + f(\Earthangle)},%       ]({cos(\Earthangle)}, {\bE*sin(\Earthangle)}) circle (\rE);       %\draw ({cos(\Earthangle)}, {\bE*sin(\Earthangle) - \rE}) node[below] {Earth};            % Draw the Moon's (circular) orbit and the Moon at \Moonangle.       \draw[%         thin,%         color=gray,%         rotate around={{\offsetM}:({cos(\Earthangle)}, {\bE*sin(\Earthangle)})}%       ]({cos(\Earthangle)}, {\bE*sin(\Earthangle)}) ellipse ({\aM} and {\bM});            % Makes a path (Moon)-(Sun), e.g., the vector pointing from the Sun to the Moon.       \path ($({cos(\Earthangle) + \aM*cos(\Moonangle)*cos(\offsetM)                 - \bM*sin(\Moonangle)*sin(\offsetM)},%                {\bE*sin(\Earthangle) + \aM*cos(\Moonangle)*sin(\offsetM)                 + \bM*sin(\Moonangle)*cos(\offsetM)}) - ({sqrt(1 - \bE^2)}, 0)$);       % Get the components of that vector.       \pgfgetlastxy{\myx}{\myy}       % Computing the inclination angle.       \pgfmathsetmacro{\moonshadinangleangle}{-90 + atan2(\myx, \myy)}            \shade[%         top color=black!90,%         bottom color=black!10,%         shading angle=\moonshadinangleangle,%       ]({cos(\Earthangle) + \aM*cos(\Moonangle)*cos(\offsetM)          - \bM*sin(\Moonangle)*sin(\offsetM)},%         {\bE*sin(\Earthangle) + \aM*cos(\Moonangle)*sin(\offsetM)          + \bM*sin(\Moonangle)*cos(\offsetM)}) circle (\rM);     \end{tikzpicture}     }          \pagestyle{empty}          \begin{document}          \begin{figure}[htbp]     \centering      \begin{animateinline}[poster=first,controls,loop]{10}       \multiframe{360}{iA=1+1}{\animation{\iA}}      \end{animateinline}     \end{figure}          \end{document}


title: Hiding Decimal Results from PGF Output

text: I have this `\foreach` statement which results in even numbers with decimals. I would like to omit or hide the decimal from the results. How can this be done simply? I have seen a few answers to much more complicated queries, but I can find a way to marry those solutions to my question.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{snakes,backgrounds,arrows,decorations.markings}     \begin{document}     %     %     \begin{center}     \begin{tikzpicture}          \draw   [<-]    (0,7)       --      (0,3.8)                   node    [at start,left]         {$A.$};                          \draw   [->]    (-0.2,4)    --      (3,4);                     \foreach [evaluate=\y as \yeval using \y*10] \y in {4,5,6,7}                         \draw   (-2pt,\y)   --  (2pt,\y)                         node    [anchor=east,left]  at (0,\y) {$\small \yeval$};               \end{tikzpicture}     \end{center}     %     %     \end{document}


title: mathabx + mathtools -> extremely odd underbrace behaviour... how to fix?

text: This following code produce very strange result: ![](http://i.stack.imgur.com/lGEB9.png)               \documentclass[12pt]{book}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}          \usepackage{amssymb}     \usepackage{amsmath}          \usepackage{mathabx}     \usepackage{mathtools}          \begin{document}     $$W_n(\underbrace{\mbox{\textvisiblespace},                       \mbox{\textvisiblespace},                       \dots,                       \mbox{\textvisiblespace}                      }_n           )     $$     \end{document}      If I just remove one of `mathabx` or `mathtools` the brace is displayed normally. Any ideas? P.S. I use some symbols from `mathabx` and some commands from `mathtools` in the book, so I probably need both packages...


title: Arrow end points problem

text: I keep getting these circles in my graph and I cannot figure out why. This is the code, is there something wrong with it? Every arrow has a circle at its start and end points and there are also 3 more circles, placed in my graph. I think they are related to the use of the `&` and `&&` symbols, but I cannot understand how or why.               \documentclass {article}          \usepackage {amsmath}     \usepackage {amssymb}     \usepackage {graphicx}     \usepackage[all]{xy}          \begin {document}     $\xymatrix{      & \bullet\\ \bullet\ar[dr]^b_\phi \ar[ur]^a     && \bullet \ar[ul]^\chi_e   \\     & \bullet \ar[uu]^c_{\psi\circ\chi} \ar[ur]^d_\psi     }\\$     \end {document}


title: Environ's body doesn't allow for making an \item

text: As part of a document process/workflow, it's easier to work with environments. However, in some cases the environment contents needs specific formatting. As such, it's convenient to use the `environ` package to capture the environment `\BODY`, and then use it as needed. The following elementary implementation doesn't work though:               \documentclass{article}          \usepackage{environ}     \NewEnviron{HEADING}{%       \item[\BODY]     }          \begin{document}          \begin{description}       \begin{HEADING}       Heading       \end{HEADING}     \end{description}          \end{document}      How can I get around to having `environ`ment `HEADING` process it's `\BODY` as an argument in the expected way?


title: Beamer: footer with current slide number but not total slide number; how to modify it?

text: I am using infolines as outer theme and I like it. I would like just to display the current slide number without the total slide number. I find an answer provided by Gonzalo Medina as the following. It is very nice. **However, how can I remove 0 from the left panel of footline as the following figure shown.**               \documentclass{beamer}     \usetheme{Warsaw}     \useoutertheme{infolines}          \makeatletter     \setbeamertemplate{footline}     {       \leavevmode%       \hbox{%       \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%         \usebeamerfont{author in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}       \end{beamercolorbox}%       \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%         \usebeamerfont{title in head/foot}\insertshorttitle       \end{beamercolorbox}%       \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%         \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}         \insertframenumber\hspace*{2ex}        \end{beamercolorbox}}%       \vskip0pt%     }     \makeatother               \begin{document}          \begin{frame}Test\end{frame}     \begin{frame}Test\end{frame}     \begin{frame}Test\end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/wJ7BQ.jpg)


title: Problem due to an image inserted in a table

text: This is my follow up question. My previous question is here: How can I do the following in latex **Problem** : If I add the image in my table, I get the following output as shown in the image below. Why is the Co-Supervisor going below? ![Table problem](http://i.stack.imgur.com/BMOha.png) I am using this code:               \begin{tabular}{|l|c|r|}     \hline     \bf Author: & \hspace{5pt} & \bf Research Supervisor:\\     \hline     Mr. X &  \hspace{5pt} & Prof. Dr. Z\\     \hline     \includegraphics[width=0.40\textwidth,height=10mm]{Figures/images} &  \hspace{5pt} & \bf Co-Supervisor:\\     \hline     &  \hspace{5pt} & Prof. Dr. Y\\     \hline     \end{tabular}      What I want is shown below: ![enter image description here](http://i.stack.imgur.com/3wMg7.png) **PS:** Please ignore the table borders, they are for demo only, I won't be using them in my final code. **The final product:** that I desire is: ![enter image description here](http://i.stack.imgur.com/yHHN0.png)