title: Marginnote with geometry package

text: In my document i'm using the packages _geometry_ and _marginnote_. The problem ist the following: If I use a newgeometry, the marginnote will stay on odd pages at same horizontaly position as by the original geometry. The following minimal example should give the bad output:               \documentclass{memoir}     \usepackage{marginnote}          \usepackage{geometry}     \geometry{twoside,paperwidth=210mm, paperheight=297mm, top=35mm,     bottom=40mm, left=35mm, right=50mm, marginparsep=3mm,  marginparwidth=40mm}     \savegeometry{inhalt}          \begin{document}          %first page     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy     eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam     voluptua.%     \marginnote{     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy     eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam     voluptua.%     }          %second page     \clearpage     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy     eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam     voluptua.%     \marginnote{     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy     eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam     voluptua.%     }          %third page     %right margin will set on 90 mm     \newgeometry{top=35mm,  bottom=40mm, left=35mm, right=90mm,     marginparsep=3mm,  marginparwidth=40mm}          Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy     eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam     voluptua.%     \marginnote{     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy     eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam     voluptua.%     }          %fourth page     \clearpage     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy     eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam     voluptua.%     \marginnote{     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy     eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam     voluptua.%     }          \end{document}


title: newline and italics added with \leq

text: Newbie question: Within the body of the text that I've inserted into a Journal's Latex Template, I don't understand why I get a newline and italicized font when I add the command \leq to generate "less than or equal to"... Below is (1) the Journal's template preamble and (2) my text in the body of the document. I'm using MacText/TexShop on MacOSx10.6 (1) PREAMBLE               \NeedsTeXFormat{LaTeX2e}[1995/12/01]     \documentclass[10pt]{bmc_article}              % Load packages     \usepackage{cite} % Make references as [1-4], not [1,2,3,4]     \usepackage{url}  % Formatting web addresses       \usepackage{ifthen}  % Conditional      \usepackage{multicol}   %Columns     \usepackage[utf8]{inputenc} %unicode support     %\usepackage[applemac]{inputenc} %applemac support if unicode package fails     %\usepackage[latin1]{inputenc} %UNIX support if unicode package fails     \usepackage{times} %so today's date appears on each version     \urlstyle{rm}          \def\includegraphic{}     \def\includegraphics{}          \setlength{\topmargin}{0.0cm}     \setlength{\textheight}{21.5cm}     \setlength{\oddsidemargin}{0cm}      \setlength{\textwidth}{16.5cm}     \setlength{\columnsep}{0.6cm}          \newboolean{publ}      (2) IN THE BODY OF THE DOCUMENT .tex               coefficients kappa: \leq 0.4 poor to fair; 0.6 moderate agreement.      in Typeset: this pdf reads > coefficients kappa: > > <={italics}0.4poortofair;0.6moderateagreement


title: Polygons being clipped during pst-solides3d projections

