title: Revtex4-1 and algorithm2e indentation clash

text: there seems to exists a clash between revtex4-1 and the algorithm2e package. Whenever I try to insert an _algorithm_ block when using the _revtex4-1_ document class, the tabulation is not working properly. The following latex code should hopefully be self explanatory.               %\documentclass[10]{article}     \documentclass[10]{revtex4-1}          % these are to avoid another clash between revtex and algorithm2e     \makeatletter     \newif\if@restonecol     \makeatother     \let\algorithm\relax     \let\endalgorithm\relax     % needed includes     \usepackage[ruled]{algorithm2e}     \usepackage{algorithmic}          \begin{document}          The following pseudocode exibits a clash between revtex4-1 and algorithm2e.          \begin{algorithm}     \caption{Calculate something}     \begin{algorithmic}     \FOR{every thing you}         \FOR{every step you}             \STATE{compute something}         \ENDFOR     \ENDFOR     \end{algorithmic}     \end{algorithm}          \end{document}      This is a how the rendered pdf shows on my system (sorry, I'm not allowed to insert images in this post). The tabulation is correct when using the simple _article_ document class. I am using Texmaker (with texLive) under Ubuntu 10.04. Using the _revtex4-1_ document class:               for every thing you do     for every step you do     compute something     end for     end for      Using the _article_ document class:               for every thing you do         for every step you do             compute something         end for     end for      Anybody with a solution to make these two work together?


title: Extraneous text from \NewDocumentEnvironment (corrupted TeXLive2012 ?)

text: I seem to be getting spurious text (red text) containing the name of the environment, when using `\NewDocumentEnvironment` (blue text) to define a custom `minipage` environment with TeXLive2012: ![enter image description here](http://i.stack.imgur.com/JG2Ut.png) Things work just fine if I use `\NewEnviron` (brown text), or `\newenvironment` (green text) instead of `\NewDocumentEnvironment` (blue text), or with TeXLive2011: ![enter image description here](http://i.stack.imgur.com/BIEid.png) Since this seems to be a very basic example I am thinking that my TeXLive2012 is still corrupted somehow as per my earlier problem:   * Corrupted TeXLive2012 installation? (File `l3candidates.sty' not found) ## Question: Am I the only one who is having this problem? If so can someone look thru the `\listfiles` and let me know if something is out of wack. ## Aside:   * Is the issue with the `\color{}` affecting vertical alignment a known issue? Try commenting out the `\color{}` in any of the definitions of the custom environments to see what I mean. If this warrants a separate question, I'd be happy to post one. ## Code:               \documentclass{article}          \usepackage{xcolor}% To highilight the suprious text.     \usepackage{xparse}     \usepackage{environ}     \usepackage{showframe}               %% This is OK ONLY in TeXLive2011, NOT TeXLive2012  .     %%     %% With TeXLive2012, this produces supurious text in     %% the output containing the name of this environment.     \NewDocumentEnvironment{MyMinipageX}{%         O{c}%         G{0.50}%         }{%         \begin{minipage}[#1]{#2\linewidth}%         \color{blue}%     }{%         \end{minipage}%         \ignorespacesafterend%     }{}%               %% This is OK in both TeXLive2011 and TeXLive2012.     \NewEnviron{MyMinipageY}[2][c]{%         \begin{minipage}[#1]{#2\linewidth}%             \color{brown}%             \BODY%         \end{minipage}%         \ignorespacesafterend%     }%          %% This is OK in both TeXLive2011 and TeXLive2012.     \newenvironment{MyMinipageZ}[2][c]{%         \begin{minipage}[#1]{#2\linewidth}%         \color{green}%     }{%         \end{minipage}%         \ignorespacesafterend%     }%               \listfiles          \begin{document}     \color{red}% So that any spurious text is highlighted          % -------------------------- \NewDocumentEnvironment     \begin{MyMinipageX}[t]{0.10}         A     \end{MyMinipageX}     \begin{MyMinipageX}[t]{0.10}         B     \end{MyMinipageX}          % -------------------------- \NewEnviron     \begin{MyMinipageY}[t]{0.10}         C     \end{MyMinipageY}     \begin{MyMinipageY}[t]{0.10}         D     \end{MyMinipageY}          % -------------------------- \newenvironment     \begin{MyMinipageZ}[t]{0.10}         E     \end{MyMinipageZ}     \begin{MyMinipageZ}[t]{0.10}         F     \end{MyMinipageZ}     \end{document}      ## Output of `\listfiles`:                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)       xparse.sty    2012/08/14 v4091 L3 Experimental document command parser        expl3.sty    2012/08/14 v4091 L3 Experimental code bundle wrapper      l3names.sty    2012/07/16 v3990 L3 Namespace for primitives     l3bootstrap.sty    2012/07/16 v3991 L3 Experimental bootstrap code         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     l3basics.sty    2012/08/08 v4069 L3 Basic definitions      l3expan.sty    2012/08/10 v4073 L3 Argument expansion         l3tl.sty    2012/07/16 v3991 L3 Token lists        l3seq.sty    2012/07/16 v3991 L3 Sequences and stacks        l3int.sty    2012/07/16 v3991 L3 Integers      l3quark.sty    2012/08/08 v4065 L3 Quarks        l3prg.sty    2012/08/08 v4061 L3 Control structures      l3clist.sty    2012/07/16 v3991 L3 Comma separated lists      l3token.sty    2012/08/08 v4069 L3 Experimental token manipulation       l3prop.sty    2012/07/16 v3991 L3 Property lists        l3msg.sty    2012/08/10 v4077 L3 Messages       l3file.sty    2012/08/08 v4059 L3 File and I/O operations       l3skip.sty    2012/07/16 v3991 L3 Dimensions and skips       l3keys.sty    2012/07/16 v3991 L3 Experimental key-value interfaces         l3fp.sty    2012/08/14 v4089 L3 Floating points        l3box.sty    2012/07/16 v3991 L3 Experimental boxes     l3coffins.sty    2012/07/20 v4011 L3 Coffin code layer      l3color.sty    2012/07/16 v3991 L3 Experimental colour support     l3luatex.sty    2012/08/03 v4049 L3 Experimental LuaTeX-specific functions     l3candidates.sty    2012/05/12 v3633 L3 Experimental additions to l3kernel     showframe.sty    2011/02/24 v0.1i showframe (new impl., RN)      eso-pic.sty    2010/10/06 v2.0c eso-pic (RN)     atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf       grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live     supp-pdf.mkii


title: Can one draw a hyperbola with arguments in TikZ?

text: I'm using TikZ to draw some conic-section graphs. There is a built-in ellipse command (semiaxes as two arguments) and a rudimentary parabola command (with a vertical axis, but one can rotate), but to draw a hyperbola I had to fake it with a spline and externally compute the control points. I don't want to plot a sequence of pixels, I'd prefer something parametric that can be easily modified. Is there a short-cut to draw a hyperbola just from the semiaxes and the centre location, within TikZ? I'm not unhappy with spline approximations, they work fine for, say, cardioids, but is there some simpler way to get a hyperbola with TikZ?


title: A symbol used in civil engineering

text: How to make a symbol like this? Due to the reputation limit, I can't upload an image. So I decribe the symbol by word, I hope you can understand it. My symbol is: > a phi with an underscore. phi is `\niphi`.


title: Center align italic number in siunitx S-column

text: Here is a table with the `siunitx` S column type. I would like the italic value (the command with `swapshift`) to be still centered on the decimal point. The superscript can be variable, but will almost always be just "a" or "b", maybe "c", never more than 1 letter in length.               \documentclass{memoir}     \usepackage{siunitx}     \usepackage{multirow}     \sisetup{inter-unit-product={}\cdot{},sticky-per=true,multi-part-units=single,separate-uncertainty=true,list-units=single,range-units=single,detect-all,detect-weight=true,detect-inline-weight=math}     \usepackage{etoolbox}     \newcommand{\thirteenc}{\textsuperscript{13}C}     \newcommand{\oneh}{\textsuperscript{1}H}     \robustify\bfseries     \usepackage{bpchem}     \usepackage[tracking=bpchem]{chemstyle}     \setcounter{BPCno}{200}          \newcommand{\mcol}[3]{\multicolumn{#1}{#2}{#3}}     \newcommand{\mrow}[3]{\multirow{#1}{#2}{#3}}     \newcommand{\onemultcol}[2]{\mcol{1}{#1}{#2}}     \newcolumntype{g}{>{\rule{1.2em}{0em}}r@{ }l}     \newcommand{\greek}[1]{$#1$}     \newcommand{\range}[1]{\mcol{1}{c}{\bfseries #1}}     \newcommand{\swapshift}[2]{\mcol{1}{c}{\textit{#1}\textsuperscript{#2}}}     \newenvironment{onehTable}[2]{%     \begin{tabular}{gS[table-format=1.2]S[table-format=1.2]S[table-format=1.2]S[table-format=1.2]} \toprule%     \mcol{2}{c}{\mrow{2}{*}{Position}} & \mcol{2}{c}{Computed} & \mcol{2}{c}{Experimental} \\%     & & \mcol{1}{c}{\textbf{#1}} & \mcol{1}{c}{\textbf{#2}} & \mcol{1}{c}{\textbf{#1}} & \mcol{1}{c}{\textbf{#2}} \\%     \cmidrule[\lightrulewidth](r){1-2} \cmidrule[\lightrulewidth](lr){3-4} \cmidrule[\lightrulewidth](l){5-6}}%     {\end{tabular}}          \begin{document}     \CNlabelsubnoref{carvomenthone}{cis}     \CNlabelsubnoref{carvomenthone}{trans}     \begin{table}         \centering         \caption{Calculated and Experimental \oneh{} Shifts (in ppm) for carvomenthones \CNref{carvomenthone}}\label{tab:SI:carvomenthone1H}         \begin{onehTable}{\CNrefsub{carvomenthone}{cis}}{\CNrefsub{carvomenthone}{trans}}         2 & & 2.47 & 2.48 & 2.45 & 2.33 \\         3 & \greek{\alpha} & 1.87 & 1.29 & \swapshift{1.87}{a} & 1.30 \\         3 & \greek{\beta} & 1.70 & 2.12 & \range{1.60--1.75} & 2.10 \\         10 & Me & 1.06 & 0.92 & 1.10 & \swapshift{1.01}{b} \\ \bottomrule         \end{onehTable}     \end{table}     \end{document}


title: I can't make the text appear on the page after an align, (overfull \hbox)

text: Can anyone help the text appear on the page and try and keep it in the align               \documentclass[margin]{res}     \usepackage{amsmath}     \usepackage{epsfig}     \setlength{\textwidth}{5.1in}          \begin{document}     \section{Experience}                                 \begin{alignat*}{2}                                                  \text{Maintenence Worker} &- \text{Summers 2010 and 2011} &&- \text{Responsibilities included ensuring the upkeep of the grounds, being on-call to answer immediate problems, time management and working to a strict deadline} \\                                         \text{Holt Hall Media Rep} &- \text{November 2011 to Present} &&- \text{Responsibilities included building a website for the Hall to advertise to new students, regular photography, regular videography, creativity and drive to improve the hall of residence} \\                                         \text{Head of School} &- \text{Saint Felix School} &&- \text{Responsibilities included regular meetings with the headmaster to continue to provide ongoing support for students, driving the direction of the school from a pupil base, chairing a school council} \\                                         \text{Head of Events, LCR} &- \text{2012 to 2013} &&- \text{Responsibilities included coming up with original and creative events for the radio station and continuing to promote and market the station} \\                                         \text{Head of Quality Control, LCR} &- \text{2013 to Present} &&- \text{Responsibilities include working with presenters to push the station forward and working to build a unified station with high quality shows and a full schedule}                                 \end{alignat*}


title: Subtitle for a section

text: I'm using XeLaTeX to take notes in class, and I am using a new section for each lecture. Since the lectures have different teachers, I'd like a small italic subtitle for each `\section`. I'm using the article class. How would I go about doing that?


title: How to enbale SyncTex in LyX?

text: I'm using LyX 2.0.7, and I tried to enable 'Synchronization with output' by following the guide on LyX wiki. I couldn't succeed after doing each step exactly as the wiki stated. After lots of experiments to get it work, I followed the steps for 'Enable SyncTeX in LyX' for LyX 1.6, which can be applied to LyX 2.0 with some modification, and it make SyncTex work! As it explained the wiki page, the steps for enabling SyncTex is different in version 1.6.* and 2.0, the following quotes are from the wiki page. **Lyx 2.0** > >   1. In Document > Settings > Output, check Synchronize with output >   2. If your viewer needs another output format than \synctex=-1 (which is > the default), select > it or insert it in "Custom Macro" >   3. Modify Output > General > PDF for your PDF viewer (see the viewer- > specific notes below) > **Lyx 1.6** >   1. Enter Tools > Preferences > File Handling > Export programs >   2. Click "LaTeX (pdflatex) > PDF (pdflatex)" in the list. In the "Export > program" box, it now says pdflatex $$i. Instead, put pdflatex -synctex=-1 > $$i there. >   3. Click Modify to the right of the list, then Apply. > The question is: Since LyX 2.0 has specific settings for enabling SyncTex, why it is not enough to enable it there as the wiki page suggest? and why it is still required to change the latex command line argument? Can anyone confirm this problem? Is it a bug or is it how it suppose to function? If it's a bug how can we report it?


title: Aligning Tikz Graphs of x-y coordinate systems

text: I have 5 different x-y coordinate planes I am trying to draw, and I'd like to have them aligned. In particular, I'd like to make 3 in one row, 2 in the next, and have the x-axes all aligned within the same row. I have made the graphs and put them in two separate rows, but I cannot get them align nicely. Here is a minimum working example:               \documentclass[border=10pt]{standalone}      \usepackage{tikz,amsmath}      \usepackage{tabularx}                \begin{document}             \begin{tabular}{ccc}         \begin{tikzpicture}[scale=0.175]          \draw[<->] (-4,0)--(4,0); \draw[<->] (0,-6)--(0,6); \node at (4.5,0) {$x$};         \node at (0,6.5) {$y$};  \draw[green, ultra thick, domain=-1.5:3] plot (\x, {4+3* \x-2*\x*\x});         \draw[very thick,black](-0.3,3.95) node[left=1pt]{(A)}; \end{tikzpicture}  &        \noindent  \begin{tikzpicture}[scale=0.175] \draw[<->] (-4,0)--(4,0); \draw[<->] (0,-6)--(0,6);         \node at (4.5,0) {$x$};        \node at (0,6.5) {$y$};         \draw[green, ultra thick, domain=-1.3:2.6] plot (\x, {-2+3*\x-2*\x*\x});       \draw[very thick,black](-0.3,3.95) node[left=1pt]{(B)}; \end{tikzpicture} &       \noindent \begin{tikzpicture}[scale=0.175] \draw[<->] (-4,0)--(4,0);                 \draw[<->] (0,-6)--(0,6); \node at (4.5,0) {$x$};        \node at (0,6.5) {$y$};  \draw[green, ultra thick, domain=-2.5:1.05] plot (\x, {-2+3*\x+2*\x*\x});        \draw[very thick,black](-0.3,3.95) node[left=1pt]{(C)}; \end{tikzpicture} \\[1em]       \noindent \begin{tikzpicture}[scale=0.175] \draw[<->] (-4,0)--(4,0); \draw[<->] (0,-6)--(0,6); \node at (4.5,0) {$x$};       \node at (0,6.5) {$y$};  \draw[green, ultra thick, domain=-1.6:2.9] plot (\x, {0+3*\x-2*\x*\x});        \draw[very thick,black](-0.3,3.95) node[left=1pt]{(D)}; \end{tikzpicture} &       \noindent \begin{tikzpicture}[scale=0.175] \draw[<->] (-4,0)--(4,0);                  \draw[<->] (0,-6)--(0,6); \node at (4.5,0) {$x$};        \node at (0,6.5) {$y$};  \draw[green, ultra thick, domain=-2.3:0.8] plot (\x, {-2-3*\x-2*\x*\x});         \draw[very thick,black](-0.3,3.95) node[left=1pt]{(E)};                  \end{tikzpicture} &         \\       \end{tabular}            \end{document}


title: ! TeX capacity exceeded, sorry [input stack size=5000]. \maketitle

text: I have seen many threads about this error, but none seems to help with my particular issue. This is my code, which including suggestions for the required packages, I intend for it to be the minimum code which yields the problem:               \documentclass[letterpaper,12pt]{book}          \usepackage{lineno}          \title{Teachings on Pythagoras}     \author{Guillermo F. Sanchez M.}          \begin{document}       \setpagewiselinenumbers       \modulolinenumbers[1]       \linenumbers       \frontmatter         \maketitle         \thispagestyle{empty}         \tableofcontents         \listoftables       \mainmatter         \pagenumbering{arabic}     Hello.     \end{document}      The issue is that, when I comment out "\maketitle", the error persists (even tough the error messages points at it), but if "\tableofcontents" is ALSO commented out, the error goes away. This is the interpreter I am using:               $ pdflatex     This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)       restricted \write18 enabled.


title: Is LaTeX intended for unattended typesetting?

text: With markup converters like Pandoc, it is now possible to generate LaTeX documents without ever touching any LaTeX code. However, obtaining aesthetic page breaks for slightly complex documents, taking for example into account figures, widows and orphans may still require manual intervention in the LaTeX code. (I know there are packages for this out there, but unfortunately they do not resolve all issues.) So it seems that we are quite not yet at that utopian point were one can blindly write content without ever having to worry about how the output will look like. (This argument _is_ often used though for LaTeX/LyX advocacy.) This made me wonder: Did LaTeX 2ε developers intend for unattended typesetting? If not, will LaTeX 3 change anything with respect to this? **EDIT** For the sake of clarity, I am mainly referring to documents such as dissertations, reports and books.


title: tikz/pgfplot unstacked ybar with "switched" overlay

text: So, i'm trying to make a nice ybar plot using pgfplot, but i have some issues i want to solve, hope you can help me. 1) the ybar are not centered on the x value as they should, i mean, the bar for x = 1 start at x=1, so it's centered at x=1.5 which looks a bit odd to me. how do i changed that such that the bar is centered around the values? (that was the easy question i guess) 2) i have a legend "issue", why do i have this kind of double bar instead of one single bar as it should? 3) the real question: there is 2 tests in my dataset. sometimes the value of test 1 is larger than test 2, sometimes the other way around. I don't want stack bar in this kind of setup, that would look strange. What i want to do, is to overlay the 2 bar but the "top" bar (let's say) is not always the same. How do i say to tikz that it should always put the bar with the high value in the "background" and the bar with the small value in the foreground? Thanks for you help, i enclosed the output figure I get and a MWE. ![sorry for the low png quality from pdf conversion](http://i.stack.imgur.com/2JBds.png)               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{plotmarks}     \usepackage{pgfplotstable}     \usepackage{pgfplots}          \usepackage[active,tightpage]{preview}  %generates a tightly fitting border around the work     \PreviewEnvironment{tikzpicture}          \begin{document}          \begin{tikzpicture}     \begin{axis}[         x tick label style={             /pgf/number format/1000 sep=},         ylabel=ylabelé,         xlabel=xlabel,         enlarge x limits=0.01,         ybar,         bar width=10pt,         xmin = 1,         xmax = 16,         width=8cm,height=7cm,         ytick pos=left,         xtick pos=left,         bar shift = 0pt,         ymode=log,     ]          \addplot[fill=red, ybar interval]     coordinates{         (1,222898.050000000)         (2,235072.800000000)         (3,241192.450000000)         (4,156585.700000000)         (5,44232.0500000000)         (6,7846.75000000000)         (7,1653.35000000000)};          \addplot[fill=blue, ybar interval]         coordinates{         (1, 455097.750000000)         (2, 101759.350000000)         (3, 67777.1500000000)         (4, 62902.1500000000)         (5, 55631.1500000000)         (6, 39789.6500000000)         (7, 34237.2500000000)         (8, 27603.8000000000)         (9, 23348.3000000000)         (10, 8781.80000000000)         (11, 7717.65000000000)         (12, 3644.70000000000)         (13, 1536.20000000000)         (14, 1440.400000000000)         (15, 1748.95000000000)         (16, 252.150000000000)};          \legend{test1, test2}     \end{axis}     \end{tikzpicture}                         \end{document}


title: Double style and double colour line in tikz

text: in my document i have a lot of lines like this: ![LineExample](http://i.imgur.com/CiPMXdc.png) I usually do this with a code like this:               \begin{tikzpicture}[node distance = 5cm]      \node (a) {};      \node (b) [right of=a] {};      \draw[red] (a) -- (b);      \draw[blue, decorate, decoration={snake}] (a) -- (b);     \end{tikzpicture}      I thought it would be easier if i defined an appropriate tikzstyle, so i tried with something like:               \tikzstyle{LL} =[draw, postaction={decorate, blue, draw}, decoration={snake}]      but i can't find a way to make the straight line red... any help will be appreciated.


title: Remove heading lslisting multiple pages

text: Hi guys I have a problem with lslisting because the code spans over multiple pages. I really hope you can help: ![result when typeset](http://i.stack.imgur.com/0Vu4g.png) How can I remove the heading (BILIAG A. APPENDIKS)? Here is a minimal example of the code:               \documentclass[11pt,a4paper,danish,oneside]{memoir}      \usepackage[utf8]{inputenc}     \usepackage[danish]{babel}      \usepackage[T1]{fontenc}     \usepackage{graphicx}       \usepackage[margin=1in]{geometry}     \usepackage{appendix}          \usepackage{listings}     \usepackage{color}     \usepackage{textcomp}     \definecolor{listinggray}{gray}{0.9}     \definecolor{lbcolor}{rgb}{0.9,0.9,0.9}     \lstset{backgroundcolor=\color{lbcolor},     tabsize=4, rulecolor=, language=matlab,     basicstyle=\scriptsize, upquote=true,     aboveskip={1.5\baselineskip}, columns=fixed,     showstringspaces=false, extendedchars=true, breaklines=true,     prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},     frame=single, showtabs=false, showspaces=false, showstringspaces=false,     identifierstyle=\ttfamily,     keywordstyle=\color[rgb]{0,0,1},     commentstyle=\color[rgb]{0.133,0.545,0.133},     stringstyle=\color[rgb]{0.627,0.126,0.941},     identifierstyle=\color[rgb]{0.125,0.695,0.690},     texcl=true, inputencoding=ansinew, extendedchars=true}          \begin{document}     \appendix     \chapter{APPENDIKS}     \addtocontents{toc}{\cftpagenumbersoff{chapter}}     \addtocontents{toc}{\cftpagenumbersoff{section}}          \section*{Topbillede.m}     \lstinputlisting{Topbillede.m}     \end{document}


title: Is there a way to get the Skype logo in the cvtheme document class?

text: I'm using the `cvtheme` document class and `\moderncv{classic}` to create a CV. The field I am applying for jobs in often conduct their interviews over Skype. The are command to get small phone (`phone`), cellphone (`\mobile`) and email (`\email`) logos. Would it be possible to add a small Skype logo in the same manner? This would be a lot more aestheically pleasing than having to have "Skype: _skypename_ " in the final output.


title: Why won't \hspace work?

text: I'm trying to get a block of text to be aligned 2.55cm from the left of the page. I'm sure there's a better way of doing this, but it would be nice to get an answer anyway. When I type: `\hspace{2.55cm} text text text text text text ... text` I get an output that has the first line 2.55cm from the left but the following lines are aligned with the left of the page, naturally. So I tried using the `\hspace{2.55cm}` command at the point in the text where I want there to be an indent (i.e. the start of every line in the output). But when I do this, I get the same output with only the first line indented by 2.55cm and the following lines aligned with the left of the page. Why is this - and how do I fix it?


title: Unify the size of two tables

text: How can I unify the table size and the font size for these two tables               \documentclass{article}          \usepackage{graphicx}          \begin{document}     %   Table 1     \begin{table}[h]     \resizebox{\textwidth}{!}{%     \begin{tabular}{|l|l|}     \hline     \multicolumn{1}{|c|}{\textbf{Day}} & \multicolumn{1}{c|}{\textbf{Summary}}                                                                                \\ \hline     \textbf{Monday}                     & \textbf{\begin{tabular}[c]{@{}l@{}}A clear day with lots of sunshine. \end{tabular}} \\ \hline     \textbf{Tuesday}                   & \textbf{\begin{tabular}[c]{@{}l@{}}Cloudy with rain, across many\\ northern regions, clear spells,across most of Scotland and Northern Ireland, but rain reaching the far\\ northwest.\end{tabular}} \\ \hline     \end{tabular}     }     \end{table}          %   Table 2     \begin{table}[h]     \resizebox{\textwidth}{!}{%     \begin{tabular}{|l|l|}     \hline     \multicolumn{1}{|c|}{\textbf{Min Temp}} & \multicolumn{1}{c|}{\textbf{Max Temp}} \\ \hline     \textbf{11C}                            & \textbf{22C}                           \\ \hline     \end{tabular}     }     \end{table}          \end{document}


title: Different style of permille sign

text: ![Long permille sign](http://i.stack.imgur.com/oPPay.jpg) Hi all, I have found a publication using this permille sign with Times New Roman font. I have tried the textcomp \textperthousand and wasysym \permil commands but it does not yield this symbol. This one extends below the character line. Does anyone know of it? Also, I pasted the character into Word and it gives me an ampersand (&) (position 7 on most character maps), with font name as AdvPSMPE7. Any help or tip will be greatly appreciated.


title: How to draw this genogram using LaTeX/TikZ

text: I'm a medical student and I need to write a report on a patient for next week. I'm fairly new to LaTeX, so I was wondering if there is a way of creating a genogram like the one below. It needs to have both the usual family tree and the type/quality of the relationships between each person. Is there a package that could make this easier? I have zero experience with TikZ and graphics, and I feel I won't have time to do this. I found an earlier question regarding genograms, but they were much simpler, and it was already 1 year old. ![enter image description here](http://i.stack.imgur.com/irGBV.jpg)


title: colortbl and mdwtab

text: There is an incompatibility between the packages `colortbl` and `mdwtab`. The following document fails with LuaLaTex and the error `! Extra }, or forgotten \endgroup.`               \documentclass{article}     \usepackage{mdwtab}               % A     \usepackage[table]{xcolor}        % B     \begin{document}          \rowcolors{1}{gray!15}{lightgray} % C     \begin{tabular}{l}     X\\     Y\footnote{Test}\\     Z\\     \end{tabular}          \end{document}      I can comment out some of the lines to make it work.   * Remove lines B and C: Compiles, but no color   * Remove line A: Compiles, but no footnote, just the footnotemark.   * Switch order of line A and B: Compiles, but no color Considering that `mdwtab` is a reimplementation of `array` tables, it is understandable that there are some issues. However, it is the first I actually encountered. The `mdwtab` manual mentions some adaptations that were necessary for some packages, all by the same author. `colortbl` is just another one by that author (David Carlisle). Is there an alternative package I can use to add colors to `mdwtab` tables? It allows footnotes and I prefer its spacing for matrix environments.


title: How do I typeset a fraction of Young tableaux?

text: How do I typeset a fraction of Young tableaux so that the fraction is nicely spaced and diagonal?               \documentclass{article}     \usepackage{nicefrac}     \usepackage{xfrac}     \usepackage{youngtab} % for Young tableaux     \usepackage{young} % for Young tableaux     \begin{document}     This looks horrible     \[\frac{\young(345,23,1) }{ \young(531,31,1)}\]     So does this     \[\sfrac{\young(345,23,1) }{ \young(531,31,1)}\]     This isn't bad, but the separator is small, and the spacing is not so good.     \[\nicefrac{\young(345,23,1) }{ \young(531,31,1)}\]     \end{document}


title: Change the language of a LaTeX document

text: Is there any way to change which language LaTeX works in? I'm writing a report in danish, but when I use `\maketitle` and other commands which generates some content. This content appears in english. Is there any way to change this?


title: How to randomly shuffle a sliced image?

text: I have no idea to shuffle the following grids of a sliced image. How to do this in (La)TeX or PostScript level? ![enter image description here](http://i.stack.imgur.com/nU3kR.gif)               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{multido}     \usepackage{graphicx}          \def\Columns{5}% columns     \def\Rows{5}% rows     \def\Filename{ParisHilton}     \def\Scale{1}          \newsavebox\IBox     \savebox\IBox{\includegraphics[scale=\Scale]{\Filename}}               \psset     {         xunit=\dimexpr\wd\IBox/\Columns,         yunit=\dimexpr\ht\IBox/\Rows,     }          \SpecialCoor     \begin{document}          \multido{\ny=\Rows+-1}{\Rows}     {         \multido{\nx=0+1}{\Columns}         {             \pspicture(\Columns,\Rows)                 \psclip{\psframe[linestyle=none,linewidth=0pt](!\nx\space \ny\space 1 sub)(!\nx\space 1 add \ny)}                     \rput[bl](0,0){\usebox\IBox}                 \endpsclip             \endpspicture         }     }          \end{document}      Here is the picture that I used in this answer as a demo picture.


title: Modifying apacite reference style

text: I am trying to simulate my graduate school's references style using `apacite` package with `bibtex`. They claim their guidelines are close to APA but it is indeed an hybrid that no-one really accomplishes fully. Even though there seems to be no differences in entries with a single author between mine: ![mine](http://i.stack.imgur.com/RTFzk.png) and the graduate school's ![enter image description here](http://i.stack.imgur.com/EUyR4.png)3; there is a quite difference when the resources have two ![enter image description here](http://i.stack.imgur.com/kmXWe.png) or more authors ![enter image description here](http://i.stack.imgur.com/g2qnv.png) . Here are the two author ![enter image description here](http://i.stack.imgur.com/tPQPf.png) and multiple author ![enter image description here](http://i.stack.imgur.com/eReCa.png) in the reference style of the school. (The word _ve_ means 'and' in Turkish.) Is there anyway to accomplish this entry style by modifying `apacite` 's attributes about two and multiple authored papers?


title: How to right align \part

text: I have been trying to right align the `\part` in latex, but without any success Please also take into account the TOC input and the text formatting (fonts, etc. from the whole document). Basically I don't wanna change anything else in the basic part declaration of latex, except right justifying it and use a ":" or "-" instead of the "." at the end of the Part number. I would also like the page number to be hidden. Thank you guys! PS: Unfortunately I can't post a picture of what I have right now. I have found this code while searching the web:               \def\@part[#1]#2{%     \ifnum \c@secnumdepth >-2\relax       \refstepcounter{part}%       %  add to TOC, but without page number (since this page is not counted)        \addtocontents{toc}{\protect           \nonumcontentsline{\numberline{\partname\space\thepart}#1}}     \else       %  add to TOC, but without page number       \addtocontents{toc}{\protect\nonumcontentsline{#1}}     \fi     \markboth{}{}%     {\centering      \interlinepenalty \@M      \normalfont      \ifnum \c@secnumdepth >-2\relax        % part number - UPPERCASE, and make it slightly larger        \large \bfseries \MakeUppercase{\partname\nobreakspace\thepart}        \par        \vskip 20\p@      \fi      % part title - make it slightly larger      \large \bfseries #2\par}%     \@endpart}      But whatever I do, I can't right align it. Tried the `flushright` environment. My other idea was to put it in a makebox to be aligned.. But that's not possible :( ## UPDATE Using the `minipage` environment, I was able to right align the `\part` :-D yuhuu I have just put the `\part` inside the `minipage` environment and played a bit its attributes. It works fine. But the remaining problem is how to get the part number and the title on the same line: > **Part I: Title of the first part**


title: How to redefine \ref as \eqref?

text: I would like to redefine `\ref` as `\eqref`, but `\renewcommand{\ref}{\eqref}` doesn't work. I would guess this is hapenning because `\eqref` is internally defined as `\newcommand{\eqref}{(\ref)}`, but I'm not sure about it. Any advice?


title: How many different concepts of "token equivalence" are there in TeX?

text: I was living in the delusion that the "token equality" tested by `\ifx` was the only thing you need to remember about this subject, but this week I learned otherwise (thanks to David Carlisle). Now I'm wondering how many fundamentally different concepts of "token equivalence" there are? So far I know two:   1. Test with `\ifx`. Two characters are equal when they have the same character code and catcode, two cs names are equal when they are both undefined or are both "let to the same thing", a cs name is equal to a character iff it has been `\let` to it, ...   2. Test in delimited argument. Two characters are equal when they have the same character code and catcode, two cs names are equal when they _have the same name_ , a character is never equal to a cs name, ... But my knowledge is obviously fragmentary. I'd like to have the whole picture. It's hard to find out about such things in the TeXbook. I'd like to ask for one answer per fundamentally different concept of token equality. Each answer should specify   * In what context this concept is invoked.   * Which tokens are equal and which are not.   * Is this arbitrary or is there a rationale behind this (as opposed to making everything work as with `\ifx`).   * Is there any neat trick with which this can be exploited? **Just to be sure:** I'd also like answers on the two examples I mentioned, as my knowledge is obviously limited...


title: BibTeX month format

text: Please i'd like to display the month in French in the pdf, have you an idea ?               @Misc{url-site,       key =      {site},       title =    {\textit{site}},       month = jun,       year = {2012},       howpublished = {URL: \texttt{http://www. a web site.com/}}          }      It displays _June_ , but I'd like _Juin_


title: LaTeX incorrect figure numbering

text: I have several figures and subfigures in a LaTeX file, but only the first few are numbered correctly. Here is the part of the code that is giving me problems:               \documentclass[11pt]{article}     \usepackage{graphicx}         \usepackage{subcaption}     \usepackage{amsmath}          \begin{document}                   \begin{figure}[t]     \centering       \includegraphics[width=5in]{figure1.png}       \caption{Caption1}     \label{fig:fig1}      \end{figure}          \begin{figure}[htp!]      \caption{caption2}   \label{fig:fig2}             \centering              \begin{subfigure}{\textwidth}                     \includegraphics[width=\textwidth]{subfig1.png}                     \caption{subfig1}                     \label{fig:subfig1}             \end{subfigure}                    \begin{subfigure}{\textwidth}                     \includegraphics[width=\textwidth]{subfig2.png}                     \caption{subfig2}                     \label{fig:subfig2}             \end{subfigure}       \end{figure}           \newpage     \begin{figure}[htp!]     \centering     \ContinuedFloat               \begin{subfigure}{\textwidth}                     \includegraphics[width=\textwidth]{subfig3.png}                     \caption{subfig3}                     \label{fig:subfig3}             \end{subfigure}                         \begin{subfigure}{\textwidth}                     \includegraphics[width=\textwidth]{subfig4.png}                     \caption{subfig4}                     \label{fig:subfig4}             \end{subfigure}      \end{figure}           \newpage     \begin{figure}[htp!]     \centering        \includegraphics[width=5in]{figure3.png}       \caption{Caption3}     \label{fig:fig3}           \end{figure}          \end{document}      Fig.1 and Fig.2 are correctly numbered, but Fig.3 is numbered Fig.1. The subplots in Fig.2 are also numbered incorrectly: the first four are labeled (a)-(d), but the fifth on the third page starts from (a) again. Does `\ContinuedFloat` not work over more than two pages? Here is the output of `\listfiles`:                article.cls    2007/10/19 v1.4h Standard LaTeX document class       size11.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     subcaption.sty    2012/01/12 v1.1d Sub-captions (AR)      caption.sty    2012/02/19 v3.2f Customizing captions (AR)     caption3.sty    2012/01/12 v1.4b caption3 kernel (AR)      amsmath.sty    2000/07/18 v2.13 AMS math features      amstext.sty    2000/06/29 v2.01       amsgen.sty    1999/11/30 v2.0       amsbsy.sty    1999/11/29 v1.2d       amsopn.sty    1999/12/14 v2.01 operator names     supp-pdf.mkii       omscmr.fd    1999/05/25 v2.5h Standard LaTeX font definitions


title: Beamer Title Page: display it like other frames (with header and footer)

text: Is there a way to let my title page look like my other frames.. I just wanna copy the head and bottom part... You can find my `tex` code here: Change contrast in beamer navigation between active and not active.


title: Right align inside header

text: I have a header, prepared using `fancyhdr`. I would like the first row of the left header to be right-aligned with the second row of the left header. In the following MWE I would like "My City" to be right aligned with "University of somewhere" (so that "City" is just above "somewhere"). How do I achieve that?               \documentclass{article}     \usepackage{fancyhdr}     \usepackage{fancyheadings}          \pagestyle{fancy}     \rhead{\textsc{Tutorial\\The periodic table}}     \lhead{\textsc{My city\\University of somewhere}}     \cfoot{\thepage}          \begin{document}         hello     \end{document}


title: Manual line break in listings or listings doesn't work in figure env

text: The example illustrates my problem. I have long code rows which should break automatically (see line 1) but some lines I want to break manually (line 2 / 3). How can I do this? I have played a little bit around and example 1 could be a solution but it doesn't work in figure environments (example2).               \documentclass{article}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{listings}          \lstset{        breakatwhitespace=false,        breaklines=true,        escapeinside={(*@}{@*)},        frame=lines,        numbers=left,        postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\rightarrow\space}},        showlines=true     }          \begin{document}          Example 1:     \begin{lstlisting}[numbers=left]     a = b + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c     a = b (*@\\\ensuremath{\rightarrow\space}@*)  + c     \end{lstlisting}     \vspace{2cm}     Example 2:     \begin{figure}[h]     \centering     \begin{lstlisting}[numbers=left]     a = b + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c     a = b (*@\\\ensuremath{\rightarrow\space}@*)  + c     \end{lstlisting}     \end{figure}          \end{document}      ![enter image description here](http://i.stack.imgur.com/hC9pq.png)


title: Remove all-caps ToC, LoF, ... in header

text: yesterday I tried to remove the all-caps of my ToC, LoF, ... in my documents header and think I encountered a problem/bug. My MWE:               \documentclass[12pt, oneside, a4paper]{book}     \usepackage[nottoc]{tocbibind}     \usepackage{titlesec}     \titleformat{\chapter}{\huge\bfseries}{\thechapter}{20pt}{\huge}     \usepackage[paper = a4paper, margin = 1in, headheight = 14.5pt, includehead]{geometry}     \usepackage{fancyhdr}     \fancypagestyle{plain}     {      \fancyhf{}      \fancyhead[L]{\itshape \leftmark}      \fancyfoot[R]{\thepage}      \renewcommand{\headrulewidth}{0.5pt}      \renewcommand{\footrulewidth}{0pt}     }          \begin{document}      \frontmatter       \renewcommand{\tocetcmark}[1]{\markboth{#1}{}}       \tableofcontents       \listoffigures       \listoftables      \mainmatter       \chapter{Introduction}     \end{document}      As you can see I'm using `tocbibind` to include my LoF and LoT in the ToC. My problem is, if I use `\renewcommand{\tocetcmark}[1]{\markboth{#1}{}}` it only displays my LoF and LoT normalsized in my header. But the documentation for `tocbibind` says that this command is for ToC, LoF, ... . Why is my ToC still all-caps? Is it some kind of bug or am I overlooking something? In one of my previous questions (Customize \chaptermark for \mainmatter) Heiko Oberdiek already gave me a solution for the ToC problem in advance:               \usepackage{etoolbox}     \patchcmd{\tableofcontents}{\MakeUppercase\contentsname}{\contentsname}{}{}     \patchcmd{\tableofcontents}{\MakeUppercase\contentsname}{\contentsname}{}{}      It works really fine, but why doesn't the first method does it job properly? Or is there even a smarter way to remove all the all-caps at once?


title: Unwanted extra space after header of first section, using multicols article

text: I'm a beginner of LaTex, so I'm sorry if I've asked an easy question. I'm writing a scientific article, and after only the first header of the first section I get an unwanted extra space. Here is the output, with specified the space that I want to remove: ![enter image description here](http://i.stack.imgur.com/ZLZL2.png) And here is the first part of code:               \documentclass[twoside]{article}               % ------     % Fonts and typesetting settings     \usepackage[sc]{mathpazo}     \usepackage[T1]{fontenc}        % codifica di output, T1 per lingue occidentali     \usepackage[utf8]{inputenc}     % codifica di input (un'alternativa è latin11)     \usepackage[english,italian]{babel} % lingua del documento (l'ultima è la principale)     \linespread{1.05}               % Palatino needs more space between lines     \usepackage{lipsum}         % generatore di lorem ipsum     \usepackage{emptypage}          % pagine vuote SENZA testatine     \usepackage{pdfpages}           % inserire pagine PDF     \usepackage{graphicx}           % inserire immagini     \usepackage{listings}           % aggiunta di codice sorgente indentato     \usepackage{quoting}            % citazioni     \quotingsetup{font=small}       % setup citazioni     \usepackage{color}              % colori     \usepackage{microtype}               % ------     % Page layout     \usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt]{geometry}     \usepackage[font=it]{caption}     \usepackage{multicol}               % ------     % Lettrines     \usepackage{lettrine}               % ------     % Abstract     \usepackage{abstract}         \renewcommand{\abstractnamefont}{\normalfont\bfseries}         \renewcommand{\abstracttextfont}{\normalfont\small\itshape}               % ------     % Titling (section/subsection)     \usepackage{titlesec}     \titleformat{\section}[block]{\large\scshape\centering}{\thesection.}{1em}{}     \titleformat{\subsection}[block]{\large\scshape\centering}{\thesubsection.}{1em}{}               % ------     % Header/footer     \usepackage{fancyhdr}         \pagestyle{fancy}         \fancyhead{}         \fancyfoot{}         \fancyhead[C]{Andrea Romagnoli $\bullet$ Laurea triennale in Informatica $\bullet$     2013}         \fancyfoot[RO,LE]{\thepage}               % ------     % Clickable URLs (optional)     \usepackage{hyperref}                   % ------     % Definizione delle parti delle sezioni di codice     \definecolor{dkgreen}{rgb}{0,0.6,0}     \definecolor{gray}{rgb}{0.5,0.5,0.5}     \definecolor{mauve}{rgb}{0.58,0,0.82}     \lstset{         frame=tb,         aboveskip=3mm,         belowskip=3mm,     backgroundcolor=\color[HTML]{D8D8D8},     showstringspaces=false,     columns=flexible,     basicstyle={\small\ttfamily},     numbers=left,     numberstyle=\footnotesize,     keywordstyle=\color{blue},           commentstyle=\color{dkgreen},        stringstyle=\color{mauve},     breaklines=true,     breakatwhitespace=true     tabsize=3     }               % ------     % Definizione di JavaScript     \lstdefinelanguage{JavaScript}{     morekeywords={function},         sensitive=false,         showspaces=false,         showstringspaces=false,%emph={3}         showtabs=false,         numbers=left,         morecomment=[l]{//},     otherkeywords={$, \{, \}, \[, \]},         morecomment=[s]{/*}{*/},         morestring=[b]",         basicstyle={\small\ttfamily}     }          % ------     % Definisce il layout delle liste 'itemize'     \usepackage{enumitem}                \setlist[itemize]{leftmargin=18pt, itemsep=0pt,parsep=2pt,topsep=8pt}               % ------     % Maketitle metadata     \title{\vspace{-15mm}%     \fontsize{24pt}{10pt}\selectfont     \textbf{Inserire il titolo della tesi!}         }        \author{%     \large     \textsc{Andrea Ro} % \thanks{Template by \href{http://www.howtotex.com}        {howtoTeX.com}}      \\[2mm]     \normalsize Università di , laurea\\     \normalsize \href{mailto:andrea.r}{andrea.r}     \vspace{-5mm}     }     \date{}               %%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}          \includepdf{CoverTHESIS.pdf}          \maketitle     \thispagestyle{fancy}          \begin{abstract}     \noindent  Bisogna spiegare in poche parole perché è importante il lavoro, mostrare un     sommario dei risultati principali ottenuti, di circa 400 parole. Nel sommario bisogna     rispondere alle seguenti domande: Cos'è stato fatto? Perché è stato fatto, e quali sono le domande delle quali si cerca una risposta? Come è stato fatto il lavoro (modalità)? Cosa si è imparato? Perché è interessante?     \end{abstract}          \begin{multicols}{2}     \section{Introduzione}     \lettrine[nindent=0em,lines=3]{Q}uesta tesi nasce dal mio coinvolgimento con il         progetto , presso l'Azienda , durante il quale ho svolto il tirocinio formativo     previsto dal piano di studi.\newline     Il principale compito assegnatomi è stato di ridisegnare l'interfaccia del portale     pubblico di accesso al sistema, in quanto era sempre più stringente la necessità di avere     oltre che un sistema funzionale anche una veste di presentazione accattivante, visto     l'immimente rilascio del sistema tramite un'estesa campagna pubblicitaria.\newline     Prima di iniziare il design di un'interfaccia gradevole, ho raccolto informazioni circa il     progetto tramite dei colloqui con dei dirigenti di alcuni dei membri coinvolti, in     particolare:     \begin{itemize}         \item Provincia Autonoma di         \item Azienda          \item Fondazione         \item welfare     \end{itemize}


title: TikZ - Four Colored Circle Split

text: Following @Alain Matthes's reply on this question, wa can get a picture like this: ![enter image description here](http://i.stack.imgur.com/RZ64p.jpg) I am not good enough to adapt the code to split the circle into 4 quarters. Can you help me?               \documentclass[11pt]{scrartcl}     \usepackage{tikz}     \usetikzlibrary{shapes,backgrounds,calc}          % Two Colored Circle Split      \makeatletter     \tikzset{circle split part fill/.style  args={#1,#2}{%      alias=tmp@name,        postaction={%         insert path={          \pgfextra{%           \pgfpointdiff{\pgfpointanchor{\pgf@node@name}{center}}%                       {\pgfpointanchor{\pgf@node@name}{east}}%                      \pgfmathsetmacro\insiderad{\pgf@x}           \fill[#1] (\pgf@node@name.base) ([xshift=-\pgflinewidth]\pgf@node@name.east) arc                               (0:180:\insiderad-\pgflinewidth)--cycle;           \fill[#2] (\pgf@node@name.base) ([xshift=\pgflinewidth]\pgf@node@name.west)  arc                                (180:360:\insiderad-\pgflinewidth)--cycle;                          }}}}}        \makeatother                 \begin{document}          \begin{tikzpicture}       \node[minimum size=4cm,          shape=circle split,         draw=blue!70,line width=2mm,         circle split part fill={blue!50, red!50}         ] at (0.5, 1.5) {1\nodepart{lower} 2};     \end{tikzpicture}          \end{document}


title: Wrong plot in pfgplots

text: I want to plot a function in a LaTeX document. Usually I use either Mathematica, Matlab or Root. At this point I want to use `pgfplots` in order to keep my document in a complete LaTeX layout. The thing is that `pgfplots` doesn't produce the exact plot as Mathematica, let alone the weird thing that's going on with the `y-axis`. My code is               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}       \begin{axis}[          xlabel=$x$,         ylabel={$d\sigma$}       ]          \addplot[blue,domain=0:pi]{1-sin(x/2)^2};        \end{axis}     \end{tikzpicture}     \end{document}      My output is ![enter image description here](http://i.stack.imgur.com/cXBtF.png) while Mathematica gives ![enter image description here](http://i.stack.imgur.com/jbqYA.jpg) Any ideas on that?


title: citestyle=authortitle-icomp, but including year?

text: I am nearly totally happy with               \usepackage[citestyle=authortitle-icomp,bibstyle=authortitle,dashed=no,datezeros=no]{biblatex}      because it shows the author and the (short) title in citations, but I would like to have the year in the citation too. Here is the mwe:               \documentclass[ngerman,twoside,a4paper]{scrartcl}     \usepackage[citestyle=authortitle-icomp,bibstyle=authortitle,dashed=no,datezeros=no]{biblatex}     \bibliography{mwe.bib}     \begin{document}     Heyho, \Footcite{BVerfGOD} yeah.     \printbibliography     \end{document}      Where the mwe.bib is               @Book{BVerfGOD,       entrysubtype  = {urteil},       author    = {Bundesverfassungsgericht},       sortname  = {Bundesverfassungsgericht},       title     = {Bundesverfassungsgerichtsurteil zur Online-Durchsuchung},       subtitle  = {BVerfG, 1 BvR 370/07},       publisher = {},       year      = {27.2.2008},       address   = {},       edition   = {},       url       = {http://www.bundesverfassungsgericht.de/entscheidungen/rs20080227_1bvr037007.html}     }       This results in a citation of               Bundesverfassungsgericht, Bundesverfassungsgerichtsurteil zur Online-Durchsuchung.      But I would like to get               Bundesverfassungsgericht, Bundesverfassungsgerichtsurteil zur Online-Durchsuchung, 27.2.2008.      Now my question is: did I miss a citestyle preset or do I have to create a macro myself for this? Authoryear (obviously) does not print the title. (The bibstyle/bibliography is fine.)


title: How to get beamer-style bibliography (with icons) when using article class and natbib?

text: I am writing a document in article class, using natbib, and would like to produce a bibliography with icons in the left-hand margin, which illustrate the type of resource being listed. After some Googling, I've seen that some Beamer-style bibliographies have this option, and I like the beamer-style icons fine. Is there any way to get a Beamer-style bibliography, or any bibliography with such icons in the margins (perhaps using something like marginpar), when using article class with natbib? If not, is there any way to do so in article class, using something other than natbib, like biblatex?


title: Kile - autocompletion for bibtex entries

text: I would like to Kile autocomplete my citations, so when I type `\citep{` a list with my bibliography entries pops up. I tried also by typing the first 3 letters of the entry key, and/or pressing Ctrl+Space, but no luck. Autocompletion when writing the text or other commands/environments do work. I have tried other suggestions (http://ubuntuforums.org/archive/index.php/t-1003107.html), but it doesn't work for me. I use one master file.tex that then call several `.tex` files with the command `\input{files}`. The library `.bib` file containing my bibtex items is located into the same folder as all the `.tex` files. In the preamble I use `\usepackage{natbib}`, and I insert the bibliography as usual with `\bibliography{library}`. Still I don't get autocomplete to work. Do you have any ideas? Thanks in advance.


title: How to get a bigger font?

text: At here How do I install two fonts into a document? I used two fonts. How to get a bigger font for chapters, sections and subsections?


title: increase zorder in chemfig+tikz

text: I have a chemfig structure where I want to highlight certain positions by drawing a simple circle at the atom site. This works so far, but I would also like to have the new nodes on top of the structure. I have tried the solution given in http://tex.stackexchange.com/a/20426/12740, but it does not work.. MWE:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{chemfig}     \pgfdeclarelayer{front}     \pgfsetlayers{main,front}     \makeatletter     \pgfkeys{%       /tikz/on layer/.code={         \pgfonlayer{#1}\begingroup         \aftergroup\endpgfonlayer         \aftergroup\endgroup       },       /tikz/node on layer/.code={         \gdef\node@@on@layer{%           \setbox\tikz@tempbox=\hbox\bgroup\pgfonlayer{#1}\unhbox\tikz@tempbox\endpgfonlayer\egroup}         \aftergroup\node@on@layer       },       /tikz/end node on layer/.code={         \endpgfonlayer\endgroup\endgroup       }     }     \def\node@on@layer{\aftergroup\node@@on@layer}     \makeatother          \newcommand*\ca{%       \tikz\draw[fill,opacity=0.5,draw=none,color=red,on layer=front] circle (.1);%     }     \newcommand*\cb{%       \tikz\draw[fill,opacity=0.9,draw=none,color=blue,on layer=front] circle (.15);%     }          \begin{document}     \setatomsep{2em}     \setdoublesep{.3em}     \begin{tikzpicture}     \node {%     \chemfig[line width=1pt]{%     [:-60]O-(-[::60]*6((\cb)-(\ca)=(\ca)-(\cb)(-([:60]=O)-[:-60]O)=(\ca)-(\ca)=))=[:-120]O}%     };          \end{tikzpicture}     \end{document}      I suspect the problem is in the defition of `\ca` and `\cb`, because it uses an own `\tikz` command, but I don't know how to solve this.


title: How to change global slide transition effect duration in beamer?

text: @diabonas presented a method to add global transition effect in beamer in this answer like this:               \documentclass{beamer}          % Add global transition effect \transfade     \addtobeamertemplate{background canvas}{\transfade}{}          \begin{document}     \frame{\centering\Huge1}     \frame{\centering\Huge2}     \frame{\centering\Huge3}     \end{document}      Now how to define global transition duration. there is a command `\transduration{2}` for setting transition duration but when I use it like this:               \addtobeamertemplate{background canvas}{\transfade \transduration{1}}{}      it changes effects automatically from a slides to another. I tested different pdf viewer with different effects all the same. The question is "How to change global transition duration?"


title: How can I connect beamer blocks with edges through the center?

text: ### X–Y Since my poster is on self-stabilizing algorithms (and quite frankly, I don't have much to say about it that's appropriate for a poster), I came up with a pretty cool idea for its layout. I'd like to set many `block`s on the page and position them absolutely, manually connecting arbitrary blocks with edges to form a graph. ### My Attempt               % arara: xelatex     % arara: xelatex          \documentclass{beamer}          \usepackage[absolute,overlay]{textpos}          \usepackage[orientation=portrait,width=36in,height=44in]{beamerposter}     \usepackage{tikz}     \usetikzlibrary{tikzmark}          \beamertemplategridbackground[1in]          \newenvironment{node}[4]{%       \begin{textblock*}{#2}(#3,#4)%         \begin{block}{#1}%           \tikzmark{#1}\ignorespaces         }{%         \end{block}       \end{textblock*}     }          \begin{document}     \begin{frame}            \begin{node}{Introduction}{4in}{3in}{4in}         What is a self-stabilizing algorithm?         Example from paper.       \end{node}            \begin{node}{Motivation}{10in}{14in}{15in}         blah       \end{node}            \begin{tikzpicture}[remember picture]         \draw[overlay, line width=5mm]           (pic cs:Motivation) -- (pic cs:Introduction);       \end{tikzpicture}     \end{frame}     \end{document}      However, this unsurprisingly places the mark at the top left (where the text starts). How can I convince it to go to the center of the block, both vertically and horizontally, so as to make a convincing graph?


title: PDF Layers (OCG) using latex->dvips

text: I want to generate a ps file with layers. Ocg.sty does not support ps, so I want to write a simple example by myself to see if its possible. I took a pdf version from here and tried to change the commands to generate a ps version (code is appended here). Well, the ps file is generated, but it seems to be corrupt. When I use ps2pdf there are errors reported. If the part with "AddToShipoutPicture" is removed ps2pdf reports no errors, so it seems the error is there to find. But maybe more is wrong. Maybe someone can help to make a simple working solution.               \documentclass{article}     \RequirePackage{eso-pic}     \RequirePackage{ifpdf}          \newcommand{\setupOCG}{       \special{ps: mark /_objdef {@ocg1} /type/dict /OBJ pdfmark}       \special{ps: mark {@ocg1} <</Type/OCG /Name (My first layer)>> /PUT pdfmark}       \special{ps: mark /_objdef {@ocg2} /type/dict /OBJ pdfmark}       \special{ps: mark {@ocg2} <</Type/OCG /Name (My second layer)>> /PUT pdfmark}            %register it and configure its default behaviour       %\special{ps: mark /_objdef {{@ocg1} {@ocg2}} /type/array /OBJ pdfmark}       \special{ps:mark {Catalog} <<         /OCProperties <<           /OCGs [{@ocg1} {@ocg2}]           /D <</BaseState/ON /Order [{@ocg1} {@ocg2}]  /OFF [{@ocg1}]  >> %first layer invisible         >>       >> /PUT pdfmark}            %add the OCG to the resources of the current page object       \AddToShipoutPicture{%         \special{ps:mark {Resources} <<           /Properties <<             %this maps the name to the OCG object             /oc1 {@ocg1} /oc2 {@ocg2}           >>         >> /PUT pdfmark}       }     }          \newcommand{\myocg}[2]{%         \special{ps: mark /OC /#1 /BDC pdfmark}#2\special{ps: mark /EMC pdfmark}% ok         %\special{ps: mark {ocgname\the\ocnum} <</OC {/@oc\the\ocnum}>> /PUT pdfmark}     }          \setupOCG          \begin{document}       \myocg{oc1}{I am NOT visible on the first layer.}       \myocg{oc2}{I am visible on the second layer.}     \end{document}


title: \hline not aligned and move table to the left

text: I used column type to define the width of a table, but it shows an error message of "`\hline` not aligned". If I just use `\begin{tabular}{| l | c | c | c | c |}`, the error message goes away but the columns are really narrow. Also, how can I move the table to the left of the document. Thanks so much for any help. ------------- code -----------------               \documentclass{article}     \usepackage{array}     \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}          \begin{document}          \begin{table}[!h]     \begin{tabular}{| L{4.2cm} | C{2.6cm}}  | C{2.6cm} | C{2.6cm} | C{2.61cm} |}      \hline      & {\bf 1988} & {\bf 1989} & {\bf 1990} & {\bf Change} \\     \hline     Score & 249 & 234 & 266 & +17 \\     \hline     Percent High & 14 & 9 & 26 & +12 \\     \hline     \end{tabular}     \end{table}          \end{document}


title: Text does not go to next page, text hidden

text: When running the file below, there are a few problems:   * The section "employment history" automatically starts on the 2nd page, instead of the 1st page.   * The section "employment history" which starts on the 2nd page, does not jump to the 3rd page, instead the text written stays on the 2nd page and dissappears down. How would I get the employment history section to start on the 1st page, and if I have written alot, it automatically continues to the 2nd page, and subsequentially 3rd, 4th, 5th page etc. ?               \documentclass[10pt]{article}     \usepackage{array, xcolor, lipsum, bibentry}     \usepackage[margin=3cm]{geometry}     \usepackage{scrbase,scrpage2}     \pagestyle{scrheadings} % pagestyle with page number     \lohead{My Name}                    \definecolor{lightgray}{gray}{0.8}     \newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}     \newcolumntype{R}{p{0.8\textwidth}}     \newcommand\VRule{\color{lightgray}\vrule width 0.5pt}               \begin{document}     \thispagestyle{empty}     \vspace*{-2cm}     \begin{center}\Huge My Name \end{center}     \vspace{1em}     \begin{minipage}[ht]{0.70\textwidth}     Address\\     Address\\     Address\\     Address\\     Address     \end{minipage}     \begin{minipage}[ht]{0.48\textwidth}     contact\\     contact\\     contact\\     contact     \end{minipage}     \vspace{2pt}          \enlargethispage{3\baselineskip}               \section*{Employment History}     \begin{tabular}{L!{\VRule}R}     03/2011--Present&{\bf Insert Text.Insert Text.Insert Text.Insert Text.} Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.Insert Text.\\     &\begin{itemize}     \item Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.     \item Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.     \item Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.     \item Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.     \end{itemize}\\     &In addition to my duties listed above, I have also: \\     &\begin{itemize}     \item Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.     \item Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.     \end{itemize}\\     07/2005--08/2007&{\bf Job Name} Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.\\     &\begin{itemize}     \item Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.     \item Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.     \item Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.Job details.     \end{itemize}\\     \end{tabular}                    \end{document}


title: Changing the default for indexing from two columns to one, and getting rid of default page break

text: I need to create a table of cases for my thesis in international law and I'm using imakidx. Cases decided by international tribunals have long names and numbers as part of their citation, so if I have two columns, which is the default for indexing, the output is messy and becomes near impossible to read.![enter image description here](http://i.stack.imgur.com/E2uKw.png) Because I need to create several lists of cases, with sub-categories, I'm using a work-around, and instead of using splitindex, I'm just getting it to print each index separately. (Maybe not so elegant, and if there's a better alternative I would love to hear it. I'm a bit of a newbie with Latex and I'm a lawyer!):               \documentclass[bibliography=totoc,a4paper,openright]{scrbook}     \usepackage[backend=biber, style=oscola, indexing=cite]{biblatex} %oscola is the legal      citation package     \addbibresource{testingbiblio.bib} %necessary for Oscola     \usepackage[style=british]{csquotes} %necessary for Oscola          \usepackage[splitindex]{imakeidx}     \makeindex[name=ICTY, title={International Criminal Tribunal for Former Yugoslavia}]     \makeindex[name=ICC, title={International Criminal Court}]     \makeindex[name=ca, title={Canada}]          \begin{document}               Lorem ipsum dolor sit amet, consectetur adipiscing elit.\footcite{Vaillancourt}     Phasellus eget elit gravida, pharetra mauris at, malesuada dui. Sed vitae tortor ante.      Quisque sollicitudin accumsan nulla sit amet mattis.\footcite{Tadic} Nam non malesuada      nisl. Aliquam erat volutpat.\footcites{Vasiljevic}{Banda} In eu vulputate sem, in      sagittis arcu. Nullam fringilla libero non nisi aliquam, eget pulvinar arcu pulvinar.      Ut tristique ullamcorper nisl, vitae cursus nulla varius vel. Proin non rhoncus      risus.\footcite{AlBashirIndictment}               \chapter*{Table of Cases}     \section*{International Tribunals}     \printindex[ICTY]     \printindex[ICC]          \section*{Domestic Tribunals}     \printindex[ca]               \end{document}      The problem I have now is the automatic page break in between my \chapter* command and the index, and in between each index. How do I get rid of these default page breaks? And also, how do I change the default of two columns to one column, so that the case citations are readable? I would like the final output to look something like this: ![enter image description here](http://i.stack.imgur.com/gaUNh.png) Here is my basis bib file:               @jurisdiction{AlBashirIndictment,     title = {Public Redacted Version of Prosecutor's Application for Warrant of Arrest      under Art. 58},     shorttitle = {Al Bashir Application for Warrant of Arrest},     date = {2008-09-12},     number = {ICC-02/05-157},     court = {Pre Trial Chamber},     pagination = {paragraph},     tabulate= {ICC},     keywords={ICC}     }          @jurisdiction{Banda,     title = {The Prosecutor v Banda and Jerbo, Corrigendum of the Decision on the      Confirmation of Charges},     shorttitle = {Banda Decision on Charges Corrigendum},     date = {2011-03-07},     number = {ICC--02/05-03/09-121-Conf-Corr},     court = {Pre Trial Chamber},     pagination = {paragraph},     tabulate = {ICC},     keywords={ICC}     }          @jurisdiction{Tadic,     title = {The Prosecutor v Dusko Tadi\'{c}, Appeals Judgment},     shorttitle = {Tadi\'{c} Appeals Judgment},     date = {1999-07-15},     number = {IT-94-1-A},     court = {Appeals Chamber},     pagination = {paragraph},     tabulate= {ICTY},     keywords={ICTY}     }          @jurisdiction{Vasiljevic,     title = {The Prosecutor v Mitar Vasiljevi\'{c}, Appeals Judgment},     shorttitle = {Vasiljevi\'{c} Appeal},     date = {2004-02-25},     number = {IT-98-32-A},     court = {Appeals Chamber},     pagination = {paragraph},     tabulate = {ICTY},     keywords={ICTY}     }          @jurisdiction{Vaillancourt,     title = {R. v Vaillancourt},     shorttitle = {Vaillancourt},     date = {1987},     court = {Supreme Court of Canada},     reporter = {S.C.R.},     volume = {2},     pages = {636},     pagination = {paragraph},     location = {Canada},     keywords = {ca}      }


title: How to escape inline R command to avoid issue with "while-typing" spelling check

text: I have a problem with my text editor Aquamacs Emacs (GNU Emacs 23.4.1) when use it with `\Sexpr` to print inline the output from R functions. The problem results when the R command includes special characters such as **$** and **%**. Even though Latex parses correctly the string, the text editor doesn't escape the special characters. There are then two consequences: the colour of the text changes starting with `\Sexpr` and (most annoyingly) the 'while typing' spelling check is not performed on the remaining of the text. A solution is to wrap `\Sexpr` with `\verb+ +` but then my output results typeset in a different style/font.


title: Dedicated pages for figures featuring automatic fit-to-page scaling and automatic portrait/landscape selection

text: There are some books where you have a couple of pages that contain only a picture with no footer, header or anything like that. I wanted to have something similar although I'd like to keep a uniform margin, the aspect ratio of the image and a caption. I also wanted the page to rotate using `pdflscape` according to the dimensions of the image. This is how it might be used in a more or less MWE:               documentclass[a5paper]{article}     \usepackage{picturepage}     \usepackage[hidelinks]{hyperref}     \begin{document}     \picturepage{some_portrait_picture}{This is a portrait picture. \href{http://www.flickr.com/photos/thomasleuthard/}{Thomas Leuthard} took it in France and released it under the \href{http://creativecommons.org/licenses/by/2.0/}{Creative Commons attribution licence} on Flickr.}{fig:portrait}     \picturepage{some_landscape_picture}{This is a landscape picture. It was released under the \href{http://creativecommons.org/licenses/by/2.0/}{Creative Commons attribution licence} by someone calling himself ``\href{http://www.flickr.com/photos/80901381@N04/}{A Guy Taking Pictures}'' on Flickr.}{fig:landscape}     \end{document}      And this is how this might look: ![Example with one landscape and one portrait picture ... literally.](http://i.stack.imgur.com/M6RGD.jpg) I'm going to publish my take on this problem in an answer. Everyone is welcome to tinker with my code or post your own answers. It shouldn't be that hard to come up with something prettier than what I did. * * * These are the pictures I used. If you don't want to go with the boring `mwe` stuff, this might save those some time who want to get some Create Commons pictures to play around with: http://www.flickr.com/photos/80901381@N04/7758832526/ and http://www.flickr.com/photos/thomasleuthard/6106078656/


title: Warnings with beamer class and itemize

text: I'm getting the following annoying warnings:               LaTeX Font Warning: Font shape `OT1/cmss/m/n' in size <4> not available     (Font)              size <5> substituted on input line 16.          ...     LaTeX Font Warning: Size substitutions with differences     (Font)              up to 1.0pt have occurred.      I tryed to reduce the a minimal working example as much as possible:               \documentclass{beamer}     \usepackage{textcomp}     \usetheme{Boadilla}     \useinnertheme{circles}     \useoutertheme[subsection=false]{miniframes}     \usecolortheme{seahorse}          \setbeamertemplate{navigation symbols}{}          \begin{document}          \begin{frame}         \begin{itemize}             \item bla         \end{itemize}          \end{frame}               \end{document}      Any ideas how to resolve that?


title: How to force some words to start on a new line when they tend to overflow

text: I'll start with the example ![HTTP/1.0 is not justified with the surrounding text](http://i.stack.imgur.com/DPWuQ.png) As you can see, the HTTP/1.0 is not justified. If it were a normal word, I would add it to hyphenation rules. But obviously I can't split this one. So how can I force it to be on a new line and do the thing automatically?


title: Bibliography in wrong format when in Table of Contents

text: I am using the report class and using `\usepackage{amsrefs}` as my citation style. When creating the table of contents, in order to get LaTeX to treat the bibliography as a section, I used the command `\addcontentsline{toc}{section}{Bibliography}`. However, this only causes the table of contents to only have "Bibliography" listed as opposed to "VII Bibliography" listed. Is there a way that I can have the table of contents show "VII Bibliography" for my citations? Any help would be much appreciated Edit: Forgot to put in troublesome code.               \documentclass[12pt]{report}     \usepackage{amsrefs}          \begin{document}     \stepcounter{page}     \newpage     \section{Summary}     \newpage     \tableofcontents     \newpage     \section{Introduction}     text text text          \addcontentsline{toc}{section}{Bibliography}     \bibliographystyle{amsrefs}     \bibliography{wood}          \section{Appendix}          \end{document}


title: inserting code snippet into table

text: In my current latex report, I have to insert code snippets into Latex table. I have tried with `listing` but, **listing is not working**. I have written following latex code using **verbatim**. But, I want some professional look. Could you suggest me -- **how could I insert code snippet in latex table ?**               begin{sidewaystable}[ht]         \small         \centering        \begin{tabular}{ | >{\raggedright}p{4cm} | >{\raggedright}p{4cm}| >{\raggedright}p{7cm} | >{\raggedright}p{9cm} |}   \hline         \textbf{Domain/Application} & \textbf{Vocabulary} & \textbf{Network} & \textbf{Architecture/Computational Logic} \cr \hline              \emph{Building-Automation Domain} \vspace{0.1in} \\ Regulating Temperature \\ \vspace{0.5in} Detecting Fire & \begin{verbatim}         regions:             Building : integer;             Floor: integer;             Room : integer;         abilities:             sensors:                 TemperatureSensor                 SmokeDetector                 BadgeReader             actuators:                 Heater                 Alarm         \end{verbatim}               & \begin{verbatim}         Device 1:           Ability: TemperatureSensor           Location: Building 1, Floor 2, Room 2         Device 2:           Ability: SmokeDetector, TemperatureSensor       Location: Building 1, Floor 2, Room 2         \end{verbatim} &  \begin{verbatim}         AverageTemperature:           generate AverageTemperature : TempStruct ;           consume AvgTempMeasurement from hops: 0  : Room;           in - region : Building | Floor | Room ;                 FireAlarmComputation           generate FireAlarmState : FireAlarmStruct ;           consume AverageTemperature from hops : 0 : Room ;           consume SmokeDetector from hops : 0 : Room ;       in - region : Room ;         \end{verbatim}           \cr \hline          \end{tabular}         \caption{}         \label{vsdfasdfasfada}      \end{sidewaystable}


title: Duplicating the amsthm proof environment

text: I am currently writing up some lecture notes and would like to have therefore a _"\solution" environment_ which should work basically as the _amsthm \proof environment_ , just writing "Solution." instead of "Proof." at the begin of a solution of an exercise. Of course I can achieve this by switching with               \renewcommand{\proofname}{Solution.}      resp.               \renewcommand{\proofname}{Proof.}      at the appropriate places. While this is working, I would find it nice to have a proper \solution environment which just replicates the \proof environment. Is there an easy way to do this?


title: Linux Libertine Bold Math

text: I'm using Linux Libertine everywhere in my document. However, I cannot figure out how to get bold math `\mathbf` to display as bold text. This answer seemed related to this problem, but trying that (replacing Minion Pro with Linux Libertine O) in my case gives me the following error (for every `X:Y:Z`): > Symbol font `Latin:m:n' not defined. How can I get bold math symbols in my document? MWE:               \documentclass{minimal}     \usepackage{amsthm}     \usepackage[libertine]{newtxmath}     \usepackage{mathspec, libertine, lipsum}     \setmathsfont[ItalicFont={LinLibertine_RI.otf}]{LinLibertine_R.otf}     \setmathrm{LinLibertine_R.otf}     \setboldmathrm{LinLibertine_RB.otf}     \setmathsf{LinBiolinum_RB.otf}          \begin{document}     \lipsum[1]          \begin{equation}         \hat{Q}_i=\int_0^\infty \mathcal{G}^2(\mathbf{x}) \mathbf{\Sigma}^{-1}(x^2) f_i(x)dx     \end{equation}          \end{document}


title: How to use less space for ~

text: In a paper, I need to use the abbreviated form of Figure as in "see Fig. 2". To avoid line breaks between Fig. and the number itself, I place a `~` in between. However in that case, the inserted space is way too much and a `\,` looks a lot better. So the question is, how can I protect the Figure expressions from line breaks but also reduce the space to `\,`?


title: siunitx alsoload option high energy physics

text: Until now (before release 2013/07/31) it was possible to use the option `alsoload=hep`.               \usepackage[alsoload=hep]{siunitx}      Actually I do not see how it should be possible to load the `\gauss` unit (from high energy physics) in the new release.


title: Error in fontspec.sty

text: I downloaded a template for CV and one of the requirements was installation of `fontspec.sty`. Now when I compile the file the code file of `fontspec.sty` pops up in a new tab in TeXnicCenter and it points to errors in the file. Among which are               fatal fontspec error: "cannot use pdflatex"      It also shows that the `.sty` requires `xetex` or `luatex` to function which I have both installed. Please help.


title: Referencing figure not working in Gummi

text: Ok so I'm trying to reference a couple of images from my document. The code is:               \begin{figure}[htp]     \centering     \includegraphics[scale=0.70]{grafico2.jpg}     \caption{Aceleramiento con las 4 primeras imágenes}     \label{grafico2}     \end{figure}          \begin{figure}[htp]     \centering     \includegraphics[scale=0.75]{grafico1.jpg}     \caption{Aceleramiento real del método}     \label{grafico1}     \end{figure}      In the text I'm referencing the images like this               \ref{figure:grafico2}     \ref{figure:grafico1}      But all I get is this `??`. I tried putting the label after the caption and even inside the caption. I also tried recompiling the document several times with the **Gummi** compile option and even cleaning up build files before compiling but it doesn't work. The strange thing is that I'm referencing some tables before and they are working but not my figures. Any idea why?


title: Tikz output changes (coordinate offset) when used in a class

text: I'm a beginner at Tikz, and have tried to create a good looking master slave d-flip flop to be used in my thesis document. The good output looks like this: ![enter image description here](http://i.stack.imgur.com/DwGn6.png) The code used to generate the picture above is this:               \documentclass{article}     \usepackage{tikz}      \usepackage{verbatim}     \usepackage[active,tightpage]{preview}     \usetikzlibrary{positioning, arrows, calc, circuits.logic.US}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{10pt}%          \renewcommand*{\familydefault}{\sfdefault}     \begin{document}          \tikzstyle{tg} = [rectangle, draw, text centered, text width=0.75em, minimum height=1em, thick, inner sep=0pt]          \tikzstyle{latch} = [rectangle, draw, text centered, text width=7.75em, minimum height=13em, thick, dashed, rounded corners, fill=gray!8]          \begin{tikzpicture}[scale=1, every node/.style={transform shape}, circuit logic US, huge circuit symbols]          \node [not gate, fill=gray!20, thick] (notd) {};     \node [latch] at (3.725,-1.5) (master) {};     \node [latch] at (7.825,-1.5) (slave) {};     \node [not gate,right=7em of notd.output, fill=gray!20, thick] (master1) {};     \node [not gate,below=8em of master1.center, rotate=180, fill=gray!20, thick] (master2) {};     \node [not gate,right=8em of master1.output, fill=gray!20, thick] (slave1) {};     \node [not gate,below=8em of slave1.center, rotate=180, fill=gray!20, thick] (slave2) {};     \node [not gate,right=3em of slave1.output, fill=gray!20, thick] (notq) {};          \node [tg, right=2em of notd] (tg1) {};     \node [above=0.05 of tg1.north west, inner sep=0pt] (tg1nw) {};     \node [above=0.05 of tg1.north east, inner sep=0pt] (tg1ne) {};     \node [below=0.05 of tg1.south west, inner sep=0pt] (tg1sw) {};     \node [below=0.05 of tg1.south east, inner sep=0pt] (tg1se) {};     \node [circle, above=0.18em of tg1.north, draw=black,thick,circle,inner sep=0pt, minimum size=0.25em] (tg1input) {};     \draw [thick] (tg1nw.center) -- (tg1ne.center);     \draw [thick] (tg1sw.center) -- (tg1se.center);     \node [tg, right=2.9em of master1.output] (tg2) {};     \node [above=0.05 of tg2.north west, inner sep=0pt] (tg2nw) {};     \node [above=0.05 of tg2.north east, inner sep=0pt] (tg2ne) {};     \node [below=0.05 of tg2.south west, inner sep=0pt] (tg2sw) {};     \node [below=0.05 of tg2.south east, inner sep=0pt] (tg2se) {};     \node [circle, below=0.18em of tg2.south, draw=black,thick,circle,inner sep=0pt, minimum size=0.25em] (tg2input) {};     \draw [thick] (tg2nw.center) -- (tg2ne.center);     \draw [thick] (tg2sw.center) -- (tg2se.center);     \node [left=1em of notd.input] (d) {D};     \draw [thick] (d) -- (notd.input);     \node [right=1em of notq.output] (q) {Q};     \draw [thick] (q) -- (notq.output);     \draw [thick] (notd.output) -- (tg1.west);     \draw [thick] (tg1.east) -- (master1.input);     \draw [thick] (master1.output) -- (tg2.west);     \draw [thick] (tg2.east) -- (slave1.input);     \draw [thick] (slave1.output) -- (notq.input);     \draw [thick] (master1.output) -- ++(0.5,0) |- (master2.input);     \draw [thick] (master2.output) -- ++(-0.5,0) |- (master1.input);     \draw [thick] (slave1.output) -- ++(0.5,0) |- (slave2.input);     \draw [thick] (slave2.output) -- ++(-0.5,0) |- (slave1.input);     \node [above=1em of tg1.north] (tg1in) {CLK};     \node [below=1em of tg1.south] (tg1inb) {$\overline{\mbox{CLK}}$};     \node [above=1em of tg2.north] (tg2in) {CLK};     \node [below=1em of tg2.south] (tg2inb) {$\overline{\mbox{CLK}}$};     \draw [thick] (tg1in) -- (tg1input.north);     \draw [thick] (tg1inb) -- ($(tg1se)!0.5!(tg1sw)$);     \draw [thick] (tg2in) -- ($(tg2ne)!0.5!(tg2nw)$);     \draw [thick] (tg2inb) -- (tg2input.south);     \node [circle, below=2em of master2.south, draw=black,thick,circle,inner sep=0pt, minimum size=0.5em] (mastercircle) {};     \node [circle, above=2em of slave2.north, draw=black,thick,circle,inner sep=0pt, minimum size=0.5em] (slavecircle) {};     \node [above=3em of master2.north] (clkm1) {CLK};     \node [below=3em of master2.south] (clkm2) {$\overline{\mbox{CLK}}$};     \draw [thick] (clkm1) -- (master2.south);     \draw [thick] (clkm2) -- (mastercircle.south);     \node [above=3em of slave2.north] (clks1) {CLK};     \node [below=3em of slave2.south] (clks2) {$\overline{\mbox{CLK}}$};     \draw [thick] (clks1) -- (slavecircle.north);     \draw [thick] (clks2) -- (slave2.north);     \node [above=0.1em of master.north] {Master};     \node [above=0.1em of slave.north] {Slave};                    \end{tikzpicture}          \end{document}      However, when I try to input the Tikz-code into my thesis document, the coordinates for the "master/slave"-boxes seem to become offset somehow. This is the most noticable change, but there are other small changes such as the inverter rings in the latches being slightly offset, as well as on the transmission gates. This is how the output looks like in my thesis: ![enter image description here](http://i.stack.imgur.com/CeQYW.png) What could be the reason for this? I do not do any scaling when inserting it into my thesis, and it should be the same. The thesis uses a custom document class, which I am assuming could mess things up. In that case, how can this be avoided?


title: List the citation key shown by \citep in the references.

text: Some months ago, I asked a question regarding bibliography hyphenation issue here. In a nutshell, when I was having problems with the hyphenation of the citation keys in the text, I included the `natbib` package and the problem was solved. However, the list of references at the end of the article does not show the key that appears in the text as before. Here is an example: With the following code:               \documentclass[12pt,a5paper]{article}          \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{microtype}     \usepackage[square]{natbib}          \title{Test}     \author{Tester}     \date{\today}          \begin{document}     \maketitle          asd asd Hello world \citep{SaCouto:2010:HemodynamicBirth},     \citep{SaCouto:2010:HemodynamicBirth},     \citep{SaCouto:2010:HemodynamicBirth}          \bibliographystyle{apalike}     \bibliography{fullbiblio}          \end{document}      I get: ![with natbib](http://i.stack.imgur.com/TkLUZ.png) * * * When commenting the `natbib` package, and changing `\citep` to `\cite`, I get: ![without natbib](http://i.stack.imgur.com/hTYv5.png) * * * What I would like is:   * Correct hyphenation (possible when including `natbib`)   * That the references include the key that is shown in the text (possible when not including `natbib`). This key should be [Lastname, year]. So my question is, how can I achieve this?


title: Set author's last name in small caps but avoid them for editors, translators, etc using biblatex

text: I'm using biblatex and I need author's last name in small caps, so I do this:               \renewcommand\mkbibnamelast[1]{\textsc{#1}}      So I get "SMITH, John" and that's what I needed. But I also get for example: > ALCINOOS (1990). Enseignement des doctrines de Platon. Ed. por J. WHITTAKER > y P. LOUIS. Paris: Belles Lettres. And the problem is I don't want that editors, translators, etc in small caps, because in spanish is not correct.


title: Remove space on the left and right

text: I use `includegraphics` to show an image in a LaTeX document. I want to show this picture as big as possible therefore I want LaTeX to ignore space on the left and right on that one page where I want to display an image so image would appear in the whole page without any white space. Is it possible?


title: How to draw a plot with an axis that resets?

text: To show the properties of a function with two variables two-dimensionally I want to fix one variable but let it increase between plots that are placed horizontally next to each other, e.g. plot the functions where the fixed variable is set to 0.2, 0.4, 0.6 and 0.8 respectively. One way of doing this is to draw an x axis that is reset after its maximum is reached. Then the plots share y axis. How can one achieve this with `pgfplots`? Below is a crude attempt of achieving this. One problem with it is that it is constructed as separate `tikzpicture`s which may be broken over lines (which happens if the latter part of the example is uncommented). Another problem is that the x axis is broken after its reset. ![A rough attempt of a plot with reset x axis](http://i.stack.imgur.com/kXoj0.png)               \documentclass{article}          \usepackage{pgfplots}          \pgfplotsset{       foo/.style={         domain=0:1,         xmin=0, xmax=1,         ymin=-1, ymax=1,         axis x line=bottom,         width=5cm,       }     }          \begin{document}          \begin{figure}       \begin{tikzpicture}         \begin{axis}[foo,           axis y line=left           ]           \addplot{0.2 - x};         \end{axis}       \end{tikzpicture}       \begin{tikzpicture}         \begin{axis}[foo,           hide y axis           ]           \addplot{0.4 - x};         \end{axis}       \end{tikzpicture}       % \begin{tikzpicture}       %   \begin{axis}[foo,       %     hide y axis       %     ]       %     \addplot{0.6 - x};       %   \end{axis}       % \end{tikzpicture}       % \begin{tikzpicture}       %   \begin{axis}[foo,       %     hide y axis       %     ]       %     \addplot{0.8 - x};       %   \end{axis}       % \end{tikzpicture}     \end{figure}          \end{document}


title: Minipage - space between two columns and aligning

text: Here is the deal. I want both of them starting from the very same line and perhaps increase the distance between them. I really cannot remember wheater s.th. chaged after adding `\setbeamercovered{transparent}`                   \documentclass{beamer}         \usetheme{Berlin}         \usecolortheme{beaver}         \usepackage[utf8]{inputenc}         \usepackage[T1]{fontenc}                     \setbeamercovered{transparent}              \title{3D-Lithography}              \begin{document}                   \begin{frame}         \frametitle{Advantages of 2-PP to 1-PP}         \setbeamercovered{transparent}          \noindent\begin{minipage}{.45\textwidth}           Basic Problems of Single-Photon Polymerization:           \begin{itemize}           \item layer-by-layer type of manufacturing (limits possible geometries)           \item suppression through undesired quenching of radicals           \item diffraction limits           \end{itemize}          \end{minipage}         \pause          \begin{minipage}{.45\textwidth}            Optimization by Two-Photon Polymerization:            \begin{itemize}            \item true 3D-Process (random geometries)             \item radical quenching avoided            \item small excited spots\\           $\Longrightarrow$ smaller structures possible          \end{itemize}          \end{minipage}         \end{frame}         \end{document}


title: LaTeX beamer beaver color theme not working

text: When I put `\usecolortheme{beaver}` in the preamble I get grey slides as opposed to the expected beaver color theme. If I use any other color theme, they work fine. The `beamercolorthemebeaver.sty` file is properly installed. Why is this happening? Why do all color themes work, except this one? Could it be a color issue more than a theme color issue? Sorry, adding sample code below.               \documentclass{beamer}     \usetheme{Montpellier}     \usecolortheme{beaver}          \begin{document}            \begin{frame}       \frametitle{This is a slide example}       \end{frame}          \end{document}      The result is that instead of having the corresponding color theme, it comes out on a scale of grays. Issue happens only with beaver color theme. ![the example slide](http://i.stack.imgur.com/vpvhk.png)


title: Background color of cells in ConTeXt

text: I'd like to set the background colors for cells to indicate their relations. How can I do this in ConTeXt?


title: Times New Roman font for custom class

text: I am new to using LaTeX in general, and I am using a custom documentclass (`.cls` file seems to be generated from a `.dtx` file) to prepare a work report. I am struggling to change the font to _Times New Roman_ for the entire report; I used the following command as suggested in the answers to similar questions posted here, but the resulting PDF document somehow got `NimbusRomNo9L-Regu`:               \documentclass[ece]{uw-wkrpt}          %WORKAROUND to change the report body font size to 11pt     \let\savednewcommand\newcommand     \let\newcommand\renewcommand     \makeatletter     \input{size11.clo}     \makeatother     \let\newcommand\savednewcommand          %Times new Roman     \usepackage{mathptmx}      I also need to modify the margin of `lettersize` paper. Your help is greatly appreciated. UPDATE: I tried using `geometry` package for changing margins, but it did not change the margin of the output. I noticed some codes in the `.dtx` file that seems to set all margins to be `1.5in`; I need this to be changed so that left margin is set at `1.5in` while others are set at `1.0in`:               % The left and right margins will be set to 1.5 inches wide; the top     % and bottom margins will be set to 1.0 inches wide.  This is required     % by Section 9.8.5 of the CESRM~\cite{ref:cesrm}.     %     % We piggy-back on the standard \textsf{fullpage} package, but use one     % of the internal variables |\FP@margin|, so we need to declare this     % length if it does not exist.     %    \begin{macrocode}     \RequirePackage{fullpage}     \ifx\FP@margin\undefined       \newlength{\FP@margin}     \fi     \setlength{\FP@margin}{1.5in}     \setlength{\textwidth}{\paperwidth}     \addtolength{\textwidth}{-2\FP@margin}     \setlength{\oddsidemargin}{\FP@margin}     \addtolength{\oddsidemargin}{-1in}     \setlength{\evensidemargin}{\oddsidemargin}      As suggested by Werner, the File list from .log is as follows:               *File List*     uw-wkrpt.cls    2003/05/20 v2.6 U. of Waterloo work reports     article.cls    2007/10/19 v1.4h Standard LaTeX document class     size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)     fullpage.sty    1999/02/23 1.1 (PWD)     setspace.sty    2011/12/19 v6.7a set line spacing     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.     textcase.sty    2004/10/07 v0.07 Text only upper/lower case changing (DPC)     geometry.sty    2010/09/12 v5.6 Page Geometry     keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     ifvtex.sty    2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)     ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional     geometry.cfg     size11.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     mathptmx.sty    2005/04/12 PSNFSS-v9.2a Times w/ Math, improved (SPQR, WaS)      graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)     trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive     pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)     ltxcmds.sty    2011/04/18 v1.20 LaTeX kernel commands for general use (HO)     chngcntr.sty    2009/09/02 v1.0a change counter resetting     ot1ptm.fd    2001/06/04 font definitions for OT1/ptm.     supp-pdf.mkii     ot1ztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OT1/ztmcm.     omlztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OML/ztmcm.     omsztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OMS/ztmcm.     omxztmcm.fd    2000/01/03 Fontinst v1.801 font definitions for OMX/ztmcm.     figures/wireless-router-network.jpg     figures/hwlayout.pdf     figures/linksysmain.jpg     omsptm.fd         figures/ddwrtmain.jpg     figures/wantest.pdf     uw-wkrpt-ece.bbl     ***********