title: Line in front of marks

text: I am creating plots that contain a LOT of data points, and each plot also includes a line that is independent but coincident with those points. The problem is that the marks get in front of the line, so in regions of the plot where there are too many marks the line is not clearly visible. The following MWE contais a plot with fewer points and another with a lot of points to illustrate this.               \documentclass[12pt]{article}          \usepackage{pgfplots}     \pgfplotsset{width=7cm,compat=newest}          \pgfplotscreateplotcyclelist{marks}{%       {black!50,ultra thin,mark=o,only marks},         {black,very thick,mark=none},       {blue!70!black!50,mark=square,only marks},       {blue!70!black,very thick,mark=none},       {red!70!black!50,mark=triangle,only marks},       {red!70!black,very thick,mark=none},     }          \begin{document}     \begin{tikzpicture}     \begin{axis}[legend entries={0,...,6},         legend pos=outer north east,         cycle list name=marks]     \addplot+[samples=10] {x};     \addlegendentry{10 samples}     \addplot {x};     \addlegendentry{}     \addplot+[samples=100] {x-2};     \addlegendentry{100 samples}     \addplot {x-2};     \addlegendentry{}     \addplot+[samples=200] {x-4};     \addlegendentry{200 samples}     \addplot {x-4};     \addlegendentry{}     \end{axis}     \end{tikzpicture}          \end{document}      With this result: ![The line should be in front](http://i.stack.imgur.com/27oWg.png) I have tried putting the line plots before the scatter plots but that didn't work. How can I make the line to be clearly visible, in front of the marks?


title: Is there a macro telling which OS we're using?

text: I got some LaTeX documents that I have to compile them under different TeX Live, such as MacTeX or TeX Live. But in different OS, the font seems different too, for example, while in Windows, I prefer to use `Cambria`, but in Mac, I like `Lucida Grande` more. Is there was a macro to differentiate between OS? * * * **_Answer Update_** As the accepted answer, We need to add more comments on this question, As I read the package manual, we need more settings to use these macros:               % packages we need     \usepackage{pdftexcmds}     \usepackage{catchfile}     \usepackage{ifluatex}     \usepackage{ifplatform}      Then we use these macros like that               \ifwindows     % add settings     \fi     \iflinux     % add settings     \fi     \ifmacosx     % add settings     \if      now, it works well, the point is you need more packages not only `ifplatform`. one more thing, compile your tex file with option `-shell-escape` is required:               xelatex -shell-escape file.tex


title: Problems with CJK in MiKTeX 2.9 on Windows 7

text: I have always had a problem with the proper configuration of the CJK package. Here is a sample file that I would normally try to compile.               \documentclass[jcp,aip,preprint,superscriptaddress]{revtex4-1}          \usepackage{CJK}          \begin{document}     \begin{CJK*}{GBK}{}          \title{Paper Title}          \author{L. Wang (ÍõÁ¢·É)}     \affiliation{School 1}          \author{Y. Zheng (Ö£Óê¾ü)}     \affiliation{School 2}          \begin{abstract}     This is the abstract.     \end{abstract}     \maketitle          \section{introduction}          Hello          \end{CJK*}     \end{document}      Here is the error I receive when I try to render the PDF.               Process started          Trying to make PK font gbk50 at 720 DPI...          Running miktex-makemf.exe...          miktex-makemf: The gbk source file could not be found. Running ttf2pk.exe...          miktex-makepk: PK font gbk50 could not be created. cjk_test2.dvi -> cjk_test2.pdf [1 ** WARNING ** Could not locate a virtual/physical font for TFM "gbk50". ** WARNING ** >> There are no valid font mapping entry for this font. ** WARNING ** >> Font file name "gbk50" was assumed but failed to locate that font. ** ERROR ** Cannot proceed without .vf or "physical" font for PDF output... Output file removed.          Process exited with error(s)      So I think I am missing a font. That is why MiKTeX is trying to create the fonts. I have tried to find a gbk50 font with no luck. Can anyone help?


title: Execute a command at the start of every page

text: Is there any way I can execute a command (`\ifthenelse` actually) at the start of every page? I tried `\AtBeginShipout` (atbegshi) but that seem to get executed when the page is about to be rendered (shipped out). I want something different, as soon as the page is about to start.


title: Reduce spacing between lines and stacked subscripts with mathop

text: I am using the following code to typeset a minus (or a plus) under a syllable of text to be used for chant:               \def\mi#1{$\displaystyle{\mathop{\mbox{\smash {#1}}}_{\scriptscriptstyle -}}$}      This provides a fairly satisfying result, but I want the text closer together. Other examples of `\baselineskip` or `\fontsize` have proved to be ineffective (or I am using them wrong).               Bl\textbf{e}ssed ind\textbf{e}ed \pl{is} the m\textbf{a}n\\*     who f\textbf{o}llows not the c\textbf{o}unsel \mi{of} \pl{the} w\textbf{i}c\mi{ked,}\\      ![enter image description here](http://i.stack.imgur.com/aAQzT.png) As a side note/problem, making the emphasized vowel bold the way I have done here separates it from the rest of the text and creates kerning problems - See the "o" of "follows" in the second line.


title: How to number subtheorems hierarchically?

text: **Problem in a nutshell** : I'd like to number theorems that are embedded within other theorems' proofs with numbers that indicate the parent-child relationship between the two theorems. **Problem in detail** : When embedding theorems etc. inside other theorems' proofs, the embedded items are numbered using the same counter as the parent theorem. For instance, if the parent theorem is "Theorem 3", a theorem embedded in Theorem 3's proof will be dubbed "Theorem 4". I'd like the embedded theorems etc. to be numbered hierarchically, so that, to continue the example, the embedded theorem will be dubbed "Theorem 3.1". **Example (Desired Output)** : Theorem 1: If x=2, x^3=8. Proof: Let x=2. Claim 1.1: For all x and all natural numbers n, x^n = x*x*...*x (n times). Proof: By induction. QED (Theorem 1's proof continued) By Claim 1.1, x^3 = 2*2*2 = 8. QED **Additional requirements** : Preferably the document class should be "amsart". **Software used** : LyX + MiKTeX + BibTeX on Windows 7 **My level of LaTeX proficiency** : Beginner+


title: Remove "In" from inproceedings entries using makebst file

text: I have made a custom .bst file using makebst, but I can't remove the "In" before the booktitle in inproceedings entries. That is, right now my entries read: > ..."title." In _Proceedings of Conference,_ ... but I would like them to read: > ..."title." _Proceedings of Conference,_ ... Is there a way to edit this in the .dbj file, or in my .bst file directly?


title: Problem in Bibliography Style (apalike) and table of content COLOR

text: I am using Latex for my thesis, and in Bibliography and table of content I have faced number of problems: 1-I am using `natbib` package and `apalike` style. I would like to cite references in following format: For example: Text: In order to identify temporal faults, Feng et al.(2004) used biweight mean, biweight standard deviation, and z-score that was proposed by Lanzante (1996) to climate data analysis. The biweight estimate is a weighted average such that weights are decreased towards to the wings and tails of the distribution (Feng et al., 2004) and z-score indicates by how many biweight standard deviation an observation is below or above the biweight mean (Sprinthall, 2003). and References:               DIGGLE, P. 1990. Time series: a biostatistical introduction, Oxford University Press.     EISCHEID, J. K., BRUCE BAKER, C., KARL, T. R. & DIAZ, H. F. 1995. The quality control of long-term climatological data using objective data analysis. Journal of Applied Meteorology, 34, 2787-2795.     EISCHEID, J. K., PASTERIS, P. A., DIAZ, H. F., PLANTICO, M. S. & LOTT, N. J. 2000. Creating a serially complete, national daily time series of temperature and precipitation for the western United States. Journal of Applied Meteorology, 39, 1580-1591.     FENG, S., HU, Q. & QIAN, W. 2004. Quality control of daily meteorological data in China, 1951–2000: A new dataset. International Journal of Climatology, 24, 853-870.      Plz let me know which style can address my requirement. 2-Moreover, citations in the text are connected by hyper-link to reference list. The problem is that I would not like to use color in thesis and these hyper-links are in blue. I wanted to inquire how I can change the color to black. 3-I have the same problem with table of contents I mean all the table of content is illustrated by Blue and I should present all the text and numbers in black. Plz let me know how I can change the color of texts in table of content into black.               Tags:     ================================table of content          \pagestyle{fancy} % The page style headers have been "empty" all this time, now use the "fancy" headers as defined before to bring them back          \lhead{\emph{Contents}} % Set the left side page header to "Contents"     \tableofcontents % Write out the Table of Contents          ==================================references          \label{Bibliography}          \lhead{\emph{Bibliography}} % Change the page header to say "Bibliography"          \bibliographystyle{apalike} % Use the "apalike" BibTeX style for formatting the Bibliography          \bibliography{Bibliography} % The references (bibliography) information are stored in the file named "Bibliography.bib"          \end{document}


title: How to reference list items in another TeX document?

text: **Problem in a nutshell** : I would like to reference items in an external LyX document (containing a list of definitions and theorems). **Problem in detail** : I am a Math student. I maintain a LyX document containing a numbered list of definitions and theorems. I often add, delete and modify this document. I would like to treat this document as a database and reference it in other LyX documents like I do with in-document cross- references to definitions, theorems, etc. How can this be accomplished? **Variations** :   1. I'm open to solutions that go beyond LyX.   2. I'm open to solutions that require making the list of definitions available in some form other than a LyX document (e.g. a database).  **Software used** : LyX + MiKTeX + BibTeX on Windows 7 **My level of LaTeX proficiency** : Beginner+


title: Adding vertical arrow to Tree Node using TikZ/PGF

text: I'm trying to illustrate a process of an algorithm over a Binary Search Tree, for which I need to make various figures where each time, different nodes are highlighted. I wish to highlight these nodes using a vertical arrow that points to them, with a description text above that arrow, as well as color (gray-scale, since the document is intended for printing) highlight of the given node. This is the code I use for my basic Binary Search Tree(*):               \begin{tikzpicture}[level/.style={sibling distance=30mm/#1}]     \node [circle,draw] (a){$26$}         child {node [circle,draw] (b){$15$}             child {node [circle,draw] (c){$9$}}             child {node [circle,draw] (d){$20$}                 child {node [circle,draw] (e){$19$}}                 child {node [circle,draw] (f){$24$}}             }         }         child {node [circle,draw] (g){$31$}             child[missing]             child {node [circle,draw] (i){$35$}                 child[missing]                 child {node [circle,draw] (k){$40$}}             }         };     \end{tikzpicture}      This code, when compiled (in context) will produce the following result: ![My original BST](http://i.stack.imgur.com/r9brw.png) What I want to achieve is something like this: ![The BST I'd like to get](http://i.stack.imgur.com/EDFWy.png) I've found this question, which seeks a similar solution, however I don't wish to adjust the style of an existing graph edge, but to add a label that points to a vertex. Is there a way to do it without creating this label as a Tree vertex? Thanks in advance! (*) It is only a small part of the entire document. Based on an example by Manuel Kirsch, which can be found here.


title: \cline doesn't work

text: I'd like to draw a partial horizontal line just below of 'first second third' row, but `\cline` doesn't work. Any suggestion?               \documentclass[table]{beamer}     \usepackage[T1]{fontenc}     \usepackage{xcolor,multirow}          \begin{document}     %%%     \begin{frame}       \frametitle{table example}       \begin{table}[h]         \centering         \rowcolors[]{2}{blue!20}{blue!10}         \begin{tabular}{|c|cccccc|} \hline           \rowcolor[gray]{.9}           &           \multicolumn{2}{>{\columncolor[gray]{.9}}c}{first} &           \multicolumn{2}{>{\columncolor[gray]{.9}}c}{second} &           \multicolumn{2}{>{\columncolor[gray]{.9}}c|}{third} \\           \cline{2-7}           \rowcolor[gray]{.9}           \multirow{-2}{*}{left}           & $x_1$ & $x_2$ & $x_3$ & $x_4$ & $x_5$ & $x_6$ \\ \hline           A & a1 & a2 & a3 & a4 & a5 & a6 \\            B & b1 & b2 & \multicolumn{2}{>{\columncolor{blue!20}}c}{b34} & b5 & b6 \\           C & c1 & c2 & c3 & c4 & c5 & c6 \\           D & d1 & d2 & d3 & d4 & d5 & d6 \\ \hline         \end{tabular}       \end{table}     \end{frame}     \end{document}


title: Connecting nodes in every page

text: I would like to create a document where section titles are `tikz` nodes, and i would like to connect the nodes in every page with a path starting from the top righth corner of the page in every page. Is this possible? _Edit from Gonzalo (adding information provided by **str.** in a comment to my first answer):_ What I initially wanted is a line that connects the upper right corner of the page with the right of the first section, and then the left of the first section to the left of the second, etc. so it would be something like `corner-|section 1 -|-section 2` (etc), sort of like a snake. I can do it in `tikz` manually, but i would like to do it automatically in every page.


title: Journal asks me to combine Latex files into single file

text: I am writing an article consisting of multiple sections. For each section I more or less have a separate tex file, which are `include`d in a main file. The journal I'm submitting to now asks me to integrate all files in a single file. I'm just wondering, isn't this quite bad practice? I mean, there's a reason for LaTeX to provide `include` commands. This is not so much of a question, but I was just hoping to hear some opinions.


title: How to modify apalike.bst to sort references chronologically?

text: I want to sort chronologically a list of references using the `apalike.bst` style, since this order seems more natural for showing in a CV. I tried to follow the approach outlined in http://tex.stackexchange.com/a/33332/56546 but without success (I really do not understand too much about `.bst` syntax). Any help on how to conveniently hack `apalike.bst` to do the job? PS. I know that I can perform this switching to the `biblatex` package, but for the moment I would like to solve the problem without it, since I am using `multibib`. EDIT: The kind of sorting I am looking for is: 1) by year of publication; 2) by alphabetical order of the author's surnames. I do not care about sorting by month after year in 1), but it is OK.


title: Dual form in bibtex style file

text: I'm writing a thesis in my language that, apart from singular and plural forms, has the dual form. I'm using bibtex and I'm having problems with translating the .bst style properly to support the dual form. How should I modify the following code to satisfy my needs?               FUNCTION {format.editors}     { editor empty$         { "" }         { editor format.names           editor num.names$ #1 >         { ", editors" * }         { ", editor" * }           if$         }       if$     }


title: Command \texteuro unavailable in encoding T1

text: I want to know how does LaTeX figures out if the Eurosymbol (€) is a glyph of a given T1 font. I tried `\iffontchar` but it seems the value is not unique. AFAIK it's not a standard symbol of the 256 characters, so I'm interested in the algorithm. Please note: I'm _not_ interested in using the € symbol if my font doesn't has the glyph. I just want to catch the error and make it relax or redefine if glyph not in font. I'm also _not_ interested in using opentype font. Also the answer should work for PDFLaTeX, LuaLaTeX and XeLaTeX. Here is what I wrote so far when I came across this:               \documentclass[11pt,a4paper]{article}     \usepackage{iftex}     \ifPDFTeX         \input glyphtounicode         \pdfgentounicode=1         \usepackage[utf8]{inputenc}     \else         \ifLuaTeX             \input glyphtounicode             \pdfgentounicode=1             \usepackage[utf8]{luainputenc}         \else             \ifXeTeX %XeTeX T1 german special char fix                 \usepackage{newunicodechar}                 \newunicodechar{ß}{\ss}                 \newunicodechar{ä}{\"{a}}                 \newunicodechar{ü}{\"{u}}                 \newunicodechar{ö}{\"{o}}                 \newunicodechar{Ä}{\"{A}}                 \newunicodechar{Ü}{\"{U}}                 \newunicodechar{Ö}{\"{O}}                 \newunicodechar{§}{\textsection}% I think it's okay because standard character... but                 %\newunicodechar{€}{here it should check if eurosymbol in t1 font and if not let him relax (print nothing)}                 \renewcommand{\SS}{\iffontchar\font"1E9E \symbol{"1E9E}\else SS\fi}             \fi         \fi     \fi     \usepackage[ngerman]{babel}     \usepackage[left=3.5cm,right=3cm,bottom=3.5cm]{geometry}     \usepackage[default,t1,osf,semibold]{raleway}     \usepackage{microtype}     \begin{document}     Office 0123456789 äüöÄÜÖß \texteuro € \textmu     \end{document}      **Update** Using `textcomp` package works and gets an unfaked glyph from the font. So this is solved. But I'm still interested in how I should define the `%\newunicodechar{€}{}` for fonts which don't have the special letters.