text: I'm having trouble doing something that seems very simple, so I'm hoping that I've made a naive mistake. I'm attempting to project several polygons onto a plane using the \psProjection feature in pst-solides3d. My polygons project nicely as long as the plane's normal is facing down the x axis. As the plane tilts back (rotating about the y), at first things are fine. However, once the plane tilts back enough my polygon starts getting clipped and disappears from the top down. By the time the plane is tilted totally back, with normal pointing up the z axis, the image has completely disappeared from the plane. Am I misunderstanding something about the way these projections are supposed to work? My ultimate goal is to have 3 planes like this one, each with an image, and have them intersect to illustrate an algorithm I'm working on. If pstricks isn't the ideal way to do this, I'd appreciate other suggestions.               \documentclass{article}     \usepackage{pstricks}     \usepackage{pst-solides3d}          \begin{document}          \begin{pspicture}(0,0)(5,5)         \psset{viewpoint=30 0 30 rtp2xyz,Decran=60,lightsrc=viewpoint}         \psset{solidmemory}         % Set normal in plane to [0.25 0 1 0] to reproduce         \psSolid[object=plan,name=pp1,definition=equation,args={[1 0 0 0] 90}]         \psset{plan=pp1}     \psProjection[object=polygone,fillstyle=solid,fillcolor=yellow,plan=pp1,args=-1 -0.5 1 -0.5 1 0.5 -1 0.5]     \psProjection[object=polygone,fillstyle=solid,fillcolor=yellow,plan=pp1,args=-1 0.5 0 1.5 1 0.5]     \psProjection[object=polygone,fillstyle=solid,fillcolor=yellow,plan=pp1,args=-0.25 -0.5 0.25 -0.5 0.25 0.25 -0.25 0.25]     \composeSolid     \end{pspicture}     \end{document}      ![Plane normal down x axis, image correct](http://i.stack.imgur.com/HISlp.png) ![Plane normal at 0.75 0 1, image starting to get clipped](http://i.stack.imgur.com/ITh0Z.png) ![Plane normal at 0.25 0 1, image clipped even more](http://i.stack.imgur.com/StFus.png)


title: ConTeXt equivalent of LaTeX samepage

text: > **Possible Duplicate:**   >  What is the proper way to prevent text from splitting across columns and > pages? I'd be surprised if this has not been asked a zillion times before, but really I couldn't find it (tried `[context] "no page break"`, `[context] "preventing page breaks`, `[context] same page`, etc - to no avail). So with some trepidation, here is my question: Is there a ConTeXt equivalent of LaTeX's `samepage` environment? Or another way to prevent page breaks? I understand that `\page[no]` prevents breaks at specific positions, but what I am after is something like `\startsamepage` ... `\stopsamepage`, if it exists at all. ThanksI


title: How to detect that some macro expands to empty string or spaces only?

text: I need to check several macros and do some actions only if their expansion is not empty nor space only. In pseudo code I would look like this               \if\macroToBeTested         \doSomething         \doSomethingElse     \fi      macros `\doSomething` and `\doSomethingElse` should only execute if `\macroToBeTested` expands to something that contains at least one character which is not space. How can I implement that? I prefer using something like this               \if\test{\macroToBeTested}%       \doSomething%       \doSomethingElse%     \fi      rather then anything like this               \test{\macroToBeTested}{%       \doSomething%       \doSomethingElse%     }      * * * ## EDIT Here is example (pseudocode)               \newcommand{\macroToBeTested}{   }%     Hello%     \if\test{\macro}%       World!%     \fi      This would print only "Hello", while this               \newcommand{\macroToBeTested}{  s }%     Hello%     \if\test{\macro}%       World!%     \fi      should print "Hello World!".


title: Type multiline equation in a table in LaTeX

text: Who knows the way to write a `multiline` equation in a table? I am using the code below:               \begin{table}      \centering      \begin{tabular}{|c| c| c|}     \hline %inserts horizontal line          &f1& f2 \\ [0.5ex]      \hline      a& b& c\\ \hline      d& e & f  \hline      \end{tabular}     \label{label 1}     \end{table}      But `b` and `e` are two or maybe three line equations. How can I write them in my table?


title: Spacing issue in math environment with xeCJK package

text: I didn't notice until today that use `\(...\)` and `$...$` with `xeCJK` (or`ctex`) will produce different results, see the code:               \documentclass{article}     \usepackage{xeCJK}     \setCJKmainfont{SimSun}          \begin{document}          甲\(e^{i\pi}+1=0\)甲          乙$e^{i\pi}+1=0$乙          \end{document}      that gives ![enter image description here](http://i.stack.imgur.com/RWVdI.png) Notice the missing space in front of the first equation. Though it can be manually fixed, I tried adding               \renewcommand{\CJKecglue}{\ }      but this command seems affect only `$...$` environment. I want to know if this is intentional or not; if not, how to fix it? More fundamentally, why is `\(...\)` being treated differently than `$...$`?


title: CMYK ConTeXt colors in TikZ

text: Colors defined via the internal `\definecolor` macro in ConTeXt cannot be used in TikZ when the CMYK system is used. Is there a way to convert them or tick a setting so that TikZ can use them? ## Minimal example:               \usemodule[tikz]     \definecolor[c][c=1]     \starttext     \tikz\node[c]{t};     \stoptext      **Expected:** cyan “t”   **Received:** black “t” and `Package pgf: Error! Color c has an unsupported color model..` * * * **Edit:** TikZ does use ConTeXt colors defined with the RGB color model:               \definecolor[r][r=1]     \tikz\node[r]{t};      This gives me a red “t” as expected. So I don’t want to know how to define colors explicitly for use in TikZ, but what code I have to add somewhere add to make the two lines`\definecolor[c][c=1]` and `\tikz\node[c]{t};` from the minimal example work together.


title: Linebreak before URL with biblatex/alphabetic

text: Using biblatex with alphabetic style, **how could I insert a line break** (\\\ or \linebreak) **before the URL output** (with the aim to have less linebreaks within URL)? (I use url and hyperref) * * * Slightly enhancing @Marco's original answer: If it should be totally like in the original but with a line break, use               \DeclareFieldFormat{url}{\newline\mkbibacro{URL}\addcolon\space\url{#1}}     \newbibmacro*{url+urldate}{%      \printfield[url]{url}%         \iffieldundef{urlyear}           {}           {\setunit*{\addspace}%            \printtext[urldate]{\printurldate}}}


title: How do I combine fonts for different scripts?

text: I want to combine Helvetica World (for roman, cyrillic, greek and arabic) and Hei Std (for simplified chinese) in one document with LuaLaTeX. Hei Std probably hasn't all the glyphs from Helvetica World and Helvetica World certainly hasn't all characters from Hei Std. Can I get LuaLaTeX to automatically choose the right font based on the input, i.e. can I combine fonts into one "virtual font"? I don't want to switch the fonts manually. Out of curiosity I'm also interested in a solution for XeLaTeX, but I _need_ one for LuaLaTeX.


title: How to color delimiters

text: I have some special delimiters that I want to add to a glossary, those get hyperlinks and colors etc. However when i want to use those delimiters, using `\left`, `\right` and `\middle` becomes impossible. I think with the following question fixed I can create my hyperlinked delimiters: How to color delimiters: As a minimal working example I have:               $\left\textcolor{red}{(}a\right)$      What i would like to have is (Created without `\left` `\right`): ![Color](http://i.stack.imgur.com/ZBdh3.png) This gets the error: `! Missing delimiter (. inserted).` * * * Trying this :               $\textcolor{red}{\left(}a\right)$      results in `! Extra }, or forgotten \right.` Who can help me?


title: URLs and Bibliography

text: My bibliography contains plenty of URL resources of the format:               @misc{google-now,       author = {Google},       title = {Google Now},       note = {\url{http://www.google.com/landing/now/}}      }      By default, this gets translated into a one-liner, justified string, with parts separated by dots. How can I change this behaviour with a custom one, having, for example:   * Author and title on the same line   * URL on a second line   * Title emphasized   * Everything left-aligned As an alternative, would it be possible to re-define a new "entity" just for URLS?               @url{author, title, page}


title: Unexpected behavior of SIGMA symbol in eulervm

text: Consider the following minimal example (which has to use `amsmath`):               \documentclass{article}     \usepackage{amsmath}     \usepackage{eulervm}     \begin{document}     \begin{align*}       \rm{text}  =        x_\sigma     \end{align*}     \end{document}      which yields the following: ![enter image description here](http://i.stack.imgur.com/iOiZw.png). Note the symbol which appears instead of the expected `\sigma` and the font used for `x`. By removing the `eulervm` package the result is as expected, namely: ![enter image description here](http://i.stack.imgur.com/Sxc6Z.png). Now, even more counterintuitive, if you comment out the first line in the `align`, namely `\rm{text} =` leaving the `eulervm` package in place I get: ![enter image description here](http://i.stack.imgur.com/E2wRu.png). Obviously, as shown in the last example, `eulervm` can typeset a `\sigma` symbol as a subscript, but not when there's some text in front...? **Can someone explain what is happening here?**


title: Removing italic formatting from if statement

text: I would like the if statement to have "current stage" in serif and "satisfies" as normal text. The following code produces both with italics:               \documentclass{article}     \usepackage{algorithm2e}     \begin{document}     \begin{algorithm}          \If{\textsf{current\_state} \textrm{satisfies} \textsf{goal}}     {     return \textsf{existing\_plan}     }     \end{algorithm}     \end{document}      Any ideas?


title: Subscript right below the variable

text: `$x_{max}(n)$` does not look good, because `max` takes to much space horizontally, and `n` goes too far. What is a good way to write such thing?


title: Why such rotate in tikz doesn't work?

text: \begin{tikzpicture}     \node [draw=black, anchor=south west] (label) at (0,0){\includegraphics[width=300mm]{th.jpg}};     \coordinate (ZX) at (157mm,104mm);     \coordinate (YB) at (249mm,39mm);     \coordinate (YY) at ($(ZX)!1.5!(YB)$);     \coordinate (ZZ) at ($(YB)!2.5!(ZX)$);     \draw[blue!20,very thick] (ZZ)--(YY);     \draw[red!20,very thick, rotate around={90:(ZX)}] (157mm,104mm)--(249mm,39mm);%It works     \draw[red!20,very thick, rotate around={-90:(ZX)}] (ZX)--(YB);%It doesn't work     \filldraw[white] (ZX) circle (2mm);     \filldraw[white] (YB) circle (2mm);     \end{tikzpicture}      a working example                    \documentclass{minimal}     \usepackage{tikz,tikz-3dplot}          \begin{document}            \tdplotsetmaincoords{70}{115}            \begin{tikzpicture}[scale=4,tdplot_main_coords]     \pgfmathsetmacro{\rvec}{.8}     \pgfmathsetmacro{\thetavec}{30}     \pgfmathsetmacro{\phivec}{60}          \tdplotsetrotatedcoords{\phivec}{\thetavec}{0}           \coordinate (O) at (1,1,1);           %these 2 lines overlap     \draw[thick,->] (O) -- (0,.5,0);     \draw[thick,tdplot_rotated_coords,->] (O) -- (0,.5,0);           %these 2 lines dont overlap     \draw[thick,->] (1,1,1) -- (0,.5,0);     \draw[thick,tdplot_rotated_coords,->] (1,1,1) -- (0,.5,0);     \end{tikzpicture}     \end{document}


title: Draw a line between data points in two different pgfplots (subfigures)

text: I have two different pgfplots in two subfigures. I want to draw a line between the red circled data points and the blue ones. I added lines manually with LibreOffice Draw to show you what I mean. My code is the follwing:               \begin{figure}[!htbp]     \centering         \subfigure[Ausgangszustand]{         \resizebox{0.45\textwidth}{!}{         \begin{tikzpicture}         \begin{axis}[             xlabel={Zeit [d]},             ylabel={Auslastung [\%]},             axis lines=left,             xmin=0,             xmax=7.5,             xtick={1,...,8},             ymin=0,             ymax=105,             thick,             grid=both             ]         \addplot[smooth,thick] plot coordinates {             (0,35)             (1,60)             (2,20)             (3,95)             (4,45)             (5,30)             (6,60)             (7,55)         };         \addplot+[only marks,mark=o,mark options={scale=3},text mark as node=true] coordinates {                 (3,95)         };         \addplot+[only marks,mark=o,mark options={scale=3},text mark as node=true,color=blue] coordinates {                 (2,20)         };         \end{axis}     \end{tikzpicture}     }}     \qquad     \subfigure[Zielzustand]{     \resizebox{0.45\textwidth}{!}{     \begin{tikzpicture}         \begin{axis}[             xlabel={Zeit [d]},             ylabel={Auslastung [\%]},             axis lines=left,             xmin=0,             xmax=7.5,             xtick={1,...,8},             ymin=0,             ymax=105,                 thick,                 grid=both                 ]             \addplot[smooth,thick] plot coordinates {                 (0,45)                 (1,55)                 (2,40)                 (3,70)                 (4,55)                 (5,35)                 (6,50)                 (7,45)             };             \addplot+[only marks,mark=o,mark options={scale=3},text mark as node=true] coordinates {                     (3,70)             };             \addplot+[only marks,mark=o,mark options={scale=3},text mark as node=true,color=blue] coordinates {                         (2,40)             };                   \end{axis}         \end{tikzpicture}         }}         \caption{Glättung von Lastspitzen}         \label{fig:Lastspitze}     \end{figure}      ![lines between data points](http://i.stack.imgur.com/N4jAN.png) I want to draw the lines beginning and ending in the exact data points in the graphs. I did some googling but couldn't find an answer.


title: Uncover lines of an align environment with beamer

text: Is there any way to uncover equation-lines of an align* environment line per line in a frame conveniently? somethink like               \begin{align*}[<+->]         a &= b \\         b &= c \\         \Rightarrow \quad          a &= c \\     \end{align*}      or at least only one annotation per line.


title: ConTeXt: page large enough to contain a FLOWchart

text: How can I create a page which has the minimum size to contain the one FLOWchart defined in it? I'm looking for something identical to `\startMPpage` but for FLOWchart > \startMPpage produces a page a containing MetaPost graphic. The page is just > large enough to contain the graphic. A minimum document using `\startMPage`:               \starttext     \startMPpage     fill fullcircle scaled 5cm withcolor red ;     \stopMPpage     \stoptext      this produces a cropped page containing only the circle. The following document will produce a full A4 page with a flow-chart in it:               \usemodule[chart]     \starttext     \startFLOWchart [cells]       \startFLOWcell         \name {first}         \location {1,1}         \shape {singledocument}         \text {not realy a document}       \stopFLOWcell     \stopFLOWchart          \placefigure        [here][]        {}{\FLOWchart[cells]}     \stoptext


title: enumerating an equation which is tagged

text: Hi I need to enumerate (on the left) using roman numerals an equation which is centered and has a tag on the right. Example: > (i) x-2=3 (E1) Is there a way to insert roman numeral to itemize before `\begin{equation}`?


title: Using `ifthenelse` to combine two related functions into one

text: This question is based on Peter Grill's answer to "Table including rows of a master table".. The function `PrintDTLTable` was in Peter's original answer. I wanted a version that would run over all rows, so I motified this slightly to `PrintDTLTableDefault`, which does not have a row id argument. Both `PrintDTLTable` and `PrintDTLTableDefault` work as expected. I think it makes more sense to combine these into a single function, so I tried using `ifthenelse` and this gave `PrintDTLTableCombined`. This gives the error               ERROR: Argument of \isempty has an extra }.      I don't see any obvious syntax or usage errors. As usual with LaTeX, the error could easily be something completely unrelated to the error message. I don't have to use `ifthenelse`; something else would be fine.               \documentclass{article}     \usepackage{array}     \usepackage{multirow}     \usepackage{datatool}     \usepackage{longtable}     \usepackage{filecontents}     \usepackage{xifthen}     \newcommand{\colhead}[1]{\multicolumn{1}{>{\bfseries}l}{#1}}     \newcounter{tabenum}\setcounter{tabenum}{0}     \newcommand{\nextnuml}[1]{\refstepcounter{tabenum}\thetabenum.\label{#1}}          \begin{filecontents*}{foo.dat}       Hammer001,   Hammer,    1 ,  0 , 1 , 10 , 1 , \multirow{2}{2in}{light (add some words here to wrap around)}\\       Hammer002,   Hammer,    2 ,  0 , 1 , 10 , 1 , heavy       Hammer003,   Hammer,    3 ,  0 , 1 , 10 , 1 , really heavy       Longsword001,Longsword, 1 , -1 , 2 , 75 , 2 , one-handed       Longsword002,Longsword, 2 , -1 , 2 , 75 , 2 , two-handed       Longsword003,Longsword, 3 , -1 , 2 , 75 , 2 , three-handed     \end{filecontents*}          \newcommand{\PrintDTLTable}[2]{%       % #1 = database to search       % #2 = list of rowIDs       \begin{tabular}{c c c c c c c p{3.0cm}}         & \colhead{Label} & \colhead{Cost} & \colhead{Weight} & \colhead{PropA} & \colhead{PropB} & \colhead{PropC} & \colhead{Description}\\\hline         \DTLforeach[\DTLisSubString{#2}{\RowID}]{#1}{%           \RowID=RowID,%           \Label=Label,%           \Cost=Cost,%           \Weight=Weight,%           \PropA=PropA,%           \PropB=PropB,%           \PropC=PropC,%           \Description=Description%         }{%           \nextnuml{\RowID} & \Label &\Cost & \Weight & \PropA & \PropB & \PropC & \Description \\         }%       \end{tabular}     }%          \newcommand{\PrintDTLTableDefault}[1]{%       % #1 = database to search       \begin{longtable}{c c c c c c c p{3.0cm}}         & \colhead{Label} & \colhead{Cost} & \colhead{Weight} & \colhead{PropA} & \colhead{PropB} & \colhead{PropC} & \colhead{Description}\\\hline         \DTLforeach[\boolean{true}]         {#1}{%           \RowID=RowID,%           \Label=Label,%           \Cost=Cost,%           \Weight=Weight,%           \PropA=PropA,%           \PropB=PropB,%           \PropC=PropC,%           \Description=Description%         }{%           \nextnuml{\RowID} & \Label &\Cost & \Weight & \PropA & \PropB & \PropC & \Description \\         }%       \end{longtable}     }%          \newcommand{\PrintDTLTableCombined}[2][]{%      % #1 = list of rowIDs      % #2 = database to search       \begin{longtable}{c c c c c c c p{3.0cm}}         & \colhead{Label} & \colhead{Cost} & \colhead{Weight} & \colhead{PropA} & \colhead{PropB} & \colhead{PropC} & \colhead{Description}\\\hline         \DTLforeach         [\ifthenelse{\isempty{#1}}{\boolean{true}}{\DTLisSubString{#1}{\RowID}}]         {#2}{%           \RowID=RowID,%           \Label=Label,%           \Cost=Cost,%           \Weight=Weight,%           \PropA=PropA,%           \PropB=PropB,%           \PropC=PropC,%           \Description=Description%         }{%           \nextnuml{\RowID} & \Label &\Cost & \Weight & \PropA & \PropB & \PropC & \Description \\         }%       \end{longtable}     }%          \begin{document}     % \DTLsetseparator{&}% Define separator of the data     \DTLloaddb[noheader,keys={RowID,Label,Cost,Weight,PropA,PropB,PropC,Description}]{myDB}{foo.dat}          %\PrintDTLTable{myDB}{Hammer001,Hammer003,Longsword003}     %\PrintDTLTableDefault{myDB}     \PrintDTLTableCombined{myDB}          This is a reference to ~\ref{Hammer003}.          \end{document}      UPDATE: @Werner's macro works for me. However, I'm still would like to know what made my attempt fail; maybe it would be instructive. LaTeX is frustrating for a beginner, partly because it frequently seems impossible to debug for a non-expert.


title: PGFPlots convert the decimal separator

text: Hi the decimal separator of the xticks is a point i would the comma how can i do?               \documentclass[border=0.5mm,12pt]{standalone}          \usepackage{siunitx}                       % SI Package          \sisetup{%              output-decimal-marker={,},              table-format = 3.1%             }          \usepackage{pgfplots}        % Grafici          \pgfplotsset{%                 mesh line legend/.style={legend image code/.code=\meshlinelegend#1},%                 /pgf/number format/use comma,%                 compat=newest,%     %            height=9cm,%                 width=12cm%     }               \begin{document}     %\begin{figure}     \begin{tikzpicture}     \pgfdeclarehorizontalshading{stefan}{50bp}{     color(0.00000000000000bp)=(violet);     color(8.33333333333333bp)=(blue);     color(16.66666666666670bp)=(cyan);     color(25.00000000000000bp)=(green);     color(33.33333333333330bp)=(yellow);     color(41.66666666666670bp)=(orange);     color(50.00000000000000bp)=(red)     }     \begin{axis}[%     grid=major,     legend pos=north west,     legend cell align=left,     no markers,     xmin=-0.3,     xmax=0.3,     ymin=0,     ymax=6,     yticklabel shift=2pt,     xticklabel shift=2pt,     point meta min={-0.3},     point meta max={0.3},     tick style={thin,black},     xticklabel style={text height=1.5ex},     xticklabels={%             $-0.4$,             $-0.3$,             $-0.2$,             $-0.1$,             $\mu$,             $0.1$,             $0.2$,             $0.3$,             $0.4$         },     extra x ticks={-0.4,-0.3,...,0.4},     extra x tick labels={%             $-0.4$,             $-0.3$,             $-0.2$,             $-0.1$,             $\mu$,             $0.1$,             $0.2$,             $0.3$,             $0.4$         },     extra x tick style={         xticklabel pos=right,         xticklabel style={text depth=0pt}     },     extra y ticks={0,1,...,6},     extra y tick style={         yticklabel pos=right     },     minor tick num=4,     xlabel=\large $x$,     ylabel=\large $f_{\mu,\sigma^2}(x)$,     colorbar horizontal,     colorbar style={         xticklabels={%             $-0.4$,             $-0.3$,             $-0.2$,             $-0.1$,             $\mu$,             $0.1$,             $0.2$,             $0.3$,             $0.4$         },         xticklabel shift=2pt,         xticklabel style={text height=1.5ex}     },     axis line style={draw=none}, after end axis/.append code={\draw (rel axis cs:0,0) rectangle (rel axis cs:1,1);},     colormap={new}{color(0cm)=(violet);color(1cm)=(blue);color(2cm)=(cyan);color(3cm)=(green);color(4cm)=(yellow);color(5cm)=(orange);color(6cm)=(red)},     after end axis/.append code={%         \draw ({rel axis cs:0,0}-|{axis cs:0,0}) -- ({rel axis cs:0,1}-|{axis cs:0,0});     }     ]     \addplot gnuplot[         shading=stefan,         draw=none,         shader=interp,         id=DoG,         samples=1000,         domain=-0.3:0.3,         y domain=0:1     ]{((1/(sqrt(2*pi*0.08**2)))*exp(-(x-0)**2/(2*0.08**2)))}\closedcycle;     \addlegendimage{empty legend}\addlegendentry{$\mu=27,6\si{\second}$}     \addlegendimage{empty legend}\addlegendentry{$\sigma^2=0,01\si{\second}$}     \end{axis}     \end{tikzpicture}     \end{document}


title: PGFPLots remove the plot line in the legend

text: How can remove the plot line in the legend? ![enter image description here](http://i.stack.imgur.com/2Vxiy.jpg)               \documentclass[border=0.5mm,12pt]{standalone}          \usepackage{siunitx}                       % SI Package          \sisetup{%              output-decimal-marker={,},              table-format = 3.1%             }          \usepackage{pgfplots}        % Grafici          \pgfplotsset{%                 mesh line legend/.style={legend image code/.code=\meshlinelegend#1},%                 /pgf/number format/use comma,%                 compat=newest,%     %            height=9cm,%                 width=12cm%     }          \begin{document}     \begin{tikzpicture}     \begin{axis}[%     legend pos=north west,     legend cell align=left,     no markers,     xmin=-0.3,     xmax=0.3,     ymin=0,     ymax=6,     yticklabel shift=2pt,     xticklabel shift=2pt,     point meta min={-0.3},     point meta max={0.3},     ]     \addplot gnuplot[         draw=none,         shader=interp,         id=DoG,         samples=1000,         domain=-0.3:0.3,         y domain=0:1     ]{((1/(sqrt(2*pi*0.08**2)))*exp(-(x-0)**2/(2*0.08**2)))}\closedcycle;     \addlegendimage{empty legend}\addlegendentry{$\mu=27,6\si{\second}$}     \addlegendimage{empty legend}\addlegendentry{$\sigma^2=0,01\si{\second}$}     \end{axis}     \end{tikzpicture}     \end{document}


title: Computing coordinate numbers in TikZ

text: I am trying to draw three congruent, equilateral triangles unicursally in TikZ (see figure below). Per se, this is rather simple, but I want to write the TikZ code so that I can easily change the shape of the figure by adjusting a few geometrical parameters. More specifically, I want the coordinates in the TikZ figure to vary, depending on the value of the parameters. ![three unicursal, congruent, equilateral triangles](http://i.stack.imgur.com/wY1oo.png) The two parameters I want to change are the distances from _a_ to _q_ (later referred to as _L_ ) and from _q_ to _b_ (later referred to as _Δ_ ) in the figure above. By choosing _a_ to be the origin, the expressions for the coordinates will be as follows _a_ : `( 0 , 0 )`   _b_ : `( cos(60°)*(L + Δ) , sin(60°)*(L + Δ) )`   _c_ : `( bx + cos(60°)*L , by - sin(60°)*L )`   _d_ : `( L - cx , cy )`   _e_ : `( L - bx, by )`   _f_ : `( L , 0 )` where _bx_ , _by_ , _cx_ and _cy_ denote the _x_ and _y_ coordinates of points _b_ and _c_ respectively. _(The coordinates of_ q _are not necessary in order to draw the figure.)_ I tried the following approach, but this gives the output shown below, where only the coordinates of _a_ and _f_ are correct. If this had worked, I would be able to simply change the definitions of `\l` and `\delta` and recompile to see how the geometry changes with _L_ and _Δ_.               \begin{tikzpicture}          \def\cossixty{0.5}     \def\sinsixty{0.866025}          \def\l{6}     \def\delta{2}     \def\ldelta{\l+\delta}     \def\bx{\cossixty*\ldelta}     \def\by{\sinsixty*\ldelta}     \def\cx{\bx+\cossixty*\l}     \def\cy{\by-\sinsixty*\l}     \def\dx{\l-\cx}     \def\ex{\l-\bx}          \coordinate (a) at (0,0);     \coordinate (b) at (\bx,\by);     \coordinate (c) at (\cx,\cy);     \coordinate (d) at (\dx,\cy);     \coordinate (e) at (\ex,\by);     \coordinate (f) at (\l,0);          \begin{scope}[thick]         \draw (a) -- (b) -- (c) -- (d) -- (e) -- (f) -- (a);     \end{scope}          \end{tikzpicture}      ![erroneous output](http://i.stack.imgur.com/VnTCT.png) So my question is this: how can I make TikZ compute the coordinate expressions listed above into floating point numbers and get the correct output? _(This is only a small part of a larger image which I am to make in TikZ, so there is, of course, a good reason why I choose to draw the figure unicursally, and with adjustable parameters.)_


title: bibliography does not appear using a template which uses apalike style

text: When I compile the tex provided in the following template, the bibliography does not appear, and I don't understand why. I'm using Texmaker on windows, and I've already tried to compile with BibTex before PdfLatex, but the references does not appear: http://www.scitepress.org/documents/SCITEPRESS_Conference_Latex.zip


title: How to write overlay-specification–aware macros that work w/o the beamer class

text: The LaTeX `beamer` class provides with `\newcommand<>` and `\newenvironment<>` an interface to define own commands that can deal with beamer's overlay specifications. Internally, commands defined this way then typically employ other beamer-provided overlay-aware commands, such as `\only<>` or `\onslide<>`, to achieve the desired effect. **However, how does one write a package that provides its commands overlay- aware if used together with`beamer`, but can also be used with other document classes?** The brute force solution would be to define every command twice, depending of it being used within beamer or not:               \@ifclassloaded{beamer}{%       % beamer       \newcommand<>{\foo}[1]{\only#2{...}}       \newcommand<>{\bar}[1]{... \onslide#2{...}}     }{%       % other class       \newcommand{\foo}[1]{...}       \newcommand{\bar}[1]{...}     }      However, I would prefer an approach that just mimics a beamer-like interface, so that the actual macro definitions can be kept as is:               \@ifclassloaded{beamer}{%       % beamer ==> do nothing     }{%       % other class ==> provide beamer command mockups       \def\newcommand ...       \def\onslide ...       \def\only ...     }          \newcommand<>{\foo}[1]{\only#2{...}}     \newcommand<>{\bar}[1]{... \onslide#2{...}}      There is the `beamerarticle` package that is intended to provide these commands for beamer's article mode (used in the MWE below). However, `beamerarticle` goes way to far, as it also defines commands, such as `\frame` and `\note` and patches, as `beamer` does, basically all of the standard commands for sectioning and lists, which renders it incomapatible to many other packages and document classes. I am looking for a more light-weight, less invasive solution. I also tried to load the `beamerbaseoverlay` sub-package alone, which apparently provides the definitions of `\newcommand<>`, `\only<>` and so on. However, this package is not intended to be used alone; I tried to hunt down its dependencies, but gave it up after loading half a dozen of extra packages without success. Any other ideas? Any package I did overlook? MWE with some real code from the package I am currently writing to play around:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{listings}          % BEGIN package content     \makeatletter            \@ifclassloaded{beamer}{}{         \RequirePackage{beamerarticle} % <-- I would like to avoid this!       }         \RequirePackage{tikz}            % uses beamer's \only<>        \tikzset{onslide/.code args={<#1>#2}{%         \only<#1>{\pgfkeysalso{#2}}        }}            % uses beamer's \newenvironment<>, onlyenv       \newenvironment<>{btHighlight}[1][]       {\begin{onlyenv}#2\begingroup\tikzset{bt@Highlight@par/.style={#1}}\begin{lrbox}{\@tempboxa}}       {\end{lrbox}\bt@HL@box[bt@Highlight@par]{\@tempboxa}\endgroup\end{onlyenv}}            % uses beamer's \newcommand<>, \only<>       \newcommand<>\btHL[1][]{%         \only#2{\begin{btHighlight}[#1]\bgroup\aftergroup\bt@HL@endenv}%       }       \def\bt@HL@endenv{%         \end{btHighlight}%            \egroup       }       \newcommand{\bt@HL@box}[2][]{%         \begin{tikzpicture}[remember picture]%           \pgfpathrectangle{\pgfpoint{1pt}{0pt}}{\pgfpoint{\wd #2}{\ht #2}}%           \pgfusepath{use as bounding box}%           \node[anchor=base west,  fill=orange!30,outer sep=0pt,inner xsep=1pt, inner ysep=0pt, rounded corners=3pt, minimum height=\ht\strutbox+1pt,#1]{\raisebox{1pt}{\strut}\strut\usebox{#2}};         \end{tikzpicture}       }          \makeatother     % END package content          \begin{document}            \begin{lstlisting}[%           language=C, numbers=left, gobble=4,           moredelim={**[is][{\btHL[pin=30:The applications entry point, onslide=<2->{fill=red!50}]}]{@}{@}}%         ]         @int main (void)@ {            printf("Hello World!"); return 0;         }        \end{lstlisting}          \end{document}      ![enter image description here](http://i.stack.imgur.com/yEdrh.gif)


title: Remove hyphen from word spanning two lines in text copied from a pdf file

text: If I copy text from a PDF and a word is hyphenated and spans two lines, the copied text contains the "-". For example:               Examp-     le       should be copied as               Example      not               Examp-le      The problem is that hyphens from source text must be conserved               bug-     proof      must be               bug-proof      in copied form. How can I achive this? I think this question is related to Make ligatures in Linux Libertine copyable (and searchable) **Edit:** I am sorry, my initial question was not well phrased. I typeset documents in LaTeX and compile them to PDF by PDFlatex (Miktex). Is it possible for PDFLaTeX to distinguish between 'line break' and 'interword' hyphens? Does the definition of PDF allows such different hyphens, so that a PDF reader, which respects the difference copies text that contains 'interword' hyphens, but not the 'line break' hyphens and the belonging line break?


title: How to preview images generated by MetaPost?

text: I use the old MetaPost program to create graphics. My problem is that, to see the result of my MetaPost figures, I have to compile first the .mp file and then the .tex file where I've inserted them. I find it quite boring. I've found the online MetaPost Previewer but I have to copy and paste my code there and this is even a further waste of time. I've also tried to add the lines               prologues:=3;     filenametemplate "%j-%3c.eps";      in my .mp files to generate .eps files, but, when I open them with GSView, sometimes I'm able to see my proper figures and sometimes not. So, the question is: does anyone knows a program which is able to open the output generated by MetaPost? Or any package that can let me generate viewable images? Or any other trick that make me save some time (even an editor feature)? If this can help, I use MiKTeX 2.9 in Windows XP. My main editor is TeXMaker (v4), but I have WinEdt (v8) installed as well.


title: \DeclareDatamodelEntryfields : make biber does'nt work

text: that is a a completion of my question Datamodel in biblatex, hashname and biber, but I opened a new question because the problem is more problematic. If any roots want to merge, no problem. I want to declare new entrytype and new field. I have two solutions: \- use `\DeclareSourceMap` to map entry field (in bib) to another output field (for use with `\printfield{}` \- use new datamap model, to allow to have new fields in my output file. For some reasons, I prefered to use the second way. So I read biblatex handbook. I made a `manuscripts.dbx` file, with this content               \DeclareDatamodelEntrytypes{manuscript}     \DeclareDatamodelFields{datation}     \DeclareDatamodelEntryfields{datation}      If I read correctly the handbook, it's enough to allow to have `datation` field in my `.bbl` file. My `.bib` file has this content               @manuscript{P1470,         Library={BNF},         Address={Paris},         Datation={\textsc{viii}\textsuperscript{e} s.}     }      And my main file has this content               \documentclass{article}     \usepackage{fontspec}     \usepackage[datamodel=manuscripts,bibstyle=verbose,citestyle=verbose]{biblatex}     \bibliography{titi.bib}     \begin{document}     \nocite{*}     s     \printbibliography     \end{document}      When I run xelatex -> no problem When I run biber -> the bbl output file is empty. If I comment `\DeclareDatamodelEntryfields{datation}` -> the bbl output file is not empty, but the field `datation` is not added to the bbl output file. If I comment `Datation={\textsc{viii}\textsuperscript{e} s.}` -> -> the bbl output file is not empty, but the field `datation` is not added to the bbl output file. I am on Os X, with Biber 1.8 I I run with latemk, latexmk said "Command for 'biber example' gave return code 6400"


title: Justification inside Substack

text: How can I left-justify inside `substack`?               \documentclass{standalone}     \usepackage{amsmath}          \begin{document}          $L_{\textrm{disk}} = L_{ \substack{\textrm{disk} \\ \textrm{orbital} } } + L_{ \substack{\textrm{disk} \\ \textrm{spin} } }#$          \end{document}      yields ![enter image description here](http://i.stack.imgur.com/1mGXb.png) I tried using `\raggedright` inside the `\substack`, but this failed.


title: Dotted line instead of \hline in table environment

text: I am trying to get a dotted line in the table instead of `\hline`, but I can't get the output. `arydshln` and `dashrule` packages are available to get the dashed line, but I can't find any packages to get a dotted line in table. Is any package available for this style?


title: Write "A in bibliography but see" a

text: I'm writing my bibliography and in a title I wrote the following code:               @inproceedings     {       R14,       Author = {},       Booktitle = {},       Title = {`` A fully integrated..."},       Year = {}     }      But when I see this reference it show like this: "a fully integrated..." How can I achieve to have "A fully integrated..."?


title: Making a specific cell of a dynamically generated tikz matrix BOLD

text: I want to make specific cells of a dynamically generated tikz matrix **bold**. I have tried many things: `\bfseries`, `\mathbf`, `\textbf`, `\bf`, using `assume math mode=false` in `\pgfmathprintnumberto` ... Here is my MWE. (Note that I have replaced my calculations with `\pgfmathparse{exp 2}` and this MWE is a very small part of my original code. I have not added the code that determines which cells will be bold.)               \documentclass{article}     \usepackage[active, tightpage]{preview}     \usepackage{etoolbox}     \usepackage{tikz}     \usetikzlibrary{matrix}     \usepackage{pgfplots}          \begin{document}     \let\mymatrixcontent\empty     \newcommand{\calculate}[1]{     \pgfkeys{/pgf/fpu=true}%     \pgfmathparse{exp 2}%     \pgfkeys{/pgf/fpu=false}%     \global\let\totsum\pgfmathresult%     \foreach \i in {0,...,5} {         \gappto\mymatrixcontent{A}         \expandafter\gappto\expandafter\mymatrixcontent\expandafter{\&}%         \pgfmathprintnumberto[/pgf/number format/.cd,fixed,precision=2]{\totsum}{\fsum}%         \expandafter\gappto\expandafter\mymatrixcontent\expandafter{\fsum}%         \gappto\mymatrixcontent{\\}     }     }     \calculate{1}     \begin{preview}     \begin{tikzpicture}       \matrix (mat) [matrix of nodes,ampersand replacement=\&]{         \mymatrixcontent       };     \end{tikzpicture}     \end{preview}     \end{document}      I need one line of code like this:               \expandafter\gappto\expandafter\mymatrixcontent\expandafter{\textbf\fsum}      that makes `\fsum` **bold**.


title: MiKTeX graphicx package missing

text: I am using MiKTeX 2.9 and tryng to install the `graphicx` package. But it is not available on the package manager: ![graphicx](http://i.stack.imgur.com/KrMIt.png) Could anyone help on this? I found MiKTeX 2.9 doesn't find the includegraphics package, but there is no answer.


title: pdflatex/xelatex problems with MinionPro

text: I am successfully using package MinionPro for pdflatex. I would like to use it also in xelatex (the math part, actually), so that I can add opentype features to the main text font. However, I am hitting a wall here. Take this simple test file:               \documentclass{minimal}     \usepackage{MinionPro}     \begin{document}     Test.     \end{document}      A run with pdflatex works perfectly. But xelatex chokes on the same thing:               (/usr/local/texlive/2011/texmf-dist/tex/latex/base/ts1cmr.fd) [1] (./test2.aux)          kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 MinionPro-RegularLCDFJ.pfb     mktexpk: don't know how to create bitmap font for MinionPro-RegularLCDFJ.pfb.     mktexpk: perhaps MinionPro-RegularLCDFJ.pfb is missing from the map file.     kpathsea: Appending font creation commands to missfont.log.          ** WARNING ** Could not locate a virtual/physical font for TFM "MinionPro-Regular--lcdfj".     ** WARNING ** >> This font is mapped to a physical font "MinionPro-RegularLCDFJ.pfb".     ** WARNING ** >> Please check if kpathsea library can find this font: MinionPro-RegularLCDFJ.pfb     ** ERROR ** Cannot proceed without .vf or "physical" font for PDF output...          Output file removed.      )     Error 256 (driver return code) generating output;     file test2.pdf may not be valid.     Transcript written on test2.log.      I don't quite get _why_ xelatex would need pk fonts in the first place, but I really need help in this one. Thanks for your time. PS: For the record, this is a fresh (re)install of texlive on OSX plus the MinionPro package.


title: Colored text with dcolumn

text: I want to typeset a table where certain numbers are going to appear red. In order to achieve the correct alignment I am using the dcolumn package. The problem is that the parsing that dcolumn does, prevents the correct appliance of color. In the following example, in the third row, only the "1" appears red. The dot and the "32" appears black. Using `\textcolor` results in a syntactical mistake. I tried using siunitx, but unfortunately, since I am producing programmatically hundreds of tables, the compilation time increased too much (more than a minute) So the question is, how can you color a number belonging in a dcolumn?               \documentclass[]{article}          \usepackage{xcolor}     \usepackage{tabu}     \usepackage{dcolumn}          \newcolumntype{d}[1]{D{.}{.}{#1}}          \begin{document}          \begin{tabu}{cd{2}}     note & 1.32\\     \color{red}note & 1.32 \\     \color{red}note & \color{red}1.32 \\     % note & 1.32\\     % \textcolor{red}{note} & 1.32 \\     % \textcolor{red}{note} & \textcolor{red}{1.32} \\  % results in a compilation error.     \end{tabu}          \end{document}


title: If document class is equal to something then do not use package

text: I am trying to create a file which includes common packages and macros I use. It is something like this. commonDefinitions.tex                \interdisplaylinepenalty=2500      \usepackage{algorithmic}           \usepackage{cite}       \usepackage{appendix}      ... other packages and macros      But some packages clash with each other in combinations. For example when I try to use                \documentclass[journal]{IEEEtran}      \usepackage{appendix}      It gives error since IEEEtran already created command appendix. I would like to get some solution to this problem something like below.               if document class is not IEEEtran         \usepackage{appendix}     end if


title: Placing text in the margin next to a figure using ConTeXt

text: What is a good way to place a short paragraph in the margin next to a figure in ConTeXt? I've been trying the following code, but it places the `\inmargin` text at the base of the figure which only works for about 2 lines before the text goes well beneath the end of the figure.               \starttext     \starthanging     {\placefigure[force][fig:figure-reference]{Figure Caption}     {\externalfigure[figure-file][width=\textwidth]}}     \inmargin{Sometext that is intended for the Margin}     \stophanging     \stoptext      ![enter image description here](http://i.stack.imgur.com/0h8iQ.png) I've had a quick look in the Details Manual but was unable to find or work out what to apply to get a good result.


title: beamer: using \note<> and frame labels together creates multiply-defined labels

text: This question is very similar to this one. However, since the solution provided there cannot solve my problem, I figured that I'd post my specific problem. Here is a minimal example to illustrate this issue:               \documentclass{beamer}     \setbeameroption{show notes}     \begin{document}     \begin{frame}<1-2>[label=myframe]{Frame Title}       \note<1>{Some notes on the first point.}       \note<2>{Some notes on the second point.}       \begin{itemize}       \item<alert@1> First point.       \item<alert@2> Second point.       \item<alert@3> Third point. %optional       \end{itemize}     \end{frame}     \appendix     \begin{frame}{Appendix}       Some more elaboration.     \end{frame}     \againframe<3>{myframe}     \end{document}      This example is compilable, but LaTeX tells me there are multiply defined labels. The labels in question are `myframe`, `myframe<1>` and `myframe<2>`. I _conjecture_ this is due to the fact that when a note page is created, the note page also "inherits" the label of the main frame, thus creating such problem. If so, I guess we could somehow patch the note page mechanism in `beamer` such that LaTeX would stop emit such warnings. Anyone has any solutions?


title: How to typeset categories with long names?

text: I am typing some category theory and I am unsure how to handle the name of a category in LaTeX. I read the post How to typeset the name of a category? and implemented the mathbf-solution mentioned there, but I still have the following problem: I would like to give my categories names that are as telling as possible. For instance, the category of compact Riemannian Spin manifolds should be something like "CpctRiemSpinMfd" and not something like "cRSM". This practice makes the text much simpler to read for readers unfamiliar with the notation, but also makes the names of the categories rather long. This completely ruins the linebreaking when a name of a category occurs at the end of a line within the text. The name is printed on the right margin far beyond the usual border. How to fix that? I want to use the names of my categories inside the text and inside mathmode. MWE               \documentclass{article}          \newcommand{\cat}[1]{\mathbf{#1}}          \begin{document}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas $\cat{RiemSpinMfd}$ aliquam nisi elit, non bibendum tortor gravida mattis. Praesent non sem ultrices dolor commodo sodales vel ac leo.                \end{document}


title: How to keep the vertical position of pictures in a presentation

text: I like to have the pictures in the following presentation each on the same position. Unfortunately the position changes after the second slide. How to keep the (vertical) position? Pictures are all the same size.               \PassOptionsToPackage{demo}{graphics}      \documentclass{beamer}          \begin{document}          \begin{frame}         \only<1>{\includegraphics[width=\textwidth]{pic1}}         \only<2>{\includegraphics[width=\textwidth]{pic2}}         \only<3>{\includegraphics[width=\textwidth]{pic3}}         \only<4>{\includegraphics[width=\textwidth]{pic4}}         \transduration<1-4>{1}     \end{frame}          \end{document}


title: macro inside tikzpicture environment

text: When I take a part of a `tikz` picture out and put it into a macro, the code stops working. So, why does the following not work?               \documentclass{article}     \usepackage{tikz}\usetikzlibrary{matrix}     \begin{document}          \newcommand{\emptymatrix}{%       \matrix[matrix of nodes,               inner sep=0pt,               left delimiter={[},               right delimiter={]},               nodes={circle,inner sep=0pt}] (A) {%         \strut & \strut & \strut & \strut \\         \strut & \strut & \strut & \strut \\         \strut & \strut & \strut & \strut \\         \strut & \strut & \strut & \strut \\       };     }          \begin{tikzpicture}       \emptymatrix       \draw (A-1-1.center) -- (A-4-4.center);     \end{tikzpicture}          \end{document}      Intended result: ![enter image description here](http://i.stack.imgur.com/YJsYt.png) Instead, an Undefined control sequence error occurs.               ERROR: Undefined control sequence.          --- TeX said ---     <argument> \pgf@matrix@last@nextcell@options           l.22   \emptymatrix


title: Customizing Bibliography alpha

text: I am pretty new to Latex. I am using the bibliography style - alpha. I use Citavi to manage my Citations and Citavi exports my bibliography in Bibtex(.bib) IEEE format which contains the last accessed date of an @electronic document as urldate.               urldate = {29.02.2012}       Now, when a .bbl file is generated from this .bib file, the urldate field is overlooked. So, I do not have any last accessed date appearing in my bibliography. Question: How can I make the last accessed date appear in my bibliography?


title: AUCTex indentation settings

text: I don't really like how AUCTeX indents latex code, and overall I find it pretty unpredictable (I guess I'm not used to the way it works). Some modes just bind the tab key to "move the current line so that it begins at next tab stop". Is there a way to achieve this in AUCTeX? Ideally, lines would be indented with spaces. Similarly, is there a way to bind Shift+Tab to "indent the current line back to previous tab stop"? I managed to change the behaviour of the Tab key, but only to insert tabs at the current position, which isn't really great.


title: Typeset directly in Spanish

text: I am typesetting in emacs with AucTeX. I generally write in English and Spanish, and, therefore, use the following in my preamble:               \usepackage[english,spanish]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{tipa}     \usepackage{t1enc}     \usepackage{amssymb}        \usepackage{soul}                        \usepackage{graphicx}              \usepackage{colortbl}     \usepackage{times}     \usepackage{url}       \usepackage{qtree}          \begin{document}     óáéí     \end{document      I can typeset accent marks with no problems in Textmate, but I get the following error in emacs:               ERROR: Package inputenc Error: Unicode char \u8:óáéí not set up for use with LaTeX      There was a very similar question reported here, however, I have not been able to solve my problem the same way. Does anybody know how to set this up?


title: Missing style file (previously worked)

text: Before I start, this is probably closely related to Where do I place my own .sty files, to make them available to all my .tex files?, but I can't figure it out. Previously I have had a file compiling and working fine. I am not sure what has changed, but all of a sudden today I have been receiving (Linux Mint 10.10)               (/usr/share/texmf-texlive/tex/latex/hyperref/hdvips.def          (/usr/share/texmf-texlive/tex/latex/hyperref/pdfmark.def)) (./xy.sty          ! I can't find file `xy'.          l.32 \input xy      I have tried to               sudo texhash      I have also tried just putting xy.sty in the directory, which didn't work either. I tried the following:               kpsewhich -var-value TEXMFHOME          /home/foo/texmf      This folder does not exist, but it appears I have a hidden folder, i.e. `/home/foo/.texmf-var` I tried to install the `xy.sty` file in `/home/foo/.texmf-var/tex/latex` If I call it `xy.sty`, it gives the same error message If it is just called 'xy' I get                TeX capacity exceeded, sorry [text input levels=15].      Basically - I don't know what I have done, what I can do to fix it, and if I am going to break anything else if I keep fiddling! **Edit** : I should also note the following. Line 6 of the tex file is `\usepackage[all]{xy}` While the error seems to refer to line 32?


title: Incomplete vertical line while creating a table

text: My code is as below. Last column line is splitted when I leave space between the rows. How can I get a solid vertical line? Please reply               \begin{table}[h!]             \caption{\textbf{$\alpha=10; U=1; q_u=10; q^{*}=0.3; K_0=0.41; \mu_1=\mu_2=0.5; G_m=0.1$             }}             \begin{center}                 \begin{tabular}{|p{4cm}|p{5cm}|p{5cm}|} \hline                         \hspace{4cm} {\textbf{Applied Pre-stress}} & \textbf{Equivalent Shear Modulus , $G_e$ , considering Confinement effect} &\textbf{Equivalent Shear Modulus , $G_e$ , without considering Confinement effect}\\ \hline                         0 & 0.318921 & 0.32016 \\ & \\                         0.2 & 0.932458 & 0.935286\\ & \\                         0.4 &  1.473396 & 1.476634 \\ & \\                         0.6 & 1.997815 & 2.003647\\ & \\                         0.8 & 2.517339 & 2.524832\\ & \\                         1.0 & 3.033942 & 3.043077 \\ \hline                 \end{tabular}                         \label{t2}             \end{center}     \end{table}


title: Detect value of option given to documentclass

text: I would like to be able to detect if the `standalone` package was used with `[preview=false]` or `[preview=true]`. Not too concerned if this setting was a default or user defined. Based on How can one undefine an already processed class option?, the macro `@classoptionslist` is supposed to be a comma separated list of options passed to the class. I attempted to detect if this macro had the string `preview=true` in it, but this does not yield the correct results. The following always prints `Package Option: [preview=false]`.               \documentclass[preview=true]{standalone}% Does not work     %\documentclass[preview=false]{standalone}% works          \usepackage{xstring}     \makeatletter%     \newcommand*{\DetectPreviewOption}{%         \IfSubStr{@classoptionslist}{preview=true}{true}{false}%     }%     \makeatother%          \begin{document}     Package Option: [preview=\DetectPreviewOption].     \end{document}


title: error: file stata.sty not found

text: I'm trying to manually install the package sjlatex. It's a package to write documents in the Stata Journal style and it's not part of any repository so I cannot install it via the MiKTeX package manager. I have put all the files that come with the package in               C:\Program Files\MiKTeX 2.9\texmf\tex\latex\sjlatex refreshed FNDB and updated format files. But when I run a simple document that calls up the `stata` package, I get the error message that `stata.sty` cannot be found, even though I can see `stata.sty` in               C:\Program Files\MiKTeX 2.9\texmf\tex\latex\sjlatex Here's a MWE:               \documentclass{article}     \usepackage{stata}     \begin{document}          An example:          \begin{stlog}     \input{example2_1.log.tex}     \end{stlog}          \end{document}      `stlog` is an environment specified by the `stata` package, but I don't even get that far before the error message hits. I'm on Windows Vista and running MiKTeX 2.9 in WinEdt. Also, I checked the file dependencies listed here and, as far as I can tell, I have correctly installed all the required files (using the MiKTeX package manager). I was hoping someone would have an idea of things I could try? Sorry if there is something obvious that I have missed ...


title: problem with using the citation style "unsrt"

text: I am writing a paper using documentclass 'article' and using jabref for bibliography. While I was using unsrt as the citation style its giving me the following problem.... for example, i wrote multiple author name like..               Díez-Pascual, A. M. \& Ashrafi, B. \& Naffakh, M. \& González-Domínguez , J. M.      \& Johnston, A. \& Simard, B. and Martínez, M. T. \& Gómez-Fatou, M. A.      but the output is coming like...               B. & Naffakh M. & González-Domínguez J. M. & Johnston A. & Simard B. Díez-Pascual,     A. M. & Ashrafi and M. A. Martínez, M. T. & Gómez-Fatou      any kind of help will be highly appreciable.


title: Patterned shading parts of a rectangle

text: Normally I try to have a skeleton at least before I ask a question, but this time I don't know where to begin, so my apologies for asking a cold question. I am trying to get parts of a rectangle hatched as shown in the figure below, but don't know how to begin. Any help would be much appreciated. ![enter image description here](http://i.stack.imgur.com/sy8CL.jpg)


title: Vertical placement of subfigs adjacent to another subfig

text: I have been using LyX, so I am fairly new to manipulating the underlying LaTeX. I have some images that I would like to arrange in a complicated fashion. The format I would like looks like               | Fig_A1 |  F   |       |        |  i   |       | Fig_A2 |  g_B |       |        |      |       |   F i g _ C   |      where each Fig_X is a subfloat. I used a tabular layout to force the positioning of the images. However, the output generates two pages: the first is blank, and the second has the figures Fig_A1/2 shifted toward the bottom of the page pushing Fig_C off. Fig_B is fine, though. It looks like this               |        |  F   |       |        |  i   |       |        |  g_B |     | Fig_A1 |      |       | Fig_A2 |      |        Here is the relevant section from my tex file exported from LyX.               %Preamble     \usepackage{float}     \usepackage{graphicx}     \@ifundefined{showcaptionsetup}{}{%      \PassOptionsToPackage{caption=false}{subfig}}     \usepackage{subfig}     \usepackage{babel}     % End Preamble          \begin{figure}[H]          \begin{tabular*}{0.9\paperwidth}{@{\extracolsep{\fill}}cc}         \subfloat[Figure A]{%             \begin{tabular}{c}                 \includegraphics[width=2in,height=2in]{Fig_A1}\\                 \includegraphics[width=2in,height=2in]{Fig_A2}\\             \end{tabular}         } &         \subfloat[Figure B]{%             \includegraphics[width=3in,height=4in]{Fig_B}         }%         \\         \multicolumn{2}{c}{\subfloat[Figure C]{Fig_C}}}\\     \end{tabular*}          \end{figure}      Does anyone see a reason why the tabular formatting is not being enforced? I got the idea for using this type of formatting from how to put subfigures in several rows


title: Tikz-picture - Fill area

text: I'm struggling drawing this picture: ![enter image description here](http://i.stack.imgur.com/GC7tV.png) I used               \documentclass[10pt]{article}     \usepackage{ngerman, longtable}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{fancyhdr}     \usepackage{pdflscape}     \usepackage{wasysym}     \usepackage{color}     \usepackage{longtable}     \pagestyle{fancy}     \usepackage{multirow}     \usepackage[pdftex]{graphicx}     \usepackage{array}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}[scale=0.6,domain=-3:5]          \path[fill=black,opacity=0.2] (2,0) -- plot[domain=2:0] (0,0) circle (2cm) -- (0,-2) -- cycle;          %draw grid+axis afterwards     \draw[very thin, color=gray,opacity=0.2] (-5.0,-5.0) grid (5.0,5.0);     \draw[->,color=black] (-5.5,0) -- (5.5,0);     \foreach \x in {-5,-4,-3,-2,-1,1,2,3,4,5}     \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};     \draw[->,color=black] (0,-5.5) -- (0,5.5);     \draw (5.7,0.2) node[anchor=north west] {$x_1$};     \draw (-0.3,6.2) node[anchor=north west] {$x_2$};     \foreach \y in {-5,-4,-3,-2,-1,1,2,3,4,5}     \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};     \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};          %draw cirle + graph     \draw[color=black] plot (\x,{(\x-2)}) node[right] {};     \draw (0,0) circle (2cm);          \end{tikzpicture}     \end{document}      I get a circle and a line, but the circle is completely filled and I thought               \path[fill=black,opacity=0.2] (2,0) -- plot[domain=2:0] (0,0) circle (2cm) -- (0,-2) -- cycle;      removes the intended area. Perhaps someone can help me out?


title: Organized list with border

text: I saw this list type in a Latex generated document, but I cannot for the life of me figure out what the syntax for it is supposed to be. Here's an image of the list in question: ![enter image description here](http://i.stack.imgur.com/hcU0t.png) I know this is probably not the best formulated question, but I've exhausted all of LaTeX resources and I don't know where to turn.


title: Environment not working inside \multido using standalone document class

text: I have the following code               \documentclass[multi={image},crop,ignorerest]{standalone}%     \usepackage{multido}     \begin{document}     \multido{\iframe=1+1}{2}{     \begin{image}     \iframe     \end{image}     }     \end{document}      which is failing with this error:               ERROR: Extra }, or forgotten \endgroup.          --- TeX said ---     \endsa@boxit ...dvarwidth \color@endgroup \egroup           l.8 }      Can you help me figure out what is happening?


title: Using uppercase command for acronyms in Glossary

text: I often use the term **range expansion** in a text. Thus I'd like to abbreviate it using **RE**. When it first occurs in a chapter, The abbreviation should be expalained like this: **Range expansion (RE)**. In my glossary I'd like to have an entry for both, **RE** and **Range expansion**. To make it easier for the reader to find the explanation for **RE** , I linked the description to the entry for **Range expansion** using `\gls`:               \newacronym{RE}{RE}{\gls{RangeExpansion}}     \newglossaryentry{RangeExpansion}{         name        = {range expansion},         description = {A range expansion ...}     }      Now I can use `\gls{RE}` in my text. The first time this happens each chapter, **range expansion (RE)** and afterwards it uses **RE**. At the beginning of a chapter I used the term at the beginning of a sentence - that made me use `\Gls{RE}`, since I'd like the sentence to start with an uppercase letter. But using `\Gls` resulted in the following error messages: > Missing \endcsname inserted \Glspl{RE} and > glossaries: Glossary entry `\MakeUppercase {R}angeExpansion' has not been > defined. \Glspl{RE}\index When I don't link the explanation for `RE`, `\Gls` works fine:               \newacronym{RE}{RE}{range expansion}     \newglossaryentry{RangeExpansion}{         name        = {range expansion},         description = {A range expansion ...}     }      I also tried using `\newacronym{RE}{RE}{\Gls{RangeExpansion}}`, but this didn't work at all. How do I have to call the Link to `RangeExpansion` within the description of the acronym, so that `\gls` **and** `\Gls` work?


title: Plotting several 2d functions in a 3d graph

text: I am trying to reproduce a similar figure to the following one. My first guess was to use `pgfplots` but I didn't find any example that I could use as a starting point. At the moment I am unsure if `pgfplots` is actually the right package or I should rely on something else e.g. `TikZ`. Since I don't really know where to start, I would appreciate any piece of code that points me in the right direction. ![Plot](http://i.stack.imgur.com/lqiMr.jpg) **EDIT** Here is some dummy data for the plots.               plot1   plot2   plot3   plot4     0       0       0       0     3.466   2.058   0       0     4.262   2.976   0.001   0     3.822   3.168   0.006   0.008     2.953   2.936   0.019   0.063     2.065   2.492   0.046   0.265     1.332   1.977   0.092   0.734     0.797   1.478   0.164   1.508     0.443   1.045   0.268   2.44     0.228   0.698   0.412   3.219     0.107   0.438   0.598   3.524     0.046   0.256   0.831   3.219     0.017   0.138   1.109   2.44     0.006   0.067   1.429   1.508     0.002   0.029   1.78    0.734     0       0.01    2.141   0.265     0       0.003   2.479   0.063     0       0.001   2.736   0.008     0       0       2.808   0     0       0       2.465   0     0       0       0       0


title: Show up \included files in table of content

text: In my "main" latex file, I use `\include` to include all my separate `chapter_xxx.tex` files. However, the `\chapter` and `\section` tags inside those chapter files do not show up in the table of contents inside the main file. How can I fix this?


title: Relative overlay specification in beamer?

text: Reading the following quote from the `beamer` manual, I was left a bit confused: > When you write `<.->`, a similar thing as in `<+->` happens _except_ that > the counter `beamerpauses` is not incremented and _except_ that you get the > value of `beamerpauses` decreased by one. Thus a dot, possibly followed by > an offset, just expands to the current value of the counter `beamerpauses` > minus one, possibly offset. I had difficulties in parsing the last sentence, and I found that I cannot answer any of the following questions:   1. Should the specified offset be negative or positive?    2. How should the offset be specified? The manual does not provide any examples.   3. Is the offset incremented (or perhaps) decremented before it is being applied?   4. What's the value of the `beamerpauses` counter _within_ the code to which the overlay is applied?   5. What's the value of this counter _after_ the specification?  ## Minimal Non-Working Example To understand this better, I created the following minimal example, which _does not_ compile.               \documentclass{beamer}     \begin{document}     \newcommand\cn{{\small\emph{\textbf{Beamer pauses is \arabic{beamerpauses}}}}}          \begin{frame}[fragile]\frametitle{Dot Notation in Overlays}       \begin{enumerate}         \item This is my first item, no overlay specification; \cn         \item<+-> This is my second item, overlay specification is \verb/<+->/; \cn         \item<.-> This is my third item, overlay specification is \verb/<.->/; \cn         \item This is my fourth item, no overlay specification; \cn         \item<.-> This is my fifth item, overlay specification is \verb/<.->/; \cn         \item<.(1)-> This is my sixth item, overlay specification is \verb/<.(1)->/; \cn         \item This is my seventh item, no overlay specification; \cn         \item<.(-1)-> This is my eighth item, overlay specification is \verb/<.(-1)->/; \cn         \item This is my ninth item, no overlay specification; \cn         \item<.(-2)-> This is my tenth item, overlay specification is \verb/<.(-2)->/; \cn         \item This is my eleventh item, no overlay specification; \cn         \item<.(+1)-> This is my twelfth item, overlay specification is \verb/<.(+1)->/; \cn         \item This is my thirteenth item, no overlay specification; \cn         \item<.(+2)-> This is my fourteenth item, overlay specification is \verb/<.(+2)->/; \cn         \item This is my fifteenth and final item, with no overlay specification; \cn       \end{enumerate}     \end{frame}     \end{document}      The error message I got was:               Runaway argument?     ! File ended while scanning use of \next.     <inserted text>                      \par      <*> myfile.tex          ?        My requests is then: can you help my compile this example, and, more importantly, explain the output in view of the general principles I failed to discover. * * * ## Minimal _Working_ Example The following example explains what I have discovered so far, also based on the discussion below.               \documentclass{beamer}     \usepackage{color}       \newcommand\red[1]{\textcolor{red}{#1} }       \newcommand\blue[1]{\textcolor{blue}{#1} }            \makeatletter     \newcommand*{\overlaynumber}{\number\beamer@slideinframe}     \makeatother          \newcommand\noOverlay{\red{No OS---permanent} \cn}     \newcommand\plusMinus{\blue{OS is \texttt{<+->};} \cn}     \usepackage{multicol}\raggedcolumns          \newcommand\ct{\texttt{\textbackslash{}beamerpauses}}     \newcommand\cn{\hfill\textcolor{green!50!black}{\tiny\ct=\arabic{beamerpauses}}}     \begin{document}     \scriptsize     \renewcommand\baselinestretch{0.8}     \begin{frame}\frametitle{Beamer's Overlay Specification (OS) With \texttt{<.$X$>}}       \alert{\textbf{Slide \#\overlaynumber}}       \begin{multicols*}{2}         \begin{enumerate}           \item\noOverlay            \item<+->\plusMinus           \item<+->\plusMinus           \item<+->\plusMinus           \item\noOverlay           \item<.->OS \texttt{<.->} means \emph{present with last overlay},         without advancing \ct; \cn           \item\noOverlay           \item<.(0)->OS \texttt{<.(0)->} is just the same as \texttt{<.->}; \cn           \item<.-> in fact, all consecutive occurrences of the \texttt{<.->} OS are displayed together. \cn           \item\noOverlay            \item\plusMinus           \item<.(-1)-> OS, \texttt{<.(-1)->} means: present the overlayed              content \emph{\underline{two} slides before} the current value of \ct; \ct{} does not change; \cn           \item<+->\plusMinus           \item<+->\plusMinus           \item<.(-2)-> OS \texttt{<.(-2)->} means: present the overlayed              content \emph{\underline{three} slides before} the current value of counter  \ct; as usual, the counter \ct{} does not change; \cn           \item\noOverlay           \item<.(1)->  OS \texttt{<.(1)->} means:             present with \emph{current} overlay; do not advance \ct; \cn           \item\noOverlay           \item<.(2)->  OS \texttt{<.(2)->} means:             present with \emph{next} overlay; do not advance \ct; \cn           \item<.(3)->  Similarly, OS \texttt{<.(3)->} means:             present with overlay \emph{after the next}; as usual, do not advance \ct; \cn             \item\noOverlay             \item<+->\plusMinus             \item\noOverlay             \item<+->\plusMinus             \item<+->\plusMinus             \item<+->\plusMinus           \end{enumerate}         \end{multicols*}       \end{frame}     \end{document}


title: Creating macros for common commutative diagrams in tikz

text: I am currently typesetting a document which requires many commutative diagrams of the same shape and construction, but with different labels at the vertices and edges. For example, I want a commutative diagram which describes the associative structure of an algebra. This I can do with:               \begin{equation}     \begin{tikzpicture}[baseline=(current bounding box.center)]     \matrix(m)[matrix of math nodes,     row sep=2.6em, column sep=2.8em,     text height=2ex, text depth=0.5ex]     {(A\otimes A)\otimes A& & A\otimes (A\otimes A)\\     A\otimes A& &A\otimes A\\      &A& \\};     \path[->,font=\normalsize,>=angle 90]     (m-1-1) edge node[auto] {$\mu\otimes Id$} (m-2-1)     (m-2-1) edge node[auto] {$\mu$} (m-3-2)     (m-1-3) edge node[auto] {$ Id\otimes\mu$} (m-2-3)     (m-2-3) edge node[auto] {$ \mu$} (m-3-2);     \path[<->, font=\normalsize,>=angle 90]     (m-1-1) edge node[auto] {$\alpha$} (m-1-3);     \end{tikzpicture}     \end{equation}      In the same section, I also want to use a commutative diagram to express the monoidal structure of a group. In my document as it stands, this is exactly the same code, but with different labels. As I go forward, I know that this is a diagram which I will likely use very often, and would like to not have to copy and paste this exact code into each new document. I naively tried using `\newcommand{\monoid}[8]{...}` to wrap the whole thing, however this did not work. Is there a way to define a macro around this environment so that I can specify only the arguments I need and not be cluttered by having to copy and paste the whole block every time?


title: Problems with whiskers and outliers in boxplot

text: I'm trying to reproduce a boxplot from MATLAB using LaTeX. Unfortunately boxplot seems unable to draw outliers and also whiskers have some problems, see figure. ![enter image description here](http://i.stack.imgur.com/5b5DP.png) The first two boxes seem to have problems with their whiskers: they simply shouldn't be present.   Moreover, in the entire plot, outliers are missing, while in the MATLAB version they are present. Here's the MATLAB version: ![enter image description here](http://i.stack.imgur.com/ttXcu.png) This is the LaTeX code:               \documentclass[11pt,a4paper,twoside,openright]{report}     \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{pgfplots.statistics}     \usepackage{algorithm}     \usepackage{algorithmic}     \usepackage[T1]{fontenc}      \usepackage[utf8]{inputenc}     \usepackage{color}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{array}      \usepackage{verbatim}     \usepackage{caption}     \usepackage{epstopdf}          \usepackage{caption}     \usepackage{subcaption}     \usepackage{tcolorbox}               \begin{document}     \begin{tikzpicture}     \begin{semilogyaxis}[     boxplot/draw direction=y,     xtick={1,2,3,4,5,6},     xticklabels={3, 4, 5, 6, 7, 8},     xlabel=number,     ylabel={time[s]},     boxplot/variable width,     boxplot/whisker range={1.57},     ]     \addplot[boxplot,box extend=2]     table[row sep=\\,y index=0] {     data\\     0.090000 \\ 0.440000 \\ 0.120000 \\ 0.060000 \\ 0.320000 \\ 0.230000 \\ 0.440000 \\ 0.020000 \\ 0.150000 \\ 0.180000 \\ 0.000000 \\ 0.290000 \\ 0.000000 \\ 0.110000 \\ 0.260000 \\ 0.110000 \\ 0.000000 \\ 0.450000 \\ 0.040000 \\ 0.140000 \\ 0.030000 \\ 0.120000 \\ 0.140000 \\ 0.310000 \\ 0.060000 \\ 0.060000 \\ 0.110000 \\ 0.120000 \\ 0.120000 \\ 0.120000 \\ 0.130000 \\ 0.010000 \\ 0.400000 \\ 0.010000 \\ 0.030000 \\ 0.170000 \\ 0.000000 \\ 0.100000 \\ 0.150000 \\ 0.160000 \\ 0.060000 \\ 0.100000 \\ 0.010000 \\ 0.600000 \\ 0.260000 \\ 0.110000 \\ 0.150000 \\ 0.220000 \\ 0.140000 \\ 0.010000 \\      };     \addplot[boxplot,box extend=2]     table[row sep=\\,y index=0] {     data\\     0.070000 \\ 0.490000 \\ 0.340000 \\ 0.200000 \\ 0.020000 \\ 1.080000 \\ 6.830000 \\ 0.310000 \\ 0.540000 \\ 0.020000 \\ 0.290000 \\ 0.180000 \\ 0.600000 \\ 0.090000 \\ 0.610000 \\ 1.370000 \\ 0.260000 \\ 0.030000 \\ 2.300000 \\ 0.090000 \\ 3.150000 \\ 0.130000 \\ 0.290000 \\ 0.270000 \\ 1.300000 \\ 0.730000 \\ 0.630000 \\ 0.240000 \\ 10.030000 \\ 0.000000 \\ 0.260000 \\ 0.180000 \\ 3.290000 \\ 2.430000 \\ 1.940000 \\ 0.220000 \\ 0.230000 \\ 0.600000 \\ 1.690000 \\ 0.350000 \\ 3.960000 \\ 0.560000 \\ 9.900000 \\ 0.100000 \\ 0.430000 \\ 0.220000 \\ 0.260000 \\ 0.310000 \\ 0.290000 \\ 0.790000 \\      };     \addplot[boxplot,box extend=2]     table[row sep=\\,y index=0] {     data\\     12.700000 \\ 1.340000 \\ 0.680000 \\ 0.510000 \\ 1.770000 \\ 0.040000 \\ 3.790000 \\ 287.050000 \\ 1.350000 \\ 5.410000 \\ 15.560000 \\ 3.130000 \\ 0.910000 \\ 7.480000 \\ 2.400000 \\ 1.040000 \\ 3.530000 \\ 0.580000 \\ 31.710000 \\ 7.890000 \\ 4.900000 \\ 2.610000 \\ 0.890000 \\ 0.030000 \\ 3.780000 \\ 8.110000 \\ 4.820000 \\ 1.020000 \\ 5.570000 \\ 8.850000 \\ 0.150000 \\ 17.590000 \\ 0.210000 \\ 8.100000 \\ 2.150000 \\ 3.430000 \\ 6.440000 \\ 1.650000 \\ 6.830000 \\ 23.540000 \\ 0.520000 \\ 1.470000 \\ 0.750000 \\ 3.540000 \\ 3.590000 \\ 5.560000 \\ 0.330000 \\ 8.580000 \\ 1.900000 \\ 0.780000 \\      };     \addplot[boxplot,box extend=2]     table[row sep=\\,y index=0] {     data\\     55.720000 \\ 14.910000 \\ 14.950000 \\ 6.010000 \\ 6.530000 \\ 88.300000 \\ 281.500000 \\ 40.150000 \\ 13.410000 \\ 0.910000 \\ 1.650000 \\ 44.320000 \\ 13.410000 \\ 7.330000 \\ 3.510000 \\ 3.440000 \\ 70.400000 \\ 0.750000 \\ 58.200000 \\ 54.880000 \\ 26.450000 \\ 33.760000 \\ 0.700000 \\ 0.050000 \\ 0.290000 \\ 57.120000 \\ 14.300000 \\ 31.110000 \\ 18.560000 \\ 0.480000 \\ 21.330000 \\ 1.150000 \\ 2.220000 \\ 3.880000 \\ 1.780000 \\ 151.250000 \\ 7.770000 \\ 137.920000 \\ 0.500000 \\ 3.010000 \\ 1.990000 \\ 23.180000 \\ 119.590000 \\ 17.500000 \\ 15.870000 \\ 13.630000 \\ 21.850000 \\ 23.530000 \\ 68.720000 \\ 2.900000 \\      };     \addplot[boxplot,box extend=2]     table[row sep=\\,y index=0] {     data\\     1.190000 \\ 1.940000 \\ 13.400000 \\ 7.400000 \\ 267.300000 \\ 5.940000 \\ 11.050000 \\ 6.510000 \\ 2.940000 \\ 5.450000 \\ 5.240000 \\ 231.000000 \\ 4.480000 \\ 0.680000 \\ 311.290000 \\ 77.470000 \\ 621.200000 \\ 139.080000 \\ 1933.590000 \\ 2.520000 \\ 100.960000 \\ 11.020000 \\ 153.430000 \\ 26.670000 \\ 83.840000 \\ 4.310000 \\ 106.340000 \\ 15.900000 \\ 1118.590000 \\ 9.490000 \\ 131.480000 \\ 48.920000 \\ 5.850000 \\ 3.740000 \\ 1.050000 \\ 32.030000 \\ 5.690000 \\ 45.100000 \\ 12.430000 \\ 238.560000 \\ 28.750000 \\ 1.010000 \\ 119.290000 \\ 12.090000 \\ 31.180000 \\ 16.600000 \\ 29.670000 \\ 138.550000 \\ 17.420000 \\ 0.830000 \\      };     \addplot[boxplot,box extend=2]     table[row sep=\\,y index=0] {     data\\     2077.450000 \\ 762.100000 \\ 469.000000 \\ 143.600000 \\ 685.000000 \\ 3600.000000 \\ 20.200000 \\ 249.600000 \\ 269.000000 \\ 0.300000 \\ 0.200000 \\ 779.400000 \\ 1.800000 \\ 146.800000 \\ 1.300000 \\ 32.500000 \\ 137.000000 \\ 2016.400000 \\ 2.300000 \\ 33.900000 \\ 801.600000 \\ 2.200000 \\ 646.900000 \\ 3600.000000 \\ 1184.000000 \\ 627.000000 \\ 500.500000 \\ 238.300000 \\ 477.400000 \\ 3600.000000 \\ 17.800000 \\ 1726.800000 \\ 2.000000 \\ 316.700000 \\ 174.500000 \\ 2802.700000 \\ 335.300000 \\ 201.200000 \\ 1.100000 \\ 247.100000 \\ 2705.100000 \\ 156.900000 \\ 5.100000 \\ 2342.500000 \\ 3600.000000 \\ 3600.000000 \\ 72.700000 \\ 47.400000 \\ 301.200000 \\ 1.600000 \\      };     \end{semilogyaxis}     \end{tikzpicture}     \end{document}      I also tried to follow this answer's code but something's wrong using my data. I cannot understand what I'm doing wrong.               \documentclass{article}     \usepackage{pgfplots}     \usepackage{filecontents}          \begin{filecontents}{testdata.dat}     3 0.090000 0.440000 0.120000 0.060000 0.320000 0.230000 0.440000 0.020000 0.150000 0.180000 0.000000 0.290000 0.000000 0.110000 0.260000 0.110000 0.000000 0.450000 0.040000 0.140000 0.030000 0.120000 0.140000 0.310000 0.060000 0.060000 0.110000 0.120000 0.120000 0.120000 0.130000 0.010000 0.400000 0.010000 0.030000 0.170000 0.000000 0.100000 0.150000 0.160000 0.060000 0.100000 0.010000 0.600000 0.260000 0.110000 0.150000 0.220000 0.140000 0.010000      4 0.070000 0.490000 0.340000 0.200000 0.020000 1.080000 6.830000 0.310000 0.540000 0.020000 0.290000 0.180000 0.600000 0.090000 0.610000 1.370000 0.260000 0.030000 2.300000 0.090000 3.150000 0.130000 0.290000 0.270000 1.300000 0.730000 0.630000 0.240000 10.030000 0.000000 0.260000 0.180000 3.290000 2.430000 1.940000 0.220000 0.230000 0.600000 1.690000 0.350000 3.960000 0.560000 9.900000 0.100000 0.430000 0.220000 0.260000 0.310000 0.290000 0.790000      5 12.700000 1.340000 0.680000 0.510000 1.770000 0.040000 3.790000 287.050000 1.350000 5.410000 15.560000 3.130000 0.910000 7.480000 2.400000 1.040000 3.530000 0.580000 31.710000 7.890000 4.900000 2.610000 0.890000 0.030000 3.780000 8.110000 4.820000 1.020000 5.570000 8.850000 0.150000 17.590000 0.210000 8.100000 2.150000 3.430000 6.440000 1.650000 6.830000 23.540000 0.520000 1.470000 0.750000 3.540000 3.590000 5.560000 0.330000 8.580000 1.900000 0.780000      6 55.720000 14.910000 14.950000 6.010000 6.530000 88.300000 281.500000 40.150000 13.410000 0.910000 1.650000 44.320000 13.410000 7.330000 3.510000 3.440000 70.400000 0.750000 58.200000 54.880000 26.450000 33.760000 0.700000 0.050000 0.290000 57.120000 14.300000 31.110000 18.560000 0.480000 21.330000 1.150000 2.220000 3.880000 1.780000 151.250000 7.770000 137.920000 0.500000 3.010000 1.990000 23.180000 119.590000 17.500000 15.870000 13.630000 21.850000 23.530000 68.720000 2.900000      7 1.190000 1.940000 13.400000 7.400000 267.300000 5.940000 11.050000 6.510000 2.940000 5.450000 5.240000 231.000000 4.480000 0.680000 311.290000 77.470000 621.200000 139.080000 1933.590000 2.520000 100.960000 11.020000 153.430000 26.670000 83.840000 4.310000 106.340000 15.900000 1118.590000 9.490000 131.480000 48.920000 5.850000 3.740000 1.050000 32.030000 5.690000 45.100000 12.430000 238.560000 28.750000 1.010000 119.290000 12.090000 31.180000 16.600000 29.670000 138.550000 17.420000 0.830000      8 2077.450000 762.100000 469.000000 143.600000 685.000000 3600.000000 20.200000 249.600000 269.000000 0.300000 0.200000 779.400000 1.800000 146.800000 1.300000 32.500000 137.000000 2016.400000 2.300000 33.900000 801.600000 2.200000 646.900000 3600.000000 1184.000000 627.000000 500.500000 238.300000 477.400000 3600.000000 17.800000 1726.800000 2.000000 316.700000 174.500000 2802.700000 335.300000 201.200000 1.100000 247.100000 2705.100000 156.900000 5.100000 2342.500000 3600.000000 3600.000000 72.700000 47.400000 301.200000 1.600000      \end{filecontents}          \pgfplotsset{         box plot/.style={             /pgfplots/.cd,             black,             only marks,             mark=-,             mark size=1em,             /pgfplots/error bars/.cd,             y dir=plus,             y explicit,         },         box plot box/.style={             /pgfplots/error bars/draw error bar/.code 2 args={%                 \draw  ##1 -- ++(1em,0pt) |- ##2 -- ++(-1em,0pt) |- ##1 -- cycle;             },             /pgfplots/table/.cd,             y index=2,             y error expr={\thisrowno{3}-\thisrowno{2}},             /pgfplots/box plot         },         box plot top whisker/.style={             /pgfplots/error bars/draw error bar/.code 2 args={%                 \pgfkeysgetvalue{/pgfplots/error bars/error mark}%                 {\pgfplotserrorbarsmark}%                 \pgfkeysgetvalue{/pgfplots/error bars/error mark options}%                 {\pgfplotserrorbarsmarkopts}%                 \path ##1 -- ##2;             },             /pgfplots/table/.cd,             y index=4,             y error expr={\thisrowno{2}-\thisrowno{4}},             /pgfplots/box plot         },         box plot bottom whisker/.style={             /pgfplots/error bars/draw error bar/.code 2 args={%                 \pgfkeysgetvalue{/pgfplots/error bars/error mark}%                 {\pgfplotserrorbarsmark}%                 \pgfkeysgetvalue{/pgfplots/error bars/error mark options}%                 {\pgfplotserrorbarsmarkopts}%                 \path ##1 -- ##2;             },             /pgfplots/table/.cd,             y index=5,             y error expr={\thisrowno{3}-\thisrowno{5}},             /pgfplots/box plot         },         box plot median/.style={             /pgfplots/box plot         }     }          \begin{document}     \begin{tikzpicture}     \begin{axis} [              ymode=log,             enlarge x limits=0.5,             xtick=data]         \addplot [box plot median] table {testdata.dat};         \addplot [box plot box] table {testdata.dat};         \addplot [box plot top whisker] table {testdata.dat};         \addplot [box plot bottom whisker] table {testdata.dat};     \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/z9F1y.png)


title: Tikz: how to plot arcsec and arccos?

text: It is easy to plot arctan and arccot, but got inverse sec and csc functions, It seems difficult. Can anyone do it?


title: Is there a ditto symbol?

text: I believe that a symbol -||- is commonly used to indicate repetition of a fragment of text. The problem is that typesetting it using dashes and pipes looks kind of ugly. Is there a predefined symbol for that? **EDIT** : Seems this is a localized version of a ditto mark: http://en.wikipedia.org/wiki/Ditto_mark Is there a way to typeset it in LaTeX?


title: custom counter and cross-referencing

text: I created a custom counter 'rtaskno' and a command '\rtask' as following:               \newcounter{rtaskno}     \newcommand{\rtask}{%        \stepcounter{rtaskno}%        \thertaskno}      I like to use them as following:               \section{Task \rtask. Blah Blah..}          \section{Task \rtask. Blah Blah..}          \section{Task \rtask. Blah Blah..}          \section{Task \rtask. Blah Blah..}      Later in the text, if I want to cross-reference 'Task 3', how can I do it? Where to put label?


title: Calligraphic fonts for chapters,

text: I'm currently using calligraphic font and it works fine with 1 exception: Chapter/Section and title aren't affected by it. How can it be made that they too can be affected (and if its a general way how can it be done that the title is not affected but chapters and sections)?               \documentclass[10pt,a4paper,BCOR10mm,DIV11,toc=listof,parskip=full, openany]{scrbook}     \usepackage{etoolbox}     \usepackage{xpatch}     \makeatletter     \renewcommand{\chapterheadstartvskip}{\vspace{0pt}}     \renewcommand{\chapterheadendvskip}{\vspace{\baselineskip}}     \patchcmd{\section}{-3.5ex \@plus -1ex \@minus -.2ex}{-\z@}{}{}      \patchcmd{\section}{2.3ex \@plus .2ex}{1sp}{}{}      \patchcmd{\subsection}{-3.25ex\@plus -1ex \@minus -.2ex}{-\z@}{}{}     \patchcmd{\subsection}{1.5ex \@plus .2ex}{1sp}{}{}     \patchcmd{\subsubsection}{-3.25ex\@plus -1ex \@minus -.2ex}{-\z@}{}{}     \patchcmd{\subsubsection}{1.5ex \@plus .2ex}{1sp}{}{}     \patchcmd{\@xsect}{\ignorespaces}{\vspace*{-.5\baselineskip}\ignorespaces}{}{}               \xpatchcmd{\maketitle}{\if@twoside\next@tpage}{\iffalse}{}{}          \makeatother          \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{booktabs}                 \usepackage{multicol}                 \usepackage[usenames,svgnames, dvipsnames]{xcolor}     \usepackage{graphicx,eso-pic}     \usepackage{ulem}     \usepackage[pages=some]{background}          \newenvironment{calligraphic}%     {\usefont{T1}{pzc}{m}{it}}%     {}%          \begin{document}     \begin{calligraphic}     \maktetitle     \tableofcontents     \chapter{test1}     mytesttext     \end{calligraphic}     \end{document}


title: Generate revision history with rcs-multi

text: Is it possible to generate a page that collates all the revisions logs in multiple `tex` files with `rcs-multi`? And while trying to understand the example file, the line               \rcsid{$Id: example.tex,v 1.2 2009/03/23 19:07:46 martin Exp martin $}      gets a               "File ended while scanning use of \rcs@striptrailingspace"       error. Why is that?


title: column tabloids versus row tabloids

text: I'm trying to use the ytableau package to make tabloids that are column tabloids not row tabloids as in this example:               \documentclass{standalone}     \usepackage{ytableau}     \begin{document}     \ytableausetup{tabloids,centertableaux}     \ytableaushort{123,45,6}     \end{document}      Drawing Young tabloids Is there an easy way to delete the row edges instead of the columns edges? In particular, I'd like to have an option for htabloids or vtabloids.


title: HashMap in Latex

text: In Sorting according to more than one key in pgfplotstable, I added the column `Kind` by hand. I need to define mapping between the column `Mtx` and the column `Kind` in latex code or in another raw text file. That is, `A` will map to `LP`, `C` will map to `OPT`, etc. This is like using `HashMap<String, String>` in Java. I include the MWE in the previously-mentioned question here also because after mapping operations, following sorting method will be used:               \documentclass[a4paper]{standalone}          \usepackage{pgfplots}          \usepackage{pgfplotstable}          \begin{document}          \def\pgfplotsinvokeiflessthan#1#2#3#4{%         \pgfkeysvalueof{/pgfplots/iflessthan/.@cmd}{#1}{#2}{#3}{#4}\pgfeov     }%     \def\pgfplotsmulticmpthree#1#2#3#4#5#6\do#7#8{%         \pgfplotsset{string <}%         \pgfplotsinvokeiflessthan{#1}{#4}{%             % first key <:             #7%         }{%             \pgfplotsinvokeiflessthan{#4}{#1}{%                 % first key >:                 #8%             }{%                 % first key ==:                 \pgfplotsset{string <}%                 \pgfplotsinvokeiflessthan{#2}{#5}{%                     % second key <                     #7%                 }{%                     \pgfplotsinvokeiflessthan{#5}{#2}{%                         % second key >                         #8%                     }{%                         % second key ==                         \pgfplotsset{float <}%                         \pgfplotsinvokeiflessthan{#3}{#6}{%                             % third key <                             #7%                         }{%                             % third key >=                             #8%                         }%                     }%                 }%             }%         }%     }%          \pgfplotstabletypeset[         create on use/sortkey/.style={             create col/assign/.code={%                 \edef\entry{{\thisrow{Kind}}{\thisrow{Mtx}}{\thisrow{P}}}%                 \pgfkeyslet{/pgfplots/table/create col/next content}\entry             }         },         sort key=sortkey,         sort cmp={%             iflessthan/.code args={#1#2#3#4}{%                 \edef\temp{#1#2}%                 \expandafter\pgfplotsmulticmpthree\temp\do{#3}{#4}%             },         },         sort,         columns/Mtx/.style={string type},         columns/Kind/.style={string type},     ]{     Mtx Kind P   Sp     A   LP   16  4.2     C   OPT  16  72.5     A   LP   64  20.3     B   OPT  16  5.7     B   OPT  64  16.4     A   LP   256 90.4     }     \end{document}


title: Adding sectioning support in scrlttr2 class

text: It seems like by default the `scrlttr2` class doesn't support sectioning, that is the command `\section` or `\paragraph` returns errors. How can one add sectioning support to a latter basing on `scrlttr2`?


title: Nested rectangles

text: I am trying to get this figure: ![enter image description here](http://i.stack.imgur.com/2643B.jpg) The figure is generated by the following code:               \documentclass[10pt]{article}     \usepackage{tikz}     \usetikzlibrary{fit,shapes,backgrounds,arrows}          \begin{document}           \begin{tikzpicture}     \tikzstyle{bigbox} = [minimum width=3.5cm, minimum height=4.2cm,draw, thick, rounded corners, rectangle]     \tikzstyle{bigbox2} = [minimum width=2cm, draw, thick, rounded corners, rectangle]     \tikzstyle{box} = [minimum width=2.7cm, rounded corners,rectangle]          \begin{scope}[every node/.style={minimum width=2cm,minimum height=1.5cm,draw,inner sep=0pt}]      \node [txtstyle] (n1) {};      \node [txtstyle,xshift=2cm] (n2) {};         \node [txtstyle,xshift= 4cm] (n3) {};      \end{scope}          \begin{scope}[every node/.style={text width=2cm,anchor=north west,text height=2.86cm,draw}]     \node [txtstyle,xshift=4.985cm,yshift=0.76cm] (n4) {};          \end{scope}     \begin{scope}[every node/.style={text width=5.77cm,anchor=north west,text height=0.3cm,text centered}]     \node [txtstyle,xshift=-1.01cm,yshift=-0.733cm,draw] (n5) {}; %     \node [txtstyle,xshift=-1.01cm,yshift=-1.27cm,draw] (n6) {}; %     \node [txtstyle,xshift=-1.01cm,yshift=-1.8cm,draw] (n7) {}; %          \node  at (n5.north west){Query Compiler};          \node  at (n6.north west){Query Optimizer};          \node  at (n7.north west){Query Executor};          \end{scope}          \begin{scope}[every node/.style={text width=2cm,anchor=north west,text centered}]          \node  at (n1.north west){Command \\ Line \\ Interface};           \node  at (n2.north west){Web \\ Interface};            \node  at (n3.north west){JDBC/ \\ ODBC \\ Server};          \node  at (n4.north west){ ~\\ ~\\  ~\\ Meta \\ Data \\~ \\};     \end{scope}          \begin{pgfonlayer}{background}       \node[bigbox] [fit = (n1) (n4)] (box) {};     \end{pgfonlayer}          \node[box,above of=n1,xshift=0.5cm] (us) {Upper System Level};     %     %     %     \begin{scope}[every node/.style={minimum width=2cm,minimum height=0.5cm,rounded corners,inner sep=0pt}]       \node [txtstyle,below of=box,yshift=-2.5cm,draw] (h1) {Master};       \node [txtstyle,below left of=h1,yshift=-0.5cm,xshift=-2.3cm,draw] (h2) {Slave};       \node [txtstyle,below  of=h1,yshift=-0.3cm] (h3) {...};       \node [txtstyle,below right of=h1,yshift=-0.5cm,xshift=2.3cm,draw] (h4) {Slave};       \node [txtstyle,above of=h2,yshift=0.3cm] (hd) {Hadooop};     \end{scope}          \begin{pgfonlayer}{background}       \node[bigbox2] [fit = (hd) (h4)] (box2) {};           \draw[<->,>=latex', shorten >=2pt, shorten <=2pt,thick] (h1.200) to (h2.north);      \draw[<->,>=latex', shorten >=2pt, shorten <=2pt,thick] (h1.340) to (h4.north);        \draw[             -triangle 90,             line width=1.5mm,             postaction={draw, line width=0.4cm, shorten >=0.2cm, -}         ] (box.south) -- (box2.north);     \end{pgfonlayer}          \end{tikzpicture}     \end{document}      This is a combination of a bunch of code I found on this site. It generates what I want, except that it complains about the `\tikzstyle` command, indicating that it doesn't know what it is and that it will ignore it (yet it generates what I want when I force it to complete compilation). The code seems quite crude and inelegant. In my quest to learn tikz better, I thought I would ask the experts on this forum if there is a cleaner way of achieving what I wish.


title: How can I make texmaker autocomplete commands that it doesn't already autocomplete?

text: When I write               \begin{      in texmaker, I want it to suggest `flalign}` as a possible choice for autocompletion. At the moment, texmaker doesn't complete `\begin{flalign}` automatically; as a result, it also doesn't autocomplete `\end{flalign}`. I've noticed that texmaker fails to autocomplete other commands too... Is there a way to enable autocompletion for those commands in texmaker?


title: How to force pdfminorversion globally?

text: I have a problem with opening PDF files in Acrobat Reader. It comes up with error 131. I have solved this issue thanks to How to overcome Acrobat Reader error 131 with a pdfLaTeX doc? The solution to include `\pdfminorversion=4` works for me, but it's inconvenient to remember about it in every document. So I have two questions, not being a tex superuser:   * how to force this setting globally?   * how to overcome this error in another way? I believe it's somehow related to different images formats I use, but I am not sure yet. On the other hand, should I really care about v1.5? I don't use neither forms nor multimedia, I don't need any file certification.


title: Test if chapter is a valid command

text: I want to test if the class supports chapters. However with the package `titlesec` the check for the command `\chapter` fails because it is always defined:               \documentclass[]{scrartcl}     \usepackage{etoolbox}     \usepackage{titlesec}     \begin{document}     \ifcsdef{chapter}{chapter is defined}{chapter is NOT defined}          \chapter{title}     \end{document}      This prints out: `chapter is defined` I could test before loading `titlesec` and create a boolean that I test, but I would rather want to test it at any point of the document with a single check. How could I do that?


title: Use BibTeX By Unique LaTeX File

text: I'm using Inlage to write my thesis. I made a `.bib` file and I want to use it to obtain my bibliography. I have one `.tex` file where I include all the others.               \documentclass[dvips,letterpaper,12pt, openright]{report}     \usepackage{thesis}          \begin{document}          \pagenumbering{arabic}     \include{Chap1}     \include{Chap2}          \end{document}      What do I have to do in order to use the same bib file for all chapters? And which command do I need to use?


title: How to prevent a large figure occupying entire page?

text: I have to embed a huge figure in a page where at the bottom there should be some text. However, the figure simply occupy a new page -- how to prevent this?