title: Cant scale x-Axis to textwidth

text: I want to plot some measured values. The y-axis contains the the voltage and the x-axis time stamps. I used matlab2tikz to create this plot: ![](http://i.stack.imgur.com/0TMEe.png) If I want to plot the graph, the x-axis is not scaled to the textwidht. How can I scale it so that the complete textwidht is used between xmin and xmax ? Thanks for all the suggestions               \documentclass{article}     \usepackage{pgfplots}     \usetikzlibrary{plotmarks}          \newlength\figureheight      \newlength\figurewidth           \begin{document}     \setlength\figureheight{0.35\textheight}     \setlength\figurewidth{0.9\textwidth}          \begin{tikzpicture}          \begin{axis}[%     width=\figurewidth,     height=\figureheight,     unbounded coords=jump,     view={0}{90},     %scale only axis,     %xscale=1,     xmin=735340.365497685,     xmax=735340.875439815,     xtick=    {735340.465497685,735340.4999357,735340.534373714,735340.568811728,735340.603249743,73534    0.637687757,735340.672125772,735340.706563786,735340.7410018,735340.775439815},     xticklabels=    {11:10:19,11:59:54,12:49:29,13:39:05,14:28:40,15:18:16,16:07:51,16:57:27,17:47:02,18:36:3    8},     %enlargelimits=false,     ymin=46,     ymax=58,     ylabel={Spannung [V]},     %zmin=-1,     %zmax=2,     name=plot1     ]     \addplot [     color=blue,     solid,     forget plot     ]     table[row sep=crcr]{     735340.464791667 49.9\\     735340.465497685 49.9\\     735340.466203704 49.9\\     735340.466909722 49.9\\     735340.467615741 49.9\\     735340.468310185 49.9\\     735340.469050926 49.9\\     735340.469756944 49.9\\     735340.470451389 49.9\\     735340.471157407 49.7\\     735340.471863426 49.5\\     735340.472569444 48.8\\     735340.473263889 49.2\\     735340.473969907 48.8\\     735340.474675926 48.4\\     735340.475381944 48.4\\     735340.476111111 48.3\\     735340.47681713 48.1\\     735340.477523148 48\\     735340.478217593 47.8\\     735340.478923611 48\\     735340.479618056 49.1\\     735340.480324074 49.4\\     735340.481030093 49.3\\     735340.481724537 49.2\\     735340.482430556 48.6\\     735340.483171296 48.7\\     735340.483877315 48.7\\     735340.484583333 50.6\\     735340.485277778 53.6\\     735340.485983796 54.3\\     735340.486689815 53.4\\     735340.487384259 53.9\\     735340.488090278 54.4\\     735340.488796296 54.5\\     735340.489502315 54.5\\     735340.490231482 54.5\\     735340.490925926 54.4\\     735340.491631944 54.5\\     735340.492337963 54.5\\     735340.493032407 54.5\\     735340.493738426 54.5\\     735340.49443287 54.5\\     735340.495138889 54.6\\     735340.495833333 54.6\\     735340.496585648 54.6\\     735340.497291667 54\\     };     \end{axis}     \end{tikzpicture}     \end{document}


title: pgfplots axis clipping large markers

text: In the example below the large markers at the axes are drawn over the axes.               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.8}     \begin{document}          \begin{tikzpicture}[baseline]          \begin{axis}[xmin=0, xmax=1, ymin=0, ymax=1, clip=true]          \addplot+[mark=*, mark size=3pt]         coordinates {         (0.0, 0)         (0.2, 1)         (0.4, 0.8)         (0.6, 0)         (0.8, 0)         (1.0, 0)         };          \end{axis}          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/MzN4N.png) Instead I would like the axes to clip the parts of the markers that leave the axis box area. Also, I would prefer the axis and the axis ticks drawn over the marks. It should like this then: ![enter image description here](http://i.stack.imgur.com/Hb91G.png) Is this possible?


title: dpfloat affects table caption spacing with floatrow

text: I am trying to format two full-page tables such that they appear side-by-side on consecutive pages in a double-sided report. Typically this is easy to achieve using `dpfloat` however, I have found that when used in conjunction with the `floatrow` package the spacing between the table caption and table is much larger than it should be. I have tried using `\captionsetup{belowskip=-5cm}` (from the `caption` package) to adjust the spacing but this does not seem to have any influence. Below is a MWE. If either `floatrow`or `dpfloat` are removed, the table captions return to their correct position. To date I have not had any issues when formatting figures using these two packages. My question is: how can this behaviour be fixed and the captions correctly spaced above each table?               \documentclass{scrbook}     \usepackage[showframe]{geometry}          \usepackage{lipsum} % For dummy text          \usepackage{caption}     \captionsetup{font=normal, format=hang, labelfont=normal, labelsep=colon}          \usepackage{dpfloat}     \usepackage{longtable}     \usepackage{tabu}     \usepackage{multicol, multirow}     \usepackage{booktabs}     \usepackage{threeparttable}           \usepackage{floatrow}     \floatsetup[table]{style=plaintop}          \begin{document}          \chapter{First Chapter}     %     \section{First Section}%     \lipsum[1-4]          \begin{table}%     \centering%     \begin{leftfullpage}%       %\captionsetup{belowskip=-20pt}       \caption{First table caption}%       \begin{tabular}{lllll}%           \toprule%           First\tnote{(1)} & Second & Third & Fourth & Fifth\\%           \midrule%           1 & 2 & 3 & 4 & 5\\%           6 & 7 & 8 & 9 & 10\\%           11 & 12 & 13 & 14 & 15\\%           \bottomrule%       \end{tabular}%     \end{leftfullpage}%     \end{table}%          \begin{table}[p]%     \centering%     \begin{fullpage}%     \begin{threeparttable}%       \caption{Second table caption}%       \begin{tabular}{lllll}%           \toprule%           First\tnote{(1)} & Second & Third & Fourth & Fifth\\%           \midrule%           1 & 2 & 3 & 4 & 5\\%           6 & 7 & 8 & 9 & 10\\%           11 & 12 & 13 & 14 & 15\\%           \bottomrule%       \end{tabular}%       %       \begin{tablenotes}%           \item [(1)] this is note 1%       \end{tablenotes}%     \end{threeparttable}%     \end{fullpage}%     \end{table}%          \lipsum[1-4]%               \end{document}


title: How to enable smart references when using xr-hyper package for producing multi-volume book?

text: I'm using `xr-hyper` package by @David Carlisle and `smartref` package by Giuseppe Bilotta to compile a multi-volume book. `xr-hyper` enables cross- references between different volumes as shows the following code chunk:               \newcommand{Volume}{1}% put this is PlasmaBook1.tex           % This is the code shared by all volumes     \usepackage{xr-hyper}     \usepackage{hyperref}          \ifnum\Volume=1         \externaldocument{PlasmaBook2}         \externaldocument{PlasmaBook3}     \else\ifnum\Volume=2         \externaldocument{PlasmaBook1}         \externaldocument{PlasmaBook3}     \else\ifnum\Volume=3         \externaldocument{PlasmaBook1}         \externaldocument{PlasmaBook2}     \fi\fi\fi      And the package `smartref` is used to hide a portion of equation number as explained in How do I discard a portion of an equation number when cross- referencing?               \usepackage{smartref}     \addtoreflist{chapter}     \newcommand*{\srefaux}[1]{%         \ischapterchanged{#1}% checks if section number has changed         \ifchapterchanged% if current chapter is different             \chapterref{#1}.% put the section reference         \fi% else do nothing         \ref*{#1}%  <- we changed this to ref*     }          \makeatletter     \renewcommand \theequation {\@arabic\c@equation}     \renewcommand \thefigure   {\@arabic\c@figure}     \renewcommand \thetable    {\@arabic\c@table}     \makeatother          \newcommand*\sref[1]{\hyperref[#1]{\srefaux{#1}}}     \newcommand*\seqref[1]{(\hyperref[#1]{\srefaux{#1}})}      Unfortunately, `smartref` mechanism is working only within a single volume. I think this is because `xr-hyper` package reads in only `\newlabel` strings from `aux` files and ignores `\newsmartlabel` tags written by `smartref` as shows the following example borrowed from an actual `aux` file:               \newlabel{ch01}{{1}{6}{Общие сведения о плазме}{chapter.4}{}}     \newsmartlabel{ch01}{{1}{1}}      So my question is > how to instruct `xr-hyper` to read both `\newlabel` and `\newsmartlabel` > tags? Perhaps, appropriate code could be included into new version of `xr-hyper` package.


title: Using text inside \num from siunitx

text: Consider this TikZ drawing of the table of elements (taken from here and edited a bit):               \documentclass{article}          \usepackage{verbatim}     \usepackage{ifpdf}     \usepackage{tikz}     \usetikzlibrary{shapes,calc}     \usepackage[       active,       tightpage     ]{preview}     \usepackage[       locale=DE,       input-decimal-markers={,}     ]{siunitx}          \ifpdf          \else       \usepackage{pst-all}     \fi          \begin{comment}     :Title: Grundstoffernes periodiske system     \end{comment}          \begin{document}          \newcommand{\CommonElementTextFormat}[4]{%       \begin{minipage}{2.2cm}         \centering           {\textbf{#1} \hfill #2}% <----- Here, I would like to change `#2' to `\num{#2}'.           \linebreak \linebreak           {\textbf{#3}}%           \linebreak \linebreak           {{#4}}       \end{minipage}     }          \newcommand{\NaturalElementTextFormat}[4]{%       \CommonElementTextFormat{#1}{#2}{\LARGE {#3}}{#4}     }          \newcommand{\OutlineText}[1]{%       \ifpdf         \pdfliteral direct {0.5 w 1 Tr}{#1}%         \pdfliteral direct {1 w 0 Tr}%       \else         % PSTricks kan gøre dette med \pscharpath.         \pscharpath[           shadow=false,           fillstyle=solid,           fillcolor=white,           linestyle=solid,           linecolor=black,           linewidth=0.2pt         ]{#1}        \fi     }          \newcommand{\SyntheticElementTextFormat}[4]{%       \ifpdf         \CommonElementTextFormat{#1}{#2}{\OutlineText{\LARGE #3}}{#4}       \else         % PSTricks giver output, der er en smule større, så vi skal have lavet boksen lidt mindre.         \CommonElementTextFormat{#1}{#2}{\OutlineText{\Large #3}}{#4}       \fi     }          \begin{preview}     \begin{tikzpicture}[font=\sffamily, scale=0.45, transform shape]          % Farveudfyldning af elementpladser.       \tikzstyle{ElementFill}            = [fill=yellow!15]       \tikzstyle{AlkaliMetalFill}        = [fill=blue!55]       \tikzstyle{AlkalineEarthMetalFill} = [fill=blue!40]       \tikzstyle{TransitionMetalFill}    = [fill=blue!25]       \tikzstyle{MetalFill}              = [fill=blue!15]       \tikzstyle{MetalloidFill}          = [fill=orange!25]       \tikzstyle{NonmetalFill}           = [fill=green!25]       \tikzstyle{HalogenFill}            = [fill=green!40]       \tikzstyle{NobleGasFill}           = [fill=green!55]       \tikzstyle{LanthanideActinideFill} = [fill=purple!25]          % Opsætning af elementpladser.       \tikzstyle{Element}            = [draw=black, ElementFill, minimum width=2.75cm, minimum height=2.75cm, node distance=2.75cm]       \tikzstyle{AlkaliMetal}        = [Element, AlkaliMetalFill]       \tikzstyle{AlkalineEarthMetal} = [Element, AlkalineEarthMetalFill]       \tikzstyle{TransitionMetal}    = [Element, TransitionMetalFill]       \tikzstyle{Metal}              = [Element, MetalFill]       \tikzstyle{Metalloid}          = [Element, MetalloidFill]       \tikzstyle{Nonmetal}           = [Element, NonmetalFill]       \tikzstyle{Halogen}            = [Element, HalogenFill]       \tikzstyle{NobleGas}           = [Element, NobleGasFill]       \tikzstyle{LanthanideActinide} = [Element, LanthanideActinideFill]       \tikzstyle{PeriodLabel}        = [font={\LARGE\sffamily}, node distance=2.0cm]       \tikzstyle{GroupLabel}         = [font={\LARGE\sffamily}, minimum width=2.75cm, node distance=2.0cm]       \tikzstyle{TitleLabel}         = [font={\Huge\bfseries\sffamily}]          % Gruppe 1 - IA       \node[name=H,  Element]                  {\NaturalElementTextFormat{1}{1,00794}{H}{Hydrogen}};       \node[name=Li, below of=H,  AlkaliMetal] {\NaturalElementTextFormat{3}{6,941}{Li}{Litium}};       \node[name=Na, below of=Li, AlkaliMetal] {\NaturalElementTextFormat{11}{22,9897693}{Na}{Natrium}};       \node[name=K,  below of=Na, AlkaliMetal] {\NaturalElementTextFormat{19}{39,0983}{K}{Kalium}};       \node[name=Rb, below of=K,  AlkaliMetal] {\NaturalElementTextFormat{37}{85,4678}{Rb}{Rubidium}};       \node[name=Cs, below of=Rb, AlkaliMetal] {\NaturalElementTextFormat{55}{132,90545196}{Cs}{C{\ae}sium}};       \node[name=Fr, below of=Cs, AlkaliMetal] {\NaturalElementTextFormat{87}{223,0197}{Fr}{Francium}};          % Gruppe 2 - IIA       \node[name=Be, right of=Li, AlkalineEarthMetal] {\NaturalElementTextFormat{4}{9,0121831}{Be}{Beryllium}};       \node[name=Mg, below of=Be, AlkalineEarthMetal] {\NaturalElementTextFormat{12}{24,3050}{Mg}{Magnesium}};       \node[name=Ca, below of=Mg, AlkalineEarthMetal] {\NaturalElementTextFormat{20}{40,078}{Ca}{Calcium}};       \node[name=Sr, below of=Ca, AlkalineEarthMetal] {\NaturalElementTextFormat{38}{87,62}{Sr}{Strontium}};       \node[name=Ba, below of=Sr, AlkalineEarthMetal] {\NaturalElementTextFormat{56}{137,327}{Ba}{Barium}};       \node[name=Ra, below of=Ba, AlkalineEarthMetal] {\NaturalElementTextFormat{88}{226,0254}{Ra}{Radium}};          % Gruppe 3 - IIIB       \node[name=Sc,   right of=Ca,   TransitionMetal]    {\NaturalElementTextFormat{21}{44,955908}{Sc}{Scandium}};       \node[name=Y,    below of=Sc,   TransitionMetal]    {\NaturalElementTextFormat{39}{88,90584}{Y}{Yttrium}};       \node[name=LaLu, below of=Y,    LanthanideActinide] {\NaturalElementTextFormat{57--71}{}{La--Lu}{Lanthanider}};       \node[name=AcLr, below of=LaLu, LanthanideActinide] {\NaturalElementTextFormat{89--103}{}{Ac--\OutlineText{\kern -6pt Lr}}{Actinider}};          % Gruppe 4 - IVB       \node[name=Ti, right of=Sc, TransitionMetal] {\NaturalElementTextFormat{22}{47,867}{Ti}{Titanium}};       \node[name=Zr, below of=Ti, TransitionMetal] {\NaturalElementTextFormat{40}{91,224}{Zr}{Zirkonium}};       \node[name=Hf, below of=Zr, TransitionMetal] {\NaturalElementTextFormat{72}{178,49}{Hf}{Hafnium}};       \node[name=Rf, below of=Hf, TransitionMetal] {\SyntheticElementTextFormat{104}{261,1088}{Rf}{Rutherfordium}};          % Gruppe 5 - VB       \node[name=V,  right of=Ti, TransitionMetal] {\NaturalElementTextFormat{23}{50,9415}{V}{Vanadium}};       \node[name=Nb, below of=V,  TransitionMetal] {\NaturalElementTextFormat{41}{92,90637}{Nb}{Niobium}};       \node[name=Ta, below of=Nb, TransitionMetal] {\NaturalElementTextFormat{73}{180,94788}{Ta}{Tantal}};       \node[name=Db, below of=Ta, TransitionMetal] {\SyntheticElementTextFormat{105}{262,1141}{Db}{Dubnium}};          % Gruppe 6 - VIB       \node[name=Cr, right of=V,  TransitionMetal] {\NaturalElementTextFormat{24}{51,9961}{Cr}{Krom}};       \node[name=Mo, below of=Cr, TransitionMetal] {\NaturalElementTextFormat{42}{95,95}{Mo}{Molybd{\ae}n}};       \node[name=W,  below of=Mo, TransitionMetal] {\NaturalElementTextFormat{74}{183,84}{W}{Wolfram}};       \node[name=Sg, below of=W,  TransitionMetal] {\SyntheticElementTextFormat{106}{266,1219}{Sg}{Seaborgium}};          % Gruppe 7 - VIIB       \node[name=Mn, right of=Cr, TransitionMetal] {\NaturalElementTextFormat{25}{54,938044}{Mn}{Mangan}};       \node[name=Tc, below of=Mn, TransitionMetal] {\NaturalElementTextFormat{43}{97,9072}{Tc}{Technetium}};       \node[name=Re, below of=Tc, TransitionMetal] {\NaturalElementTextFormat{75}{186,207}{Re}{Rhenium}};       \node[name=Bh, below of=Re, TransitionMetal] {\SyntheticElementTextFormat{107}{264,12}{Bh}{Bohrium}};          % Gruppe 8 - VIIIB       \node[name=Fe, right of=Mn, TransitionMetal] {\NaturalElementTextFormat{26}{55,845}{Fe}{Jern}};       \node[name=Ru, below of=Fe, TransitionMetal] {\NaturalElementTextFormat{44}{101,07}{Ru}{Ruthenium}};       \node[name=Os, below of=Ru, TransitionMetal] {\NaturalElementTextFormat{76}{190,23}{Os}{Osmium}};       \node[name=Hs, below of=Os, TransitionMetal] {\SyntheticElementTextFormat{108}{277}{Hs}{Hassium}};          % Gruppe 9 - VIIIB       \node[name=Co, right of=Fe, TransitionMetal] {\NaturalElementTextFormat{27}{58,933194}{Co}{Kobolt}};       \node[name=Rh, below of=Co, TransitionMetal] {\NaturalElementTextFormat{45}{102,90550}{Rh}{Rhodium}};       \node[name=Ir, below of=Rh, TransitionMetal] {\NaturalElementTextFormat{77}{192,217}{Ir}{Iridium}};       \node[name=Mt, below of=Ir, TransitionMetal] {\SyntheticElementTextFormat{109}{268,1388}{Mt}{Meitnerium}};          % Gruppe 10 - VIIIB       \node[name=Ni, right of=Co, TransitionMetal] {\NaturalElementTextFormat{28}{58,6934}{Ni}{Nikkel}};       \node[name=Pd, below of=Ni, TransitionMetal] {\NaturalElementTextFormat{46}{106,42}{Pd}{Palladium}};       \node[name=Pt, below of=Pd, TransitionMetal] {\NaturalElementTextFormat{78}{195,084}{Pt}{Platin}};       \node[name=Ds, below of=Pt, TransitionMetal] {\SyntheticElementTextFormat{110}{271}{Ds}{Darmstadtium}};          % Gruppe 11 - IB       \node[name=Cu, right of=Ni, TransitionMetal] {\NaturalElementTextFormat{29}{63,546}{Cu}{Kobber}};       \node[name=Ag, below of=Cu, TransitionMetal] {\NaturalElementTextFormat{47}{107,8682}{Ag}{S{\o}lv}};       \node[name=Au, below of=Ag, TransitionMetal] {\NaturalElementTextFormat{79}{196,966569}{Au}{Guld}};       \node[name=Rg, below of=Au, TransitionMetal] {\SyntheticElementTextFormat{111}{272,1535}{Rg}{R{\o}ntgenium}};          % Gruppe 12 - IIB       \node[name=Zn,  right of=Cu, TransitionMetal] {\NaturalElementTextFormat{30}{65,38}{Zn}{Zink}};       \node[name=Cd,  below of=Zn, TransitionMetal] {\NaturalElementTextFormat{48}{112,414}{Cd}{Cadmium}};       \node[name=Hg,  below of=Cd, TransitionMetal] {\NaturalElementTextFormat{80}{200,59}{Hg}{Kviks{\o}lv}};       \node[name=Uub, below of=Hg, TransitionMetal] {\SyntheticElementTextFormat{112}{285}{Cn}{Kopernikium}};          % Gruppe 13 - IIIA       \node[name=Ga,  right of=Zn, Metal]     {\NaturalElementTextFormat{31}{69,723}{Ga}{Gallium}};       \node[name=Al,  above of=Ga, Metal]     {\NaturalElementTextFormat{13}{26,9815385}{Al}{Aluminium}};       \node[name=B,   above of=Al, Metalloid] {\NaturalElementTextFormat{5}{10,811}{B}{Bor}};       \node[name=In,  below of=Ga, Metal]     {\NaturalElementTextFormat{49}{114,818}{In}{Indium}};       \node[name=Tl,  below of=In, Metal]     {\NaturalElementTextFormat{81}{204,3833}{Tl}{Tallium}};       \node[name=Uut, below of=Tl, Metal]     {\SyntheticElementTextFormat{113}{286}{Uut}{Ununtrium}};          % Gruppe 14 - IVA       \node[name=C,   right of=B,  Nonmetal]  {\NaturalElementTextFormat{6}{12,0107}{C}{Carbon}};       \node[name=Si,  below of=C,  Metalloid] {\NaturalElementTextFormat{14}{28,0855}{Si}{Silicium}};       \node[name=Ge,  below of=Si, Metalloid] {\NaturalElementTextFormat{32}{72,64}{Ge}{Germanium}};       \node[name=Sn,  below of=Ge, Metal]     {\NaturalElementTextFormat{50}{118,710}{Sn}{Tin}};       \node[name=Pb,  below of=Sn, Metal]     {\NaturalElementTextFormat{82}{207,2}{Pb}{Bly}};       \node[name=Uuq, below of=Pb, Metal]     {\SyntheticElementTextFormat{114}{289}{Uuq}{Ununquadium}};          % Gruppe 15 - VA       \node[name=N,   right of=C,  Nonmetal]  {\NaturalElementTextFormat{7}{14,0067}{N}{Nitrogen}};       \node[name=P,   below of=N,  Nonmetal]  {\NaturalElementTextFormat{15}{30,973761998}{P}{Fosfor}};       \node[name=As,  below of=P,  Metalloid] {\NaturalElementTextFormat{33}{74,921595}{As}{Arsen}};       \node[name=Sb,  below of=As, Metalloid] {\NaturalElementTextFormat{51}{121,760}{Sb}{Antimon}};       \node[name=Bi,  below of=Sb, Metal]     {\NaturalElementTextFormat{83}{208,98040}{Bi}{Bismuth}};       \node[name=Uup, below of=Bi, Metal]     {\SyntheticElementTextFormat{115}{288}{Uup}{Ununpentium}};          % Gruppe 16 - VIA       \node[name=O,   right of=N,  Nonmetal]  {\NaturalElementTextFormat{8}{15,9994}{O}{Oxygen}};       \node[name=S,   below of=O,  Nonmetal]  {\NaturalElementTextFormat{16}{32,065}{S}{Svovl}};       \node[name=Se,  below of=S,  Nonmetal]  {\NaturalElementTextFormat{34}{78,971}{Se}{Selen}};       \node[name=Te,  below of=Se, Metalloid] {\NaturalElementTextFormat{52}{127,60}{Te}{Tellur}};       \node[name=Po,  below of=Te, Metalloid] {\NaturalElementTextFormat{84}{208,9824}{Po}{Polonium}};       \node[name=Uuh, below of=Po, Metal]     {\SyntheticElementTextFormat{116}{289}{Uuh}{Ununhexium}};          % Gruppe 17 - VIIA       \node[name=F,   right of=O,  Halogen] {\NaturalElementTextFormat{9}{18,998403163}{F}{Flour}};       \node[name=Cl,  below of=F,  Halogen] {\NaturalElementTextFormat{17}{35,453}{Cl}{Klor}};       \node[name=Br,  below of=Cl, Halogen] {\NaturalElementTextFormat{35}{79,904}{Br}{Brom}};       \node[name=I,   below of=Br, Halogen] {\NaturalElementTextFormat{53}{126,90447}{I}{Jod}};       \node[name=At,  below of=I,  Halogen] {\NaturalElementTextFormat{85}{209,9871}{At}{Astat}};       \node[name=Uus, below of=At, Element] {\SyntheticElementTextFormat{117}{292}{Uus}{Ununseptium}};           % Gruppe 18 - VIIIA       \node[name=Ne,  right of=F,  NobleGas] {\NaturalElementTextFormat{10}{20,1797}{Ne}{Neon}};       \node[name=He,  above of=Ne, NobleGas] {\NaturalElementTextFormat{2}{4,002602}{He}{Helium}};       \node[name=Ar,  below of=Ne, NobleGas] {\NaturalElementTextFormat{18}{39,948}{Ar}{Argon}};       \node[name=Kr,  below of=Ar, NobleGas] {\NaturalElementTextFormat{36}{83,798}{Kr}{Krypton}};       \node[name=Xe,  below of=Kr, NobleGas] {\NaturalElementTextFormat{54}{131,293}{Xe}{Xenon}};       \node[name=Rn,  below of=Xe, NobleGas] {\NaturalElementTextFormat{86}{222,0176}{Rn}{Radon}};       \node[name=Uuo, below of=Rn, NobleGas] {\SyntheticElementTextFormat{118}{293}{Uuo}{Ununoctium}};           % Perioder.       \node[name=Period1, left of=H,  PeriodLabel] {1};       \node[name=Period2, left of=Li, PeriodLabel] {2};       \node[name=Period3, left of=Na, PeriodLabel] {3};        \node[name=Period4, left of=K,  PeriodLabel] {4};        \node[name=Period5, left of=Rb, PeriodLabel] {5};       \node[name=Period6, left of=Cs, PeriodLabel] {6};       \node[name=Period7, left of=Fr, PeriodLabel] {7};          % Grupper.       \node[name=Group1,  above of=H,  GroupLabel]  {1 \hfill IA};       \node[name=Group2,  above of=Be, GroupLabel]  {2 \hfill IIA};       \node[name=Group3,  above of=Sc, GroupLabel]  {3 \hfill IIIB};       \node[name=Group4,  above of=Ti, GroupLabel]  {4 \hfill IVB};       \node[name=Group5,  above of=V,  GroupLabel]  {5 \hfill VB};       \node[name=Group6,  above of=Cr, GroupLabel]  {6 \hfill VIB};       \node[name=Group7,  above of=Mn, GroupLabel]  {7 \hfill VIIB};       \node[name=Group8,  above of=Fe, GroupLabel]  {8 \hfill VIIIB};       \node[name=Group9,  above of=Co, GroupLabel]  {9 \hfill VIIIB};       \node[name=Group10, above of=Ni, GroupLabel] {10 \hfill VIIIB};       \node[name=Group11, above of=Cu, GroupLabel] {11 \hfill IB};       \node[name=Group12, above of=Zn, GroupLabel] {12 \hfill IIB};       \node[name=Group13, above of=B,  GroupLabel] {13 \hfill IIIA};       \node[name=Group14, above of=C,  GroupLabel] {14 \hfill IVA};       \node[name=Group15, above of=N,  GroupLabel] {15 \hfill VA};       \node[name=Group16, above of=O,  GroupLabel] {16 \hfill VIA};       \node[name=Group17, above of=F,  GroupLabel] {17 \hfill VIIA};       \node[name=Group18, above of=He, GroupLabel] {18 \hfill VIIIA};          % lanthanider.       \node[name=La, below of=Rf, LanthanideActinide, yshift=-1cm] {\NaturalElementTextFormat{57}{138,90547}{La}{Lanthan}};       \node[name=Ce, right of=La, LanthanideActinide]              {\NaturalElementTextFormat{58}{140,116}{Ce}{Cerium}};       \node[name=Pr, right of=Ce, LanthanideActinide]              {\NaturalElementTextFormat{59}{140,90766}{Pr}{Praseodym}};       \node[name=Nd, right of=Pr, LanthanideActinide]              {\NaturalElementTextFormat{60}{144,242}{Nd}{Neodym}};       \node[name=Pm, right of=Nd, LanthanideActinide]              {\NaturalElementTextFormat{61}{144,9127}{Pm}{Promethium}};       \node[name=Sm, right of=Pm, LanthanideActinide]              {\NaturalElementTextFormat{62}{150,36}{Sm}{Samarium}};       \node[name=Eu, right of=Sm, LanthanideActinide]              {\NaturalElementTextFormat{63}{151,964}{Eu}{Europium}};       \node[name=Gd, right of=Eu, LanthanideActinide]              {\NaturalElementTextFormat{64}{157,25}{Gd}{Gadolinium}};       \node[name=Tb, right of=Gd, LanthanideActinide]              {\NaturalElementTextFormat{65}{158,92535}{Tb}{Terbium}};       \node[name=Dy, right of=Tb, LanthanideActinide]              {\NaturalElementTextFormat{66}{162,500}{Dy}{Dysprosium}};       \node[name=Ho, right of=Dy, LanthanideActinide]              {\NaturalElementTextFormat{67}{164,93033}{Ho}{Holmium}};       \node[name=Er, right of=Ho, LanthanideActinide]              {\NaturalElementTextFormat{68}{167,259}{Er}{Erbium}};       \node[name=Tm, right of=Er, LanthanideActinide]              {\NaturalElementTextFormat{69}{168,93422}{Tm}{Thulium}};       \node[name=Yb, right of=Tm, LanthanideActinide]              {\NaturalElementTextFormat{70}{173,054}{Yb}{Ytterbium}};       \node[name=Lu, right of=Yb, LanthanideActinide]              {\NaturalElementTextFormat{71}{174,9668}{Lu}{Lutetium}};          % actinider.       \node[name=Ac, below of=La, LanthanideActinide, yshift=-1cm] {\NaturalElementTextFormat{89}{227,0277}{Ac}{Actinium}};       \node[name=Th, right of=Ac, LanthanideActinide]              {\NaturalElementTextFormat{90}{232,0377}{Th}{Thorium}};       \node[name=Pa, right of=Th, LanthanideActinide]              {\NaturalElementTextFormat{91}{231,03588}{Pa}{Protactinium}};       \node[name=U , right of=Pa, LanthanideActinide]              {\NaturalElementTextFormat{92}{238,02891}{U}{Uran}};       \node[name=Np, right of=U,  LanthanideActinide]              {\SyntheticElementTextFormat{93}{237,0482}{Np}{Neptunium}};       \node[name=Pu, right of=Np, LanthanideActinide]              {\SyntheticElementTextFormat{94}{244,0642}{Pu}{Plutonium}};       \node[name=Am, right of=Pu, LanthanideActinide]              {\SyntheticElementTextFormat{95}{243,0614}{Am}{Americium}};       \node[name=Cm, right of=Am, LanthanideActinide]              {\SyntheticElementTextFormat{96}{247,0704}{Cm}{Curium}};       \node[name=Bk, right of=Cm, LanthanideActinide]              {\SyntheticElementTextFormat{97}{247,0703}{Bk}{Berkelium}};       \node[name=Cf, right of=Bk, LanthanideActinide]              {\SyntheticElementTextFormat{98}{251,0796}{Cf}{Californium}};       \node[name=Es, right of=Cf, LanthanideActinide]              {\SyntheticElementTextFormat{99}{252,0830}{Es}{Einsteinium}};       \node[name=Fm, right of=Es, LanthanideActinide]              {\SyntheticElementTextFormat{100}{257,0951}{Fm}{Fermium}};       \node[name=Md, right of=Fm, LanthanideActinide]              {\SyntheticElementTextFormat{101}{258,0984}{Md}{Mendelevium}};       \node[name=No, right of=Md, LanthanideActinide]              {\SyntheticElementTextFormat{102}{259,1010}{No}{Nobelium}};       \node[name=Lr, right of=No, LanthanideActinide]              {\SyntheticElementTextFormat{103}{262,1097}{Lr}{Lawrencium}};          % Prikkede linjer, der forbinder lanthaniderne med hovedtabellen.       \draw (LaLu.north west) edge[dotted] (La.north west)             (LaLu.north east) edge[dotted] (Lu.north east)             (LaLu.south west) edge[dotted] (La.south west)             (LaLu.south east) edge[dotted] (Lu.south east);          % Prikkede linjer, der forbinder actiniderne med hovedtabellen.       \draw (AcLr.north west) edge[dotted] (Ac.north west)             (AcLr.north east) edge[dotted] (Lr.north east)             (AcLr.south west) edge[dotted] (Ac.south west)             (AcLr.south east) edge[dotted] (Lr.south east);          % Placering af figurforklaringer.       \draw[black, AlkaliMetalFill] ($(La.north -| Fr.west) + (1em,1.3em)$)         rectangle +(1em, 1em) node[right, yshift=-1ex]{Alkalimetal};       \draw[black, AlkalineEarthMetalFill] ($(La.north -| Fr.west) + (1em,-0.2em)$)         rectangle +(1em, 1em) node[right, yshift=-1ex]{Jordalkalimetal};       \draw[black, TransitionMetalFill] ($(La.north -| Fr.west) + (1em,-1.7em)$)         rectangle +(1em, 1em) node[right, yshift=-1ex]{Overgangsmetal};       \draw[black, MetalFill] ($(La.north -| Fr.west) + (1em,-3.2em)$)         rectangle +(1em, 1em) node[right, yshift=-1ex]{Metal};       \draw[black, MetalloidFill] ($(La.north -| Fr.west) + (1em,-4.7em)$)         rectangle +(1em, 1em) node[right, yshift=-1ex]{Halvmetal};       \draw[black, NonmetalFill] ($(La.north -| Fr.west) + (1em,-6.2em)$)         rectangle +(1em, 1em) node[right, yshift=-1ex]{Ikke-metal};       \draw[black, HalogenFill] ($(La.north -| Fr.west) + (1em,-7.7em)$)         rectangle +(1em, 1em) node[right, yshift=-1ex]{Halogen};       \draw[black, NobleGasFill] ($(La.north -| Fr.west) + (1em,-9.2em)$)         rectangle +(1em, 1em) node[right, yshift=-1ex]{{\AE}delgas};       \draw[black, LanthanideActinideFill] ($(La.north -| Fr.west) + (1em,-10.7em)$)         rectangle +(1em, 1em) node[right, yshift=-1ex]{Lanthanoid/Actinid};            \node at ($(La.north -| Fr.west) + (5em,-15em)$) [name=elementLegend, Element, fill=white]         {\NaturalElementTextFormat{Z}{Masse}{Symbol}{Navn}};       \node[Element, fill=white, right of=elementLegend, xshift=1em]         {\SyntheticElementTextFormat{}{}{men\-nes\-ke\-skabt}{}} ;          % Diagramtitel.       \node at (H.west -| Fe.north) [name=diagramTitle, TitleLabel]         %{Dmitri I. Mendeleevs periodiske system for grundstofferne};         {Grundstoffernes periodiske system};     \end{tikzpicture}     \end{preview}          \end{document}      I would like to change line 30 from               {\textbf{#1} \hfill #2}      to               {\textbf{#1} \hfill \num{#2}}      in order to get a nice formatting of the atomic masses, but I can't put text inside `\num`. How do I fix this? P.S. The problem occurs in line 321.


title: Hyperref TextFields dont't work when in tabular environment with xetex?

text: I created a pdf fillable form in LaTex using hyperref text fields, then decided that I wanted to change the font of the whole form, so I tried to use XeTeX with fontspec. Unfortunately, when I do this, some of the TextFields no longer work. For example, when compiling with XeTeX               \begin{tabular}{l}        {\cellcolor{light-gray}\textbf{Background}} \\        {\TextField[borderwidth=0,height=3cm,width=17.5cm,multiline=true]{}}\\        \\        \TextField[borderwidth=0,width=16.5cm]{Ideals} \\        \TextField[borderwidth=0,width=16.5cm]{Flaws} \\        \TextField[borderwidth=0,width=16.5cm]{Bonds}      \end{tabular}      The first multiline box shows up correctly, but the remaining 3 boxes at the bottom don't. Has anyone encountered this and got it to work correctly?


title: Aligned Environment Not Aligning a Single Operator

text: So, I'm typesetting a solution to a Quiz I gave, and the aligned environment (inside of my equation environment) is giving me an incorrect alignment on only one of my operators. Here's the batch of code I'm concerned with:               \documentclass[12pt]{article}     \usepackage{amsmath}          \begin{document}          \begin{equation*}       \begin{aligned}         x=-2 &\Rightarrow \frac{-2+1}{-2-4} &= \frac{-1}{-6} &= \frac{1}{6} &> 0 \\         x=0 &\Rightarrow \frac{0+1}{0-4} &= \frac{1}{-4} &= -\frac{1}{4} &< 0 \\         x=5 &\Rightarrow \frac{5+1}{5-4} &= \frac{6}{1} &= 6 &> 0       \end{aligned}     \end{equation*}          \end{document}      ![image output from code input](http://i.stack.imgur.com/XhFim.png) When I run this to create my pdf, the equals sign in the final row in front of 6/1 appears to the right of the two above it. Any ideas on how to fix this, or why it's happening?


title: What's the chief advantage of Memoir over "standard Book" for a novel

text: Considering that the user wouldn't likely have equations, glossary, index, bibliography or double columns (but would perhaps need insets for monologues), and considering the popular novel formats of the best sellers, what are the chief advantages of using Memoir Class over the standard book class in LaTeX. I'm considering the following (please correct me if I'm wrong)   * No need to use Geometry for standard Novel Dimensions (about 8.5in X 5.5in)   * More fonts to choose from   * More customization of the Table of Contents   * More ability to have unnumbered, untitled sections within Chapters, known as "Scenes"


title: How to position "=" mid-line inside a '\raisebox' and then `align` using `&=` with expression below?

text: In order to get a full stop at the bottom, rather than mid-line, after an aligned matrix expression, I have raised the expression using a raisebox, and adjusted space using `vspace'. This is now causing further problems. The expression contains an "=", but this is now going to the bottom rather than staying mid-line. How do I keep it mid-line? Also, how do I now align the expression with an expression below which is not in a raisebox? It might be easiest if I show what I had before using the raisebox. I want to keep this the same, except with the full stop at the bottom:               \begin{align}     \begin{pmatrix} a\\b \end{pmatrix} &= \begin{pmatrix} c\\d \end{pmatrix}.\\     \intertext{Now}     \begin{pmatrix} e\\f \end{pmatrix}&= \begin{pmatrix} g\\h \end{pmatrix}     \end{align}      I can raise the full stop using:               \begin{align}     \raisebox{\depth}{$\displaystyle\begin{pmatrix} a\\b \end{pmatrix} \displaystyle\begin{pmatrix} c\\d \end{pmatrix}$}\\     \end{align}      but this causes the problems mentioned above. Thanks for any help with this!


title: Rotation in \ddots

text: I want to write a math equation that needs power of dots. I tried these code               {2^{2^{2^{\ddots^{2}}}}}      But the dots needs to be rotated


title: Vertically align the cell of a table with the baseline of surrounding text

text: I have a table like this:               \begin{tabular}[b]{c}     A \\     B \\     C \\     D \\     \end{tabular}E      The code above places "D" and "E" on the same baseline, no matter what size any of the letters are. Without changing "E" (I can't make changes to this text), how can I adjust the table, such that "C" and "E" are on the same baseline, no matter what size any of the letters are?


title: Losing check box entries when saving LaTeX-generated PDF form

text: The code below implements a simple PDF form. Some PDF readers can save the form after it has been filled to a PDF with the new state. This works for the text entry whose entry is saved but the state of any checkbox is lost. Any remedy?               \documentclass{minimal}     \usepackage[pdftex]{hyperref}          \begin{document}     \begin{Form}         \noindent         \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex,name=yes]{Yes}\quad         \CheckBox[bordercolor={0 0 0},height=1ex,width=1.5ex,name=no]{No}\quad         \TextField[name=textfield,width=3cm]{Text:}     \end{Form}     \end{document}      I noted on Mac OS X in the Preview.app that checking a check box alone does not lead the document to be considered as modified. Only entering text leads to a modified state and subsequently only a modified document can be saved. What is special about check boxes? Maybe this is a reader issue and I would be interested to hear if the example above indeed works. There is a similar question How to get radio boxes right in PDF forms using hyperref? which was closed as off topic. _Edit:_ I have added name fields for the check boxes. On OS X with Preview.app this still does not solve the problem for me.


title: Using \IfNoValueTF within a TikZ style specification.

text: In an answer to Flushing PGF commands and local variable Matthew had suggested using `\IfNoValueTF` within a TikZ `\node` specification to determine the text. This solution works great for me. However, I would also like to able to have these type of conditions within the style without having to define a temporary style. So, in the following, I would like use `LabelPointZ` to be to determine the style to be used, just as the working `LabelPointY` determines the text without having an intermediate variable.               \documentclass{articles}     \usepackage{pgfplots}     \usepackage{xparse}          \begin{document}          \NewDocumentCommand{\LabelPointY}{o o m m g}{       \addplot [#1] coordinates{(#3,#4)}          node [#2]             {\IfNoValueTF{#5}{$(#3,#4)$}{#5}};     }          \NewDocumentCommand{\LabelPointZ}{o g m m g}{       \addplot [#1] coordinates{(#3,#4)}          node [\IfNoValueTF{#2}{color=red,right}{right, #2}]             {\IfNoValueTF{#5}{$(#3,#4)$}{#5}};     }          \begin{tikzpicture}     \begin{axis}         %\LabelPointZ[mark=*,color=red]{0.2}{0.2}         %\LabelPointZ[mark=*,color=red][color=green]{0.3}{0.3}          \LabelPointY[mark=*,color=red][color=blue, below right]{0.5}{0.5} % default label         \LabelPointY[mark=*,color=red][color=blue, below]{1  }{1  }{top}  % given label     \end{axis}     \end{tikzpicture}     \end{document}


title: LaTeX Download for Windows

text: > **Possible Duplicate:**   >  How do I install TeX/LaTeX on Windows 7 I am looking for a full LaTeX download for use on Windows. I have looked on google, however there seems to be a lot of options, and I am not sure what to choose. Can anyone make any recommendations?


title: Free TeX/LaTeX software products whose installation on Windows 7 is relatively simple

text: > **Possible Duplicate:**   >  How do I install TeX/LaTeX on Windows 7 For some years I've been using Scientific WorkPlace (WYSIWYG front end to TeX for Windows) to create LaTeX documents, whose installation and use are very easy. The main disadvantage is that changes to the typeset format of the different _shells_ are not supported by the supplier, apart from not allowing `\newcommand` nor `\def`. Also there are very few shells that have _headers_ and _footers_ and the existing ones are not configurable. As such I would like to install and use on Windows 7 a free TeX software. The AMS page http://www.ams.org/publications/authors/tex/public-domain-tex says: > Installation and use of free TeX software may require some technical > expertise. The level depends on the distribution. Most packages are > accompanied by relevant documentation. I would have no support from anybody to carry out the installation.   1. Which are the free TeX/LaTeX software products whose installation is relatively simple?    2. Which packages do you advise as a minimum to create mathematical articles with figures and headers, and configurable text width and height? EDIT. Based on the comments it seems that I have to choose between two options: TeX Live or MiKTeX.


title: Fonts to match TeX Gyre Pagella

text: I want to use the `TeX Gyre Pagella` font for the main text. I have the problem to find match math and sans serif fonts to it.   * I would like to use the `TeX Gyre Pagella Math`, but for this I have to use `unicode-math` because this font is only in `otf` format.   * But then I can not use 'Bera Sans' because is only in adobe format. Has any one some suggestion?


title: Fixed Width Font with LTXexample environment

text: Not sure why this problem has eluded me but I can't seem to get fixed width font in the code portion. I thought that this question on how to change code font would do the trick but it doesn't for me. The following code for me produces non-aligned output (the `&` are not aligned in the code):                   \documentclass{article}              \usepackage{amsmath}           \usepackage{showexpl}          \usepackage{xcolor}              \usepackage{multirow} % Newly added for 2nd example.              \lstset{             backgroundcolor=\color{yellow},             basicstyle=\small\ttfamily,% print whole listing small             keywordstyle=\color{blue}\bfseries\underbar,             numbers=left, numberstyle=\tiny, stepnumber=2, numbersep=5pt,             %columns=fixed,             %commentstyle=\color{red},             showstringspaces=false         }         \lstloadlanguages{[LaTeX]TeX}              \begin{document}         Here is an example of LaTeX code and its output:              \begin{LTXexample}[width=0.40\linewidth,preset=\vspace{1.5mm}]         \begin{alignat*}{4}             y &= -4   &+ 3 &+4     &-7      \\             y &=      &+ 3 &       &-7      \\             \intertext{Therefore}             a &= b    &d   &= cccc &e  &= d \\             a &= bbbb &d   &= c    &e  &= d         \end{alignat*}         \end{LTXexample}              \begin{LTXexample}[width=0.40\linewidth,preset=\vspace{1.5mm},rframe={},pos=b]         \begin{tabular}{|l|l|l|l|}         \multicolumn{4}{c}{Dimensions} \\         \multirow{4}{*}{Style}                 &\multirow{2}{*}{Portrait} & Width  \\                 &                          & Height \\                 &\multirow{2}{*}{Landscape}& Width  \\                 &                          & Height \\         \end{tabular}         \end{LTXexample}         \end{document}


title: LaTeX package for typesetting computer science diagrams i.e. linked list

text: Could you suggest a package designed specifically to typeset different types of diagrams in computer science, such as linked lists, stacks, queues ? What i'm looking for is something similar to the Q-circuit package, whose main purpose is to typeset quantum circuits. Thank you in advance.


title: How to put two images next to each other with a) and b) labels?

text: I want to put two images next to each other and in order to do that I have written these code:               \begin{figure}[h]     \begin{minipage}{16pc}     \includegraphics[width=16pc]{P_1.eps}     \caption{\label{fig4} Caption of the first image.     \end{minipage}\hspace{2pc}%     \begin{minipage}{16pc}     \includegraphics[width=16pc]{P_2.eps}     \caption{\label{fig4} Caption of the second image.     \end{minipage}     \end{figure}      But in pdf I see **Figure 4: Caption of the first image. Figure 5: Caption of the second image.** How I can change it so that it was **Figure 4-a: Caption of the first image. Figure 4-b: Caption of the second image.** or **Figure 4.a: Caption of the first image. Figure 4.b: Caption of the second image.** Thanks!


title: BiBTeX entries for RFCs?

text: How does one get BibTeX entries for RFCs? do I need to manually add entries for each RFC I cite? What do you use?


title: Creating separated tex files using the versions package

text: I have a midterm exam written with the solutions included using the `versions` package. I use this to create an assignment/exam PDF and a solution PDF from the same basic tex file (this is great---change a question a bit and you don't have to change the question in a separate solutions file). Is there a way to create separate assignment and solution tex (as opposed to PDF) files that exclude and include the appropriate version environments? The reason that I want to do this is because this is a take-home exam and some students want to submit their answers using LaTeX on the original file.


title: How to switch conjunction from "and" to "or" when using many bibkeys in textcite?

text: With biblatex is very convenient to write something like this:               \documentclass{article}     \usepackage{biblatex}     \addbibresource{biblatex-examples.bib}     \begin{document}     \ldots as presented by \textcite{shore,yoon,cicero}     \end{document}      Then biblatex will automatically render this to: > ...as presented by Shore [2], Yoon et al. [3], and Cicero [1] Sometime it would be helpful to not use **and** as conjunction but **or**. Is that possible? BTW: Why is there no comma when there are only two items in \textcite{foo,bar}? When there are two authors and maxcitenames=2 this is rendered to: > "..as presented by Foo and Bar [1] and Bar and Foo [2]" **Possible duplicates:** This question is related to biblatex: Tighter integration of \textcite "in the flow of text", where this question was actually a comment, but as the comment trail was too long already I was asked to make a new question, so here it is. Also the question might seem related to Change citation conjunction from "and" to "i" but this is asking for different conjunctions within a single bibkey connecting authors.


title: Fixing indentation (and line breaks)

text: In our style guidelines we have basically this "rule": Each paragraph that followed another paragraph shall start with an indentation. Except when there is whitespace above - then there shall be no indentation. In this case for whitespace anything is meant apart from a standard paragraph. So also when there is a figure/equation/section headings/table/etc there should be no indentation.. Is it possible for latex to do this automatically? Especially with equations I've seen this problem popping up. (Currently using document class "hitec" because I like the layout, however I'd wish for a solution independent of generic classes if possible).


title: Biblatex and ACM Proceedings bibligraphy style

text: I would like to use biblatex in order to control for the amount of information which is outputed in the bibliography (e.g., doi, issn, urls) but the problem is that the original ACM Proceedings format produces abbrevated names while the default numeric format produces the full names in the bibliography. I'm not sure how to do this and I'm overwhelmed by the amount of customization that is possible to do. Original version:               \documentclass{acm_proc_article-sp}          \usepackage{filecontents}     \usepackage{lipsum}          \begin{filecontents}{example.bib}     @book{book_2014,       title = {Book Title},       publisher = {{Publisher} Name},       author = {Doe, John and Bar, Foo. and Jane Doe},       month = april,       year = {2014}     }     \end{filecontents}          \usepackage[utf8]{inputenc}     \usepackage[british,UKenglish,USenglish,english,american]{babel}     \usepackage[babel=true]{csquotes}     \usepackage{natbib}     \begin{document}          \lipsum{1}~\citep{book_2014}     \bibliographystyle{abbrv}     \bibliography{example}          \end{document}      ![original BibTeX version](http://i.stack.imgur.com/dFUm0.png) Biblatex version               \documentclass{acm_proc_article-sp}          \usepackage{filecontents}     \usepackage{lipsum}          \begin{filecontents}{paper.bib}     @book{book_2014,       title = {Book Title},       publisher = {{Publisher} Name},       author = {Doe, John and Bar, Foo. and Jane Doe},       month = april,       year = {2014}     }     \end{filecontents}          \usepackage[utf8]{inputenc}     \usepackage[british,UKenglish,USenglish,english,american]{babel}     \usepackage[babel=true]{csquotes}     \usepackage[firstinits=false,                 uniquename=false,                 uniquelist=false,                 hyperref=auto,                 maxbibnames=99,                 maxcitenames=2,                 style=numeric,                 citestyle=numeric,                 backref=false,                 natbib=true,                 backend=bibtex]{biblatex}          \DeclareFieldFormat{urldate}{}          \AtEveryBibitem{      \clearlist{address}      \clearfield{date}      \clearfield{eprint}      \clearfield{doi}      \clearfield{isbn}      \clearfield{issn}      \clearlist{location}      \clearfield{month}      \clearfield{labelmonth}      \clearfield{series}           \ifentrytype{book}{        \clearfield{url}      }{        \ifentrytype{misc}{        }{         \clearfield{url}         \clearlist{publisher}          \clearname{editor}        }      }     }          \bibliography{paper}          \begin{document}          \lipsum{1}~\citep{book_2014}     \printbibliography          \end{document}      ![Biblatex version](http://i.stack.imgur.com/4DXe2.png)


title: How do I center my subscript?

text: How do I make the following subscript centred below the text?               $$\text{argmin}_{x,y,z,b}$$      As this one does automatically?               $$\Pr_{x,y,z,b}$$


title: LaTeXing cup product over an indexed set

text: \[\smile_{i\in I}\alpha_i\]      I write this code and the summation variable i comes as subscript, to the right of the smile (cup product symbol in algebraic topology). I wish to have the index i underneath the cup product symbol, like it does with union, intersection or summation operation in place of the cup product. Any ideas? Thanks in advance!


title: How to write the limit inferior in math environment?

text: I got it to work with               \mathop{\underline{\lim}}_{n \to \infty} f_n(x)      Above looks exactly how I want it to look, but initiating operators twice is odd and it's far from simple               \lim_{n \to \infty} f_n(x)      Or is it alright?


title: Do the online LaTeX compilers use a TeX daemon to speed up their compilation?

text: There seem to be quite a few fabulous web-sites now that compile LaTeX online. I was wondering what techniques these sites used to speed up compilation of documents. It would seem they would be particularly interested in reducing the CPU load from loading the compiler, especially as many of the documents they would be asked to create would be relatively small. In my experience it seems like the ordinary process for creating a relatively small document with LaTeX, especially XeLaTeX, seems to take a substantial amount of time starting the compiler (e.g. a couple seconds), and a relatively very modest amount of time running it (a few milliseconds). It would seem then that one could gain tremendous improvements in performance for relatively small documents by running (PDF/Xe)LaTeX as a daemon that produced a number of documents without having to restart the process. Others seem to have tried this, and it has been discussed (also) on Tex.SE before. The techniques seem to be somewhat dated, and in any case I couldn't get them to work on Linux with XeLaTeX (which just happens to be what I'm using). Are any of the online compilers using a sort of TeX daemon to compile their documents in the background? Are there any other recent developments in this area? I happen to be personally interested in the XeLaTeX on Linux, but I would love to know more about what is happening in the LaTeX performance area. There also seems to be quite a bit of discussion about pre-compilation (as seen under eg performance), but I tried it and the benefits do not seem to be as great as that of daemonizing the process (though I would stand to be proven correct!). Are there other techniques these online services may be using to improve the response time of compilation?


title: Margin notes on both left and right?

text: I've been trying to put margin notes in both the left and the right margins at the same time. My attempts have gone something like:               Lorem{\reversemarginpar\marginpar{Left}} ipsum {\normalmarginpar\marginpar{Right}} dolor sit amet, consectetuer adipiscing elit.      But here both notes appear in the right margin. I would be very grateful for ideas on how to solve this.


title: how to fill intersection of 2 shapes in latex tikz package

text: I have to fill a specific region as given in the following figure. The code I have written is               \begin{tikzpicture}          \draw (0,0) rectangle (10,10);          \draw (3.5,3.5) circle (5) node {A};          \end{tikzpicture}      Now, how to fill the intersecting area (area of circle overlapping the square)


title: Making an "auto-counter" command - test whether a reference marker already exists?

text: I'd like to be able to number arbitrary objects (in my case, chemical compounds) within a document. Ideally this would involve a command a bit like \ref, but where you don't need a \label. The label would be created, and counter incremented, the first time \ref is called for a particular marker name, subsequent calls return the appropriate number. The reason for this is that there's no specific "definition", just that they should be numbered in order of first appearance within the text.               \cref{one} -> 1     \cref{two} -> 2     ...     \cref{one} -> 1      I think the way to do this is as following (disclaimer: I haven't ever made new command before!)               \newcounter{cref}     \newcommand{\cref}[1]{        IF MARKER #1 DOESN'T EXIST:           \refstepcounter{cref}\thecref\label{#1}        \ref{#1}     }      Questions:   1. Has this been done before? I can't find a package...   2. Is this a sensible way to do it?   3. Is it possible to check whether a particular marker hasn't been defined yet?


title: Create an exceptional A3 page within an A4-based report

text: I created a picture within a tool that fits exactly in an A3 page. However I need to place this picture within an report that has A4 pages by default. The picture contains lots of information so I don't want to scale it down. Right now I have the following code:               \begin{minipage}{\linewidth}       \centering       \includegraphics{aPic}       \captionof{figure}{Wanna be lay down horizontally in an A3 page!}       \label{fig1}     \end{minipage}      So how I can do put the picture in my report?. Any suggestions?


title: Which combination of font-size, font-family, font-color, background-color, line-width, spacing make the most comfortable to read?

text: I am searching for a good combination of font-size, font-family, font-color, background-color, line-width, line-spacing, paragraph-spacing, indentation, tabulation, heading, etc. > Which combination of them make the most comfortable to read on either > printed version or electronic (pdf) version in a long time interval?


title: Getting URW-Garamond and the license

text: I want to use URW-garamond but it seems although this source claims I probably should have it I do not. Furthermore this question on this site indicates that I in fact should not at all expect to have it on my system. So now I want to know two things:   1. What in it's license makes it unsuitable for inclusion in LaTeX distributions and   2. Given that I actually can get it how would I go about installing it on different distributions? (I use tex-live on Ubuntu and Mac and TeXworks on Windows but please list all distributions you can think of)


title: How to omit author field of a citation locally in biblatex?

text: I need to create a list of citation shorthands, but my document only uses shorthands to works of one single author. The full citation scheme in shorthands is, therefor, redundant: It should omit the author's name. That is achievable by reseting the author field with an `\AtBeginShorthands`, like:               \AtBeginShorthands{\renewbibmacro*{author}{}}      But I also need this behavior in other places: There's a section i the document where I'm planning to put a `description list`, introducing and explaining the main bibliography... I'd like to create a separate bibliography, something like “ _Works by Author Name_ ”, where the author's name would also be redundant... (I think this supposed to be made inside a `\defbibenvironment` but I don't know how) So, summarizing:   * 1) how to reset `author bibmacro` inside a single environment   * 2) how to reset `author bibmacro` inside a separated bibliography


title: How can I invoke a macro inside minted inline code?

text: How can I use a command inside a `minted` one-liner? This code               \newcommand{\HADOOPUSER}{hduser}     \mint{console}|sudo groupadd \HADOOPUSER|      currently produces > sudo groupadd \HADOOPUSER whereas the output I want is > sudo groupadd hduser


title: Can I convert a 16 page pdf into an 8x2 matrix in LaTeX?

text: My graphing program (R) can plot a set of figures out, each on a separate page of the same pdf. Is there a way to convert this into a single 4x4 or 8x2 figure in LaTeX? There are alternatives, but this would be preferable.


title: Capital Ø (Scandinavian letter) in Bibtex

text: I know that I can preserve capital letters in Bibtex with curly braces, and that I can type Scandinavian letters like æøå as `\ae{}` `\o{}` `\aa{}`. But what do I do to force the capital letters ÆØÅ? Following a suggestion I found for German umlaut, I tried `{\{O}}`, but it still comes out as a lowercase ø. Bibtex file:               @misc{o2012,         title = "This is the word \O{}re"}      Latex:               \documentclass{article}     \begin{document}     \nocite{o2012}     \bibliographystyle{plain}     \bibliography{test}     \end{document}


title: classic thesis lyx language problem

text: What changes (in the tex-configure file i guess) should i make to use this package in greek language? when i export it to pdflatex the text is gibberish. i think this is the relevant part               \PassOptionsToPackage{latin9}{inputenc} % latin9 (ISO-8859-9) = latin1+"Euro sign"      \usepackage{inputenc}          \PassOptionsToPackage{greek,american}{babel}   % change this to your language(s)     % Spanish languages need extra options in order to work with this template     %\PassOptionsToPackage{spanish,es-lcroman}{babel}      \usepackage{babel}


title: How can I filter for multiple packages in Package Manager

text: I had to reinstall MiKTeX today and installing all packages i need took way too much time. Is there a way to filter for multiple packages in the Package Manager? I tried using `OR`, `,`, `;` and whitespace as seperator but nothing helped. I would save a lot of time if I could select all packages I need at once or simply start a script which installs the packages I need. Any help would be appreciated. Thanks in advance, Felix


title: Fancyhdr - Is it possible to have a small table inside header?

text: Ok, I'm trying to create this type of formatting for each of my pages: ![enter image description here](http://i.stack.imgur.com/4r4HW.png) Now, I want to have this on every single page, in the header on the right hand side. I currently have the following:               \usepackage{fancyhdr}     \fancyhead{}     \fancyhead[RO, LE]{              \begin{table}[ht!]              \begin{tabular}{c}         safasf         \end{tabular}     \label{lable:nonlin}     \end{table}          }     \fancyfoot{}     \fancyfoot[LE, RO]{\thepage}     \fancyfoot[LO, CE]{Chapter \thechapter}          \begin{document}       \input{title}            \chapter{Introduction}       ...            \chapter{Background}       ...            \chapter{Conclusion}       ...          \end{document}      I want to have this header, on every page even on the chapter pages. Before, using normal text.. The header does not appear to be on the chapter page. Could anyone offer any solutions or suggestions please?


title: Europass 2013 Curriculum Vitae

text: Is there any new template for the Europass Curriculum Vitae 2013? I'm aware of the both the `europecv` and `moderncv` packages, but I'm looking for something with the "new" (as of July 2013) version of the Europass (templates available here). If it is not available yet, has anyone come up with a workaround? // **UPDATE** I just received a mail from Nicola Vitacolonna (developer of `europecv`). It seems he has officially abandoned the project due to work and family constraints. However, he is willing to help, if someone else decides to take it over.


title: Why does using lstinline inside mathescape inside lstlisting not work?

text: I'm trying to typeset some code. That code has some embedded mathematics, but in the embedded mathematics, I need to reference variables from the code. I would like for the variables in referenced inside the mathematics to be typeset like the actual code (so I do not want to use the mathtt environment). Unfortunately I get an error when I try to do this. Here is an example:               \documentclass[11pt]{article}     \usepackage{listings}          \begin{document}     \begin{lstlisting}[mathescape]     @pre: $ \langle \lstinline!a! \rangle $     \end{lstlisting}     \end{document}      I get the following error message:               ERROR: Extra }, or forgotten \endgroup.          --- TeX said ---     <recently read> \egroup           l.6 @pre: $ \langle \lstinline!a!                                       \rangle $      I've also tried using `\lstinline{a}`. I've also tried embedding this inside an `\mbox` and a `\parbox`. I've also tried using the `\begin{lstlisting}[escapechar=^]` and adding an extra `^` around the math formula. I cannot simply leave the escape environment as I am wrapping these inlined characters in big symbols like `\left(` and `\right)`.


title: Problem with multiple languages in BibTeX

text: I'm new here. I'm typing my Thesis and I'm using two languages (Spanish, English). This is my code:               \documentclass[hidelinks,letterpaper,titlepage,12pt,oneside,spanish,final]{report_eie}     \usepackage[english,spanish]{babel}      \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{amssymb}     .     .     \usepackage{indentfirst} %(Because I have declared a new language, english)     \usepackage[apaciteclassic]{apacite}     \usepackage[round,authoryear]{natbib}     .     .     \begin{document}     \selectlanguage{spanish}      .     .     .     \bibliographystyle{apacite}     \renewcommand{\bibname}{REFERENCIAS}     \let\oldbibsection\bibsection     \bibliography{biblioteca}      .     .     .     \end{document}      All works but the bibliography is showed in English (for example, the ordinal numbers are showed "Nth", instead of Nª, "and" instead of "y", etc). If I type `\usepackage[spanish]{babel}` and delete `\selectlanguage{spanish}` the bibliography is showed in Spanish. What I can do? I need to use both languages.


title: BibTex does not include publisher in Book

text: Why does the following BibTex-entry not include the publisher?               @book{billingsley,       title={Convergence of Probability Measures},       author={P. Billingsley},       year={1968},       publisher={Wiley, New York}     }      There is a warning that the journal is empty, but yeah, it is exactly how I have copied it from google scholar, so I have no idea what to do. The output is only title, author, and year. What can I do? Sorry, I am a beginner. Here is a MWE:               \documentclass[11pt,a4paper,titlepage]{memoir}          \usepackage[OT1]{fontenc}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[sc]{mathpazo}     \usepackage{amsmath,amssymb,amsfonts,mathrsfs}     \usepackage[amsmath,thmmarks]{ntheorem}     \usepackage{graphicx}     \usepackage{soul}     \usepackage{pdfpages}          \begin{document}          text \cite{billingsley}          \bibliographystyle{plain}     \bibliography{refs}               \end{document


title: I have a stupid error like missing \endcsname inserted

text: \begin{thebibliography}{99}     \bibitem{kn:TR\^{I}MBI\cb{T}AS}     {\sc Radu Tiberiu Tr\^{i}mbi\cb{t}as}:     \newblock {\em Analiz\u{a} numeric\u{a}. O introducere bazata pe Matlab}.     \newblock Presa Universitara Clujeana, 2005.          \bibitem{kn:B\'{E}LA}     {\sc Finta B\'{e}la}:     \newblock {\em Analiz\u{a} numeric\u{a}}.     \newblock Editura Universit\u{a}\cb{t}ii Petru Maior, 2004.     \bibitem{kn:SCHEIBER}     {\sc Amuraritei Gheorghe, Scheiber Ernest}:     \newblock {\em Analiz\u{a} numeric\u{a}}.     \newblock Universitatea Brasov, 1983.     \end{thebibliography}      **EDIT** Without the accents in the bibitem keys:               \begin{thebibliography}{99}          \bibitem{kn:TRIMBITAS}     {\sc Radu Tiberiu Trimbitas}:     \newblock {\em Analiza numerica. O introducere bazata pe Matlab}.     \newblock Presa Universitara Clujeana, 2005.          \bibitem{kn:BELA}     {\sc Finta Bela}:     \newblock {\em Analiza numerica}.     \newblock Editura Universitatii Petru Maior, 2004.          \bibitem{kn:SCHEIBER}     {\sc Amuraritei Gheorghe, Scheiber Ernest}:     \newblock {\em Analiza numerica}.     \newblock Universitatea Brasov, 1983.          \end{thebibliography}      And the preamble:               \documentclass[a4paper,12pt,legno]{book}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{graphicx}     \usepackage{subfigure}     \usepackage{combelow}          \makeindex \textwidth13cm \textheight18.5cm \oddsidemargin=1.7cm     \evensidemargin=1.7cm      * * *               \begin{thebibliography}{99}          \bibitem{kn:TRIMBITAS}     {\sc Radu Tiberiu Trimbitas}:     \newblock {\em Analiza numerica. O introducere bazata pe Matlab}.     \newblock Presa Universitara Clujeana, 2005.          \bibitem{kn:BELA}     {\sc Finta Bela}:     \newblock {\em Analiza numerica}.     \newblock Editura Universitatii Petru Maior, 2004.          \bibitem{kn:SCHEIBER}     {\sc Amuraritei Gheorghe, Scheiber Ernest}:     \newblock {\em Analiza numerica}.     \newblock Universitatea Brasov, 1983.          \end{thebibliography}               This is the main-file script:          \documentclass[a4paper,12pt,legno]{book}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{graphicx}     \usepackage{subfigure}     \usepackage{combelow}          \makeindex \textwidth13cm \textheight18.5cm \oddsidemargin=1.7cm     \evensidemargin=1.7cm          \newcounter{i}          \begin{document}          \frontmatter          \bibliographystyle{plain}          \pagestyle{myheadings} \markboth{}{}     \tableofcontents          \mainmatter     \renewcommand{\chaptername}{Capitolul}     \setcounter{chapter}{0}          \include{T_lui-Weierstrass}     \include{I_Lagrange}     \include{P_Bernstein}          \backmatter          \pagestyle{myheadings} \markboth{}{}     \include{Bibliografie}                \end{document}


title: Spacing with framed and mdframed packages

text: I have a slight problem with the `framed` package when combined with the `itemize` environment:               \documentclass[parskip]{scrartcl}     \usepackage{fancybox}     \usepackage{framed}          \newenvironment{simpages}%     {\def\FrameCommand{\fboxsep=\FrameSep \shadowbox}\MakeFramed {\FrameRestore}}%     {\endMakeFramed}          \begin{document}     Some text          \begin{simpages}     \begin{itemize}       \item Foo       \item Bar       \item Baz     \end{itemize}     \end{simpages}          Some more text          \end{document}      This leads to the following result: ![framed example](http://i.stack.imgur.com/lRxYA.png) As you can see, the vertical space above the items is much larger than the one below - this is what I would like to correct. I've tried to switch to the `mdframed` package as suggested here, but so far unsuccessfully:               \documentclass[parskip]{scrartcl}     \usepackage{mdframed}          \newmdenv{simpages}          \begin{document}     Some text          \begin{simpages}     \begin{itemize}       \item Foo       \item Bar       \item Baz     \end{itemize}     \end{simpages}          Some more text          \end{document}      The result is pretty much the same, only now the shadow effect is missing... Why is the vertical space above and below the contents of the environment different, and how do I adjust it? ![mdframed example](http://i.stack.imgur.com/a7tYn.png)


title: Can XeLaTeX generate bold and italic font styles for typefaces that lack them?

text: I use XeLaTeX in order to have easy access to fonts installed on my operating system, and Chinese in particular. Some of the Latin typefaces most pleasing to my eye do not have bold or italic font styles, and I wonder if XeLaTeX can remedy that. I'm aware of the FakeBold and FakeSlant transformations within the fontspec package, but I'd be glad to know of a more attractive process, if there is one. (The specification, v2.1f, says, "Please don’t overuse these features; they are _not_ a good alternative to having the real shapes.")


title: Removing page footer and changing the page header in KOMA-SCRIPT chapters?

text: My chapters are using scrheadings, as well my entire document. How can i, only in chapter pages, remove the footer and make a different header?


title: Bibliography in two columns, section title in one

text: I'm using the following to span the bibliography to two columns:               \begin{multicols}{2}     \bibliographystyle{abbrv}     \bibliography{mybib}     \end{multicols}      Yet, the section title (`"References"` in the article document style) also appear as part of the two columns, while I want it to span the whole page. How can I do something equivalent to the following code, but still using BibTeX?               \section*{References}     \begin{multicols}{2}     \thebibliography{..}     \end{multicols}      Thanks.


title: Wrong page numbering in the Table of contents, of figures and of tables

text: my problem is related to the number of pages in the table of contents, list of figures and list of contents. Everything in my .pdf works well except that! I don't understand why! Could you help me? In the following my main:               \begin{document}     \hyphenation{Com-po-si-to-ri}     \hyphenation{Giu-sep-pe}     \hyphenation{Ba-lu-stra-des}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}     \fancyhf{}      \fancyhead[LE,RO]{\bfseries\thepage}     \fancyhead[LO]{\bfseries\rightmark}     \fancyhead[RE]{\bfseries\leftmark}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}     \addtolength{\headheight}{0.5pt}      \fancypagestyle{plain}{     \fancyhead{}      \renewcommand{\headrulewidth}{0pt} % e la linea     }          \includepdf[pages={1}]{Frontespizio.pdf}          \newpage     \thispagestyle{empty}     \clearpage{\pagestyle{empty}\cleardoublepage}     \selectlanguage{english}     \tableofcontents     \clearpage{\pagestyle{empty}\cleardoublepage}     \listoffigures     \clearpage{\pagestyle{empty}\cleardoublepage}     \listoftables     \clearpage{\pagestyle{empty}\cleardoublepage}          \large     \setcounter{secnumdepth}{-1}     \selectlanguage{italian}     \input{Sommario}     \clearpage{\pagestyle{empty}\cleardoublepage}     \selectlanguage{english}     \input{Acronym.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}     \input{Abstract}     \clearpage{\pagestyle{empty}\cleardoublepage}     \input{Introduction.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}     \clearpage     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{4}     \onehalfspacing     \input{Iso.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}     \input{Literature.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}     \input{Storia.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}     \input{IRMeasurement.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}     \input{ComputerModelling.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}     \input{Discussion.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}     \input{Conclusions.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}     \input{Bibliografia.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}     \input{Ringraziamenti.tex}     \clearpage{\pagestyle{empty}\cleardoublepage}               \end{document}


title: After a mistake in Texmaker, it has to be restarted

text: I am using Texmaker to write my thesis. Whenever I make a mistake, let's say misspell a command, the program stops working. It means I have to restart Texmaker. It so frustrating. I was wondering if someone has some idea for the reason. Regards.


title: Layout with captions in margin and margin notes

text: _Questions summed up below!_ I want to convert a number of old (read: ugly self-coded html) tutorials into pdfs. They are still read by people, so I think it's worth the effort. The other reasons:   * readers repeatedly asked for a printable version, for side-reading;   * they want to print them out to make notes and drawings (I could also interpret this as a demand for rephrasing, but I don't.);   * I want to use what I have learned about typography. My approach starts with the demand for space for personal notes. They will probably go into the margin, because the margin usually provides some space. The tutorials are aimed at beginners in the subject, and a lot of the content is extremely simplified. This calls for inline notes, footnotes or marginal notes. I want a wide margin for the readers' personal notes, and I also want to use the margin for notes in the tutorial. Now that the margin is wide, I can also place figure and table captions (I need both!) in the margin, and this is where I'm stuck. I've tried Will Robertson's suggestion from this Q&A, but the marginal caption is placed _on top_ of the text. The code below is his, but turned in to an MWE:               \documentclass{article}          \usepackage{lipsum}          \makeatletter     \newcommand\margincaption[1]{%       \par       \setbox\@tempboxa=\hbox{\parbox{\marginparwidth}{\caption{#1}}}       \@tempdima=\dimexpr\ht\@tempboxa+\dp\@tempboxa\relax       \par\null\hfill\usebox\@tempboxa\par       \vspace*{\dimexpr-\@tempdima-\baselineskip\relax}     }     \makeatother          \begin{document}          \lipsum[1]     \begin{figure}[tp]     \rule{\textwidth}{1em}     \margincaption{A black long line with lots of explanation so it fills up some space.}     \end{figure}     \lipsum[2]     \end{document}      I have tried ConTeXt for this, but the caption setting `rightmargin` produces no caption at all. I have asked the mailing list, but I've got the impression that it might be possible with pdfLaTeX (or XeTeX, or luaLaTeX) as well. Yet another issue pops up when I need to include long lines of example code. The margin is wide, so the main text area is narrower than usual, which could lead to collisions. Anyway, is there a way to include over-long lines without generating an overfull hbox warning? This is a minor issue though - long lines _can_ be broken.   * How can I place figure and table captions in the margin?   * How can I include single lines, extending into the margin, without producing collosions?   * If you have the impression that my layout approach is not suitable, do you have a brilliant idea I could try instead?


title: npround (seems to) destroy rules for caption in table

text: I'm struggling with this one. In essence, I would like to place the caption above the table but also to have the 'Table 1' appear at the beginning _and on the same line_ as the caption. Finally, I would like to have that the caption is left justified (as usual) instead of being centred (as now). Now, normally, I know how to do these things, but the inclusion of the `numprint` package seems to make all my rule of thumbs useless: regardless of where I put the `\begin{center}` `\end{center}`, the caption is centred. The caption also always appears one line below the 'Table 1' text.               \usepackage{numprint}     \npdecimalsign{.}     \nprounddigits{1}     \begin{table}[ht]     \centering     \begin{tabular}{|r| n{3}{1}  n{3}{1} l| n{3}{1} n{3}{1} l| n{3}{1} n{3}{1} l|}     \hline         & \multicolumn{2}{c|}{\textbf{e1}}&\multicolumn{2}{ c| }{\textbf{e2}} &\multicolumn{2}{c|}{\textbf{e3}}\\        \hline     \textbf{e1}&&&1.712682&(0.9381452)&2.768738&(1.646461)\\     \textbf{e2}&0.5613594&(0.4711274)&&&1.959158&(1.001164)\\     \textbf{e3}&185.9336662&(2.1302318)&140.417800&(1.797353)&&\\        \hline     \end{tabular}     \label{tab:tab1}     \caption{this data table}     \end{table}     \npnoround


title: Changing KOMA Script font family?

text: I'm using KOMA-Script and I would like to know how can I change the default font to FreeSans, or any other font-family? Also, how can I change all text to sans-serif?


title: Scope of catcode change for escape character ?

text: In the following macro, I change the category code for the escape character (`\`) to "other" (12):               \def\xxA{\begingroup       \catcode`\\ = 12       \gdef\xxB ##1z{\tt ##1\endgroup}       \xxB}      How the heck does this work? It seems like after I redefine `\` then the rest of the definition should not parse. Yet the input:               \xxA\bar\ba\xxAz      produces the output:               \bar\ba\xxA      Clearly, the escape character is not interpreted in the argument. What is going on here?


title: Tuning "numbered citations as footnote"

text: I wanted to comment on Audrey's answer but I need more characters & I couldn't answer my own question, so let's start a new one ! First thanks a LOT for providing the link to Joseph Wright solution to this. It works perfectly. ( except for the footnote/bigfoot issue ) Based on an answer to pretty much the same question I had I got this tip from Olivier on a french forum. He proposed to use a bolean (uhummm no idea what this is ?) in order to remove the title from footnote reference produced via verbose. And have reference with the title in the final bibliography. So using `style=` in the place of `citestyle=` to have the title every were and adding this bolean macro I get footnote references as (Author/Journal/Date/Pages) and final references as (Author/Title/Journal/Date/Pages). Now two things and it would be perfect.   * If I use ref with DOI or URL I can access them directly from the pdf. Marvelous. BUT, if I add to the bolean restrictions of Olivier the field DOI, of course I remove them from the footnote refs, wich is what I want, but the links are no longer active in the final ref ? How is it ? Any idea ?   * The second great thing would be to make the title in the final bibliography as the link to the url, so we don't see these ugly DOI and url. Again would that be possible ? Ok so that's it for my question(s). Maybe I'm a bit pernickety (not shure of the meaning here) and could be happy with your the solution you gave me. But it's to learn a bit more ... Again thank you for helping ! I put you the code here :               \documentclass{scrbook}     \usepackage[french]{babel}     \usepackage[pdfborder={0 0 0}]{hyperref}     \usepackage[bibstyle=chem-acs,style=numeric-comp,sorting=none,hyperref]{biblatex}     \usepackage{filecontents}          % No brackets around the number of each bibliography entry     \DeclareFieldFormat{labelnumberwidth}{#1\addperiod}          %---------------------------------------------------------------     % Essentially verbatim from Joseph Wright     % http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/     \makeatletter     \ExecuteBibliographyOptions{citetracker,sorting=none}          \DeclareCiteCommand{\notefullcite}[\mkbibbrackets]         {\usebibmacro{cite:init}%             \usebibmacro{prenote}}         {\usebibmacro{citeindex}%             \usebibmacro{notefullcite}%             \usebibmacro{cite:comp}}         {}         {\usebibmacro{cite:dump}%             \usebibmacro{postnote}}          \newbibmacro*{notefullcite}{%         \ifciteseen             {}             {\footnotetext[\thefield{labelnumber}]{%                 \usedriver{}{\thefield{entrytype}}\addperiod}}}          \DeclareCiteCommand{\sfcite}[\cbx@superscript]%         {\usebibmacro{cite:init}%             \let\multicitedelim=\supercitedelim             \iffieldundef{prenote}             {}             {\BibliographyWarning{Ignoring prenote argument}}%         \iffieldundef{postnote}             {}             {\BibliographyWarning{Ignoring postnote argument}}}         {\usebibmacro{citeindex}%             \usebibmacro{sfcite}%             \usebibmacro{cite:comp}}         {}         {\usebibmacro{cite:dump}}          \newbibmacro*{sfcite}{%         \ifciteseen             {}             {\xappto\cbx@citehook{%                 \noexpand\footnotetext[\thefield{labelnumber}]{%                 \fullcite{\thefield{entrykey}}\addperiod}}}}          \newrobustcmd{\cbx@superscript}[1]{%         \mkbibsuperscript{#1}%         \cbx@citehook         \global\let\cbx@citehook=\empty}     \let\cbx@citehook=\empty     \makeatother     %---------------------------------------------------------------          \begin{filecontents}{\jobname.bib}     @article{ref1,         hyphenation = {american},         title = {Natural Products as Sources of New Drugs over the Last 25 Years},         author = {Newman, D.J. and Cragg, G.M.},         journal = {J. of Nat. Prod.},         volume = {70},         number = {3},         pages = {461--477},         year = {2007},         doi = {10.1021/np068054v}}     @article{ref2,         hyphenation = {american},         title = {Natural products as leads to potential drugs: an old process or the new hope for drug discovery?},         author = {Newman, D.J.},         journal = {J. of Med. Chem.},         volume = {51},         number = {9},         pages = {2589--2599},         year = {2008}}     @online{ref3,         author = {Quintin, C.},         title = {Les eponges},         url = {http://christophe.quintin.pagesperso-orange.fr/Liste_Doc.html},         urldate = {2009-05-03}}     @article{Lewis2003,         author = {Lewis, Frederick D and Zuo, Xiaobing},         doi = {10.1021/ja035066j},         issn = {0002-7863},         journal = {Journal of the American Chemical Society},         month = jul,         number = {29},         pages = {8806--13},         pmid = {12862475},         title = {{Activated decay pathways for planar vs twisted singlet phenylalkenes.}},         url = {http://www.ncbi.nlm.nih.gov/pubmed/12862475},         volume = {125},         year = {2003}     }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          \newbool{cbb}               %\DeclareFieldFormat*{doi}{\ifbool{cbb}{{#1\adddot}}{}}  % If you uncomment these doi, url or issn lines they desapear of course from the footnotes but become inactive links in the final bibliography how come ?     \DeclareFieldFormat*{title}{\ifbool{cbb}{{#1\adddot}}{}}     %\DeclareFieldFormat*{url}{\ifbool{cbb}{{#1\adddot}}{}}     %\DeclareFieldFormat*{issn}{\ifbool{cbb}{{#1\adddot}}{}}               First citation.\sfcite{ref1,ref2} \pagebreak \\     Second citation\sfcite{ref1}, second citation\sfcite{ref2}, first citation.\sfcite{ref3} And also \sfcite{Lewis2003}               \global\booltrue{cbb}               \printbibliography               \end{document}


title: Make a postfix operator with suppressable spacing?

text: I would like to create a postfix unary operator that normally leaves `\medmuskip` between the operand and postfix operator. It's easy enough to do this using, for example,               \newcommand*{\true}{\mskip\medmuskip\mathsf{true}}      so that `x$A \true x$x` yields ![enter image description here](http://i.stack.imgur.com/mI6K8.png) However, the extra twist is that I would like to use a group to suppress the spacing, just as is possible for binary operators (such as `\otimes`). In other words, `x$A{\true}x$x` should yield ![enter image description here](http://i.stack.imgur.com/YsEni.png). Bonus points for making `x$\true$x` (note the absence of `{}`) yield ![enter image description here](http://i.stack.imgur.com/uH3j0.png). Here is a skeleton to play with:               \documentclass{article}     \usepackage{amsmath}     \usepackage{amssymb}          \newcommand*{\true}{\mskip\medmuskip\mathsf{true}}          \begin{document}     \begin{tabular}{ll}     \verb#x$A \true x$x#  & x$A \true x$x \\     \verb#x$A{\true}x$x# & x$A{\true}x$x \\     \verb#x$\true$x#    & x$\true$x     \end{tabular}     \end{document}


title: lplfitch package : Add line numbering on the left

text: I am using the package `lplfitch` to typeset natural deduction proofs in Fitch style. I would like to number the lines on the left side of the vertical bar instead of on the left of the formula? Schematically, here is what I'd like to get:               1. |  hypothesis_1     2. |  hypothesis_2     3. |_  hypothesis_3     3. |  deduction_1     rule_1     4. |  deduction_2     rule_2     5. |  deduction_3     rule_3     6. |  deduction_4     rule_4     7. |  deduction_5     rule_5      Here is a working example:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{lplfitch}     \begin{document}     \fitchprf{               \pline[1.]{\forall x (Fx\supset Axf)}[H]\\                \pline[2.]{\forall x(Fx\supset Afx)}[H]\\                \pline[3.]{Fi}[H]}{                     \pline[4.]{Fi\supset Aif}[\lalle{1, i}]\\                      \pline[5.]{Aif}[\life{3}{4}]\\                      \pline[6.]{Fi\supset Afi}[\lalle{2, i}]\\                      \pline[7.]{Afi}[\life{5}{6}]\\                      \pline[8.]{Aif\land Afi}[\landi{5}{7}]     }     \end{document}      It produces something like this:               | 1. hypothesis_1     | 2. hypothesis_2     |_3. hypothesis_3     | 4. deduction_1     rule_1     | 5. deduction_2     rule_2     | 6. deduction_3     rule_3     | 7. deduction_7     rule_4     | 8. deduction_8     rule_5


title: How can I position a PDF inside a tikzpicture?

text: I know that the following can't work. I want the PDF to sit at {X}.               \documentclass{article}     \pagestyle{empty}     \usepackage{tikz,lmodern}     \usepackage{pdfpages}          \begin{document}            \includepdf[scale=0.8, pagecommand={     \begin{tikzpicture}[remember picture,overlay]         \node at ([xshift=7cm,yshift=-3cm] current page.north west) {X};        \end{tikzpicture}}]{test}          \end{document}      I'd like to know how can I position and scale the PDF inside a tikzpicture.


title: Drawbacks of xspace

text: I'm certain I have read that `xspace` can cause more problems than it solves. But I cannot find anything to that effect either on this site or the web. Are there any drawbacks or risks associated with it?


title: ylabel postion with pgfplots

text: I am using pgfplots to plot some data, but I am having problem you see in the image below. Basically, the ylabel overlaps with the axis numbering. I have googled a LOT but couldn't find any solution. Some people say that with versions >1.2 this should be automatically fixed, but even with 1.5.1 this is still happening to me... Is there anyway to specify the location of the ylabel? Obviously I would like it to be a bit more to the left, so it does not overlap with the numbers. Thanks! ![enter image description here](http://i.stack.imgur.com/U1KJr.png)


title: Headline shown one page too late

text: I have a problem with the TOC. Here is a simple example:               \documentclass[11pt,a4paper,bibtotoc,idxtotoc,headsepline,footsepline,footexclude,BCOR12mm,DIV13,openany]{scrbook}     % Included by MAIN.TEX     % Defines the settings for the CAMP report document          \renewcommand{\sectfont}{\normalfont \bfseries}        % Schriftart der Kopfzeile          % manipulate footer     \usepackage{scrpage2}     \pagestyle{scrheadings}     \ifoot[\footertext]{\footertext} % \footertext set in INFO.TEX     %\setkomafont{pagehead}{\normalfont\rmfamily}     \setkomafont{pagenumber}{\normalfont\rmfamily}          %% allow sophisticated control structures     \usepackage{ifthen}          % use Palatino as default font     \usepackage{palatino}          % enable special PostScript fonts     \usepackage{pifont}          % make thumbnails     \usepackage{thumbpdf}          %to use the subfigures     \usepackage{subfigure}               \usepackage{colortbl}               %% show program code\ldots     %\usepackage{verbatim}     %\usepackage{program}          \usepackage{multirow}          %% use colors     \usepackage{color}          %% make fancy math     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{textcomp}     \usepackage{yhmath} % für die adots      %% mark text as preliminary     %\usepackage[draft,german,scrtime]{prelim2e}          %% create an index     \usepackage{makeidx}          % for the program environment     \usepackage{float}          %% load german babel package for german abstract     %\usepackage[german,american]{babel}     \usepackage[german,english]{babel}     \selectlanguage{german}          % use german characters as well     \usepackage[utf8]{inputenc}       % allow Latin1 characters          % use initals dropped caps - doesn't work with PDF     \usepackage{dropping}               \usepackage{styles/shortoverview}     %----------------------------------------------------     %      Graphics and Hyperlinks     %----------------------------------------------------          %% check for pdfTeX     \ifx\pdftexversion\undefined      %% use PostScript graphics      \usepackage[dvips]{graphicx}      \DeclareGraphicsExtensions{.eps,.epsi}      \graphicspath{{figures/}{figures/review}}       %% allow rotations      \usepackage{rotating}      %% mark pages as draft copies      %\usepackage[english,all,light]{draftcopy}      %% use hypertex version of hyperref      \usepackage[hypertex,hyperindex=false,colorlinks=false]{hyperref}     \else %% reduce output size \pdfcompresslevel=9      %% declare pdfinfo      %\pdfinfo {       %  /Title (my title)       %  /Creator (pdfLaTeX)       %  /Author (my name)       %  /Subject (my subject    )       %  /Keywords (my keywords)      %}      %% use pdf or jpg graphics      \usepackage[pdftex]{graphicx}      \DeclareGraphicsExtensions{.jpg,.JPG,.png,.pdf,.eps}      \graphicspath{{figures/}}            %% Load float package, for enabling floating extensions      \usepackage{float}           %% allow rotations      \usepackage{rotating}      %% use pdftex version of hyperref      \usepackage[pdftex,colorlinks=true,linkcolor=red,citecolor=red,%      anchorcolor=red,urlcolor=red,bookmarks=true,%      bookmarksopen=true,bookmarksopenlevel=0,plainpages=false%      bookmarksnumbered=true,hyperindex=false,pdfstartview=%      ]{hyperref}     %     %\usepackage[pdftex,colorlinks=false,linkcolor=red,citecolor=red,%     % anchorcolor=red,urlcolor=red,bookmarks=true,%     % bookmarksopen=true,bookmarksopenlevel=0,plainpages=false%     % bookmarksnumbered=true,hyperindex=false,pdfstartview=%     % ]{hyperref}     \fi               %% Fancy chapters     %\usepackage[Lenny]{fncychap}     %\usepackage[Glenn]{fncychap}     %\usepackage[Bjarne]{fncychap}          %\usepackage[avantgarde]{quotchap}          % set the bibliography style     %\bibliographystyle{styles/bauermaNum}     %\bibliographystyle{alpha}     \bibliographystyle{plain}               \begin{document}       \phantomsection       \addcontentsline{toc}{chapter}{Abstract}            \vspace*{2cm}       \begin{center}       {\Large \bf Abstract}       \end{center}       \vspace{1cm}       Text text text       \clearpage       \renewcommand{\contentsname}{Table of Content}       \tableofcontents       \clearpage       \phantomsection       \addcontentsline{toc}{chapter}{Outline of Thesis}            \begin{center}         \huge{Outline of Thesis}       \end{center}       text text text     \end{document}      My problem is that I got the TOC headline on the next Page in the top of the outline of my Thesis. Anybody got an idea?


title: Positioning of equations

text: I am trying to position my equations as in the image below, but I cant seem to get it to work (mainly because I cant get the line breaks to work). How would I position my equation like in the image below? My latex code is below: ![123](http://i.stack.imgur.com/yzCJg.jpg)               \documentclass[11pt,a4paper]{report}     \usepackage{amsmath,amsfonts,amssymb,amsthm,epsfig,epstopdf,titling,url,array}               \theoremstyle{plain}     \newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter     \newtheorem{lem}[thm]{Lemma}     \newtheorem{prop}[thm]{Proposition}     \newtheorem*{cor}{Corollary}          \theoremstyle{definition}     \newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers     \newtheorem{exmp}[thm]{Example} % same for example numbers     \newtheorem{conj}[thm]{Conjecture}          \theoremstyle{remark}     \newtheorem*{rem}{Remark}     \newtheorem*{note}{Note}               \title{My Thesis Title}     \author{My Name}     \date{\today}     \renewcommand\labelenumi{(\theenumi)}     \renewcommand\theenumi{\roman{enumi}}          \begin{document}     \tableofcontents          \chapter{Addition}     \section{Basics}          \begin{defn}     Let $x, y$ be some unknowns, we let:     \begin{equation}     x^2 + y^2 := (x+y)(x-y) := (1+2)(3+4) := (3*7)     = 21     = 42/2     \nonumber     \end{equation}     \end{defn}               \end{document}


title: Inserting figures using loops

text: I have a set of pictures in my working directory and I want to make a PDF report using these images. I want to include all of them, but the number of the pictures changes in each case. I would like to make a "for" loop to insert each picture one after the other sequentially. Can anyone can help me? At the moment the code I have is the following:               \begin{figure}[h!]     \begin{centering}     \includegraphics[width=10cm,height=10cm]{Figure1.png}     \caption[Sèries temporals de vent i direccions]{Sèries temporals velocitat de vent i     direccions. filtratge de pics i glaçades de velocitat.}     \label{Serie}     \end{centering}          \end{figure}      I would like to do it for every `.png` image in the directory. Thanks for your questions: I'm using Windows 7 and the files names follow the pattern Figura1.png, Figura2.png and so forth. So which of these possibilities would fit best?


title: Matrix with arrow - problem

text: I am using the following code from this question: Highlight elements in the matrix               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{fit}     \tikzset{%       highlight/.style={rectangle,rounded corners,fill=red!15,draw,         fill opacity=0.5,thick,inner sep=0pt}     }     \newcommand{\tikzmark}[2]{\tikz[overlay,remember picture,       baseline=(#1.base)] \node (#1) {#2};}     %     \newcommand{\Highlight}[1][submatrix]{%         \tikz[overlay,remember picture]{         \node[highlight,fit=(left.north west) (right.south east)] (#1) {};}     }     \begin{document}     \[       M = \left(\begin{array}{*5{c}}         \tikzmark{left}{1} & 2 & 3 & 4 & 5 \\         6 & 7 & 8 & 9 & 10 \\         11 & 12 & \tikzmark{right}{13} & 14 & 15 \\         16 & 17 & 18 & 19 & 20       \end{array}\right)       \Highlight[first]       \qquad       M^T = \left(\begin{array}{*5{c}}         \tikzmark{left}{1} & 6 & 11 & 16 \\         2 & 7 & 12 & 17 \\         3 & 8 & \tikzmark{right}{13} & 18 \\         4 & 9 & 14 & 19 \\         5 & 10 & 15 & 20       \end{array}\right)     \]     \Highlight[second]     %     \tikz[overlay,remember picture] {       \draw[->,thick,red,dashed] (first) -- (second) node [pos=0.66,above] {Transpose};       \node[above of=first] {$N$};       \node[above of=second] {$N^T$};     }     \end{document}       But my result is: ![enter image description here](http://i.stack.imgur.com/LxX8j.png)


title: Creating and using commands/counters which name depends on other counter

text: I would like to know how can I use a counter for defining other new counters. Something like this:               \newcounter{foo}     \stepcounter{foo}          %% Perhaps more increments, this depends of the user.          %% And now, to create a new counter and command from foo.          \newcounter{\csname foofoo\thefoo\endcsname}     \def\csname mydyndef\thefoo\endcsname{definition...}      For example, with foo = 5, to create the counter foofoo5 and the command \mydyndef5. And of course, to use it now:               This is my example \csname mydyndef\thefoo\endcsname,     with counter \csname thefoofoo\thefoo \endcsname.      But, of course, nothing of this works for me. And that is the question: How can I achieve this? This problem arises from searching a pure manual solution to this question: New list environment: automatic enumeration with "a posteriori" format, creating a counter (label@counterx) and saving the format in a command (\label@formatx) for each new depth (controlled by list@depth counter):               \newenvironment{labelist}{%%%            \stepcounter{list@depth} %% Actual depth            \ifnumcomp{\value{list@depth}}{=}{1} {          \newcounter{label@counter1}          \setcounter{label@coutner1}{0}               \def\label@format1{\Alph{label@counter1}}               \begin{list}{ \textbf{(\label@format1)}  }                      { \usecounter{label@counter1 }       }{         %% Similar to the first case, but replacing 1 with the actual depth.       }     }{        %% Other code not-important here.     }


title: No footnotemark in the listoflistings

text: I'd like to have footnotes in the caption of listings. I got that working. But the `\footnotemark` gets shown in the `\listoflistings`. Normally you can specificly define the text for a caption for the listofXY. But this does not work as I have to give the caption inside of squared brackets. So I cannot use the squared brackets (which usually define the title for the listofXY) here. Some example code which works:               \begin{lstlisting}[caption={myCaption\protect\footnotemark},label=myLabel]         // code     \end{lstlisting}     \footnotetext{The text for the footnote}      Does anyone of you have an idea, how I can modify this code snippet to prevent the `\footnotemark` to be shown in the `\listoflistings`?


title: Missing number treated as zero in eqnarray*

text: The following `eqnarray*` environment               \begin{eqnarray*}     [v,v] &=&  0\\     [v,v+0] &=& 0\\     [v,v] + [v,0] &=& 0\\     0 + [v,0] &=& 0\\     [v,0] &=& 0\\     [0,v] = -[v,0] = -(0) = 0\\     Maka didapat [v,0] = 0 = [0,v].     \end{eqnarray*}      gives the error               Missing number treated as zero


title: Flush stacked rotated images

text: I have a series of images that I would like to line up horizontialy, all scaled to a given height, rotated 90 degrees and _exactly flush_ with respect to each other. For example:               \documentclass{article}     \usepackage[draft]{graphicx}          \setlength\parindent{0pt}      % Remove all indents     \pagestyle{empty}              % Empty pagestyle          \newcommand{\tallbox}[1]{%       \resizebox{!}{6cm}{ %         \includegraphics[angle=90]{#1}  %       } %     }          \begin{document}%     \tallbox{gen/2354942681964301350.pdf}%     \tallbox{gen/3719368526636490760.pdf}%     \tallbox{gen/4072051681301936821.pdf}%     \end{document}      This gives: ![enter image description here](http://i.stack.imgur.com/5yaRU.png) I cannot figure out how to automatically remove the spacing between the graphics. Any combination of negative `\hspace` seems to fail when the height is changed. I've tried changing the lengths:               \setlength{\textfloatsep}{0pt}     \setlength{\intextsep}{0pt}     \setlength{\floatsep}{0pt}     \setlength{\itemsep}{0pt}      But none of these seem to change the particular spacing I'm looking for.