title: After one has made many grid based puzzles how does one make then into a PDF ready for printing

text: Here is a part image of my finished book; ![enter image description here](http://i.stack.imgur.com/Pk1lY.png) After one has generated many grid based puzzles like sudoku, kakuro or even plain crosswords and now one has to print them in a book. How does one make a pdf (book file) from them automatically. To explain the question better. The puzzles are already made into single files stored in the 1..4.6..9 format. There are nine lines in every file. So each file is a complete sudoku puzzle. Now I want to print a book from them. Let us say to keep things simple one puzzle to a page and nothing else on the page. So it would need a grid box as well. The first one I could make as a template in word. How do I make the others without putting in the different numbers every time individually. I have kept this as simple as possible. This type of question concerns anyone making books of 'puzzles' (and many others) where each page is the same just the numbers or words different. I have been sent to this site by two others 'puzzle' sites on here. It is inappropriate please direct me further.


title: Import a table with a specified format

text: Basically, I have a table (from a file) containing only numeric values. I would like to import in latex but it has to be formatted in a specific way, as illustrated by the picture. The ... should be replaced by the table content. For example, I have filled the 'Line 1' field with some values coming from the table. ![enter image description here](http://i.stack.imgur.com/Bv3YU.jpg) I know that pgfplotstable is a very powerful too but I can't figure how to import it correctly. The code :               \documentclass{standalone}     \usepackage{filecontents,pgfplots}          \begin{filecontents}{example.dat}         1.23 2.34  %first line         2.45 6.54  %first line         4.56 4.43  %first line         %Also numeric values for the Line 2 and Line 3     \end{filecontents}               \begin{document}          \begin{tabular}{|c|p{3cm}|p{3cm}|}     \hline         & Column 1& Column 2\\\hline     Line 1 & 1.23\newline 2.45\newline4.56 &2.34\newline 6.54\newline4.43 \\\hline     Line 2 & ...\newline ...\newline... &...\newline ...\newline...\\\hline     Line 3 & ...\newline ...\newline... &...\newline ...\newline...\\\hline     \end{tabular}          \end{document}


title: subfigures with revtex?

text: I'm writing an article using the `revtex4` document class, but it appears to be incompatible with `subfig` (which also seems to be loading `caption`). How can I title some subfigures in my `revtex4` document? The following minimal example shows how just loading `subfig` breaks the formatting of figures as defined by the document class.               \documentclass[twocolumn]{revtex4}     % Uncomment the following line to see the problem     %\usepackage{subfig}          \begin{document}     \begin{figure}     \centering       \framebox[5cm]{\raisebox{3cm}{}}     \caption{Some dummy title for my figure which should be long enough               to occupy at least a couple of lines, and maybe even a bit              more. That's good.}     \end{figure}     \end{document}      Furthermore, the `caption` package complains with the following warning               Package caption Warning: \caption will not be redefined since it's already     (caption)                redefined by a document class or package which is     (caption)                unknown to the caption package.     See the caption package documentation for explanation.      So the question is, how could I solve this problem? Is there an alternative to `subfig` which I could use together with `revtex4`?


title: getting numbers for theorems, propositions,

text: I want to number theorems (or propositions,...) as Theorem 1.1 and Theorem 1.A simultaneously in a text? In fact, I don't know how to mark some theorems (or propositions,...) as Theorem 1.A, Theorem 1.B,...? Thanks for your answers.


title: How to show the 10-final code-lines \nclines?

text: These code have any errors, but... the most question is.. how to show the nclines in psmatrix??               \documentclass[12pt,a4paper]{article}     \usepackage[top=2.5cm, left=3.5cm, bottom=2.5cm, right=2.5cm]{geometry}  % Margenes de la normativa TFG     \usepackage{lipsum}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[spanish]{babel}     \usepackage{mathtools,amsmath,amsfonts,amssymb,latexsym}     \usepackage{eurosym}     \usepackage{pstricks}     \usepackage{pst-plot,pst-3dplot,pst-node,pst-tree,pst-grad,pst-coil,pst-text,pst-3d,pst-eps,pst-fill,pstricks-add,multido}     \newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur} %del diagrama tabu          \begin{document}               \resizebox{12cm}{!}{    % if you want to resize          \psset{framearc=0.2, shadowcolor=black!70, shadowangle=-90, unit=1.0cm}     \def\pscolhookii{\hskip 2cm}     %\def\pscolhookiii{\hskip 2cm}     %\def\pscolhookiii{\psset[pst-node]{mcol = l}}          \begin{psmatrix}[rowsep=1.9, colsep=2.9]% defines the distance between two frames     %       %  \cnodeblue(0,0){0.15}{Current}       &       [name = VecinoUno1]       \psframegray(.00,.00)(3.5,1.7)         \pspolygon(0.5,0.2)(0.5,1.2)(2.3,1.2)(2.3,0.2)         \pspolygon(1.1,0.2)(1.1,1.2)(2.9,1.2)(2.9,0.2)         \pspolygon(1.7,0.2)(1.7,1.2)(2.9,1.2)(2.9,0.2)         \rput[B](0.8,0.6){3}         \rput[B](1.4,0.6){\textcolor{red}{2}}         \rput[B](2.0,0.6){\textcolor{red}{4}}         \rput[B](2.6,0.6){1}              \psbezier[linewidth=0.06cm,linecolor=red]{<->}(1.4,1.3)(1.7,1.6)(1.7,1.6)(2.0,1.3)         \rput[t](2.3,-.15){Vecino 1}         \\%[0.88cm]         &       [name = VecinoDos2]       \psframegray(.00,.00)(3.5,1.7)         \pspolygon(0.5,0.2)(0.5,1.2)(2.3,1.2)(2.3,0.2)         \pspolygon(1.1,0.2)(1.1,1.2)(2.9,1.2)(2.9,0.2)         \pspolygon(1.7,0.2)(1.7,1.2)(2.9,1.2)(2.9,0.2)         \rput[B](0.8,0.6){3}         \rput[B](1.4,0.6){\textcolor{red}{1}}         \rput[B](2.0,0.6){2}         \rput[B](2.6,0.6){\textcolor{red}{4}}         \psbezier[linewidth=0.06cm,linecolor=red]{<->}(1.4,1.3)(2.0,1.6)(2.0,1.6)(2.6,1.3)         \rput[t](2.3,-.15){Vecino 2}         \\%[0.88cm]       [name =SAc]       \psframegray(.00,.00)(3.5,1.7)         \pspolygon(0.5,0.2)(0.5,1.2)(2.3,1.2)(2.3,0.2)         \pspolygon(1.1,0.2)(1.1,1.2)(2.9,1.2)(2.9,0.2)         \pspolygon(1.7,0.2)(1.7,1.2)(2.9,1.2)(2.9,0.2)         \rput[B](0.8,0.6){3}         \rput[B](1.4,0.6){4}         \rput[B](2.0,0.6){2}         \rput[B](2.6,0.6){1}         \rput[t](2.3,-.15){Solución Actual}        &        [name =VecinoTres3]       \psframegray(.00,.00)(3.5,1.7)         \pspolygon(0.5,0.2)(0.5,1.2)(2.3,1.2)(2.3,0.2)         \pspolygon(1.1,0.2)(1.1,1.2)(2.9,1.2)(2.9,0.2)         \pspolygon(1.7,0.2)(1.7,1.2)(2.9,1.2)(2.9,0.2)         \rput[B](0.8,0.6){\textcolor{red}{1}}         \rput[B](1.4,0.6){4}         \rput[B](2.0,0.6){2}         \rput[B](2.6,0.6){\textcolor{red}{3}}         \psbezier[linewidth=0.06cm,linecolor=red]{<->}(0.8,1.3)(1.7,1.6)(1.7,1.6)(2.6,1.3)         \rput[t](2.3,-.15){Vecino 3}         \\         &        [name =VecinoCuatro4]       \psframegray(.00,.00)(3.5,1.7)         \pspolygon(0.5,0.2)(0.5,1.2)(2.3,1.2)(2.3,0.2)         \pspolygon(1.1,0.2)(1.1,1.2)(2.9,1.2)(2.9,0.2)         \pspolygon(1.7,0.2)(1.7,1.2)(2.9,1.2)(2.9,0.2)         \rput[B](0.8,0.6){\textcolor{red}{2}}         \rput[B](1.4,0.6){4}         \rput[B](2.0,0.6){\textcolor{red}{3}}         \rput[B](2.6,0.6){1}         \psbezier[linewidth=0.06cm,linecolor=red]{<->}(0.8,1.3)(1.4,1.6)(1.4,1.6)(2.0,1.3)         \rput[t](2.3,-.15){Vecino 4}     %     %%     \end{psmatrix}     %%% Links     \psset{linewidth=3pt, linecolor=red, arrows=->, nodesep=4pt,  linearc=0.25, angleB=180, shortput=nab, npos = 0.4}     \ncline[nodesepA = 3.0cm,nodesepB=0.5]{SAc}{VecinoUno1}%     \ncline[nodesepA = 4.0cm,nodesepB=0.5]{SAc}{VecinoDos2}%     \ncline[nodesepA = 4.0cm,nodesepB=0.5]{SAc}{VecinoTres3}%     \ncline[nodesepA = 4.8cm,nodesepB=0.5]{SAc}{VecinoCuatro4}%     %\ncline[nodesepA = 4.8cm,nodesepB=0.5]{SA}{Vecino5}%     }\\               \end{document}


title: How to box every digit of an integer ?

text: What is the LaTeX command for boxing a number like for example 123 as: * * * ## |1|2|3| I have seen it in a book but can't find it anywhere in TeXnicCenter, which I use.


title: Difference between \Sexpr and <<>>=

text: I am new to `sweave` and learning a lot. For the most part `\Sexpr` works well for simple variables and also calling R functions. But other times it will fail, I have found that I can get around this using the `<<>>=` command. I am interested to know what the difference is, and when I should use which one. For instance: I **can** use `\Sexpr{parc.name(parc)}` but `\Sexpr{p_curve.data.points(p_curve.data);}` **will not** work, however the following **will** work:               <<echo=false,results=tex>>=                 p_curve.data.points(p_curve.data);     @      Where the functions are defined in a seperate file using `source("filename.R")`               parc.name <- function(code) {         conn <- connect();         res <- dbGetQuery(conn, paste("SELECT displayname FROM machinepark WHERE name='", code, "' LIMIT 1", sep=""));         disconnect(conn);         res$displayname[1];     }      and               p_curve.data.points <- function(pc_data) {         rows <- length(pc_data$power);         for(i in 1:rows){             cat("(", pc_data$windspeed[i], ",", pc_data$power[i], ")");         }     }


title: tikz-cd bug in horizontal line angle in v0.9b?