title: Two level labels in bar plot

text: I need to group the labels in the x axis by putting a second level label. I need to separate the nodes that are grouped from the other ones or marked them somehow. For example, if I have the labels in the example below I would like to have               S1 S2 S3  S4 S5 S6 S7   S8 S9 S10     X Group     Y Group      Z Group      How can I achieve this? I check the manual of pgfplots without any hint. Is there a special name for what I'm trying to achieve?               \documentclass{standalone}          \usepackage{tikz}     \usepackage{pgfplots}          \pgfplotstableread{     1   19.178  26.027  8.219   6.849   39.726     2   54.795  21.918  4.110   6.849   12.329     3   28.767  16.438  6.849   8.219   39.726     4   63.014  2.740   2.740   2.740   28.767     5   90.411  1.370   6.849   0.000   1.370     6   15.068  2.740   16.438  8.219   57.534     7   67.123  0.000   0.000   0.000   32.877     8   72.603  6.849   5.479   0.000   15.068     9   56.164  12.329  6.849   4.110   20.548     10  50.685  4.110   8.219   1.370   35.616     }\datatable          \begin{document}     \makeatletter     \begin{tikzpicture}     \begin{axis}[         ylabel=label,         xtick=data,         xticklabels={S1,S2,S3,S4,S5,S6,S7,S8,S9,S10},         enlarge y limits=false,         enlarge x limits=0.1,         ymin=0,ymax=100,         ybar stacked,         bar width=10pt,         legend style={           font=\footnotesize,           cells={anchor=west},           legend columns=5,           at={(0.5,-0.15)},           anchor=north,           /tikz/every even column/.append style={column sep=0.2cm}         },     ]          \addplot table[x index=0,y index=1] \datatable;     \addplot table[x index=0,y index=2] \datatable;     \addplot table[x index=0,y index=3] \datatable;     \addplot table[x index=0,y index=4] \datatable;     \addplot table[x index=0,y index=5] \datatable;     \legend{Far,Near,Here,There,NotThere}     \end{axis}     \end{tikzpicture}     \end{document}


title: Beamer - Undefined Color: "local structure"

text: I have some question concerning the `\setbeamercolor{<element>}{local structure}` in beamer: In presentations I use to give full bibliographic references directly on the concerning slide via the `\fullcite` command of biblatex. The colorscheme of the references can be manipulated for example by `\setbeamercolor{bibliography entry author}{<color definition>}`. My problem is that I use citations in different elements with different colorization -- for example on the pure white background and in blocks with dark background and bright text colour. Therefore I want the colours of the bibliography elements to change according to the colorscheme in which they are used. As far as I understand the beameruserguide this is exactly the use case for which the "local structure" style element is designed. If I set the colour of some element to "local structure" it works as intended and changes the colour according to the parent element (compare example code below). However, at the same time I get a `Package xcolor Error: Undefined color`local structure'.` error, which makes me think that this seems to be not the right way to use this local structure thing. Does anyone know how to get this in a clean manner without errors for every citation?               \begin{filecontents}{test.bib}         @ARTICLE{Test,           author = {Any Author},           title = {A title},           journal = {Random Journal},           year = {1989},           volume = {23},           pages = {13-23}         }     \end{filecontents}          \documentclass{beamer}     \usepackage[]{biblatex}          \bibliography{test}          \begin{document}     \begin{frame}         \begin{itemize}             \item default color:\\             \fullcite{Test}\\             \item default color alerted:\\             \alert{\fullcite{Test}}\\         \end{itemize}         \setbeamercolor{bibliography entry author}{fg=local structure}         Set color for author entry to "local structure"\\         \begin{itemize}             \item local structure:\\             \fullcite{Test}\\             \item local structure alerted:\\             \alert{\fullcite{Test}}         \end{itemize}     \end{frame}     \end{document}      My TeX system: Texlive2012 pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012) beamer.cls 2011/09/12 development version 3.21 A class for typesetting pre sentations (rcs-revision 70f9d8411e54)


title: Is it possible to change the spacing between particular columns of a table?

