title: Problem compiling TikZ diagram using template

text: This is my first input here. I have a problem compiling this document, where particularly the TikZ graph comes messed up (no graphics at all and labels superimposed). I am using TeXstudio with MiKTex 2.9 in Windows 7 and applying the standard commands:   1. pdflatex: pdflatex -synctex=1 -interaction=nonstopmode %.tex   2. LaTex: latex -interaction=nonstopmode %.tex ; and later DVI->PDF No errors come from both compilations only overfull \hbox in the pdflatex and in the latex command and additional seemingly unrelated warning "Drivers other than 'pdftex.def' are not supported". When doing the DVI->PDF several warnings are displayed but no reference to TikZ. I know the graphic is ok as I could display it using other template; however this is the recommended thesis template. I have updated all Latex packages, I would like to know where the problem is, I believe some problem with the class or the compilation commands. The code of the files are: For the main document "phd_thesis_format.tex":               \documentclass[a4paper,twoside,openright,12pt,mycolours,final]{mythesis}     \usepackage{graphicx}     \usepackage[usenames,dvips]{color}     \usepackage{amsmath}     \usepackage{bbold}     \usepackage{tikz}     \usepackage[noBBpl]{mathpazo}     \usepackage{array}     \usepackage{harvard}     \usepackage{makeidx}     \usepackage{fancyhdr}     \usepackage[hang]{caption}     \usepackage{psfrag}     \usepackage{amssymb}     \usepackage[notref,color]{showkeys}     \usepackage{epstopdf}          \begin{document}     \include{chapterOne}     \bibliography{bibliography}     \bibliographystyle{harvard_dcu}     \end{document}      For the Chapter with a simplified graph "ChapterOne.tex"               \chapter{Chapter One}          \begin{chaptersummmary}     \PARstart{C}{hapter} summary goes here.     \end{chaptersummmary}          \section{Chapter One section}     \label{section2.1} Create another section in this chapter     \begin{figure}     \centering     \begin{tikzpicture}       [scale=1.0,auto=left, node distance = 1.5cm]       \tikzset{         arn_n/.style = {circle, black,  draw=black,  % font=\sffamily\bfseries,           fill=blue!20, text width=1.5em, text centered},% arbre rouge noir, noeud noir         arn_x/.style = {rectangle, draw=black,           minimum width=1.2em, minimum height=1.2em} % arbre rouge noir, nil       }       \node[arn_x] (7) {};         \node[arn_n, right of=7] (8) {$y_{i-1}$};       \node[arn_x, right of=8] (9) [label=above:{$\psi_i^2(y_{i-1},y_i)$}] {};       \node[arn_n, right of=9] (10) {$ y_i$};       \node[arn_x, right of=10] (11) {};       \node[arn_n, right of=11] (12) {$y_{i+1}$};         \node[arn_x, right of=12] (13) {};     \end{tikzpicture}     \caption{Graph indicating propagation of messages}     \label{Fig2.FWprop}     \end{figure}          \subsection{Chapter One subsection}     \label{subsection2.1.1} Chapter 2 subsection goes here.      The class file which I have reduced from more than 800 lines, my grasp in Latex is not so great to continue chopping, from here on I get other unrelated errors.               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{mythesis}[2005/09/05 School of Electrical and Electronic Engineering -- University of Adelaide]     \RequirePackage{fancyhdr}     \RequirePackage{lettrine}     \RequirePackage{graphicx}     \RequirePackage{calc}          \newif\ifmydraft\mydraftfalse     \DeclareOption{mydraft}{\mydrafttrue}          \newcommand\docsize{}  % to allow 10pt or 11pt to be specified as option     \typeout{Modified by Greg Harmer, 2000}     \DeclareOption{10pt}{\renewcommand\docsize{10pt}}     \DeclareOption{11pt}{\renewcommand\docsize{11pt}}     \DeclareOption{12pt}{\renewcommand\docsize{12pt}}     %  Prepare to load the standard report class (12pt):     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}     \ExecuteOptions{12pt}         % define 12pt as the default doc size     \ProcessOptions     \LoadClass[\docsize]{report}  % load report.cls     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %  The following sections are revisions or additions to report.cls     %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % PAGE LAYOUT     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \setlength\voffset{-1.0in}     \setlength\hoffset{-1.0in}          \setlength\topmargin{20.0mm-4.0mm}     \setlength\headheight{5.00mm}     \setlength\headsep{7.00mm}          \setlength\footskip{10.00mm}     \setlength\textheight{\paperheight                            -\topmargin-\headheight-\headsep                            -\footskip-5.0mm-\topmargin}          % SIDE MARGINS:     \marginparsep 1mm     \if@twoside        \setlength\oddsidemargin{3cm}        \setlength\evensidemargin{2cm}        \setlength\marginparwidth{1.5cm}        \ifmydraft           % Make room for marginal notes           \setlength\oddsidemargin{2.5cm}           \setlength\evensidemargin{2.5cm}           \setlength\marginparwidth{2.25cm}        \fi     \else        \setlength\oddsidemargin{2.5cm}        \setlength\evensidemargin{2.5cm}        \setlength\marginparwidth{2.25cm}     \fi          \setlength\textwidth{\paperwidth-\oddsidemargin-\evensidemargin}          % Line spacing and par seps, gph.     \renewcommand{\baselinestretch}{1.33333}     \newcommand\setmyparsep{\parskip0.4\baselineskip\@plus0ex\@minus 0.5ex}     \newcommand\setmytightparsep{\parskip0.2\baselineskip\@minus0.5ex}     \setlength\parindent{0ex}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %  Headings stuff. Added by gph.     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \newcommand\blob{\rule[-0.2\unitlength]{1in}{0.8\unitlength}}     \newcommand\rblob{\begin{picture}(0,0)                         \setlength{\unitlength}{25mm}                         %\put(0,-\value{chapter}){\blob}                         \put(0.127,-\value{chapter}){\blob}                       \end{picture}}               \fancyhf{} % delete current setting for header and footer     \fancyhead[LO]{\headerfont\chaptername\space\thechapter}     \fancyhead[LE]{\headerfont\rightmark}     \fancyhead[RO]{\headerfont\leftmark}     \fancyfoot[LE,RO]{\footerfont{Page\space\thepage}}     \ifmydraft\fancyfoot[C]{\footerfont{Fancy\draftcomment}}\fi     \renewcommand{\headrulewidth}{0.5pt}     \addtolength{\headheight}{0.5pt} % make space for the rule     \renewcommand{\footrulewidth}{0.5pt}     \addtolength{\footskip}{0.5pt} % make space for the rule               \fancypagestyle{plain}{%        \fancyhead{} % get rid of headers        \fancyfoot{}        \renewcommand{\headrulewidth}{0pt} % and the line.        \renewcommand{\footrulewidth}{0.5pt}        \ifmydraft\fancyfoot[C]{\footerfont{Plain\draftcomment}}\fi        \fancyfoot[LE,RO]{\footerfont{Page\space\thepage}}        \addtolength{\footskip}{0.5pt}}          \fancypagestyle{chapterstart}{%        \fancyhead{} % get rid of headers        \fancyhead[RO]{\chapterblobcolor\rblob}        \fancyfoot{}        \renewcommand{\headrulewidth}{0pt} % and the line.        \renewcommand{\footrulewidth}{0.5pt}        \ifmydraft\fancyfoot[C]{\footerfont{Chapter Start\draftcomment}}\fi        \fancyfoot[LE,RO]{\footerfont{Page\space\thepage}}        \addtolength{\footskip}{0.5pt}}               \fancypagestyle{special}{%        \fancyhead{} % get rid of headers        \fancyfoot{}        \fancyhead[LE,RO]{\headerfont\leftmark}        \fancyfoot[LE,RO]{\footerfont{Page\space\thepage}}        \ifmydraft\fancyfoot[C]{\footerfont{Special\draftcomment}}\fi        \renewcommand{\headrulewidth}{0.5pt} % and the line.        \addtolength{\headheight}{0.5pt}        \renewcommand{\footrulewidth}{0.5pt}        \addtolength{\footskip}{0.5pt}}          \fancypagestyle{normal}{%        \fancyhead{} % get rid of headers        \fancyfoot{}        \fancyhead[LO]{\headerfont\chaptername\space\thechapter}        \fancyhead[LE]{\headerfont\rightmark}        \fancyhead[RO]{\headerfont\leftmark}        \renewcommand{\headrulewidth}{0.5pt} % and the line.        \addtolength{\headheight}{0.5pt}        \renewcommand{\footrulewidth}{0.5pt}        \addtolength{\footskip}{0.5pt}        \fancyfoot[LE,RO]{\footerfont{Page\space\thepage}}        \ifmydraft\fancyfoot[C]{\footerfont{Normal\draftcomment}}\fi}                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %                            SECTION HEADINGS     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \newcommand\chaptersize{\normalsize}     \newcommand\sectionsize{\normalsize}     \newcommand\subsectionsize{\normalsize}     \newcommand\subsubsectionsize{\normalsize}     \newcounter{firstchapter}     \setcounter{firstchapter}{0}          \newif\ifwasonecol\wasonecolfalse          % What to do for the last chapter page if blank.     \def\cleardoublepage{%     \if@twocolumn\wasonecolfalse     \else\wasonecoltrue     \fi     \onecolumn     \clearpage     \if@twoside        \ifodd\c@page\else           \if@twocolumn % shouldn't need to be used any more, gph.              \hbox{}\newpage\fi           \hbox{}           \ifmydraft              \vspace*{\fill}              \begin{center}                 {\normalfont\Large\bfseries\sffamily%                 This is the last page of\space\leftmark\par%                 Next chapter is                 \ifwasonecol{one}\else{two}\fi\space                 column\par\space                 (Draft -- Page will be blank)\par}              \end{center}              \vspace{\fill}           \fi           \thispagestyle{plain}           \newpage        \fi     \fi     \ifwasonecol\onecolumn\else\twocolumn\fi}          %%%%%%%%%%%%%%%%%%%%%%%%%%%     %  CHAPTER HEADING STUFF  %     %%%%%%%%%%%%%%%%%%%%%%%%%%%          \renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi                         \global\@topnum\z@                         \@afterindentfalse                         \pagestyle{normal}                         \setmyparsep                         \secdef\@chapter\@schapter}          \def\@chapter[#1]#2{\thispagestyle{chapterstart}                         \ifnum\c@firstchapter=0                           \pagenumbering{arabic}                           \setcounter{firstchapter}{1}                         \fi                         \ifnum \c@secnumdepth >\m@ne                              \refstepcounter{chapter}%                              \typeout{\space}                              \typeout{Processing\space\@chapapp\space\thechapter.\space#2}%                              \addcontentsline{toc}{chapter}%                                        {\@chapapp\space\protect\numberline{\thechapter.}#1}%                         \else                           \addcontentsline{toc}{chapter}{#1}%                         \fi                         \chaptermark{#1}%                         \addtocontents{lot}{\protect\addvspace{10\p@}}%                         \ifnum\c@chapter>1                           \addtocontents{lof}{\hfill\hrulefill\hspace*{\fill}\par%                           \protect\addvspace{10\p@}}\fi                         \if@twocolumn                           \@topnewpage[\@makechapterhead{#2}]%                         \else                           \@makechapterhead{#2}%                           \@afterheading                         \fi}          \def\@makechapterhead#1{%       %\vspace*{40\p@}%       {\parindent\z@\raggedright         \ifnum \c@secnumdepth >\m@ne             \chapterlabelfont\@chapapp\space\thechapter\par\nobreak             \vskip 30\p@         \fi         \interlinepenalty\@M         \raggedleft\chapterfont#1\par\nobreak         \vskip 40\p@       }}          \def\vertbar{\vspace*{-50\p@}                  \vertbarcolor\rule{20mm}{100\p@}}          \def\@schapter#1{\pagestyle{special}                      \thispagestyle{plain}                      \addcontentsline{toc}{chapter}{\TOCchapterscolor#1}%%                      \chaptermark{#1}                      \typeout{\space}                      \typeout{Processing\space#1}                      \if@twocolumn                        \@topnewpage[\@makeschapterhead{#1}]%                      \else                        \@makeschapterhead{#1}%                        \@afterheading                      \fi}               \def\@makeschapterhead#1{%       %\vspace*{50\p@}%       {\parindent \z@ \raggedright %\normalfont         \interlinepenalty\@M         \chapterfont#1\par\nobreak         \vskip 40\p@       }}          \font\afont=eurb8 at \docsize     \newlength\letterwidth     \newcommand{\PARstart}[1]{%         \lettrine[lines=2,lhang=0.33,nindent=0em]{             \dropcolor                 {\textsc{#1}}}{}}  %          % Chapter summary environment, gph.     \newlength{\chapsumwidth}     \setlength{\chapsumwidth}{\textwidth-2\leftmargin}     \newenvironment{chaptersummmary}                    {\vfill\noindent\hfill                     \minipage{\chapsumwidth}                     \setlength{\parskip}{0.3\baselineskip}                     \hrulefill\par}                    {\par\vspace{-0.3\baselineskip}\hrulefill                     \endminipage                     \hspace*{\fill}                     \vskip 50\p@                     \vspace*{\fill}                     \newpage}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % SOME INITIALIZATIONS:     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % make the following names uppercase:          \newcommand\black{\color{black}}     \newcommand\white{\color{white}}             \newcommand\chaptercolor{}        \newcommand\chapterlabelcolor{}        \newcommand\chapterblobcolor{}        \newcommand\sectionunderlinecolor{}        \newcommand\sectioncolor{}        \newcommand\sectionlabelcolor{}        \newcommand\subsectioncolor{}        \newcommand\subsectionlabelcolor{}        \newcommand\subsubsectioncolor{}        \newcommand\footercolor{}        \newcommand\headercolor{}        \newcommand\vertbarcolor{}        \newcommand\titlecolor{}        \newcommand\titlepagecolor{}        \newcommand\captioncolor{\black}        \newcommand\captionlabelcolor{}        \newcommand\captionlinecolor{}        \newcommand\figlabcolor{}        \newcommand\tablecolor{}        \newcommand\marginnotecolor{}        \newcommand\margintodocolor{}        \newcommand\dropcolor{}          % Now make the font types, gph.     \font\clfont=eurb10 at 28pt          \newcommand\chapterfont{\fontsize{36}{30}\bfseries\sffamily\chaptercolor}          \newcommand\chapterlabelfont{\normalfont\clfont\chapterlabelcolor}          \newcommand\sectionfont{\normalfont\Large\bfseries\sffamily\sectioncolor}     \newcommand\sectionlabelfont{\normalfont\Large\bfseries\sffamily\sectionlabelcolor}          \newcommand\footerfont{\normalfont\bfseries\sffamily\footercolor}     \newcommand\headerfont{\normalfont\bfseries\sffamily\headercolor}          \newcommand\signofffont{\normalfont\footnotesize\sffamily}          \newcommand\marginnotefont{\normalfont\scriptsize\sffamily\marginnotecolor}     \newcommand\margintodofont{\normalfont\scriptsize\sffamily\margintodocolor}          \newcommand\figlabelfont{\normalfont\small\bfseries\sffamily\figlabcolor}          \newcommand\captionlinefont{\bfseries\captionlinecolor}     \newcommand\tcaptionfont{\normalfont\small\sffamily\captioncolor}     \newcommand\tcaptionlabelfont{\normalfont\bfseries\small\sffamily\captionlabelcolor}          \newcommand\mycaption[2][]{\caption[{#1}]{{\captionlinefont{{#1}.}}\space{#2}}}     \endinput     )


title: How can I set the width of a pgfplot to fit that of a tikz matrix?

text: I'd like to be able to control the width of a `pgfplots` plot to that of a `matrix`. The plot should be below the `matrix`. Ideally the plot's dimension will depend only on the size of the `matrix` (so if the `matrix` changes so will the plot). The plot and `matrix` are all part of a bigger `tikzpicture` that includes other components all positioned relative to each other, so I don't want to have two separate tikzpictures. Here's a minimal example code:               \documentclass{minimal}     \usepackage{tikz,pgfplots}          \begin{document}          \begin{tikzpicture}         \matrix[minimum size=4cm] (A) {             \node{1};          & \node{2};                      \\             \draw circle (.1); & \fill (-1,-1) rectangle (1,1); \\         };         \begin{axis}             \addplot[red,domain=0:10,samples=25] {x^2};         \end{axis}             \end{tikzpicture}          \end{document}      I've also added a picture of what I'd like it to look like (more or less). Note: I could only achieve that by using two separate tikzpictures... ![goal](http://i.stack.imgur.com/aACdL.png)


title: Vertical dashed line of a custom height

text: I need a vertically dashed line in my matrix, but my current solution looks like the dashes are going out of the `array` environment (and they are - i checked in photoshop). Can I manually shorten it by say 1 mm or 0.5 mm? Here is MWE:               \documentclass[a4paper]{article}     \usepackage{amsmath}     \usepackage{arydshln}     \usepackage{mathtools}     \begin{document}          \begin{equation*}     \setlength{\dashlinegap}{2pt}     \left[\begin{array}{cccc:c}     a_{11} & a_{12} & \cdots & a_{1n} & b_1 \\     a_{21} & a_{22} & \cdots & a_{2n} & b_2 \\     \vdots & \vdots & \ddots & \vdots & \vdots \\     a_{n1} & a_{n2} & \cdots & a_{nn} & b_n     \end{array}     \right]     \end{equation*}          \end{document}      ![enter image description here](http://i.stack.imgur.com/u5reo.png)


title: newcommand problem

text: I am trying to create a new command that represent one word larger than the text.               \newcommand {\Large}{\Large} is that right?      And then I have to integrate the top command in this               \newcommand{\smindexx}[2]{#2 \index{#2}}      I use `smindexx` as follow `\smindexx{\ITerm}{Test}` and Test should be larger than the other words. How can I do that, have someone an idea?


title: Creating table with different columns

text: I would like to produce this table in LaTeX. How can I do this ? ![enter image description here](http://i.stack.imgur.com/5fbou.png)


title: How to improve my PSTricks code to construct a triangle number diagram?

text: This question is similar to How to improve my PSTricks code to construct a triangle diagram?. Consider the following example. **Code**               % pdflatex -shell-escape test.tex          \documentclass{article}          \usepackage{       auto-pst-pdf,       pst-eucl,       pstricks-add     }          \begin{document}          \def\laengde{6}     \def\startX{3}     \def\startY{0}     \pstFPdiv\konstA{\laengde}{2}     \pstFPsub\Bmin{\startX}{\konstA}     \pstFPadd\Bmaks{\startX}{\konstA}     \pstFPadd\Hmin{\startY}{0}     \pstFPdiv\konstB{3 sqrt}{2}     \pstFPmul\Hmaks{\konstB}{\laengde}     \begin{pspicture}(\Bmin,\Hmin)(\Bmaks,\Hmaks)      \cnodeput(\startX,\startY){A}{$1$}      \cnodeput(!\startX\space \laengde\space 6 div sub \startY\space \laengde\space 3 sqrt 2 mul div add){B}{$2$}      \cnodeput(!\startX\space \laengde\space 6 div add \startY\space \laengde\space 3 sqrt 2 mul div add){C}{$3$}      \cnodeput(!\startX\space \laengde\space 3 div sub \startY\space \laengde\space 3 sqrt       div add){D}{$4$}      \cnodeput(!\startX\space                          \startY\space \laengde\space 3 sqrt       div add){E}{$5$}      \cnodeput(!\startX\space \laengde\space 3 div add \startY\space \laengde\space 3 sqrt       div add){F}{$6$}      \cnodeput(!\startX\space \laengde\space 2 div sub \startY\space \laengde\space 3 sqrt 2 div mul add){G}{$7$}      \cnodeput(!\startX\space \laengde\space 6 div sub \startY\space \laengde\space 3 sqrt 2 div mul add){H}{$8$}      \cnodeput(!\startX\space \laengde\space 6 div add \startY\space \laengde\space 3 sqrt 2 div mul add){I}{$9$}      \cnodeput(!\startX\space \laengde\space 2 div add \startY\space \laengde\space 3 sqrt 2 div mul add){J}{\scriptsize{$10$}}     \psset{       linewidth=1.5pt,       linecolor=red     }      \ncline{A}{B}      \ncline{B}{D}      \ncline{D}{G}      \ncline{G}{H}      \ncline{H}{I}      \ncline{I}{J}      \ncline{J}{F}      \ncline{F}{C}      \ncline{C}{A}     \psset{       linewidth=0.5pt,       linecolor=black,       LabelSep=0.8,       arrows=<->     }      \pstMarkAngle{J}{A}{G}{\SI{60}{\degree}}      \pstMarkAngle{A}{G}{J}{\SI{60}{\degree}}      \pstMarkAngle{G}{J}{A}{\SI{60}{\degree}}     \end{pspicture}          \end{document}      **Output** ![enter image description here](http://i.stack.imgur.com/lrm7w.jpg) **Question** I have the desired output but the code is rather messy; can anyone help me simplify if?


title: vertical distance between two graphics in sidewaysfigure environment

text: I have two `tikz` graphics in a `\sidewaysfigure` environment and i want to separate them with a little vertical spacing. The problem is that the two graphics are directly side by side, only the caption is affected by the `\vspace` statement. A (not so minimal) working example (@writelatex):               \documentclass[a4paper]{article}          \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage[colorinlistoftodos]{todonotes}     \usepackage{rotating}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{arrows}     \usetikzlibrary{shadows}     \usetikzlibrary{shapes,arrows}     \usetikzlibrary{trees}     \usetikzlibrary{backgrounds}     \usetikzlibrary{decorations}     \usepackage{tikz-qtree, tikz-qtree-compat}          \begin{document}          \begin{sidewaysfigure}[!t]         \centering         \tikzstyle{blueBox}=[             rectangle,             fill={blue!15},             draw,             font=\sffamily         ]               \tikzstyle{grayBox}=[             rectangle,             fill=lightgray,             text=black,             font=\sffamily,             draw         ]         \tikzstyle{violetBox}=[             rectangle,             fill=violet,             text=white,             font=\sffamily,             draw         ]         \tikzstyle{greenBox}=[             rectangle,             fill=green!50,             text=black,             font=\sffamily,             draw         ]         \tikzstyle{derivedFromList}=[             dashed,             cyan         ]         \resizebox{\textheight}{!}{                 \begin{tikzpicture}[                   level distance=1.1cm,                   level 1/.style={sibling distance=4cm},                   level 2/.style={sibling distance=2cm},                   level 3/.style={sibling distance=2.5cm}                 ]                 \node (root) [violetBox] {anyType}                   [edge from parent fork down]                   child {node[grayBox] {all complex types}                       edge from parent[loosely dashed, magenta]                   }                   child {node[violetBox] {anySimpleType}                           child {node[blueBox] {duration}}                           child {node[blueBox] {dateTime}}                           child {node[blueBox] {time}}                           child {node[blueBox] {date}}                           child {node[blueBox] {gYearMonth}}                           child {node[blueBox] {gYear}}                           child {node[blueBox] {gMonthDay}}                           child {node[blueBox] {gDay}}                           child {node[blueBox] {gMonth}}                           child {                               child [sibling distance = 3cm]{                                   child {node[blueBox] {string}                                       child {node[greenBox] {normalizedString}}                                       child {node[greenBox] {token}                                           child {node[greenBox] {language}}                                           child {node[greenBox] {Name}                                               child {node[greenBox] {NCName}                                                   child {node[greenBox] {ID}}                                                   child {node[greenBox] {IDREF}                                                       child {node[greenBox] {IDREFS}                                                           edge from parent[derivedFromList]                                                       }                                                   }                                                   child {node[greenBox] {ENTITY}                                                       child {node[greenBox] {ENTITIES}                                                           edge from parent[derivedFromList]                                                       }                                                   }                                               }                                           }                                           child {node[greenBox] {NMTOKEN}                                               child  {node [greenBox] {NMTOKENS}                                                   edge from parent[derivedFromList]                                               }                                           }                                       }                                   }                               }                               child {node[blueBox] {boolean}}                               child {node[blueBox] {base64Binary}}                               child {node[blueBox] {hexBinary}}                               child {node[blueBox] {float}}                               child [sibling distance = 3cm] {                                   child {node[blueBox] {decimal}                                       child [sibling distance = 4cm] {node[greenBox] {integer}                                           child {node[greenBox] {nonPositiveInteger}                                               child {node[greenBox] {negativeInteger}}                                           }                                           child {node[greenBox] {long}                                               child {node[greenBox] {int}                                                   child {node[greenBox] {short}                                                       child {node[greenBox] {byte}}                                                   }                                               }                                           }                                           child {node[greenBox] {nonNegativeInteger}                                               child {node[greenBox] {unsignedLong}                                                   child {node[greenBox] {unsignedInt}                                                       child {node[greenBox] {unsignedShort}                                                           child {node[greenBox] {unsignedByte}}                                                       }                                                   }                                               }                                               child {node[greenBox] {positiveInteger}}                                           }                                       }                                   }                               }                               child {node[blueBox] {double}}                               child {node[blueBox] {anyURI}}                               child {node[blueBox] {QName}}                               child {node[blueBox] {NOTATION}}                           }                   };               \end{tikzpicture}         }             \vspace{2cm}             \resizebox{0.5\textheight}{!}{                \begin{tikzpicture}[framed]                   \node (title) [font=\bfseries] {Legende:};                   \node (base) [violetBox, right = of title] {Basis Typ};                   \node (primitive) [blueBox, right = of base] {Primitiver Typ};                   \node (derived) [greenBox, right = of primitive] {Abgeleiteter Typ};                   \node (complex) [grayBox, right = of derived] {Komplexer Typ};                   \node (d1) [below = of base] {};                   \node (d2) [below = of primitive] {}                       edge [] node[swap, align=center]{Abgeleitet durch\\Einschränkung} (d1);                   \node (d3) [below = of derived] {};                   \node (d4) [below = of complex] {}                       edge [dashed, cyan] node[swap, align=center]{von Liste\\abgeleitet} (d3);                   \node (d5) [below = of d2] {};                   \node (d6) [below = of d3] {}                       edge [loosely dashed, magenta] node[swap, align=center]{Abgeleitet durch\\Erweiterung/Einschränkung} (d5);               \end{tikzpicture}         }                 \caption{vordefinierte XSD Datentypen nach \ldots Kapitel 3}         \label{fig:xsddatatypes}     \end{sidewaysfigure}          \end{document}


title: Colorbox under graphix hasn't the same width

text: In my document I want the `fcolorbox` the same width as the graphics, but I can't get it right. The left side is aligned (wich is good) but the right side is not (which is bad ...) What is going wrong here?               \documentclass[11pt,landscape,twoside]{article}     \usepackage[english,dutch]{babel}     \usepackage{multicol}     \usepackage{xcolor}     \usepackage{graphicx}     \graphicspath{{../graph/}{../tek/}}          \begin{document}     \begin{multicols}{3}          \parbox[t]{1.0\linewidth}{         \includegraphics[width=1.0\linewidth]{joec.jpg}\hfill         \vspace{-5.0pt}         \fcolorbox{gray}{gray}{\parbox{1.0\linewidth-2\fboxsep-2\fboxrule}{                             \color{white}                             \raggedleft{\small{text text text} }                         }                     }     }     \end{multicols}     \end{document}


title: Adding horizontal and vertical lines , matrix

text: A= [0.7577    0.7060    0.8235    0.4387    0.4898             0.7431    0.0318    0.6948    0.3816    0.4456             0.3922    0.2769    0.3171    0.7655    0.6463             0.6555    0.0462    0.9502    0.7952    0.7094             0.1712    0.0971    0.0344    0.1869    0.7547]         latex_table = latex(sym(A));         I save it as eqA.         equations1.tex             \newcommand{\eqA}{                     \left(                             \begin{array}{ccccc}                           \frac{6825116339432507}{9007199254740992} &                            \frac{6359497797823013}{9007199254740992} &                            \frac{3708524368810113}{4503599627370496} &                            \frac{987964467329731}{2251799813685248} &                            \frac{4411405500742427}{9007199254740992}\\                            \frac{6693542213068579}{9007199254740992} &                            \frac{71681197541747}{2251799813685248} &                            \frac{6258459855040489}{9007199254740992} &                            \frac{859193262592067}{2251799813685248} &                            \frac{1003370923741521}{2251799813685248}\\                            \frac{55201045594335}{140737488355328} &                            \frac{2494300503760379}{9007199254740992} &                            \frac{2856178200482939}{9007199254740992} &                            \frac{1723790560926853}{2251799813685248} &                            \frac{2910735031501795}{4503599627370496}\\                            \frac{2952009981953243}{4503599627370496} &                            \frac{415874915283285}{9007199254740992} &                            \frac{8558839330135289}{9007199254740992} &                            \frac{3581261978445933}{4503599627370496} &                            \frac{6389390375844301}{9007199254740992}\\                            \frac{770956303438939}{4503599627370496} &                            \frac{874885307559191}{9007199254740992} &                            \frac{77565677658637}{2251799813685248} &                            \frac{1683198784473707}{9007199254740992} &                            \frac{6797613319514473}{9007199254740992}                       \end{array}                               \right)             }              //latex         \documentclass{article}         \input{equations1}              \begin{document}             Here we have a nice matrix:             \[                 \eqA{}             \]              \end{document}      How can I add horizontal and vertical lines and label column and rows of the table. The contents of the table should be updated every time by input eqA. please see image![enter image description here](http://i.stack.imgur.com/6yjMg.jpg)


title: Subfloatrow: Omitted incrementation in figure numbering when using subfigures

text: I suspect this question is slighty related to another question found in subfloatrow: incorrect continued numbering. Trying out the MWE below, the incrementation of the figure number of figure two is omitted. That is, the caption of figures one and two both get the same number, i.e. `1` in this case, and figure three gets the number `2`. This happens every time I use subfigures with the `subfloatrow` environment, as shown below.               \documentclass{report}          \usepackage{caption}     \captionsetup{format=hang,font=small,labelfont=bf,labelsep=colon}     \captionsetup[subfigure]{labelformat=parens,font=small,labelfont=bf,textfont=sl,labelsep=space,list=no}          \usepackage[subrefformat=parens]{subcaption}          \usepackage[captionskip=13pt,facing=yes]{floatrow}     \floatsetup[figure]{margins=centering}     \floatsetup[subfigure]{style=plain,margins=raggedright,heightadjust=object}          \begin{document}     \begin{figure}[hbtp]         \ffigbox[\textwidth]{%         \caption{First figure.}         \label{figure1}}         {\makebox{\framebox[2.5cm]{\rule{0pt}{2.5cm}}}}     \end{figure}     \begin{figure}[hbtp]         \ffigbox[\textwidth]{\CommonHeightRow{%         \begin{subfloatrow}[2]\useFCwidth             \ffigbox[\FBwidth]{\subcaption{Subfigure a}\label{subfig:a}}{\makebox{\framebox[2.5cm]{\rule{0pt}{2.5cm}}}}             \ffigbox[\FBwidth]{\subcaption{Subfigure b}\label{subfig:b}}{\makebox{\framebox[2.5cm]{\rule{0pt}{2.5cm}}}}         \end{subfloatrow}}}{%         \caption{Second figure with subfigure~\subref{subfig:a} and subfigure~\subref{subfig:b}.}         \label{figure2}}     \end{figure}     \begin{figure}[hbtp]         \ffigbox[\textwidth]{%         \caption{Third figure.}         \label{figure3}}         {\makebox[\textwidth]{\framebox[2.5cm]{\rule{0pt}{2.5cm}}}}     \end{figure}     \end{document}      An image of the output: ![enter image description here](http://i.stack.imgur.com/1PQB2.png) Could this be a problem with the `caption` and `floatrow` packages not working correctly together, as mentioned here, or am I doing something wrong? Is there a workaround?


title: Typesetting Quine quotes

text: The obvious way of typesetting Quine quotes, also known as quasi-quotation marks, in LaTeX doesn't work well when the content of the quote is tall. For example:               \documentclass[12pt]{article}     \usepackage{amssymb}     \begin{document}     \[     \left\ulcorner \frac{1}{2} \right\urcorner     \]     \end{document}      This seems odd, given that `\ulcorner` (resp. `\urcorner`) is in the `mathopen` (resp. `mathclose`) class. Is there some way of getting LaTeX to automatically raise the quotes to match the height of the content? **Edit.** I forgot to mention that I would very much prefer a solution that works with `unicode-math`.


title: How to make a given thesis template compatible with German umlauts (error with Unicode char)

text: To **`Thesis.tex`** (of **Sunil Patel** 's **`Thesis Template.zip`**) I added these two lines (to allow for German special characters):               \usepackage[utf8]{inputenc} % my edit     \usepackage[T1]{fontenc} % my edit      in the               % Include any extra LaTeX packages required      section, tried to compile ("Run" in Texmaker, "Compile" in Kile) and received the following **error message** a number of times:               ! Package inputenc Error: Unicode char \u8:� not set up for use with LaTeX.      I read (somewhere on this site, can't find the link again just now) that it might help to **switch the order around** ,               \usepackage[T1]{fontenc} % my edit     \usepackage[utf8]{inputenc} % my edit      so I did, more or less with the same result(s). **Ulrike Fischer** wrote something about it, but frankly I don't get its import; translation(s) welcome! Is Ulrike basically saying that I can happily **_ignore_** both the **order** and the **error message**? Another thing which popped up is this message (in Texmaker): ![enter image description here](http://i.stack.imgur.com/bORRv.png) ... so maybe all it takes is to change **Thesis.tex** from **ISO-8859-1** to **UTF-8** ? Or would I need to **change the encoding of other files** (contained in the ***.zip** ), as well? Anyway, I _tried_ changing **Thesis.tex** to **UTF-8** , compiled, closed; re-opened; again it's back to **ISO-8859-1** :( Going in circles... * * * **Edit** Now I'm trying to use these lines instead               \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}      Maybe that will do the trick? * * * It would be **so much a great help** (to me as a beginner, who's only read/skimmed two LaTeX books so far (a while ago), but didn't get his hands dirty for real yet) if someone could look at the ***.zip** contents and let me know how to do it right. * * * Some **related Q &A's**, which are too technical for me at this point in time: Error: Unicode char \u8:φ not set up for use with LaTeX fontenc vs inputenc * * * Frequently loaded packages: Differences between pdfLaTeX and XeLaTeX Moving from pdfLaTeX to XeTeX - what do I need to know? Would anyone recommend me to switch from pdfLaTeX to a different compiler, at this beginners' stage of mine? For now, I'm only interested in writing a short thesis with one or two tables, bibliography, etc; nothing more exotic than that. * * * **PS** : If you happen to know of an **alternative template** which looks pretty similar to Sunil's and is already compatible with the German umlauts, please do let me know.


title: How to show auto-frame-break counter in beamer frame subtitle?

text: In beamer, I use a convention of inserting the section title as frame title and then providing a more specific title as subtitle. In this case, I think it makes more sense for me to show the "subframe" number after the frame subtitle instead of the frame title, which seems to be standard. I have "borrowed" the following parts of beamerbaselocalstructure.sty               \long\def\beamer@@frametitle[#1]#2{%       \beamer@ifempty{#2}{}{%         \gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}%       \gdef\beamer@frametitle{#2}%       \gdef\beamer@shortframetitle{#1}%     }%     }      and               \mode     <all>     {       \let\beamer@aftersubtitle=\relax     \newcommand<>\framesubtitle[1]{\only#2{\beamer@ifempty{#1}{}{\gdef\insertframesubtitle{{#1}}\beamer@aftersubtitle}}}     }      and dirty-hacked it as follows into a beamer document:               \makeatletter     \long\def\beamer@@frametitle[#1]#2{%       \beamer@ifempty{#2}{}{%         \gdef\insertframetitle{{#2}}%       \gdef\beamer@frametitle{#2}%       \gdef\beamer@shortframetitle{#1}%     }%     }     \mode     <all>     {       \let\beamer@aftersubtitle=\relax       \renewcommand<>\framesubtitle[1]{\only#2{\beamer@ifempty{#1}{}{\gdef\insertframesubtitle{{#1\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle continuation}\fi}}\beamer@aftersubtitle}}}     }     \makeatother      It _almost_ works: in the first frame, it shows the subtitle as "Subtitle I", but in the second (auto-broken) frame, the subtitle becomes "Subtitle II II" where I wanted "Subtitle II". I cannot figure out which part of the code causes the repetition of "II"? I know I should not be hacking around like this since beamer may have a proper interface to redefine the frame subtitle instead, but I simply don't know.


title: Increments in \foreach loop with two variables, TikZ

text: I'm trying to draw a stack of arrows at different angles in a `\foreach` loop in TikZ. I don't want to have to declare every z coordinate and angle manually so I was using the `{1,2,...,10}` syntax but this doesn't seem to work in the example below with two variables in the for loop.               \documentclass{standalone}     \usepackage{tikz}     \usepackage{tikz-3dplot}     \usetikzlibrary{arrows}     \usetikzlibrary{3d}     \tikzset{>=latex}          \begin{document}          \tdplotsetmaincoords{90}{90}     \tdplotsetrotatedcoords{0}{20}{70}          \begin{tikzpicture}[tdplot_rotated_coords,scale=0.5]          \foreach \x/\y in {7/0, 8/10, ..., 10/30}     {     \draw (2, 2, \x) circle(2) node[right]{\y};     \draw[->, ultra thick, red] (2, 2, \x) --++ (\y:2) --++ (\y+180:4);     }          \end{tikzpicture}     \end{document}      Does anyone know how to get around this? The code above gives the error `! Illegal unit of measure (pt inserted).` Thanks.


title: How to force a Table of Contents to start new page

text: My table of contents is around 1 and 2/3 pages long, but the first page ends with 6.8 The Forecast . . . . . . . . . . . . . 54 7 Quality Control 57 7.1 Process Control . . . . . . . . . . . . . 57 But I would like the 7 Quality Control to start at the top of the second page to keep all of section 7 together, is there any way to do this?


title: Display reference name, label number and target name with cleveref

text: I want to reference a section with `cleveref` like in the following example:               \section{Foobar}     \label{sec:foobar}          See \cref{sec:foobar}.      The output of this is: > See section 1. But what I would like is this: > See section 1 Foobar. I understand that there is no command by default, that produces this output. So I tried to build my own command like suggested for the `hyperref` package in this question. However, I could not find an equivalent command to `hyperref`'s `\nameref` in `cleveref`'s documentation. Is it possible to create a new command, that produces my desired output?


title: Adding subtitle and logo

text: How can I add subtitle in my report. How can I add logo (graphics) after date.               \documentclass[a4paper,twoside,10pt]{report}     \fancypagestyle{empty}{       \renewcommand{\headrulewidth}{0pt}       \fancyhead[L]{}       \fancyhead[C]{\includegraphics[width=12cm]{logo.jpg}}     }          \begin{document}          \title{(Title)}     \subtitle{( ABC......(new line) Timeperiod: 10.11.-12.11.12)}     \author{(Author)}          \maketitle          \end{document}


title: ntheorem Box over multiple pages with continued hint?

text: When my ntheorem Box spans multiple pages, I want it to have a hint on each page, that it is a continuation. How can this be done? Below is some sample code, spanning a box over two pages, which is yet missing a hint on the second page, that it is a continuation.               \documentclass[]{article}          \usepackage{blindtext}          \usepackage{framed}      \usepackage{pstricks}      \usepackage[framed]{ntheorem}          \begin{document}     \newshadedtheorem{test}{Example}          \begin{test}     \textbf{Some sample text}     \blindtext[5]     \end{test}          At the beginning of the box at page 2 it shall have\\     \textbf{Example 1 (Continued)}.\\     (Included at the top of the box, not before the box).          \end{document}      **Preview:** ![enter image description here](http://i.stack.imgur.com/wO1UD.png)


title: tikz - placing two nodes side by side

text: _my preamble:_               \documentclass{beamer}     \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{tikz}     \usetikzlibrary{positioning}      * * * Using tikz, I would like to write the word "event" and the word "cumulative" side by side. My problem is that the word "event" appears to be slightly above "cumulative"... Can you help me?               \begin{document}     \begin{frame}          \begin{center}     \begin{tikzpicture}     \node (1st) {event};     \node[right=of 1st] (2nd) {cumulative};     \end{tikzpicture}     \end{center}          \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/p1uDx.png)


title: How to prevent superscripts from moving under \sqrt?

text: When I put an expression with superscripts under a `\sqrt`, the superscripts (here "vis") move down a bit. How can I prevent that, so that it looks consistent no matter whether it's under a root or not? ![enter image description here](http://i.stack.imgur.com/cN8u2.png) Source:               \documentclass{article}     \begin{document}     \[  (E^\mathrm{vis}_x)^2 + (E^\mathrm{vis}_y)^2  \]     \[  \sqrt{ (E^\mathrm{vis}_x)^2 + (E^\mathrm{vis}_y)^2}  \]     \end{document}


title: number format in \pgfmathsetmacro for auto-foldernaming in tikz \foreach environment

text: What I want to do is creating automatically the filenames of the datafiles inside a foreachloop in tikz. Maybe it's better to show a minimal example first:               \documentclass{standalone}     \usepackage{tikz,pgfplots,pgfplotstable}     \pgfplotstableset{%         col sep=semicolon,         x index=0,         y index=1,     }     \usetikzlibrary{fpu}     \usepackage{filecontents}          \begin{filecontents}{(TA0.04)(T0.08).txt}     1;1     2;2     3;3     \end{filecontents}          \begin{filecontents}{(TA0.04)(T0.09).txt}     2;1     3;2     5;3     \end{filecontents}          \begin{filecontents}{(TA0.04)(T0.10).txt}     4;1     5;2     8;3     \end{filecontents}               \begin{document}          \begin{tikzpicture}     \def\TA{0.04}     \begin{axis}[xlabel=$x$, ylabel=$y$]         \foreach \A in {0.04,0.05,0.06} {             \pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}             \pgfmathsetmacro{\T}{\TA+\A}             \pgfmathroundtozerofill{\T}             \addplot table {(TA\TA)(T\T).txt};         }     \end{axis}      \end{tikzpicture}          \end{document}      Inside this little tikz picture I want to do the following (and I have to do this for quite a big set of datafiles and different starting values).   * First I want to define a starting value for \TA which I've done with \def...   * Given the list of looping numbers i want to calculate for each loop a now variable \T which represents the sum of \TA and the current looping variable \A   * Now, given this three numbers I want to load my data from my datafile (see preamble for filenames) **And here is my problem...** When the sum is equal to _0.10_ I get the error: ... Could not read table file '(TA0.04)(T0.1).txt'. ... because the value of \T is _0.1_ and not _0.10_. Each numbers in my filenames have exactly two digits, but sometimes the last one is a zero as shown above. I tried to fix this with `\pgfmathroundtozerofill{\T}` but it does not work. Has anybody an idea how I can fix this problem?? How can I fix the number of digits or add this zeros to the number??? P.S. Title seems to be the same than number formatting in foreach statement of tikz, but this question didn't helped me. Therefor I started a now one.


**I don't want to use nested tables.** My current code produces the following result. ![enter image description here](http://i.stack.imgur.com/yfG1m.png) And I want to get the following output. ![enter image description here](http://i.stack.imgur.com/frwEs.png) And the minimal working example:               \documentclass{article}     \usepackage[a4paper,margin=1cm,showframe]{geometry}     \usepackage{array,multirow,longtable}          \parindent=0pt     \arrayrulewidth=1pt\relax     \tabcolsep=5pt\relax          \newcolumntype{A}[2]{%         >{\minipage{\dimexpr#1\linewidth-2\tabcolsep-#2\arrayrulewidth\relax}\vspace\tabcolsep}%         c<{\vspace\tabcolsep\endminipage}}               \newcommand\x{\centering$\displaystyle\int f(x)\,\textrm{d}x=F(x)+C$}          \begin{document}     \begin{longtable}{                 |A{0.2}{1.5}    % 0.2 of \linewidth, 1.5 of \arrayrulewidth                 |A{0.5}{1}      % 0.5 of \linewidth, 1 of \arrayrulewidth                 |A{0.3}{1.5}    % 0.3 of \linewidth, 1.5 of \arrayrulewidth                 |}\hline     %%%%%%%%%%%%%%% FIRST ROW %%%%%%%%%%%%%%%      \x & \multicolumn{2}{                     A{0.8}{1.5} % 0.8 of \linewidth, 1.5 of \arrayrulewidth                     |}{\x} \tabularnewline\hline     %%%%%%%%%%%%%%% SECOND ROW %%%%%%%%%%%%%%%     \multicolumn{2}{             |A{0.7}{1.5}    % 0.7 of \linewidth, 1.5 of \arrayrulewidth             |}{\multirow{2}{*}{\x}} &                                                             \x \tabularnewline\cline{3-3}     %%%%%%%%%%%%%%% THIRD ROW %%%%%%%%%%%%%%%     \multicolumn{2}{             |A{0.7}{1.5}    % 0.7 of \linewdith, 1.5 of \arrayrulewidth             |}{}                    &                                                              \x \tabularnewline\hline     \end{longtable}     \end{document}      How to vertically center a content spanning multiple rows without using nested tables? * * * I have tried all answers (excluding Aditya's answer) and all don't vertically center the cell spanning multiple rows. Please kindly recheck your answer, or I might be wrong. :-)


title: How do I get references in subscripts to be the right size when compiling to dvi with hyperref?

text: ( _Having investigated the original question, I'm taking the liberty of re- writing it as I've found a MWE and so isolated the problem, but I don't know a solution.Andrew Stacey._) The scenario is as follows: a LaTeX document uses hyperref and, for some reason, has references as subscripts in some equation. When compiling to PDF, these are the correct size. When compiling to DVI, they come out normal size. They are still typeset in mathematics mode, just not in the right size. Here's a MWE. I'm using roman labels to better show that they are typeset in mathematics.               \documentclass{article}     \usepackage{hyperref}          \begin{document}          \begin{enumerate}     \renewcommand{\theenumi}{\roman{enumi}}     \item \label{ab} First     \item \label{cd} Second     \end{enumerate}          \[       M_{\ref{ab}} + M_i + M_{\mathrm{i}} + N_{\ref{cd}} + N_{ii} + N_{\mathrm{ii}}     \]          \end{document}      This is from the DVI: ![References with DVI](http://i.stack.imgur.com/BeSjB.png) This is from the PDF: ![References with PDF](http://i.stack.imgur.com/1hkXv.png) This would appear to be a bug in the `hdvips` driver and so the obvious answer is to fix this. However, the difficulty with that is that the problem was spotted with an upload to the arXiv which, according to the logs, uses TL2009. (The document above still exhibits the fault with TL2011, by the way.) So the questions:   1. Is there some way to fix this from within the main document?   2. If not, and the driver needs fixing, is there a simple fix, and how could that be applied to a file uploaded to the arXiv _without_ getting the arXiv to do anything? (For those who don't know how the arXiv works, it is possible to upload auxilliary files with the submission.) * * * _As this is a major rewrite of the question, the original question now follows._ When I compile my LaTeX, the size of all subscripts are smaller than the normal size of text (including reference subscripts), as expected. ![enter image description here](http://i.stack.imgur.com/wg5Ua.png) However, when the arXiv compiles my LaTeX, reference subscripts are the same size as normal text. ![enter image description here](http://i.stack.imgur.com/JInCZ.png) When the subscript is not also a reference, the correct font size is used. ![enter image description here](http://i.stack.imgur.com/NeuGT.png) I include   * \usepackage{subfig}   * \usepackage{graphicx}   * \usepackage{hyperref}   * \usepackage{tikz}   * \usetikzlibrary{arrows,backgrounds,calc,fit}   * \usepackage{multirow}   * \usepackage{tyson.sty} % my personal style file while the packages included by the arXiv LaTeX can be found in their log file from compiling my LaTeX. **Question:** How can I force the arXiv to typeset reference subscripts in the correct font size?


title: How to put a long piece of text in a box?

text: I want to put a long piece of text in a box, for example               The quick brown fox jumps right over the lazy dog. the quick brown fox      jumps right over the lazy dog. the quick brown fox jumps right over the lazy      dog. the quick brown fox jumps right over the lazy dog. the quick brown fox      jumps right over the lazy dog. the quick brown fox jumps right over the lazy      dog. the quick brown fox jumps right over the lazy dog. the quick brown fox      jumps right over the lazy dog.      How can this be done? Any suggestion in brief.


title: How to track a page change within an environment?

text: I'm trying to define an environment that can automatically detect when the material within it moves to a new page, reprint one of its arguments at the top of the new page, and change how it closes as a result. So far, this is what I've come up with:               \newif\ifnewpage\newpagefalse     \newenvironment{sungpsalm}[2]%     {\def\antiphon{#1}\gdef\tone{#2}\antiphon\par\tone\par\AtBeginPage{%     \setlength{\unitlength}{1in}     \put(1.5, -1.75){\makebox(0,0)[tl]{\tone}}}\newpagetrue}     {\par\ifnewpage\antiphon\else\textit{Repeat Antiphon}\fi\newpagefalse}      The `\AtBeginPage` macro comes from the `bophook` package. The problem is that this places the contents of `\tone` in the background and so the text appears overtop of it and it puts it on the page on which the environment starts too. Is there a way to do something like this except instead of it placing the contents of `\tone` in the background, they get inserted into the stream of the text at the beginning of the new page? Complete MWE:               \documentclass[openany,12pt]{book}          \usepackage{bophook}     \usepackage{blindtext}     \usepackage{atbegshi}          \newif\ifnewpage\newpagefalse     \newenvironment{sungpsalm}[2]%     {\def\antiphon{#1}     \gdef\tone{#2}     \antiphon\par\tone\par     \AtBeginShipoutNext{         \AtBeginPage{%             \setlength{\unitlength}{1in}             \put(1.5, -1.75){\makebox(0,0)[tl]{\tone}}         }         \global\newpagetrue         \global\addtolength{\topmargin}{1in}         \global\addtolength{\textheight}{-1in}     }     }     {\par\ifnewpage\antiphon\else\textit{Repeat Antiphon}\fi\global\newpagefalse      \AtBeginShipoutNext{           \AtBeginPage{}           \global\addtolength{\topmargin}{-1in}           \global\addtolength{\textheight}{1in}}     }          \begin{document}          \begin{sungpsalm}{Some text to represent the antiphon.  Normally this would be a snippet of music created using lilypond.}     {Some text to represent the psalm tone.}     \Blindtext     \end{sungpsalm}          \end{document}      **Edit:** Some further searching online led me to the `atbegshi` package which has similar functionality to `bophook`. After playing around with this package for a while, I found that by using both packages I could solve some of my problems. The above MWE has been modified so that the appearence of `\tone` is correct so long as a new sungpsalm environment does not start on the same page as the previous one ended. Since my application most likely will call for each sungpsalm to start a new page (or nearly so, with just a section header before) due to the page size considerations, I consider what I've got to be acceptable in that regard. However, that still left the problem that `\tone` was being placed as a background image, rather than directly in the text. I found a hacky way of dealing with this by expanding `\topmargin` (and shrinking `\textheight`) when the `\tone` is added to the page and then reverting them when it is cleared. Thus, while `\tone` is still technically being placed on a background layer, the regular text doesn't appear over top of it. I consider this a work around, not a solution. If anyone has a better idea as to how to do this right I'd appreciate it.


title: Big space between subsection, text and graphics

text: I have a problem with space between subsection, text and image. I have code:               \documentclass[12pt, a4paper]{article}     \usepackage[demo]{graphicx}     \usepackage{caption}          \begin{document}     \subsection{Some title}     Some text in section          \begin{center}     \includegraphics[scale=0.8]{image1.jpg}     \captionof{figure}{Diagram klas aplikacji serwera}     \end{center}     \begin{center}     \includegraphics[scale=0.75]{image2.jpg}     \captionof{figure}{Diagram klas aplikacji klienta}     \end{center}          \subsection{Some title 2}     Some text...     \end{document}      And my document looks like this: ![image](http://i.stack.imgur.com/iCz1V.jpg)


title: How to add References in Bibliography without a specific Author

text: I want to refer to a report available on a particular site. Although some human being must have compiled the report, but there isn't any reference to any specific name. Which BibTeX attribute should I choose for such citing.


title: Can one set global numberlike in thmtools?

text: I want all of my theorem-like environments to be numbered as if they were all theorems. Using `thmtools` I can do this with code like this:               \usepackage{amsthm}     \usepackage{thmtools}     \declaretheorem[numberwithin=section]{theorem}     \declaretheorem[numberlike=theorem]{corollary}     \declaretheorem[numberlike=theorem]{lemma}     \declaretheorem[numberlike=theorem, style=definition]{definition}      Is there a global package option that sets the default `numberlike` behavior for newly declared theorems? For example, is there an option that would allow code like this:               \usepackage{amsthm}     \usepackage[numberlike=theorem]{thmtools}     \declaretheorem[numberwithin=section]{theorem}     \declaretheorem{corollary}     \declaretheorem{lemma}     \declaretheorem[style=definition]{definition}


title: How to denote a "work in progress" in BibTeX

text: What is the correct way to reference in BibTeX an article that has no title yet? All the information I have right now is a list of authors (not even certain), a year (perhaps), and the knowledge of what I am going to write in that article. The bib entry I currently use is               @misc{work-in-progress,      author    = "{Work in progress}",     }      because it prints the right thing (`Work in progress.`) in the bibliography using the style I use. However, it seems wrong, and surely won't always be displayed in a sensible way if I change the style. Also, BibTeX complains that the `howpublished` field is missing.


title: Measuring the true height of a character

text: Suppose you have got a character that sits above the reference point. When you measure its height, the empty space above reference point gets also included in its height measurement but that is not the true height of the character itself. Thus How do you measure the correct height of a character. To see this better, please see the output of the following document:               \documentclass{minimal}     \usepackage{fontspec}     \usepackage{showcharinbox}     \newfontfamily\testfont{XB Zar}     \begin{document}     \begin{center}     \ShowCharInBox{\fontsize{500}{510}\testfont \char"0640}     \end{center}     \end{document}      XB Zar font can be obtained from here.


title: Recommended way to draw sets in Euclidean plane

text: I was wondering which is the most appropriate tool to draw sets in the Euclidean plane (with axis) such as the plane minus a given ray or the points in the plane which have a y coordinate between 2 and 3 . I was about to use `pgf plots` but that doesn't allow me to shade so freely the given regions (specially in the case of the whole plane minus a couple of points or lines), then I read about `tkz-euclide` but I have no clue how to use that one. Any suggestion?


title: Biblatex: Refer to footnote of first citation in citestyle verbose-ibid

text: I would like to get Biblatex to do the following: I want citations in footnotes. When they occur first time, full information (author, title, year and so on) should be shown. When they occur a second time in the paper they should be cited with authorname and shorttitle, and with a reference to the footnote of the first full-citation should be given. So for example:               A favourite work of Thedor W. Adorno is "Dialektik der Aufklärung"¹ which he wrote together with Max Horkheimer.      Some people say "Negative Dialektik"² is the main oeuvre of Theodor W. Adorno.     But let's discuss "Dialektik der Aufklärung"³ first.       ___________          ¹ Max Horkheimer and Theodor W. Adorno: Dialektik der Aufklärung. Philosophische Fragmente. 17.th Edition, Frankfurt am Main: Fischer, 2009     ² Theodor W. Adorno. *Negative Dialektik* Frankfurt am Main: Suhrkamp, 2003     ³ Max Horkheimer and Theodor W. Adorno: Dialektik der Aufklärung. (see footnote 1), p. 12      I have already found citestyle verbose-ibid which responds nearly perfect to my needs. The only thing I am still searching is how I get the automatic reference to the footnote with the first citation. Can someone tell me how? Thank you ever so much!


title: Preventing images from floating out of position

text: I am using includegraphics to place images. These are basically answers to questions, therefore I would like to images to appear immediately below the question label. However, I the images just keep floating out of position and appear on top of the question label. How can I prevent this? Sample code below:               \documentclass[12pt]{article}          \usepackage{graphicx}     \usepackage{epstopdf}          \DeclareMathSizes{11}{11}{11}{11}          \begin{document}          \setlength\parindent{0pt}          \textbf{1.} [Nothing to submit]          \textbf{2. (a)}     \includegraphics[scale=0.25]{graphs/fig_2a.eps}          \textbf{2. (b)}     \includegraphics[scale=0.25]{graphs/fig_2b.eps}          \end{document}


title: lualatex: Need help with using different fonts

text: I could need some start-up aid with using fonts in `lualatex`. I have 3 questions (sorry): **A)** I want to use a nice mainfont for normal text. The `lmodern`-default was nice with `pdflatex`, but the default now looks ugly: the `f`'s overlap, see MWE and output. Seems not to be a ligature issue (I don't want to use ligatures at all!) **Update (solved)** : I'm a german writer, and I don't see ligatures anywhere in german texts, so I want to disable them in mine, too, of course. The link from phg (http://tex.stackexchange.com/a/103242/14066) does the trick!               \defaultfontfeatures{Ligatures={NoCommon, NoRequired, NoContextual, NoHistoric, NoDiscretionary}}     \setmainfont{Latin Modern Roman}      `microtype`-package with command `\DisableLigatures[f]{ encoding = * }` \+ `babel`-package doesn't give the expected output. The `selnolig`-package with commands `\nolig{f[fil]}{f|x} \nolig{Th}{T|h}` also works. **B)** Besides the mainfont I want something highlightning for musical compositions. **Update** : To set this right: I want to have my default font in `\textsc`, slightly slanted (`\textsl`?) and with small letterspacing. I'm not sure, if I can use `microtype` for this. I've tried it, but it doesn't change the letterspacing. Also it didn't work to combine `\textsc` and `\textsl`. **C)** I need to write a lot of musical symbols, that's why I switched to `lualatex`, so I can embed music fonts. But if I try it, I can't get it to work. I've tried it with `BravuraText`, found here: http://www.smufl.org/fonts. The funny fact is, that I can't see any of the written letters in the output, and I can't see the font properly in the Win7-character map (charmap), but I can see it in OpenWriter... **Update (solved)** : Thx to Will Robertson, Bernard (see answers) and Thérèse. fontforge or fontmatrix can be used to inspect the font. The best things about B) and C) would be, if I could use simple commands like `\composition{Brandenburgische Konzerte}` and `\fortissimo`.    MWE:               \documentclass[ngerman]{article}     \usepackage{fontspec}          \begin{document}     asdfff asf aft afft     \fontspec{BravuraText}     abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ          \end{document}      Output: ![enter image description here](http://i.stack.imgur.com/bzeXc.jpg)


title: change the style of numbering the theorem, definition in sections

text: `enter code here`Could you help me please to create a paper which appears in the following way: **The Newton's Law** \- section **1 Definition** \- \begin{definition} \end{definition} **2 Theorem** \- \begin{theorem} \end{theorem} **The conjecture of Poincare** \- section **1 Definition** \- \begin{definition} \end{definition} **2 Theorem** \- \begin{theorem} \end{theorem} For me it is hard to create different sections which have same numbering, and also to put the number in front of the theorem or of the definition. Thanks!               \documentclass[a4paper,12pt]{article}     \usepackage{amsfonts}     \usepackage{amssymb}     %\usepackage{amsthm}     \usepackage{mathrsfs}     \usepackage{amsmath}     \usepackage[usenames,dvipsnames]{color}     \usepackage{color,graphicx}     \usepackage{algorithmic}     \usepackage{algorithm}     \usepackage{hyperref}          \usepackage{variations}     \usepackage[romanian]{babel}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{graphicx}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern,amsthm}     \swapnumbers      \newtheorem{definition}{Definition}     \newtheorem{theorem}[definition]{Theorem}      \let\origsection\section      \renewcommand\section{\setcounter{definition}{0}\origsection}     \newtheorem{lemma}[theorem]{Lem\u a}          \newtheorem{corollary}[theorem]{Corolar}     \newtheorem{proposition}[theorem]{Not\u a}          %\theoremstyle{definition}          \theoremstyle{remark}     \newtheorem{remark}[theorem]{Consecin\c t\u a}     \newtheorem{example}[theorem]{Exemplul}     \newtheorem*{acknowledgements}{Observa\c{t}ie}


title: Using consolas as the default teletype style font for listings package?

text: Is it possible to use consolas as the default teletype font to display code listings using the `listings` package? The default computer modern teletype font is too wide for my taste. **Edit:** I am using regular LaTeX.


title: creating a .bib file

text: I am using Texmaker on a Mac. I am having trouble creating a bibliography. Firstly, how do I create a file with the `.bib` extension? When I try to save a new file - let's call it "ref" - it saves as a `.tex` file. There is no option in "Save As" for `.bib`. In "Save As" when choosing extension time there is only one option which is "TeX Files( `.tex`, `.bib`, ...)". Secondly, I understand that I am supposed to compile using PDFLatex>BibTex>PDFLatex>PDFLatex>ViewPDF. But I get error commands such as "exited with erros" when running `bibtex`. I am pasting the error message here: > `\bibdata{ref : }` I'm skipping whatever remains of this command I found no > cite keys---while reading file Impact of schooling on slum > children_Summary_v1.aux I found no database files---while reading file > Impact of schooling on slum children_Summary_v1.aux (There were 5 error > messages) > > Process exited with error(s) When using `beamer`, do we use the same method to create a bibliography?


title: How to create my own math operator with limits?

text: How can i write my own math operator with limits? I want it to look like: `\sum\limits_{e=1}^{m}` but with a capital A (if possible bigger than the normal text) instead of the sum. Thanks for the help!


title: Changing footnote symbols

text: I was wondering if there is way to change the symbols of footnotes to any symbol I want. I know there are some packages that put away the numbers and use predefined symbols, but I want to use some arbitrary symbol. Is there a way?


title: How to create an Arrow Symbol

text: I am looking for a way to create a symbol of an arrow in which it points in a downward direction but do not know if one already exist. I have tried `detexify` to come up with nothing. The picture of the arrow is below: ![Picture of Arrow](http://i.imgur.com/Ln5GQs.jpg)


title: Creating a modular document

text: I have already created 25 different files that I whish to include in a long document. My first attempt is as shown below:               \documentclass[10pt, twoside,letterpaper]{report}     \usepackage{amsmath,amssymb,amsfonts} % Typical maths resource packages     \usepackage{graphics}                 % Packages to allow inclusion of graphics     \usepackage{color}                    % For creating coloured text and background     \usepackage{hyperref}               % For creating hyperlinks in cross references     \usepackage{xfrac}                     % For creating inline fractions             \usepackage{caption}     \usepackage{subcaption}     \usepackage[explicit]{titlesec}     \usepackage{lipsum}     \usepackage{helvet}     \usepackage{wrapfig}     \usepackage{titlesec}      \usepackage{fancyhdr}     \usepackage[utf8]{inputenc}     \usepackage{mathptmx}     \usepackage{lmodern}          %\setlength{\headheight}{12pt}          \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}          \numberwithin{equation}{chapter}     \graphicspath{my_images}     \makeindex          \begin{document}          \input{./title.tex}          \input{Chapter1.2}          \end{document}      File Chapter1.2 is:               \chapter{Contravariant and Covariant Tensors - Part 1}     Let's begin with two curvilinear coordinates systems as shown in Figure 1.1      \begin{figure}[ht]     \begin{center}     \includegraphics[width=0.65\textwidth]{Curv_Coord}     \caption{Curvilinear Coordinate systems}     \end{center}     \label{myfig1.1}     \end{figure}     and assume that we know how to transform from one system to the other so that if we know the components of a contravariant tensor in the x-coordinate system, we know its components in the y-coordiante system by an equation such as:      The difficulty I have is that I want to have a smaller font size for the Chapter title - Contravariant and Covariant Tensors - Part 1 - Furthermore, where should I write the command that would allow such font change, in main.tex or in Chapter 1.2.tx Unfortunately, after many hours of trial and error, I have to admit defeat. Can someone help with this problem? Thank you kindkly


title: Hyperlinks not working after preview?

text: I have used `hyperlinks` throughout my thesis, but then after previewing the pdf output and saving it for printing, the links are gone. Any idea why this occurred? Here's a working example:               \documentclass[11pt]{amsart}     \usepackage{geometry}                   \geometry{letterpaper}                        \usepackage{epstopdf}     \usepackage[colorlinks]{hyperref}     \usepackage{cleveref}     %     \begin{document}     \href{http://www.google.com}{Google} %     \end{document}


title: Fancyhdr package and page numbering issues

text: I am using the `fancyhdr` package and I have got big issues with the page numbering. Indeed, the pages appear for each new title, but then I don't have anymore page numbers, Here is the code furnish by the package, I hope that someone could explain me what is wrong:               \usepackage{fancyhdr}     \lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}     \rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}     \chead{}     \lfoot{}     \rfoot{}     \cfoot{}     \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}       \renewcommand{\sectionmark}[1]{} \renewcommand{\subsectionmark}[1]{} \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else \hbox{} \thispagestyle{empty}     \newpage     \if@twocolumn\hbox{}     \newpage\fi\fi\fi}


title: How to add line break to caption without using caption package

text: I wish to add a line break to a caption, but I would wish to avoid adding of `caption` package. Is it possible?               \documentclass{article}     \usepackage[format=plain,      justification=raggedright,singlelinecheck=false]{caption}     \begin{document}     \begin{figure}     \caption{This is the caption\\ This is the second line}     \end{figure}     \end{document}


title: Equation Counters in and outside Theorems

text: I am trying to setup the counters so that the equations and theorems increment by section and there is no overlap between equation and theorem numbering. I also would like to be able to number equations inside theorems as a subnumber of the theorem number. For example in section 2 I might have an equation first that would be labeled (2.1) and then a theorem, labeled 2.2 where there is an equation inside the theorem which I would want labeled 2.2.1.


title: Setting font size for caption package

text: I wish to set the font size for caption package, how should I do it, now I have this in my preamble               \usepackage[skip=2pt]{caption}


title: How to create a table with long text and which packages use

text: Please, Help me inserting a table like this. I could not prepare this table easily because the long text i have to insert into the columns. I have been trying from some examples of stackechange but have not been successful. Perhaps the amount of text that includes the table. I am facing difficulties with merging the rows and columns. I am in an urgent need. Please Help ! Should I use all those packages? What and how each package is used?               \usepackage{multirow}     \usepackage{hhline}     \usepackage{array}     \usepackage{booktabs}     \usepackage{tabu}     \usepackage{makecell}       This is the example i wanna get Thanks ![enter image description here](http://i.stack.imgur.com/2UvuV.jpg)               \documentclass[11pt]{book}     \usepackage[utf8]{inputenc}     \usepackage[spanish,mexico]{babel}     \usepackage[T1]{fontenc}     %\usepackage{amsmath}     %\usepackage{amsfonts}     %\usepackage{amssymb}     \usepackage{graphicx}     \usepackage{apacite}     \usepackage{multirow}     \usepackage{hhline}     \usepackage{array}     \usepackage{booktabs}     \usepackage{tabu}     \usepackage{makecell}     \begin{document}     \begin{table}[h]     \caption{``“Utilidad y Derivación de las Emociones Primarias (Riso, W., 2008)''}     \begin{center}     \small     \begin{tabu}{|[2pt]} >{\centering}p{3cm} | [2pt] >{\centering}p{3cm}     \tabucline[2pt]{-}     &{Emociones primarias} & {Derivación de las emociones primarias}\\ \tabucline[2pt]{-}     \multirow{6}{*}{\parbox{3 cm}{\textbf{Dolor}} & \multirow{6}{*}{\parbox{3 cm}{textbf{Sufrimiento}}\\     & Avisa cuando un órgano físico está funcionando mal o está siendo agredido, para que sea reparado o defendido. & Indica que hay una estructura mental afectada o un apego irracional que debe ser trabajado.\\     &\textbf{Miedo} & \textbf{Miedo psicológico}\\     & Protege ante un peligro real.& Indica que se ha dejado de actuar. La parálisis es sostenida por ideas irracionales.          \tabucline[2pt]{-}     \end{tabu}     \end{center}     \end{table}     \end{document}


title: how to implement `cvtripleitem` in moderncv

text: You may know that there exists `cvdoubleitem` in `moderncv` with which you can put double items in one line. Is there a way to self-define a `cvtripleitem` so as to put triple items in one line?               \documentclass[10pt,a4paper,sans]{moderncv}     \moderncvtheme[blue]{classic}     \usepackage[T1]{fontenc}     \usepackage[utf8x]{inputenc}     \usepackage[english]{babel}     \usepackage{helvet}     \usepackage[scale=0.9]{geometry}     \name{John}{Doe}          \begin{document}     \maketitle          \section{aaa}     \cvdoubleitem{xxxx}{aaaaa}{yyyyy}{bbbbb}     % what I want is: \cvtripleitem{xxx}{aaa}{yyy}{bbb}{zzz}{ccc}     \end{document}


title: mdframed and minipage

text: I'm trying to find a way to use mdframed to make separation of the frame to the next page but low knowledge does not help me. My effort is try and effect .... no results so far. I know there have been similar questions. But what I want is a way to keep the environment as shown in the example. Please for help.               \documentclass[b5paper,11pt]{book}      \usepackage{mdframed}     \usepackage{lipsum}     \usepackage{tikz}     \usepackage{lipsum}     %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \newlength{\PlaisioBoxWidth}     \newsavebox{\KokkinoRoundedBox}     \newenvironment{RedBox}[1][\dimexpr\linewidth]     {\setlength{\PlaisioBoxWidth}{\dimexpr#1}       \begin{lrbox}{\KokkinoRoundedBox}         \begin{minipage}           {\PlaisioBoxWidth}   }%     {     \end{minipage}       \end{lrbox}       % \begin{center}       \begin{tikzpicture}%         \draw node[draw=black,fill=red!15,rounded corners,%         inner sep=1ex,text width=\PlaisioBoxWidth]%         {\usebox{\KokkinoRoundedBox}};       \end{tikzpicture}       % \end{center}     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %     \begin{document}     %     \begin{RedBox}     \lipsum[1]     \end{RedBox}     %      \begin{RedBox}      \lipsum[1-6]     \end{RedBox}     %     \end{document}


title: Creating chapters by referencing parts of other chapters

text: I am trying to create a chapter or a section by referencing some parts of other sections. For example: > “He goes to school” Here “school” can be   * Business school,   * Law school,   * etc. > “She is going to watch a movie” Here movie can be   * romantic/comedy   * horror,   * sci-fi,   * etc. So here, I want to reference school and movie, so that they come up in a new chapter or section, like this   1. school - Business school, Law school, etc.   2. movie - romantic/comedy, horror, sci-fi, etc.   3. … Since there are lot of these, doing it manually is tedious. Is there any way of doing this automatically using some commands? Any help is appreciated.


title: TikZ fill zero-width border

text: I am trying to create a density plot with TikZ using `\fill` and tightly stacked rectangles. The thin unwanted borders in the image, are they an artefact of rendering or a feature of `fill`? Can they be eliminated/smoothened?               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgf}     \usepackage{gnuplot-lua-tikz}   %for colors     \begin{document}     \pagestyle{empty}     \begin{tikzpicture}[xscale=0.05,yscale=0.3]     \fill[rgb color={0.40,0.50,0.01}, opacity=0.75] (0.000,0.00) -- (2.000,0.00) -- (2.000,0.40) -- (0.000,0.40) -- cycle;     \fill[rgb color={0.40,0.50,0.01}, opacity=0.75] (0.000,0.40) -- (2.000,0.40) -- (2.000,0.80) -- (0.000,0.80) -- cycle;     \fill[rgb color={0.40,0.50,0.01}, opacity=0.75] (0.000,0.80) -- (2.000,0.80) -- (2.000,1.20) -- (0.000,1.20) -- cycle;     \fill[rgb color={0.40,0.50,0.01}, opacity=0.75] (0.000,1.20) -- (2.000,1.20) -- (2.000,1.60) -- (0.000,1.60) -- cycle;     \fill[rgb color={0.40,0.50,0.01}, opacity=0.75] (0.000,1.60) -- (2.000,1.60) -- (2.000,2.00) -- (0.000,2.00) -- cycle;     \fill[rgb color={0.68,0.74,0.48}, opacity=0.75] (0.000,2.00) -- (2.000,2.00) -- (2.000,2.40) -- (0.000,2.40) -- cycle;     \fill[rgb color={0.95,0.96,0.92}, opacity=0.75] (0.000,2.40) -- (2.000,2.40) -- (2.000,2.80) -- (0.000,2.80) -- cycle;     \fill[rgb color={0.99,0.99,0.98}, opacity=0.75] (0.000,2.80) -- (2.000,2.80) -- (2.000,3.20) -- (0.000,3.20) -- cycle;     % ...     \end{tikzpicture}     \end{document}      ![zoom image](http://i.stack.imgur.com/F6Ktl.png) ![enter image description here](http://i.stack.imgur.com/JcYCU.png)


title: Problem using T1 fontenc.sty

text: It appears an error in raw 100 of the file `fontenc.sty`. I don't understand why. I used it with Spanish `babel`. What can I do?


title: Change numbering level for one chapter only

text: Apologies if this is duplicate but couldn't find it. I have a document using amsmath for chapter, section & subsection numbering, & everything (theorems, lemmas etc) uses the same numbering system. I have one chapter that has no sections or subsections (this does make sense, honest, its a 5-6 page theorem that doesn't fit with anything else). The problem is the numbering here starts at 4.0.13 (because I haven't reset the subsection counter, presumably). I have two options - either set it to 4.1.1 or even better, have only two part numbering in this chapter so that the theorems/lemmas can be numbered 4.1, 4.2 etc etc. I have read quite a few posts about \numberwithin & \counterwithin but am pretty confused. Example below - here the thm in chapter 2 is number 2.0.3 but I want it to be 2.1.1 or preferably just 2.1.               \documentclass{scrreprt}          \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amsthm}          \theoremstyle{plain}% default     \newtheorem{thm}{Theorem}[section]     \newtheorem{lem}[thm]{Lemma}     \newtheorem{cor}[thm]{Corollary}     \newtheorem{prop}[thm]{Proposition}     \theoremstyle{definition}     \newtheorem{defn}[thm]{Definition}     \newtheorem{conj}{Conjecture}[section]     \newtheorem{exmp}{Example}[section]     \theoremstyle{remark}     \newtheorem*{rem}{Remark}     \newtheorem*{note}{Note}     \newtheorem{case}{Case}     \makeatletter\@addtoreset{case}{thm}\makeatother     \makeatletter     \def\thm@space@setup{%      \thm@preskip=\parskip \thm@postskip=0pt}     \makeatother          \makeatletter\@addtoreset{case}{lem}\makeatother     \makeatletter     \def\thm@space@setup{%     \thm@preskip=\parskip \thm@postskip=0pt}     \makeatother          \begin{document}          \begin{chapter}{chap title}     \begin{section}{title blah}     \begin{thm}     hello     \end{thm}     \begin{subsection}{title blahh}     \begin{lem}      hi     \end{lem}     \end{subsection}     \end{section}     \end{chapter}          \begin{chapter}{chap title 2}     \begin{thm}     hello again     \end{thm}     \end{chapter}          \end{document}


title: Plus-minus sign in a circle?

text: I’m using `\oplus` and `\ominus` in a manuscript and I need an “`\oplusminus`”, that is, a `±` in a big circle. Whatever I use will probably end up being published (though maybe only four times in the whole book), so I’m anxious for it to look elegant and natural, not hacked or unclear. Stealing some code from egreg and Alain Matthes I've come up with the code below. It's fairly similar in proportions to `\oplus` and `\ominus`, but the match could be a bit better: I've had to shrink the `\pm` sign to footnotesize and then stick it into a `\raisebox`, yet the thickness doesn’t quite match that of `\oplus` and `\ominus`. Does anyone have suggestions for improvement? ![enter image description here](http://i.stack.imgur.com/YBKlH.png)               \documentclass[12pt]{report}     \usepackage{tikz}     \usetikzlibrary{arrows,matrix}     \usepackage{amssymb, amsmath, mathptmx}          \newcommand{\opm}{        \mathbin{         \mathchoice           {\buildcirclepm{\displaystyle}}           {\buildcirclepm{\textstyle}}           {\buildcirclepm{\scriptstyle}}           {\buildcirclepm{\scriptscriptstyle}}       }      }          \newcommand\buildcirclepm[1]{%       \begin{tikzpicture}[baseline=(X.base), inner sep=-.8, outer sep=-.65]         \node[draw,circle] (X)  {\footnotesize\raisebox{.1ex}{$#1\pm$}};       \end{tikzpicture}%     }          \begin{document}          $\ominus \opm \oplus$          \end{document}


title: Lyx itemize returning to last number

text: I would like to have the following output:   1. Text (a) Text Text   2. Text That is, after a subitem, I want to return to the last number without creating a new one. Is there any way to do this without ERT?


title: Why does this use of `\expandafter` not work?

text: I've written the following code:               \newif\ifconsecutive     \consecutivefalse          \newcommand{\myfirst}[1]{#1\consecutivetrue\expandafter\consecutivefalse}     \newcommand{\mysecond}[1]{\ifconsecutive $\longrightarrow$\fi #1}      The idea was that if I write               \myfirst{A}\mysecond{B}      I get the equivalent of               A $\longrightarrow$ B      while if I type something in between, like               \myfirst{A} then \mysecond{B}      I instead get the equivalent of               A then B      The idea was that `\expandafter` would cause the text following the invocation of `\myfirst` (either an invocation of `\mysecond` or some arbitrary other code) to be expanded while `\consecutivetrue` is in effect, so if the next thing is a `\mysecond` invocation, the `\ifconsecutive` will be executed and the arrow generated, while if something else follows, it will not care about `\consecutivetrue`. After that expansion, `\consecutivefalse` should be called, causing any later invocation of `\mysecond` to not generate the arrow. However what _actually_ happens is that the arrow never gets inserted, no matter whether the macros are consecutive or not. Now my question is: Why does this pair of macros not work as intended? Here's a complete compilable code:               \documentclass{article}          \newif\ifconsecutive     \consecutivefalse     \newcommand{\myfirst}[1]{#1\consecutivetrue\expandafter\consecutivefalse}     \newcommand{\mysecond}[1]{\ifconsecutive $_$\fi #1}          \begin{document}     \myfirst{A}\mysecond{B}          \myfirst{A} then \mysecond{B}     \end{document}


title: vertical equality in

text: How does one get inline or at least formula space typography of the following sort in an easy to parse (for the editor) way when writing formulas, for instance: ![IMG1](http://i59.tinypic.com/sngkee.png) Yes, I know, the equalities ... can be done within TikZ for commuting diagrams, like with arrows. But is there an easy way to just to use vertical equalities (and most importantly, inequalities) in this way in simple formulas, without invoking a TikZ frame, in ordinary latex math $ ... $. EDIT: I should just clarify, I meant the above image as an example. Some great solutions were posted, but how can they be generalized to allow for more or fewer levels or nested together, so that they can be robustly used without changing the basic grid above below to left to right relative framework (and thus avoiding driving the editor of a paper or coauthor mad)? For instance, also: ![IMG2](http://i59.tinypic.com/ayq7h2.png) ![IMG3](http://i62.tinypic.com/kcbas8.png) Most clearly: how can stacks or macros be used to create in line or in formula "above" "below" arbitrary equalities/inequalities that ignore other levels above and below? My own attempt, which doesn't quite work, since columns cannot overlap sideways in matrices, and yet they have to look good, and the same problem with the macro approach, and of course a matrix cannot be subscript size: ![IMG4](http://i62.tinypic.com/doqayp.jpg)               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsmath}     \usepackage{adjustbox}          \newcommand{\veq}{\mathrel{\rotatebox{90}{$=$}}}     \newcommand{\vneq}{\mathrel{\rotatebox{90}{$\neq$}}}          \begin{document}          This is a test. Yes it is. Of course. Look here. Yes, Here. That's right. Mhmm. Words. Filler. Indeed. Look. A paragraph. With words. Here. Yes. And where's that? Where is here? It's right here:          \[      \left. \frac{\partial f(A,B,C,D)}{\partial A} \right|     \raisebox{.9\baselineskip}{$_{\begin{array}{ccccc}     A & = & B & = & Z \\     {} & {} & \vneq & {} & {} \\     C & \neq & I & \neq & W \\     \veq & {} & {} & {} & {} \\     D & = & G & \neq & Q^2+3 \end{array} }$}     \]          \end{document}


title: Bookmark with a link to open the attachments pane

text: Is it possible to have a **bookmark with a link to open the attachments pane**? If you carefully read **hyperref** packege you'll see that the **\Acrobatmenu** alows you to have links that enables you to open and show a lot of menus and options in Adobe Acrobat. But I don't see any attachments pane option. Is it possible? Is there any workaround or way to achieve this? I've also looked with **javascript** but I can't find any info regarding this :( From this excelent site you can see the available options for \Acrobatmenu: ![enter image description here](http://i.stack.imgur.com/ZQaQq.png) Thanks for the help


title: Too long website as footnote results in `Overfull \hbox`

text: I have a very long website as footnote and I get a warning message `Overfull \hbox`. This is the website:               \footnote{Vgl.: http://www.bmwi.de/DE/Themen/Energie/Energiedaten-und-analysen/Energiedaten/energiegewinnung-energieverbrauch.html}      If I insert `allowbreak` like below, I get another warning message `Underfull \hbox`               \footnote{Vgl.: http://www.bmwi.de/DE/Themen/Energie/Energiedaten-und-analysen/Energiedaten/\allowbreak energiegewinnung-energieverbrauch.html}      Can someone tell me which is the best way to handle this?


title: reset counter when using \LTRfootnote from bidi package

text: I'm using `xepersian` package for my Persian job, and I would like the footnote counter to automatically restart from '1' for each page of my document when I using `\LTRfootnote` command, but `footmisc` package not work with this command.


title: Bibtex style for "Statistics and Computing"

text: I would like to create a bibtex style which answers the requirements of Statistics and Computing journal. How could I do that? Here is an example of how the bibliography should look like: > Journal article: > > Hamburger, C.: Quasimonotonicity, regularity and duality for nonlinear > systems of partial differential equations. Ann. Mat. Pura Appl. 169, 321–354 > (1995) > > Book: > > Geddes, K.O., Czapor, S.R., Labahn, G.: Algorithms for Computer Algebra. > Kluwer, Boston (1992) > > Book chapter: > > Broy, M.: Software engineering — from auxiliary to key technologies. In: > Broy, M., Denert, E. (eds.) Software Pioneers, pp. 10–13. Springer, > Heidelberg (2002) In the text, the references should be as follows: > Negotiation research spans many disciplines (Hamburger 1995). Thank you for your help!


title: Can I use | as column separator in pgfplotstable?

text: I want to use `|` as column separator in the CSV file. Because it looks clean, so I won't feel headache to edit the CSV file directly. I have checked the manual, it seems the option `col sep` accepts only a few values: `comma` for `,`, `semicolon` for `;`, `colon` for `:`, `braces` for `{}`, `ampersand` for `&`, space and tab. That's all. I have tried `col sep=|` however it won't work.


title: Thesis class file, signing page not showing up

text: http://grad.ucalgary.ca/current/thesis/latex-template For some reason the signing page (under Substitute List of Examiners) doesn't show up when you compile. The class file looks like this. I'm not sure how I could modify it to make the sign page show up when I compile the thesis.               \documentclass{ucalgthes1}     \usepackage[letterpaper,top=1in, bottom= 1in, left= 1in, right= 1in]{geometry}     %\usepackage{fancyhdr}     %\fancyhead{}     %\fancyfoot{}     %\renewcommand{\headrulewidth}{0pt}     %\fancyhead[RO,LE]{\thepage}     %Define other usepackages here     \usepackage{hyperref}     \title{Title of Thesis \\ \bigskip Second ThesisTitle Line }     %     %            Insert the correct information between the {}     %     \author{Student's name}     \thesisyear{year}     \thesis{thesis}    % the word dissertation can be inserted between {}     \newcommand{\thesistitle}{Title of Thesis}     \monthname{monthname}     \dept{NAME OF DEPARTMENT}     \degree{NAME OF DEGREE IN FULL}     %     %                    End of supplied information     %     \begin{document}     \makethesistitle     \pagenumbering{roman}     % resets page counter to one     \setcounter{page}{1}     %\chapter*{UNIVERSITY OF CALGARY \\ FACULTY OF GRADUATE STUDIES}     %\thispagestyle{empty}     %The undersigned certify that they have read, and recommend     %to the Faculty of Graduate Studies for acceptance, a \Thesis\ entitled     %``\thesistitle'' submitted by \Author\     %in partial fulfillment of the requirements for the degree of     %\Degree.\\          %     %                 Substitute  List of Examiners     %     %\begin{signing}{Department of Academic Computing}     %\signline     %Chairman, Dr.~John D.~Doe \\     %Department of Academic Computing \\     %Services  \\     %\signline     %Chairman, Dr.~John D.~Doe \\     %Department of Academic Computing \\     %Services  \\     %\signline     %Chairman, Dr.~John D.~Doe \\     %Department of Academic Computing \\     %Services  \\     %\signline     %Chairman, Dr.~John D.~Doe \\     %Department of Academic Computing \\     %Services  \\     %\newsigncolumn         use this command to start a new column if necessary     %\newsigncolumn     %\signline     %Chairman, Dr.~John D.~Doe \\     %Department of Academic Computing \\     %Services  \\     %\signline     %Dr.~Jane Smith \\     %Department of Academic Computing  \\          %\signline     %Dr.~A.~B.~Brown \\     %Department of Academic Computing  \\     %\end{signing}     %     \newpage     \phantomsection     \altchapter{\bf{Abstract}}     Paragraph 1          Paragraph 2          Paragragh 3     \newpage     \phantomsection


title: Update references and labels of equations after changing the order

text: This seems again trivial, but I cannot find any solution to my problem in the questions that have been asked on referencing. The issue can be explained easily: I am making a document with many equations which are numbered consecutively. All of them are labelled (manually) via `\label` and referenced via `\ref`. Now let's say I decide to move one of the equations at the beginning of the document to the Appendix. This makes all of the following labels and references too large by exactly 1. I cannot believe I have to edit all of them manually? I mean it's possible if you make all the references at the end of your work, but still I wonder if there is a more effective way.


title: Citing Wikipedia with APA Formatting and BibTeX

text: Wikipedia's entry on citing Wikipedia says that APA formatting requires that their page on plagiarism be formatted as: > Plagiarism. (n.d.). In Wikipedia. Retrieved August 10, 2004, from > http://en.wikipedia.org/wiki/Plagiarism In particular, the APA format requires the article name to take the place of the author. To cite Wikipedia with BibTeX, they say to use the code:               @misc{ wiki:###,        author = "Wikipedia",        title = "Plagiarism --- {W}ikipedia{,} The Free Encyclopedia",        year = "2004",        url = "\url{http://en.wikipedia.org/w/index.php?title=Plagiarism&oldid=5139350}",        note = "[Online; accessed 22-July-2004]"      }      This however, puts Wikipedia as the author, among other things (and is therefore not in APA format). The package I am using is `apacite` and the code I have for my bibliography is:               \usepackage{apacite}     \bibliographystyle{apacite}     \bibliography{FinalRoughDraft}      I have tried things like setting putting the title of the article in the `author = ...` field, but if I put, say, `author = Estimation lemma`, the output in the author position is "lemma, E." I have also tried putting quotation marks around the title, but this does not work either. Is there any way to get around this?


title: Multi line header for pgfplotstable

text: I have a dataset in csv file format that I'm loading into `pgfplotstable`. I can't change the format of the original csv, and being financial data it has a column of item names and two or three explanatory data points at the top of the table. e.g.               \documentclass{article}     \usepackage{array,datatool,pgfplotstable}       \begin{filecontents}{sample.csv}         item,2008,2009,2010,2011          ,Actual,Actual,Forecast,Forecast          ,GBP,GBP,GBP,GBP          ,('000),('000),('000),('000) rounded         Area 1 OP, 1000000,1500000,1750000,250000         Area 2 OP, 400000,500000, 450000,-50000         Area 51 OP, 300000,375000,390000,15000         No P, 1250000, 1000000, 950000, 50000         Residuals, 800000, 80000, 90000, 10000       \end{filecontents}          \pgfplotstableread[col sep=comma]{sample.csv}\mystuff      I'm stumped at the next stage which is to typeset `\mystuff` so I have comma separators and can add a row that sums the 'Area' columns. At the moment to display the table I have to do something like               \begin{document}          \pgfplotstableread[col sep=comma,header=false]{sample.csv}\mystuff          \pgfplotstabletypeset[       columns/0/.style={string type},       columns/1/.style={string type},       columns/2/.style={string type},       columns/3/.style={string type},       columns/4/.style={string type}]\mystuff          \end{document}      How do I tag the top three rows as string and the rest of the last four columns as integer type so I can format and transform them?


title: Array padding not right

text: I have the following array environment:               \begin{array}{ccc}     0 & = & \text{some equation} \\     0 & = & \text{some other equation} \\       & \vdots \\     0 & = & \text{last equation}     \end{array}      However, I get lots of spacing around the equal signs here, not unlike when using the eqnarray environment. I want to use the array environment because \vdots is of smaller width than =, and gets centered under it. Any help on conforming the padding/spacing to other equations would be greatly appreciated.


title: embedded pdf inside original pdf

text: Is it possible to embed or show a pdf inside a main pdf. Suppose user click on "Address" - is there a way to popup another pdf showing the detailed address from which the user can copy.


title: lyx bibliography citation style

text: I create a `.bib` file               @article {HanKumar2011,     author = {Han, Bing and Kumar, Alok},     title = {Speculative Retail Trading and Asset Prices},     journal = {Journal of Financial and Quantitative Analysis (JFQA)},     volume = {Forthcoming},     year = {2011},     }      I then import this file into by `.lyx` file by doing `insert > list/toc > bibtex bibliography`. I select the database as the file I have created. The style I select as `plainnat`. I then go to cite the paper via `insert > citation`, add the particular id, the preview of the actual cite seems to show up fine. However the problem is that the only citation style available is `[#ID]` under formatting. I need one that allows me to do `author (yyyy)`. I can't seem to fix this. Does anyone know what's going on?