title: Tikz's picture scaled and wrapped

text: I need to wrap the text around my tikz picture. But as you can see, scaling the picture give me problems about the position of the shaded axis between "pompa" and "turbina". How can i fix this problem?               \documentclass[a4paper,12pt]{report} \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc} \usepackage[italian]{babel}          \usepackage{wrapfig} \usepackage{bm}          \usepackage{tikz}      \usetikzlibrary{positioning,intersections,shapes.geometric,decorations.pathmorphing,decorations.pathreplacing,decorations.shapes,decorations.markings,patterns,calc,fit,arrows,backgrounds}           \begin{document}           \begin{wrapfigure}{r}{0.5\textwidth} \vspace{-1cm}           \centering \begin{tikzpicture}[>=latex',auto,inner sep=2mm,node      distance=2cm and 3cm,transform canvas={scale=0.85}]           %setting styles           \tikzset{box1/.style={draw,minimum width=2cm,rectangle,thick}}      \tikzset{deco/.style={decoration={markings, mark=at position #1 with      {\arrow{>} }},postaction={decorate}}}      \tikzset{turb/.style={draw,trapezium,shape border rotate=90,inner      sep=1pt,minimum width=2.5cm,trapezium stretches=true,trapezium      angle=80,on grid,below right= of evaporatore}}                             \tikzset{every pin edge/.style={<-,shorten      >=-0.2cm,decorate,decoration={bent,amplitude=-2,aspect=0.3}}}           %define nodes and labels       \node[box1] (setA)   [label=right:$T_A$]           {\textit{SET A}}; \node[box1,below=1cm of setA] (evaporatore)               {\textit{Evaporatore}}; \node[turb,fill=white] (turbina)                    {\textit{Turbina}}; \node[box1,right=1cm of turbina] (sem)                  {\textit{SEM}}; \node[box1,on grid,below left=of turbina]      (condensatore)                               {\textit{Condensatore}};      \node[draw,circle,fill=white,on grid,below left= of evaporatore,inner      sep=1mm] (pompa) {\textit{Pompa}}; \node[box1] (setB)  [below=1 cm of      condensatore] [label=right:$T_B$]                   {\textit{SET B}};           %the "IMT" dashed box and label       \node (imt) [draw,dashed,inner      sep=3pt,fit = (evaporatore) (turbina) (condensatore)(pompa),pin={[pin      distance=10mm] 30:\textit{IMT}}]  {};                %drawing connections between components       \begin{scope}[>=triangle 60]       \draw [deco=0.6]  (evaporatore)                -| node[pos=0.6]{2}      (turbina.top right corner);  \draw [deco=0.6]  (turbina.bottom left      corner) |- node[above=1mm,pos=0.71]{3} (condensatore);  \draw      [deco=0.4]  (condensatore)               -|      node[above=1mm,pos=0.31]{4} (pompa);  \draw [deco=0.6]  (pompa)             |- node[below=1mm,pos=0.63]{1} (evaporatore); \end{scope}           %drawing the arrows           \begin{scope}[>=stealth', shorten >=-0.0cm,shorten <=-0.0cm,->]       \path[thick] (setA)         edge node[] {$\bm{q_A}$} (evaporatore)                        (turbina)      edge node[] {$\bm{l}$}   (sem)                        (condensatore) edge node[] {$\bm{q_B}$} (setB); \end{scope}           % drawing the shaded axis between "pompa" and "turbina"           \begin{scope}[on background layer] \draw[shading=axis]      ($(pompa.center)+(0,-3pt)$) rectangle ($(turbina.center)+(0,3pt)$);      \end{scope} \end{tikzpicture}           \vspace{6cm} \end{wrapfigure}           Il funzionamento di tutti gli impianti motori termici si basa sul      ciclo diretto di Carnot: chiaramente l'impianto motore dovrà essere      formato da più macchine, o componenti, in grado di realizzare tali      trasformazioni sul fluido di lavoro. Tipicamente gli scambi di energia      termica \textit{1-2} e \textit{3-4}  si ottengono mediante scambiatori      di calore ; l’espansione \textit{2-3} è ottenuta mediante una turbina      (a gas o a vapore); la compressione \textit{4-1} è ottenuta mediante      un compressore (se il fluido di lavoro si trova in fase gassosa) o una      pompa (liquido).           In figura riportiamo lo schema di funzionamento di un impianto motore      termico con turbina a vapore.           \end{document}      This is the original picture:               \documentclass{article}  \usepackage{tikz}      \usetikzlibrary{positioning,                     intersections,                     shapes.geometric,                     decorations.pathmorphing,                     decorations.pathreplacing,                     decorations.shapes,                     decorations.markings,                     patterns,                     calc,                     fit,                     arrows,                     backgrounds}                      \usepackage{bm}           \begin{document}           \begin{tikzpicture}[>=latex',auto,inner sep=2mm,node distance=2cm and      3cm]           %setting styles           \tikzset{box1/.style={draw,minimum width=2cm,rectangle,thick}}      \tikzset{deco/.style={decoration={markings, mark=at position #1 with      {\arrow{>} }},postaction={decorate}}}      \tikzset{turb/.style={draw,trapezium,shape border rotate=90,inner      sep=1pt,minimum width=2.5cm,trapezium stretches=true,trapezium      angle=80,on grid,below right= of evaporatore}}                             \tikzset{every pin edge/.style={<-,shorten      >=-0.2cm,decorate,decoration={bent,amplitude=-2,aspect=0.3}}}           %define nodes and labels       \node[box1] (setA)   [label=right:$T_A$]           {\textit{SET A}}; \node[box1,below=1cm of setA] (evaporatore)               {\textit{Evaporatore}}; \node[turb,fill=white] (turbina)                    {\textit{Turbina}}; \node[box1,right=1cm of turbina] (sem)                  {\textit{SEM}}; \node[box1,on grid,below left=of turbina]      (condensatore)                               {\textit{Condensatore}};      \node[draw,circle,fill=white,on grid,below left= of evaporatore,inner      sep=1mm] (pompa) {\textit{Pompa}}; \node[box1] (setB)  [below=1 cm of      condensatore] [label=right:$T_B$]                   {\textit{SET B}};           %the "IMT" dashed box and label       \node (imt) [draw,dashed,inner      sep=3pt,fit = (evaporatore) (turbina) (condensatore)(pompa),pin={[pin      distance=10mm] 30:\textit{IMT}}]  {};                %drawing connections between components      \begin{scope}[>=triangle 60]       \draw [deco=0.6]  (evaporatore)                -| node[pos=0.6]{2}      (turbina.top right corner);  \draw [deco=0.6]  (turbina.bottom left      corner) |- node[above=1mm,pos=0.71]{3} (condensatore);  \draw      [deco=0.4]  (condensatore)               -|      node[above=1mm,pos=0.31]{4} (pompa);  \draw [deco=0.6]  (pompa)             |- node[below=1mm,pos=0.63]{1} (evaporatore); \end{scope}           %drawing the arrows           \begin{scope}[>=stealth', shorten >=-0.0cm,shorten <=-0.0cm,->]       \path[thick] (setA)         edge node[] {$\bm{q_A}$} (evaporatore)                        (turbina)      edge node[] {$\bm{l}$}   (sem)                        (condensatore) edge node[] {$\bm{q_B}$} (setB); \end{scope}           % drawing the shaded axis between "pompa" and "turbina"           \begin{scope}[on background layer] \draw[shading=axis]      ($(pompa.center)+(0,-3pt)$) rectangle ($(turbina.center)+(0,3pt)$);      \end{scope}           \end{tikzpicture}      \end{document}


title: Getting double headed arrows with curly arrow above

text: I'm looking for a way to draw a double-headed arrow with a curly arrow above to depict a reversible chemical reaction with addition of another reagent. The script I'm working with at the moment is as follows:               \documentclass[11pt]{article}     \usepackage{mychemistry}     \begin{document}     \setarrowlength{3em}     \large     \begin{rxn}     \reactant[,a]{E}     \chemand     \reactant[,a]{\ch{S1}}     \arrow[0,<=>]{}{}     \reactant[,a]{\ch{ES1}}     \arrow[0,<=>]{}{}     \reactant[,a]{\ch{E'P1}}     \arrow[0,<=>]{}{\arrow{P1}}     \reactant{\ch{E'}}     \arrow[0,-+>]{\ch{S2}}{}     \reactant[,a]{\ch{E'S2}}     \arrow[0,-+>]{}{\ch{P2}}     \reactant[,a]{\ch{E}}     \end{rxn}     \end{document}      Giving me the following output: ![Reaction](http://i.stack.imgur.com/A7iwR.jpg) Ideally, I'd like to amend this so that the 2 arrows from the right-hand side are double sided arrows, while still preserving the curly arrows above.


title: How to insert images with graphicx?

text: I'm trying to insert an image to my file, but I can't figure out how to do it. I've added               \usepackage{graphicx}      to my preamble and when I drag and drop an image to my file (I'm working with TeXStudio), the following code appears:               \begin{figure}     \centering     \includegraphics[width=0.7\linewidth]{"My Pretty Image"}     \end{figure}      However, this doesn't want to work. What did I do wrong and how can I solve this?


title: Inputting backtick (`) in LaTeX (italian keyboard, Windows XP)

text: I started writing my thesis in LaTeX, and I noticed there's the need of the backtick (`) char in many cases. I'm working on a Windows XP-mounting laptop whose keyboard is italian, and numpad-less. This makes wery hard inputting the backtick since italian keyboards don't come with a backtick key and Windows' key combination for the backtick requires a numpad. I'd rather not map my keyboard with a different layout, since I don't usually need the backtick apart from when writing with LaTeX. Is there an escape sequence, or a way of directly inputting the ASCII code for the backtick? Thanks!


title: Why must \DeclareMathOperator be in the preamble?

text: What is the rationale for requiring `\DeclareMathOperator` to be in the preamble? Why are users not allowed to restrict the scope of an operator definition to a particular chapter or environment, like `\newcommand`?


title: Flash animation and beamer

text: I want to have a flash file (`.swf`) in my `beamer` document on a Linux machine, using pdfLaTeX and Evince. Is there a way to make a link to that file which runs an external player or even better, is it possible to embed it into my presentation? For the first option I tried               \href{run:/usr/bin/gnash /tmp/test.swf}{test}      which gives me the error               Failed to open "/usr/bin/gnash /tmp/test.swf"     Error stating file '/usr/bin/gnash /tmp/test.swf': No such file or directory.      (however `\href{run:/usr/bin/gnash}{test}` starts just gnash). For the second I know the `flashmovie` package. However I want use Evince as PDF viewer and not Adobe Reader. **Edit** : Finally I just used `\href{run:/tmp/test.swf}`. I think if you open this by Evince the correct application to open the `.swf` file is chosen by `gnome- open`. If you use `okular` I guess it is `kde-open`. To avoid possible configuration problems with those openers and to have more control, I think it would be much better to have a way to specify the application which should open my file (in my case `gnash`) as I tried in my question above. So if there are any ideas ...


title: Table without column specification

text: Is there a way to create a table in LaTeX without specifying in advance the number of columns? What I want is something like               \documentclass{article}     \begin{document}     \begin{amazingtabular}     this & is & a\\     table & without & column specification     \end{amazingtabular}     \end{document}      Notice that there is no argument like `{cll}` after the `amazingtable` environment. What I want is that the environment should work for an _arbitrary_ number of columns. If possible, I would like to avoid going into math mode to use the `matrix` environment.


title: Array Alignment using TikZ Matrices; cell over a complete row

text: I want to align subplots in a pgfplot. with `\matrix` it is easy to align pictures. My problem is, that I need several rows with two columns/pictures and a last row with a picture over both columns. Here the not working code illustrating what I wanted to do               \documentclass[a4paper,oneside,10pt]{scrreprt}          \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage[USenglish]{babel}          \usepackage{tikz,pgfplots}     \pgfplotsset{compat=newest}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \begin{figure} [H]         \centering         \begin{tikzpicture}             \matrix{             \begin{axis}[width=0.45\textwidth,height=0.45\textwidth]                 \addplot {x};             \end{axis}             &             \begin{axis}[width=0.45\textwidth,height=0.45\textwidth]                 \addplot {x};             \end{axis}             \\             \begin{axis}[width=0.9\textwidth,height=0.45\textwidth]                 \addplot {x};             \end{axis}             \\               };     \end{tikzpicture}     \end{figure}               \end{document}      that's the unwanted result ![enter image description here](http://i.stack.imgur.com/VhQdz.jpg) and that's how I wanted it to look ![enter image description here](http://i.stack.imgur.com/Vw1qj.jpg) I had a look at   * Manual for Package pgfplots by Christian Feuersaenger   * TikZ & PGF Manual by Till Tantau but did not found a solution (maybe there is non) Does anybody has a solution for doing it with /matrix (highly appreciated) or maybe another solution? kind regards Benjamin


title: Removing "And" in Revtex 4.1 author list

text: I am submitting an abstract using a LaTeX template. The template makes use of RevTex 4.1 and it includes an example abstract. In this example, the numbers that show the author affiliation are hard-coded (presumably to show how to deal with the affiliation mess that can arise for more complex author lists):               \documentclass[aps,12pt]{revtex4}     \begin{document}     \title{Why Some Dogs Talk and Others Don't}     \author{\underline{B.~Bunny}$^1$, and             M.~Mouse$^2$}     \affiliation{$^1$Looney Tune Studios}     \affiliation{$^2$Disney Inc.}          \begin{abstract}     ...     \end{abstract}      The problem is that this leads to a misplaced "and" between the affiliation descriptions: ![enter image description here](http://i.stack.imgur.com/KqkbX.png) How can I modify the code so that this "and" disappears? My author-list actually is quite complex, and I would like to hard-code the numbers as shown here, so that my one-page limit is not blown by the affiliation list.


title: Tikz-drawing Brownian motion on the unit circle $S^{1}$

text: I'm trying to draw Brownian motion on the unit circle `$S^{1}$` `$({Z \in \mathbb{C} : |Z|=1})$` using the package TikZ. Here is the picture that I am trying to get: ![enter image description here](http://i.stack.imgur.com/eaHyq.png) I have just a simple example to circle :                   \begin{tikzpicture}[scale=3]         \draw[step=.5cm,gray,very thin] (-1.4,-1.4) grid (1.4,1.4);         \draw (-1.5,0) -- (1.5,0);         \draw (0,-1.5) -- (0,1.5);         \draw (0,0) circle (1cm);         \draw (3mm,0mm) arc (0:30:3mm);         \end{tikzpicture}


title: Changing the style of footfullcite item

text: Currently `\footfullcite{jdoe2014}` for `@inproceedings{jdoe2014, author = {John Doe}, title = {Some paper}, url = {http://somelink.com/file.pdf}, year = {2014}, note = {Rarecon} } ` renders into: ` John Doe (2014). "Some paper". In: Rarecon. URL: http://somelink.com/file.pdf ` How I can change standard output of this into the ` John Doe (2014). "Some paper". In: Rarecon. ` where **"Some paper"** also is PDF link/url to http://somelink.com/file.pdf ?


title: How to unset a toggle in biblatex?

text: > **Possible Duplicate:**   >  Biblatex: Get rid of ISSN, URLs and DOIs in references The standard.bbx file sets toggles for doi,url and eprint that are being checked later by the doi+eprint+url macro. My goal is to have doi printed, but not url. IIUC, I actually don't need to redefine the macro (although I could), but just need to set the url toggle to false. Unfortunately, the biblatex manual even does not mention the word 'toggle' so I don't know how to set the url option to false. I tried simply               \DeclareBibliographyOption{url}{false}      but that just renders an error about conflicting options.


title: Is there an equivalent of lipsum for shorter sections of text?

text: The sections of text generated by `lipsum` are generally several lines long. Is there a simple way to generate shorter segments of random (generic) text (other than typing it, of course)?


title: Add notes to latex beamer

text: I need to add notes for presentation like we add Microsoft power point 'click to add notes'Is there some way to do it using latex beamer?


title: TeXstudio Is Not Responding

text: I have been using TeXstudio for some time now, and have highly enjoyed using. However, just now it has been acting up. Whenever I open the program, my cursor always reverts to the wait-cursor, this one ![enter image description here](http://i.stack.imgur.com/FlE7i.gif) , and it is rather annoying. Not only is this an issue, but I TeXstudio won't compile any of my documents. Has anyone ever dealt with this issue? EDIT: Here is the code that is apparently giving me trouble:               % Regular polygons     \documentclass{article}     \usepackage{tikz}     \begin{document}          % Radius of regular polygons     \newdimen\R     \R=0.8cm          \begin{tikzpicture}              % Indicate the boundary of the regular polygons         \begin{scope}[yshift=-3\R]                  \draw (0:\R) \foreach \x in {60,120,...,359} {                     -- (\x:\R)                 }-- cycle (90:\R) node[above] {Hexagon} ;                  % 360/7 = 51.4286 For PGF v < 1.18 we have to round to the nearest             % integer. Newer version support fractional angle values.             % For a more accurate result use the sequence             % {51, 103, 154, 206, 257, 309}             %            \end{scope}          \end{tikzpicture}          \begin{tikzpicture}              % Indicate the boundary of the regular polygons         \begin{scope}[yshift=-3\R]             \draw (-0.8,0) -- (0.8,0);              \draw (0,-0.7) -- (0,0.7);             \draw (0,-0.7) --             \draw (0:\R) \foreach \x in {60,120,...,359} {                     -- (\x:\R)                 }-- cycle (90:\R) node[above] {Hexagon} ;                  % 360/7 = 51.4286 For PGF v < 1.18 we have to round to the nearest             % integer. Newer version support fractional angle values.             % For a more accurate result use the sequence             % {51, 103, 154, 206, 257, 309}             %            \end{scope}          \end{tikzpicture}          \end{document}


title: List all bibliography entries but one

text: ## Question Is there a way to exclude some bibliography entries when using               \nocite{*}      to list all entries? ## MWE               \documentclass{article}          \usepackage{cite}     \usepackage{filecontents}          \begin{filecontents}{bibliography.bib}     @misc{A01,       author = {Author, A.},       year = {2001},       title = {Alpha},     }     @misc{B02,       author = {Buthor, B.},       year = {2002},       title = {Bravo},     }     @misc{C03,       author = {Cuthor, C.},       year = {2003},       title = {Charlie},     }     % And even more bibliography...     \end{filecontents}          \begin{document}       Some text citing \textsc{Author}\cite{A01} but not \textsc{Buthor} and \textsc{Cuthor}. Though \textsc{Buthor} (and all other entries -- not shown in this example -- excludig \textsc{Cuthor}) should be in the references.       Since there are even more entries in the real bibiography, \textbf{\textbackslash{}nocite\{B02\}} will not work. So the best thing to use might be \textbf{\textbackslash{}nocite\{*\}}, but unfortunately this also "cites" \textsc{Cuthor}.          % \nocite{*}       \bibliographystyle{plain}       \bibliography{bibliography}{}     \end{document}


title: LuaLatex: How get ascii text from paragraph, change it and render again

text: Is possible to render paragraph in `LuaTeX` -> get `ascii` text with hyphenation -> put back text and render again?   1. I have simple text: "Lorem ipsum dolor sit amet, conse... laborum." I need get this text to render in 5 cm width in 12 pt specific font.   1. render text and get array (with some data) Array              temptext[0]="Lorem ipsum dolor sit a-"          temptext[1]="met, consectetur adipisicing e-"          temptext[2]="lit, sed do eiusmod tempor in-"          ...          temptext[n]="lit anim id est laborum."        2. I change some parameters or letter for example new width is `5.1cm` not `5.0cm`, change some letter , change font etc.   3. while my text have different lines than for example `n=21` I change some parameters and go to 2. * * * This algorithm is possible to more than one file. for example my paragraph is `\include` file.tex and 3. point is run perl script, ruby, exe or bash script and run again. I need only number of lines , array table (what is first letter in line etc), and where are hyphenation mark. Polish [Mogę napisać po polsku. Chodzi mi o to by dowiedziec się gdzie TeX wstawia znaki podziału wyrazu i tak dobrac parametry by wszystko zmieściło się w zadanym prostokącie (np. jakis skomplikowany tekst ze wzorem), zmieniając np. wielkosc fontu, glify, sam font itp. Potrzebuje zatem informacji jak bardzo tekst nie pasuje do prostokąta. Gdzie ma błędy (overfull box), czyli gdzie wystaje, gdzie nie wystaje i o ile czyli `end space size`. Mam kilka glifów reprezentujących te same znaki. np. we wzorach moge użyć kilku fontów, które sa podobne do siebie, albo ligatury moge dorobić swoje byle wszystko pasowało do prostokatu akapitu. Alu musze wiedzieć jak bardzo nie pasuje to do akapitu. Tak by napisac program poprawiający tekst na tyle by błąd dopasowania był jak najmniejszy] Jeśli ktoś może niech przetłumaczy polski tekst, który może jest jasniejszy na angielski. Dziękuję. ]


title: automatic tikz coordinate calculations

text: Right now I have these defined:               \coordinate (Z1) at (0.9,0.5);     \coordinate (Z2) at (0.816,-0.112);     \coordinate (Z3) at (0.46848,-0.46336);      But I would really like to automate this to be: ![enter image description here](http://i.stack.imgur.com/5c1ak.png) so that I can just specify Z1 and then vary the α factor easily to get Z2 and Z3. (Right now α = 0.8) What's the simplest way to do this? I know how to do some coordinate calculations but this is beyond my skillset right now. * * * edit: FWIW(For what it's worth) this can also be expressed as a coordinate transformation H = [1 alpha; -alpha 1]/(1+alpha^2) so maybe that's something worth using. I don't know how to force tikz to compute transformed coordinates.


title: Embed Tex Live into application

text: I try to make an embedded version of TeX Live. My goal is to be able to use it to compile TeX documents in a web application. I can't use system LaTeX distribution due to too old packages. To achieve this I wrote a bash script:               #!/bin/bash     set -x     #set proxy if needed     arch=x86_64-linux     tlmgr=./texlive/bin/$arch/tlmgr     fmtutils=./texlive/bin/$arch/fmtutil     webc2=./texlive/texmf-dist/web2c/     #export http_proxy          if [ -d build ]     then        rm -rf build     fi     mkdir build          echo prepare build tree     cp texlive.profile build     pushd build     sed -i "s|%BASEDIR%|$PWD|" texlive.profile          echo download installer     wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz          echo extract installer     tar -xzf install-tl-unx.tar.gz     pushd install-tl-*          echo basic instalation of texlive     ./install-tl  -profile ../texlive.profile     popd          echo custom installation     $tlmgr list --only-installed | sed -r "s/i ([a-zA-Z0-9_\.-]+):.*/\1/" > installedPkg     cp ../pkglist pkglist          for i in $(cat pkglist)     do        if ! grep "^$i$" installedPkg        then            echo $i >> needInstall        fi     done          for i in $(cat installedPkg)     do        if ! grep "^$i$" pkglist        then            echo $i >> needRemove        fi     done          $tlmgr install $(cat needInstall)     $tlmgr remove $(cat needRemove) --force          echo regenerate format     for i in mptopdf dvilualatex luatex lualatex dviluatex etex pdfetex xetex xelatex     do         $fmtutils --disablefmt=$i --fmtdir=$webc2     done          $fmtutils --all --fmtdir=$webc2          pushd texlive/bin/*     rm pdflatex     ln -s ./pdftex pdflatex     popd     cp -R texlive ..      # Actual behaviour When I set the `texlive/bin/x86_64-linux` in the path, everything works fine. If I however call the `texlive/bin/x86_64-linux/pdflatex` executable explicitly, system library are used (and fail). # Needed behaviour I would like to be able to run pdfLaTeX like this:               texlive/bin/x86_64-linux/pdflatex foo.tex      Moreover, I would like this way of calling pdfLaTeX to be able to search the library in the correct path without set environment variables by hand (wrapper script can be usable).


title: Unable to get PSTricks to work as expected in Texmaker

text: I am trying to get PSTricks to work with PDFLaTeX in order to create scientific diagrams in the report I am producing. My document is currently as follows (I've included potentially extraneous packages because I'm not sure what could have an impact on PSTricks):               \documentclass{article}     \usepackage{fullpage}     \usepackage{amssymb,amsmath}     \usepackage{concmath}     \usepackage[euler-digits,euler-hat-accent]{eulervm}     \usepackage{url}         \usepackage{graphicx}     \usepackage{subcaption}     \usepackage{float}     \usepackage{url}          \usepackage{pstricks}     \usepackage{auto-pst-pdf}          \makeatletter     \g@addto@macro\@floatboxreset\centering     \makeatother          \DeclareGraphicsExtensions{.pdf,.png,.jpg}          \begin{document}          \title{Rotational Dynamics}     \author{Thomas Russell}     \date{March 2014}     \maketitle          \begin{pspicture}(5,5)        %% Triangle in red:        \psline[linecolor=red](1,1)(5,1)(1,4)(1,1)        %% Bezier curve in green:        \pscurve[linecolor=green,linewidth=2pt,%          showpoints=true](5,5)(3,2)(4,4)(2,3)        %% Circle in blue with radius 1:        \pscircle[linecolor=blue,linestyle=dashed](3,2.5){1}      \end{pspicture}          \end{document}      And this compiles fine, but rather than embedding the image in the target PDF file, it creates a PostScript file: `rotational-dynamics-autopp.ps` and then embeds it in `rotational-dynamics-autopp.pdf`. I am compiling the LaTeX file with the following build option in Texmaker:               pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex


title: too much space between two environment create with tcolorbox

text: i want write a maple book, see this example code in that book:               \documentclass{article}     \usepackage{tcolorbox,fancyvrb}     \tcbuselibrary{skins,breakable}          %-------------------------------------------------- Code Environment     \newenvironment{code}      {\VerbatimEnvironment       \begin{tcolorbox}[         breakable,         colback=red!5!white,         colframe=red!75!black,       ]%       \begin{Verbatim}}      {\end{Verbatim}\end{tcolorbox}}          \newenvironment{outc}      {\begin{tcolorbox}[         breakable,         left=0mm,right=0mm,top=0mm,bottom=0mm,     %    boxsep=0mm,         colback=white,         coltext=blue,         colframe=gray!50,       ]}%      {\end{tcolorbox}}          %\newenvironment{outcode}     % {\begin{outc}\begin{equation}}      % {\end{equation}\end{outc}}     \newenvironment{outcode}      {\begin{outc}\[}       {\]\end{outc}}     %-------------------------------------------------- Code Environment          \begin{document}          In this example, we see too much space between this two environment \textbf{code} and \textbf{outcode}:          \begin{code}     > 2+3;      \end{code}     \begin{outcode}     5     \end{outcode}          \end{document}      output is: ![enter image description here](http://i.stack.imgur.com/6HcVY.png) question is: How can i write output below the maple code with two different color for background and text,and separate those with, for example \tcblower command in tcolorbox? In tcolorbox-example.tex file in **c:\texlive\2013\texmf- dist\doc\latex\tcolorbox** folder, use environment **tcblisting** for the setting the box displays the source code and shows the output in other part below like this:               \begin{tcblisting}{colback=red!5!white,colframe=red!75!black}     This is a \LaTeX\ example:     \begin{equation}     \sum\limits_{i=1}^n i = \frac{n(n+1)}{2}.     \end{equation}     \end{tcblisting}      output is: ![enter image description here](http://i.stack.imgur.com/2myIx.png)


title: Check the value of a pgfkey

text: I need to be able to check if the value of a pgfkey is empty or not. A solution I have tried (using package `etoolbox`):               \edef\temp{\pgfkeysvalueof{/path/key}}%     \expandafter\ifstrequal\expandafter{\temp}{}{key is empty}{key is not empty}%      But this does not work if the value of the key expands to something empty or even worse: the value of the key cannot be expanded! How can I check whether a key is empty or not without expanding it? I just want to check if it's string value is equal to "" or not. **Edit** : Added a full example               \documentclass{article}     \usepackage{tikz}     \usepackage{etoolbox}     \usepackage{overpic}          \newcommand{\strcomp}{\expandafter\ifstrequal\expandafter}%          \pgfkeys{         /icon/.cd,         width/.initial,         overlay/.initial,     }          \newcommand{\icon}[2][]{%         {%             \pgfkeys{/icon/.cd,width,overlay,#1}%             \def\options{}%             \edef\temp{\pgfkeysvalueof{/icon/width}}%             \strcomp{\temp}{}{}{\edef\options{width=\pgfkeysvalueof{/icon/width},\options}}%             \edef\temp{\pgfkeysvalueof{/icon/overlay}}%             \strcomp{\temp}{}{%                 \edef\graphic{\noexpand\includegraphics[\options]{#2}}%             }{%                 \edef\temp{\noexpand\begin{overpic}[\options]{#2}}%                 \def\graphic{\temp\put(0,0){\pgfkeysvalueof{/icon/overlay}}\end{overpic}}%             }%             \graphic         }%     }%          \begin{document}          \icon{example-image} % Works!     \icon[width=3cm]{example-image} % Works :)     \icon[width=3cm,overlay=jei]{example-image} % Also works :)     \icon[width=3cm,overlay={\includegraphics{overlay-image}}]{example-image} % Breaks down when trying to expand in \edef\temp{\pgfkeysvalueof{/icon/overlay}}          \end{document}


title: How can I put an environment within a subsection?

text: I have this code, but the environment is put at the top of the page above the sections.                   \documentclass[a4paper,11pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[italian]{babel}     \usepackage{graphicx}     \usepackage{placeins}     \usepackage{listings}     \usepackage[usenames]{color}     \lstnewenvironment{codice_c++}[1][]     {\lstset{basicstyle=\small\ttfamily, columns=fullflexible,     keywordstyle=\color{red}\bfseries, commentstyle=\color{blue},     language=C++, basicstyle=\small,     numbers=left, numberstyle=\tiny,     stepnumber=1, numbersep=5pt, frame=shadowbox, float=*, #1}}{}     \begin{document}             \tableofcontents             \newpage            \section{s1}               \subsection{ss1}               \begin{codice_c++}[caption={c1}]     .....      \end{codice_c++}               \end{document}


title: How can one manage his own bibliography? (using biber/biblatex)

text: I used to work with Citavi and recently tried out Jabref. Due to the nature of the best, i.e. I _always_ had re-touch the .bib-file, I recently exported consolidated my sources I had stored in Citavi and Jabref and worked them into a single .bib-file which I am going to use with Biblatex and biber. I intend to use either Notepad++, Texstudio or Geany for editing the .bib- files. So now I am thinking about simplifying / improving the workflow when I need to edit it. First of I thought I'd split it up into 27 files, which are A-Z and numerals. Yet sometimes in the past when I added the sources, I didn't consider that in a case of a collaboration, I didn't specifically account for the corresponding author if there was one, which are of course often named first. That might prove tedious if I'd like to look at the specific code for an entry. In terms of functionality this is irrelevant since I assume one is not going to omit any letters. What do you do for staying sane when working with large .bib files? Or is it not that much of an hassle for you?


title: Hide your e-mail address from spam crawlers

text: According to Security SE it is highly recommendable to cover your email address in publicly available documents. I'm aware of the discussion about handling email addresses as images: Crawler Resistance Email Address Anyhow, I'm looking for a non-image solution to this problem: Is there the possibility to make use of Unicode characters (that might be not recognized by the crawler software) in combination with XeTeX?


title: Test for vertically overfull parbox

text: I'm currently updating an old class written in mostly plain TeX into LaTeX (mostly for readability) and I changed a combination of `hbox` and `vbox` into a single `parbox` with all the optional arguments. The problem is that this class was clever and when the text in the box overflowed, it attempted to typeset it in two columns instead of one. It did this using `\ifnum\badness=1000000` which worked fine for the old `hbox`/`vbox` method but fails using the `parbox` method. Is there some way to test the vertical badness of a `parbox`? MWE               \documentclass{article}     \usepackage{blindtext}     \begin{document}     % New code     \noindent\parbox[c][3cm][t]{\linewidth}{       \blindtext     }                               %parbox     \ifnum\badness=1000000\relax \vspace{3em} THE PREVIOUS BOX HAS BECOME OVERFULLxs\fi%          \vspace{5cm}          \makeatletter     % Old code     \noindent\vbox to 3cm{\hbox{     \parbox{\linewidth}{     \blindtext     }                               % parbox     }%          hbox     \vfill}%    vbox     \ifnum\badness=1000000\relax \vspace{3em} THE PREVIOUS BOX HAS BECOME OVERFULL\fi%     \makeatother          \end{document}      ![vertically overful parbox example](http://i.stack.imgur.com/bUizU.png)


title: stack in xy-pic

text: I want to draw this: ![enter image description here](http://i.stack.imgur.com/ER2xB.jpg) and my xy-pic code is               \[     \xy     @={(0,0),(10,0),(10,10),(0,10)},     {\ar@{-}^{f_1}|{\dir{>}} s0;s1},     {\ar@{-}^{f_2}|{\dir{>}} s1;s2},     {\ar@{-}^{f_3}|{\dir{>}} s2;s3},     {\ar@{-}^{f_4}|{\dir{>}} s3;s0},     \endxy     \]      Can I use the function `@@` to simplify the above code? For example, the code               \[     \xy     @={(0,0),(10,0),(10,10),(0,10)},     s0="prev",     @@{;"prev";**@{-}="prev"}     \endxy     \]      gives the output without the arrows and the f's.


title: KOMA-Script/Twoside > Extra right margin on odd and even page :-S

text: I'm trying to use _KOMA-Script_ with `scrbook` class but whatever I do, I always have an extra margin on the right of every page. Does anyone have an idea to strip of this space ? Here are some illustrations of my problem (in orange the extra space) : ![1st page](http://i.stack.imgur.com/dqvML.png) ![2nd page](http://i.stack.imgur.com/v2hbo.png) The strip only appears with XeLatex (with PdfLatex there is no problem at all) Here is a kind of minimal example :               \documentclass[a4paper,12pt,twoside=true,BCOR=0pt]{scrbook}     \usepackage{showframe}          \author{John Doe}     \title{My super Title}          \begin{document}          \maketitle          \tableofcontents          \chapter{My first chapter}          \end{document}      Thanks for reading


title: Draw a breaking ocean wave with Tikz?

text: I've just discovered this wonderful forum. After having tried for a while (and unsuccessfully) to draw a breaking ocean wave when approaching sore, I am asking anybody who might want to contribute to help me on this matter. It doesn't have to be nothing complicated, what I had in mind was something like this: ![enter image description here](http://i.stack.imgur.com/ZCNjQ.jpg) * * * Thank you for reacting to my message. I'll try to better state my problem. Aim: draw a (ocean) wave shape, schematized, representing ideal shape in deep water and showing shoaling (i.e. peaking up) when approaching shallow waters. Shoaling process, should include shape modification (steepening) and wave breaking (i.e. drop off the wave's rip). Ideally, I should be able to prescribe a bottom shape and, on it, the wave propagating. Problem: What I get stuck with, is the shoaling representation, i.e. how wave peaks up and the loss of ideal shape when approaching very shallow waters. Drops also represent a problem. In fact, so far I have been providing single coordinates manually (x,y) for the wave shape, but my aim is to prescribe something parametrically. Refer to Fig. 1 of: http://onlinelibrary.wiley.com/doi/10.1002/fld.2056/pdf Here is a chunk of code, representing what I have been doing so far:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.pathmorphing,calc}     \usetikzlibrary{%              decorations.pathreplacing,%         decorations.pathmorphing%     }               \begin{tikzpicture}          [          interface/.style={             % The border decoration is a path replacing decorator.              % For the interface style we want to draw the original path.             % The postaction option is therefore used to ensure that the             % border decoration is drawn *after* the original path.             postaction={draw,decorate,decoration={border,angle=-45,                         amplitude=0.3cm,segment length=2mm}}}         ]     %\arc{diameter} {start-angle}{end-angle}     %\draw[->] (0,0) ++( 45 : 1 ) arc ( 180:50:1 );               %\draw[black,thick,interface] (-1,-2)--(6,-2);               %\draw[draw=blue!80, decoration={bumps, mirror, segment length=6mm}, decorate,     %     bottom color=cyan!60!black, top color=blue!20!white, opacity=.5](0,0) .. controls (1.5,-1) and (3.5,3) ..(5,0);     %\draw[blue] (0,0) .. controls (1.5,-1) and (3.5,3) ..(5,0);          %     %\draw[black] (0,0) .. controls (1,-1) and (3.2,2.5) ..(4.5,.75);     %\draw[black,decoration={bumps, segment length=3mm}, decorate]      %(4.5,.75) .. controls (3.5,1) and (3.7,.05) .. (5,0);     %\draw[densely dashed,red!30] (0,0)--(5,0);          \draw[black!30] (0,0) .. controls (1,-1) and (3.2,2.5) ..(4.5,.75);     \draw[black!30,decoration={bumps, segment length=2mm}, decorate]      (4.5,.75) .. controls (3.95,1) and (4.1,.9) .. (4,.75);     \draw[black!30] (4,.75) .. controls (3,1) and (3.2,0) ..(4.5,0);          \fill [blue!20] (0,-.51)--(0,0) .. controls (1,-1) and (3.2,2.5) .. (4.5,.75) .. controls (3.95,1) and (4.1,.9) .. (4,.75)--(4,.75) .. controls (3,1) and (3.2,0) ..(4.5,0);               \draw[blue!20,decoration={bumps, mirror, segment length=6mm}, decorate]      (4.5,0)-- (10,0);     \draw[blue!20,decoration={bumps, mirror, segment length=6mm}, decorate]      (-2,0)-- (0,0);          \draw[densely dashed,red!20] (-2,0)--(8,0);               \end{tikzpicture}     \end{document}


title: How to make this image translates to top?

text: How to make this image translates to top by 2cm ? Using yshift or how, please ?               \documentclass{beamer}          \begin{document}          \begin{frame}     \begin{figure}     \centering     \includegraphics[height=4cm]{example-image-a}     \caption{A test caption}     \end{figure}     \end{frame}          \end{document}      I cannot use tikz beacause Im' trying to display the image's caption.


title: TikZ tree whose children are located at specified positions?

text: Is there a way to construct a tree whose children are located at specified positions, so that `TikZ` computes the locations of the other nodes in the tree based on the `level distance` and `sibling distance`? I ask because, ultimately, I have a `matrix of nodes` and would like to grow a tree into the second column's vector from the righthand side. A minimal working example of what I have so far is:               \documentclass{standalone}     \usepackage{tikz}          \usetikzlibrary{positioning,matrix}          \begin{document}          \tikzset{       img/.initial={},       img/.value required,       %       image placeholder/.style={%         execute at end node=\phantom{\pgfuseimage{\pgfkeysvalueof{/tikz/img}}}}     }          \pgfdeclareimage[height=7em]{ballot}{fptp-ballot}          \begin{tikzpicture}[every node/.style={draw=black},                         every matrix/.style={ampersand replacement=\&}]       \matrix (ballot counts)               [matrix of nodes, nodes in empty cells, cells={right},                column 1/.append style={%                  nodes={scale=0.5}, image placeholder, img=ballot}]       {         \& Alice: $0$ \\         \& Bob: $0$ \\         \& Charlie: $0$ \\         \& Dave: $0$ \\       };            \matrix (ballot box)               [node distance=2 and 2, right=of ballot counts,                matrix of nodes, nodes in empty cells,                cells={image placeholder, img=ballot}]       {         \& \\         \& \\       };            \matrix (max tree)               [matrix anchor=west]               at (ballot counts.east)       {         \node {root} [grow=left, level/.style={sibling distance=7em/#1}]           child {node {left}             child {node {}}             child {node {}}}           child {node {right}             child {node {}}             child {node {}}}; \\       };     \end{tikzpicture}          \end{document}      ![minimal working example of progress toward tree growing into matrix](http://i.stack.imgur.com/h9YLZ.png) I would like to modify this diagram so that the leaves of `max tree` attach to the four entries in second column of `ballot counts` (i.e., Alice: 0, ...). In an earlier version of this question, @TomBombadil suggested that I could use `at` to explicitly position the leaves of the tree. The problem with that is that then the interior nodes will also have to be positioned explicitly. I was hoping for some way to leverage `level distance` and `sibling distance`. **Edit:** Based on @percusse's comment that "growing the tree and putting nodes left of each sibling" might be an answer, I came up with the following MWE that does, more or less, what I want. (@percusse: Is this what you were getting at, or were you thinking something different?)               \documentclass{standalone}     \usepackage{tikz}          \usetikzlibrary{calc,positioning,matrix,fit}          \begin{document}          \tikzset{       img/.initial={},       img/.value required,       %       image placeholder/.style={%         execute at end node=\phantom{\pgfuseimage{\pgfkeysvalueof{/tikz/img}}}}     }          \pgfdeclareimage[height=7em]{ballot}{fptp-ballot}          \tikzstyle{ballot count} = [matrix of nodes, nodes in empty cells,                                 right, inner sep=0em,                                 cells={right, inner sep=0.3333em},                                 column 1/.append style={%                                   image placeholder, img=ballot, nodes={scale=0.5}}]          \begin{tikzpicture}[every node/.style={draw},                         every matrix/.style={ampersand replacement=\&}]       % Construct a fake ballot count ``leaf'' to measure its height.       \matrix (tmp) [ballot count, overlay,                       draw=none, nodes={draw=none}]       { \\ };            % Measure the height of the fake ``leaf''.       \path let \p{childheight} = ($(tmp.north)-(tmp.south)$) in         % Use the height to set sibling distance so that         % there is no gap between the leaves of the tree.         [level/.append style={sibling distance=2*\y{childheight}/#1,                               level distance=2cm*#1}]         node {root} [grow=left]           child {node {left}             child [child anchor=east] foreach \name in {Alice, Bob}               {node (\name's count) [matrix, ballot count]                  { \& \name: $0$ \\ }}}           child {node {right}             child [child anchor=east] foreach \name in {Charlie, Dave}               {node (\name's count) [matrix, ballot count]                  { \& \name: $0$ \\ }}};            % Build the bounding box that contains all leaves.       \node (ballot counts)             [inner sep=0em,               fit=(Alice's count) (Bob's count)                  (Charlie's count) (Dave's count)] {};            % Position a matrix to the right of the leaves.       \matrix (ballot box)               [node distance=2 and 2, right=of ballot counts,                matrix of nodes, nodes in empty cells,                cells={image placeholder, img=ballot}]       {         \& \\         \& \\       };     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/gEgZK.png) This approach has several drawbacks:   1. I have to create a fake leaf, named `tmp`, to measure the height of an arbitrary leaf. It would be better if I could somehow measure the height of a leaf and then retroactively pass this height to the `sibling distance` for the tree.   2. Since the leaves are no longer within a matrix, I have to explicitly construct a bounding box in order to position `ballot box` where I want it to be. Also, the code for the leaves is now spread among the two subtrees; this complicates the description of the tree edges and non-leaf nodes, and requires that some of the code is duplicated across subtrees. I guess, in general, the code is not as clean as I would have liked; I'm still hoping that there is a cleaner solution. But perhaps I just need to learn to be less greedy. `:)`


title: Difficulty with \write

text: I have a macro `\Content` wich contains several occurence of a macro `\comm`. The latter increases a counter a displays the value of the counter. Calling `\Content` gives the correct output. But i want to write this `\Content` into a file, and i encounter a problem. I guess, this is because `\write` does not like `\stepcounter`. I would like to understand why, and to find a workaround.               \documentclass{article}          \begin{document}          \newcounter{myCounter}          \newcommand{\comm}{%         \stepcounter{myCounter}%         var\arabic{myCounter} %     }     \def\Content{text \comm text \comm text \comm}          \Content %%%% This works          \newwrite\tempfile     \immediate\openout\tempfile=counter.txt     \immediate\write\tempfile{\Content}     \immediate\closeout\tempfile          \end{document}      PS : by the way, the error message is `Missing \endcsname inserted.` which i don'T really understand... **EDIT1** I formulate more precisely my question : the macro `\Content` is given, and i dont' want to modify it. I just know that it contains many occurences of `\comm`. And i want to write the content of `\COntent` into a file, but replacing each `\comm` by something like `var1`, `var2` which increases with some counter.


title: Table of content with long entry across two pages

text: In my thesis, I have a section with a very long name, which must appear in its entirety in the table of content. The title consists of three lines and, unfortunately, it is split in two different pages. Is there any way to fix this by putting the whole section title in the second page? Thanks!


title: Entry-types in alphadin

text: Is there any documentation of the entry-types in `alphadin.bst`? If not, what's the easiest way to find out, which fields of a given entry-type are available, which are required, which optional and which are ignored?


title: How to typeset superscript IPA characters

text: I'm using TIPA and I'm trying to do something like this:               \textipa{/bI"wIl.d@r.IN/}      Which works, but I want the `@` character to be an upper index. How do I do this? I've tried this               \textipa{/bI"wIl.d}^{\textipa{@}}\textipa{r.IN/}      but it doesn't work. Any ideas?


title: Position two floats on opposing pages

text: I have some big body of text with a figure within it, and another figure that requires a full float page (I use `\begin{figure}[p]`). The two figures relate to one another, and should really be viewed at once. Luckily, the document will be produced double-sided. Can I guarantee that the two floats will face one another (that is be on opposing left- and right- pages) and forbid LaTeX from positioning them back- to-back or even farther apart (so that you annoyingly have to turn a page back and forth to look at both figures)?


title: Vertical space before horizontal line

text: I have defined an `exercise` environment which ends with a horizontal rule. I want to have some vertical space between the end of the environment text and the rule. When I try to insert that, the vertical space ends up **after** (below) the rule instead of **before** it. I have tried both `\medskip` at the beginning of the HorzLine command, and `\vspace{5\bigskipamount}` before the `\HorzLine` at the `exercise` environment, and both don't work. What's going on? Here is some code:               \documentclass[a4paper,10pt]{article}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{color}          \definecolor{orange}{rgb}{1,.549,0}          \newcommand{\HorzLine}{\medskip\noindent\textcolor{orange}{\rule{\textwidth}{5pt}}}          \newenvironment{exercise}     {\noindent\small\textbf{Exercise:}}     {\vspace{5\bigskipamount}\HorzLine}          \begin{document}         \begin{exercise}             \blindtext         \end{exercise}         \blindtext     \end{document}


title: Longtable: Double header caused by a page break in front of the table

text: when i place a longtable at the bottom of the page a page break occurs and the table starts at the next page. This is absolutely correct and the expected behaviour. But instead of the first header i got both headers printed on the next page. I tried to put \nopagebreaks everywhere in my code but it doesn't work. And i didn't found a solution for this. Can't believe that this is the first time this error occurs?! Or maybe i googled for the wrong error description ;) There is a similar Question but the solution doesn't work for me because i don't do the file processing via LyX: Question 149986 Thanks in advance. Martin MWE:               \documentclass{scrartcl}     \usepackage{longtable}          \begin{document}          \section{My awesome section}     \vspace{175mm}     With some really awesome Text ;)     \begin{longtable}{|c|c|c|}       \caption{The first table header}\\ \hline       The & First & Header \\ \hline       \endfirsthead       \caption{The main table header (continued)}\\ \hline       The & Main & Header \\ \hline       \endhead       The & Content & 1 \\ \hline       The & Content & 2 \\ \hline       The & Content & 3 \\ \hline     \end{longtable}          \end{document}      Output at the top of the second page: ![enter image description here](http://i.stack.imgur.com/c2XxW.jpg)


title: Aligning figures in a table

text: I'm trying to align four figures vertically and horizontally. But I couldn't get it right in spite of repeated tweaks. I guess its a fairly small error. Can someone help me out? Here is a MWE -- there are no errors, but the figures don't come out scaled properly.               \documentclass[12pt]{llncs}          \usepackage{fullpage}     \usepackage{graphicx}      \pdfoutput=1     \usepackage{epsf}     \usepackage{epsfig}     \usepackage{epstopdf}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{latexsym}     \usepackage[all]{xy}     %\pagestyle{empty}     \pagestyle{plain}     %\usepackage{algorithmic}     %\usepackage{algorithm}     \usepackage{hyperref}     \usepackage{nameref}     %\usepackage{MnSymbol}     \usepackage{tikz}     \usepackage{caption}     \usepackage{subfig}          \begin{document}          \begin{figure}     \captionsetup[subfigure]{width=2in}     \begin{minipage}[t][4em][s]{.5\textwidth}     \subfloat[First]{     %\begin{subfigure}[b]{\textwidth}     \begin{tikzpicture}[every node/.style={circle, draw, scale=1.0, fill=gray!50}, scale=1.0, rotate = 180, xscale = -1]          \node (1) at (0, 0) {$a$};     \node (2) at (3.0, 0) {$s$};     \node (3) at (4.5, 0) {$s'$};     \node (4) at (7.5, 0) {$t'$};     \node (5) at (9.0, 0) {$t$};     \node (6) at (12.0, 0) {$b$};               \draw[->] (1) -- (2);     \draw[->] (2) -- (3);     \draw[->] (3) -- (4);     \draw[->] (4) -- (5);     %\draw (8) -- (7);     \draw[->] (5) -- (6);          \end{tikzpicture}     %\label{fig:sto}     } %%\qquad     %     %\bigskip     %     \subfloat[Second]{     \label{fig:st}     %\begin{subfgure}[b]{\textwidth}     \begin{tikzpicture}[every node/.style={circle, draw, scale=1.0, fill=gray!50}, scale=1.0, rotate = 180, xscale = -1]          \node (1) at (0, 0) {$a$};     \node (2) at (3.0, 0) {$s$};     \node (3) at (4.5, 0) {$s'$};     \node (4) at (7.5, 0) {$t'$};     \node (5) at (9.0, 0) {$t$};     \node (6) at (12.0, 0) {$b$};               \draw[->] (1) -- (2);     \draw[thick, dashed, ->] (2) to[out=-100,in=-150] (1);     %\draw (3) -- (2);     \draw[->] (3) -- (4);     \draw[thick, dashed, ->] (4) to[out=-100,in=-150] (3);     %\draw (5) -- (4);     \draw[thick, dashed, ->] (2) to[out=-250,in=-350] (4);     \draw[thick, dashed, ->] (3) to[out=100,in=150] (1);         %\draw (8) -- (7);     \draw[->] (5) -- (6);     \draw[thick, dashed, ->] (6) to[out=-100,in=-150] (5);               \end{tikzpicture}     }     \end{minipage}     \begin{minipage}[t][4em][s]{0.5\textwidth}     \subfloat[Third]{     %\begin{subfigure}[b]{\textwidth}     %\centering     \begin{tikzpicture}[every node/.style={circle, draw, scale=1.0, fill=gray!50}, scale=1.0, rotate = 180, xscale = -1]          \node (1) at (0, 0) {$a$};     \node (2) at (3.0, 0) {$t$};     \node (3) at (4.5, 0) {$t'$};     \node (4) at (7.5, 0) {$s'$};     \node (5) at (9.0, 0) {$s$};     \node (6) at (12.0, 0) {$b$};               \draw[->] (1) -- (2);     \draw[->] (2) -- (3);     \draw[->] (3) -- (4);     \draw[->] (4) -- (5);     %\draw (8) -- (7);     \draw[->] (5) -- (6);               \end{tikzpicture}     } %%\qquad     %     \subfloat[Fourth]{     \label{fig:ts}     %\begin{subfigure}     \begin{tikzpicture}[every node/.style={circle, draw, scale=1.0, fill=gray!50}, scale=1.0, rotate = 180, xscale = -1]          \node (1) at (0, 0) {$a$};     \node (2) at (3.0, 0) {$t$};     \node (3) at (4.5, 0) {$t'$};     \node (4) at (7.5, 0) {$s'$};     \node (5) at (9.0, 0) {$s$};     \node (6) at (12.0, 0) {$b$};               \draw[->] (1) -- (2);     \draw[thick, dashed, ->] (4) to[out=-100,in=-150] (1);     %\draw (3) -- (2);     \draw[->] (3) -- (4);     \draw[thick, dashed, ->] (5) to[out=100,in=150] (1);     %\draw (5) -- (4);     \draw[thick, dashed, ->] (2) to[out=100,in=150] (5);     \draw[thick, dashed, ->] (4) to[out=-100,in=-160] (2);       %\draw (8) -- (7);     \draw[->] (5) -- (6);     \draw[thick, dashed, ->] (6) to[out=100,in=150] (3);          \end{tikzpicture}     }     \end{minipage}     \end{figure}     \end{document}


title: Is there an easy way of using line thickness as error indicator in a plot?

text: I have several curves/datasets (obtained from Monte Carlo simulations) with x-dependent y errors I would like to plot with the errors somehow indicated. Since each curve consists of quite a large number of data points with rather small errors, using ordinary errorbars doesn't seem to be the most informative/aestethic solution. Instead, I think it would be nicer to indicate the error by (local) line thickness (or thickness in the y-direction). It could e.g. be done by plotting y(x)+dy(x) and y(x)-dy(x) and fill between the two curves. But how does one do that (in a reasonably easy way - remember: I have several curves!) in Pgfplots? My question is maybe somewhat similar to this one, but I don't know how to do the table manipulations (within Pgfplots) needed in my case. Here's a simplified example of how my datafiles look:               x y dy     0 2 0.1     1 4 0.5     2 3 0.2     3 3 0.3


title: How to plot blurred curves with PGFPlots?

text: I'm trying to replicate the following plot with PGFPlots: ![enter image description here](http://i.stack.imgur.com/VafWc.png) In this answer, the author plays with opacity when drawing overlapping ellipses. Is it possible to use similar code with arbitrary curves? Ideally, the confidence intervals should be specified for every abscissa. Do you have any hint on the software used to generate the plot above? Or any other suggestion (Matplotlib, R, ...)?


title: pgfplots: function with a filled confidence band

text: > **Possible Duplicate:**   >  Is there an easy way of using line thickness as error indicator in a plot? How can I plot a function with a filled confidence band using pgfplots? I have table data in the form (x,y,sigma), where sigma specifies the uncertainty in the y-values (standard deviation). One could plot this as a function with error bars at the data points, but I actually would like to plot this as a function with a filled confidence band. This means, that in the following example code the area between the corresponding -2*sigma and +2*sigma lines should be filled.               \documentclass{article}     \usepackage[T1]{fontenc}      \usepackage[utf8]{inputenc}      \usepackage{pgfplots}     \usepackage{pgfplotstable}     \pgfplotsset{compat=1.3}          \begin{document}          \pgfplotstableread{       x    y    sigma       1.0  1.1  0.09       2.0  0.9  0.07       3.0  1.3  0.08       4.0  1.5  0.09     } \dataA          \pgfplotstableread{       x    y    sigma       1.0  0.3  0.07       2.0  0.4  0.06       3.0  0.3  0.05       4.0  0.3  0.09      } \dataB          \begin{tikzpicture}     \begin{axis}[       ymin = 0.0,       ymax = 2.0,       xlabel = {$x$},       ylabel = {$y$}       ]       \addplot [color=red!40] table[x index=0,y expr=(\thisrow{y} + 2*\thisrow{sigma})] \dataA;       \addplot [color=red!40] table[x index=0,y expr=(\thisrow{y} - 2*\thisrow{sigma})] \dataA;       \addplot [color=red]    table \dataA;            \addplot [color=blue!40] table[x index=0,y expr=(\thisrow{y} + 2*\thisrow{sigma})] \dataB;       \addplot [color=blue!40] table[x index=0,y expr=(\thisrow{y} - 2*\thisrow{sigma})] \dataB;       \addplot [color=blue]    table \dataB;     \end{axis}     \end{tikzpicture}          \end{document}


title: fontspec: \setmainfont problem, bold/italic/bolditalic font error

text: A long time ago i posted about an error I occur when trying to set the mainfont using xelatex and the `fontspec` package, specifically the bold/italic/bolditalic fonts. My previous post from 2011 is posted here: old post Basically it's impossible for me to set the boldfont and bolditalic fonts in this way:               \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{polyglossia}     \setmainlanguage{english}          \setmainfont[Path=C:/fonts/SabonNext/,        BoldItalicFont=SabonNextLT-DemiItalic.otf,        BoltFont      =SabonNextLT-Demi.otf,        ItalicFont    =SabonNextLT-Italic.otf]                      {SabonNextLT-Regular.otf}       The problem is that the main font (`SabonNextLT-Regular.otf`) is recognized, however the bold/bolditalic/italic variants I try to define are not recognized. It gives me three errors of the time: `the key 'fontspec'/BoltFont' is unknown and is being ignored` I'm almost certain that this is a bug in the fontspec package, but could someone be so kind and try to reproduce the error with your font of choice, so I know I'm right?


title: how do I begin with ProTeXt?

text: last night i first downloaded the ProTeXt distribution from http://in.httpd.co/mirrors/ctan/systems/windows/protext/ from this link, i got the 24june, 2014 release, and my installation is also complete. Now how do i begin with a documentation. it says "LaTexMng", what is it? and what accessory files do i needto begin? regards


title: White Box and Relative Positioning

text: I have to make a white box, blank of text, that is 1 by 1 inch and then position it exactly on the right side of the text. Also, I need to make the borders a bit thick.![coding result](http://i.stack.imgur.com/OCGNl.png) How do I do this? My coding is:               \section {Space Filling}     One inch away is a box which measures exactly 1" by 1":     \framebox     { \begin{minipage}{1in}      \hfill\vspace{1in}     \end{minipage} }      It should look like the image shown attached.


title: {(x+y)}^2 or (x+y)^2?

text: This expression is just an example, of course. My question is: should one always specify the quantity being exponentiated by surrounding it with braces, or is it acceptable to drop those braces? (Cases in which `\left(...\right)` are used lie outside the scope of my question.) It seems to me that one should write `{(x+y)}^2` but I do see `(x+y)^2` a lot... ![enter image description here](http://i.stack.imgur.com/TLjmI.png)               \documentclass{article}     \begin{document}     ${(x+y)}^2$ or $(x+y)^2$?     \end{document}


title: How to contain title between 2 lines

text: I'm looking for the effect in the following image. Ive done it by putting 2 images of lines above and beneath the title but that is quite lame, any help would be appreciated. ![enter image description here](http://i.stack.imgur.com/8kqyW.png)


title: Accents generate errors with moderncv class

text: When using accented characters (e.g. ë) I get the following error:               Package inputenc Error: Unicode char \u8:ële not set up for use with LaTeX.      A minimal working example is given below. To the best of my knowledge my .tex file is UTF-8 encoded (I'm using TextMate on OS X and the file command also says it's an UTF-8 file). If I comment out the \moderncvstyle{casual} command, a PDF is generated without errors, but a blank space is printed instead of the ë character. Any suggestions on how to solve this?               % minimal working example          \documentclass[11pt,a4paper,sans]{moderncv}          \moderncvstyle{casual}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[dutch]{babel}          \name{Richard}{Kranendonk}     \title{Curriculum Vitae}     \address{Somestreet 1}{1000 AA Somecity}     \phone[mobile]{01~234~567~89}                         \email{myemail@isp.com}                                     \homepage{http://www.doesnotexist.com}                               \photo[64pt][0.4pt]{Pasfoto_160x213}     \quote{Januari 2014}          \begin{document}          \cventry{1999}{Presentatie vaardigheden, Commerciële vaardigheden, Onderhandelen, Conflicthantering}{Kenneth Smit Communicatie Trainingen}{}{}{}          \end{document}


title: How to decrease space between footnote mark and next text?

text: In Russian typesetting the footnote is usually placed between text & closing punctuation character, like:               this is example\footnote{footnote example}.      But this leads to empty space between the footnote marker and the punctuation character, as you can see on the image: ![Example of space between footnote mark & punctuation](http://i.stack.imgur.com/7dQ4L.png) Is it possible to decrease this space? I've tried following redefinition, but it didn't help:               \let\origfootnote\footnote     \renewcommand{\footnote}[1]{\origfootnote{#1}\hspace{-0.6em}}      Full example:               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage[T2A]{fontenc}     \usepackage[russian]{babel}          \begin{document}     русский текст\footnote{тест}.          \end{document}


title: Compound page numbers with single dash

text: One of my references has page numbers like 12-2, where 12 is the section and 2 the page in this section. I would like to cite this with `citep[12-2]{xy}` but it is converted into a double-dash page range which results in `[1, pp. 12-2`]. Other solutions suggest something like `\citep[12{-}2]` or `\def\nbhyph{-\nobreak} \citep[12\nbhyph 2]` but both these solutions result in `[1, 12-2]` without the "p.". I could fix this by adding the `p.` manually, i.e. `citep[p.~12{-}2]{xy}` but this looks like it breaks the design. Is there a more generic solution to this? MWE:               \documentclass{article}     \usepackage[backend=bibtex, style=ieee, natbib=true]{biblatex}     \begin{filecontents}{bib.bib}     @Book{lamport94,         author = "Leslie Lamport",         title = "LaTeX: A Document Preparation System",         year = 1994     }     \end{filecontents}     \addbibresource{bib}     \begin{document}          single dash \citep[12-2]{lamport94}          \def\nbhyph{-\nobreak}     nbhyph \citep[12\nbhyph 2]{lamport94}          bracelet dash \citep[12{-}2]{lamport94}          bracelet dash with manual "p." \citep[p.~12{-}2]{lamport94}     \end{document}


title: \bgroup and \egroup?

text: So I've been looking to expand on the following bit of code (a hack to not screw up the margins when using oversized figures):               \noindent\makebox[\textwidth]{%     \begin{tabularx}{1.5\textwidth}{XX}       \blindtext & \blindtext     \end{tabularx}     }      I wanted to turn this into an environment, so was thinking of doing the following:               \newenvironment{figurehack}{\noindent\makebox[\textwidth]\bgroup}{\egroup}      This throws a strop, LaTeX decides to insert the "missing" brace. So to see if this was a newenvironment quirk, I tried the following bit of code:               \noindent\makebox[\textwidth]\bgroup%     \begin{tabularx}{1.5\textwidth}{XX}       \blindtext & \blindtext     \end{tabularx}     \egroup      LaTeX once again tries to insert the "missing" brace. Any suggestions how I can resolve this?


title: Why is adding \usepackage{physics} causing an error with \let\left\relax

text: The following small MWE gives an error, TeX Live 2014               \documentclass[]{article}          \usepackage{amsmath}     \usepackage{physics}         \let\left\relax     \let\right\relax          \begin{document}         $\frac{a^2 \left(-\log \left(a^2 \left(\sqrt{\frac{a^2 y(x)}{b^2 x^2}}       +1\right)-\frac{2 a^2 y(x)}{b x^2}\right)-\frac{2 a        \tanh ^{-1}\left(\frac{a^2-4 b \sqrt{\frac{a^2 y(x)}{b^2 x^2}}}       {a \sqrt{a^2+8 b}}\right)}{\sqrt{a^2+8 b}}\right)}{2 b}=       \frac{a^2 \log (x)}{b}+c_1,y(x)$         \end{document}       When commenting off the `physics` package it compiles OK! P.S. I am using the `\let\left\relax` etc. code to help format long expression when I noticed that it gives an error only when I include the physics package.               pdflatex foo.tex     .......     (/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))     ! Missing } inserted.     <inserted text>                      }     l.15   \frac{a^2 \log (x)}{b}                                  +c_1,y(x)$     ?       I have removed the physics package for now. But I am wondering why this happens only with the physics package as I include many other packages without any problem.


title: How to deal with a long subsection title which has formulae

text: I usually use `subsection` environments to write sub questions for a big question. It usually works well as shown in the first example below. However, I encountered an error for the second example below. > Error Message: ! Argument of \@sect has an extra }. I guess the problem is with the formula and the length. Could anyone tell me how to solve this problem, please? Thank you! **Example 1**               \subsection{Proceed with the integration in $L(\mu, \sigma^2_a, \sigma^2)$ to determine the likelihood.}      **Example 2**               \subsection{Show that the log-likelihood for the data can be written as:     \begin{eqnarray*}     \log L &=&  -\frac{N}{2} \log 2 \pi  - \frac{1}{2} m  \log(\sigma^2 + n \sigma^2_a) - \frac{1}{2} (N-m) \log \sigma^2  \\     && - \frac{1}{2 \sigma^2} \sum_i \sum_j  (X_{ij} - \mu)^2 + \frac{\sigma^2_a n^2}{2\sigma^2 (\sigma^2 + n \sigma^2_a)} \sum_i^m (\overline{X}_{i\cdot} - \mu)^2,     \end{eqnarray*}     where $\overline{X}_{i\cdot} = \sum_{j=1}^n \frac{X_{ij}}{n}$.}


title: Indent first paragraph of letters

text: In this thread it is explained that package `indentfirst` interacts with section headings, which a letter does not have. So, how can I get L(u)aTeX to do that, i.e. indent the first paragraph of a letter? Moreover, in my letters _none_ of the paragraphs are getting indented, so I could also use help with that. (It happened in several letters, with different options / packages, so I'm assuming it's supposed to be that way -- and that's why I did _not_ provide a minimal working example). Thanks in advance! EDIT: As requested, here's a minimal example:               \documentclass[a4paper,12pt]{letter}          \usepackage{indentfirst}          \date{February 31, 2013}     \address{ 22nd Baking Street }     \signature{Your Truly's Name}          \begin{document}     \begin{letter}{ R. MaDillo  }     \opening{Dear Dr. R. MaDillo,}      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec bibendum      suscipit odio, id dapibus ipsum placerat vitae. Quisque vitae magna vel ante      semper dapibus sit amet eu elit. Fusce cursus sodales eros, non porta urna      bibendum et.           Vivamus dictum pretium iaculis. Suspendisse eros ligula, laoreet elementum      lobortis vel, blandit tincidunt enim. Aenean eget augue dolor. Sed ut magna      nec nulla euismod pharetra. Proin diam turpis, tincidunt et fermentum id,      porta ut nulla.           \closing{Yours sincerely,}      \end{letter}      \end{document}


title: BibLaTeX Incollection: editors are not shown

text: I'm working on my thesis because I have to hand it in just a few days. As many others I do the bibliography at the last minute. Using Google a lot, I found various code-snippets, which make the bibliography look like I want it. The only problem is, that there are no editors shown in the `incollection` entries. They are replaced by a hyphen or something. Here is what I got so far:               \documentclass[12pt, a4paper, titlepage, fleqn]{scrartcl}          \usepackage{graphicx}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage[babel,german=quotes]{csquotes}          \usepackage{ccaption}     \captionstyle{\raggedright}          \usepackage[printonlyused]{acronym}     \renewcommand{\bflabel}[1]{\normalfont{\normalsize{#1}}\hfill}          \usepackage{setspace}     \onehalfspacing     \emergencystretch 1.5em          \usepackage{geometry}     \geometry{a4paper, top=20mm, left=30mm, right=30mm, bottom=20mm}          %%%%%%%%%%%%%% BIBLATEX %%%%%%%%%%%%%%%%%%%%%%%     \usepackage[     style=authoryear-icomp,      maxbibnames=9,      maxcitenames=2,      uniquelist=false,     backend=biber]{biblatex}           \DeclareFieldFormat{booktitle}{#1\isdot}     \DeclareFieldFormat{journaltitle}{#1\isdot}     \DeclareFieldFormat{issuetitle}{#1\isdot}     \DeclareFieldFormat{maintitle}{#1\isdot}     \DeclareFieldFormat{pages}{#1}     \DeclareFieldFormat{title}{#1\isdot}     \DeclareFieldFormat[article]{title}{#1}     \DeclareFieldFormat[inbook]{title}{#1}     \DeclareFieldFormat[incollection]{title}{#1}     \DeclareFieldFormat[inproceedings]{title}{#1}     \DeclareFieldFormat[patent]{title}{#1}     \DeclareFieldFormat[thesis]{title}{#1}     \DeclareFieldFormat[unpublished]{title}{#1}          \renewcommand*{\UrlFont}{\normalfont}     \renewcommand*\mkbibacro[1]{#1}          \DeclareBibliographyDriver{incollection}{%     \usebibmacro{bibindex}%     \usebibmacro{begentry}%     \usebibmacro{author/translator+others}%     \setunit{\labelnamepunct}\newblock     \usebibmacro{title}%     \printlist{language}%     \usebibmacro{in:}%     \usebibmacro{editor+others}% Herausgeber (Hrsg.) statt hrsg. von Herausgeber     \setunit{\labelnamepunct}\newblock%     \usebibmacro{maintitle+booktitle}%     \newunit\newblock     \printfield{edition}%     \newunit     \iffieldundef{maintitle}     {\printfield{volume}%     \printfield{part}}     {}%     \newunit     \printfield{volumes}%     \newunit\newblock     \usebibmacro{series+number}%     \newunit\newblock     \printfield{note}%     \newunit\newblock     \usebibmacro{publisher+location+date}%     \newunit\newblock     \usebibmacro{chapter+pages}%     \newunit\newblock     \iftoggle{bbx:isbn}     {\printfield{isbn}}     {}%     \newunit\newblock     \usebibmacro{doi+eprint+url}%     \newunit\newblock     \usebibmacro{addendum+pubstate}%     \setunit{\bibpagerefpunct}\newblock     \usebibmacro{pageref}%     \usebibmacro{finentry}}                %\DeclareNameAlias{sortname}{last-first}     \DefineBibliographyStrings{ngerman}{andothers={et \addabbrvspace al \adddot}}           %Blockzitat     \usepackage{setspace}     \renewenvironment{quote}     {\list{}{\rightmargin\leftmargin\singlespacing\footnotesize}%     \item\relax}     {\endlist}           \addbibresource{Bibliographie.bib}     \newcommand*\dummy[1]{}          \begin{document}          \nocite{*}     \printbibliography          \end{document}      And this is one of my bibliography entries ... for testing.               @INCOLLECTION{ang2006,     author = {Ien Ang},     year = {2006},     title = {Radikaler Kontextualismus und Ethnografie in der Rezeptionsforschung.},     editor = {Andreas Hepp and Rainer Winter},     booktitle = {Kultur – Medien – Macht.},     location = {Wiesbaden},     publisher = {VS Verlag für Sozialwissenschaften.},     pages = {61-79},     owner = {SpecialGuest},     timestamp = {2012.11.12}     }      I really would appreciate any help on that. EDIT: Run the script with the following bib-file entries, and you will be able to reproduce the behaviour:               @INCOLLECTION{ang2006,     author = {Ien Ang},     year = {2006},     title = {Radikaler Kontextualismus und Ethnografie in der Rezeptionsforschung.},     editor = {Andreas Hepp and Rainer Winter},     booktitle = {Kultur – Medien – Macht.},     location = {Wiesbaden},     publisher = {VS Verlag für Sozialwissenschaften},     pages = {61-79},     owner = {SpecialGuest},     timestamp = {2012.11.12}     }          @INCOLLECTION{grossberg2006,     author = {Lawrence Grossberg},     year = {2006},     title = {Der Cross Road Blues der Cultural Studies.},     editor = {Andreas Hepp and Rainer Winter},     booktitle = {Kultur - Medien - Macht. Cultural Studies und Medienanalyse. 3.,     berarbeitete und erweiterte Auflage.},     location = {Wiesbaden},     publisher = {VS Verlag für Sozialwissenschaften},     pages = {23-40},     owner = {SpecialGuest},     timestamp = {2012.10.04}     }          @INCOLLECTION{grossberg1999,     author = {Lawrence Grossberg},     year = {1999},     title = {Was sind Cultural Studies?},     editor = {Karl H. Hörning and Rainer Winter},     booktitle = {Widerspenstige Kulturen. Cultural Studies als Herausforderung.},     location = {Frankfurt a. M.},     publisher = {Suhrkamp},     pages = {43-83},     owner = {SpecialGuest},     timestamp = {2012.10.04}     }      The editors are only shown in the Ang (2006) entry. In the other entries they are replaced by the - singn. I don't understand why BibLaTex behaves like that, but I have to turn in my thesis in just a few days. Please ... if anyone could help me on that.


title: Tikz on TexMaths/LibreOffice

text: I put the following into TexMaths in LibreOffice               \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \tikz \draw (0,0) circle (10pt);     \end{tikzpicture}     \end{document}      and was complained of               C:\..\latex\pgf\frontendlayer\tikz.sty     !Missing $inserted.     <inserted text>               $     1.9      Before this, I have tested that the TexMaths is working fine on simple LaTex commands. Any idea? Thanks help.


title: Big vertices on my cube kill parallelism

text: I have coded the following diagram in `xypic`:               \xymatrix{      & B \ar[rr] \ar'[d][dd]^(.45)\simeq && B\cup_A C \ar@{.>}[dd]^-\simeq \\     A \ar@{>->}[ru] \ar[rr] \ar[dd]_-\simeq && C \ar@{>->}[ru] \ar[dd]^(.68)\simeq & \\     & B' \ar'[r][rr] && B'\cup_{A'}C' \\ A' \ar@{>->}[ru] \ar[rr] && C' \ar@{>->}[ru] &     }      It renders like this: ![enter image description here](http://i.stack.imgur.com/aoNcW.png) If you are subconsciously symmetry-obsessed like many human beings are (including myself), you will have noticed that the diagonal arrows which are supposed to be parallel, aren't really. This is a side effect of having vertices with different lengths. Is there an automatic fix to this, some command that prioritizes parallelism over placing the arrows tip/end most centered on the objects? If not, how can I fix this manually for this particular diagram?


title: Inkscape text size, change of reference text

text: I have a question similar to Text size in inkscape. I use inkscape to generate my figure for latex, that are resized with               \def\svgwidth      while text size remains the same, there is a way to scale all the text (and maintaining the relative differences between normal size, `\tiny` size, etc.) in a single figure? e.g.               \begin{figure}         \centering         \def\svgwidth{\figsize}         \def\svgtextsize{\textsize}%I would like to have it!         \includesvg{myfigure}         \caption{...}         \label{fig:myfig}     \end{figure}      this would allow to shrink the character size by the same amount in all the figures, independently by the scaling of each figures, as i was doing with the psfrag.


title: How do I typeset unicode characters with TexShop?

text: I've tried pasting "圍棋 (wéiqí)" into my editor, but after typesetting I see only "?? (wiq)" in the PDF. What do I need to change to fix these characters?


title: How to right-align any line or word in a paragraph in any documentclass?

text: I have done some search for margin alignment in Latex but cannot find how can I right-align any single line? For example, in a letter sometimes we put a Sincerely on the right. But without using specific documentclass, how can I align any single line in a paragraph to the right in any documentclass? Many thanks for the help!


title: How can I left-align the table in pdfLaTeX in TeX Live?

text: I have these two TeX files:               \documentclass[a3paper,landscape]{article}          \usepackage{array}     \usepackage{tabularx}     \usepackage{longtable}     \usepackage{ltxtable}          \begin{document}     Hello.          \LTXtable{\textwidth}{mytable}          \end{document}        and the other file autogenerates the data:               \begin{longtable}{|X|X|X|X|X|X|X|X|X|}     \caption{A very long table}\\         \hline         {% for col in head %}             \textbf{ {{col | escapeTEXT}} }             {% if not forloop.last %}                &             {% endif %}         {% endfor %}          \\         \hline                   {% for row in table %}             {% for cell in row %}                 {{ cell | escapeTEXT}}                 {% if not forloop.last %}                     &                 {% endif %}             {% endfor %}             \\             \hline         {% endfor %}         \hline          \label{tab:LongtableOne}     \end{longtable}      This creates the table in the center which is making the columns less wide. How can I left-align the table?   1. Also, I have to hard-code the columns like this: `{|X|X|X|X|X|X|X|X|X|}`. **Is it possible to make that dynamic, like in a loop?**


title: Problems with xindy and glossaries

text: I'm having a bit of a problem creating a glossary. I'm working with a MacBook using Mountain Lion OS 10.8.3, I've installed MacTeX 2012 and details about `xindy` are:               xindy release: 2.4     xindy script version: 1.16     xindy kernel version: 3.0     CLISP version 2.48 (2009-07-28) (built on richard-kochs-computer.local [10.0.1.2])     architecture: X86_64      When I try to run this programme               \documentclass[10pt,twoside,a4paper,fleqn]{book}     \usepackage[utf8]{inputenc}     \usepackage{ifthen, xkeyval, xfor, amsgen}     \usepackage[xindy]{glossaries}     \usepackage{translator}     \makeglossaries          \begin{document}          \newglossaryentry{real number}     {         name={real number},         description={include both rational numbers and irrational numbers},         symbol={\ensuremath{\mathbb{R}}}     }          \newglossaryentry{Agypten}     {     name = {{Ä}gypten}     description = {German:Egypt}     }          \chapter{Model chapter for a report}          This is the first chapter of the report. Most certainly it will have         some \glspl{real number}. Maybe there will be         something in German, like \gls{Agypten}          \printglossary          \end{document}      Now when I run `makeindex` in the terminal like this:               pdflatex document     makeindex document.glo -s document.ist -t document.glg -o document.gls     pdflatex document      it would work if I hadn't used Umlauts. Considering my Bachelor's thesis will most certainly be in German that would be rather suboptimal. Upon finding out that `xindy` works multilinguallx, I tried that as well:               pdflatex test     xindy -L german -I xindy -M test -t test.glg -o test.gls test.glo     pdflatex test      For which I receive:               Cannot locate xindy module for language german.      Well considering I can locate that module I thought I might tell her where it is, but unfortunately I couldn't find out how. The other way would be copying that module in a directory `xindy` is using to find the modules but I couldn't figure that out either. Of course I also tried the simple version:               makeglossaries test      Where the output was:               No \@istfilename found in 'test.aux'.     Did your LaTeX run fail?     Did your LaTeX run produce any output?     Did you remember to use \makeglossaries?       Funny thing is: A couple of lines above that statement I saw this:               \@istfilename{test.xdy}      But when I looked into `test.aux`, it wasn't there. When I put it there and ran the command again there was simply no compiler output, which was probably because of `xindy` I guess. I hope someone of you can help me with that.


title: How to eliminate spacing in tikzpicture?

text: It seems that, when using `Tikz`, nodes and/or the `tikzpicture` environment add space around a drawing. An example is shown in the following MWE, where a simple square is drawn three times. First it is drawn in just a single `tikzpicture`, then in a nested `tikzpicture`, and finally in a nested `tikzpicture` with the `inner sep` adjusted. This last image makes me suspect there are some widths that need to be set to zero.               \documentclass[tikz]{standalone}     \standaloneenv{tikzpicture} % New page for every image     % The code for the square     \newcommand\Square[1][]{         \begin{tikzpicture}[#1]             \draw (0,0)--(1,0)--(1,1)--(0,1)--cycle;         \end{tikzpicture}         }     \begin{document}     % Image with correct cropping     \Square[x=1.5cm,y=1.5cm]     % Image with a lot of space     \begin{tikzpicture}         \node at (0,0){             \Square[x=1.5cm,y=1.5cm]             };     \end{tikzpicture}     % Image with some cropping     \begin{tikzpicture}         \node[inner sep=0pt] at (0,0){             \Square[x=1.5cm,y=1.5cm]             };     \end{tikzpicture}     \end{document}      The three output images (or pages) are the following. ![enter image description here](http://i.stack.imgur.com/na4aP.png) How does one eliminate this spacing? Nesting these environments is necessary for the specific problem I'm working on, and `\includegraphics[clip]{}` doesn't work in combination with `\standaloneenv{tikzpicture}` (which was tried just in case the `standalone` failed at cropping).


title: Multiple arrows between nodes

text: This is my code:               \documentclass[a4paper,10pt]{article}     %\documentclass[a4paper,10pt]{scrartcl}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows,fit,calc,positioning,automata}          \usepackage[utf8x]{inputenc}          \title{}     \author{}     \date{}                    \begin{document}     \maketitle          \begin{figure*}     \centering          \begin{tikzpicture}[scale=0.7,transform shape]            \tikzset{input/.style={}} % <= this can be avoided but then use simply \node[name=input]{};       \tikzset{block/.style={rectangle,draw}}       \tikzstyle{pinstyle} = [pin edge={to-,thick,black}]            \node [input, name=input] {};       \node [block, rounded corners, right=0.5cm of input,minimum width=2.4cm, minimum height=2cm] (a) {E};       \node [block, right = 1 cm of a,minimum width=3cm, minimum height=4cm] (b) {B};     \node [block, right = 2.5 cm of b,minimum width=1.75cm, minimum height=2cm,align=center] (c) {$1$};     \node [block, right = 2.5 cm of c,minimum width=1.75cm, minimum height=2cm,align=center] (d) {$2$};     \node [block, right = 2.5 cm of d,minimum width=1.75cm, minimum height=2cm,align=center] (e) {$k$};            \node [below =0.25cm of b] (output1) {$R$};               \begin{scope}[->,>=latex]          \draw[->] (input) node[left]{{M}} -- (a);                    \foreach \i [count=\xi from 0] in {2,...,-2}{%       \draw[->] ([yshift=\i * 0.4 cm]a.east) -- ([yshift=\i * 0.8 cm]b.west) node[right] (o\xi) {} ;}               \node [right =0.01mm of o0] (d0) {$x_0$};     \node [right =0.01mm of o1] (d1) {$x_1$};     \node [right =0.01mm of o2] (d2) {$x_2$};     \node [right =0.01mm of o3] (d3) {$\vdots$};     \node [right =0.01mm of o4] (d4) {$x_k$};               \foreach \i [count=\xi from 0] in {2,...,-2}{%       \draw[] ([yshift=\i * 0.8 cm]b.east) node[left]{$x_{\xi}$} -- ([yshift=\i * 0.8 cm]c.west) ;}          \end{scope}     \end{tikzpicture}          \caption{x}     \label{fig:bounded-sender}     \end{figure*}               \end{document}      This is the output: ![enter image description here](http://i.stack.imgur.com/f8oTV.png) I want to draw something like this: ![enter image description here](http://i.stack.imgur.com/gGNKk.png) How to draw rest of the arrows?


title: How to create syntactic trees and align them in LaTeX?

text: I want to create syntactic trees and align them in LaTeX as in the picture below. ![enter image description here](http://i.stack.imgur.com/TGqlq.png) Can you help me?


title: Automatically created Sub-folder

text: I've problem for days but I can't find the solution After compiling, the DVI file couldn't opened. a folder named BUILD auto created on the same directory, it contains all the other files like .aux, .dvi, ... here is the message: No such file or directory This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (http://www.radicaleye.com) dvips: DVI file can't be opened: Process exited with error(s) When opening this BUILD folder, of course I can open the dvi, pdf file... (the tex.file hasn't errors) I tried to reinstall the latest version of MiKTeX and TeXmaker, GS, GSview, and the problem isn't fixed. How to make it back normal (DVI, PS, PDF, ... shown in the same folder), please? (I'm using MiKTeX version 2.9)


title: Bibliography formatting

text: All, I have:               \documentclass[11pt]{article}     \usepackage{geometry}     \usepackage{hyperref}          \begin{document}          Now is the time.          \begin{thebibliography}{99}     \bibitem{kn:gnus} David Arnold. {\em Writing Scientific Papers in \LaTeX.} December 31, 2008.     \url{http://msemac.redwoods.edu/~darnold/math55/WritingScientificPapers/project_latex.pdf}     \end{thebibliography}          \end{document}      Couple of questions. How can I turn off the blue highlighting around the url? And, any suggestions for better formatting this reference bibitem? Thanks.


title: Creating a triangular table

text: Is there a way to create something that looks like this? ![enter image description here](http://i.stack.imgur.com/pveH6.jpg) I have looked at the `\rotatebox` command, but that will not get the same "jagged" edges on the bottom, and looked at How to draw a diagonally-split grid with TikZ? which seems applicable (especially in conjunction with the `\rotatebox`). I was able to make this: ![enter image description here](http://i.stack.imgur.com/dRpIk.jpg) With code adapted from the link, but I have no idea how to customize it.               \documentclass[12pt]{article}     \usepackage[english]{babel}     \usepackage{amsfonts}     \usepackage{tikz}     \usepackage{rotating}     \usetikzlibrary{calc,decorations.shapes}     \tikzset{       decorate with/.style args={#1 separated by #2}{         fill,         decorate,decoration={shape backgrounds,shape=#1,shape size=1.5mm,         shape sep={#2, between borders}}       }     }          \pgfkeys{/tikz/.cd,        num quad/.initial=5,        num quad/.get=\numquad,        num quad/.store in=\numquad,     }          \begin{document}          \usetikzlibrary{calc,decorations.shapes}     \rotatebox{315}{\begin{tikzpicture}[x=0.5025cm,y=0.5025cm,line cap=round]         \foreach \x [count=\xi] in {1,...,\numquad}{           \foreach \y [count=\yi] in {\x,...,\numquad}{             \node [draw, minimum size=0.5cm,outer sep=0pt,inner sep=0pt] (u-\xi\yi) at (\xi,-\yi) {};           }         }         \end{tikzpicture}     }     \end{document}


title: TeXStudio does not load dictionary files

text: I have the following problem with TeXStudio. I have several dictionaries installed in the correct directory but the program does not recognize them. Actually the list of dictionaries that appears under the default tab in the general preferences is always empty. I tried to change the directory with no success. I am running TeXStudio with Mac OS X. Any suggestion?


title: TikZ – How to create nodes

text: Based on one of the example posted How to create new table environment, I modified to my needs,               \documentclass{article}     \makeatletter     \usepackage[labelformat=empty]{caption}     \usepackage{tikz}     \usetikzlibrary{positioning,shapes,shadows,arrows}     \usetikzlibrary{fit,shapes.geometric}     \newcounter{nodemarkers}     \newcommand\circletext[1]{%         \tikz[overlay,remember picture]              \node (marker-\arabic{nodemarkers}-a) at (0,1.5ex) {};%         #1%         \tikz[overlay,remember picture]             \node (marker-\arabic{nodemarkers}-b) at (0,0){};%         \tikz[overlay,remember picture,inner sep=2pt]             \node[draw,ellipse,fit=(marker-\arabic{nodemarkers}-a.center) (marker-\arabic{nodemarkers}-b.center)] {};%         \stepcounter{nodemarkers}%     }     \newcommand{\nl}{\newline}          \newcounter{nodecount}     \newcommand\tabnode[1]{\addtocounter{nodecount}{1} \tikz \node (\arabic{nodecount}) {#1};}     \tikzstyle{every picture}+=[remember picture,baseline]     \tikzstyle{every node}+=[inner sep=0pt,anchor=base,     minimum width=1cm,align=center,text depth=0.5ex,outer sep=1pt]     \tikzstyle{every path}+=[thick, rounded corners]          \begin{document}     \def\starttable#1{%       \renewcommand{\arraystretch}{1.1}%       \minipage{0.45\textwidth}           \captionof{table}{#1}           \tabular{p{1cm}p{1cm}p{1cm}p{1cm}}     }      \def\stoptable{%     \endtabular        \endminipage\hspace{30pt}}     \def\R #1|#2|#3|#4{ #1&#2&#3&#4}          \newpage     \begin{table}[h]     \centering     \starttable{}      \R test \nl text1 \nl text2|test|test|test\\      \R test|test|test|test\\      \R test|test|test|test\\     \stoptable     %     \starttable{}      \R \tabnode{test \nl text3 \nl text4}|test|test|test\\      \R test|test|test|test\\      \R test|test|test|test\\     \stoptable     \end{table}          \begin{tikzpicture}[overlay]     \draw [red] (1.west) -- (1.north west) -- (1.north east) -- (1.south east) -- (1.south west) -- cycle;     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/KOtaN.jpg)


title: How to set equation numbers in lining numerals?

text: I'm using XeLaTeX with Linux Libertine (using fontspec) and oldstyle numbers. I'd like, however, to set equation numbers (using `amsmath`'s `\eqref`) in lining numbers. This does not work:               \renewcommand{\eqref}[1]{\textup{\Lpnum{\tagform@{\ref{#1}}}}}     \def\Lpnum#1{{\addfontfeatures{RawFeature=+lnum;+pnum;-tnum;-onum}#1}}      In other circumstances, the `\Lpnum` macro does work. Any ideas?


title: Error in tabular code generated from Excel2LaTeX

text: I used Excel2LaTeX to create a table in LaTeX and here is the code that gives me an error.               % Table generated by Excel2LaTeX from sheet 'Sheet1'     \begin{table}[htbp]       \centering       \caption{Add caption}         \begin{tabular}{rrrrr}         \toprule               &       & Start date & End date & Days spent \\         \midrule         \multicolumn{1}{c}{\multirow{6}[12]{*}{\textbf{Background research}}} & Research which existing technologies exist for recommendation systems & 06/10/2011 & 10/10/2011 & \multicolumn{1}{c}{\multirow{6}[12]{*}{22}} \\         \multicolumn{1}{c}{} & Investigate the problems being face by the current recommender systems & 11/10/2011 & 15/10/2011 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Learn what Semantic Web is and how the it is being implemented to solve problems & 16/10/2011 & 20/10/2011 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Investigate how semantic web is being used for recommendation systems & 16/10/2011 & 20/10/2011 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Read research papers on to find out more on work about music recommendation that has already been done in the past & 21/10/2011 & 27/10/2011 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Deliverable: Write a literature survey to summarize research findings & 21/10/2011 & 28/10/2011 & \multicolumn{1}{c}{} \\         \multicolumn{5}{r}{}                  & \\         \multicolumn{1}{c}{\multirow{4}[8]{*}{\textbf{Analysis \& Design}}} & Create a structured list of requirements from the problem statement & 29/10/2011 & 04/11/2011 & \multicolumn{1}{c}{\multirow{2}[4]{*}{6}} \\         \multicolumn{1}{c}{} & Deliverable produced: Create a structured list of requirements from the problem statement & 29/10/2011 & 04/11/2011 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Begin prototyping and experimenting with Semantic Web & 05/11/2011 & 09/12/2011 & \multicolumn{1}{c}{\multirow{2}[4]{*}{34}} \\         \multicolumn{1}{c}{} & Deliverable produced: A basic prototype of the recommender system & 05/11/2011 & 09/12/2011 & \multicolumn{1}{c}{} \\         \multicolumn{5}{r}{}                  & \\         \multicolumn{1}{c}{\multirow{21}[42]{*}{\textbf{Implementation}}} & \textbf{Iteration 1  - Implementing and testing core functionality of the website} &       &       &  \\         \multicolumn{1}{c}{} & Let users register with the website & 10/12/2011 & 16/12/2011 & \multicolumn{1}{c}{\multirow{7}[14]{*}{34}} \\         \multicolumn{1}{c}{} & Simulate users listening to songs/albums & 10/12/2011 & 16/12/2011 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Enable searching for music and playlists in the website & 17/12/2011 & 23/12/2011 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Let users create playlists and add/remove songs to them & 24/12/2011 & 30/12/2011 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Users can integrate with Facebook and find friends that are also registered on the website & 31/12/2011 & 06/01/2012 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Users can comment on a playlist and Like a playlist & 07/01/2012 & 13/01/2012 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Deliverable produced: The first iteration of the website without a recommendation system & 10/12/2011 & 13/01/2012 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & \multicolumn{4}{r}{}          & \\         \multicolumn{1}{c}{} & \textbf{Iteration 2 - Implemented and testing core functionality of the algorithm} &       &       &  \\         \multicolumn{1}{c}{} & Integrate Semantic Web so that recommendation algorithm can be implemented & 14/01/2012 & 20/01/2012 & \multicolumn{1}{c}{\multirow{5}[10]{*}{27}} \\         \multicolumn{1}{c}{} & The website shall allow users to get music recommendations based on the friend’s taste & 21/01/2012 & 03/02/2012 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & The website shall allow users to get music recommendations based on the user’s taste & 21/01/2012 & 10/02/2012 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Deliverables produced: Algorithm for music recommendation & 14/01/2012 & 10/02/2012 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Second iteration of the website with core functionality in place & 14/01/2012 & 10/02/2012 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & \multicolumn{4}{r}{}          & \\         \multicolumn{1}{c}{} & \textbf{Iteration 3 - Adding additional features (Could have's and Wont have's in the requirements)} &       &       &  \\         \multicolumn{1}{c}{} & Carry out the finishing touches of the website & 11/02/2012 & 24/02/2012 & \multicolumn{1}{c}{\multirow{4}[8]{*}{13}} \\         \multicolumn{1}{c}{} & View a feed which lets them find out what their friends are doing on the site through likes and comments & 11/02/2012 & 17/02/2012 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Allow users to subscribe to a playlist & 18/02/2012 & 24/02/2012 & \multicolumn{1}{c}{} \\         \multicolumn{1}{c}{} & Deliverable: Final version of the website with added features & 11/02/2012 & 24/02/2012 & \multicolumn{1}{c}{} \\         \multicolumn{5}{r}{}                  & \\         \multicolumn{1}{c}{\multirow{2}[3]{*}{\textbf{Documentation}}} & Begin the final report & 25/02/2012 & 30/03/2012 & \multicolumn{1}{c}{\multirow{2}[3]{*}{34}} \\         \multicolumn{1}{c}{} & Deliverable: Final report with explaining all stages of the software development cycle & 25/02/2012 & 30/03/2012 & \multicolumn{1}{c}{} \\         \bottomrule         \end{tabular}%       \label{tab:addlabel}%     \end{table}%      The error I'm getting is this               ! Extra alignment tab has been changed to \cr.     <template> \endtemplate     l.692 \multicolumn{5}{r}{} &     \\     You have given more \span or & marks than there were     in the preamble to the \halign or \valign now in progress.     So I'll assume that you meant to type \cr instead.      Anybody know what's going on?