text: I am struggling to make a longtable fit on A4 pages in portrait mode. The problem is that the table is too wide. I am not allowed to use smaller fonts (that would solve my problem but it's not an option), and \tabcolsep nearly does it, but it shrinks the distance between columns globally and with my particular table I end up with columns that are almost overlapping each other, while there are several others where there still is plenty of space between them. If I could reduce the space just between those particular columns, the table would fit. Is there a way to do this without changing the spacing between ALL columns (since that would make the table unreadable, its content would overwrite itself)? Thanks!


title: Problem with running proTeXt.exe file in Windows Vista

text: I downloaded the self extracting proTeXt.exe file from http://ftp.sun.ac.za/ftp/CTAN/systems/windows/protext/ which finished after quite a while in Windows Vista. It went on well until almost the end of extracting and I got this:               **Error encountered while performing the operation       Look at the information window for more details**       Details on the information window was as follows:               Extracting MiKTeX/tm/packages/ltxbase.tar.lzma       MiKTeX/tm/packages/ltxbase.tar.lzma       The archive is either in unknown format or damaged       The archive is either in unknown format or damaged       The archive is either in unknown format or damaged       ...        The version of proTeXt downloaded is 2.2.4 and seems it was downloading MiKTeX 2.9. I also ran the file as an administrator and still got the same error.


title: How to remove curly braces in main window of JabRef?

text: Do you have any idea how to remove the curly braces in the main window of JabRef. I know that there is the option in the preferences (Option -> Preferences -> File -> ...) that allows me to check "Remove double braces around BibTex files when loading". That does not change my problem and I am not really sure if this option is meant to do that either. Just wanted to mention that I tried this already. Interestingly, JabRef stopped putting curly braces around my entries a couple of weeks ago, but that leaves all the entries I made before with curly braces. Here is a screen shot on how it looks like: ![screenshot of curly braces in JabRef](http://i.stack.imgur.com/l5S18.png) I think that I changed some settings somehow on my private computer since this problem does not occur at work. It does not hinder my work with LaTeX though but it just makes working with JabRef "ugly". Any ideas?


title: pseudo code with vertical line

text: I want to write some pseudo code. After few research I found algorithmicx with this post: Write pseudo code in latex But I want vertical line as this:               function toto:      | for i = 0 , i < 10, i++      |  | print i * i = i^2      |  | if i is a prime number      |  |  | print prime number      |  | end if      |  end for      end function      According to the documentation the package does not provide this (or I missed it) Does someone know how to do this?


title: Image in table covers horizontal line above it

text: I have a table with images in one of the columns. My problem is that the image overlaps the horizontal line above it, making it look bad. I first tried putting a `\\` after each `\hline`, but this causes gaps in the right most vertical line. I then tried inserting `\newline` in each cell containing an image, but I get an error that there is no line to end. Does anyone know how I might be able to fix this?


title: Redefine underscore to produce roman subscript without breaking file names

text: I've been using Hendrik Vogt's answer to my earlier question Redefine underscore to produce roman subscript, in which he explained how to make the underscore character active and assign a macro to it so that it can be redefined to produce roman type in subscripts:               \catcode`_=\active     \newcommand_[1]{\ensuremath{\sb{\mathrm{#1}}}}      The solution works like a charm in maths and text environments, however I've run into trouble when I use it in 'literal' environments, such as file names or references, where making `_` active breaks things. **Question:** How can I make the underscore produce roman subscript, yet still function as a normal character in file names, labels, references and the like? I only need the subscript function in maths environments. MWE:               \documentclass{article}          \catcode`_=\active     \newcommand_[1]{\ensuremath{\sb{\mathrm{#1}}}}          \begin{document}     $D_H$     \label{sec_a} % This causes a "! Missing \endcsname inserted." error     \end{document}


title: White space in tex file vs. white space in output

text: Googling around has not produced an answer to this, possibly because of the complexity of the question doesn't lend itself to easy googling. What I want to be able to do is control how white space appears in the output document. In the tex document, I might have two paragraphs as               Text in paragraph one.     Text in paragraph two.      And in the output they appear as two separate paragraphs, which is good. But in the tex document, it looks very jumbled and hard to read. However, if I attempt to make it a bit easier to read by doing               Text in paragraph one.          Text in paragraph two.      suddenly latex thinks I want extra space between the paragraphs and the output document has extra, unnecessary space. Is there a way I can include this extra space in the tex document for clarity and organization and not have it appear in the output? It gets really ugly when I have stuff that looks like               \documentclass[12pt, letterpaper]{letter}          \begin{document}          Paragraph one.     \begin{equation}     equation one     \end{equation}     \begin{equation}     equation two     \end{equation}     Paragraph two.          \end{document}      and I would much rather see               \documentclass[12pt, letterpaper]{letter}          \begin{document}          Paragraph one.          \begin{equation}     equation one     \end{equation}          \begin{equation}     equation two     \end{equation}          Paragraph two.          \end{document}


title: Issue with the lengths of the margins in article class in twoside mode

text: Simply, put the solution to my problem is that for everything before the first section, the odd margin must be swapped with the even margin and vice versa. At the first section, everything must be normal. The problem is that we cannot modify several times the evensidemargin and oddsidemargin. I am in the article class with the two-side option enabled.(The document will be bound.) My oddsidemargin is not the same as the evensidemargin. It is a requirement that the first page of the text proper be numbered by 1; I do not need to number the pages of the title page, the abstract, the toc and so on. I prefer to have the first page of the section on the left. In the MWE, the pages begin where they must in therms of left and right. This is the details of my outline,               \documentclass[twoside,a4paper, 11pt]{article}           \newcommand{\emptypage}{\clearpage\null\thispagestyle{empty}\clearpage}          \usepackage{lipsum}              \setlength{\paperheight}{297mm}         \setlength{\paperwidth}{210mm}         \setlength{\hoffset}{-1in}         \setlength{\voffset}{-1in}         \setlength{\textheight}{252mm}         \setlength{\textwidth}{150mm}         \setlength{\evensidemargin}{40mm}         \setlength{\oddsidemargin}{25mm}         \setlength{\topmargin}{15mm}         \setlength{\headheight}{4mm}         \setlength{\headsep}{6mm}         \setlength{\footskip}{9mm}         \setlength{\marginparsep}{5mm}         \setlength{\marginparwidth}{25mm}         \setlength{\marginparpush}{0mm}         %\addtolength{\textheight}{0in}         %\addtolength{\textwidth}{0in}         \setlength{\parindent}{0ex}         \setlength{\parskip}{1ex}         \renewcommand{\baselinestretch}{1.11}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%é          \begin{document}          \pagenumbering{roman}          \begin{titlepage}          TiTle          \end{titlepage}                    \emptypage          \begin{abstract}          Summary     \end{abstract}          \clearpage          \begin{abstract}          Summary number 2     \end{abstract}          \emptypage          \tableofcontents               \clearpage     %\setcounter{page}{1}     \pagenumbering{arabic}     \normalfont     \normalsize          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]     \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]     \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]     \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]     \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]     \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]     \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]     \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]     \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]          \section{first section}     \lipsum[11-22]                                   \end{document}


title: How to put a full stop at the bottom, not mid-line, after an aligned matrix?

text: How can I put a full stop at the bottom rather than at mid-line following the end of an aligned matrix expression such as `$\begin{pmatrix} x\\ y \end{pmatrix}$`?


title: Natural transformation arrow

text: I'm trying to do the following with `xymatrix`: ![image](http://i.stack.imgur.com/EPAxP.png) This is a diagram I drew sometime ago... But now I don't have the source and I can't remember how I did it, nor can I find an easy, simple way to do it. More specifically, what I forgot how to do is the vertical arrow in the middle.


title: Vertical aligning in longtable environment

text: i have got a longtable that spans over many pages and contents both graphics and text. Now i want to align both columns vertically to the top, but the text column is being automatically parsed to the bottom.. How do i change this? This is my example code:               \begin{longtable}{|p{6cm}|p{9cm}|}          \hline     \textbf{Visualisation} & \textbf{Explaining} \\ \hline     \includegraphics[width=6cm]{pic/pic1.pdf}     & text\\\hline          \end{longtable}      i want that the "text" is being placed on the top of the second column. What is the easiest way to do this?


title: About moderncv footer

text: Is there any way I can turn off the footer from appearing in all but the last page of the CV? (and once again in the cover letter). Is a nice idea that even with just the first page they could call you, but I need the space. I've already modified the template in order to do so, but I wanna try to keep my cv as vanilla as possible.               \documentclass[11pt,letterpaper,sans]{moderncv}          % moderncv themes     \moderncvstyle{casual}     \moderncvcolor{blue}     \usepackage[scale=0.75]{geometry}          % personal data     \name{John}{Doe}     \phone[mobile]{+1~(234)~567~890}          % content          \begin{document}     \makecvtitle          \section{Education}     \cventry{1998-2007}{Degree}{Institution}{City}{\textit{Grade}}{Description}          \pagebreak % just to simulate a lenghty CV for this MWE          \section{Computer skills}     Second page          \end{document}


title: Best way of representing logical statements

text: I have a number of statemts which describe the process of creating a data element which are intergrated within a "data manual". For example:               IF ( ( heigth between 58 AND 76 ) AND ( BMI between 19 AND 24 ) ) THEN obese = 0     ELSE IF ( ( heigth between 58 AND 76 ) AND ( BMI between 25 AND 29 ) ) THEN obese = 1      Is there an elegant way to represent such statements in TeX? I've thought about using tree graphs of some sort but unortunately its hard due to the fact that most elements are not as simple as the example and tend to get very complicated very fast.


title: Make TikZ compute the x-coordinate of the margin

text: The command `\hrulefill` prints a line that fills all empty horizontal space with a line. I would like to do something similar with `TikZ`. What I would like to know is can I do something similar like               \noindent Some text \hrulefill      with `TikZ`? What I would like to do is for `TikZ` to be able to determine the x-coordinate of the margin so that I can do something like               \tikz Some text \draw [dashed] (0,0) -- (end of textwidth,0);      For more information, you can see my answer in Best way to insert a horizontal cut line with a scissor symbol.


title: Force table's width (pandoc / default.latex)

text: Pandoc is working great at the moment, but I've got a problem for large tables. Most of the time the tables get rendered outside of the page. I know it has something to do with p|cm=8 or something, but I really have NO clue where to put it ;p. My default.latex contains if(tables):               $if(tables)$     \usepackage{longtable}     $endif$      Any chance to get some advice? :) Thnx in advance.


title: Exception for bibliography style

text: I am using Jabref to generate my bibliography (overall style apacite) and would like to have these two entries in the bibliography as               British Library, Title of Manuscript notes XYZ, Asia and Africa Collections, Private Paper, reference MSS EUR F88/341          Youtube.com, www.linkofthevideo.com, accessed on Sept 10, 2012      How/where can I fill in the relevant entries in Jabref to get such type of entry? Or alternatively how can I enter the details in the bib file, please? Or make exceptions to the existing style?


