title: How to build a trail of nodes from a path in tikz-pgf?

text: What I want: ![Path to nodes with intersections](http://i.stack.imgur.com/NggeL.png) where the yellow line is the path to be transformed. The points inside the yelow line are the nodes after processing. The only way I found to do this is the intersection between a path and itself. But it is an expensive solution in terms of processing and time. The code to generate the above image is here:               \documentclass[tikz]{standalone}          \usetikzlibrary{intersections}          \begin{document}         \begin{tikzpicture}                   \clip (-2.1, -1.1) rectangle (2.1, 1.1);             \draw [yellow, ultra thick, name path = curve 1] (-2,-1) .. controls (8,-1) and (-8,1) .. (2,1);                  \path [name intersections = {%                 of = curve 1 and curve 1                 , name = i                 , total=\t                 , sort by = curve 1             }] node {\xdef\totalone{\t}};                  \foreach \k in {1, ..., \totalone}             {                 \node [                     circle                     , fill                     , inner sep = 0.25pt                     , minimum size = 0pt                 ] at (i-\k) {};             }              \end{tikzpicture}     \end{document}      Someone suggests another way of doing this?


title: Is there a standard symbol for conditional independence?

text: I have found this symbol defined as:                   \def\ci{\perp\!\!\!\perp}      on the wikipedia page for Conditional Independence. There's this from the Comprehensive LaTex Symbol List page 106:               Donald Arseneau posted the following \mathpalette-based definition of a probabilistic-independence symbol ⊥⊥ to comp.text.tex in June 2000:              \newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}         \def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}          The \independent macro uses \mathpalette to pass the \independenT helper      macro both the current math style and the \perp symbol. \independenT      typesets \perp in the current math style, moves two math units to the      right, and finally typesets a second—overlapping—copy of \perp, again      in the current math style. \rlap, which enables text overlap, is described      later on this page.      Frankly, I like the first version better, even though it doesn't typeset properly on my machine. Are there any better alternatives?


title: How to move bond position with chemfig package?

text: I'm using this code to generate chemical structure with `chemfig` package:               \documentclass[12pt,a4paper]{standalone}     \usepackage{chemfig}     \begin{document}     \setatomsep{2.5em}     \chemfig{B(-[:35]N*5(=(-*6(=-=(-OH)-(-NO_2)=-))-=(-Ph)-(=N?[o])-))(-[:145]N*5(-?[o]=(-Ph)-=(-*6(=-=(-O-[7]-[1](=[:65]O)(-[:15]NH(-{(CH_2CH_2O)_nH})))-=-))-))(<[:225]F)(<:[:-45]F)}     \end{document}      ![enter image description here](http://i.stack.imgur.com/C64zp.jpg) I am not happy how `chemfig` makes connection, which is crossed with red. I need to have bond going from `N`to first `C` atom, not to the second one. How the code should be changed to avoid this problem.


title: Continuous text around sidewaysfigure-command

text: I am using the rotating-package to rotate large figures including their captions. The fact that the sidewaysfigure-command shows the figure on a single page is perfectly okay, because the figures are so large that they fill a whole page anyway. Yet I would like to have the text continuously around the figure. I have the following example in my mind:               \documentclass[a4paper,12pt,twoside]{book}     \usepackage{rotating}     \begin{document}     First paragraph of text which does not fill  a whole page and refers to the test figure. \\          \begin{sidewaysfigure}[h]     \centering     \caption{Test}     \end{sidewaysfigure}          Here a second paragraph of text begins.     \end{document}      The problem is that the second paragraph is shown on the third page. Again, the fact that the first paragraph and the figure are shown on the first and second page, respectively, is perfectly fine. But how can I bring the second paragraph on the first page without shifting the whole sidewaysfigure-command behind the second paragraph? The point is that the first paragraph refers to the figure and the second paragraph might be so long that it spans over several pages. Thus, the second paragraph should start on page 1 after the first paragraph, then the figure should be shown on page 2, and finally the second paragraph should continue on page 3. Could someone help me with that? Thanks a lot in advance. Best, Tiljim


title: Placing table/figure inside paragraph

text: In my thesis, I am struggling in placing the figures and tables. The options [H] or [!htb] are not in a position to rescue as for few sections in the thesis there are more figures and tables in comparison to amount of text in that section. Now as I need to place the figures and texts in the particular section only where they belong, there are lots of white space here and there in many of the pages. I tried the package `wrapfig` but there I get my figures wrapped on left or right side also. I want the wrapping in the top and bottom only, or in other words, to place the figures and tables inside a paragraph where no texts should be there on left and right side. I expect this to be easy as the problem is very common ( I may be wrong). How can I achieve this? The heights of both the tables and figures are half, 3/4th and full page [A4]. Thanks.


title: Psplot position on page

text: How can i move \psplot on custom position without pstpicture?               \psset{yunit=28pt,xunit=28pt}         \psplot[algebraic=true,linewidth=1pt,plotpoints=500]{0}{4.7}{(-x/5)*cos(4*x)}         \psplot[linestyle=dashed,linewidth=1pt]{0}{4.7}{x 5 div}         \psplot[linewidth=1pt,linestyle=dashed]{0}{4.7}{x -5 div}


title: \boxed{}, TikZ and colored equation background

text: I wonder if someone could provide me with a simple MWE for using TikZ together with `\boxed` to produce a colored equation background. If possible with rounded corners. I am using `\boxed{}` inside the `split` environment from `amsmath`.


title: How can I draw an horizontal line of specific width in a tabular environment?

text: I'm trying to make a table with some numbers and a total result, as follows:               Age        Female Male Total     ----------------------------     Under 10        5    8    13     10-30          57   61   118     30-60           5    1     6     Over 60         3    0     3                   ---  ---   ---     TOTAL          70   70   140     ----------------------------      These three `---` lines represent a kind of underline spanning a half of a row. How can I draw it or specify the length of a tabular line?


title: Typesetting meeting minutes in MultiMarkDown and Latex (with minutes package)

text: I'm trying to create a workflow where I can typeset a meeting minute using MultiMarkDown syntax and then have it converted in latex and processed to PDF. `Minutes` is a great package to format these type of document, but it uses `\topic` `\subtopic` and `\subsubtopic` in place of `\section` `\subsection` and `\subsubsection`. While it make quite a lot of sense in a meeting minute context, it is a problem in my workflow as the MultiMarkDown processor converts headers in `\part`, `\chapter`, `\section` etc. Can somebody give me a hint on how to redefine the `\section` command in `Minutes` in order to act as `\topic`? As far as I can see the command definition in the package is:               %    \begin{macrocode}     \newcommand*{\topic}[2][\minxx]{     \min@checktitle     %    \end{macrocode}     %    \begin{macrocode}     \immediate\gdef\thesection{\min@toptext\min@thesection}     \ifx\minxx#1\min@newcoltopic{\section}{#2}{#2}%     \else\min@newcoltopic{\section}{#1}{#2}\fi%     }      Unfortunately it looks like the `\topic` command definition already rely on `\section`. Any help will be much much appreciated.


title: Commands that may take a variable number of arguments

text: I have a situation where I want to define a command that takes a variable number of arguments, where the number of arguments is known programmatically via a `\count`, and process the parameters in some way (say as if they are a list). As an example, say I'd like to output the parameters as a comma-separated list.               \newcommand{\makecsv}[N]{#1, #2, ..., #N}      The code that I've come up with to do this kind of operation (in a generic-ish way) essentially takes a command, `\csv` and expands it recursively N times. `\csv` needs to know how to continue the recursion, and has some state that I'd like to thread through the recursion (rather than using `\global`).               \documentclass{report}     \usepackage{etoolbox}          \makeatletter     \newcommand{\ifzero}[3]{%       % #1: count       % #2: state for #3       % #3: macro to expand to       % - should take at least 2 parameters       % - ##1: count threaded through       % - ##2: macro state threaded through       \ifnum\c > 0         \def\tmp@f##1##2##3{##1{##2}{##3}}%         \advance#1 -1%       \else         \def\tmp@f##1##2##3{)}% note closeparen here (could be param)       \fi       \tmp@f{#3}{#1}{#2}%     }     \makeatother          \newcommand{\csv}[3]{       % #1: count       % #2: separator state       % #3: string to concat       %        #2#3\ifzero{#1}{, }{\csv}%     }          \newcommand{\makecsv}[1]{%       \ifzero{#1}{}{\csv}%     }          \makeatletter     \newcommand{\decl}[3]{%       % #1: decl id       % #2: decl symbol       % #3: # params       \csgdef{decl@#1}{#2}%       \global\expandafter\newcount\csname decl@#1@nparams\endcsname%       \csuse{decl@#1@nparams} #3\relax%     }          \newcommand{\usedecl}[1]{%       \newcount\c       \c \the\csuse{decl@#1@nparams}       \csuse{decl@#1}(\makecsv{\c}%     }     \makeatother          % declare some interface routines     \decl{foo}{FOO}{3}     \decl{bar}{BAR}{4}          \begin{document}     \usedecl{foo}{p1}{p2}{p3}\par     \usedecl{bar}{p1}{p2}{p3}{p4}\par     \end{document}      Is this a reasonable thing to do in 2e, or is there some sort of standard approach to this that is normally used? **Edit 1** It seems like my original MWE wasn't adequate to describe why someone might want this. I've updated the MWE with a use case. `\decl` allows authors to declaratively define a C-style function, and `\usedecl` allows the author to generate a use of the function, with its parameters bound to specific arguments. This is similar enough to what I'm doing that it should help motivate the example.


title: How can I change the thickness of \hrulefill

text: I am writing a worksheet for a math ed class. I am asking questions and would like the answer lines to start as soon as the question ends, and not the next line. This is partly because I want to start the answer (then students finish it) as well as there is limited space.               \documentclass{exam}     \begin{document}       \begin{questions}         \question List the names of 10 people in your class? Ben, Donna, \hrulefill\fillwithlines{0.5in}       \end{questions}     \end{document}      The problem is that the two sets of lines are different thicknesses. Any ideas?


title: How can I have a brace on the left and the top of a matrix without overlapping?

text: Consider the following code:               \documentclass{article}          \usepackage{amsmath}     \usepackage{rotating}          \begin{document}          \begin{align*}       \rotatebox[origin=c]{90}{$n$ parts}\left\{\overbrace{\begin{matrix}         \bullet & \bullet & \bullet & \bullet & \bullet & \cdots & \bullet\\         \bullet & \bullet & \bullet & \cdots & \bullet\\         \bullet & \bullet & \bullet & \cdots & \bullet\\         \bullet & \bullet & \bullet & \cdots & \bullet\\         \bullet & \cdots & \bullet\\         \bullet & \cdots & \bullet\\       \end{matrix}}^{\text{Even number}}\right.     \end{align*}          \begin{align*}       \rotatebox[origin=c]{90}{$n$ parts}\overbrace{\left\{\begin{matrix}         \bullet & \bullet & \bullet & \bullet & \bullet & \cdots & \bullet\\         \bullet & \bullet & \bullet & \cdots & \bullet\\         \bullet & \bullet & \bullet & \cdots & \bullet\\         \bullet & \bullet & \bullet & \cdots & \bullet\\         \bullet & \cdots & \bullet\\         \bullet & \cdots & \bullet\\       \end{matrix}\right.}^{\text{Even number}}     \end{align*}          \end{document}      This produces the following output: ![enter image description here](http://i.stack.imgur.com/WQsiN.png) In both cases, one of the braces overlaps the other. I'd like to be able to have each brace start and end exactly at one of the dots in the diagram. How can I go about accomplishing this?


title: How to prevent overstretching of brackets?

text: With a tall equation like the following, using simple `(` and `)` gives brackets that are too small, and using `\left(` and `\right)` gives ones that are ridiculously big: ![enter image description here](http://i.stack.imgur.com/honv3.gif) `a+b\left(\underbrace{\sum_{i=1}^{n}f_i(x)}_{h(x)} +g(x)\right )` I need the brackets to stretch in a way that takes into account my equation may not be distributed evenly across vertical space - e.g. the above case is very bottom-heavy. How to achieve this?


title: Relationship between MathML and TeX

text: What is the relationship, if any, between Tex and MathML? I am interested in representing mathematical information generally, but is TeX going to be a legacy format going forward? Is there any attempt to automatically transform one into the other? Is MathML obviously going to replace TeX in the near future? Essentially I am in a position where I need a math markup language, I am writing a math editor, and I am free to choose either (or both, but that represents twice the work AFAIK) as suits me. Is TeX in theory any more powerful than MathML? I mean more complete in terms of underlying markup capabilities, of the class of things it can represent? Meta this - I understand that this question might give offense only because whenever there are two different technologies that have the same aim they are sometimes thought of as "rivals" or "competitors" and have their respective "camps". Please know I am a total newbie in this area and in no way am I making a judgement about the worthiness of either technology. I am really just trying to understand how practitioners understand their own world.


title: Declare the point for incomming arrows on nodes

text: is there a way to tell the a node, where the arrow shall arrive? At this example, the Arrow from Node B to A should arrive exactly in the middle of the "D" from "Dies". It should start on top-center of B's text. Hope this is understandable.               \documentclass[11pt, halfparskip,toc=flat,numbers=noendperiod]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage{ngerman} % deutsche Silbentrennung, Deutsche Ausdrücke          \usepackage[T1]{fontenc}     \usepackage{lmodern,textcomp}               \usepackage{pstricks-add}          \begin{document}     \begin{center}     \psset{xunit=1cm,yunit=1cm,runit=1cm}     \begin{pspicture}(10,5)         %\psgrid(0,0)(0,0)(10,5)                   \rput[t](5, 5){             \rnode{A}{                 \parbox[c]{3cm}{                     \centering                     Dies ist Node A                 }             }         }              \rput[t](0, 2.5){             \rnode{B}{                 \parbox[c]{3.5cm}{                     \centering                     Dies ist der Text\\                     zu Node B                 }             }         }              \rput[t](10,2.5){             \rnode{C}{                 \parbox[c]{3cm}{                     Mein Name ist C, Node C                 }             }         }              \rput[t](5,0){             \rnode{D}{                 \parbox[c]{3cm}{                     Ich bin Node D\\                     Ich stehe ganz unten                 }             }         }              \psset{linewidth=.05cm}         \psset{nodesep=0.1cm}         \psset{arcangle=45}              \ncarc{->}{B}{A}         \ncarc{->}{A}{C}         \ncarc{->}{C}{D}         \ncarc{->}{D}{B}          \end{pspicture}          \end{center}          \end{document}


title: Line spacing in supertabular multi lined table cells

text: I have created a table using the `supertabular` package with table cells containing from one to four lines of text. In my document I have defined a linespread of 1.5. I also have defined following table configurations.               \renewcommand{\arraystretch}{1}     \setlength{\tabcolsep}{5pt}      The problem I have is, that the spaces between the table cells are 1, as I want. But the spaces between the lines of text stay 1.5 caused by the global linespread setting. Here is an example               \documentclass[a4paper,headsepline,12pt,toc=index,toc=bibliography,ngerman]{scrreprt}          \usepackage{supertabular}          \linespread {1.5}          \renewcommand{\arraystretch}{1}     \setlength{\tabcolsep}{5pt}          \begin{document}          \begin{table}[htbp]     \begin{supertabular}{|p{2.6in}|p{1.5in}|p{1.5in}|} \hline      A & B & C \\ \hline      very long text will be wrapped in the cell & another long text will be wrapped in the table cell & short text \\ \hline      \end{supertabular}     \end{table}               \end{document}      How can I define a line spacing of 1 between two lines of text?


title: Ligatures disabling

text: I want to disable ligatures when I am typing letters, however, I need '--' to be joined to a long dash. Is it possible to make this? Now I am avoiding it like this               \usepackage{microtype}     \DisableLigatures{encoding = *, family = * }


title: Automatically choosing preset color schemes in pgfplots based on number of entries

text: This is really more of a question to satisfy personal curiosity than to solve a real problem. When choosing the colour schemes for my plots, I try to select colours that will work well with the amount of items involved in the plot. This means using sets of colours that are above all aesthetically pleasing, but also that contrast well, etc. (eg. schemes created with a website like this). However, I was wondering if it would be possible to define a set of 2,3,4,...,n colours that work well, and have pgfplots (or some other package?) select automatically from the one that matches the amount of entries. I looked around for similar questions, but I didn't seem to find anything. The colour sets could be defined as cycle lists, but it's the automatic selection that I'm wondering about. Can this be done? Any ideas?


title: How to perform arithmetic within siunitx?

text: I often put comments in my documents to remind me where a number comes from:               \SI{39.68}{\milli\metre} deep % 0.31 * 128      I'd like LaTeX to calculate the product by itself. I wrote a function to do that with `fp`, and it works (although I'd like a shorter one). But it doesn't work within `\SI`:               \newcommand{\mult}[2]{%         \FPmul{\tempSum}{#1}{#2}%         \FPround\roundedSum\tempSum2%         \roundedSum%     }          \mult{0.31}{128} mm deep % works          \SI{\mult{0.31}{128}}{\milli\metre} deep % does not work      How to solve this?               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! siunitx error: "invalid-number"     !      ! Invalid numerical input '\edef {\FP@mul \tempSum 0.31..\relax 128..\relax     ! }\edef {\FP@round \roundedSum ..\relax }{2}'.     !      ! See the siunitx documentation for further information.     !      ! For immediate help type H <return>.     !...............................................


title: Where is the pattern list gallery for pgfplots?

text: Where is the list, or gallery of the patterns available for pgfplots?


title: How to avoid specifying the size of included graphic when the file has no extension?

text: I'm rendering the following code with xelatex:               \documentclass{article}     \usepackage[debugshow]{graphicx}     \begin{document}     %% This gives ! LaTeX Error: Cannot determine size of graphic in lowres (no size specifed).     \includegraphics[type=png]{lowres}     %% This works fine without specified size.     \includegraphics{highres.png}     \end{document}      I've got the files 'lowres' and 'highres.png' in my current directory:               $ file lowres      lowres: PNG image data, 348 x 350, 8-bit colormap, non-interlaced     $ file highres.png      highres.png: PNG image data, 348 x 350, 8-bit colormap, non-interlaced      The obvious difference between these files is the lack of extension for 'lowres', so that's why I specify the type in the 'includegraphics'. The problem is, it looks like it is mandatory to specify the size when the file hasn't got any extension (although we give the type as a parameter). This behaviour doesn't make sense to me, is there a way to get around it?


title: How to leave out chapter numbers in section numbering

text: So, I'm writing my thesis using the `book` class. I have the following:               [Chapter I The fundamentals]      using               \chapter{The fundamentals}      together with               \renewcommand{\thechapter}{\Roman{chapter}}      Now, when I define the first section using               \section{LIBOR interest rates}      I get               [I.1 LIBOR interest rates]      What I want is for the chapter number to be left out of section numbering. What I want is               [1 LIBOR interest rates]      Any ideas on how to achieve this?


title: Is it possible to remove chapter number from align environment?

text: Basically I have written a proof using the `align` environment in a new `.tex` file and the numbers in the proof came like this (how I want them): > Line1 (1) > > Line2 (2) > > Line3 (3) Now I've pasted that proof in my book format `.tex` where I have chapters and the numbers turned to: > Line1 (5.1) > > Line2 (5.2) > > Line3 (5.3) Where 5 is the chapter number. Can I remove the chapter number and leave just the numbers without doing anything to the remaining of the `.tex` file? Sorry if the question is a duplicate one or not well explained, but I have no idea on how to explain better. EDIT: Solved, thanks to Kan who provided the following solution:               \renewcommand{\theequation}{\arabic{equation}}


title: Memoir, section numbers without the chapter number

text: > **Possible Duplicate:**   >  How to leave out chapter numbers in section numbering I'm setting a book with `memoir`. For sections (and below) I get the chapter number, plus the section (or sub-. etc.) number, thus:               1.1  My section      Is there a way to leave out the chapter number (both in the text and TOC), so as to have this?               1.  My section


title: How to remove the chapter number from section number?

text: I use Roman for Chapter numbers, and I don't want sections to be numbered as VIII.2 (while I still want sections to be numbered within chapters). How do I do that? i.e. instead of `VIII.2` sections should be numbered as `2`. EDIT: I saw the other question that people mark this one as a duplicate to. I tried `\renewcommand*\thesection{\arabic{section}}` and `\renewcommand\thesection{\arabic{section}}`, but none of them worked. That's why I asked this question. 2nd Edit: Sorry, now it is solved. I had `\numberwithin{section}{chapter}` after that. After removing it everything is fine.


title: setting the 'filename' of a file embedded in a PDF using the attachfile package

text: I'm using the attachfile LaTeX package (in PDFLaTeX) to embed files in a PDF and I've run into a difficulty regarding what I suspect is the 'filename' of the embedded file. I can attach/embed files in the following manner:               \textattachfile[author=Zapp Brannigan, color=0 0 0]{my_directory/my_file.dat}{\detokenize{my_file.dat}}      The file seems to be embedded successfully in the resulting PDF and is accessible, but the file name suggested by the Evince PDF viewer when selecting to "Save Attachment As..." on the link for the attached file is the following: `my_directory/my_file.dat` So, you can see that it is including the path of the original file in this 'filename'. Obviously, there are difficulties when one tries to save the attached file under this suggested filename. How might I go about changing this suggested filename to something such as my_file.dat? I've experimented and I've consulted documentation on the attachfile package and have not been able to come up with an answer. Just as a quick note: I am disinclined to use a package other than attachfile because, in reality, my code is more complicated than that shown; I'm including custom icons for various file types, as permitted by the attachfile package. However, I'll keep an open mind. Thank you very much for any thoughts you may have on the matter.


title: Creative Commons Licence

text: I'd like to insert a CC license on a manuscript (a book or report). I've seen the page for downloading the CC icons, and also some questions asked in the forum CC logo and Generate CC information. However, I do not get how to create the actual thing! **Q:** Can you please provide an example of a license info page ( _MWE_ )? That would be really helpful!


title: How to map unicode characters to math symbols?

text: I have documentation with some mathematics, that I want to convert via LaTeX, but I'd also like to keep it as much readable in source as possible (as it's more for me than anybody else). Since I can write many mathematical symbols directly with digraphs in vim and they show correctly in fonts I use, I would like to use them instead of the TeX commands. There is a package `unicode- math` that is supposed to do it, but it would need lualatex and does not work anyway (bug report). Now I am really using just a handful of symbols. Is it possible, and if it is, how, to map the characters I want to use manually? I have looked at the `inputenc` documentation, but couldn't make much sense of it and didn't notice relevant examples. Or, alternatively, can I workaround the bug somehow?


title: Use red!50!blue with \definecolor

text: > **Possible Duplicate:**   >  Defining a Color using another How can one define a new color using the mix of other colors like `red!50!blue`. I can us this as an arguement of `\color` but not with `\defincolor` …               \documentclass{article}          \usepackage{xcolor}          \definecolor{mix}{named}{red!50!blue}          \begin{document}         \color{red!50!blue} works         \color{mix} doesn't work     \end{document}      I guess it’s a problem with the pseudo-modell `named` since `red!50!blue` is not a single color name. But is there a color-modell accepting mixed colors to define a new one?


title: \line(1,0){5cm} gives error

text: I am trying to create a signature line, like this:               \begin{flushright}     \line(1,0){5cm}          Dženan Zukić     \end{flushright}      However, latex gives me the following error messages for the second line:               pdflatex> ! Missing number, treated as zero.     pdflatex> ! Illegal unit of measure (pt inserted).      The PDF look just like I expect (a short horizontal line for my signature). Do you have some suggestion about how to get rid of the compiler error message?


title: kTikZ and extra packages

text: Is there any way of loading extra libraries within KtikZ with the `\usepackage{}` command, like in other LaTeX documents? I could not find any documentation. And, of course, a MWE in this case is not possible.


title: Referencing with bibDesk in LYX

text: I was trying to insert a bibliography which I created in BibDesk. However, when I insert the bibliography(.bib) in Lyx from 'Insert', and compile it the reference list is empty. Does someone know what's going wrong please?


title: making the text to align with the second level bullet above

text: \subsection{Previous Studies}     \frame[label=exampleframe]{     \frametitle{Previous Studies}          \begin{itemize}     \item There are many studies There are many studies There are many studies There are many studies There are many studies There are many studies     \addtolength{\itemindent}{1cm} \item  There are many studies There are many studies There are many studies There are many studies There are many studies     \item There are many studies There are many studies There are many studies There are many studies There are many studies     \item There are many studies There are many studies There are many studies     \item stigma effects (Lockwood 1991, Omori 1997, Biewen and Steffes 2009)     \end{itemize}     }        This is my code and it shows like this: ![enter image description here][2] From the 2nd-5th bullet I want them to be indented more, but I do not not want the following text to be sticking outside the bullet like this. For the first level bullet, the text is "automatically"(?) neatly aligned with the bullet above. Could someone tell me how to do the same for the rest of the bullets? Thank you! ![enter image description here](http://i.stack.imgur.com/6sfWu.jpg)


title: Changing label name for algorithm

text: I have this algorithm:               \begin{algorithm}     \captionsetup[algorithm]{name=MegaAlgorithm}          \DontPrintSemicolon     \KwData{$G=(X,U)$ such that $G^{tc}$ is an order.}     \KwResult{$G’=(X,V)$ with $V\subseteq U$ such that $G’^{tc}$ is an     interval order.}          \caption{\textsc{Fast}SLAM\label{IR}}     \end{algorithm}      Using these packages:               \usepackage{caption}     \usepackage[ruled,vlined]{algorithm2e}      But the label name of my algorihm is still 'Algorithm 1: FastSLAM' instead of 'MegaAlgorithm 1: FastSLAM'. How to do that?


title: Floating object inside another floating object in ConTeXt

text: I need page where is text column with pictures on the left side. Inside the text column I need on the right side floating letter. Here is code:               \starttext         \startfiguretext[left]{none}%             {\externalfigure[ http://farm6.static.flickr.com/5260/5543764878_c5b27b5aed_s.jpg]                 [width=26.5mm,height=26.5mm]}%             \framed[frame=off,width=96mm,align=flushleft]{%                 \placefigure[right,none,fit]{none}{%                     \framed[frame=off,background=letteroverlay,height=1cm]{ A}                 }%             {\bfb Bla bla bla}%                  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc lobortis             accumsan sem vitae molestie. Mauris tincidunt elementum mi, semper aliquet             sapien convallis sed.%             }%         \stopfiguretext%     \stoptext      Problem is, that if I use the framed for letter "A" picture disapears. How to have floated framed box inside another frame? I cannot use margin, because this should be inside two columns. Final document should look like this picture: ![How document should look](http://i.stack.imgur.com/UJC3b.png)


title: Floating figures and tikzposter

text: I'm trying to use the class `tikzposter` to write a scientific poster. I need to link the figures to my text, therefore I need to use `\caption` and `\label` commands. It seems impossible to use floating figures inside blocks (maybe they are also floating objects?). It is possible to avoid this problem (still use the `caption` command, without using a floating figure)? Thank you very much for any help. PS: This is the code that reproduce my problem.               \documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm,          blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}           \title{Title}      \author{Name}      \institute{University}          \usetheme{Default} % Default, Basic, Rays, Simple, Envelope, Wave, Board, Autumn, Desert     \usecolorstyle[colorPalette=BrownBlueOrange]{Germany}          \usepackage[version=3]{mhchem}          \usepackage{graphicx}          \begin{document}          \maketitle          \begin{columns}         \column{.5}         \block[roundedcorners=40]{Fist block}{         Some text: bla, bla, bla.         \begin{figure}         \includegraphics{MyImage.pdf}         \caption{}\label{}         \end{figure}         }           \end{columns}           \end{document}


title: Colon after appendix number

text: How do I get a ":" to show up after Appendix in my ToC. Right now I have > **APPENDIX A. Classification experiments** but I want: > **APPENDIX A: Classification experiments** In the preamble I am using:               \usepackage[title,titletoc]{appendix}     \renewcommand{\appendixname}{APPENDIX}       At the appendix I am using:               \renewcommand{\thechapter}{\Alph{chapter}}     \titleformat{\chapter}[display]{\normalfont \centering}{APPENDIX \thechapter}{11 pt}{}          \begin{appendices}          \chapter{Details of Classification Experiments}          \end{appendices}      Everything else with the appendices is formatted the way I want. Here's a MWE:               \documentclass[11pt, letterpaper]{thesis}          \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0pt}     \fancyhf{}          \renewcommand{\thechapter}{\Roman{chapter}}     \renewcommand{\thesection}{\arabic{section}}          \usepackage[title,titletoc]{appendix}     \renewcommand{\appendixname}{APPENDIX}          \usepackage{etoolbox}          \usepackage{tocloft}     \makeatletter     \renewcommand{\numberline}[1]{%        \@cftbsnum #1\@cftasnum~\@cftasnumb%     }     \makeatother     \addtocontents{toc}{\hfill\ {Page} \par}          \usepackage{titlesec}     \assignpagestyle{\chapter}{fancy}     \titleformat{\chapter}[display]{\normalfont \centering}{CHAPTER \chaptertitlename\ \thechapter}{11 pt}{}     \titleformat{\section}[display]{\normalfont \centering}{}{11 pt}{}               \begin{document}          \addcontentsline{toc}{part}{CONTENTS}          \renewcommand{\tocloftpagestyle}[1]{\def\@cftpagestyle{\thispagestyle{#1}}}     \tocloftpagestyle{empty}     \renewcommand*\contentsname{\centerline{CONTENTS}}     \renewcommand{\cfttoctitlefont}{\normalfont}          \tableofcontents     \newpage          \part*{CHAPTERS}     \addcontentsline{toc}{part}{CHAPTERS}          \chapter{Introduction}     \thispagestyle{fancy}          \renewcommand{\thechapter}{\Alph{chapter}}     \titleformat{\chapter}[display]{\normalfont \centering}{APPENDIX \thechapter}{11 pt}{}          \begin{appendices}          \chapter{Details of Classification Experiments}     \thispagestyle{fancy}          \end{appendices}          \end{document}


title: Resizing pgf plots in an A0 beamer poster

text: I am creating a A0 scientific poster with the `beamerposter` package and I want to include TikZ/PGF plots. However, if I typeset these plots, the line width for the axis and for the data are too small. The data points are also too small.               \documentclass{beamer}          \usepackage[orientation=portrait, size=a0, scale=1]{beamerposter}     \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{graphicx}          \begin{document}          What the default is:          \scalebox{1}{     \begin{tikzpicture}         \begin{axis}             \addplot coordinates {(2, 0) (1, 1) (0, 2)};             \addlegendentry{Legend}         \end{axis}     \end{tikzpicture}     }          Best solution yet:          \begin{tikzpicture}[scale=2]         \begin{axis}[ticklabel style={font=\tiny},legend style={font=\tiny}]             \addplot coordinates {(2, 0) (1, 1) (0, 2)};             \addlegendentry{Legend}         \end{axis}     \end{tikzpicture}          \end{document}      ![Cropped solution](http://i.stack.imgur.com/fVajF.png) Does anyone know a fix? What am I missing here? EDIT: better example, with a sort-of-fix inspired by percusse's answer. EDIT2: best solution yet, thanks to percusse.


title: IEEEqnarray specific aligning

text: ![enter image description here](http://i.stack.imgur.com/icvU7.png) Is it possible to align the second row as to where it is, and align the third row with = sign? I'm new to LaTeX, so I only know basic stuff. This is my code:               \begin{IEEEeqnarray}{rCl}     P^2=\frac{1}{16}\cdot&\bigg(&-a^4-b^4-c^4-d^4\nonumber     \\&&+\:2a^2b^2+2a^2c^2+2a^2d^2+2b^2c^2+2b^2d^2+2c^2d^2\bigg)\nonumber     \\&&-\frac 12 abcd\cos(\alpha+\gamma)     \end{IEEEeqnarray}


title: Display a figure over 2 columns in a 2 column layout on a fixed position

text: I would like to display a figure in a 2 column document, though the figure has to appear over the 2 columns on a fixed position. I tried this:               \begin{figure*}[H]      \begin{center}      \includegraphics[scale=0.5]{features.JPG}      \caption{Comparison of the classification algorithms with different feature space sizes}      \label{features}      \end{center}     \end{figure*}      But it does not work. Nothing really works when changing the H to h or ht etc ... Anyone know the solution to this problem ?


title: Appendices' sections at subsection level in TOC

text: I would like to know how to show appendices' sections (B.1, B.2) at subsection level in TOC. MWE:                   % % % % % % % % % % % % Packages % % % % % % % % % % % % % % %         \documentclass[11pt,a4paper]{report}         \usepackage[english]{babel}     % english language         \usepackage[latin1]{inputenc}   % accents in source         \usepackage[T1]{fontenc}        % accents in DVI         \usepackage{vmargin}            % redefine the margins         \setmarginsrb{2.5cm}{1.5cm}{2.5cm}{1cm}{0cm}{0cm}{0cm}{1cm}              \usepackage{appendix}              \usepackage[         hyperindex=true, % add links in the index         bookmarks=true,  % show bookmarks bar when displaying the document}{hyperref}         ]{hyperref}         \hypersetup{         colorlinks=true, % colored links         breaklinks=true, % allows return line in too long links         urlcolor= blue,  % links color         linkcolor= blue, % internal links color         citecolor= blue, % green by defaut, color of citation links (bibliography)         bookmarksopen=true,         }              % code to show appendices' chapters at section level on TOC         \makeatletter         \newcommand\chapassect{%         \def\@chapter[##1]##2{\ifnum \c@secnumdepth >\m@ne                          \refstepcounter{chapter}%                          \typeout{\@chapapp\space\thechapter.}%                          \addcontentsline{toc}{section}%                                    {\protect\numberline{\thechapter}##1}%                     \else                       \addcontentsline{toc}{section}{##1}%                     \fi                     \chaptermark{##1}%                     \addtocontents{lof}{\protect\addvspace{10\p@}}%                     \addtocontents{lot}{\protect\addvspace{10\p@}}%                     \if@twocolumn                       \@topnewpage[\@makechapterhead{##2}]%                     \else                       \@makechapterhead{##2}%                       \@afterheading                     \fi}%         }         \makeatother                   % % % % % % % % % % RAPPORT % % % % % % % % % % % % %               \renewcommand\setthesection{\Alph{section}}              \begin{document}             % table of contents              \tableofcontents             \newpage             % end table of contents                  % chapter 1:             \chapter{Introduction}                 \section{Problem overview}                 \section{Application description}                 \section{Work Goals}             \newpage             % end chapter 1                   % appendices             \appendix             \clearpage % or \cleardoublepage             \appendixpage             \addappheadtotoc             % code to show appendices at section level in TOC             \chapassect             \begin{appendices}                 \chapter{Installation requirements}                 \chapter{Performance evaluation I appendix}                      \section{Strahov}                    \section{University laboratory}                  \end{appendices}             % end appendices              \end{document}      ![Result TOC](http://i.stack.imgur.com/167YJ.png) Notice that I am using the last piece of code to show appendices (A, B) at section level in TOC.


title: Hyperlinks in CV (Resume)

text: I am trying to write a CV (Resume) and a cover letter in LaTeX. I wish to add hyperlinks so that I can provide easy access to more information on areas I talk about. However, I feel that it might look like I've copy-and-pasted a Wikipedia page. Is there a way that I can make a hyperlinks obvious, but not intrusive or making the document look amateur? One idea I had was to try and make the hyperlinks disappear when the document is printed. Is that possible? Are there better methods? Rob


title: Autocomplete in TeXworks

text: Some command should be preceded by slash to auto-complete works (e.g. `rule`) and some command works without preceding slash (e.g. `parbox`). Is there any rule?


title: TikZ shaded translated regions defined by boundaries of shape nodes and lines

text: Given a lattice made up of shapes, how do I shade the regions (and their translates) defined by the boundaries of these nodes and lines going through these shapes? In my particular case, I have a region containing the origin, partitioned by two lines (spanned by vectors `$b_1$` and `$b_2$`) going through origin (denoted by `$A,B,C,D$`) and their translates (`$A',C',D'$`) inside the given parallelogram. These labelled regions are those that we want to be shaded.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix,calc,shapes,decorations}          \begin{document}          \begin{tikzpicture}[scale=2]     \coordinate (Origin)   at (0,0);     \coordinate (XAxisMin) at (-1.5,0);     \coordinate (XAxisMax) at (4,0);     \coordinate (YAxisMin) at (0,-0.5);     \coordinate (YAxisMax) at (0,3.3);     \draw [thin] (XAxisMin) -- (XAxisMax);% Draw x axis     \draw [thin] (YAxisMin) -- (YAxisMax);% Draw y axis          \draw[blue] (-0.25,0.25) node {$\mathbf{A}$};     \draw[blue] (0.35,0.25) node {$\mathbf{B}$};      \draw[blue] (-0.3,-0.25) node {$\mathbf{C}$};        \draw[blue] (0.25,-0.25) node {$\mathbf{D}$};          \clip (-0.7,-0.7) rectangle (4.18cm,3.3cm); % Clips the picture...     \pgftransformcm{1}{0.3}{0.7}{1}{\pgfpoint{0cm}{0cm}}          \coordinate (Bone) at (0,2);     \coordinate (Btwo) at (2,-2);     \coordinate (negBonePlusBtwo) at (-2,0);     \draw[style=help lines,dashed] (-14,-14) grid[step=2cm] (14,14);          \foreach \x in {-1,0,...,4}{       \foreach \y in {-1,0,...,4}{             \node[star,scale=5,draw=black] at (2 * \x, 2 * \y) {};             % make a lattice of stars       }     }          \draw[very thick,draw=black] (Origin)         rectangle ($2*(Bone)+(Btwo)$);               \draw [ultra thick,-latex,red] (Origin)         -- (Bone) node [above left] {$b_1$};          \draw[blue] (Bone) node [below right] {$\mathbf{D} '$};     \draw[blue] ($(Bone)+(Btwo)$) node [above left] {$\mathbf{A} '$};     \draw[blue] ($1.93*(Bone)+(Btwo)$) node [below left] {$\mathbf{C} '$};          \draw [ultra thick,-latex,red] (Origin)         -- ($(Bone)+(Btwo)$) node [below right] {$b_2$};                    \draw [thick,dashed,-latex,red,scale=3] (Origin) -- ($-0.25*(Bone)$) ;     \draw [thick,dashed,-latex,red] (Origin) -- ($0.35*(negBonePlusBtwo)$) ;                    \end{tikzpicture}     \end{document}


title: How to use \tikzmark with pLaTeX?

text: Usually I use the standard `latex` from MiKTeX when i use TikZ, which works good. But now I need to use `platex` from `w32tex` instead to include Japanese characters, which gives me the error:               Package pgf Warning: Your graphic driver pgfsys-dvips.def does not support marking the current position.      with a reference to the first line I use `\tikzmark`.


title: Help with bibliographystyle in LaTeX

text: I seem to be getting nowhere with my bibliography in LaTeX. Below is what I am using within my document. My reference page is blank for some reason. Here is the main document structure:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{natbib}     \usepackage{graphicx}     \usepackage{amsmath,amssymb}     \usepackage{fancyvrb}     \usepackage{cite}          \begin{document}          As shown in \cite[sec]          \bibliography{myref}     \bibliographystyle{ieeetr}          \end{document}      I also have a file name `myref.bib`. Below is an example of a reference I am trying to use, which is declared in the `myref.bib` file.                @ONLINE       {sec,         AUTHOR  = "Author.N",         TITLE   = "{Title goes here}",         URL = {http://www.here.com},         URLYEAR = 2012,         PRESORT="aa"       }      Does anyone have any ideas?


title: PDFLaTeX Color Space

text: # Background Am using TeX Live 2012, pdflatex, and latexmk to produce the document, on Ubuntu Linux. # Problem In the following image, Okular is shown on the left and Adobe Acrobat Reader is shown on the right. ![Okular vs Acrobat Reader](http://i.stack.imgur.com/t6g7t.png) The images in the document most likely contain various colour spaces. The colours in Okular are desired (and shown as coded in the LaTeX); whereas, the colours in Acrobat Reader are not desired. I have read a few different questions on this topic, including:   * PDF colour model and LaTeX # Question What is most likely the problem with the colours in Adobe Acrobat Reader, and how should I resolve it? # Ideas I was thinking that the problem might be caused by having images in multiple color spaces. If that's the case, then I could resolve it by running the images through ImageMagick. The alternative is to use `xcolor`, as suggested.


title: How do I embed vector graphics to LaTeX document

text: I have a vector grahpics file. Could someone please help me embed a image into my LaTeX document ? I have no clue.


title: SumatraPDF with AucTeX and Foxit Reader as the default viewer

text: I like to use Foxit Reader to view PDF's but it locks the file so i cannot use synctex with it.   So I'd like to use SumatraPDF with AuCTeX when making my PDF's but still have Foxit Reader as my default pdf viewer.   I use windows XP, AuCTeX 11.86 and GNU Emacs 23.3.


title: How do I make a script to make inkscape TikZ more human readable

text: When I export a `svg` file from inkscape to TikZ, the result is often huge, and not very human readable. I would like to write a perl script for post processing the output. The script should be able to:   1. identify what numbers is x-coordinates and y-coordinates   2. multiply the x-coordinates by a given constant   3. multiply the y-coordinates by a given constant   4. round the coordinates to the nearest multiple of an other constant This can e.g. be used for getting rid of the four decimals, if they are not needed, and the `yscale=-1` can be removed. What regEx will pick coordinates and control points? If coordinates and control points are multiplied by a constant, will the resulting picture be scaled (and/or stretched)? or will something by me unforeseen happen? Other thoughts, and suggestions is appreciated. **Edits:** Thank you for the answers, but despise the warnings about that I would need to parse TikZ, I still remain naive. I have not seen any output from inkscape that has coordinates in other forms than `(12.3456,42.4242)`.


title: Unknown error using tikz matrix of nodes in beamer

text: I am having trouble getting a basic example of a matrix of notes to show up in my beamer presentation. I am using the code copied from the pgf manual. Here is a complete working example. The error I get upon compilation is: "Package pgfbasematrix Error: Single ampersand used with wrong catcode."               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,petri,positioning,matrix}          \begin{document}          \begin{frame}          \begin{tikzpicture}     \matrix (magic) [matrix of nodes]     {     8 & 1 & 6 \\     3 & 5 & 7 \\     4 & 9 & 2 \\     };     \draw[thick,red,->] (magic-1-1) |- (magic-2-3);     \end{tikzpicture}          \end{frame}     \end{document}


title: Tikzpicture from LaTeX document does not compile in Beamer

text: > **Possible Duplicate:**   >  Unknown error using tikz matrix of nodes in beamer I have the following `tikzpicture` environment from my TeX document but I cannot make it work in Beamer. I get the error:               ! Package pgf Error: No shape named m-1-3 is known.      ! Package pgf Error: No shape named m-1-4 is known.      Here is the code               \begin{frame}[fragile]      \frametitle{Data set-up}     \begin{tikzpicture}[description/.style={fill=white,inner sep=2pt}]     \matrix (m) [matrix of math nodes, row sep=3em,     column sep=2.5em, text height=1.5ex, text depth=0.25ex]      {\&\&Z_{1}\&Z_{2}\&\& \\     R \& \& \& \& \& Y  \\ };     \path[->,font=\scriptsize]     (m-1-3) edge node[description]{$ \alpha_{1} $} (m-2-1)     (m-1-4) edge node[description] {$ \alpha_{2} $}(m-2-1)     (m-1-3) edge node[description]{$ \beta_{1} $} (m-2-6)     (m-1-4) edge node[description] {$ \beta_{2} $}(m-2-6);     \path[->,loosely dashed, font=\scriptsize]     (m-2-1) edge node[auto, swap] {$(MAR)$}(m-2-6);     \end{tikzpicture}     \end{frame}


title: problems with tikz and beamer and ampersands

text: > **Possible Duplicate:**   >  Unknown error using tikz matrix of nodes in beamer I'm trying to write a beamer document with tikz math diagrams. This code how gives me a " Single ampersand used with wrong catcode." error.               \documentclass{beamer}     \usepackage{tikz}\usetikzlibrary{arrows,matrix,shapes,snakes}     \begin{document}     \begin{frame}     \begin{tikzpicture}         \matrix (m) [matrix of math nodes]         {X & Y \\ A & B \\};     \end{tikzpicture}     \end{frame}     \end{document}      Any clues why? (by the way, the reason I'm writing this document is for personal notes to prepare a talk. I'm only interested in the fact that text is big and the formatting is designed for a schematic text. As I don't really care about the individual slides (i.e. the frame commands), do you have any tips for good alternatives?)


title: tikz matrix and beamer

text: > **Possible Duplicate:**   >  Unknown error using tikz matrix of nodes in beamer I would put the following figure in a `beamer` slide ![enter image description here](http://i.stack.imgur.com/Fu8pc.jpg) I tried with `[ampersand replacement=\&]` but it does not work               \documentclass[11pt]{article}      %\documentclass{beamer}          \pagestyle{empty}       \usepackage{tikz}     \usetikzlibrary{positioning,calc,matrix}          \begin{document}     \centering          %\begin{frame}     \begin{figure}[H]\centering     \begin{tikzpicture}           \matrix[matrix of math nodes] (m1)       {|[font=\scriptsize,red]| rang    &|[font=\scriptsize,red]| 5 &|[font=\scriptsize,red]| 4 &|[font=\scriptsize,red]| 3 &|[font=\scriptsize,red]| 2 &|[font=\scriptsize,red]| 1 &|[font=\scriptsize,red]| 0 &       &   &           &       &\\             & Bu    & Ga& Zo    &Meu& Ga& Bu    &       &   &           &           &       &\\                 &       &       &       &       &       &       & 4^0   & \to   &Bu\cdot 4^0    &=1\cdot 4^0    &=      &1 \\                 &       &       &       &       &       &       & 4^1   & \to   &Ga\cdot 4^1    &=0\cdot 4^1    &=      &0\\                 &       &       &       &       &       &       & 4^2   & \to   &Meu\cdot 4^2   &=3\cdot 4^2    &=      &48\\                 &   &       &       &       &       &       & 4^3   & \to   &Zo\cdot 4^3    &=2\cdot 4^3    &=      &128\\                 &   &       &       &       &       &       & 4^4   & \to   &Ga\cdot 4^4    &=0\cdot 4^4    &=      &0\\                 &   &       &       &       &       &       & 4^5   & \to   &Bu\cdot 4^5    &=1\cdot 4^5    &=      &1024\\                    &   &       &       &       &       &       &       &   &           &           &+      &1201\\                         };          \draw[-latex] (m1-2-7) |- (m1-3-8);     \draw[-latex] (m1-2-6) |- (m1-4-8);     \draw[-latex] (m1-2-5) |- (m1-5-8);     \draw[-latex] (m1-2-4) |- (m1-6-8);     \draw[-latex] (m1-2-3) |- (m1-7-8);     \draw[-latex] (m1-2-2) |- (m1-8-8);          \end{tikzpicture}          \caption{Transcodade base 4 (Shadok) $\to$ base 10}     \label{fig:base4tobase10}     \end{figure}     %\end{frame}          \end{document}


title: Referencing nodes in matrix of nodes does not work in beamer

text: When using node coordinates in a matrix of nodes in the `article` document class, the following code works well and soes exactly what it is supopsed to:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix}     \begin{document}     \begin{tikzpicture}        \matrix (m) [matrix of nodes]        {        A & B & C\\        D & E & F\\        };        \draw (m-1-1)--(m-2-3);     \end{tikzpicture}     \end{document}      If I try to get the same result in `beamer` by doing               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{matrix}     \begin{document}     \begin{frame}        \begin{tikzpicture}           \matrix (m) [matrix of nodes]           {           A \& B \& C\\           D \& E \& F\\           };           \draw (m-1-1)--(m-2-3);        \end{tikzpicture}     \end{frame}     \end{document}      compilation fails with               Package pgf Error: No shape named m-2-3 is known.      Using a `fragile` frame makes no difference. Is there a way to make the node names in a matrix of nodes work in `beamer`?


title: Bibliography does not render correctly for non-Latin items

text: Consider following tex and bib files. As you see the second bib item is not rendered correctly. Is there any solution? The squares are not the only problem, indeed all character of Persian item have not been rendered correctly. The out put should be similar to what you can see in the source code. Using tex.stackexchange.com/a/97304/13747 I can add Persian in the body of document but I don not know how to apply that solution to Persian bibliography items. # main.tex               \documentclass{article}     \usepackage{fontspec}     \usepackage{bidi}     \setmainfont{Times New Roman}     \begin{document}     Test \cite{noormags145485,cour71}     \bibliography{main}     \bibliographystyle{plain}     \end{document}      # main.bib               @ARTICLE{noormags145485,       author = { شعار,جعفر },       title = { اصلاح املای فارسی را از کجا شروع کنیم: به مناسبت تشکیل فرهنگستان     },       journal = { یغما },       year = { 1350 },       pages = { 157--161 },       number = { 273 },       url = { http://www.noormags.com/view/fa/articlepage/145485 }     }     @ARTICLE{cour71,       author = { Cour,Jaafar },       title = {Sluh e mlu e Fursi ru az koju corooa kon'im: be monusebat e tackil         e Farhangestun},       journal = { Yaqmu },       year = { 1971 },       pages = { 157--161 },       number = { 273 },       url = { http://www.noormags.com/view/fa/articlepage/145485 }     }      # output ![enter image description here](http://i.stack.imgur.com/GyCHA.png)


title: How do I set variables in latex template used for pandoc markdown to pdf conversion

text: I'm sorry if this is a bit of a pandoc question, but I'm hoping you tex users have some familiarity with latex templates within pandoc. I'm very new at this, but am excited to get a good work flow going. I'm trying to figure out how to use latex templates with pandoc when creating a pdf from a markdown file using               pandoc file.md -o file.pdf --template=default.latex      In the command line. I got the default latex template from               pandoc -D latex > default.latex      The pandoc documentation says a bit about using templates and from what I understood, suggested to modify the default (I may very well have understood completely wrong). pandoc template documentation My main problem is that I can't figure out how to set variables such as title, author, etc... do I do that in the default.latex file? or in the markdown file? Thanks in advance for any suggestions or directions to some good guides. **EDIT/UPDATE:** Okay, so looks like pandoc template variables are not controlled in the LaTex template code or the source Markdown. For reference, however, I'll mention the following:   * Variables are set automatically by Pandoc and can be used within the template. You cannot set variables in the template or original MD source itself(which was what I wanted to do).   * "Variables may be set at the command line using the -V/--variable option".   * AFAIK, Title, Author and Date variables CAN be set in the original md source by declaring them at the top like you would in any other LaTex File. see http://johnmacfarlane.net/pandoc/README.html#templates for more info I guess this question can be closed as off topic.


title: Problem with TeXcount related to file-including commands

text: I have found TeXcount extremely useful and, for all my needs so far, most accurate. Nonetheless, I have observed a strange behavior with `TeXcount 3.0 (beta)` when trying to make the script aware of files being included with the macro `\InputIfFileExists`. Everything goes fine if I append the command directly in the script `texcount.pl` as follows:               my %TeXfileinclude=('\input'=>'input','\include'=>'texfile','\InputIfFileExists'=>'file');      But in order to not have this setting overwritten when upgrading to a next (or the same, but stable) version, I am using an options file. The line               %fileinclude \InputIfFileExists file      leads to some error when I run `texcount`. The error no longer appears and the scripting proceeds perfectly as soon as I comment that line with the hash sign, `#`, corresponding to Perl. Is there something wrong with the way that I am proceeding?


title: Guidelines for creating an index

text: This is not necessarily a LaTeX-only question, and it is a bit open-ended, but given that this community is clearly very detail-oriented, and it is a general-interest question, I think that this is a good place to ask this question. I'm currently finishing up writing a 700-page mathematical text book*, and the time has come to create an index. I was wondering if you guys have any ideas on guidelines on how to create an index. I will be using `makeindex` (unless anyone has a better alternative; I'm definitely open for suggestions). I have a decently clear idea on what keywords to put in there, but I have some remaining issues:   * What are the rules for making subentries? For example, should "open set" appear in the index as "open set", or as "set -> open"? (`set!open` in makeindex syntax).    * What about using " _see ..._ ". For example, I have an index entry "Linear optimization model". It make sense to have two entries: "linear -> optimization model", and "optimization model -> linear". Should one of them refer to the other using a " _see ..._ "? Or is it preferred to just refer to the same page number from both entries? Any other thoughts are also very welcome. * * * *) In LaTeX, obviously. I'm taking the liberty here to thank many of you here at `tex.stackexchange.com` that have answered my questions; the community will definitely be mentioned in the acknowledgements.


title: A piecewise function with fractions and without tiny text

text: I would like to create a piecewise function which includes fractions. But the solutions I have found so far squish the fractions in to tiny text that is nearly illegible. The `cases` environment results in tiny text and only allows for one alignment character.               \begin{align}         E(r) &=         \begin{cases}             \frac{q}{4 \pi \epsilon_0 r^2} & \quad \text{if} \quad r > 0 \\             0 & \quad \text{otherwise}         \end{cases}     \end{align}      The `array` environment allows for multiple alignment characters but the text is still tiny.               \begin{align}         E(r) &=         \left\{         \begin{array}{ll}             \frac{q}{4 \pi \epsilon_0 r^2} & \quad \text{if} \quad r > 0 \\             0 & \quad \text{otherwise}         \end{array}         \right.     \end{align}      The `split` environment should do what I want but I haven't found away around the error `! Extra }, or forgotten \right.`. It has something to do with `\left\{` and `\right.`.               \begin{align}         E(r) &=         \left\{         \begin{split}             \frac{q}{4 \pi \epsilon_0 r^2} & \quad \text{if} \quad r > 0 \\             0 & \quad \text{otherwise}         \end{split}         \right.     \end{align}


title: MiKTeX's tex4ht gives:

text: I am trying to compile a LaTeX document to HTML using tex4ht, using the MiKTeX's tex4ht and Texmaker. I am trying to do this using a user command:               C:\MiKTeX\miktex\bin\x64\tex4ht.exe htlatex %.tex      The my file compiles fine to PDF, but using this user command gives the following error:               Process started          ---------------------------- tex4ht.c (2010-12-16-08:39 Windows MiKTeX) C:\MiKTeX\miktex\bin\x64\tex4ht.exe htlatex helloworld.tex          --- warning --- Can't find/open file `helloworld.dvi' --- error --- Can't find/open file `helloworld.dvi'          Process exited with error(s)      The file I am using is a simple Hello World, and is saved as helloworld.tex               \documentclass{article}     \begin{document}     Hello World!     \end{document}      I have looked at this question, which says that it is an error, but a file should have been produced, but I cannot find any output. Also the code suggested there gives me the same problem. Lastly, I looked at the tex4ht troubleshooting site which says a filter should be installed, but doesn't say how. Anybody know this problem. Or can tell me how I can use tex4ht on miktex. EDIT: Using htlatex directly gives:               C:\test>htlatex test.tex          ======================================================================     htlatex: Cannot start MiKTeX package manager.     htlatex: Data: Invalid syntax     ======================================================================     htlatex: The Windows command script file could not be found.     htlatex: Data: scripts/tex4ht/htlatex.bat


title: How to set compatibility level in PDFLaTeX

text: normally pdflatex produces pdf compatible with acrobat reader 6.0 and later right? How do I make it compatible only with version 9.0 forward acrobat reader? I use TeXLive 2011


title: restricting hyperref link to part of toc / lo* entry

text: In some _tocloft_ list there are entries, which may span multiple lines. Now _hyperref_ makes the number in front, the first line and all the following lines into links. Can this be prevented? Only the first line should be a link.   See the following example, where this happens:               \documentclass{scrartcl}          \usepackage{hyperref}          \usepackage{tocloft}     \newcommand{\listprname}{Problems}     \newlistof{pr}{pr}{\listprname}          \newcommand\pr[2]{%         \refstepcounter{pr}         \addcontentsline{pr}{pr}%         {\protect\numberline{\thepr.}{#1\\#2}}}          \begin{document}              \listofpr              \pr{Test}{This is rather a description.}          \end{document}


title: \includemedia won't play video

text: the code seems to be correct, with compilation no error appears. The code is               \documentclass{beamer}     \usetheme{Singapore}     \usepackage{media9}     \usepackage{hyperref}          \begin{frame}\frametitle{Title}          \includemedia[     width=\paperwidth,height=0.7\linewidth,     activate=pageopen,     flashvars={movie.mp4 &autoPlay=true}     ]{}{movie.mp4}          \end{frame}          \end{document}      He won't play the video and with no error I don't know what to do. Please anyone has an idea? I use adobe reader 9.4.2.


title: Industrial schematics

text: I'm investigating if it is possible to generate electrical schematics for industrial machinery with the LaTeX ecosystem. They are quite different from electronic circuits because are developed sequentially. Here is a typical page drawn with QElectrotech (the only open source package I found for such purpose): ![The schematic of a digital input module](http://i.stack.imgur.com/WLzLe.png) These are my requirements:   1. the schematic can span several pages (let's say up to 50);   2. adding new symbols must be easy;   3. should be introspectable (if possible) to leave the doors opened for addition of generated contents (wire numbering, cross reference, terminals and a lot of stuff can be automatically generated);   4. the result must be easy to be embedded in a LaTeX document. I checked some existent solution but I'd like to have advices from more seasoned people:   1. METAPOST   It is a pleasure to use and MakeCirc yet provides a base, but I fear scalability issues and I don't like the way dynamic text is handled.   2. Circuitikz   Seems to be the quickest way to get started but I'm scared of TeX language and I don't have any idea on how introspection can be implemented.   3. The circuits library of TikZ PGF   I found no documentation and from what I understood it provides no benefit to circuitikz other than being a core library.   4. pst-circ   For this use case, I don't see any advantage over circuitikz.   5. Circuit macros   Not tested: I'd prefer to avoid having to learn two new languages (m4 and pic) if there are no clear advantages. Also, this application seems to be a good candidate for LuaTEX, but I lack a general overview of the interaction between the components, hence I don't know if it is better (or even possible) have LaTeX embedding Lua code that generates circuitikz macros or a Lua program that calls METAPOST for symbols and TeX for labels or Lua embedded into circuitikz in some way to provide introspection.


title: Is it possible to force auto-pst-pdf to use --hires option when it internally invokes pdfcrop?

text: ## What is `--hires` for? To obtain a better result when cropping a pdf image produced by PSTricks, I use `--hires` option as follows               latex filename.tex     dvips filename.dvi     ps2pdf -sOutputFile=filename-temp.pdf filename.ps     pdfcrop --hires filename-temp.pdf filename.pdf      According to `pdfcrop --help` shown in the following screenshot, the `--hires` make `pdfcrop` use high resolution bounding box (instead of the usual bounding box) to crop a pdf input. ![enter image description here](http://i.stack.imgur.com/wciVu.png) ## Scenario & Problem I am writing a book that use PDF, PNG, JPEG images and PSTricks codes. Actually `xelatex` can help me to compile the input file. Unfortunately, `xelatex` runs very very very slowly. The very bad performance makes me reluctant to use `xelatex`. The next candidates are `pdflatex` (and `context` but I am not familiar with it). Behind the scene, `pdflatex` with `auto-pst-pdf` package compiles each PSTrick code, converts it to PDF, crops the surrounding white space of the PDF image, and finally includes all the resulting PDF images to produce a complete document. In this process, there is a temporary PDF file that contains a bunch of the cropped PDF images in the working directory. Unfortunately, the bounding box is not so accurate. If we see each cropped image carefully, we will notice that the left, right, top, and bottom margins are not exactly the same. Therefore, I need to pass `--hires` to `pdfcrop`, but I don't know how to do this. The following code snippet might be needed for a test. > Don't forget to use `-shell-escape` or `--enable-write18` when invoking > `pdflatex`.               \documentclass{article}     \usepackage[english]{babel}     \usepackage{pstricks}     \usepackage{auto-pst-pdf}% I need pass --hires, but how ?     \usepackage{blindtext}     \begin{document}          \blindtext     \begin{figure}[hbtp]     \centering     \begin{pspicture}(4,3)     \pscircle[fillstyle=solid,fillcolor=red,opacity=0.2](2,3){2}     \end{pspicture}     \caption{\label{fig:circle}This is a circle.}     \end{figure}     \blindtext          \end{document}      ## Question Is it possible to force `auto-pst-pdf` to use `--hires` option when it internally invokes `pdfcrop`?


title: Page numbering appearing in the wrong place

text: My list of figures spans two pages, and on the first page, it is appearing at the bottom center, and on the next page, it is appearing on the bottom right. I want it to be on the bottom right on the first page where the list of figures starts. How do I set this right?               \documentclass{report}          \usepackage[top=1.0in,bottom=0.75in,left=1.25in,right=1in]{geometry} %Margins     \usepackage[onehalfspacing]{setspace}     \usepackage{fancyhdr}     \usepackage[colorlinks=true,urlcolor=back,citecolor = black]{hyperref}      \usepackage{tocloft}          \renewcommand{\cftfigfont}{Figure \hspace{1.3mm}}          \begin{document}          \hypersetup{linkcolor=black}     \pagenumbering{gobble}     \rhead{}     \rfoot{}     \rhead{}     \rfoot{}     \lhead{}     \lfoot{}     \cfoot{}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     \tableofcontents     \addtocontents{toc}{~\hfill\textbf{Pg.No}\par}     \addtocontents{toc}{\protect\afterpage{~\hfill\textbf{Pg.No}\par\medskip}}           \clearpage          \rfoot{\thepage}     \pagenumbering{roman}      \listoffigures      \thispagestyle{fancy}       \rhead{}       \lhead{}       \lfoot{}      \cfoot{}     \hypersetup{linkcolor=black}     \addtocontents{lof}{~\hfill\textbf{Pg.No}\par}     \addcontentsline{toc}{chapter}{List of Figures}            \chapter{Test title}         Dummy text.          \end{document}


title: Trying to suppress URLs with BibLaTeX, using a simple person's method

text: Based on other questions here, I'm trying to create an annotated bibliography, using `\fullcite`, where I want to suppress all URLs. I'm using what appears to be a simple solution, which works for a 'normal' bibliography, but not for `\fullcite` (I've included the normal bibliography for illustration):               \documentclass{article}     \usepackage{filecontents}     \begin{filecontents*}{mwe82.bib}     @MANUAL{wilson2009,       author = {Peter Wilson},       title = {A Few Notes on Book Design},       year = {2009},       organization = {The Herries Press},       url = {http://mirrors.ctan.org/info/memdesign/memdesign.pdf},       address = {Normandy Park, WA},       urlaccessdate = {19.12.2012}     }     \end{filecontents*}     \usepackage[%         citestyle=authoryear,          bibstyle=authoryear,          backend=biber,         bibencoding=utf8,     ]{biblatex}     \addbibresource{mwe82.bib}     \AtEveryBibitem{%         \clearfield{url}%         }     \begin{document}     \fullcite{wilson2009}     \printbibliography     \end{document}      Giving this: ![output pdf](http://i.stack.imgur.com/Mw7Zs.png) Could someone tell me what I'm doing wrong?


title: Equivalent to \hapto for kappa-notation

text: In `chemmacros` I can use `\hapto{3}` to indicate the "hapticity" of a ligand, and the output is an upright Greek eta (well, maybe not upright) with the number as superscript. But for "denticity" a kappa should be used instead. I can use `\Chemkappa` to get the letter, but is there a command similar to `\hapto` that produces it with the superscript?


title: Indentation in the algorithm package after \Ensure, \Require

text: I have this piece of code:               \documentclass[11pt]{article}     \usepackage{algorithm}     \usepackage{algpseudocode}     \usepackage{varwidth}          \begin{document}             \begin{algorithmic}           \Require   \begin{varwidth}[t]{\linewidth}                       A \par                       AA                      \end{varwidth}           \Ensure      \begin{varwidth}[t]{\linewidth}                       B \par                       BB                    \end{varwidth}        \end{algorithmic}          \end{document}      which yields ![enter image description here](http://i.stack.imgur.com/fcoK6.png) I would like the text which follows after `\Ensure` to be indented in such a way that it is placed right under the text which follows after `\Require`. How can this be done?


title: Interference between \onslide and \setbeamercovered{transparent}

text: I'm trying to use `\onslide` in a table, but since I have the option `\setbeamercovered{transparent}` in the preamble, it does not produce the overlay of columns. Here is my example:               \documentclass[xcolor=pdftex,dvipsnames,table]{beamer}     \setbeamercovered{transparent}          \begin{document}          \begin{frame}         \frametitle{Test 1}              \begin{itemize}             \item<1-> A             \item<2-> B         \end{itemize}     \end{frame}          \begin{frame}         \frametitle{Test 2}         \begin{table} \caption{Test}             \begin{tabular}{lc<{\onslide<2->}c<{\onslide}}                  A & 1 & 2 \\                  B & 1 & 2 \\             \end{tabular}         \end{table}     \end{frame}          \end{document}      If I comment the second line it works, otherwise it doesn't.


title: Draw Image (Data flow)

text: I am newbie in this TEX world and I would like to draw something like this: ![alt text](http://i.stack.imgur.com/xCktN.png) But I don't know where to start. I tried using: `\usepackage{pstricks,pst- node,pst-tree}` but when I try to use it I got many errors, am I in the right way?


title: Bibliography spacing with BibLaTeX (and two columns)

text: I need to fine tune the distances marked as A, B, C and D in the figure below. Any suggestions? In particular, I would like B=0pt, and the other three to be small. I am using BibLaTeX and two columns:               \usepackage[backend=biber]{biblatex}     \usepackage{multicol}     ...     \renewcommand{\bibfont}{\small}     \begin{multicols}{2}         \printbibliography[heading=subbibliography]     \end{multicols}      ![Distances](http://i.stack.imgur.com/u2Vv1.png)


title: Changing the default options of a document class?

text: I would like to define some `base-class.cls`, with some options and their defaults, and then provide some mechanism so that other derived classes can reuse the existing options _and_ change the defaults. Furthermore, I would like that options added to the `base-class` in the future also propagate to the derived classes without any further change. This question is somewhat related to an existing question about new and existing class options. In essence, **How to replace the default set of options when defining a new class?**. As an example, assume that there is some base `article.cls` with three mutually exclusive options: `10pt`, `11pt` and `12pt`. Where `10pt` is the default option. Now one wants to define a new document class, say `nice- article` which has the same three options, but `11pt` is the default. From the answer to the linked question, the solution would be to declare the three options within `nice-article.cls` using `\DeclareOption` which store the selected action in some if's or macros, then call `\ExecuteOptions{11pt}` to set the new default, and finally call `\PassOptionsToClass{...}{article}` with the appropriate saved option. But all this seems too cumbersome and is not very modular. Say for example that later `article` adds a new `13pt` option. Ideally I would also like `nice-article` to also benefit from this new option; in particular if I explicitly said               \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}      However using that solution I would also have to go and modify `nice- article.cls` to make it aware of the new existing `13pt`. So the question is (a) hasn't this problem been already solved? i.e. is there some package or extension or command which I'm missing and allows to do this? and, if not, (b) how should I go about implementing such feature? Assume that I'm implementing a class `base-class.cls` which can have any kind of code and macros needed; but then I want to be able to define new classes on top of that (say `nice-class.cls`, `bright-class.cls`, `funny-class.cls`) which can use options from `base-class`, defining their own defaults and being automagically upgraded with more options if I happen to change the `base- class`. Hope that the question makes sense.


title: Translate (localise) \theendnotes heading

text: I'm using the `endnotes` package for enabling endnotes within my document. With an English document it is no problem but when I'm using it within a German document and added the `ngerman` package, the heading created by `\theendnotes` still reads " _Notes_ " and not the German equivalent " _Anmerkungen_ ". I suspect I need to redefine a command specifying the heading explicitly, but which command do I need to redefine? Thanks for your help.


title: Cross-referencing error in appendix

text: I have a problem with cross-referencing in the appendix of the document I'm writing, `\ref` is not working properly and I only get `??`. I'm using a LaTeX template for writing Ph.D. Thesis that can be found at Texis page. I'm working with Miktex2.8 and TeXnicCenter under Windows 7. In the master document you can find:               \include{Capitulos/01Introduccion}     \include{Capitulos/02Metodologia}     \include{Capitulos/03ClimatologiaSST}     \include{Capitulos/04Sinoptica}     \include{Capitulos/05Modelizacion}     \include{Capitulos/06Conclusiones}          \appendix     \include{Apendices/01Rams}     \include{Apendices/02MapasSinopticos}     \include{Apendices/03MapasSST}      In chapter 2               E0996 & 11-12/09/1996 & 520 & 524.5 \\ \midrule     E1000 & 21-26/10/2000 & 376 & 570 \\ \midrule     E0502 & 06-08/05/2002 & 400 & 516 \\ \midrule     E1007 & 10-12/10/2007 & 400 & 404.4 \\ \midrule     \end{dataTable}     \end{center}     \caption[Listado de eventos precipitación]{Listado preliminar de eventos de precipitación torrencial en la \cv  (PMAX=Precipitación máxima)}     \label{cap2:tab:listaeventos}     \end{table}      and in appendix 3                 some text \ref{cap2:tab:listaeventos}      But the result is not a reference but `??` Any suggestion? I have found some relatively similar questions here but none has fixed my problem.


title: How to plot BARPLOT in LATEX

text: I would like to plot Barplot in latex. here is my data..... > name S1 S2   >  john white 912 800   >  alan ket 484 400   >  halen koo 309 250   >  daren kalig 291 280   >  arif butt 192 150   >  james seal 142 120 I want to plot barplot similar to this plot. ![enter image description here](http://i.stack.imgur.com/zo8Jg.png)


title: CJK package and \figurename

text: I'm using the `cjk` package to typeset a Japanese document, but somehow can't change the `\figurename` into CJK. I tried in the preamble,               \renewcommand{\figurename}{図}      but it only give me an empty string before the figure number in the figure captions. Could anybody tell me the way out? I'm using `\begin{CJK}{UTF8}{min} ... \end{CJK}` in the main part. (I need to use CJK instead of XeLaTeX, because I need to post the document to a preprint server which doesn't have Unicode-enabled TeX system.)


title: Attach displayed image to the PDF without storing it twice

text: If one and the same image is included in a PDF multiple times it is only stored only once as an PDF object. Now I like to also attach an image which is shown in the document to the PDF to allow users to copy the file. I'm aware that it is sometimes possible to copy images from the PDF anyway, but AFAIK this is limited to raster images like PNG and JPG, and not possible for included PDF images/diagrams. I'm aware of the packages like `embedfile` and `attachfile`, but the tricky part is: Is it possible to display and attach/embed an already used image as PDF attachment without having it stored twice in the PDF? Or in other words, the other way around: I like to add an image file as PDF attachment and then display this image file also in the document, without storing it again. AFAIK the PDF format should support this, but exactly how is the question. I don't mind a solution which uses some `\pdfobj` code. Here a minimal example so that people can understand it better:               \documentclass{article}          \usepackage{graphicx}     \usepackage{embedfile}          \begin{document}          % Used twice, but only stored once:     \includegraphics[width=\textwidth]{tiger.pdf}     \includegraphics[width=\textwidth,angle=45]{tiger.pdf}          % Also added as attachment:     \embedfile{tiger.pdf}     % This should reuse the image file above, but adds `tiger.pdf` a second time          \end{document}      ![Example](http://i.stack.imgur.com/Q5WOB.png)


title: Header and Footer offset in Exam Document Class

text: I am using the `exam` document class and I want to implement a layout where the headers and footers span over both the text body and the margins. I tried using the `\fancyhfoffset` command from the `fancyhdr` package, but commands like `\cfoot`, `\lfoot` are overruled by the document class. Is there a way to disable the native header and footers from the `exam` document class or some other way of implementing this? My MWE:               \documentclass[11pt,a4paper,fleqn]{exam}     \usepackage[utf8]{inputenc}     \usepackage[danish]{babel}     \usepackage[includemp, a4paper, textwidth=0.6\paperwidth, marginparwidth=0.2\paperwidth]{geometry}          \pagestyle{headandfoot}     \firstpagefooter{MyName}{MyTitle}{ThePage}     \runningfooter{MyName}{MyTitle}{ThePage}          \title{MyTitle}     \author{MyName}          \begin{document}          \maketitle     \thispagestyle{headandfoot}     ...          \end{document}


title: How to get a title at the top of a cover letter?

text: I am using the `newlfm` package to create a cover letter. And I am trying to replace the logo at the top of this cover letter with a title. Now I know how to remove the logo, but I have no idea how to add a title above the black line at the top ? Plus, I cannot find any latex code that created those 2 black lines in the image, and thats why I dont know how to place a title or some text just right above the upper black line               \documentclass[10pt,stdletter,dateno,sigleft]{newlfm} % Extra options: 'sigleft' for a left-aligned signature, 'stdletternofrom' to remove the from address, 'letterpaper' for US letter paper - consult the newlfm class manual for more options          \usepackage{charter} % Use the Charter font for the document text          \newsavebox{\Luiuc}\sbox{\Luiuc}{\parbox[b]{1.75in}{\vspace{0.5in}     \includegraphics[width=1.2\linewidth]{logo.png}}} % Company/institution logo at the top left of the page     \makeletterhead{Uiuc}{\Lheader{\usebox{\Luiuc}}}          \newlfmP{sigsize=50pt} % Slightly decrease the height of the signature field     \newlfmP{addrfromphone} % Print a phone number under the sender's address     \newlfmP{addrfromemail} % Print an email address under the sender's address     \PhrPhone{Phone} % Customize the "Telephone" text     \PhrEmail{Email} % Customize the "E-mail" text          \lthUiuc % Print the company/institution logo          %----------------------------------------------------------------------------------------     %   YOUR NAME AND CONTACT INFORMATION     %----------------------------------------------------------------------------------------          \namefrom{John Smith} % Name          \addrfrom{     \today\\[12pt] % Date     123 Broadway \\ % Address     City, State 12345     }          \phonefrom{(000) 111-1111} % Phone number          \emailfrom{john@smith.com} % Email address          %----------------------------------------------------------------------------------------     %   ADDRESSEE AND GREETING/CLOSING     %----------------------------------------------------------------------------------------          \greetto{Dear Mrs. Smith,} % Greeting text     \closeline{Sincerely yours,} % Closing text          \nameto{Mrs. Jane Smith} % Addressee of the letter above the to address          \addrto{     Recruitment Officer \\ % To address     The Corporation \\     123 Pleasant Lane \\     City, State 12345     }          %----------------------------------------------------------------------------------------          \begin{document}     \begin{newlfm}          %----------------------------------------------------------------------------------------     %   LETTER CONTENT     %----------------------------------------------------------------------------------------          PARAGRAPH ONE: State the reason for the letter, name the position or type of work you are applying for and identify the source from which you learned of the opening (i.e. career development center, newspaper, employment service, personal contact).      ![enter image description here](http://i.stack.imgur.com/XasO8.png)


title: Using ornaments from pgfornament in KOMA Script as headsepline

text: I want to use an ornament from the pgfornaments package as the `headsepline` in a KOMA-Script `scrbook`. A minimal working example of my document would be something like:               \documentclass[a4paper,ngerman,headsepline, BCOR=5mm, numbers=noenddot, sort&compress]{scrbook}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}          \setkomafont{sectioning}{\bfseries} % Serifen und Überschriften     \setkomafont{descriptionlabel}{\bfseries}          \begin{document}     some lorem here     \end{document}      So is there a way to "replace" or renew the headsepline option to draw an ornament (like ornament #88 from pgfornaments) to use as header? I searched for ornament options here, but I didn't find any with specific mentioning of using it as a header separator line and the documentation of pgfornaments also didn't really help me either. There is a mention of designing own heads in KOMA Script here: How to change \headsepline color in KOMA-Scriptclasses , but to be honest, I am not experienced enough in LaTeX to have an idea on hjow to start. To clarify as to what I want to achieve (that doesn't look horribly uggly): I have three options in mind to try out whether they work (although only one option per document. SO I won't interchange them inside a single document)   1. Have the horizontal header separator line be interrupted in the center with an ornament like pgfornament #12 ![pgfornament 12 as center ornament](http://i.stack.imgur.com/dfOoz.png) and therefore make the header separator line just a tiny bit more fancy   2. Maybe have both outer end of the header separator line be "finished" with eg ornament #21 ![pfgornament 21 as left line end](http://i.stack.imgur.com/GNWbM.png) as the left end and ornament #23 ![pgfornament 23 as right line end](http://i.stack.imgur.com/uemoW.png) as the right end of the line.   3. Or approach it per left/right page and have the outer end of the line (on a right page, the right side and on the left page the left side) and only on the outer sides end the line with ornaments like in the second option of this list Edit: My current code thatnks to Keks Dose is the following (although it doesn't account for the space introduced by headsepline usually) and probably ugly:               \documentclass[a4paper,ngerman]{scrbook}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{scrlayer-scrpage}     \usepackage{pgfornament, blindtext}     \usepackage{showframe}          \setkomafont{sectioning}{\bfseries} % Serifen und Überschriften     \setkomafont{descriptionlabel}{\bfseries}          \chead{%     \raisebox{-3mm}{     \rule{0.4\linewidth}{0.2mm}%     \pgfornament[width=2mm]{13}     \rule{0.4\linewidth}{0.2mm}}     }          \automark[chapter]{chapter}          \automark*[section]{}          \pagestyle{scrheadings}          \begin{document}     \blinddocument     \chapter{more blindtext with a very very very long name}     \blindtext[12]               \end{document}      My code also doesn't yet rotate the ornament by 90 ° and also doesn't correctly set the width of the rules, but I'm working on it. Current status: ![current working status](http://i.stack.imgur.com/DW4sO.png)


title: Drawing database tables in tikz

text: I am bit confused about how can i draw a table like this using tikz. Any ideas please? ![enter image description here](http://i.stack.imgur.com/9IULj.jpg)


title: How to configure flyspell to ignore the content of a given environment?

text: When using `flyspell` in `emacs`, it can be useful to configure `flyspell` to ignore the contents of certain environments, e.g. `tikzcd` or `tikzpicture`. For example, in the document below one would like to `flyspell` to ignore the word "asdf" inside the environment `myenv`.               \documentclass{standalone}          \newenvironment{myenv}{}{}          \begin{document}          \begin{myenv}       asdf     \end{myenv}          \end{document}      How to achieve this?


title: biblatex-apa: full first names in the bibliography

text: Some publishers prefer the APA citation style in a modified way and do not want any initials for authors' and editors' names in the bibliography. According to the `biblatex-apa` handbook, this is made possible by using the `firstinits=false` option. Unfortunately this does not work for me:               \documentclass[ngerman]{scrartcl}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{csquotes}     \usepackage[style=apa,natbib=true,firstinits=false]{biblatex}     \DeclareLanguageMapping{ngerman}{ngerman-apa}     \usepackage{filecontents}          \begin{filecontents*}{Test.bib}       @Article{Andrews1990,       Title = {{D}oes correctional treatment work? {A} clinically relevant and psychologically informed meta-analysis},       Author = {Andrews, Don A. and Zinger, Ivan and Hoge, Robert D. and Bonta, James and Gendreau, Paul and Cullen, Francis T.},       Journal = {Criminology},       Pages = {369-404},       Volume = {28},       Year = {1990},       }     \end{filecontents*}          \addbibresource{Test.bib}     \usepackage{babel}     \begin{document}     \selectlanguage{ngerman}     \nocite{Andrews1990}     \printbibliography     \end{document}      This produces the standard APA formatting: ![Bibliography](http://i.stack.imgur.com/EvtfG.jpg)


title: How to define a symbol which never goes at the beginning of the next line?

text: I have created a very simple symbol, and try it in the main text. What I want is this symbol never show at the beginning of a line, which means TeX(I use XeTeX) always treat it as a punctuation. How should I do that? Thanks! Here is an very simple example:               \documentclass{article}     \usepackage{xcolor}     \def\DD{{\color{red} $\circ$}}          \begin{document}     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis \DD facilisis     sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet \DD mi nec     ante.      \end{document}


title: Unnumbered foot notes with special characters

text: I have a request to use a special character or symbol for a foot note. Such as double 'S'. Latex `\S` to see what I mean. That is, instead of a number the symbol is used as a marker. I've tried `\footnote[\S]{text of footnote}`, but LaTeX 'wants' a number within the square brackets `[]`. Other special symbols could include a dagger or double dagger (`\dag` or `\ddag`), asterisk or others. Any ideas?


title: How to add a side by note in LaTeX

text: How can i produce the following image![enter image description here](http://i.stack.imgur.com/RHesj.png) TeX commands of this would be extremely helpful.


title: Using & in macro abstracting a tabular's row

text: I am attempting to create a marco for table rows. This will allow me to change the order of the columns in the future, without having to change the order of the columns in every single row. I have attempted:               \newcommand\taxrow[9]{%             \def\paper{#1}%             \def\method{#2}%             \def\optobj{#3}%             \def\workload{#4}%             \def\sla{#5}%             \def\perfpred{#6}%             \def\numofreps{#7}%             \def\faulttol{#8}%             \def\failact{#9}%             \taxrowcond     }          \newcommand\taxrowcond[1]{             \paper & \method & \optobj & \workload & \sla & \perfpred & \numofreps & \faulttol & \failact & #1     }                    \begin{table}[h]     \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}     \hline             \taxrow{Paper}{Method}{Optimization Objective}{Workload}{SLA}{Performance Objective}                     {Num. of Reps}{Fault Tolerant}{Failover Action}{Overload Protection}         &  & & & & & & & & \\ \hline     \end{tabular}     \end{table}      If I remove the ampersands &, it works:               \newcommand\taxrow[9]{%             \def\paper{#1}%             \def\method{#2}%             \def\optobj{#3}%             \def\workload{#4}%             \def\sla{#5}%             \def\perfpred{#6}%             \def\numofreps{#7}%             \def\faulttol{#8}%             \def\failact{#9}%             \taxrowcond     }          \newcommand\taxrowcond[1]{             \paper             \method             \optobj             \workload             \sla             \perfpred             \numofreps             \faulttol             \failact             #1     }                    \begin{table}[h]     \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}     \hline             \taxrow{Paper}{Method}{Optimization Objective}{Workload}{SLA}{Performance Objective}                     {Num. of Reps}{Fault Tolerant}{Failover Action}{Overload Protection}         &  & & & & & & & & \\ \hline     \end{tabular}     \end{table}


title: Hatching a rectangle leads to solid line in beamer

text: I would like to indicate an inequality constraint using a hatched pattern. This is to be done in a `pgfplot`, that is itself part of a `beamer` frame. Here is an MWE:               \documentclass{beamer}          \usepackage{tikz,pgfplots}          \usetikzlibrary{patterns}          \begin{document}          \begin{frame}{Test}             \begin{tikzpicture}[remember picture]                 \begin{axis}[                     width=\textwidth,                     minor tick num=1,                     axis y line=center,                     axis x line=middle,                     ]                     \addplot[smooth, cyan, mark=none, domain=-3:3, samples=40, thick] {x^2};                     \draw[red, thick] (axis cs:-2, 0) -- (axis cs:-2, 9);                     \draw[pattern=north west lines, thin, red] (axis cs:-2,0)                     rectangle (axis cs:-1.75, 9);                 \end{axis}             \end{tikzpicture}         \end{frame}      \end{document}      The resulting output, however, is: ![A solid line, not a pattern](http://i.stack.imgur.com/pVTu8.png) As you can see, a solid line is drawn rather than a pattern. How can I fix this?


title: Creating Table with Column Names from another table

text: I want to create a table that will have two columns:               Table Name     Column Name      So I would read, say 3 tables, and for each table I would create a row for each column in that table, that would have the table name and the column name. So for example:               Account_Table     Account_id     Account_Name     Account_Address          Customer_Table     Customer_id     Customer_name     Customer_address          Merchandise_Table     Merch_Sku_number     Merch_Description      So the table I create would look like this:               Account_table     Account_id     Account_table     Account_name     Account_table     Account_address     Customer_table    Customer_id     Customer_table    Customer_name      And so on, get the idea? Can someone tell me how to do this?


title: New environment question

text: I am trying to create a new environment that works similar to the `{\bfseries }` command. For example:               \documentclass{report}     \usepackage{rotating}          \newenvironment{stext}     {\begin{sideways} \bfseries \raggedleft }     {\end{sideways}}          \begin{document}          \begin{stext}     This is an example environment.     \end{stext}          \end{document}      In the above example, I want to redefine the `stext` environment so that it works as follows:               {\stext This is an example environment.}      Here is the use case for this new environment:               \documentclass{article}     \usepackage{rotating}     \usepackage{array}     \newcolumntype{$}{>{\global\let\currentrowstyle\relax}}     \newcolumntype{^}{>{\currentrowstyle}}     \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%       #1\ignorespaces     }          \begin{document}     \begin{tabular}{$l^c^r}     \rowstyle{\rotatebox{-90}}% <- I know, the usage is wrong.      abc & abc & abc\\     b & b & b \\     c & c & c \\     \end{tabular}     \end{document}      The aim here is to get the text in the first row sideways so that they don't occupy as much width. For the `\rowstyle` command to work properly, I need an environment which can be invoked like so:               {\rotatetext Rotated text}


title: Looking for trouble: the κ letter, the combining ⃗, ucharclasses and xparse... (error with κ⃗ but not with k⃗)

text: Now I'm seriously puzzled. Here's the MWE (using xelatex).               \documentclass{article}          \usepackage{xparse}     \NewDocumentCommand{\li}{v}{\texttt{#1}}          \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{ucharclasses}       \setTransitionsFor{GreekAndCoptic}{\begingroup\fontspec[Scale=.85]{DejaVu Sans}}{\endgroup}       \setTransitionsFor{CombiningDiacriticalMarksforSymbols}{\begingroup\fontspec{DejaVu Sans}}{\endgroup}          \begin{document}       \li+κ⃗+     \end{document}      I believe the title says it all. I'm getting:               ! Extra }, or forgotten \endgroup.     <recently read> \egroup           l.16   \li+κ⃗+          ?       Things work fine if I write either `κ⃗`, i.e. without the call to `\li`, or if I write `\li+k⃗+`, i.e. without the greek κ but with a roman k instead. It's not that it's blocking me or anything (I switched to k instead of κ for my variable), but I'm just very, very curious as to why this is happening!


title: Change Font Weight in Math Mode

text: I would like to change the font "thickness" of the font in math mode. I already tried to find a similar method like \DeclareMathSizes but i didn't find something. edit: I want to use - if possible - in math mode a font with serifs that is not as thin as the "typical" one. Since I'm trying to include latex formulas in powerpoint I need them for a presentation and, thus, a thicker font would be great. P.S.: To the best of my knowledge, I'm using pdflatex ;-) Thanks for your help