text: I have found what I think is another bug in tikz-cd v0.9b. Take the following code:               \documentclass[11pt]{article}          \usepackage{amsmath} %maths     \usepackage{tikz-cd}     \usetikzlibrary{arrows}               \title{}     \date{}                                               \tikzset{        commutative diagrams/.cd,        arrow style = tikz,        diagrams={>=latex}}          \begin{document}     \begin{tikzpicture}[commutative diagrams/every diagram,column sep = 3em]            \matrix (m) [matrix of math nodes, nodes in empty cells]{            |(Names)|N'&|(N)|N\\            |(T)|T&|(TTilde)|\widetilde{T}\\            };            \path [commutative diagrams/.cd, every arrow, every label]                (Names) edge [commutative diagrams/hook] (N)                              edge node [left] {$\sigma$} (T)               (N) edge [dotted] node {$\tilde{\sigma} \text{ for unique } \tilde{\sigma}$} (TTilde)               (T) edge [commutative diagrams/hook] node [below] {$\eta_{T}$} (TTilde)            ;     \end{tikzpicture}          \end{document}        With v 0.3c we get the following output: ![All arrows correctly aligned](http://i.stack.imgur.com/MLCCu.png) However, with v 0.9b, the bottom monic arrow from T to Ttilde slants upwards slightly: ![Now the bottom arrow is wonky](http://i.stack.imgur.com/FOWe4.png) I guess the target anchor is being calculated differently, something to do with the extra height of the target object?


title: opacity and shading of an ellipse

text: I am making a picture of the tidal force effects on the Earth. My current picture is decent but I would like where the bulging occurs on the edges to be little bit darker in blue, but I don't want the dull out the sphere anymore than what it is. How can I accomplish this? I am looking to get the water color as dark as this picture: ![enter image description here](http://i.stack.imgur.com/cC6eW.png)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc,fadings,decorations.pathreplacing}     %% helper macros          \newcommand\pgfmathsinandcos[3]{%       \pgfmathsetmacro#1{sin(#3)}%       \pgfmathsetmacro#2{cos(#3)}%     }     \newcommand\LongitudePlane[3][current plane]{%       \pgfmathsinandcos\sinEl\cosEl{#2} % elevation       \pgfmathsinandcos\sint\cost{#3} % azimuth       \tikzset{#1/.estyle={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}     }     \newcommand\LatitudePlane[3][current plane]{%       \pgfmathsinandcos\sinEl\cosEl{#2} % elevation       \pgfmathsinandcos\sint\cost{#3} % latitude       \pgfmathsetmacro\yshift{\cosEl*\sint}       \tikzset{#1/.estyle={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %     }     \newcommand\DrawLongitudeCircle[2][1]{       \LongitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}        % angle of "visibility"       \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %       \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1);       \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1);     }     \newcommand\DrawLatitudeCircle[2][1]{       \LatitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}       \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}       % angle of "visibility"       \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}       \draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1);       \draw[current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:1);     }          %% document-wide tikz options and styles          \tikzset{%       >=latex, % option for nice arrows       inner sep=0pt,%       outer sep=2pt,%       mark coordinate/.style={inner sep=0pt,outer sep=0pt,minimum size=3pt,         fill=black,circle}%     }          \begin{document}     \begin{figure}[H]       \centering       \begin{tikzpicture}[line join = round, line cap = round, >=triangle 45]         \def\R{1.75} % sphere radius                                                            \def\angEl{35} % elevation angle                                                             \filldraw[ball color = green] (0,0) circle (\R);         \foreach \t in {-80,-60,...,80} { \DrawLatitudeCircle[\R]{\t} }         \foreach \t in {-5,-35,...,-175} { \DrawLongitudeCircle[\R]{\t} }         \filldraw[blue!50, opacity = .4] (0,0) ellipse (2.5cm and 1.8cm);       \end{tikzpicture}       \caption{Exaggeration of the bulge caused by the tidal force of the moon.}     \end{figure}     \end{document}


title: How to use declared TikZ functions in \foreach condition?

text: How is it possible to use a `declare function` in the condition of `\foreach`? Here's my MWE:               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}[declare function={a = 0; b = 5;}]       \foreach \x in {{a},...,{b}}{         \draw (\x,0) -- (0,\x);       }     \end{tikzpicture}     \end{document}      This gives me               Missing number, treated as zero.      (line 10, the closing bracket of the loop). One can even use declared functions in the `[options list]` of `tikzpicture` in options coming behind `declare function`, but why not simply in `\foreach`?


title: Import pictures that requires annotation

text: I am submitting a paper to a journal where the document class `svjour3` is required. Inside the paper, I want to include a picture (circles, lines, etc.) and I am going to need to mark the intersection points as A, B, C, etc. in the picture. Previously, when I was using document class `amsart`, I use TpX to prepare the picture. I forgot how that was done (it was prepared a year ago). But I had the unannotated picture (without A,B,C) in the form of .eps, and then I guess I used TpX to annotate the picture and got a file in the form of .TpX. I used the command `\input{pic.TpX}` to include the picture. With `amsart`, there was no problem. And the caption below the picture which says _Fig. 4.1_ is centered and it looks all good. But with `svjour3`, I can't seem to get the caption centered and it looks awful. Is there a way to make it happen with `svjour3`? Of course another way is to use another tool to draw pics that can be annotated and generate an eps file, as that is most commonly recognized by LaTeX. I am currently running OS system. Is there any suggestions on the tools that can make this happen under Mac OS? (I do accept solutions under Windows though.)


title: hyperref and cross-referencing

text: When you are using the `hyperref` package, it creates nice, clickable links within the PDF output when you use cross references (`\ref{chap:label}`). But, when I refer to "Section 1", only the "1" is clickable. Is there away to add arbitrary, or semi-arbitrary text to one of these references?


title: Templates for math student

text: I am going to start my math major, and I learned the basics of latex because I would like to use it to make my documents and take notes. But now I would like to find some templates to use for:   1. Annual courses notes (say, book format)   2. Homework    3. Slides and presentations   4. Short notes (say, article format)   5. Question papers  Where can I find templates complete with everything so that I have to write the material only?


title: How to create 4-up pdfs [without pdfnup, pdfpages]?

text: I use a standard KOMA-script class for creating slides [`slides.tex`]. I am wondering if there is a LaTeX package with an option to specify how the output looks like. I would like to create a 4-up .pdf version of `slides.tex` in landscape mode. I know that one could use `pdfpages`, but that would rather require to use a second .tex file containing the pdfpages instructions. I am wondering whether one can omit this additional step and directly tell `slides.tex` that the .pdf should be 4-up and landscape (?)


title: uppercase a \def

text: I'm working on an updated version of `europecv` that implements the graphical theme released in July 2013. I solved all the problems I encountered, except for being able to make uppercase strings defined in the language files. I tried to use `\uppercase`, `\MakeUppercase` and `\MakeTextUppercase` but without success. I found this question which seems like mine but the proposed solutions do not seem to work. The class and all related files are hosted on github: https://github.com/leinardi/europecv2013 What I want to achive is to make uppercase \ecv@infosectionkey.


title: How do I set only one side of a tikz node's border color?

text: I want to have a node with different border colors: One for the upper and left border, one for the lower and right color. The result should look like this: ![](http://flyx.org/files/tikznode.png) Is this possible? From all examples I found, it seems that I can only set the color as a whole, not for each side.


title: Cannot use \toprule when doing \input inside tabular -- why?

text: Using `\input` inside a `tabular` environment does not seem to work in all cases, but I don't see why. The MWE below gives the following error message:               ! Misplaced \noalign.     \toprule ->\noalign                          {\ifnum 0=`}\fi \@aboverulesep =\abovetopsep \global \@b...     l.1 \toprule      File `main.tex`:               \documentclass{standalone}     \usepackage{booktabs}          \begin{document}       \begin{tabular}{ll}       \input{inp}       \end{tabular}     \end{document}      File `inp.tex`:               \toprule     a & b \\     c & d \\     \bottomrule      The document compiles properly if the contents of `inp.tex` are pasted into the `tabular` environment. What is happening here?               \documentclass{standalone}     \usepackage{booktabs}          \begin{document}       \begin{tabular}{ll}       \toprule       a & b \\       c & d \\       \bottomrule       \end{tabular}     \end{document}      ![Result of compilation](http://i.stack.imgur.com/WGiKn.png) **EDIT** : The following question is related: Why is \input not expandable?


title: How can I keep a clean document folder with custom .cls, .sty, .bst files in a separate subfolder?

text: I am using a Makefile for generating a document from its tex source. The whole project consisting of own input files (.tex,.bib,.eps, ...) and non-pre- installed static input files (cls, sty, bst) is kept under version control (svn) for colloborative writing. I try to avoid messing up the main folder and use subdirectories for output and different kinds of input files. All files which are not available within standard texlive should be in the repository to allow everyone a simple `svn checkout` and `make` to create the document. My question is: is there any convenient way which allows me to place all .cls,.sty,.bst into a ./texmf folder with in the document tree:               document-folder/.svn/...     document-folder/docname.tex     document-folder/docname.bib     document-folder/graphics/fig-...     document-folder/texmf/<...>.cls     document-folder/output/docname.pdf     document-folder/output/docname.aux     document-folder/output/...      The Makefile looks like this               LATEX    := pdflatex     ODIR     := ./output     LATEXOPTS:= --output-dir=$(ODIR)              $(TEXFILE).pdf: $(TEXFILE).tex $(TEXFILE).bib              $(LATEX) $(LATEXOPTS) $(TEXFILE).tex      Following solution works but as colloborators have to adjust environment variables every time or their `.bashrc` for this project, I am not really happy about it:               $ export TEXINPUTS=".:./texmf:~/texmf:$TEXINPUTS"     $ make      Changing environment variables within a Makefile is not possible as far as I know.


title: How to put some comment-like text in a formula?

text: I have the following formula:               $$\bot \dashv\vdash \bot \land A  /* not derivable */$$      But the phrase `/* not derivable */` doesn't show correctly. For example there is space between `/` and `*`, but no space between `not` and `derivable`. How can I fix that?


title: Biblatex authoryear in brackets and with parenthesis around the year

text: I use square brackets around my citations (`/parencite`) from the answer to Biblatex, author-year, square brackets. So now I have > [Doe 1995] in text. But I would like to have > [Doe (1995)] in text. The way the bibliography is should not change. It now is like this: > Doe, J. (1995), ... How do I achieve this?


title: How to adapt IEEEconf layout settings

text: I am a beginner in LaTeX so I was trying out the `bare_conf.tex` provided by IEEE which uses `IEEEconf.cls`. I am trying to use this as a template for writing my own paper. However the specific details for the format of the paper that I need are a bit different from the standard IEEE conference format. Hence I was wondering how I might override few of the default layout settings provided by the IEEE template. For example, the template allows the use of a `\abstract{}` command which causes the abstract to appear in the left column with the abstract text beginning from the same line as the title "Abstract - ". However I want the abstract to appear before the column break begins, below the title, name and email of the authors and I want its font size to be different from the one specified in the IEEE template. This is just an example and there are few more places where I need to override the default IEEE template layout settings. Please let me know how I can do this which will give me starting point for my work.


title: personal caption name

text: I have a table that I would like to insert like a figure, and I want that in the caption appears "Table 1" instead of "Figure 1". This in one example of what I did:                 \documentclass[12pt,a4paper,oneside]{book}       \usepackage{graphicx}       \usepackage{caption}            \begin{document}       \begin{figure}[htbp]       \centering       \includegraphics[width=16.6cm]{table.png}       def\tablename{Table 1}{My caption}       \end{figure}       \end{document}      But it doesn't work...


title: Beamer table of contents - display all subsections below section

text: In a latex-beamer document i added the following TOC-Definition:               \AtBeginSubsection[]     {        \begin{frame}             \frametitle{Inhalts\"ubersicht}             \tableofcontents[currentsection,currentsubsection]        \end{frame}     }      Which produces a tree like this:               Section1       SubSection1     Section1       SubSection2     Section1       SubSection3     Section2       SubSection1     Section2       SubSection2      Instead i would like it to look like this:               Section1       SubSection1       SubSection2       SubSection3     Section2       SubSection1       SubSection2      How can i modify the TOC-Tree to make it look like i want? **Solved - MWE:**               \tableofcontents[          currentsubsection,          hideothersubsections,          sectionstyle=show/hide,          subsectionstyle=show/shaded,          ]


title: Biblatex's textcite inserts a breaking space between author names and citation number

text: I have the following document :               \documentclass{article}     \usepackage[backend=biber,style=numeric,maxnames=2,maxbibnames=6,firstinits]{biblatex}     \bibliography{sample}          \begin{document}     Here we want to generate a long sentence so the citation will split \textcite{fictive}.     \printbibliography     \end{document}      with corresponding bib file :               @article{fictive,         author = {John Doe and John Smith and John Carpenter and John McCain},         year = 2012,         title = {Super awesome paper},         journal = {Super awesome journal}}      The rendering of this document is such :               Here we want to generate a long sentence so the citation will split Doe et al.     [1].      With the line break exactly at the same place. This doesn't feel right. I would prefer the following, i.e. having a non-breaking space instead of a breaking space between authors and citation number :               Here we want to generate a long sentence so the citation will split Doe      et al. [1].      Writing it textually in a tex file :               Doe et al.~[1]      Anyone else agree that this is the right way to do it? How do I go about changing this?


title: Table numbering mismatch in caption and in text

text: I have created 2 tables in my LaTeX document               \begin{table}[hb]     \centering     \begin{tabular}{|c|c|r|}     \hline     ... not important...     \end{tabular}     \label{tab:2}     \caption{Določanje prioritet mojstrov znotraj registra AHB0\_EXTPRIO \cite[str.~507]{lpc3141datasheet}.}       \end{table}      and               \begin{landscape}     \begin{table}[ht]     \tiny{     \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}     ...not important...     \end{tabular}     }     \label{tab:1}     \caption{Tabela kriterijev.}     \end{table}     \end{landscape}         When i reference to this 2 tables like this               \ref{tab:1}     \ref{tab:2}      i get different numbers in text and in caption.   * **table 1** : caption nr. **3.1** , nr. in text **3.1.2** (this table is located in subsection **3.1.2** )    * **table 2** : caption nr. **3.2** , nr. in text **3.1.3** (this table is located in subsection **3.1.3** ) It looks like my tables get their subsection numbers which dont match caption numbers. Why is this? How can i solve this?


title: Custom parameters for formatting images

text: I am a LaTeX newbie working on creating my first custom LaTeX class. I would like to know if it's possible to define parameters for `\includegraphics` such as `width`, `height`, `center`/`right align` etc in the custom class, so that I don't have to retype all this for each of the image that I insert.


title: LaTeX sourcefiles older than 5 years old. XeLaTeX fails

text: When compiling a LaTeX document with XeTeX, I get the following error:               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     ! You are attempting to make a LaTeX format from a source file     ! That is more than five years old.     !     ! If you enter <return> to scroll past this message then the format     ! will be built, but please consider obtaining newer source files     ! before continuing to build LaTeX.     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!          ! LaTeX source files more than 5 years old!.     l.545 ...aTeX source files more than 5 years old!}          ?      ! Emergency stop.     l.545 ...aTeX source files more than 5 years old!}          No pages of output.      I invoked the command with `xelatex document.tex`, what am I doing wrong? LaTeX and XeTeX was installed from repos of Fedora 15, how come those sources are too old? ## Edit: I was asked to provide an example where this error occurs:               \documentclass[pdftex, paper=a4, 11pt]{scrartcl}     \title{title}     \begin{document}     %\maketitle     \section*{test}     blah blah     \end{document}      I could further simplify, if that helps...


title: Why isn't my table centering with threeparttable?

text: Can anyone help me to solve my problem with threeparttable, TPTMinimum redefinition and centering environment? I haven't seen in any other topic what I was trying to do. I have something like this:               \begin{table}     \centering     \begin{threeparttable}     \renewcommand\TPTminimum{\linewidth}     \captionsetup{font=small}          \begin{tabular}{|c|c|c|c|}     \hline\hline     {\scriptsize \textbf{Parameter}} & {\scriptsize \textbf{Value}}    & {\scriptsize \textbf{Unity}}   & {\scriptsize \textbf{Reference/Comment}}\\\hline     $\scriptstyle \tau_1$            & $\scriptstyle 10^{-2}$          & $\scriptstyle\text{dia}^{-1}$  & {\scriptsize \citet{Spratt}}\\\hline     $\scriptstyle \tau_2$            & $\scriptstyle 10^{-3}$          & $\scriptstyle\text{dia}^{-1}$  & $\scriptstyle \tau_2 \; < \; \tau_1$\\\hline     %some more lines...     $\scriptstyle \lambda$           & $\scriptstyle 4.16$             & $\scriptstyle\text{dia}^{-1}$  & {\scriptsize \citet{REF2}\tnote{2}}\\\hline     $\scriptstyle a$                 & $\scriptstyle 2 \times 10^{3}$  & {\scriptsize mg}               & {\scriptsize \citet{REF1}\tnote{1}}\\\hline     $\scriptstyle b$                 & $\scriptstyle 5 \times 10^{6}$  & {\scriptsize mg}               & {\scriptsize \citet{REF1}\tnote{1}}\\     \hline\hline     \end{tabular}     %NOTES:     \begin{tablenotes}[flushleft]\footnotesize     \item[1] I want it that way because my table isn't so big and the footnotes are getting weird the original way...     \item[2] \,Second Note!     \end{tablenotes}     \end{threeparttable}     \caption{Parameters...}     \end{table}      How does it look like: ![IMG](http://i.stack.imgur.com/SMWxh.png) How could I centralize this table? Thanks!


title: How to define, once and for all, the size of the area (for an epigraph following a chapter)?

text: I am using 'memoir' for a thesis, and I have chosen the vertical space between a chapter title and the following section to be exactly fixed, \afterchapskip being 120pt for each new chapter. What I would like to do now is to create an epigraph environment such that, for each chapter, the quote is put inside this vertical (fixed) region. EDIT: Here is a sketch of what I mean, which might make things clearer ![damn, the link is broken](http://www.use.com/images/s_3/8536c05e825e58c1ee54.jpg) The idea is to keep the vertical space between the title and the first section at 120pt, no matter the size of the quote (they'll remain short). How can I achieve this? I have tried to first 'save' the vertical space using a minipage environment of 120pt, and then put the quote inside. The problem I encounter, however, is that the actual minipage position is moved together with the main text by LaTeX, so that in the end nothing is fixed at all. The following does not work but, for your information, I have tried something like this:               %ifemptyarg[     \makeatletter     \def\ifemptyarg#1{%       \if\relax\detokenize{#1}\relax % H. Oberdiek         \expandafter\@firstoftwo       \else         \expandafter\@secondoftwo       \fi}     \makeatother     %%source: http://tex.stackexchange.com/questions/308/different-command-definitions-with-and-without-optional-argument     %ifemptyarg]          \newcommand{\chaptercustom}[4]{         \ifemptyarg{#2}         {             %if no quote is provided, just go for the usual chapter:             \chapter{#1}         }         {             %otherwise:             \renewcommand*{\afterchaptertitle}{} %remove the space normally following the chapter title             \chapter{#1} %display title                  \begin{flushright}             \noindent\begin{minipage}[b][\afterchapskip]{0.5\linewidth}             \flushright             \normalsize\normalfont                 #2\\                 \textsc{#3}\hspace{1pt}---\hspace{1pt}#4%             \end{minipage}             \end{flushright}             \renewcommand*{\afterchaptertitle}{                 \vspace{\afterchapskip} % recover the usual structure for fore-coming chapters             }         }     }      Called inside the main document via:               \chaptercustom{<CHAPTERTITLE>}{<QUOTE>}{<AUTHOR>}{<SOURCE>}      If needed, here is the chapter style I have written:               \newcommand{\afterchapskipcustomvalue}{120pt}          \makechapterstyle{myChapStyle}{         \renewcommand{\chapterheadstart}{}         \setlength{\midchapskip}{7pt}         \setlength{\afterchapskip}{\afterchapskipcustomvalue}         \renewcommand*{\chapnamefont}{\Large\scshape\MakeLowercase}         \renewcommand*{\chapnumfont}{\normalsize}         \renewcommand*{\afterchapternum}{             \vspace{\midchapskip}             \hrule         }         \renewcommand*{\chaptitlefont}{             \LARGE             \bfseries         }         \renewcommand*{\printchaptertitle}[1]{             \vspace{\onelineskip}             \chaptitlefont ##1         }         \renewcommand*{\printchapternonum}{             \vphantom{\printchaptername}             \afterchapternum         }         \renewcommand*{\afterchaptertitle}{             \vspace{\afterchapskip}         }     }      Thank you very much for your time and suggestions!


title: why isn't a blank page inserted?

text: Shouldn't the following code               \documentclass{book}          \usepackage[absolute]{textpos}          \providecommand{\insertblankpage}[0]{ \newpage \leavevmode \thispagestyle{empty} \newpage }          \begin{document}          \begin{textblock}{4}[0,0](4.3,2.5)     \begin{center}     {\Large     Bla Bla\linebreak     some text     }     \end{center}     \end{textblock}     \insertblankpage          \end{document}      output a pdf (using XeLaTeX) with two pages? (one with some text and the other one blank). Instead only one page is produced. Why is that?


title: Treat a dotted suffix as keyword in listings

text: I'm writing C++ code in latex with _listings_. I'm trying to get _listings_ to recognise the suffix `.t()` as a keyword (it means matrix transpose in the _Armadillo_ C++ library). I tried to get the `.`, `(` and `)` recognised as letters (as suggested in the _listings_ manual and here) with `alsoletter={.,(,)}` while adding `.t()` as a keyword, but it didn't work. I also saw a solution which involved defining the keyword as a comment, which I would rather not do, because I need comments for different purposes. Below is a minimal reproducible example:               \documentclass[10pt,a4paper,]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[usenames,dvipsnames]{xcolor}          \usepackage{listings}          \lstnewenvironment{Cppinput}[1][]{      \lstset{%        language={C++},        alsoletter={.,(,)}, % I also tried {.t()}        morekeywords={mat, .t() , ones},        morecomment=[l]//,        basicstyle= \ttfamily,        keywordstyle= \color{BrickRed},          frame=single,         #1      }     }{}               \begin{document}          \begin{Cppinput}     using namespace arma;           mat A;     mat B;     mat C,          A = B + ones<mat>(n,1) + C.t();     // the ".t()" should be highlited as a keyword.     \end{Cppinput}          \end{document}      I have a hunch that the solution may involve `alsoother=()`, but I can't undertand its syntax from the manual and it didn't word in my example as `alsoother=(.t())`


title: Frutiger font in TexLive 2011 and Lion OS

text: I tried to install the Frutiger font on TexLive 2011 using Lion OS. I followed this guide:   1. Copy the file frutiger.tar.gz to the folder `/usr/local/texlive/texmf-local`.   2. Unzip the file.   3. Open a shell and execute:              sudo updmap-sys --enable Map=/usr/local/texlive/texmf-local/dvips/base/frutiger.map When I try to generate a PDF that uses Frutiger font, I get the following error:               !pdfTeX error: /usr/texbin/pdflatex (file pfrr8r): Font pfrr8r at 540 not found           ==> Fatal error occurred, no output PDF file produced! Any hints how to solve that?


title: How to prevent \endlinechar=-1 from interfering a loaded EPS image?

text: I have to work in a block that begins with `\endlinechar=-1\relax` removing any space at the end of each line. After the `\endlinechar=-1\relax`, there will be codes related to loading an image (EPS,PNG,JPG,PDF) and drawing geometric objects (by PSTricks). Unfortunately `\endlinechar=-1\relax` disrupts the structure of the loaded EPS image as follows. ![enter image description here](http://i.stack.imgur.com/QM4aM.png)               % Trash.tex     \documentclass{standalone}          \usepackage{graphicx}          \begin{document}     \endlinechar=-1\relax     % other settings go here     % ...     \includegraphics{Image.eps}% extension is explicitly specified to emphasize that it is an EPS image!     % other codes go here     % ...     \end{document}      How to prevent `\endlinechar=-1\relax` from interfering the loaded EPS image? Note: this issue only occurs when loading EPS. Loading PDF or JPG has been tested and there is no problem.


title: floating a tabular in a tabular using minipage

text: I am able to build the tex just fine, and using the minipage allowed the content on the right to float correctly over the given "blank space" that I was trying to take advantage of by doing this but the content on the left is still getting being affected by this. My goal would be to have the "Miscellaneous" mutlicolumn float over the whole integral multicolumn, so I can take advantage of this wasted space. Here is the section in question. I am also still new to latex fwiw. _*_ *edit, I've included the entire document as per requested               \documentclass[8pt,letterpaper]{extarticle}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{multirow}     \usepackage{array}     \usepackage{tikz}     \usepackage{graphicx}     \usepackage[hmargin={0in,0in},vmargin={0in,0in},portrait]{geometry}     \usepackage{setspace}     \usepackage{float}     \DeclareMathOperator{\sech}{sech}     \DeclareMathOperator{\csch}{csch}     \author{Jon}     \begin{document} % Beginning of Document     \begin{spacing}{1.3}          \begin{flushright}%unit circle     \begin{tabular}{c}      \multicolumn{1}{c}{Trig} \\     \scalebox{0.43}{         \begin{tabular}{c}         \begin{tikzpicture}         [scale=3.8,cap=round,>=latex]         % draw the coordinates         \draw[->] (-1.5cm,0cm) -- (1.5cm,0cm) node[right,fill=white] {$x$};         \draw[->] (0cm,-1.5cm) -- (0cm,1.5cm) node[above,fill=white] {$y$};              % draw the unit circle         \draw[thick] (0cm,0cm) circle(1cm);              \foreach \x in {0,30,...,360} {                 % lines from center to point                 \draw[gray] (0cm,0cm) -- (\x:1cm);                 % dots at each point                 \filldraw[black] (\x:1cm) circle(0.4pt);                 % draw each angle in degrees                 \draw (\x:0.6cm) node[fill=white] {$\x^\circ$};         }              % draw each angle in radians         \foreach \x/\xtext in {             30/\frac{\pi}{6},             45/\frac{\pi}{4},             60/\frac{\pi}{3},             90/\frac{\pi}{2},             120/\frac{2\pi}{3},             135/\frac{3\pi}{4},             150/\frac{5\pi}{6},             180/\pi,             210/\frac{7\pi}{6},             225/\frac{5\pi}{4},             240/\frac{4\pi}{3},             270/\frac{3\pi}{2},             300/\frac{5\pi}{3},             315/\frac{7\pi}{4},             330/\frac{11\pi}{6},             360/2\pi}                 \draw (\x:0.85cm) node[fill=white] {$\xtext$};              \foreach \x/\xtext/\y in {             % the coordinates for the first quadrant             30/\frac{\sqrt{3}}{2}/\frac{1}{2},             45/\frac{\sqrt{2}}{2}/\frac{\sqrt{2}}{2},             60/\frac{1}{2}/\frac{\sqrt{3}}{2},             % the coordinates for the second quadrant             150/-\frac{\sqrt{3}}{2}/\frac{1}{2},             135/-\frac{\sqrt{2}}{2}/\frac{\sqrt{2}}{2},             120/-\frac{1}{2}/\frac{\sqrt{3}}{2},             % the coordinates for the third quadrant             210/-\frac{\sqrt{3}}{2}/-\frac{1}{2},             225/-\frac{\sqrt{2}}{2}/-\frac{\sqrt{2}}{2},             240/-\frac{1}{2}/-\frac{\sqrt{3}}{2},             % the coordinates for the fourth quadrant             330/\frac{\sqrt{3}}{2}/-\frac{1}{2},             315/\frac{\sqrt{2}}{2}/-\frac{\sqrt{2}}{2},             300/\frac{1}{2}/-\frac{\sqrt{3}}{2}}                 \draw (\x:1.25cm) node[fill=white] {$\left(\xtext,\y\right)$};              % draw the horizontal and vertical coordinates         % the placement is better this way         \draw (-1.25cm,0cm) node[above=1pt] {$(-1,0)$}               (1.25cm,0cm)  node[above=1pt] {$(1,0)$}               (0cm,-1.25cm) node[fill=white] {$(0,-1)$}               (0cm,1.25cm)  node[fill=white] {$(0,1)$};     \end{tikzpicture}     \end{tabular}     } \\     \end{tabular}      \end{flushright}%End unit circle          \begin{tabular}{l l l l} %Derivates         \multicolumn{4}{c}{\textbf {\underline {Derivatives}}} \\         \textbf {\underline {Trig}} & \textbf {\underline {Inverse Trig}} & \textbf {\underline {Hyperbolic Trig}} & \textbf {\underline {Exponential/Log}}  \\         $ \frac{d}{dx}\left(\sin x\right)=\cos x $         & $ \frac{d}{dx}\left(\sin^{-1} x\right)=\frac{1}{\sqrt{1-x^2}} $         & $ \frac{d}{dx}\left(\sinh x\right)=\cosh x $         & $ \frac{d}{dx}\left(a^x\right)=a^x \ln a $         \\ %end row1              $ \frac{d}{dx}\left(\cos x\right)=-\sin x $          & $ \frac{d}{dx}\left(\cos^{-1} x\right)=\frac{1}{\sqrt{1-x^2}} $         & $ \frac{d}{dx}\left(\cosh x\right)=\sinh x $         & $ \frac{d}{dx}\left(e^x\right)=e^x $         \\ % end row2              $ \frac{d}{dx}\left(\tan x\right)=\sec^2 x $          & $ \frac{d}{dx}\left(\tan^{-1} x\right)=\frac{1}{\sqrt{1+x^2}} $         & $ \frac{d}{dx}\left(\tanh x\right)=\sech^2 x $         & $ \frac{d}{dx}\left(\ln x\right)=\frac1 x , x > 0$         \\ %end row3              $ \frac{d}{dx}\left(\sec x\right)=\sec x \tan x $          & $\frac{d}{dx}\left(\sec^{-1} x\right)=\frac{1}{|x|\sqrt{x^2-1}}$         & $ \frac{d}{dx}\left(\sech x\right)=-\sech x \tanh x $         & $ \frac{d}{dx}\left(\ln |x|\right)=\frac1 x , x \neq 0$         \\%end row4              $ \frac{d}{dx}\left(\csc x\right)=-\csc x \cot x $          & $\frac{d}{dx}\left(\sec^{-1} x\right)=\frac{1}{|x|\sqrt{x^2-1}}$         & $ \frac{d}{dx}\left(\csch x\right)=-\csch x \coth x $         &          \\%end row5              $ \frac{d}{dx}\left(\cot x\right)=-\csc^2 x $          & $ \frac{d}{dx}\left(\cot^{-1} x\right)=\frac{1}{\sqrt{1+x^2}} $         & $ \frac{d}{dx}\left(\coth x\right)=-\csch^2 x $         &         %end row6     \end{tabular} %end of Derivates     %\begin{doublespace}         %emptyspace     %\end{doublespace}     \begin{tabular}[!htp]{l l} % Identities/Substitution         \multicolumn{2}{c}{\textbf {\underline {Identities/Substitution}}} \\         \textbf {\underline {Trig/Hyperbolic Trig}} & \textbf {\underline {Exp/log}} \\         $ \sqrt{a^2-b^2x^2} \Rightarrow x=\frac{a}{b} \sin \theta$         &$e^{- \infty} =0$         \\              $ \sqrt{a^2+b^2x^2} \Rightarrow x=\frac{a}{b} \tan \theta$         &$\pm \ln 0= \mp \infty$         \\              $ \sqrt{b^2x^2-a^2} \Rightarrow x=\frac{a}{b} \sec \theta$         & $\ln e = 1$         \\              $\sinh = \frac{1}{2} \left( e^x - e^{-x} \right)$         &$ \sum\limits_{n=0}^{\infty} = \frac{x^n}{n!} $         \\              $\cosh = \frac{1}{2} \left( e^x + e^{-x} \right)$         &         \\               $\sin^2 \theta + \cos^2 \theta = 1$         &         \\                   $\tan^2 \theta + 1 = \sec^2 \theta$         &         \\                   $\cot^2 \theta +1 = \csc^2 \theta$         &         \\          \end{tabular} %end identities/Substitution          \begin{tabular}{l l l l} %Integrals         \multicolumn{4}{c}{\textbf {\underline {Integrals}}} \\         \textbf {\underline {Trig}} & \textbf {\underline {Inverse Trig}} & \textbf {\underline {Hyperbolic Trig }}& \textbf {\underline {Exponential/Log}}\\              $ \int \cos u du = \sin u +c$         & $\int \frac{1}{\sqrt{a^2+u^2}}du = \frac1 a \sin^{-1} \left( \frac u a \right) +c$         &$\int \sinh u du=\cosh u+c$         & $\int \frac1 x dx \equiv \int x^{-1} =\ln|x|+c $         \\%end row1              $ \int \sin u du = -\cos u +c$         &$\int \frac{1}{a^2+u^2}du = \frac1 a \tan^{-1} \left( \frac u a \right) +c$         &$\int \cosh u du=\sinh u+c$         & $ \int \frac{1}{ax+b}dx=\frac1 a \ln |ax+b|+c$         \\%end row2              $ \int \tan u du = \ln |\sec u| +c$         &$\int \frac{1}{u \sqrt{u^2-a^2}}du = \frac1 a \sec^{-1} \left( \frac u a \right) +c$         &$\int \tanh u du=\ln (\cosh u)+c$         &$\int a^u du= \frac{a^u}{\ln a}+c$         \\%end row3              $ \int \sec u du = \ln |\sec u + \tan u|+c$         &         &$\int \sech u du=\tan^{-1}| \sinh u| +c$         &$\int e^u du =e^u +c$         \\%end row4              $ \int \csc u du = \ln |\csc u - \cot u|+c$         &         &$\int \sech u \tanh u du=-\sech u +c$         &$\int ue^u du =(u-1)e^u +c$         \\%end row5              $ \int cot u du = \ln |\sin u |+c$         &         &$\int \csch u \coth u du=-\csch u +c$         &$\int \ln u du = u \ln (u) - u+c$         \\%end row6              $ \int \sec u \tan u du = \sec u +c$         &         &$\int \sech^2 du=\tanh u +c$         &$\int \frac{1}{u \ln u}du = \ln| \ln u |+c$         \\%end row7              $ \int \csc u \cot u du =-\csc u +c$         & \begin{minipage}[t]{2in}             \begin{tabular}[t]{l}                 \multicolumn{1}{l}{\textbf {\underline {Miscellaneous}} }\\                 $\int \frac{1}{a^2-u^2}du = \frac{1}{2a}\ln | \frac{u+a}{u-a}|+c$                 \\                 $\int \frac{1}{u^2-a^2}du = \frac{1}{2a}\ln | \frac{u-a}{u+a}|+c$                 \\                 $\int \sqrt{a^2+u^2}du =\frac{u}{2} \sqrt{a^2+u^2}+ \frac{a^2}{2} \ln|u+ \sqrt{a^2+u^2}|+c $                 \\                 $\int \sqrt{u^2-a^2}du =\frac{u}{2} \sqrt{u^2-a^2}- \frac{a^2}{2} \ln|u+ \sqrt{u^2-a^2}|+c $                 \\                 $\int \sqrt{a^2-u^2}du =\frac{u}{2} \sqrt{a^2-u^2}+ \sin^{-1} \left( \frac{u}{a} \right)+c $             \end{tabular}         \end{minipage}         &$\int \csch^2 du=-\coth u +c$         &          \\%end row8              $ \int \sec^2 u du = \tan u +c$         &         &         &         \\%end row9              $ \int \csc^2 u du = -\cot u +c$         &         &         &         \\%end row10              $\int \cot^2u du = -x - \cot u +c$         &         &         &         \\%end row11              &         &         &         \\ %end row 12              &         &         &         \\%end row13                   &         &         &         \\%end row14               \end{tabular} %end integrals           \end{spacing}      \end{document} % End of Document


title: pdfTex Miktex/Tex Live 2010 version difference

text: We are having difficulties running PDF-XChange Viewer with `pdflatex`. With configuration MiKTeX the viewer works fine but with TeX Live 2010 the viewer crashes on windows xp sp3. Any ideas what the difference in `3.1415926-1.40.11-2.2` `3.1415926-2.3-1.40.12` could be that makes one crash the other not? Any idea how to update TeX Live 2010 to 2011? Uninstall old, install new? Thanks. **TeX Live 2010** pdflatex -version               pdfTeX 3.1415926-1.40.11-2.2 (Web2C 2010)     kpathsea version 6.0.0     Copyright 2010 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.4.3; using libpng 1.4.3     Compiled with zlib 1.2.5; using zlib 1.2.5     Compiled with xpdf version 3.02pl4      and **MiKTeX** `This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2011.6.29)`


title: TeXLive 2011 - Windows XP installation

text: I've been searching for installation files for TL **2011** and been reading people using it but on the official site I can only download tl-manager for 2010. Can someone post the resources/links, please?


title: TeXLive 2010 - manual uninstall on Windows

text: Accidentally, after executing the "remove program" command in the `control panel/add remove programs/Tex Live 2010`, I deleted the installation folder under `C:\`, too, manually. But the program is not removed entirely, since I got error messages about version conflict with existing TL 2010 installation while trying to set up TL 2011.               Installing TeX Live 2011 from: http://www.bitlib.net/mirror/ctan/systems/texlive/tlnet     Platform: win32 => 'Windows'     Distribution: net  (downloading)     Using URL: http://www.bitlib.net/mirror/ctan/systems/texlive/tlnet     Directory for temporary files: C:/DOCUME~1/User/LOCALS~1/Temp     Loading http://www.bitlib.net/mirror/ctan/systems/texlive/tlnet/tlpkg/texlive.tlpdb     '""C:\Documents' is not recognized as an internal or external command,     operable program or batch file.     C:\Documents and Settings\User\Desktop\install-tl\install-tl-20110630\install-tl: The TeX Live versions of the local in     stallation     and the repository being accessed are not compatible:           local: 2011      repository: 2010     Perhaps you need to use a different CTAN mirror?     Press any key to continue . . .      So, I don't know how to manually remove my TL 2010 installation. Anyone literate about references and tutorials which files are to be removed, where they are located, which registry keys to delete and what else to do to remove TL 2010 completely?


title: How to show the \title headings in ToC?

text: My document is organized as following:               \title[Some title]     \section[Section 1]     \section[Section 2]      etc. When I use `\completecontents` command to print a ToC, I only get the section titles (which are numbered) and not the titles (`\title` entries). Is there a way to tell ConTeXt to print `\title` entries into ToC? Ideally, I prefer a table of contents that looks something like this: > **Some Title** > >   1. Section 1 xx 2. Section 2 yy > > > **Another Title** > >   1. Section in second title zz >


title: Heading width are wrong if they are defined in a class

text: I created a new class based on the book class. In this class I use the package fancyhdr in order to define some heading content. In my document, I load my new class and then I set the page dimensions with the geometry package. The problem is that the heading do not span all the page width. I did already observed that for example if you defined heading before you load geometry package. But here, as heading are defined in the class I cannot load geometry before. How can I fix this ? Thanks


title: Chapter heading

text: I was trying to personalize the chapter and section headings using `titlesec` for my master thesis using the following code               \documentclass{book}     \usepackage{tikz}     \usepackage{titlesec}     \usepackage{lipsum}          \makeatletter     \titleformat{\chapter}[display]     {}% format     {\raggedleft \@chapapp{} \thechapter}% label     {1ex}           % sep     {\raggedleft \Huge \scshape \bfseries}  % before     [\normalfont {\tikz \shade[left color=blue!20,right color=blue, shading angle=45] (0,0) rectangle (\textwidth,5pt);}]% after     \makeatother          \begin{document}     \chapter{Introduction}     \lipsum[1]     \end{document}      Which gives the following output ![result](http://i.stack.imgur.com/f60wJ.png) What I want is simply to remove the space between the chapter name and the TikZ drawing and define the vertical space between the drawing and the text (the only one I can get to work is between the chapter and the chapter name). Also which is best for this, `titlesec` or define all of this as a class file? I've also tried the second option with similar problems:               \documentclass{book}     \makeatletter     \usepackage{tikz}     \usepackage{palatino}     \usepackage[T1]{fontenc}     \usepackage{titlesec}     \def\@makechapterhead#1{%     \vspace*{10\p@}%     {\parindent \z@ \raggedleft \reset@font%     \@chapapp{} \thechapter\par\nobreak%     {\Huge \scshape \bfseries #1\par\nobreak%     \vspace{5pt}     {\tikz \shade[left color=blue!20,right color=blue, shading angle=45] (0,0) rectangle (\textwidth,5pt);}}\par\nobreak%     \vspace{40pt}     }}%     \begin{document}     \chapter{Introduction}     \chapter{Internal Structure}     \section{Internal Strut}     %\section{part 1}     \end{document}


title: plotting the sequence x_n using tikz

text: I want to plot the sequence   * x_1 = \sin(pi root(2))   * x_2 = \sin(pi root(6))   * x_3 = \sin(pi root(12)) In short my x_n = sin( pi root(n^2 + n)). I want to plot this as an animation as n goes to infinity. Can i have the command line arguments for plotting this animation using TikZ package


title: How to do shell-escape in TeXWorks?

text: I know this question has been asked a lot of times, however I can't seem to fix my problem. My problem is as follows, I am using MikTex 2.9 and TeXWorks and I try to add the `\--enable-write18` to enable shell-escape however the output gives:               texify: --enable-write18 unknown option      I added it to: Preferences > Typesettings and then pdfLaTeX and selected edit and then added it to the parameter list. Thanks


title: mdframed+tikz to display overfullrule

text: This may or may not be a bug, so I'll first ask it here before reporting. In the following test case:               \documentclass{article}     \usepackage[framemethod=tikz]{mdframed}          \overfullrule=5pt          \def\sentence{%       to be the morphism from $\delta^*$ to $(\delta')^*$ (resp.\ to       $(\delta'')^*$) such that $h'((p', p'')a(q', q''))$}          \begin{document}          \begin{mdframed}[hidealllines=true]       \sentence     \end{mdframed}          \begin{mdframed}[rightline=false,topline=false]       \sentence     \end{mdframed}          \end{document}      the overfullrule is drawn only in the first mdframed. How can I make it work in the second one too? This silent ignoring of overfullrule can be really dangerous... Thanks!   * TeXlive 2012.26892-2 on Arch Linux   * latest mdframed from GitHub (1.6c, mdframed.dtx 436 2012-06-23 09:49:13Z marco)


title: How to remove default line spacing

text: I have a weird problem with my latex system. I compiled my latex code with the following document definition               \documentclass[a4paper, 10pt]{article}      But the result is too much white space between two consecutive lines. What else should I do to get no spacing?


title: How to put tikzpicture aligned with the footerline?

text: I would like to put a tikzpicture near the footer line. The tikzpicture is used to show the page number on top of an image. The problem i am having is the tikzpicture is centered on the footer.               \documentclass[12pt]{article}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{fancyhdr}     \pagestyle{fancy}          \definecolor{light-blue}{RGB}{0,175,236}          \fancyhf{}     \fancyheadoffset{0in} % Ajust the header/footer width with the set margins.     \addtolength{\footskip}{0.6cm}     \renewcommand{\footrulewidth}{1pt}     \renewcommand{\footrule}{{\color{light-blue}%        \vskip-\footruleskip\vskip-\footrulewidth        \hrule width\headwidth height\footrulewidth\vskip\footruleskip}}          \rfoot{\begin{tikzpicture}     \node (image) at (0,0) {\includegraphics[width=0.297in,height=0.353in]{pagenumber.png}};     \node[align=center,white] at (image.center) {\thepage};     \end{tikzpicture}}     \usepackage[left=0.75in,top=1.5in,right=0.75in,bottom=1in]{geometry}          \begin{document}     some text     \end{document}


title: colorbox and text placement

text: I was playing up with `\colorbox` for my resume and really loved the way I can create styling for the document. Anyway I was trying to center align the text but failed to achieve it using the `\centering` command and if I use `\begin{center}` to allign the text, `\colorbox` width increase two fold which I don't want.               \newcommand \reshead [1]{\par \noindent \colorbox{black}{\begin{minipage}      {\textwidth}{\color{white} \centering \bfseries {#1}} \hfill \end{minipage}}}      Apart from this issue, I wanted to my resume to look like this, the top line should be lesser in length compared to `\colorbox` ![enter image description here](http://i.stack.imgur.com/y6Eo4.png) However with my code both are equal, is there a way I can stretch the `\colorbox` a bit more.? -               %% (c) Shashwat Pant     %% Resume - C.V of Shashwat Pant     %% September 17th 2012          \documentclass[letterpaper,12pt]{article}     %\usepackage[charter]{mathdesign}     % \usepackage{charter}     % \usepackage{mathpazo}     %\usepackage{kpfonts}     %\usepackage{geometry}     \usepackage{palatino}     \usepackage{url}     \usepackage[empty]{fullpage}     \usepackage{color}     %\definecolor{mygrey}{gray}{0.95}     %\usepackage{xcolor}          \newcommand \reshead [1]{\par \noindent \colorbox{black}{\begin{minipage}{\textwidth}{  \color{white} \centering \bfseries {#1}} \hfill \end{minipage}}}               \begin{document}          \begin{center}          \bfseries {\huge {Shashwat Pant}} \\     \bfseries E-Mail - shashwat.pant@gmail.com ~ Voice -         \hrule \hrule      \end{center}          \noindent Seeking a challenging career to gain experience in rich evolving computing in the areas of :       \begin{itemize}          \item          \item Parallel and Vector computing (Open CL)          \end{itemize}                  \reshead{Professional Profile}                    \end{document}      With my code the output look like this ![enter image description here](http://i.stack.imgur.com/pR637.png) Is there a way to stretch the `colorbox` and underlying text a bit towards left so that are not in same symmetry?


title: Generating a box inside algorithm in beamer

text: I would like to create two boxes (or two frames) and one arrow which goes from the center of right side of one box and do half a circle and point on the other box. Below is an example of code:               \documentclass{beamer}     \usepackage{algorithm,algpseudocode}     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{xcolor}     \makeatletter          \begin{document}          \begin{frame}      \begin{algorithm}[H]     \begin{algorithmic}     \State $y \leftarrow 1$     % Start box 1     \If{$n < 0$}     \State $X \leftarrow 1 / x$     \State $N \leftarrow -n$     \Else     \State $X \leftarrow x$     \State $N \leftarrow n$     \EndIf     %End box 1     %Start box 2     \While{$N \neq 0$}     \If{$N$ is even}     \State $X \leftarrow X \times X$     \State $N \leftarrow N / 2$     \Else[$N$ is odd]     \State $y \leftarrow y \times X$     \State $N \leftarrow N - 1$     \EndIf     \EndWhile     % End box 2     \end{algorithmic}     \end{algorithm}     \end{frame}     \end{document}      How could I create a box around the first `\If` condition (until `\EndIf`) and around while condition and then an arrow from the center of the right side of of the "if condition" to the "while condition" box?


title: \hangindent does not work when using adjustwidth environment

text: I am trying to format part of a LaTeX document that should have the first line flush left, the second line should be indented, and then there should be a bullet list. Additionally, I would like to put some left and right padding around the block. In order to apply the padding, I am trying to use the `changepage` package and `adjustwidth` environment. Unfortunately, what I find is that when I use `adjustwidth`, the effect of `hangindent` is nullified. I have tried many permutations of `\hangindent`, `\hangafter`, `\leftskip`, `\rightskip`, `\setlength`, etc. but have not yet seemed to find a combination that works. Here is a minimum working example of both what the text should look like without padding and then the problem that is introduced when padding is added:               \documentclass[letterpaper,10pt]{article}     \usepackage[strict]{changepage}     \usepackage{paralist}     \begin{document}          \section*{How it should look, though I'd like to add some padding to the left and right.}     \noindent \textbf{A title of some sort} \\     \hangindent=\parindent Some descriptive text \\     \vspace{-\baselineskip}     \begin{compactitem}         \item Bullet point 1         \item Bullet point 2         \item Bullet point 3     \end{compactitem}            \section*{Adding padding using adjustwidth causes the hanindent to fail.}     \begin{adjustwidth}{5em}{5em}         \noindent \textbf{A title of some sort} \\         \hangindent=\parindent Some descriptive text that should be indented.\\         \vspace{-\baselineskip}         \begin{compactitem}             \item Bullet point 1             \item Bullet point 2             \item Bullet point 3         \end{compactitem}       \end{adjustwidth}          \end{document}      ![enter image description here](http://i.stack.imgur.com/18UDq.png) You will find that the second instance of `Some descriptive text that should be indented` is flush left with `A title of some sort` on the previous line. It should, however, be indented to the same position as the bullets below it. If you don't see this problem, please message me and I can send the pdf through a private message/email. Any advice or workarounds for this issue is greatly appreciated.


title: drawing a line without coordinates

text: I want to draw a line that goes through a point A en B but does not stop at A nor at B. Can anybody help. I want to use it for constructions in optics.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{intersections}     \begin{document}     \begin{tikzpicture}       \draw[very thin, dotted, color=gray,step= 0.5 cm] (-12.1,-5.1) grid (12.1,5.1);       \draw (-12.1,0) -- (12.1,0) ;       \draw [<->, ultra thick] (0,-3.2) -- (0,3.2) ;       \coordinate (L1) at (0,3);       \coordinate (L2) at (0,-3);       \coordinate (L3) at (0,1.5); %evenwijdig met hoofdas       \coordinate (V1) at (9,0);       \coordinate (V2) at (9,1.5);       \coordinate (F1) at (4,0);       \coordinate (F2) at (-4,0);       \draw [->, thick] (V1) -- (V2) node[right] {voorwerp};       \fill (F1) circle (2pt) node[below] {$f_1$};       \fill (F2) circle (2pt) node[below] {$f_2$};       \draw [name path=A--B] (V2) -- (L3);       \draw [name path=C--D] (L1) -- (L2);       \path [name intersections={of=A--B and C--D,by=E}];       \node [fill=red,inner sep=1pt,label=-90:$E$] at (E) {};       \draw [name path=K--L] (E) -- (F2);       \line(4,2){6};     \end{tikzpicture}     \end{document}


title: Logarithmic scaling of picture in tikz

text: I'm looking for something along the lines of               \begin{scope}[scaling=logarithmic]     ...     \end{scope}      The reason is, that I'm trying to visualise whether the Minkowski sums of some specific sets in R^2 (with sort of dyadic partitioning) with balls of a certain radius intersect. The problem is that through this dyadic (i.e. exponential) scaling, things rapidly get indecipherable. I've illustrated the general idea of the plot in the following picture (which uses comparatively small scales and is not representative of what I hope to illustrate). ![enter image description here](http://i.stack.imgur.com/YHETG.jpg) I'd like to scale down everything - arcs and all - logarithmically (without the Minkowski sums I could just do this manually, but transforming the shells correctly seems like a huge pain), but I haven't found anything about logarithmic scaling except for axes. **[Edit]** After some clarifying comments about what I actually mean by logarithmic scaling; I'd prefer to transform the whole picture (in polar coordinates) as `(r,phi)->(log(r+1),phi)`, or alternatively (in Cartesian coordinates) as `(x,y)->(log(|x|+1),log(|y|+1)`. **[/Edit]** Since the transformation is nonlinear, I suspect one might have to go into PGF? I tried looking in this direction as well - also to no avail, unfortunately. My code for the plot is:               \documentclass{article}     \usepackage{fullpage}     \usepackage[english]{babel}          \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          \begin{tikzpicture}[scale=1/4]     \clip (-2.5,-2.5) rectangle (35,18);     \begin{scope}[very thin,<->]         \draw (-2.5,0) -- (35,0);         \draw (0,-2.5) -- (0,18);     \end{scope}     \foreach \j in {1,...,5} \draw[red] (0,0) circle (2^\j);          \foreach \r / \i [evaluate=\r as \ang using 90/\r] in {8/5,16/3} % radius and number of slice     {     \begin{scope}[rotate={(\i-1)*\ang}]         \draw (-\ang:\r/2) arc (-\ang:\ang:\r/2) -- (\ang:2*\r) arc (\ang:-\ang:2*\r) -- cycle;         \foreach \m in {2} % usually more             {% different code if \m>\r/2             \draw ($(-\ang:\r/2)+(-\ang-90:\m)$) arc (-\ang-90:-\ang-180:\m)             arc (-\ang:\ang:\r/2-\m) arc (\ang+180:\ang+90:\m)             -- ($(\ang:2*\r)+(\ang+90:\m)$) arc (\ang+90:\ang:\m)             arc (\ang:-\ang:2*\r+\m) arc (-\ang:-\ang-90:\m) -- cycle;             };     \end{scope}     };     \end{tikzpicture}     \end{document}      **Update:** After @percusse's answer showing me how it's done in principle, there are still a few issues left. I'm updating this post because it's way too long for a comment. The most important thing is that the nonlinear transformation messes up the existing coordinate transformations. This was to be feared, but I hope there is a way to execute all available linear transformations (or better, those within a scope) and then the nonlinear one. This is particularly relevant for longer paths, where the transformations are updated along the way (see example below). Also, linear transformation _outside_ of a scope containing the nonlinear transformation should still apply to the result (in an ideal world). I found a command in the `pgfmanual` - `\pgfpointtransformednonlinear{<point>}`, which > Works like \pgfpointtransformed, but also applies the current nonlinear > transformation; that is, it first applies the current linear transformation > and then the current nonlinear transformations This seems to do what should be necessary - but it's only for points and there's no mention of a similar command for paths... Since I figured that nonlinear transformations are conceptually different, I tried extracting the current linear transformations and feeding it to tikz as a nonlinear one, but it didn't really work. I can post the code if someone is interested - it's based on `\def\lintransformation#1#2#3#4#5#6{...` which is called with the output of `\pgfgettransformentries`. To answer percusse's question, how the result should look like approximately, I attach the following two plots. In the example, the inner region is built around radius `2^4`, which means that (due to the construction) its radial border should be bounded by `2^3` and `2^5`, resp. the red lines corresponding to `3` and `5` in the log plot. Two telltale signs that something is not working is if one of the following is violated: the transformation should keep the symmetry along the ray around which the support is built (in the unrotated case below, this is the `x`-axis) and _cannot introduce new intersections_ compared to the case where there's no transformation! Code for the picture:               \documentclass{article}     \usepackage[english]{babel}     \usepackage{tikz}     \usetikzlibrary{calc}          \usepgfmodule{nonlineartransformations}     \makeatletter     \def\logtransformation{%     \pgfmathveclen{\pgf@x}{\pgf@y}%     \pgfmathparse{log2(\pgfmathresult/28.4+1)}% factor accounts for pt2cm conversion     %\pgfmathlogtwo{\pgfmathresult}% command not found although it's in the documentation?!     \pgf@xa=\pgfmathresult pt% somehow faster than using cm     \pgfmathatantwo{\pgf@y}{\pgf@x}%     \pgfmathsincos@{\pgfmathresult}%     \pgfmathmultiply{\pgf@xa}{\pgfmathresultx}\pgf@x=\pgfmathresult cm% USED CM AS UNITS TO SCALE UP !!!     \pgfmathmultiply{\pgf@xa}{\pgfmathresulty}\pgf@y=\pgfmathresult cm% USED CM AS UNITS TO SCALE UP !!!     }     \makeatother          \begin{document}     % complicated version - no long paths     \begin{tikzpicture} %[scale=1/2]     % try uncommenting scale - doesn't affect what is transformed by \logtransformation          \clip (-1,-3) rectangle (6,3);     \draw[<->] (-6,0) -- (6,0);     \draw[<->] (0,-6) -- (0,6);          % the reason I do this before the transformation is to see how it corresponds to the     % untransformed values - this is how I found the factor ~28, which I was able to guess     % had to do with a unit conversion, allowing me to find the exact value.     \foreach \j in {3,5} % dyadic scales below and above the given radius     {         \pgfmathparse{log2(2^\j+1)}% instead of radius \j, incorporates `+1` of \logtransformation         \draw[red] circle (\pgfmathresult); % strange: no coordinates! If given, takes y-value as radius!     }          \foreach \r / \i [evaluate=\r as \ang using 90/\r] in {2^4/5} % radius and number of slice     {     \begin{scope} %[rotate={(\i-1)*\ang}]         % try uncommenting rotation - works         \pgftransformnonlinear{\logtransformation}         \draw (-\ang:\r/2) arc (-\ang:\ang:\r/2);         \draw (\ang:\r/2) -- (\ang:2*\r);         \draw (\ang:2*\r) arc (\ang:-\ang:2*\r);         \draw (-\ang:2*\r) -- (-\ang:\r/2);         \foreach \m in {2} % also works for \m=\r/2!         {             \draw ($(-\ang:\r/2)+(-\ang- 90:\m)$) arc (-\ang- 90:-\ang-180:     \m);             \draw ($(-\ang:\r/2)+(-\ang+180:\m)$) arc (-\ang    : \ang    :\r/2-\m);             \draw ($( \ang:\r/2)+( \ang+180:\m)$) arc ( \ang+180: \ang+ 90:     \m);             \draw ($( \ang:\r/2)+( \ang+ 90:\m)$) -- ($( \ang:2*\r)+( \ang+90:\m)$);             \draw ($( \ang:2*\r)+( \ang+ 90:\m)$) arc ( \ang+ 90: \ang    :     \m);             \draw ($( \ang:2*\r)+( \ang    :\m)$) arc ( \ang    :-\ang    :2*\r+\m);             \draw ($(-\ang:2*\r)+(-\ang    :\m)$) arc (-\ang    :-\ang- 90:     \m);             \draw ($(-\ang:2*\r)+(-\ang- 90:\m)$) -- ($(-\ang:\r/2)+(-\ang-90:\m)$);     };     \end{scope}     }     \end{tikzpicture}~~~     \begin{tikzpicture} % how it should be tikz'd, but doesn't work     \clip (-1,-3) rectangle (6,3);     \draw[<->] (-6,0) -- (6,0);     \draw[<->] (0,-6) -- (0,6);          \foreach \j in {3,5} % dyadic scales below and above the given radius     {         \pgfmathparse{log2(2^\j+1)}% instead of radius \j, incorporates `+1` of \logtransformation         \draw[red] circle (\pgfmathresult); % strange: no coordinates! If given, takes y-value as radius!     }          \foreach \r / \i [evaluate=\r as \ang using 90/\r] in {2^4/5} % radius and number of slice     {     \begin{scope} %[rotate={(\i-1)*\ang}]         \pgftransformnonlinear{\logtransformation}         \draw (-\ang:\r/2) arc (-\ang:\ang:\r/2) -- (\ang:2*\r) arc (\ang:-\ang:2*\r) -- cycle;         \foreach \m in {2}         {             \draw ($(-\ang:\r/2)+(-\ang-90:\m)$) arc (-\ang-90:-\ang-180:\m)             arc (-\ang:\ang:\r/2-\m) arc (\ang+180:\ang+90:\m)             -- ($(\ang:2*\r)+(\ang+90:\m)$) arc (\ang+90:\ang:\m)             arc (\ang:-\ang:2*\r+\m) arc (-\ang:-\ang-90:\m) -- cycle;         };     \end{scope}     }     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/LjOFR.jpg) **Update 2:** For completeness, here's the plot with the original parameters - using the unsatisfactory but (up to scaling) working version with the short paths. As I mentioned, the scales will ultimately be higher, this is just for demonstration purposes. The red circles represent powers of 2 - due to the `+1`-adaptation they would not be exactly equally spaced, so I thought of another adaptation, which basically replaces the radius `r` by `1/4*r^2+1` if `r<2`. This polynomial is such that it is `1@0`, `2@2` and the derivative is `1@2`. A drawback that remains (in addition to lack of pathing) is that for `\m=\r/2`, some internal parameter exceeds the size maximum of tikz - I see the plot but latex crashes. For the plot, the only changes in the code from the update are:               ...     \pgfmathveclen{\pgf@x}{\pgf@y}%     \pgfmathparse{\pgfmathresult/28.4}% factor accounts for pt2cm conversion     \pgfmathparse{\pgfmathresult > 2 ? \pgfmathresult : 1/4*\pgfmathresult^2+1}     \pgfmathparse{log2(\pgfmathresult)}%     \pgf@xa=\pgfmathresult pt%      ...     \foreach \j in {1,...,5} % dyadic scales below and above the given radius     {\node[below right] at (\j,0) {$2^\j$}; \draw[red] (0,0) circle (\j);}     ...      ![enter image description here](http://i.stack.imgur.com/4DXEX.jpg)


title: How do I get dots in numbering in enumerate

text: Consider this simple example:               \documentclass{article}     \usepackage{enumerate}     \begin{document}          \begin{enumerate}     \item     Blah.     \begin{enumerate}[i.]     \item      \label{petite}     Petite blah.     \end{enumerate}     \end{enumerate}          In Step \ref{petite} we see nothing.     \end{document}      The last line reads `In Step 1i ...`, but I would like it to read `In Step 1.i ...`. How can I make LaTeX add a dot between the numbering?


title: Recalling a specific overlay of a tikzpicture in beamer

text: I am making a presentation and I want to recall some pictures in my conclusion. The pictures are done using tikzpicture and are in separate files, with some overlay specifications. However, I want to recall only a specific overlay in the conclusion. File: picture.tex               \begin{tikzpicture}      \draw at (0,0) circle (1);      \uncover<2->{        \draw at (2,0) circle (1);}     \uncover<3->{        \draw at (1,1) circle (1);}     \end{tikzpicture}      Then in my main file,               \documentclass{beamer}     \usepackage{amsmath}     \usepackage{tikz}           \begin{document}          \frame{\frametitle{The Picture}     Some text      \begin{center}     \input{picture}     \end{center}     }          \frame{\frametitle{Conclusion}     \begin{center}     \input{picture}     \end{center}     }      I would like to display only the overlay <2> in the conclusion without recalling the whole frame (with \againframe). Is there any way of doing that or should I create another file with only what I want to display on the last frame?


title: Setting font type globally in a multipart document

text: I have a master document with multiple child documents called by `\input` commands. I would like to set the palatino font globally for the main document and all of the child documents. Is it possible to add a command to accomplish this on the master document? A cut down version of the main document:               %Novel template 5.06in x 7.81in, facing pages     % Begin document     \documentclass[11pt,english,british,twoside,openany]{scrbook}     \usepackage{novel}% novel.sty          %Frontmatter          \begin{document}          ...          \mainmatter          %The Chapters     \input{./child_docs/child_docs.tex}          \end{document}


title: Math formula changes in tikz environment

text: I am trying to write a formula in a `tikzpicture` but it gets changed. The indices for the cumulative product is moved from under the `\prod` to after. See MWE:               \documentclass{beamer}     \usepackage{tikz}               %%%%%%%%%%%%%%%%%     \begin{document}          \begin{frame}          \begin{center}     \begin{tikzpicture}     \node [font=\bf\tiny] {$1 - \widehat{S}(t) = \prod_{j:t_j \leq t} \frac{d_{kj}}{n_{j}}$};     \end{tikzpicture}     \end{center}          \begin{equation}     1 - \widehat{S}(t) = \prod_{j:t_j \leq t} \frac{d_{kj}}{n_{j}}     \end{equation}          \end{frame}          \end{document}      Any idea why? Any way around?


title: Setting up RefTeX with biblatex citation commands

text: How do I setup RefTeX with biblatex's citation commands? In Workflow for managing references? Seamus describes a workflow with RefTeX and mentions that > it wouldn't be too tricky to add `\autocite` and friends to aucTeX's cite > insertion mechanism. The biblatex citation commands I'd like to use with RefTeX is `\autocite`, `\smartcite` and `\textcite`. Also, I'd like RefTeX to work with csquotes' `\blockcquote`. Note that I am not asking for anything that has to do with compilation (like Customising emacs to use biblatex-biber instead of bibtex).


title: How can I contain the numbering of subsections to a section?

text: I have a document where I want the subsections of a section to be self contained so I can have a structure like this: Section heading a b c Section heading 2 a b c At the moment I have a document structured like this:               \documentclass[12pt, titlepage]{article}     \begin{document}          \renewcommand\thesection{\arabic{section}}     \renewcommand\thesubsection{\alph{subsection}}     \renewcommand\thesubsubsection{\roman{subsubsection}}          \section*{Question 1}     \subsection{}     \subsection{}     \subsection{}     \section*{Question 2}     \subsection{}     \subsection{}     \subsection{}          \end{document}      Which results in the \subsections numbering carrying through to give something like Question 1 a b c Question 2 d e f How can I prevent this from happening? Also is there a way to format the numbering at all so instead of it just being "a" make it "(a)"?


title: How to force not to change (count) page numbers?

text: I would like a short solution to fix pagenumbers in a range (every page has the same pagenumber in that range).


title: How to create a subsubparagraph appearing in the TOC ? (memoir class)

text: I'am trying to create a subsubparagraph counter.               \titleclass{\subsubparagraph}{straight}[\subparagraph]     \newcounter{subsubparagraph}          \titleformat{\subsubparagraph}[display]{\normalfont\normalsize}{}{0pt}{\thesubsubparagraph{#1}}     \renewcommand{\thesubsubparagraph}{\roman{subsubparagraph}. }     \titlespacing*{\subsubparagraph} {3.5cm}{*0}{*0}      However, the title of this new subsubparagraph is not displayed in my toc. Example : `\subparagraph{test}` Here, there is just the number of the subparagraph displayed in the TOC, but no the "test" title. How coul I fix this please ? Thank you


title: Is it possible to scan until the end of the current `\item`

text: I do a lot of itemize lists in `beamer` presentation which, in a later step, I want to format nicely, for instance, typeset everything up to the first colon in boldface and the remaining part scriptsize inside a `\parbox`. A common idiom I use is to define a custom `\Item` command for this purpose that parses the item text and emits a `\item` with the intended formatting:               \documentclass{beamer}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{calc}          \begin{document}          \def\Item#1:#2\endItem{\item \parbox{2cm}{\strut\textbf{#1:}}\parbox[t]{\linewidth-2cm}{\footnotesize#2}}     \begin{frame}{A frame}       Common metasyntactic variables (used to name absolutely anything)       \begin{itemize}         \Item foo: f*cked over and over? Well, we do not really know the meaning of this beast.\endItem         \Item bar: beyond all reason?\endItem       \end{itemize}     \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/GXMR5.gif) However, to scan the "rest" of the item's text as a macro argument, I have to finish eacht item by an explicit end marker `\endItem`, which I would like to avoid. As in this related question, I also do not want to put the item's text into groups of curly braces. Is there another, more elegant way to scan to the end of an `\item`?


title: Efficient way to partially fill a cylinder?

text: I am new to `tikz` and am using it to draw cylinders. I understand how to invoke `cylinder body fill` to completely fill one, but I also need some cylinders that are only shaded to a certain height. Is there a built in parameter for `cylinder` that automates this? Looking at p433 of the documentation and searching this forum, I don't see one. If so, I'd like to learn it. If not, I was thinking I'd just overlay two cylinders---one "body filled" with blue, the other, shorter one filled with white---to achieve the desired effect. I can do that, so I'm not asking for code. I'm more wondering if this is how veteran tikz users think about this problem. **Edit: Adding my (admittedly inelegant) code.**               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc,shapes,decorations.markings}          % Syntax: \Cylinder{<x-coordinate>}{<y-coordinate>}{<name>}     \newcommand\whitebodyCylinder[3]{%     \tikzset{Cylin/.style={cylinder, shape border rotate = 90, draw, cylinder uses custom fill,       cylinder end fill = white, cylinder body fill = white, minimum height = 4cm,       minimum width = 3cm, opacity = 1, aspect = 2.5}}       \node[Cylin] (#3) at (#1,#2) {};     }          \newcommand\bluebottomCylinder[3]{%     \tikzset{Cylin/.style={cylinder, shape border rotate = 90, draw, cylinder uses custom fill,       cylinder end fill = blue!20, cylinder body fill = blue!20, minimum height =2cm,       minimum width = 3cm, opacity = 1, aspect = 2.5}}       \node[Cylin] (#3) at (#1,#2) {};       \draw[dashed] (#1+1.5,-.5+#2) arc [start angle=0, end angle=180,         x radius=1.5cm, y radius=3mm];     }          \begin{document}               \begin{tikzpicture}       \whitebodyCylinder{0}{0}{}       \bluebottomCylinder{0}{-1}{}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/srfo3.png)


title: How to Insert into Latex a Text File whose name is a variable?

text: I need to insert a text file into LaTeX. But text file names are different for different projects. So I want to define text file name as a variable and refer to the variable when inserting the text I tried the code as below. But               \VerbatimInput[baselinestretch=1,fontsize=\footnotesize]{{\myfile}}      doesn't work. Only               \VerbatimInput[baselinestretch=1,fontsize=\footnotesize]{abc.txt}       Could anyone give me some guide?               \usepackage{fancyvrb}     <<text, echo=F>>=     targetvar<-'abc'     textfile<-paste(targetvar,'.txt',sep='')      @     \newcommand{\myfile}{\Sexpr{textfile}}     \VerbatimInput[baselinestretch=1,fontsize=\footnotesize]{{\myfile}}


title: Define certain letter in math-mode to be always non-italic

text: Imagine I have a 500 page book about complex numbers. But I always wrote just `j` in math-mode as the **imaginary unit**. But I should have written `\mathrm{j}`. Is there a command I could write into my preamble to substitute all `j` with `\mathrm{j}`? It would be quite some pain in the ass, to do it for all **j** manually. (There are no appearances of j as running index or other meanings) For some greek letters where I have the same problem I used:               \let\Theta\varTheta      But I don't know how to do the same for "normal letters". **Minimal example:**               \documentclass{article}     \usepackage{amsmath}          \begin{document}          \begin{equation}     j ~~is not~~ \mathrm{j}     \end{equation}          \end{document}


title: Random selection of file issues

text: I have tried to create an `exam` with random questions selected from different files as shown here. The code I used works but is only randomized on a random basis; i.e. for 1st round it gives a set of questions, no change in 2nd-4th rounds, new order 5th and 6th rounds, no change again for another few compilations. There are no errors, just randomization fails upon compilation. Maybe, it is just a coincidence. I only use 9 files but they still should have at least 1 change (as per probability theory). I am using `TeXLive v1.17`. Below I have 3 folders named 'Photochem', 'Photophys' and 'Quenching'. In each of these folders I have 3 files named `PC1.tex`,`PC2.tex`,`PC3.tex`; `PP1.tex`,`PP2.tex`,`PP3.tex`; and `Quench1.tex`, `Quench2.tex`, `Quench3.tex`. Each file just contains the filename as text (just like a `Hello World` example) so I can see what file is being selected. Is anyone else able to replicate the scenario and if so, may I have any suggestion how to overcome it?               \documentclass{article}     %\usepackage[paperheight=3.0cm, paperwidth=12.0cm, margin=0.1cm]{geometry}% Simplify image capture          \usepackage{enumitem}     \usepackage{tikz}% Easy way to get all the pgf functions          % The list of topics determines how many questions will be in the quiz     % since it appears that you want one question per topic in a quiz.     % This could be auto generated.     \newcommand*{\ListOfTopics}{%     Photochem,%  MUST have trailing % here     Photophys,%     Quenching%       }%               % These list of files names from each question can be auto generated     % but for example purposes I am just using the file names as the     % content in the file. The number of questions in each topic do not     % need to be the same.  I would create directories with the topic      % names and auto generate this based on the directory and file names.          \pgfmathdeclarerandomlist{Photochem}{%     {PC1}%     {PC2}%     {PC3}%     }%     \pgfmathdeclarerandomlist{Photophys}{%     {PP1}%     {PP2}%     {PP3}%     }%     \pgfmathdeclarerandomlist{Quenching}{%     {Quench1}%     {Quench2}%     {Quench3}%     }%                    \newcommand*{\NumberOfQuizes}{4}%          \begin{document}     \foreach \QuizNumber in {1,...,\NumberOfQuizes} {%     \clearpage% Start each quiz on a new page     \noindent\textbf{\Large Quiz Number \QuizNumber}%     \begin{enumerate}     \foreach \Topic in \ListOfTopics {%         % Determine random question to use form list         \pgfmathrandomitem{\RandomQuestion}{\Topic}          % The following should import the file named in \RandomQuestion         \item Random Question from Topic='\Topic':              \textbf{\Large\RandomQuestion}%     }%     \end{enumerate}     }%          \end{document}


title: tikz has probably problems with czech babel when compiling .Rnw

text: ## Problem Tikz seems to have a problem with `\usepackage[czech]{babel}`. I had a moderately big `.Rnw` document written in czech with some plots via `knitr` chunks. When I set `dev = 'tikz'` the TeXmaker sent me an error: ### Error               Preview: PDFoutput 1 ! Package tikz Error: + or - expected. See tikz package documentation for explanation.      I had no time for fixing it so I have used `dev='pdf'` which has no great LaTeX axis label postprocessing (that's bad for someone who has to use awful lot of greek letters, subscripts, etc.). I have done some research since then and haven't found it in `tikz` documentation, but found that a few people tackled the same problem with `tikz + LaTeX` and they said it was due to the czech babel LaTeX package. So I tried a minimal example which compiles without `\usepackage[czech]{babel}` but with it it gives the same error. Removing it also allows the big document to compile but it's not a solution since it's written in czech so I need the babel. ### Code **edit** : added some greek letters to plot label since that is why I need `tikz` and a czech testing sentence with czech specific letters and another one with czech specific quotation marks handled by the czech babel package. If you uncomment the second sentence it doesn't compile even with commented `\usepackage[czech]{babel}` since babel handles the `„“` characters. I could replace the quotation mark characters with some escape sequences, but this doesn't appear to me as a nice option.               \documentclass[12pt]{article}     \usepackage[czech]{babel}     \usepackage{tikz}     \begin{document}          Příliš žluťoučký kůň úpěl ďábelské ódy.     %„Příliš žluťoučký kůň úpěl ďábelské ódy.“          <<dev="tikz">>=     library(tikzDevice)     plot(1:10 , xlab = "$\\alpha_{\\beta^\\gamma}$")     @          \end{document}      ### Environment   * OS: `Windows 7`   * Compiled in: `TeXmaker 4.1.1`   * knitr called through: `R x64 v 3.0.3`   * R package: `tikzDevice v 0.7.0`   * TeX package: `pgf v 3.0.0` ## Question Can anything be done to fix this error?


title: Problems with gloss package

text: I have been trying to make an glossary using gloss package, but anytime I get the warning no driver for entry "gd" or "gloss definition". Basically i have the next code:               \documentclass[twoside,12pt]{book}          \usepackage{gloss}          \makegloss          \begin{document}          \maketitle          \tableofcontents          \gloss[nocite]{*}          \printgloss{glsbase,glosario.bib}          \addcontentsline{toc}{chapter}{Glosario}          \input{Introduccion}          \nocite{*}          \printbibliography[heading=bibintoc]          \end{document}      I hope somebody can help me, please!


title: Why is there no \provideenvironment?

text: LaTeX2e provides a `\providecommand` but there is no `\provideenvironment` which defines an environment only if it (or a macro with the same name) was not defined before. Is there a specific reason why it is missing?


title: Assign a name to a TikZ picture for reusing it

text: If I want to reuse a `TikZ` picture I usually define a new command like               \newcommand{\mypic}{%     \begin{tikzpicture}     %...     \end{tikzpicture}%       }%      Then I reuse it later via `\mypic`. However I think this is not very elegant. So my question is if it is possible to assign a name to the picture via a key, which can be called to reuse the picture at another place? For example:               \begin{tikzpicture}[rname=mypic]     %...     \end{tikzpicture}      And reuse it like `\mypic` or something like `\rtikz{mypic}`. Would be even better if I could to things like this `\rtikz[scale=0.5,every label/.style={red}]{mypic}`.


title: Lucida OpenType - how to find out if font contains a glyph (blackboard 1)?

text: I am deliberating whether I should buy TUGs Lucida OpenType, but I am not sure if it contains all the glyphs I want/need. How can I find those? In particular, I want to have a blackboard one, as in `\mathbb{1}` (or `\mathbbm{1}` from the `bbm` package). I have found this character grid of LucidaNewMathArrows, but it does not show a blackboard style one. Also, how would I find out if Lucida OpenType contains `\hbar` or upright greek letters for mathmode (coincidentally, I found this in thisTUG-board article, but I would like to know how to approach this problem in general)?


title: What is the syntax to get the "CurlyPhi" symbol?

text: What is the syntax to get the "CurlyPhi" symbol in TeX/LaTeX? To get phi we use, `$\Phi$`.


title: How to change caption color for a color theme in beamerposter?

text: I am facing a problem. In my poster, I use a color theme, for that reason in figure caption comes with green color, that is quite invisible.![enter image description here](http://i.stack.imgur.com/Vbb3p.png) Is it possible to change the color?               \documentclass[final, 12pt]{beamer}     \usepackage[size=custom,width=120,height=120,scale=1.7,orientation=portrait]{beamerposter}      \usepackage[english]{babel}     \usepackage{graphicx}     \usepackage{wrapfig,xcolor,pgf}     \usepackage{array,booktabs,tabularx,amsthm,multirow,amsmath}     \usepackage[absolute,overlay]{textpos}% text under figure     \usepackage{pifont}     \usepackage{pslatex}     \usepackage{ragged2e} %for justify tex     \usepackage{lipsum}      \usepackage{etoolbox}     \apptocmd{\frame}{\justifying}{}{}          \setbeamertemplate{caption}[numbered]                    \newenvironment<>{varblock}[2][\textwidth]{%       \setlength{\textwidth}{#1}       \begin{actionenv}#3%         \def\insertblocktitle{ \centering#2\par}%         \par%         \usebeamertemplate{block begin}}       {\par%         \usebeamertemplate{block end}%       \end{actionenv}}          \usecolortheme[RGB={180,250,80}]{structure}      \usetheme[height=0mm]{Rochester}           \begin{document}     \begin{frame}               \begin{textblock}{}(6,3.95)%     \begin{varblock}[42cm]{}     \begin{figure}     \includegraphics{1.jpg}     \caption{ Individual source location A ($\mathrm{L_{A}}$) .}     \label{1}     \end{figure}     \end{varblock}     \end{textblock}          \end{frame}     \end{document}


title: Interaction of \boldmath and \not

text: It seems that using `\boldmath` (or `\bm`) along with the `\not` does not quite work so well. Here is an example using `\not\subseteq` and `\not\le` where the line representing negation does not stretch sufficiently past the end of the symbol. ![enter image description here](http://i.stack.imgur.com/kaolZ.png) ## Questions:   * Is there a better way to get bold math, or do I need to resort to my usual _overkill_ solution and use `\tikz` to draw the `not` line?   * Is this is known issue with bold math, and are there other known issues with bold math? ## References:   * I am using the solution from Colored symbols for `\MathColor`, the math equivalent for `\textcolor`.   * Followup question: Automate replacenement of `\not` when in `\bm` mode. ## Code:               \documentclass{article}     \usepackage{bm}     \usepackage{xcolor}          %% http://tex.stackexchange.com/questions/85033/colored-symbols-in-latex     \newcommand*{\MathColor}{}     \def\MathColor#1#{\mathcoloraux{#1}}     \newcommand*{\mathcoloraux}[3]{%       \protect\leavevmode       \begingroup         \color#1{#2}#3%       \endgroup     }          \newcommand{\Expression}{R \not\subseteq T, x \not\le y}%          \begin{document}     \begin{tabular}{r l}                       & $\Expression$ \\% This works fine.     \verb|\boldmath|: & {\boldmath $ \Expression$} \\     \verb|\bm|: & \bm{$\Expression$}      \end{tabular}          \bigskip     Test with color     \medskip          \begin{tabular}{r l}     \verb|\MathColor|: & $\MathColor{red}{\Expression}$ \\     \verb|\boldmath|: & {\boldmath $ \MathColor{red}{\Expression}$} \\     \verb|\bm|: & %\par\bm{$\MathColor{\Expression}$}%% ???     \end{tabular}     \end{document}


title: Aligning text and a tikZ picture vertically

text: Here is my current slide: ![enter image description here](http://i.stack.imgur.com/t9qEE.png)               \documentclass{beamer}     \usepackage[english]{babel}     \usepackage{tikz}     \usetikzlibrary{backgrounds}          \begin{document}          \begin{frame}     \frametitle{My slide}          \begin{tikzpicture}[framed, background rectangle/.style={thick, draw=black, top color=blue!50, rounded corners}]     \node (step1) at (0, 0) {step 1};     \node (step2) at (0, -3) {step 2};     \end{tikzpicture}     \end{frame}          \end{document}      I would like to write something right next to "step 1" and something else right next to "step 2". I would like to write these two things _out of the blue frame_. Can you help me?


title: WinEdt can not recognize MiKTeX after setting the root

text: I tried to update MiKTeX from version 2.8 to version 2.9. Then I installed the version 2.9 in `C:/program files/Miktex 2.9` and then configure the MiKTeX in WinEdt by ＂`Tex->Miktex-> Miktex options->roots`". However, after restarting the WinEdt, the MiKTeX can not use, the buttons of the MiKTeX are disabled. Can someone help me?


title: Plotting standard error

text: I am trying to create a chart with the std error but I can't seem to get it to work the way I want it to. I want to get rid of the line between every entry. This is what I have right now:               \begin{tikzpicture}      \begin{axis} \addplot+[error bars/.cd,y dir=both,y explicit]         coordinates { (0,0) +- (0.5,2) (0.5,1) +- (0.4,0.2) (1,2) (2,5) +- (1,0.1) };     \end{axis} \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/yJ2A6.jpg) This is what I want: ![enter image description here](http://i.stack.imgur.com/KR2pX.jpg) And I also wonder how you can read data form a .txt file and put it into the plot as well with x and y labels.               Data.txt:<br>          X Y Y_error     124 3.385995 0.866002     112 3.133745 0.937226     99 2.906316 0.895013     87 2.586054 0.835342     74 2.346789 0.792954     61 2.283117 0.699818     49 2.012212 0.909995     37 1.919941 1.366541     24 1.809623 1.691634     11 5.603446 13.825383


title: Rendering LaTeX equations at Github Wiki

text: Is there a reliable way to render LaTeX equations at my Github Wiki wikipages? I have used the Codecogs LaTeX Eqn Editor but I am facing some problems now, namely the incorrect rendering of the equations. Thanks in advance PS I know that this question is not directly oriented to LaTeX itself.