title: Coloring arrows in \xymatrix

text: Is there a way to color certain (but not all) arrows using `\xymatrix`? I wish the following ignorant attempt would work!!               \usepackage{xypic,color}     \begin{document}     \[     \xymatrix     {     X\ar[r]\color{red}{\ar[d]} & Y\\     Z     }     \]     \end{document}


title: Biblatex italicizes @MISC entries

text: I made my bibliography using Biblatex:               \usepackage[backend=bibtex]{biblatex}      and it works fine except that all of the @MISC entries, which I use to cite websites, are all italicized. This would have been fine, except that the URLs cited are italicized as well, which looks horrible. Is there a simple way (package options?) to make Biblatex stop italicizing the entire entry? **Minimal Working Example:**               \documentclass{article}     \usepackage[backend=bibtex]{biblatex}     \addbibresource{Bibliography.bib}     \begin{document}     Cite Book, \cite{Book}          Cite Misc, \cite{Misc}     \printbibliography     \end{document}      The file `Bibliography.bib` contains:               @book{Book,       author    = {Author},       title     = {Title},       publisher = {Publisher},       year      = {2014},     }          @misc{Misc,       title = {``Title'' by Author (\url{http://tex.stackexchange.com/})}     }      The above produces: ![enter image description here](http://i.stack.imgur.com/Ih3mD.jpg) I would like the entire of citation [2] to be `\upshape`. **Edit:** Thanks to musicman's suggestion I managed to make the URLs print upright using:               \appto{\biburlsetup}{\renewcommand*{\UrlFont}{\upshape\ttfamily}}      But it still clashes with the rest of the bibliography @MISC entry, which is italicized. Is there a way to make the whole thing not italicized? I have also tried               \appto{\bibfont}{\upshape}      and also               \renewcommand{\bibfont}{\upshape}      But neither have any effect. **Possible Solution:** The crux of being able to make the URLs print upright seems to be the manipulation of `\UrlFont`:               \renewcommand*{\UrlFont}{\upshape\ttfamily}      However I cannot find `\UrlFont` inside the Biblatex documentation. Could there be a similar hidden command that controls the bibliography entry's font?


title: Help identify tool used to produce graph in LaTeX paper

text: In a paper by Ruth Gregory (see http://arxiv.org/abs/1203.0576), I found a graph: ![enter image description here](http://i.stack.imgur.com/QZUnv.png) It does not seem to be an image from an application, e.g. _Mathematica_ , but either rendered/generated by a LaTeX tool, or enhanced by LaTeX. The annotations are clearly in LaTeX. Does anyone know how the graph was produced and inserted into the TeX document?


title: How do I choose which sections to compile from a LaTeX document?

text: Is it possible to compile a LaTeX document but only include one section and its associated tables and figures? I have two cases for which this would be useful:   1. I would like to provide the Methods section of a paper to colleagues.    2. I would like to have multiple versions of a document that contain different combinations of the sections of a master document. I know that I could place each section in a separate file and then have separate master files - likely what I will do for case 2 since it is integral to the final document structure, but at least for case 1, I am hoping that there is a way to only compile one section. Thanks!


title: Extracted coordinates have wrong value

text: I am unable to get the right coordinate values for `(A)` and `(B)` in the following `axis`. Did I misunderstand some conversion step or is it because of the data? ## Picture ![enter image description here](http://i.stack.imgur.com/qOTL3.png) ## MWE               \documentclass[     a4paper     ]{scrartcl}          \usepackage{         newtxtext,         amsmath,         tikz,         pgfplots     }     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usetikzlibrary{         calc     }          \listfiles          \begin{document}          \begin{center}         \begin{tikzpicture}[font=\small]         \begin{axis}[         height=6cm,         width=14cm,         %         scale only axis=true,         xlabel={Distance in mm},         ylabel={Voltage in volt},         ]         \addplot [sharp plot, no marks, x=Wegnormiert] table [col sep=tab] {data.txt} coordinate [pos=0.5] (A) coordinate [pos=0.6] (B);         \draw (A) -| (B);         \filldraw let \p1= (A) in (\x1,\y1) circle [radius=1pt] node[pin={[pin distance=1.1cm]270:{{\pgfmathparse{\x1}\pgfmathprintnumber[fixed,precision=2]{\pgfmathresult}\,pt}}}] {};         \filldraw let \p2= (B) in (\x2,\y2) circle (1pt) node[yshift=-0.5cm, pin=270:{{\pgfmathparse{\x2/2.845274}\pgfmathprintnumber[fixed,precision=2]{\pgfmathresult}\,mm}}] {};         \end{axis}         \end{tikzpicture}     \end{center}          \end{document}      ## Data http://pastebin.com/5AkHFZhh ## Additional code for y-coordinate               \documentclass[     a4paper     ]{scrartcl}          \usepackage{         newtxtext,         amsmath,         subcaption,         biblatex     }     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepackage{         tikz,         pgfplots         }     \usetikzlibrary{         calc     }          \listfiles          \begin{document}          \begin{center}         \centering         \begin{tikzpicture}[font=\small]         \begin{axis}[         height=6cm,         width=14cm,         %         scale only axis=true,          xlabel={Distance in mm},          ylabel={Voltage in volt},         ]         \addplot [sharp plot, no marks, x=Wegnormiert] table [col sep=tab] {data.txt} coordinate [pos=0.5] (A) coordinate [pos=0.6] (B);         \draw (A) -| (B);     %   \filldraw let \p1= (A) in (\x1,\y1) circle [radius=1pt] node[pin={[pin distance=1.1cm]270:{{\pgfmathparse{\x1}\pgfmathprintnumber[fixed,precision=2]{\pgfmathresult}\,pt}}}] {};         \filldraw let \p2= (B) in (\x2,\y2) circle (1pt) node[yshift=-0.5cm, pin=270:{{\pgfplotsconvertunittocoordinate{x}{\x2}\pgfmathprintnumber[fixed,precision=1]{\pgfmathresult}}}] {} node[yshift=0.5cm, pin={355:{{\pgfplotsconvertunittocoordinate{y}{\y2}\pgfmathprintnumber[fixed,precision=1]{\pgfmathresult}}}}] {};         \end{axis}         \end{tikzpicture}     \end{center}          \end{document}      ![enter image description here](http://i.stack.imgur.com/oHJTR.png)


title: Generate line hash scale

text: I want to recreate the original NASA TLX Question from here, but how do you generate the hash scale?


title: Inserting Appendices after Bibliography

text: Hi I am using the Sunil Patel thesis template for my thesis. This is dependent on a thesis.cls file that is here. The problem is that my college requires the Appendices to be after the Bibliography and I am unable to work out how to modify the .cls file to achieve this. Any help would be gratefully appreciated


title: Eclipse with texclipse code completion

text: I am using **Eclipse** with **texclipse**. **Code completions** are not showing up for some of the commands. For example: `\mbox{}`, `\mathcal{}` and for some others that i cannot recall at the moment. _(If this single command does not suffice for answering why it doesn't show up in code completition let me know, then i will do thorough search of those commands.)_ **How is it possible to make specific commands availible in code completition?**


title: Undefined color in LaTeX code

text: I have a problem in configuration color for the TeXstudio editor, mine is (LeLaTeX) since I used `.eps` figure. Always gives me an error (undefined color), this problem recently appeared when the new TeXstudio was downloaded and I lost the previous configuration. (Previously, all my documents are compiled normally.) Please, check the attachment to see my configuration. ![enter image description here](http://i.stack.imgur.com/oPWjW.jpg) ![enter image description here](http://i.stack.imgur.com/7Ja3Z.jpg) ![enter image description here](http://i.stack.imgur.com/1GnKm.jpg)


title: Local and global cross-references

text: Sections are referenced in a lot of distinct places: In table of contents. Managed by \tableofcontents In minitocs. Managed by minitoc package In headers. Managed by fancyhdr package Like a leader section. Managed by \section In text. Managed by \ref In tocs and minitocs, because of each section appears below its chapter (wits some indentation) it's not necessary to prefix the section number with the chapter number. The label scope is local; so I need a local renderization. Example:                             1. Chapter One ------------------1                        1. First section -----------1                        2. Second section ----------3                    2. Chapter Two -----------------5                        1. First section ...........5      This means that sections 1.1 and 2.1 must be rendered as section 1. When we use \section command we know what chapter we are in: it's showed in the headers of te page. So I want also local scope:                        1. First section                         bla bla              2. Second section                        bla bla      In headers I want global scope:                        1. Chapter One                      1.1. First section      In text we can make a crossreference to whatever point of text. So we need global scope:                           See section 1.1 (first section in first chapter)      This is the problem: The default behavior give as global scope every where. But if I redefine `\thesection` to local scope, then I redefine everywhere. This is my code:               \documentclass[catalan]{book}     \usepackage{fancyhdr}     \usepackage{nameref}     \usepackage{minitoc}     \usepackage{hyperref}          \makeindex     \dominitoc          %\renewcommand{\thesection}{\arabic{section}}          \renewcommand{\chaptermark}[1]{\markboth{\thechapter\ #1}{}} \renewcommand{\sectionmark}[1]{\markboth{\thechapter.\thesection\ \ #1}}          \fancyhead{}     \fancyhead[LO]{\leftmark}     \fancyhead[RE]{\thechapter.\rightmark}          \pagestyle{fancy}          \begin{document} \tableofcontents \chapter{One}          \minitoc[e]          \section{First section}     \label{sec:A}     aaaaaa \newpage bbbbbbbb \newpage     ccccccccccc          \chapter{Two} \minitoc[e]     \section{Second section}     \label{sec:B}          See sections \ref{sec:A} and \ref{sec:B}          \end{document}


title: write macro parameter character to file (#)

text: During pdfLaTeX processing, I'm writing a string of key-value pairs to an external file. Sometimes the value will contain `\#` and I want only the `#` to be written to the file. Here is my code which works fine as long as I just need to write plain text. Assume that every key is defined as `\@empty` by default; it is only written to the file if it has a value other than `\@empty`. e.g. `\def\objects{\@empty}\def\mystring{\@empty}`               \newcommand{\setoptions}{%       \global\edef\finaloption{}       \getkeyval{objects}\getkeyval{mystring}     }     \newcommand{\getkeyval}[1]{%       \def\tmpkey{#1}       \edef\tmpval{\csname #1\endcsname}       \ifx\@empty\tmpval       \else       \edef\finaloption{\finaloption,\tmpkey=\tmpval}       \fi     }      Then later this line writes the key-value pairs to the external file:               \setoptions     \immediate\write\mypgm{\finaloption}      I suppose I need to loop through `\tmpval` checking for `\char23`? Is that a step in the right direction? Edit: An example of the LaTeX input:               \mytag[mystring=val, objects=App\#1 App\#2,caption={my title}]{myarg}      I parse and retrieve the key-value pairs and I want to write this line to the external file:               mystring=val, objects=App#1 App#2


title: How to change the color of a block within a custom Beamer .sty theme file?

text: I'm in the process of creating a custom Beamer theme. I know how to change the color of fonts for certain elements within an itemize or enumerate block, but I can't seem to figure out how to specific the color in a block as depicted below. For example:               \begin{block}{Change the font color here}         some text         some more text     \end{block}      I would like to alter the color of the `{Change the font color here}` area for my theme. I am trying to use this code in my .sty file to change the color to black:               \setbeamercolor{block}{fg=black}      What am I doing wrong?


title: Usage of titlesec package when numbering sections

text: This question evolved from my earlier question posted here. It turnt out that what I gave as the MWE actually worked, so I investigated a bit and found the real problem. I have a document in which I generally do not want to number the chapters, sections and subsections. Only one section should contain roman numbered subsections. Considering the following code:               \documentclass{report}     \usepackage{titlesec}     \titleformat{\subsection}{\normalsize\bf\it}{}{}{}     \setcounter{secnumdepth}{-1}      \begin{document}      \tableofcontents      \chapter{mwe}      \section{unnumbered subsections}      \subsection{unnumbered}      \section{roman numbered subsections}      \setcounter{secnumdepth}{2}      \renewcommand{\thesubsection}{\textnormal{\roman{subsection}}.}      \subsection{roman one}      \subsection{roman two}      \setcounter{secnumdepth}{-1}      \chapter{Second chapter}      \section{unnumbered subsections}      \subsection{unnumbered}      \end{document}      which is the solution from my earlier post adding the titlesec package and modifying the subsection's title (i.e. lines 2&3). Here I get the 'Missing number treating as zero' error at the line '\subsection{roman one}'. Can anybody tell me why and a fix or work-around?


title: Superscripts in verbatim environment

text: I have some lines in a verbatim environment               ...     \begin{verbatim}         line 1         * line 2         line 3         * line 4         line 5     \end{verbatim}     ...      at the beginning of some lines I want to add a number in superscript. I've indicated that with asterisks now. How can I do this?


title: Aligning in text (non-math)

text: I would like to align some text similar to how the `align` math environment works. I don't want to put the text in a table, because I don't want it to float. I tried putting the text in a tabular environment, but that doesn't flow well with the text before and after. An example:               Here is some text before by aligned text         S  Isomeric state         Z  Atomic number         A  Atomic mass number     Some text after the aligned text      Does that example make sense?


title: Kile document doesn't work well in WinEdt. How do I convert it?

text: If I save a document in Kile (on Linux) and and open it in WinEdt (Windows) my text is in a bad format. For example: If I have a kile document named main.tex (saved using the UTF-8 encoding) with:               \documentclass[a4paper,12pt,fleqn,oneside,openright]{book}          \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[portuges,brazil,brazilian]{babel}          \begin{document}          \chapter{Introdução}\label{Chapter:Introduction}          \section{Apresentação}\label{Section:Presentation}          Este é um texto em português, com várias acentuações. % This is a brazilian portuguese text with several accents.          \end{document}      My output using Kile is: ![Kile.png](http://i.stack.imgur.com/YXgKO.png) But opening the same file in WinEdt I get something like:               \documentclass[a4paper,12pt,fleqn,oneside,openright]{book}          \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[portuges,brazil,brazilian]{babel}          \begin{document}          \chapter{IntroduÃ§Ã£o}\label{Chapter:Introduction}          \section{ApresentaÃ§Ã£o}\label{Section:Presentation}          Este Ã© um texto em portuguÃªs, com vÃ¡rias acentuaÃ§Ãµes. % This is a brazilian portuguese with several accents.          \end{document}      which is not readable to me. I did a complete article in Kile, but unfortunately I need it working in WinEdt too, because I need to use the tool `tex2word`. If I try to use (copying and pasting) the readable kile document to winedt, for example, using this               \documentclass[a4paper,12pt,fleqn,oneside,openright]{book}          \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[portuges,brazil,brazilian]{babel}          \begin{document}          \chapter{Introdução}\label{Chapter:Introduction}          \section{Apresentação}\label{Section:Presentation}          Este é um texto em português, com várias acentuações. % This is a brazilian portuguese with several accents.          \end{document}      my document won't compile and I get errors. Error: > package utf8x Error: MalformedUTF-8sequence So, how can I get a readable document (created by Kile) on WinEdt with the same output (readable too)?


title: Enumerate Table of Contents in Beamer

text: I have the following slide. a) I want it to have subsections numbered 10.1 and 10.2 etc. I had increased the secnumdepth(3) doesnt help. b) sub sections are indented weirdly(horizontally side by side) . I want it vertically aligned/stacked.. Sorry if its duplicated. ![Sub Section Numbering and Indention](http://i.stack.imgur.com/cbHF8.png) Codes for the section is                 \setbeamertemplate{section in toc}{\hspace*{1em}{\inserttocsectionnumber.~\inserttocsection}}     \setbeamertemplate{subsection in toc}{\hspace*{2em}{\inserttocsubsectionnumber.~\inserttocsubsection}}     \setcounter{tocdepth}{3}


title: Timing and integration with TikZ PGFlots

text: How do I set intervals or integration with TikZ PGFlots? Something similar to the figure below, but I want to define the function, the intervals of integration and the partitions. ![enter image description here](http://i.stack.imgur.com/Jaixg.png)               \documentclass{scrartcl}     \usepackage[utf8]{inputenc}      \usepackage[upright]{fourier}     \usepackage[usenames,dvipsnames,svgnames]{xcolor}     \usepackage{amsmath,tkz-fct}     \usepackage[active,pdftex,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{5pt}             \begin{document}           \begin{tikzpicture}[scale=1]     \tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2]     \tkzDrawX \tkzDrawY     \tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)}     \tkzDrawRiemannSumSup[fill=blue!40,opacity=.5,interval=-1:5,number=10]      \tkzDrawRiemannSumInf[fill=green!40,opacity=.5,interval=-1:5,number=10]      \end{tikzpicture}           \end{document}


title: Any reason why \blacksquare and \box are causing errors?

text: I am using the `amsmath` package. I just want a black box at the end of a proof, right-justified. `\blacksquare` and `\box` both cause errors. Actually, I'd prefer a musical quarter note if that's possible :)


title: Reversing a path in TikZ

text: When I use `\path plot function {x^2};` in tikz, it plots it left-to-right (the default domain is `-5:5`). This is annoying, because, for example, one cannot pile on `-- plot function {x^2 + 1} -- cycle;` and then fill the whole thing; it doesn't fill the obvious cycle, but rather the self-intersecting one going between opposite corners as it "returns carriage", so to speak. Is there some way to get `plot function` to generate points in the reverse order? Alternatively, is there some way of getting tikz to draw a path in the reverse order the points were specified? (This last one is of more general utility, since the orientation of a path is used a lot.)


title: Making \marginpar work with tex4ht

text: I tried using `\marginpar` using tex4ht and pdflatex. Here is the PDF output: ![\\marginpar PDF](http://i.stack.imgur.com/9jCBU.png) Here is the HTML output: ![\\marginpar HTML](http://i.stack.imgur.com/FsAsP.png) Is it possible to configure tex4ht to produce HTML output with good looking marginal notes?


title: Emacs and AUCTeX not working as it was before a restart

text: I having being Emacs and AUCTeX for some time now. Today, after I restart my computer, indentation isn't working as it was. By this, I mean when I hit enter, the next line would indent appropriately. This is no longer the case. Additionally, `C-c C-v` is no longer opening my pdfs. I haven't changed anything in my `.emacs` file either. The cause was due to my code for adjust load path not adjusting the load path for rainbow delimiters and python mode. I had to manually adjust the paths.               ;; Package list M-x package-list-packages     (require 'package)     (add-to-list 'package-archives               '("elpa" . "http://tromey.com/elpa/"))     (add-to-list 'package-archives               '("marmelade" . "http://marmalade-repo.org/packages/"))     (add-to-list 'package-archives               '("melpa" . "http://melpa.milkbox.net/packages/"))          ;; Adjust load-path after updating     (defun package-update-load-path ()       "Update the load path for newly installed packages."       (interactive)       (let ((package-dir (expand-file-name package-user-dir)))         (mapc (lambda (pkg)                 (let ((stem (symbol-name (car pkg)))               (version "")               (first t)               path)               (mapc (lambda (num)                   (if first                   (setq first nil)                 (setq version (format "%s." version)))                   (setq version (format "%s%s" version num)))                 (aref (cdr pkg) 0))                   (setq path (format "%s/%s-%s" package-dir stem version))                   (add-to-list 'load-path path)))               package-alist)))      * * * I have found one problem. My load paths aren't adjusting after updating. **Why doesn't this work?** I had to make the change `rainbow-delimiters-20140329.934` and `python- mode-6.1.3` from               ;; Paren checking     (load "paren")     (add-to-list 'load-path "~/.emacs.d/elpa/rainbow-delimiters-1.3.4")     (require 'rainbow-delimiters)     (global-rainbow-delimiters-mode)     (add-hook 'prog-mode-hook 'rainbow-delimiters-mode)      That is why I say the load paths aren't updating. How can I get my update load path code to work.


title: Theoremstyle with line break but non italic text

text: I use the theorems (from the amsthm-package) to specify definitions, examples and so on.. I want them to do two things: 1) line break after the label 2) non italic text within the theorem! I googled a bit and found a solution for the first thing. I have a MWE for it:               \documentclass{article}     \usepackage{amsthm}     \newtheoremstyle{break}       {\topsep}{\topsep}%       {\itshape}{}%       {\bfseries}{}%       {\newline}{}%     \theoremstyle{break}     \newtheorem{defi}{Definition}     \begin{document}     \begin{defi}[Test]     Foo     \end{defi}     \end{document}      Can you help me solving the second one??That would be very nice! Thanks for your help!


title: Creating a list with non-consecutive items - Especially within exam Class

text: I would like to make a list that is numbered however I want it to be, not just consecutively. Specifically, within the exam class, how could I go to question #10 immediately after question #5? Or part (c) after part (a)? Thank you very much!               \documentclass{exam}          \begin{document}          \begin{questions}          \question Number 1          \question Number 50          \begin{parts}          \part Part a          \part Part g          \end{parts}          \end{questions}          \end{document}


title: Line after the table shows up on previous page

text: \begin{table}[ht]     \begin{minipage}[b]{1\linewidth}\centering     \begin{tabular}{l l c l | l l c c}     One & Two  &  Three  &  Four  &  Five  &  Six  &  Seven  &  Eight\\     One & Two  &  Three  &  Four  &  Five  &  Six  &  Seven  &  Eight\\     One & Two  &  Three  &  Four  &  Five  &  Six  &  Seven  &  Eight\\     \hline     \end{tabular}     \caption{Derivation Table}     \end{minipage}     \end{table}      This line after the table is showing up on the previous page. How to display it after the table in a new line


title: Is there anything wrong with this piece of LaTeX?

text: For those of you who are familiar with my questions, you would know that I'm a newbie. If you aren't, well you know now. What is wrong with the following piece of LaTeX? MathJax won't render it as correct.               \frac{2^5}{2^{-2}}\\=2^5^{-\left(-2\right)}\\=2^{5+2}\\=2^7\\=128      This is in MathJax, so there wouldn't be anything fancy.


title: How do I smash the p in chapter

text: In the table of contents, I have a green box around Chapter. I would like to `cha\smash{p}ter` so the word is vertically more aesthetically pleasing in the box. How do I smash the p in the definition of `\chapter{}`? ![enter image description here](http://i.stack.imgur.com/qu4MY.png) **Edit 1:** I am using a style file made and altered by graduate students for thesis and dissertations. I was under the impression they were using the definition of chapter in the box.               % ==========================================                                           % ToC Entry modification -- green boxes.                                               % ==========================================                                           \titlecontents{chapter}[0em]       {\vspace*{20pt}}%                                                                      {\hspace{80pt}%                                                                          \begin{tikzpicture}[remember picture, overlay]%                                        \draw[fill = uvmgreen, draw = uvmgreen] (-4,-.1) rectangle (-0.7,.5);%                 \pgftext[left, x = -3.7cm, y = 0.2cm]{           \color{white}\Large\bfseries Chapter\ \thecontentslabel};%                   \end{tikzpicture}         \color{uvmgreen}\large\bfseries%                                                       \vspace{20pt}}%                                                                      {}{}      But I found that they weren't from @azetina's comment.


title: Recreating a renewenvironment using the \renewenvironment is creating a side effect!

text: I have a buildin environment in a module `theorems-ams-bytype.inc` (in lyx) example, which i copied and created a duplicate with required changes for a environment called as `pitfall`.               Style Pitfall             CopyStyle             Definition             LatexName             pitfall             LabelString           "Pitfall \thepitfall."             Preamble               \theoremstyle{definition}               \newtheorem{pitfall}{\protect\pitfallname}[chapter]               \renewcommand{\thepitfall}{\arabic{pitfall}} % this will number the pitfall number as normal 1,2, etc while if u remove this line then it would be chapterno.pitfall number.              EndPreamble             Requires   amsthm             LangPreamble               \providecommand{\pitfallname}{_(Pitfall)}             EndLangPreamble             BabelPreamble               \addto\captions$$lang{\renewcommand{\pitfallname}{_(Pitfall)}}             EndBabelPreamble             LabelCounter   pitfall     End      Now I add some nice decorations to this environment using the renewenvironment command. The code for this redefinition of the environment is as follows.               % for pitfall         \mdfdefinestyle{pitfallstyle}{%         linecolor=gray,middlelinewidth=7pt,%         frametitlerule=false,%         %tikzsetting={shading=axis,top color=gray!10},         % apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={%         %shade,left color=white, right color=gray!20}}}, frametitlerulecolor=gray!60,         roundcorner=1pt,         splittopskip=1cm,         splitbottomskip=1cm,         bottomline=false,         leftline=false,         rightline=false,         backgroundcolor=gray!10,         frametitlerulewidth=0pt,         innertopmargin=\topskip, }         % changes in pitfall environment         \let\origpitfall\pitfall         \let\endorigpitfall\endpitfall         \renewenvironment{pitfall}{%         % here you can make changes in the original pitfall class         \begin{mdframed}[style=pitfallstyle] \origpitfall }{         \endorigpitfall         \end{mdframed}          }        Now the trouble is if I don't use `\begin{pitfall} ... \end{pitfall}` in the entire document then there is an error. and the error is below. ![enter image description here](http://i.stack.imgur.com/DE3BR.png) Kindly help me understand.


title: Border around figure does not fit

text: I want to insert a bitmap image in my document. I would like to put a tight and thin border line around the image. Apparently, the way to do this is with `\framebox`. I want to have the border fit exactly around the image (no space between the border and the image). So I set `\setlength\fboxsep{0pt}`. However, for some reason the box does not fit. At the top and bottom, the line fits exactly, but there is extra space at the left and right side. Here is my code:               \begin{figure}[htb]     \centering     \setlength\fboxsep{0pt}     \setlength{\fboxrule}{1pt}     \framebox{         \includegraphics{Fig1.jpg}     }\end{figure}      The same issue will become apparent with a very simple example like this:               \setlength{\fboxsep}{0pt}     \fbox{%       \rule{4cm}{3cm}     }      Am I doing something wrong, or did I run across a bug?


title: tick labels style overwrites extra tick label style

text: ![enter image description here](http://i.stack.imgur.com/jl3Ec.png) For reasons, I need to move a tick label slightly to the right. Additionally I want to add an extra tick label at the zero of a function. However, the style chosen for the x label overwrites the style chosen for the extra tick label. Is this intended? I want the extra tick label to be directly below the tick MWE( though I can't format it properly).               \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots}\begin{document}\begin{tikzpicture}\begin{axis} [domain=0:1,     restrict y to domain= -1:1,     xmax=1.1,      axis x line= middle,      axis y line = left,     xtick={1},     x tick label style={anchor=north west},     xlabel =$s$,      extra x ticks={0.25},         every extra x tick/.style={ anchor=center},     extra x tick label={$s_c$},     no markers,]\addplot (x,x-0.25);\end{axis}\end{tikzpicture}\end{document}


title: Can I make latexmk quieter?

text: I'm using `latexmk -quiet`, and while it suppresses most status messages, there are still a few irrelevant messages that it gives me:               $ latexmk -pdf -silent document.tex     Latexmk: Run number 1 of rule 'pdflatex'     Latexmk: Running 'pdflatex  -interaction=batchmode  "document.tex"'     This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)      %&-line parsing enabled.     entering extended mode     Latexmk: Citation `mycite' on page 3 undefined      Latexmk: Reference `fig:myfig' on page 4 undefined       and so on. All of the citations and references are eventually defined through re-running LaTeX, so these are extraneous and distracting, as well. Using `latexmk -quiet -silent` doesn't appear to change anything. I was using Rubber, which deals with this very well, but unfortunately lacks some features Latexmk has in other areas (such as `chapterbib` support and dependency output).


title: Tikz-PGF: Draw integral test plot

text: So I'm doing a report on convergence tests in LaTeX, and would like to produce a diagram demonstrating the integral test for convergence. I am somewhat new to LaTeX, and a total n00b when it comes to Tikz, so any help would be much appreciated. I am essentially trying to produce something like this: ![enter image description here](http://i.stack.imgur.com/UQ45o.gif) You might ask why not just use this image, right? Truthfully, I would like to learn TikZ, and would very much appreciate any help in coming up with this plot. Furthermore, I would like to place inside each bar the corresponding term of the series: a_1, a_2, a_3, ..., a_n Any assistance would be much appreciated!


title: texlive manager fails to update packages

text: My TeXLive installation is corrupt (`mdframed` supposed to be installed, but it is not). Running update with the `tlmgr`, fails with               regenerating fmtutil.cnf in C:/texlive/2011/texmf-var     running fmtutil-sys --no-error-if-no-format --byengine pdftex ...          fmtutil-sys --no-error-if-no-format --byengine pdftex failed (status 23), output:     fatal: memory exhausted (xmalloc of 1840000008 bytes).     Running: "C:\texlive\2011\bin\win32\pdftex" --ini --jobname=amstex --progname=amstex -translate-file=cp227.tcx *amstex.ini <nul          The file amstex.fmt was not created due to some errors.     See the log file C:/texlive/2011/texmf-var/web2c/pdftex/amstex.log for details.      I have no idea what to do. Deleted TeXLive from disk and reinstall? EDIT: I reinstalled texlive, but mdframed.sty ist still missing.


title: Adding text between figure number and its punctuations

text: We are using the below definition to get the figure numberings automatically               \renewcommand\thefigure{\@arabic\c@figure}     \def\fnum@figure{\figurename~\thefigure}      The output is as shown below: > Figure 1. Caption But, we need to insert the text "(Online color)" after figure number as shown below: > Figure 1 (Online color). Caption To achieve this I again redefining the command               \def\fnum@figure{\figurename~\thefigure (Online color)}      which again I have to reset for the next captions. Could anyone suggest how to get this automatically?


title: Equation does NOT go new lines, while using \newline

text: I've been trying to typset an equation which, at a certain point, spans several lines, but is a single step (so no numbering may occur). For this I used newline, but this doesn't seem to work. How do I resolve this? code:               % SLOPPY EQUATION!!!! EDIT !!!!     \begin{equation}     K_t = [\hspace{1pt}^{1}K_t ,\hspace{1pt}^{2}K_t, \ldots, \hspace{1pt}^{m}K_t]^T \in \mathbb{R}^m , \hspace{1cm} t = 1, 2, \ldots, M \newline     \hspace{1pt}^{i}f_{j_{1}j{2}\ldots j{M}} = \frac{\delta^{M}f(z)}{\delta^{j1}z\delta^{j2}z\ldots \delta^{jM}z} \newline     e_i = [0,0,\ldots,0,1,0,\ldots,0]^T \in \mathbb{R}^m \newline     \textit{met 1 op de i-de plaats in $e_i$ .}     \end{equation}


title: Macro names with one single figure like \2, a bad practice?

text: I know that it is not recommended to use macros like `\H0` since it contains non-letters characters. However, what about the macro names like `\2` with only one figure, which are allowed without trouble by LaTeX. Is it a bad practice ? For example, it is tempting to let `\2` be a shortcut for one half, that is : `\newcommand{\2}{\frac{1}{2}}`


title: Custom title page for each part with scrreprt class

text: I'm currently "compiling" a document (scrreprt) which includes many chapters from various other documents. I want to group these chapters into parts but instead of the titlepage generated by the part-command I want to use the title pages from the subdocuments. I already managed the including part. Now I wan't to remove the part-pages without destroying things like the page-numbering. Is there a way to let the parts only appear in the TOC?               \part{Architektur} %For the entry in TOC     \includepdf{architecture.pdf} %This includes my titlepage     \input{architecture/deployment} % The actual content of the subdocument     \input{some/more/chapters}


title: Color entire table

text: How do I get an entire table to get a background color. I dont mean the indivual cells but the entire table to get a gray shade. Something like this: ![http://img818.imageshack.us/img818/8684/38613229.png](http://i.stack.imgur.com/eqCD1.png)


title: What is the TeX/LaTeX symbol for subgroup (not normal subgroup)?

text: We all love normal subgroups, and in searching the web for the answer to my question I've found plenty of resources for ways to indicate normal subgroups. That's not what I'm looking for. When one wants to say `$H$ is a subgroup of $G$` (not necessarily a normal subgroup, normal status is unknown), what is the intended symbol for that purpose? Does everyone just use the less-than `\lt` symbol? One could simply use a backslash symbol for setminus, but I'm betting parsers that automatically read LaTeX for the purposes of moving equations between math softwares probably process `\setminus` better. In a similar spirit, is there a LaTeX symbol for non-normal subgroup? **Edited for clarification:** I am not looking for how to say "not a normal subgroup", that is, I'm not looking for a crossed out normal subgroup symbol, or a "not" symbol in front of a normal subgroup symbol. I'm looking for a standard subgroup symbol that doesn't reference "normalness" in any way.


title: Force caption to go above/below with biblatex

text: I have used the following to force captions above (tables) and below (figures) as per the answer to this question.               \documentclass{memoir}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[danish]{babel}     \usepackage{biblatex}     \let\newfloat\relax     \usepackage{floatrow}     \floatsetup[table]{capposition=top}     \floatsetup[figure]{capposition=bottom}          \begin{document}          \begin{figure}[h]     \rule{1cm}{1cm}     \caption{A figure}     \end{figure}          \begin{table}[h]     (tabular material)     \caption{A table}     \end{table}          \end{document}      Unfortunately this doesn't work with the `biblatex`. Is it possible to force all captions to be above/below with `biblatex`?


title: blurred shadows in combination with pdfx

text: When I try to use the tikzlibrary(shadows.blur) together with the package pdfx I run into an error. Is there another way to get a blurred shadow but also to use the package pdfx.               \documentclass{scrreprt}                      \usepackage{tikz}       %for additional graphics (e.g. shadow box)     \usetikzlibrary{shadows.blur}               \usepackage[a-1b]{pdfx}            \begin{document}               \begin{center}       \begin{tikzpicture}         \node[draw=none,shade,           blur shadow={shadow blur steps=5}         ] {\sffamily\bfseries\large A pretty box};            \end{tikzpicture}     \end{center}                \end{document}      The error is               ! pdfTeX error (setup): \pdfminorversion cannot be changed after data is written to the PDF file.     l.137 ...eam attr{/N 4}  file{sRGBIEC1966-2.1.icm}          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on t.log.


title: Aligned pgfplots in beamer frames

text: I would like to reproduce the design represented in the following picture with `Beamer` an `Pgfplots`. ![enter image description here](http://i.stack.imgur.com/QTDu1.png) Namely, I want the size of plotting area to be always the same size and have the same position whatever the axis label and graduations are and the text bellow it is. Here is my current attempt:               \documentclass{beamer}          \usepackage{pgfplots}     \usepackage{pgfplotstable}     \pgfplotsset{table/row sep=\\}     \begin{document}          \newlength{\imglarg}     \newlength{\imghaut}     \setlength{\imglarg}{0.9\textwidth}     \setlength{\imghaut}{0.6\textheight}          % ====     \begin{frame}{Frame 1}       \begin{figure}         \begin{tikzpicture}[trim axis left, trim axis right]           \pgfplotstableread{             1 4.3\\             2 4.2\\             3 3.1\\             4 2.5\\           }\tablea           \begin{axis}[%             /pgfplots/table/header=false,             width=\imglarg,             height=\imghaut,             axis on top]             \addplot table[x index=0, y index=1]{\tablea};           \end{axis}         \end{tikzpicture}       \end{figure}       \vskip0pt plus 1filll%       \begin{itemize}       \item You must defeat Sheng Long to stand a chance       \end{itemize}     \end{frame}          % ====     \begin{frame}{Frame 2}       \begin{figure}         \begin{tikzpicture}[trim axis left, trim axis right]           \pgfplotstableread{%             1000000 3500000000\\             2000000 3800000000\\             3000000 4000000000\\             4000000 3000000000\\           }\tableb           \begin{axis}[%             /pgfplots/table/header=false,             width=\imglarg,             height=\imghaut,             axis on top]             \addplot table[x index=0, y index=1]{\tableb};           \end{axis}         \end{tikzpicture}       \end{figure}       \vskip0pt plus 1filll%       \begin{itemize}       \item Xyzzy !       \item Nothing happens.       \end{itemize}     \end{frame}          \end{document}      It only works if there are no different _random graduations taking some space_ (for instance if both graph are plotted using \tableb). I ended here after substantial trial and error so i am far from sure that every piece of code there is useful.


title: Fancy part name in TOC

text: I was just trying to add some fancy part name in TOC using a code I got from a post in this site. Here is what I added.               \documentclass{book}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{kpfonts}     \usepackage{tikz}     \usepackage{titletoc}     %------------------------------------------     \contentsmargin{0cm}     %------------------------------------------     \titlecontents{part}[0pc]     {\addvspace{13pt}%     \begin{tikzpicture}%     \draw[help lines,step=.4cm,color=blue] (0,0) grid (2.4,1.2);%     \pgftext[left,x=.1cm,y=.6cm]{\Large\sc \partname};%     \fill[fill=white,draw=blue] (1.8,.6) circle (0.4cm);%     \pgftext[x=1.8cm,y=.6cm]{\protect\thepart};%     \end{tikzpicture}\\\color{blue}\large\sc\bfseries}%     {}     {}     {\;\titlerule\;\large\bfseries \thecontentspage}%     %------------------------------------------     \titlecontents{chapter}[0pc]     {\addvspace{30pt}%     \begin{tikzpicture}%     \draw[help lines,step=.4cm,color=red] (0,0) grid (3.2,1.2);%     \pgftext[left,x=.1cm,y=.6cm]{\Large\sc chapter};%     \fill[fill=white,draw=red] (2.7,.6) circle (0.35cm);%     \pgftext[x=2.7cm,y=.6cm]{\thecontentslabel};%     \end{tikzpicture}\\\color{red}\large\sc\bfseries}%     {}     {}     {\;\titlerule\;\large\bfseries \thecontentspage}%     %------------------------------------------     \titlecontents{section}[2.4pc]     {\addvspace{1pt}}     {\contentslabel[\thecontentslabel]{2.4pc}}     {}     {\hfill\small \thecontentspage}     %------------------------------------------     []     \titlecontents*{subsection}[4pc]     {\addvspace{-1pt}\small}     {}     {}     {\ --- \small\thecontentspage}     [ \textbullet\ ][]     %-------------------------     \begin{document}     \tableofcontents     \part{Part One}     \chapter{(title chapter 1)}     \section{(title section 1)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     \section{(title section 2)}     \subsection{(title sub-section 1)}     \subsection{(title sub-section 2)}     %--------------------------     \end{document}       Here is what I get: ![enter image description here](http://i.stack.imgur.com/zRh1k.png) My problem: The part number **I** is not coming inside the circle after PART instead it is coming below with the part name. How to get the part number inside the circle like in chapter? What else I have to add?


title: Circuitikz: Electrical diagram

text: Below is what I have so far               \documentclass[convert = false]{standalone}     \usepackage[american]{circuitikz}     \usepackage[utf8]{inputenx}%  http://ctan.org/pkg/inputenx     % Euler for math | Palatino for rm | Helvetica for ss | Courier for tt     \renewcommand{\rmdefault}{ppl}% rm     \linespread{1.05}% Palatino needs more leading     \usepackage[scaled]{helvet}% ss //  http://ctan.org/pkg/helvet     \usepackage{courier}% tt // http://ctan.org/pkg/courier     \usepackage{eulervm}  %  http://ctan.org/pkg/eulervm     % a better implementation of the euler package (not in gwTeX)     \normalfont%     \usepackage[T1]{fontenc}%  http://ctan.org/pkg/fontenc     \usepackage{textcomp}%  http://ctan.org/pkg/textcomp          \begin{document}     \begin{circuitikz}[scale = 2]       \draw                                    (1, 1.5)             to[short]                          (2, 1.5)             to[open, v^ = $y(t)$, o-o]         (2, 0)             to[short]                          (1, 0);       %       \draw                                    (-2, 0)             to[short]                          (1, 0)             to[C, l_ = $C$, *-*]               (1, 1.5)             to[L = $L$]                        (-1, 1.5)             to[R = $R$]                        (-2, 1.5);          \end{circuitikz}     \end{document}      Produces ![enter image description here](http://i.stack.imgur.com/rXl28.png) I can't figure out how to add the `C = 1<\farad>` as well as for `R` and `L`. Additionally, I don't know how to complete the circuit. Below you will see the circuit I am trying to create. ![enter image description here](http://i.stack.imgur.com/IOJne.png) * * * **Edit 1:** I have been able to complete the circuit diagram.   1. How do I switch the american voltage source `+` and `-`?   2. Also, how do I move `x(t)` to the left hand side?   3. ~~Can I move`L` and `R` so that they are above?~~ Apparently `L, l_` moves it above. I don't know why since to me l should be left and underscore should mean below. ![enter image description here](http://i.stack.imgur.com/2VHZf.png)               \documentclass[convert = false]{standalone}     \usepackage[american]{circuitikz}     \usepackage[utf8]{inputenx}%  http://ctan.org/pkg/inputenx     % Euler for math | Palatino for rm | Helvetica for ss | Courier for tt     \renewcommand{\rmdefault}{ppl}% rm     \linespread{1.05}% Palatino needs more leading     \usepackage[scaled]{helvet}% ss //  http://ctan.org/pkg/helvet     \usepackage{courier}% tt // http://ctan.org/pkg/courier     \usepackage{eulervm}  %  http://ctan.org/pkg/eulervm     % a better implementation of the euler package (not in gwTeX)     \normalfont%     \usepackage[T1]{fontenc}%  http://ctan.org/pkg/fontenc     \usepackage{textcomp}%  http://ctan.org/pkg/textcomp          \begin{document}     \begin{circuitikz}[scale = 2]       \draw                                           (1, 1.5)             to[short]                                 (2, 1.5)             to[open, v^ = $y(t)$, *-*]                (2, 0)             to[short]                                 (1, 0);       %       \draw                                           (-1.5, 0)             to[short]                                 (1, 0)             to[C, l_ = $C$]                           (1, 1.5)             to[L = $L$]                               (-.5, 1.5)             to[R = $R$]                               (-1.5, 1.5)             to[american voltage source, v^ = $x(t)$]  (-1.5, 0);     \end{circuitikz}     \end{document}      * * * **Edit 2:** So I added `\usepackage{siunitx}` but the below doesn't work   * `to[C, l_ = $C = \SI{1}{\farad}$]`   * `to[C, l_ = $C$= 1<\farad>]`


title: Environment in \NewEnviron style, with key-value parameters

text: I want to define an environment that read its content before processing (like `\newEnviron` from the package `environ`) but also that allows key-value parameters (like `\newkeyenvironment` from the package `keycommand` that I usually use). How should I do?


title: How to compute an histogram (plot bars) binning the values from a .csv using TeX?

text: I've a `.csv` with a column of acquired **measures**. I would like to make the histogram bins using TeX from the **measures distribution** so I have to create the bins first. I haven't found any reference to perform an automatic binning or to set manually the intervals to produce the bins. I would like to know how can I do that and if I can perform non-uniform bins histogram.               \documentclass[border=5mm]{standalone}     \usepackage{filecontents}     \usepackage{pgfplots, pgfplotstable}          \begin{filecontents}{data.csv}     dist     1     2     2.5     2     1     3.5     3     1     3     2     1     1     0.5     1     1.5     1     \end{filecontents}          \begin{document}     \begin{tikzpicture} \begin{axis}     \addplot[xbar] table [             col sep=comma,             x=dist         ] {data.csv};     \end{axis}     \end{tikzpicture}     \begin{tikzpicture}     \begin{axis}     \addplot [ybar interval] table [             col sep=comma,             y=dist         ] {data.csv};     \end{axis}     \end{tikzpicture}     \end{document}      I perform this usually in python (code below) this should be the output: ![enter image description here](http://i.stack.imgur.com/1fWEo.png)               import matplotlib.pyplot as plt     dist=[1, 2, 2.5, 2, 1, 3.5, 3, 1, 3, 2, 1, 1, 0.5, 1, 1.5, 1]     plt.hist(dist,7) #Compute the histogram of a set of data.


title: biblatex style verbose, beamer and color in block

text: I use `biblatex` with `citestyle=verbose` inside `beamer`. With this style, the name of the author is automatically colored, and also the title. That is a nice feature ... except if you cite your a work inside a title of a beamer block: you can't read anything, because it becomes, with for example the Darmstadt theme, blue on blue. See my minimal example following:               \documentclass{beamer}     \usepackage{fontspec}     \usetheme{Darmstadt}     \usepackage[citestyle=verbose]{biblatex}          \addbibresource{biblio.bib}     \begin{filecontents}{biblio.bib}     @book{Augustin,         Author={Augustin},         Title={La cité de Dieu}     }     \end{filecontents}     \begin{document}     \begin{frame}     \begin{block}{\cite{Augustin}}          blabla     \end{block}     \end{frame}     \end{document}      Any idea to disable this feature of coloring ?


title: TikZ: Text along path

text: There is a node-to-node path and I want a text to be aligned to it. Also, [xshift=5mm] and [xshift=-5mm], which is supposed to ensure that the path ends do not touch the node boundary, doesn't seem to have any effect. I read the p.338-340 of the Manual.               %     %     %     \documentclass{standalone}          \usepackage{tikz,pgf}          \usetikzlibrary{decorations.markings,%         snakes,fit,scopes,arrows,calc,shapes.misc,%         shapes.arrows,chains,matrix,positioning,decorations.pathmorphing,shapes,backgrounds,%         decorations.text}          \begin{document}          \tikzset{         fuzzy/.style = {decorate, decoration = {random steps, segment length = 0.5mm, amplitude = 0.15pt}},         ns/.style = {             rectangle,             minimum size = 6mm,              rounded corners = 3mm,             very thick,             draw,             font = \ttfamily,             fuzzy         }     }          \newcommand{\bbrect}[3]{\node[rectangle,fuzzy,draw,fit=(B-#1-1.north west) (B-#2-1.south east), inner sep = 0pt] (block#3) {}}     \newcommand{\cbl}[2]{\node[rectangle,fuzzy,draw,fit=(C-#1-1.north west) (C-#1-1.south east), inner sep = 0pt] (cblock#2) {}}          \begin{tikzpicture} [             >=latex, thick,              /pgf/every decoration/.style = {/tikz/sharp corners}, minimum size = 6mm         ]         \ttfamily         \begin{scope}                 \matrix (B) [matrix of nodes, ampersand replacement = \&] {                     \hline                     {B}\\                     \hline                     {12}\\                     {7}\\                         {2}\\                     {2}\\                     {2}\\                     {2}\\                      {2}\\                      {2}\\                      {7}\\                      {7}\\                      {2}\\                      {2}\\                      {2}\\                      {8}\\                      {4}\\                      {4}\\                      {4}\\                      {4}\\                      {4}\\                      {4}\\                      {9}\\                      {11}\\                      {1}\\                      {1}\\                      {1}\\                      {1}\\                      {1}\\                      {1}\\                      {1}\\                      {1}\\                      {1}\\                      {5}\\                      {5}\\                      {5}\\                      {6}\\                      {6}\\                      {6}\\                      {10}\\                      {3}\\                      {3}\\                      {3}\\                      {0}\\                      {0}\\                      {0}\\                      {0}\\                      {0}\\                      {0}\\                      {0}\\                      {0}\\                      {0}\\                 };                 \bbrect{2}{2}{1};                 \bbrect{3}{3}{2};                 \bbrect{4}{9}{3};                 \bbrect{10}{11}{4};                 \bbrect{12}{14}{5};                 \bbrect{15}{15}{6};                 \bbrect{16}{21}{7};                 \bbrect{22}{22}{8};                 \bbrect{23}{23}{9};                 \bbrect{24}{32}{10};                 \bbrect{33}{35}{11};                 \bbrect{36}{38}{12};                 \bbrect{39}{39}{13};                 \bbrect{40}{42}{14};                 \bbrect{43}{51}{15};             \end{scope}                  \begin{scope}[xshift = 5cm]                 \matrix (C) at ([xshift = 5cm]B-1-1.north east) [anchor=C-1-1.north west, matrix of nodes, ampersand replacement = \&] {                     \hline                     {C}\\                     \hline                     {12}\\                     {7}\\                     {2}\\                     {7}\\                     {2}\\                     {8}\\                     {4}\\                     {9}\\                     {11}\\                     {1}\\                     {5}\\                     {6}\\                     {10}\\                     {3}\\                            {0}\\                 };                   \cbl{2}{1};                 \cbl{3}{2};                 \cbl{4}{3};                 \cbl{5}{4};                 \cbl{6}{5};                 \cbl{7}{6};                 \cbl{8}{7};                 \cbl{9}{8};                 \cbl{10}{9};                 \cbl{11}{10};                 \cbl{12}{11};                 \cbl{13}{12};                 \cbl{14}{13};                 \cbl{15}{14};                 \cbl{16}{15};         \end{scope}              \draw[postaction={decoration={text along path,text = {merging a contiguous run},text align=fit to path},decorate}]             ([xshift=5mm]block7) -- ([xshift=-5mm]$(cblock7.north)!.5!(cblock7.south)$);              \begin{pgfonlayer}{background}             \foreach \i in {1,...,15} {                 \path[draw,dotted] (block\i.north east) -- (cblock\i.north west);                 \path[draw,dotted] (block\i.south east) -- (cblock\i.south west);             }         \end{pgfonlayer}          \end{tikzpicture}          \end{document}


title: How to manage chapter title position with a background picture?

text: I wrote the following code in order to design a chapter title but there is two things I did not succeed to do.               \documentclass{book}          \title{Titre de la thèse}     \author{moi}     \date{\today}          \usepackage{lipsum}          \usepackage[top = 2cm, left = 2cm, right = 2cm, bottom = 2cm, head = 14pt, headsep = .5cm]{geometry}     \usepackage{tikz}     \def\docColor{blue}          \usepackage{titlesec}     \titleformat{\chapter}       {\color{white}\sffamily\Huge\bfseries}       {}{0pt}       {\begin{tikzpicture}[overlay, remember picture]         \fill[\docColor] (current page.north west) -- (current page.north east)              -- ++ (0, -6cm) -- ++ (-\paperwidth, -2cm)             node[pos=.5, fill=black!60, text=white, minimum width=6cm,                     inner sep=3mm]             {\sffamily\textsc\chaptername~\thechapter}             -- cycle;        \end{tikzpicture}       }     \titlespacing*{\chapter}{0pt}{0cm}{4cm}          \begin{document}          \maketitle          \chapter{Un premier chapitre, Un premier chapitre, Un premier chapitre}          \lipsum[1-5]          \chapter{Un second chapitre, Un second chapitre, Un second chapitre}          \lipsum[1-5]          \end{document}      ![enter image description here](http://i.stack.imgur.com/WMflj.png) 1) I would like to remove the indentation. As you can see, if the title span over two lines they are not left justified. 2) I would like to shift on the right the title in order to put a picture on the left side. I would like to do something like               \parbox[c]{.2\textwidth}{a picture}     \parbox[c]{.8\textwidth}{Chapter title}


title: Footnote in sub-section title

text: Trying to put a footnote in subsection title:               \subsection{Effect of Lateral Confinement on SW Band Structure\footnote{Parts of this sub--section are based on \citet{Venkat2013}}}      produces the following error:               Argument of \@sect has an extra } ...section are based on \citet{Venkat2013}}}      I am using:                \documentclass[paper=A4, fontsize=12, toc=listof, toc=index, toc=bib]{scrreprt}      Please advise.