title: Align \item labels at top of mdframed box

text: By default, `enumerate`'s `\item` labels align with the top of the text: ![enter image description here](http://i.stack.imgur.com/CoofR.png) However, if the text happens to be a `mdframed` box, the labels align with the **bottom** of the box which does not look so good: ![enter image description here](http://i.stack.imgur.com/CsUd5.png) ## Question: How do I align the labels at the top for both the framed and non-framed case? * * * ## Failed Solution: I attempted to use the `adjustbox` package as per Aligning enumerate labels to top of image?:                   \begin{enumerate}[label={(\alph*)}]             \item \adjustbox{valign=t}{\TextBFramed}             \item \adjustbox{valign=t}{\TextCFramed}         \end{enumerate}      but this yields the following error: > LaTeX Error: Something's wrong--perhaps a missing \item * * * ## Almost Working (Manual) Solution: Adapting this solution from Aligning an enumeration item to the top of a tikzpicture seems to work, but how do I automate this without redefining `\item`. Also, the label is not quite aligned with the baseline of the first line in the frame (which can be tweaked by changing the `2`, but how do I determine this value in different situations).                   \begin{enumerate}[label={(\alph*)}]             \item ~\\[-2\baselineskip] \TextBFramed             \item ~\\[-2\baselineskip] \TextCFramed         \end{enumerate}      ![enter image description here](http://i.stack.imgur.com/oIOwf.png) I'd be ok with replacing `\item` with `\MyItem`, so something like:               \newcommand{\MyItem}{\item ~\\[-2\baselineskip]}%      but I would need this `\MyItem` to only apply the `~\\\\[-2\baselineskip]`, when the content is an `mdframed` box, but not otherwise. Also, how do I determine the value of the multiplier? See the **Mixed text (failed automated solution)** section below. * * * ## Notes:   * Since redefining `\item` can be dangerous in strange interaction between `mdframed` and `\item`, I am trying to avoid that by using `\MyItem`. * * * ## Code:               \documentclass{article}     \usepackage[paperheight=30cm]{geometry}% fit on "one" page     \usepackage{amsmath}     \usepackage{enumitem}     \usepackage{mdframed}     \usepackage{adjustbox}          \newcommand{\TextB}{%             Duis blandit tempus placerat.              Nulla vitae erat ante. Nulla facilisi.              Aliquam tristique interdum suscipit.              Duis posuere orci vel velit suscipit in porttitor purus eleifend.      }%     \newcommand{\TextBFramed}{%         \begin{mdframed}%             \TextB%         \end{mdframed}%     }%          \newcommand{\TextC}{%         \begin{align*}             e &= mc^2\\             F &= ma         \end{align*}     }%     \newcommand{\TextCFramed}{%         \begin{mdframed}%             \TextC%         \end{mdframed}%     }%               \begin{document}\noindent     \textbf{Plain text (works fine):}     \begin{enumerate}[label={(\alph*)}]         \item \TextB         \item \TextC     \end{enumerate}     %     \medskip\noindent     \textbf{Framed text (not so good):}     \begin{enumerate}[label={(\alph*)}]         \item \TextBFramed         \item \TextCFramed     \end{enumerate}     %     \medskip\noindent     \textbf{Using adjustbox yields error:}     %\begin{enumerate}[label={(\alph*)}]     %   \item \adjustbox{valign=t}{\TextBFramed}     %   \item \adjustbox{valign=t}{\TextCFramed}     %\end{enumerate}          \medskip\noindent     \textbf{Framed text (manual solution):}     \begin{enumerate}[label={(\alph*)}]         \item ~\\[-2\baselineskip] \TextBFramed         \item ~\\[-2\baselineskip] \TextCFramed     \end{enumerate}          \bigskip\noindent     \newcommand{\MyItem}{\item ~\\[-2\baselineskip]}%     \textbf{Mixed text (failed automated solution):}\medskip     \begin{enumerate}[label={(\alph*)}]         \MyItem \TextB         \MyItem \TextC         \MyItem \TextBFramed         \MyItem \TextCFramed     \end{enumerate}     \end{document}


title: How to install font from the font catalogue in Debian

text: As it seems many users have a problem with this in Debian and/or Ubuntu. I have not seen a good an straightforward guide in various forums. Finally I found it out, just by reading the documentation. I'll answer my own post below.


title: Clipart images for LaTeX?

text: Is there any public bank of clipart images in Tikz / PSTrics, much like those found in tools like Visio?


title: Mathscr fonts from the mathrsfs package not showing up in PDF

text: Long time lurker, first time poster: I am having trouble getting `mathscr` to work properly. In the past, I have always created PDFs by LaTeX->DVI->PDF, and when I do this, the package has always worked properly, in the sense that it renders in the DVI and also in the PDF. I recently started compiling directly to PDF from LaTeX, and this works great EXCEPT for this font.               \documentclass[12pt]{article}     \usepackage{mathrsfs}      \begin{document}          $\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$          \end{document}      An example of the output generated by my compiler (PCTeX v. 6.1) can be seen in the following two PDFs: LaTeX->PDF, LaTeX->DVI->PDF We see that the second link is what we would expect, while the first has something wrong. I assume that there is something wrong with the fonts, in that somehow the information is not being passed correctly to the PDF so that it is interpreted as Latin characters. I have tried manually reinstalling the font (rsfs10.pfb), and checked my version of Adobe. I also tried copying the Type 1 fonts from MiKTeX over to the PCTeX directory to no avail. I am not sure what to do at this point... my thesis is due tomorrow and am running out of time. I should also mention that the main reason I am so attached to the `mathscr` fonts is that I use `$\mathscr{E}$` to signify a quantity which is labeled with the same character in many figures scattered throughout my thesis.


How can I display tick marks on only one axis of a pgfplots graph? Here is some simple code to work with:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}         \begin{axis}             [                 xticklabels={,,},                 xlabel=${x}$,                 ylabel=${f_{h}\left(x\right)}$,                 width=190 pt             ]             \addplot+[mark=none, smooth, black] (\x, {2/(1+e^(-\x))-1});         \end{axis}     \end{tikzpicture}     \end{document}      How can the tick marks on, say, the x axis be removed while retaining the tick marks on the y axis?


title: How to hyperlink item when enumerating, i.e. the text in the links are not manually encoded

text: How do you hyperlink items without manually encoding the text of the hyperlink? Suppose I want to number some items               \begin{enumerate}     \item blah     \item blah blah     \item blah blah blah      and I want each number to be a hyperlink. Say Item 1, Item 2, Item 3. I tried               \begin{enumerate}[\hyperlink{Item 1}{Item 1}]      like I would normally do when not hyperlinking; it didn't work. EDIT: What I really want to do is to label some questions with Q.1, Q.2, Q.3, ... and have these hyperlinked to answers A.1, A.2, A.3, ..., respectively. Is there a way for the items to be hyperlinked automatically and still be itemized automatically? I.e. the closer I got to the is to get every item hyperlinked but every item has the same number, e.g. Q.1, Q.1, ...


title: New paragraph style for newbie

text: This question may have already been asked, but with all of my searching, I couldn’t find it. I am new to LaTeX and after a few rough starts, I am finding my way. I am using this tool to create consistency in the user manuals that I have to maintain. I am converting them from MS word, since that is what my predecessors used. My question in this, in our manuals we often make reference to the company specifications. The typeface of them really has to stand out. I want to create a macro, command or environment to encapsulate the quotations from our specification books. Currently, in our manuals, the specification is called out with the canned text of “ ** _Except from Awesome Company Specification Item 123.456 02 G/H. Creative Spec Name:_** “ This heading is bold, italicized, blue, and not indented. It is also set to use a different font from the rest of the document.               This is then followed by an expert of the specification text using a different      font then the rest of the document.  Which is also different from the spec title.      Is this possible? My thoughts are to begin a new environment in the manual body. The `{parameters}` would be the spec Item number, and the Spec Name. This would then be followed by the body of specification text.


title: Shifting a sphere in code from Texample.net

text: From Texamples - Stereographic and cylindrical map projections, I decided to use the first sphere. However, I want to setup two spheres. When I add another sphere, only the shaded circle shifts over. How can I get the longitude and latitude lines to shift as well?               % Stereographic and cylindrical map projections     % Author: Tomasz M. Trzeciak     % Source: LaTeX-Community.org      %         <http://www.latex-community.org/viewtopic.php?f=4&t=2111>     \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc,fadings,decorations.pathreplacing}     %% helper macros          \newcommand\pgfmathsinandcos[3]{%       \pgfmathsetmacro#1{sin(#3)}%       \pgfmathsetmacro#2{cos(#3)}%     }     \newcommand\LongitudePlane[3][current plane]{%       \pgfmathsinandcos\sinEl\cosEl{#2} % elevation       \pgfmathsinandcos\sint\cost{#3} % azimuth       \tikzset{#1/.estyle={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}     }     \newcommand\LatitudePlane[3][current plane]{%       \pgfmathsinandcos\sinEl\cosEl{#2} % elevation       \pgfmathsinandcos\sint\cost{#3} % latitude       \pgfmathsetmacro\yshift{\cosEl*\sint}       \tikzset{#1/.estyle={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %     }     \newcommand\DrawLongitudeCircle[2][1]{       \LongitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}        % angle of "visibility"       \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %       \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1);       \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1);     }     \newcommand\DrawLatitudeCircle[2][1]{       \LatitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}       \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}       % angle of "visibility"       \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}       \draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1);       \draw[current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:1);     }          %% document-wide tikz options and styles          \tikzset{%       >=latex, % option for nice arrows       inner sep=0pt,%       outer sep=2pt,%       mark coordinate/.style={inner sep=0pt,outer sep=0pt,minimum size=3pt,         fill=black,circle}%     }          \begin{document}          \begin{tikzpicture} % "THE GLOBE" showcase          \def\R{1.5} % sphere radius     \def\angEl{35} % elevation angle     \filldraw[ball color=white] (0,0) circle (\R);     \foreach \t in {-80,-60,...,80} { \DrawLatitudeCircle[\R]{\t} }     \foreach \t in {-5,-35,...,-175} { \DrawLongitudeCircle[\R]{\t} }          \def\R{.75} % sphere radius     \def\angEl{35} % elevation angle     \filldraw[ball color=white] (-4,0) circle (\R);     \foreach \t in {-80,-60,...,80} { \DrawLatitudeCircle[\R]{\t} }     \foreach \t in {-5,-35,...,-175} { \DrawLongitudeCircle[\R]{\t} }     \end{tikzpicture}          \end{document


title: Isometric paper and drawing on it -- with PSTricks

text: I would like to create a drawing on isometric drawing paper like the following: ![isometric-paper](http://i.stack.imgur.com/B4mBB.gif) **N.B.** Forget the drawing on top of the paper; it is just something I found in order to illustrate the type of paper I would like to have. On the blank isometric paper, I would like to draw the following simple sketch of a house: ![house](http://i.stack.imgur.com/oBMo2.jpg) **Update** Thanks to Herbert's answer, I created the following (which is the house from another angle):               \documentclass{article}          \usepackage{pstricks-add}          \begin{document}          \begin{figure}     \centering      \psset{linejoin = 2}      \SpecialCoor       \begin{pspicture*}(-0.5,-2.3)(10,8.5)         \pstVerb{gsave [0.8660254 0.5 0 1 0 -400] concat}        {\psset{linewidth = 0.3pt, linecolor = black!50}          \multido{\iA = 0+1}{25}{%            \psline(\iA,-4)(\iA,20)            \psline(!-5 \iA\space 10 sub)(!20 \iA\space 10 sub)            \rput(!0 \iA\space 15 sub){\psline(0,0)(!\iA\space abs dup add dup)}          }        }        \psset{linewidth = 2pt}         \pspolygon(8,2)(8,6)(11,9)(11,5)         \pspolygon(1,2)(1,6)(8,6)(8,2)         \pspolygon(1,6)(2.5,9.5)(9.5,9.5)(8,6)         \psline(11,9)(9.5,9.5)        \psset{linestyle = dashed}         \pspolygon(4,5)(4,9)(11,9)(11,5)         \pspolygon(1,6)(4,9)(4,5)(1,2)         \psline(4,9)(2.5,9.5)         \pstVerb{grestore}       \end{pspicture*}     \end{figure}          \end{document}      ![house](http://i.stack.imgur.com/If1UC.jpg)


title: Relationship diagram

text: So this is what I would like to have Diagram 1 ![enter image description here](http://i.stack.imgur.com/6Hkfl.jpg) Diagram 2 ![enter image description here](http://i.stack.imgur.com/nhyjV.png) Diagram 3 ![enter image description here](http://i.stack.imgur.com/hQOK6.jpg) with help of Nico i could draw it like that                 \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes.misc}     \usetikzlibrary{positioning}          \begin{document}          % First diagram     \begin{tikzpicture}[every node/.style={align=center}, implies/.style={double,double equal sign distance,-implies}]          % LEFT PART     \node[draw] (weak_existenceleft) at (-8, 0) {weak\\existence};     \node[draw] (strong_existenceleft) at (-4, 0) {strong\\existence};          \draw[implies] (strong_existenceleft) -- (weak_existenceleft);          \node[draw] (uniqueness_lawleft) at (-8, -4) {uniqueness\\in law};     \node[draw] (pathwiseuniquenessleft) at (-4, -4) {pathwise\\uniqueness};          \draw[implies] (pathwiseuniquenessleft) -- (uniqueness_lawleft);          % RIGHT PART     \node(weak_existence) at (0,0) {weak\\existence};     \node(pathwise_uniqueness) at (4,-4) {pathwise\\uniqueness};     \node (strong_existence) [draw] at (4,0) {strong\\existence};     \node (uniqueness_law) [draw] at (0,-4) {uniqueness\\in law};          \draw (node cs:name=weak_existence, anchor=north west) -- (node cs:name=weak_existence, anchor=north east) % top           -- (node cs:name=pathwise_uniqueness, anchor=north east) %goes diagonally           -- (node cs:name=pathwise_uniqueness, anchor=south east) % goes down           -- (node cs:name=pathwise_uniqueness, anchor=south west) % bottom           -- (node cs:name=weak_existence, anchor=south west) % goes diagonally           -- cycle;          \draw[implies] (1,-2.4) -- (node cs:name=uniqueness_law, anchor=north);     \draw[implies] (2.9,-1.5) -- (node cs:name=strong_existence, anchor=south);     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/a4evP.jpg) Diagram 2 :               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes.misc}     \usetikzlibrary{positioning}          \begin{document}          % First diagram     \begin{tikzpicture}[every node/.style={align=center}, implies/.style={double,double equal sign distance,-implies}]          \node(weak_existence) at (4,0) {weak\\existence};     \node(pathwise_uniqueness) at (0,-4) {pathwise\\uniqueness};     \node (strong_existence) [draw] at (0,0) {strong\\existence};     \node (uniqueness_law) [draw] at (4,-4) {uniqueness\\in law};          \draw (node cs:name=weak_existence, anchor=north east) -- (node cs:name=weak_existence, anchor=north west) % top           -- (node cs:name=pathwise_uniqueness, anchor=north west) %goes diagonally           -- (node cs:name=pathwise_uniqueness, anchor=south west) % goes down           -- (node cs:name=pathwise_uniqueness, anchor=south east) % bottom           -- (node cs:name=weak_existence, anchor=south east) % goes diagonally           -- cycle;          \draw[implies] (3.1,-2.2) -- (node cs:name=uniqueness_law, anchor=north);     \draw[implies] (1,-1.7) -- (node cs:name=strong_existence, anchor=south);     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/x7QsB.jpg) Diagram 3               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes.geometric}     \usetikzlibrary{shapes.misc}     \usetikzlibrary{positioning}          \begin{document}          % First diagram          \begin{tikzpicture}[every node/.style={align=center}, implies/.style={double,double equal sign distance,-implies}, rect/.style={draw, inner sep=1em},hexa/.style={regular polygon, regular polygon sides=6, shape aspect=0.5, minimum height=1cm, draw}]          \node[rect] (weak_existence) at (0, 0) {weak\\existence\\\\\\pathwise\\uniqueness};     \node[rect] (strong_existence) at (8, 0) {strong\\existence\\\\\\uniqueness\\in law};          \node[hexa] (best) at (4,0) {The best\\possible\\situation};          \draw[implies] (strong_existence) -- (best);     \draw[implies] (weak_existence) -- (best);     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/1S25x.jpg) I'm still not entirely satisfied with this, could someone provide way to do it awesome Your help will be greatly appreciated. notice that for the first diagram the right draw doesn't looks great could someone fix my draw that's because of the size of the words i can't control them ![enter image description here](http://i.stack.imgur.com/pG367.jpg)


title: Unary plus with numbers?

text: This is driving me nuts... I need to write out an explicit plus sign, like (q, 1, +1). But LaTeX just swallows the '+' sign...               \documentclass{article}     \usepackage{amsmath, amssymb, fourier, mathrsfs}     \usepackage{lmodern, fourier}     \usepackage{dcolumn}          \begin{document}                \begin{tabular}{>{\(}l<{\)}*{3}{|>{\(}c<{\)}}}             \multicolumn{1}{c|}{\boldmath\(q\)\unboldmath} &               \multicolumn{1}{c|}{\boldmath\(0\)\unboldmath} &               \multicolumn{1}{c|}{\boldmath\(1\)\unboldmath} &               \multicolumn{1}{c|}{\boldmath\(b\)\unboldmath} \\             \hline             q_0 & (q_0, 0, +1) & (q_0, 1, +1) & (q_1. b, -1) \\             \hline           \end{tabular}     \end{document}


title: Including \DJ character into bibliography

text: I'm writing a text and want to cite someone with a strike-through D in his family. Please see the MWE below: _LaTeX file:_               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[backend=biber]{biblatex}     \bibliography{mwe}     \begin{document}     Foo Bar\cite{foo}     \end{document}      _BiBLaTeX_ :               @Article{zbMATH00205607,         Author = {Dragomir \v{Z}. {{\DJ}okovi\'c}},         Title = {{Williamson matrices of order $4n$ for $n = 33, 35, 39$.}},         Journal = {{Discrete Math.}},         Volume = {115},         Number = {1-3},         Pages = {267--271},         Year = {1993},         Publisher = {Elsevier Science B.V. (North-Holland), Amsterdam}     }      When I try to compile the document, I'm getting the message `mwe.bbl:55: Paragraph ended before \name was complete.` The log file reads:               (./mwe.bbl     Runaway argument?     {{{hash=e95cf544cc8feefbc0a7a2390cb4acba}{{{{\DJ }}okovi\'{c}}}{{{\DJ \ETC.     ! Paragraph ended before \name was complete.     <to be read again>                         \par      l.55           I suspect you've forgotten a `}', causing me to apply this     control sequence to too much text. How can we recover?     My plan is to forget the whole thing and hope for the best.      As far as I see it the braces are balanced. When I change the name to 'Dokovic' the document compiles and it seems correct. What can I do to insert the correct name?


title: Twoside: headsepline is missing at beginning of a new chapter

text: Today I changed in my latex document for my dissertation the option to "twoside". After that I got a problem with some headseplines. Everytime when it comes to a new chapter, the first side doesnt get the headsepline for:                \ihead{\headmark}      Unfortunately I am using                scrartcl      for this. I havnt enough time to change it to scrbook or scrrprt... So I used twoside:                \documentclass[a4paper, 12pt, german, headsepline, footsepline, listtotoc, bibtotoc, twoside]{scrartcl}      with                \usepackage[headsepline,plainheadsepline]{scrpage2}      \clearscrheadfoot      \pagestyle{scrheadings}      \automark[subsection]{section}      \ohead{Title of Dissertation}      \ihead{\headmark} %is missing every new section      \ofoot{University}      \ifoot{\pagemark}      How to fix that problem?


title: Header and footer with tables. Right margin go off the page

text: I'm not completely sure if this topci is repeated, but anyway... I'm writing some company reports that have a special header and footer layout containing tables. I have been able to configure the layout using fancyhdr, but the tables go out of the page. Below I provide images of the desired layout and the obtained, and also the code I'm using. Desired layout - Header ![Desired layout - Header](http://i.stack.imgur.com/0dFAJ.png) Desired layout - Footer ![Desired layout - Footer](http://i.stack.imgur.com/Tle2C.png) Result - Header ![Result - Header](http://i.stack.imgur.com/1X8lD.png) Result - Footer ![Result - Footer](http://i.stack.imgur.com/6fhya.png) As you can see, the text above the footer overlaps with the line of the table. Finally, the code:               \documentclass[letterpaper,10pt,openany]{report}     \usepackage[utf8]{inputenc}     \usepackage{fancyhdr}      \usepackage{array}      \usepackage[spanish]{babel}      \usepackage{graphicx}      \usepackage{float}      \usepackage{helvet}     \renewcommand{\familydefault}{\sfdefault}     \usepackage[paperwidth=21cm, paperheight=28.8cm, top=3.55cm, left=2.03cm, bottom=7.28cm, right=1.27cm]{geometry}     % Title Page     \title{}     \author{}       \setlength{\headheight}{127.69005pt}       \setlength{\parindent}{0pt}       \setlength{\parskip}{\baselineskip}          \setlength{\footskip}{0pt}     \pagestyle{fancy}          \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     \fancyhead[CE,CO,LE,LO,RE,RO]{} %% clear out all headers     \fancyhead[C]{%               \begin{tabular}{|m{3.6375cm}|m{5.3475cm}|m{7.0275cm}|m{1.6875cm}|}               \hline                \multicolumn{4}{|m{17.66cm}|}{\centering \vspace{1.5\baselineskip}\includegraphics[width=3cm]{LOGO.png}} \\[1.23cm] \hline               Cliente:  & REF.  & \centering Lugar: Por definir & Hoja: \\[0.77cm] \hline                \multicolumn{3}{|m{16.10cm}|}{\centering \vspace{1.5\baselineskip} Titulo} & \multicolumn{1}{m{1.6cm}|}{Total:} \\[0.82cm] \hline               \end{tabular}%     }     \fancyfoot[CE,CO,LE,LO,RE,RO]{} %% clear out all footers     \fancyfoot[C]{%               \begin{tabular}{|m{5.67cm}|m{5.75cm}|m{5.1cm}|m{1.52cm}|}               \hline           & Preparado por: & Fecha:  & Ver. \\[0.96cm] \hline                \end{tabular}%     }          \begin{document}      What am I exactly doing wrong? Thanks in advance! Charlie


title: How do I preserve hyperreferences in the index when converting text from LaTex to HTML

text: I have written a book with three indexes in LaTex. I can produce a perfect hyperreferenced pdf file using the `dvipdf filename` command, but I cannot convert Latex into HTML using `htlatex` or `TEX4ht` without losing hyperlinks in the indexes. The program objects to index entries such as               \item Balzac, Honor\'{e},              \hyperindexformat{\see{de Balzac, Honor\'{e}}}{53}.      Can anyone help?


title: How can I get consistent vertical spacing between \multicols{3} and \multicols{1}?

text: As you can see in the image, the vertical spacing is inconsistent. ![enter image description here](http://i.stack.imgur.com/kATai.png) I would like to avoid hacking my way into simulating the spacing that multicol uses. If I use \multicols{1}, I get the warning: > Package multicol Warning: Using `1' columns doesn't seem a good idea. I > therefore use two columns instead on input line 20. What is a good way to get symmetric vertical spacing in this example?               \documentclass{article}     \usepackage{multicol,times}          \begin{document}          \hrule     \begin{multicols}{3}         \centering {\bfseries Title 1} \\         \centering Description 1 \\     \columnbreak         \centering {\bfseries Title 2} \\         \centering Description 2 \\     \columnbreak         \centering {\bfseries Title 3} \\         \centering Description 3     \end{multicols}     \hrule     % \begin{multicols}{1}         \centering {\bfseries Title 4} \\         \centering Description 4     % \end{multicols}     \hrule     \begin{multicols}{2}         \centering {\bfseries Title 5} \\         \centering Description 5 \\     \columnbreak         \centering {\bfseries Title 6} \\         \centering Description 5     \end{multicols}     \hrule          \end{document}


title: enumitem line separation within a single item

text: I have this happening when the item wraps: ![enter image description here](http://i.stack.imgur.com/DSw7o.png) The code I have so far is:               \setlist{leftmargin=!, align=left, font=\large\textsf,     itemsep=20pt, labelwidth=10pt, itemindent=-28pt}      How can I adjust the spacing between the two wrapped lines?


title: Plotting greatest integer function (floor)

text: How can one plot y=1/floor(1/x) in pstricks? where floor is the greatest integer function. i.e. floor(2.5)=2 and floor(-0.5)=-1. I need to generate something like what I generated in sage: ![enter image description here](http://i.stack.imgur.com/Cj1TZ.png) But I do not want vertical lines; I also need to put some disk and fdisk for the points.


title: Sample example of box in latex

text: Could someone make this picture in sample code in LaTeX and please make it in different style with different colors. ![enter image description here](http://i.stack.imgur.com/tDZUB.jpg) Here is my attempt:               \fbox{       \parbox{\linewidth}{          This example will show you how we can ..          $dX_{t}=b(t,X_{t})+\sigma (t,X_{t}) dW_{t}$          \begin{center}            \begin{tabular}{ l | c || r } \hline              W & S  \\ \hline              + & -  \\ \hline            \end{tabular}          \end{center}        }     }


title: Horizontal margin over each section?

text: How can I draw a horizontal margin over each section? This is what I want to achieve (horizontal line respecting margins) ![enter image description here](http://i.stack.imgur.com/G8XCW.png) Cheers


title: Using the \tab Command

text: I have seen several cases of people using the `\tab` command to insert a specific amount of space between objects (as opposed to the `\hfill` command which uses any remaining space). However, I have never been able to get `\tab` to work. Are there any specific packages or environments that are supposed to accompany `\tab`?


title: Order items in enumerate environment automatically

text: I have a list of almost 300 items in an enumerate environment               \documentclass{article}     \begin{document}     \begin{enumerate}     \item This is the second item.     \item This is the third item.     \item This is the first item.     \end{enumerate}     \end{document}      that I want to list in a different order (the third item should be first, the first item should be second, and the second item should be third.) I want the output to look like this: ![enter image description here](http://i.stack.imgur.com/qZRuc.png) Is there a way I can pass the argument [3, 1, 2] to some function and have the list typeset in the order automatically instead of doing so manually ? Thank you. **EDIT:** I see that we use `xpatch` to use the old item. However, in my document I have redefined item as follows:               \newcounter{myenumi}     \renewcommand{\themyenumi}{\textbf{Example \thesection.\arabic{myenumi}.}}     \newenvironment{exenumerate}{%     % stuff for beginning of environment goes here     \setlength{\parindent}{0pt}% don't indent paragraphs     \setcounter{myenumi}{0}% restart numbering     \bigskip% skip a line     \renewcommand{\item}{% new definition of item     \par %start a new line     \medskip     \refstepcounter{myenumi}% advance counter     \noindent \makebox[8em][l]{\themyenumi}% print counter to width of 3em, aligned to left      }% end of definition of item      }{% at end of environment      \par% start new paragraph      \bigskip% skip a line      \noindent% don't indent new paragraph      \ignorespacesafterend% ignore spaces after environment      }      Will Werner's solution still work?


title: How to embed image in the whitespace between words

text: I would like to have an image 'embedded' in a page within my document, but done so with the whitespace between words. Ultimately I would like to have a moving image if you flick through the pages. I am surprised by the absolute nothing that I have come up with!! A solution involving a monochrome image would be ideal. Just a little something for my avid fans 8)


title: How to make Directory List in LaTeX?

text: I am writing an article using LaTeX. It is a research report about developing mathematics ebook using LaTeX. It contains directory list consists of folders and files, like this:                   - [folder_icon][folder_name]           + [file_icon][file_name.extension]           - [folder_icon][folder_name]             [file_icon][file_name.extension]      For example:                   - [icon][MatheBook]           + [icon][math_ebook.tex]           - [icon][Pictures]             [icon][math.png]      How to do that? I am using MikTeX and TeXnicCenter.


title: underline in a part of a section title in amsart

text: I want to use math symbols including underline (e.g. `$\underline{R}_{H,V}$`) in a section title in a document in `amsart` documentclass with table of contents. So I typed (roughly)               \documentclass{amsart}     \begin{document}     \tableofcontents          \section{The functor ${\underline{R}}_{H,V}$}          \end{document}      If I compile this file, I get the section title as wanted, but without the underline in the table of contents. If I compile once more, I get the following error message:               Missing } inserted                 }     ...elax }_{H,V}$       I checked this site and found advices suggesting to use `sectsty` or `titlesec` packages. But they seem to be useful only when you want to underline the whole section title in article documentclass. Can anybody help?


title: Expanding subscript and subscript capabilities

text: Well, I liked the idea expressed in the question alternative syntax of subscripts using tex. But I want it to work in a sightly different way. I just want to expand the usual `_` and `^`. How? So that the code escapes from the sup/subscript if there is a space (see exceptions at the bottom):   1. `a_11 + b_123ijk + c_k\ell` should be the same as `a_{11} + b_{123ijk} + c_{k\ell}`.   2. And the same for superscripts: `m^qwpoeriu` equal to `m^{qwpoeriu}`. At this moment, I have this code in my preamble (it helps if you want to write `F_\mathrm{max}` you can do it like `F_|max|`), so the solution should't break it               \makeatletter     \begingroup\catcode`\_=\active\protected\gdef_{\@ifnextchar|\subtextup\sb}\endgroup     \def\subtextup|#1|{\sb{\mathrm{#1}}}      \AtBeginDocument{\catcode`\_=12 \mathcode`\_=32768}     \makeatother      ### Why? I usually space my code `\biggl( a_b \cdot \cos(x - c) = 1 \times \vec v` rather than `\biggl(a_b\cdot\cos(x-c)=1\times\vec v`, because I find it much more easier to read. So this would easily work well for me since in so many times I wouldn't need to write `{}`. Of course, there are moments where I still need to do it, i.e., `\alpha_k\ell + \alpha_{\ell k} = 1`. **EDIT:** More things. I'm not particularly interested in `a_b_c_d + e` to be like `a_{b_{c_d}} + e` (and the same with `^`), but I think it would be great if that also worked (which means that the space should escape all the sub/superscripts). More things, NOT only the space should escape the sub/superscript, also this:   * the alternative sup/subscript, i.e.: `a_b^c + 1 = 0` should work as `a_{b}^{c} + 1 = 0`, and `a^blk_ijk` as `a^{blk}_{ijk}`,   * the ending of math `$a_bcde$` should be like `$a_{bcde}$`,   * and also a closing brace: `\frac{1}{a_ijk}` equal to `\frac{1}{a_{ijk}}`.


title: Not possible to rotate the pdf pages in the Texstudio pdf viewer?

text: Is there a way to rotate pdf pages in the Texstudio pdf viewer? I don't find any command for that.


title: How to list "inproceedings" items with "volume X of ..." in biblatex

text: I'm using biblatex with the authoryear style, which results for @inproceedings items in > ... "Title". In: _Booktitle_. Vol. 123. Title of Series. How can this be changed to: > ... "Title". In: _Booktitle_ , volume 123 of _Title of Series_.


title: How to get the hypperref label for the footnotemark of a figure caption sending you to the right place in the list of figures?

text: I have some little issue about the `hypperref` package. I used some footnotes to cite the source of my figures. To do that, I just used :               \begin{figure}[ht!]     \begin{minipage}{\textwidth}     \centering     Blabla     \caption{Blobloblo.  D'où vient cette figure?\protect\footnotemark}     \end{figure}     \footnotetext{Elle vient de là , elle vient du blues.}      This solution works well with the `hyperref` package, when you click on the footnote mark, you're redirected to the footnote. The main problem is in the list of figures. When I click on the footnote mark, I'm going back to the main page, as if the list of figures couldn't make the link between the footnote mark in the list of figures and the command `\footnotemark`. Is the a way to fix this ?


title: How to align equation items below their =

text: How is it possible to sort equations align with their = like this:               a*b*c = d*e*f       g*h = i*j         k = l*m*n     o*p*q = r      I've seen it before but I don't know how to find that!


title: Table does not fit TexMaker

text: My table has 25 columns I think and how can I make each column smaller and make the table fit on one page ?               \documentclass[9pt]{article}     \usepackage{booktabs}% http://ctan.org/pkg/booktabs     \usepackage{tabularx}% http://ctan.org/pkg/tabularx          \begin{document}          % Table generated by Excel2LaTeX from sheet 'Sheet1'     \begin{table}[htbp]       \centering       \caption{Add caption}         \begin{tabular}{l|lllllllllllllllllllllllll p{10cm}}              Shifts/Time & 8     & 9     & 10    & 11    & 12    & 13    & 14    & 15    & 16    & 17    & 18    & 19    & 20    & 21    & 22    & 23    & 24    & 1     & 2     & 3     & 4     & 5     & 6     & 7 \\          \hline \hline              A1    & 1     & 1     & 1     & 1     & 0     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0 \\         A2    & 0     & 1     & 1     & 0     & 1     & 1     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0 \\         B1    & 0     & 0     & 1     & 1     & 1     & 1     & 0     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0 \\         B2    & 0     & 0     & 0     & 1     & 1     & 0     & 1     & 1     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0 \\         C1    & 0     & 0     & 0     & 0     & 1     & 1     & 1     & 1     & 0     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0 \\         C2    & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 0     & 1     & 1     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0 \\         D1    & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 1     & 1     & 0     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0 \\         D2    & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 0     & 1     & 1     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0 \\         E1    & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 1     & 1     & 0     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0 \\         E2    & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 0     & 1     & 1     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0 \\         F1    & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 1     & 1     & 0     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0     & 0 \\         F2    & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 0     & 1     & 1     & 1     & 1     & 1     & 0     & 0     & 0     & 0     & 0 \\         G1    & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 1     & 1     & 0     & 1     & 1     & 1     & 0     & 0     & 0     & 0 \\         G2    & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 0     & 1     & 1     & 1     & 1     & 1     & 0     & 0     & 0 \\         H1    & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 1     & 1     & 0     & 1     & 1     & 1     & 0     & 0 \\         H2    & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 0     & 1     & 1     & 1     & 1     & 1     & 0 \\         I1    & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 1     & 1     & 0     & 1     & 1     & 1 \\         I2    & 1     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 0     & 1     & 1     & 0     & 1     & 1     & 1     & 1 \\              \end{tabular}%       \label{tab:addlabel}%     \end{table}%               \end{document}


title: Multiline in a table cell

text: I have a problem with my table. I should put a big text in a cell. it should be multi line. How can I do that:               \begin{table}[H]     \centering % used for centering table     \begin{tabular}{c c c c c}      \hline      \\     Case & Entscheidungsbäume & Neuronale Netze & kNN & SVM \\      \hline\hline % inserts single horizontal line     \\     Accuracy in general & ** & *** & ** & **** \\ %      Speed of learning with      respect to number of      attributes and the number of      instances  & *** &* & **** & * \\     3 & 31 & 25 & 415 \\     4 & 35 & 144 & 2356 \\     5 & 45 & 300 & 556 \\ [1ex] %      \end{tabular}     \caption{Nonlinear Model Results} % title of Table     \label{table:nonlin} % is used to refer this table in the text          \end{table}      thanks


title: Why does \makesavenoteenv not work with align?

text: Putting               \usepackage{footnote}     \makesavenoteenv{align}      into the preamble results in the following error:                \end{align*}          Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.      In contrast using `\makesavenoteenv` with other environments e.g. `eqnarray` works. Using               \savenotes     \begin{align}     ...     \end{align}     \spewnotes      works as expected.


title: fontspec error using xepersian package!

text: when i want to use the `xepersian`package, in pdfLatex, i have the error:                Fatal fontspec error: "cannot-use-pdftex"     !      ! The fontspec package requires either XeTeX or LuaTeX to function.     !      ! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"     ! instead of plain "latex" or "pdflatex".     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.      please help meeee


title: Compilation issue regarding ragged2e.sty

text: I'm trying to compile a tex file for my thesis and I keep getting a persistent error:               [LaTeX] finished with exit code 1     /usr/share/texmf/tex/latex/ms/ragged2e.sty:144:Undefined control sequence \if@raggedtwoe@footmisc      The exact text from the log file is:                (/usr/share/texmf/tex/latex/ms/ragged2e.sty     Package: ragged2e 2009/05/21 v2.1 ragged2e Package (MS)          (/usr/share/texmf/tex/latex/ms/everysel.sty     Package: everysel 2011/10/28 v1.2 EverySelectfont Package (MS)          ABD: EverySelectfont initializing macros     LaTeX Info: Redefining \selectfont on input line 126.     )     ! Undefined control sequence.     <argument> \@EverySelectfont@Init           l.144 \if@raggedtwoe@footmisc          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.      This seems to be the only error I get when I try to compile my document. Upon crashing out of the building sequence I get diverted to the offending line in the offending file (as per usual with tex) and I can see that the file `ragged2e.sty` does indeed contain a logical control command:               \if@raggedtwoe@footmisc       \RequirePackage{footmisc}[2002/08/28]     \fi      I have made sure that the footmisc package is installed on my machine (it is) and that my main file contains the command `\usepackage{footmisc}` (it does). My understanding is that `\RequirePackage` is essentially the same as `\usepackage` when used after `\documentclass` (which is the case here). I suspect that I am simply not using the correct version of footmisc, since I recently did a complete update of all texlive components using `YaST`. According to `YaST` the version of this package I have installed is:               2012.67.5.5bsvn23330-5.5.2      If this is the cause, then should I log in as root and simply edit out the version of the package asked for (the `[2002/08/28]` bit)? I don't get feelings of good juju about having to edit LaTeX source code! :-S After re-installing all my tex-live distribution I re-compiled my thesis and the same error comes out. The full output of the log file for the run this morning is listed below:               *****     *****     LaTeX output:      *****     cd "/home/dave/Documents/latex/thesis"     *****     latex -interaction=nonstopmode main.tex     *****     This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/TeX Live for SUSE Linux)      restricted \write18 enabled.     entering extended mode     (./main.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h     ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma     rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,      kurmanji, lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nyn     orsk, polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbia     nc, slovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorb     ian, welsh, loaded.     (./settings.tex (/usr/share/texmf/tex/latex/koma-script/scrbook.cls     Document Class: scrbook 2012/03/08 v3.10a KOMA-Script document class (book)     (/usr/share/texmf/tex/latex/koma-script/scrkbase.sty     (/usr/share/texmf/tex/latex/koma-script/scrbase.sty     (/usr/share/texmf/tex/latex/graphics/keyval.sty)     (/usr/share/texmf/tex/latex/koma-script/scrlfile.sty     Package scrlfile, 2011/03/09 v3.09 KOMA-Script package (loading files)                       Copyright (C) Markus Kohm          ))) (/usr/share/texmf/tex/latex/koma-script/tocbasic.sty)     (/usr/share/texmf/tex/latex/koma-script/scrsize11pt.clo)     (/usr/share/texmf/tex/latex/koma-script/typearea.sty     Package typearea, 2012/03/08 v3.10a KOMA-Script package (type area)                       Copyright (C) Frank Neukam, 1992-1994                       Copyright (C) Markus Kohm, 1994-          )) (./warwickthesis.sty     *************************************************************     ** Warwick Thesis Style File Sept 1996      *************************************************************     ) (/usr/share/texmf/tex/latex/setspace/setspace.sty)     (/usr/share/texmf/tex/latex/graphics/graphicx.sty     (/usr/share/texmf/tex/latex/graphics/graphics.sty     (/usr/share/texmf/tex/latex/graphics/trig.sty)     (/usr/share/texmf/tex/latex/latexconfig/graphics.cfg)     (/usr/share/texmf/tex/latex/graphics/dvips.def)))     (/usr/share/texmf/tex/latex/natbib/natbib.sty)     (/usr/share/texmf/tex/latex/base/fontenc.sty     (/usr/share/texmf/tex/latex/base/t1enc.def))     (/usr/share/texmf/tex/latex/tools/longtable.sty)     (/usr/share/texmf/tex/latex/amsmath/amsmath.sty     For additional information on amsmath, use the `?' option.     (/usr/share/texmf/tex/latex/amsmath/amstext.sty     (/usr/share/texmf/tex/latex/amsmath/amsgen.sty))     (/usr/share/texmf/tex/latex/amsmath/amsbsy.sty)     (/usr/share/texmf/tex/latex/amsmath/amsopn.sty))     (/usr/share/texmf/tex/latex/amsfonts/amssymb.sty     (/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty))     (/usr/share/texmf/tex/latex/base/textcomp.sty     (/usr/share/texmf/tex/latex/base/ts1enc.def))     (/usr/share/texmf/tex/latex/graphics/color.sty     (/usr/share/texmf/tex/latex/latexconfig/color.cfg)     (/usr/share/texmf/tex/latex/graphics/dvipsnam.def))     (/usr/share/texmf/tex/latex/subfig/subfig.sty     (/usr/share/texmf/tex/latex/caption/caption.sty     (/usr/share/texmf/tex/latex/caption/caption3.sty)     (/usr/share/texmf/tex/latex/caption/ltcaption.sty)))     (/usr/share/texmf/tex/generic/ulem/ulem.sty)     (/usr/share/texmf/tex/latex/paralist/paralist.sty)     (/usr/share/texmf/tex/latex/mdwtools/mdwlist.sty)     (/usr/share/texmf/tex/latex/footmisc/footmisc.sty)     (/usr/share/texmf/tex/latex/marginnote/marginnote.sty)     (/usr/share/texmf/tex/latex/hyperref/hyperref.sty     (/usr/share/texmf/tex/generic/oberdiek/hobsub-hyperref.sty     (/usr/share/texmf/tex/generic/oberdiek/hobsub-generic.sty))     (/usr/share/texmf/tex/generic/ifxetex/ifxetex.sty)     (/usr/share/texmf/tex/latex/oberdiek/kvoptions.sty)     (/usr/share/texmf/tex/latex/hyperref/pd1enc.def)     (/usr/share/texmf/tex/latex/latexconfig/hyperref.cfg)     (/usr/share/texmf/tex/latex/url/url.sty))          Package hyperref Message: Driver (default): hdvips.          (/usr/share/texmf/tex/latex/hyperref/hdvips.def     (/usr/share/texmf/tex/latex/hyperref/pdfmark.def     (/usr/share/texmf/tex/latex/oberdiek/rerunfilecheck.sty)))     (/usr/share/texmf/tex/latex/breakurl/breakurl.sty     (/usr/share/texmf/tex/latex/xkeyval/xkeyval.sty     (/usr/share/texmf/tex/generic/xkeyval/xkeyval.tex)))     (/usr/share/texmf/tex/latex/units/units.sty     (/usr/share/texmf/tex/latex/base/ifthen.sty)     (/usr/share/texmf/tex/latex/units/nicefrac.sty))     (/usr/share/texmf/tex/latex/tools/array.sty)     (/usr/share/texmf/tex/latex/booktabs/booktabs.sty)     (/usr/share/texmf/tex/latex/mhchem/mhchem.sty     (/usr/share/texmf/tex/latex/tools/calc.sty)     (/usr/share/texmf/tex/latex/oberdiek/twoopt.sty))     (/usr/share/texmf/tex/latex/sidecap/sidecap.sty)     (/usr/share/texmf/tex/latex/geometry/geometry.sty)) (./main.aux)     (/usr/share/texmf/tex/latex/base/ts1cmr.fd)     (/usr/share/texmf/tex/latex/hyperref/nameref.sty     (/usr/share/texmf/tex/generic/oberdiek/gettitlestring.sty)) (./main.out)     (./main.out) (/usr/share/texmf/tex/latex/ms/ragged2e.sty     (/usr/share/texmf/tex/latex/ms/everysel.sty     ABD: EverySelectfont initializing macros)     ! Undefined control sequence.     <argument> \@EverySelectfont@Init           l.144 \if@raggedtwoe@footmisc          )     *geometry* driver: auto-detecting     *geometry* detected driver: dvips     <./pics/crest_fullcolour.eps> (/usr/share/texmf/tex/latex/amsfonts/umsa.fd)     (/usr/share/texmf/tex/latex/amsfonts/umsb.fd)     <./pics/the_warwick_uni_blue.eps> [1] [2] (./main.toc     (/usr/share/texmf/tex/latex/base/t1cmss.fd)) [1] [2] (./parts/declaration.tex     [3]     Overfull \hbox (3.03625pt too wide) in paragraph at lines 54--55     []\T1/cmr/m/it/10.95 Ignition cal-cu-la-tions us-ing a re-duced coupled-mode el     ectron-ion en-ergy ex-change model\T1/cmr/m/n/10.95 ,           Overfull \vbox (5.29999pt too high) has occurred while \output is active     [4])     Overfull \vbox (1.39674pt too high) has occurred while \output is active     [5] [6] (./parts/shouts.tex     Underfull \vbox (badness 3199) has occurred while \output is active [7])     Overfull \vbox (1.39674pt too high) has occurred while \output is active     [8] (./parts/abstract.tex) [9] [10] (./parts/symbols.tex [11])     Overfull \vbox (1.39674pt too high) has occurred while \output is active     [12] (./parts/introduction.tex     Chapter 1.     <./pics/phase_space.eps> [1]     Overfull \vbox (1.39674pt too high) has occurred while \output is active     [2]) (./parts/appendix.tex) (./main.bbl [3]          Package natbib Warning: Empty `thebibliography' environment on input line 6.          )          Package caption Warning: Unused \captionsetup[subfigure] on input line 52.     See the caption package documentation for explanation.          [4] (./main.aux) )     (see the transcript file for additional information)     Output written on main.dvi (18 pages, 43140 bytes).     Transcript written on main.log.


title: How often do I have to synchronize MikTeX?

text: This is a follow-up question of media9.sty not found. Basically, I had to synchronize MikTeX in order to get the package. So, how often do I have to synchronize MikTeX in order for it not to miss any package?


title: Undefined control sequence: \undefinedpagestyle at \end{macrocode}

text: The full source can be found here (static link), but here is the relevant bit:               ...     %    \begin{macrocode}     %<*package>     %    \end{macrocode}     % \begin{macro}{\BCSet}     % And stuff     %    \begin{macrocode}     \NewDocumentCommand{\BCSet}{m}      {       \keys_set:n { #1 }      }     %    \end{macrocode} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ERROR HERE %%%%%%%%%%     % \end{macro}     %\begin{macro}{\examplemacro}     %\changes{v1.0}{2009/10/06}{Some change from the previous version}     %    \begin{macrocode}     \newcommand*\examplemacro[2][]{%       Some code here, probably     }     %    \end{macrocode}     %\end{macro}      %    \begin{macrocode}               \ExplSyntaxOn     ...      As for a MWE, I'm not sure that DTX files can get much more minimal than the one I have right now; I've only added a short expository section and a macro def. I've tried to follow the example exactly since I'm still new to the `dtx` format. I don't know why it's giving me the following error: > >     ERROR: Undefined control sequence. >   >     --- TeX said --- >     <argument> \undefinedpagestyle >   >     l.153 %    \end{macrocode} >   >     --- HELP --- >     TeX encountered an unknown command name. You probably misspelled the >     name. If this message occurs when a LaTeX command is being processed, >     the command is probably in the wrong place---for example, the error >     can be produced by an \item command that's not inside a list-making >     environment. The error can also be caused by a missing \documentclass >     command. >   I believe it's a problem somehow with `fancyhdr`, since that is where I recognize the command from, but I can't be certain. Again, the full source at the time of writing can be found on GitHub.


title: How do I sort two glossaries (list of acronyms and list of symbols) differently?

text: I use the `glossaries` package to create a list of acronyms as well as a list of symbols.               \usepackage[acronym,style=long]{glossaries}      For the list of symbols the standard-glossary is used. Now I want to sort the list of acronyms alphabetically (`sort=standard`), but the list of symbols in order of appearance (`sort=def`). How do I do that? I use MikTeX 2.9 with TeXnicCenter 2 (beta) on Windows 7. My project includes the `hyperref` package.


title: babel with greek makes MikTeX run forever

text: The command               \usepackage[english,greek]{babel}      makes MikTeX 2.9 run forever. OS Windows 7 The output is               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9)     entering extended mode     (C:/Users/x/AppData/Local/Temp/lyx_tmpdir.Hp3100/lyx_tmpbuf2/negreponti-1.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, greek, gujarati, hindi, hungarian, icelandic, indonesian, inter     lingua, irish, italian, kannada, kurmanji, latin, latvian, lithuanian, malayala     m, marathi, mongolian, mongolianlmc, monogreek, ngerman, nynorsk, oriya, panjab     i, pinyin, polish, portuguese, romanian, russian, sanskrit, serbian, slovak, sl     ovenian, spanish, swedish, swissgerman, tamil, telugu, turkish, turkmen, ukengl     ish, ukrainian, uppersorbian, usenglishmax, welsh, loaded.      **Edited:** from OP's comment, small code:               \makeatletter \makeatother      \documentclass[11pt,oneside]{amsart}      \usepackage[iso-8859-7]{inputenc}      \usepackage[a4paper]{geometry}      \usepackage{amsthm}     \usepackage{amstext}      \usepackage{amssymb}     \makeatletter      \usepackage[english,greek]{babel}           %\usepackage[default]{gfsneohellenic}      %\usepackage[LGR,T1]{fontenc} %% LGR encoding is needed for gfsneohellenic      \makeatother      \begin{document} klkk \greektext γφγγ      \end{document}


title: Alternative \citetitle command without italics

text: How can I define a new command `\citetitleIdem` which behaves like `\citetitle` but not using italics? I am using biblatex with natbib. I do not want to change the behaviour of `\citetitle`, therefore this suggestion doesn't apply.


title: How to change language of Scientific WorkPlace?

text: I'm a student in faculty of mathematics and they require us to work with SWP. My problems are:   * the exported PDFs shows some default words in English and I want the whole document to be in French. I did try "babel" but it gives me some unwanted results! for example instead of "1ere partie" [1st part] I want it to show "chapitre 1" [Chapter 1].   * When I add new clause an auto-increment number shows beside for example, theorem , theorem 1, theorem 2, etc... even if I'm in the same chapter; So I want to get ride of those AI numbers or at least make them restart from 0 each new chapter. Please! Help me to solve those problems.


title: Problem with biblatex-chem bundle when used with option pageranges=false

text: I'm using Joseph Wright's excellent `biblatex-chem` bundle for `biblatex` emulating the styles of certain chemistry journals. In particular I'm using               \usepackage[style=chem-angew,pageranges=false]{biblatex}      with `biblatex` version 1.5a. The problem is that this produces output where the page number of an article is preceded by "p.", i.e. J. P. Perdew, K. Burke, M. Ernzerhof, _Phys. Rev. Lett._ **1996** , _77_ , p. 3865. But this behaviour does not match the journal's ( _Angewandte Chemie_ ) standards as pages of articles should not include a prefix like "p." (and also my professor wants me to get rid of it). While I searched in the appropriate style file of `biblatex-chem` (`chem-angew.bbx`) to see which command is connected to the package option `pageranges=false` I found out that it is `\mkpagefirst`. The related line in `chem-angew.bbx` is               \DeclareFieldFormat[article]{pages}{%     \ifbool{bbx:pageranges}{#1}{\mkpagefirst{#1}}%     }      Next I tried to look up the original definition of this command in `biblatex.sty` in order to use it as a template for a redefinition via `renewcommand` that suits my needs. But as `\mkpagefirst` is defined via a cascade of commands I can't figure out how to do it. So any help would be very much appreciated.      (I'm not sure whether this can be regarded as a bug in the `biblatex-chem` bundle which I should report to Joseph Wright since he might have intended it to work that way.)


title: Custom (or any) environment inside tabular adds unwanted vspace

text: I wanted to define my own version of a verbatim-like environment, that has some less line spacing and uses `alltt` instead of `verbatim`, so what I can use `\\(\cdots\\)` inside. What I tried was:               \newenvironment{codify}{\begin{spacing}{0.8}\begin{alltt}}{\end{alltt}\end{spacing}\noindent}      But as long as it works between paragraphs: ![image1](http://i.stack.imgur.com/p6Yys.png) it causes some mess inside my (long)table. I wanted to use it inside a table cell, but it produces too much vertical space above it and below it: ![enter image description here](http://i.stack.imgur.com/uXHz5.png) And I actually tried everything I could find to get rid of that, but not breaking the out-of-a-table behavior. It seems like every usage of an environment inside a cell produces such results? How can I make it behave like text, not adding empty lines above and below? Edit: This is the minimal test case that reproduces the problem:               % -*- coding: utf-8 -*-     \documentclass{report}     \usepackage[utf8]{inputenc}     \usepackage{setspace}     \usepackage{caption}     \usepackage{array}     \usepackage{longtable}     \usepackage{alltt}     \usepackage{multirow}     %\usepackage{polski}          \newenvironment{codify}{\noindent\begin{spacing}{0.8}\begin{alltt}}{\end{alltt}\end{spacing}\noindent\ignorespacesafterend}%          \begin{document}          This is a structure definition:     \begin{codify} node \{         id: integer,         name: string,         children: [ node, \(\cdots\) ]     \} \end{codify}      with some text directly after the structure, because it's a continuation of the last sentence.          \small     \begin{longtable}{|m{0.16\textwidth}|m{0.45\textwidth}|m{0.32\textwidth}|}      \caption[Some more stuff]{More stuff} \label{tab_conn_fb} \\      \hline      \textbf{Field} & \textbf{Descr} & \textbf{Structure} \\ \hline      \endfirsthead     \multicolumn{3}{c}{{ \tablename\ \thetable{} -- continuation}} \\       \hline      \textbf{Field} & \textbf{Descr} & \textbf{Structure} \\ \hline      \endhead     \hline \multicolumn{3}{r}{{continued on the next page}} \\      \endfoot     \hline \hline     \endlastfoot            \hline     \texttt{accounts} & The Facebook apps and pages owned by the current user. This description will take less space than the structure.      & \begin{codify}Object \{       data: [       Object \{        id: string,        category: string,        name: string        \}, \(\cdots\) ]     \} \end{codify} \\     \hline     \texttt{activities} & The activities listed on the user's profile, e.g. \textit{Towel Day} czy \textit{Janusz A. Zajdel Award} & \begin{codify}Object \{      data: [        Object \{        id: string,        category: string,        create_time: time\-stamp       \}, \(\cdots\) ]     \} \end{codify} \\     \hline     \texttt{albums} & And this description is higher than the structure. And this description is higher than the structure. And this description is higher than the structure. And this description is higher than the structure. \textbf{And touches the box} & \begin{codify}Object \{      data: [ Album, \(\cdots\) ]     \} \end{codify} \\     \hline     \end{longtable}      \normalsize          \end{document}


title: How can I break a long equation?

text: Upon compiling, one of my equations extends out of my column width in my final output. Options I tried--   1. `breqn` package asks for `expl3.sty` file which the compiler is unable to locate, (would have been the easiest way in the `{dmath}` environment   2. `//` in the equation,    3. `{split}`, `{multiline}` environment of `amsmath` but none of the 3 approaches seem to work.  Any tip from your Texperience(!)? PS: I use latest version of TexnicCenter (+MikTeX 2.9) and the equation is in the `{equation}` environment right now.


title: newenvironment, label, indentation

text: I have a custom environment that I reference. It seems that the indentation changes if I do not include a space before `\label` (see MWE below). So, I have a few questions:   1. Should it matter where `\label` is placed on a custom environment; could the environment be changed so that I don't have to put a space before `\label`?   2. Is there a convention on where `\label` should be placed (on non-floating environments), or is this a matter of style?   3. Is there a preferred way of getting a line break rather than using `\newline`? Please note that I do not want to use `ntheorem` as the actual version I use takes 2 optional arguments (using `newenvironmentx` from `xargs`). **EDIT** : I am particularly interested in trying to answer my first question- could the definition of the environment be changed so that I don't have to put a space before `\label`, or a `%` after it? The `ntheorem` package seems to accomplish it using `trivlist`.               \documentclass{article}     \usepackage{lipsum}          \setlength{\parindent}{0mm}          \newcounter{problem}     \newenvironment{problem}%     {%         \refstepcounter{problem}%         \textbf{Problem \theproblem }\newline%     }{}          \begin{document}          \begin{problem}\label{firstlabel}     \lipsum[1]      \end{problem}          \begin{problem} \label{secondlabel}     \lipsum[1]      \end{problem}     \end{document}


title: Why does scrheadings + tgschola triggers a font shape warning?

text: This code:               \documentclass{scrartcl}          \usepackage{tgschola}     \usepackage[T1]{fontenc}          \usepackage{scrpage2}     \pagestyle{scrheadings}          \begin{document}     a     \end{document}      gives this warning               LaTeX Font Warning: Font shape `T1/qcs/m/sl' in size <10.95> not available     (Font)              Font shape `T1/qcs/m/it' tried instead on input line 11.      Apparently some text was changed from slanted to italic, but there's no output of slanted or itcalic text in the document at all. There's only a roman "a". The warning is also only triggered if theres _something_ (at least one letter) in the document (regular text or math), it does not trigger in an empty document. **Why is a font warning written to the log when no text is affected at all?** Is this a bug of `scrpage2`?


title: Drawing an envelope in tikz

text: How could I define and evelope shape like for example this one ![enter image description here](http://i.stack.imgur.com/creZs.png) in Tikz? If possible it would be great it there was an option to write inside the upper triangle (and so the shape should be able to be stretched)


title: Defining HTML-like tags as TeX macros

text: I have to admit, my catcode skill are not that good. I'm working with some templates that will be filled in by a programme (`HTML::Template`, made for `HTML` but very handy for LaTeX as well). I'd like my template to be compilable even without the tags being substituted. Tags are of the form `<TMPL_#1 #2>` and `</TMPL_#1>`, any ideas as to how one can make these into macros themselfs? Here is my current attempt where ` does not work (and is thus outcommented) plus the catcode change affects the entire document whis is not really what I want.               \documentclass[a4paper]{article}     \usepackage[T1]{fontenc}          % enable this to make a WEB template compilable     % he <TMPL_VAR ..>'s will be replaced by the template system     \catcode`\_=\active                          \let\_\textunderscore%     \catcode`<=\active     \gdef<TMPL_#1 #2>{\texttt{\textless TMPL\_#1 #2\textgreater}}     %\def</TMPL_#1>{\texttt{\textless /TMPL\_#1\textgreater}}          \begin{document}          <TMPL_VAR TEST>          <TMPL_IF NAME=TEST>     something     %</TMPL_IF>          \end{document}      any suggestions?


title: How to apply a macro to each column of a table

text: I want to apply a macro to all the cells of a column with the cell content as the input to the macro. Is this possible? For example if the cell contents have the word TEST, the macro should take TEST as its argument.


title: Conditionals—do something, if a given command is being used in the document

text: Is it possible to have a conditional that allow us to do something _if_ a given command is being used in the _document_? For example for the `\part` command would be:               \@ifcommandisbeingused{\part}{<then>}{<else>}      ## Clarification The following would avoid the `\bfseries` for the chapter entry in the TOC, because the `\part` command is being used in the _document_.               \documentclass{book}          \makeatletter          \@ifcommandisbeingused{\part}     {       \renewcommand*\l@chapter[2]{%       \ifnum \c@tocdepth >\m@ne         \addpenalty{-\@highpenalty}%         \vskip 1.0em \@plus\p@         \setlength\@tempdima{1.5em}%         \begingroup           \parindent \z@ \rightskip \@pnumwidth           \parfillskip -\@pnumwidth           \leavevmode           \advance\leftskip\@tempdima           \hskip -\leftskip           #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par           \penalty\@highpenalty         \endgroup       \fi}     }{}          \makeatother              \begin{document}          \part{Lorem}     \chapter{Ipsum}          \end{document}      * * * P.S. I've changed `\@ifcommandIsBeingUsed` to `\@ifcommandisbeingused` 'cause I've remembered that in TeX/LaTeX language is common to use uppercase letters only in "very low level" macros.


title: How can I use Dragon NaturallySpeaking to write LaTeX math formulas by voice efficiently?

text: I write LaTeX documents by voice using Dragon NaturallySpeaking for speech recognition. It allows me to write much faster than if I had to type on a keyboard (~ 100 WPM vs. 50), I find that voice commands are easier to remember than keyboard shortcuts and in the long run it prevents from RSI. I would like to be able to write LaTeX math formulas by voice efficiently. How can I achieve that? Do there exist libraries of useful voice commands dedicated to LaTeX? Should I use Dragon NaturallySpeaking extensions such as NatLink, DragonFly or Vocola?


title: Installation of packages for TeX Live 2012/MacPorts 2012_5

text: I have `TeX Live 2012/MacPorts 2012_5` installed on my Mac using mac port, and I'd like to install packages (pgfplots) for it. How can I install packages for Mac Port TeX?


title: How can I reference line numbers in an external source file (e.g. C++) in a maintainable way?

text: I doubt there's a very efficient way to do this, but `LaTeX` seems to be capable of just about anything. I'm writing up a document to explain a piece of C++ source code to future users of the package. The source code is part of a 2,000,000+ line package with dozens of developers. The particular section of code I'm working on spans only a couple thousand lines, but it is complicated enough that typical means of documentation were getting too tedious (e.g. source code comments, doxygen, etc.). I would like to be able to refer to lines of code in my explanatory `TeX` document, but as the code is still partially under development, those line numbers can (more accurately, _will_ ) change. My current approach is to just say that all line numbers just refer to lines at a particular repository revision, but that isn't very satisfactory. I'm not opposed to putting some sort of identifying marks as comments in my code that `LaTeX` would parse out to generate line numbers, especially if such labels are (at least somewhat) human readable. Any ideas? Here's a minimal-ish example of the kind of thing I'm looking for. Take it with a grain of salt, because the main problem I'm trying to address is that my particular use case is so far from minimal. **hello.cc:**               #include <iostream>          int main() {         std::cout << "Hello World" << std::endl;  // %label{sc:greet}         return 0;     }      **algorithm.tex:**               \documentclass[12pt]{article} % or whatever     \usepackage{something-magical} % i.e. I need this, would define something like \coderef     \begin{document}     In this program, line \coderef{hello.cc}{sc:greet} greets the user.     \end{document}      which would ideally output something like: ![Possible output](http://i.stack.imgur.com/Gu6i2.png)


title: \newif conditional causing problem in \typeout or \edef

text: The following code produces result as expected, i.e., > False True on the typeset document.               \documentclass{minimal}          \newif\iftest          \newcommand{\test}[2]{     \iftest       #1     \else       #2     \fi     }     \newcommand{\ex}{\test{True}{False}\testtrue\test{True}{False}}          \begin{document}     \ex     \end{document}      However, if I wrap `\ex` with `\typeout`, or try to `\edef\ex` instead of `\newcommand` I get:               ! Incomplete \iffalse; all text was ignored after line...


title: master mode in Texmaker

text: I am writing a project with texmaker, and i've separated it into several files, to keep it organized. But I run into the following problem - I have to define every startup that the main document is in master mode. (otherwise autocomplete of `\cite{}` wouldn't work in the included files). Anyone got a solution for this ?


title: acronym with inputenc changes between latin10 and utf8

text: [edited] finished OK MWE This is `mwe.dtx`.               % \iffalse    (METACOMMENT)     %%     %% ---------------------------------------------------------------------     %%     %% Document class `mwe' to use with LaTeX 2e.     %%     %% ---------------------------------------------------------------------     %%     % \fi     %     % \CheckSum{419}     %% \CharacterTable     %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z     %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z     %%   Digits        \0\1\2\3\4\5\6\7\8\9     %%   Exclamation   \!     Double quote  \"     Hash (number) \#     %%   Dollar        \$     Percent       \%     Ampersand     \&     %%   Acute accent  \'     Left paren    \(     Right paren   \)     %%   Asterisk      \*     Plus          \+     Comma         \,     %%   Minus         \-     Point         \.     Solidus       \/     %%   Colon         \:     Semicolon     \;     Less than     \<     %%   Equals        \=     Greater than  \>     Question mark \?     %%   Commercial at \@     Left bracket  \[     Backslash     \\     %%   Right bracket \]     Circumflex    \^     Underscore    \_     %%   Grave accent  \`     Left brace    \{     Vertical bar  \|     %%   Right brace   \}     Tilde         \~}     %%     % ^^A \MakeShortVerb{\|}     % \section{Internals}     %     %    \begin{macrocode}     %<class>\NeedsTeXFormat{LaTeX2e}[1995/12/01]     %    \end{macrocode}     %     % \iffalse (Don't show this in the doc).     %<*driver>              \ProvidesFile{mwe.drv}     %</driver>     % \fi     %    \begin{macrocode}     %<class>\ProvidesClass{./mwe}             [2012/05/24 v1.0     %<class>        A mwe class]     %    \end{macrocode}     % \iffalse (Omitted from the doc)     %<*driver>     ]     %</driver>     % \fi     %     % \subsection{Driver for this document}     %     % This program will extract the following driver from this file:     %    \begin{macrocode}     %<*driver>     \documentclass{ltxdoc}     \EnableCrossrefs     %\DisableCrossrefs % Say \DisableCrossrefs if index is ready     \RecordChanges     %\OnlyDescription % Comment out for implementation details     \CodelineIndex     \begin{document}       \DocInput{mwe.dtx}     \end{document}     %</driver>     %    \end{macrocode}     % \begin{macro}{\my@op@n}     % \begin{macro}{\my@s@ut}     % \begin{macro}{\protected@write@immediate}     % \begin{macro}{\immediateaddtocontents}     % \begin{macro}{\addtocontentsline}     % \begin{macro}{\my@readwrite@line}     % \begin{macro}{\my@docum@nt}     % \begin{macro}{\my@end@docum@nt}     % \begin{environment}{document}     % \begin{macro}{\my@sym@def}     % \begin{macro}{\my@sym@LANG@def}     % \begin{macro}{\my@s@l@ctl@ngu@g@}     % \begin{macro}{\selectlanguage}     % \begin{macro}{\my@ch@pt@r@}     % \begin{macro}{\@chapter}     % \begin{environment}{symbols}     %    \begin{macrocode}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \RequirePackage[T1]{fontenc}%%%%     \RequirePackage[utf8]{inputenc}%     \RequirePackage{xargs}%%%%%%%%%%     \RequirePackage{acronym,suffix,xargs,xifthen,xspace}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \LoadClass[a4paper,10pt,twoside,openright]{report}[2007/10/19]          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \newcommandx\my@op@n[3][addprefix=\global,1=template,2=.txt,3=.tex]{%       \newread\my@file%       \immediate\openin\my@file=#1\myLANG#2%       \newwrite\my@fil@%       \immediate\openout\my@fil@=#1\myLANG#3%     }          \newcommandx\my@s@ut[0][addprefix=\global]{%       \immediate\closein\my@file%       \immediate\closeout\my@fil@%     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %% Code borrowed from `multitoc.dtx' of CTAN /macros/latex/contrib/ms     %% Copyright (c) [1998..1999]  Martin Schr\"oder. All rights reserved.          \newcommand*{\protected@write@immediate}[3]{%           \begingroup            \let\thepage\relax            #2%            \let\protect\string            \edef\reserved@a{\immediate\write#1{#3}}%            \reserved@a           \endgroup           \if@nobreak\ifvmode\nobreak\fi\fi        }          \newcommand*{\immediateaddtocontents}[2]{%       \protected@write@immediate\@auxout           {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble}%           {\string\@writefile{#1}{#2}}}          %%     %%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \def\addcontentsline#1#2#3{%       \immediateaddtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}}}          \newcommandx\my@readwrite@line[2][addprefix=\global\protect,1=-1,2=to]{%       \catcode`\\=12\catcode`\{=12\catcode`\}=12\catcode`\$=12%       \catcode`\#=12\catcode`\^=12\catcode`\_=12\catcode`\%=12%       \let\my@var\endlinechar%       \endlinechar=#1%       \immediate\read\my@file#2\my@lin@%       \endlinechar=\my@var%       \catcode`\%=14\catcode`\_=8\catcode`\^=7\catcode`\#=6%       \catcode`\$=3\catcode`\}=2\catcode`\{=1\catcode`\\=0%       \protected@xdef\my@line{\my@lin@}%       \ifthenelse{\equal{\my@line}{}}{}{%       \protected@write@immediate\my@fil@{\relax}{\my@line\@backslashchar\@backslashchar}}%     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \let\my@docum@nt\document     \let\my@end@docum@nt\enddocument     \renewenvironmentx{document}[2][1=pre,2]{%       \my@op@n%       \my@docum@nt%%%%%       \input{#1.tex}%       \ifx\\#2\\\else\selectlanguage{#2}\fi%       \ignorespaces%%%%%%%%%     }{\my@end@docum@nt%       \ignorespacesafterend%     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \newcommandx\my@sym@def[1][addprefix=\global]{%       \expandafter%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       \newcommandx\csname#1\endcsname[4][addprefix=\global,3,4]{%         \ifthenelse{\isempty{##3}%         }{\ifthenelse{\isempty{##4}%           }{\acro{##1}{{##2}}%%%%%%%%%           }{\acro{##1}[{##2}]{{##4}}}%         }{\ifthenelse{\isempty{##4}%           }{\acro{##1}{{##2}\acroextra{{##3}}}%%%%%%%%           }{\acro{##1}[{##2}]{{##4}\acroextra{{##3}}}%         }}%         \expandafter\gdef\csname##1\endcsname{\acl{##1}\xspace{}}%%         \expandafter\gdef\csname##1*\endcsname{\acs{##1}\xspace{}}%       }%     }          \newcommandx\my@sym@LANG@def[2][addprefix=\global]{%       \expandafter%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       \newcommandx\csname#1#2\endcsname[4][3,4]{%         \ifthenelse{\isempty{##3}%%%%%%%%%%%%%%%%%%%%%%%         }{\@nameuse{#1}{##1}{\@nameuse{#2}{##2}}[][##4]%         }{\@nameuse{#1}{##1}{\@nameuse{#2}{##2}}%%%%%%%%                             [\@nameuse{#2}{##3}][##4]%%%         }%       }%     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \let\my@s@l@ctl@ngu@g@\selectlanguage     \renewcommand\selectlanguage[1]{%%%%%%%%%%%     \my@s@l@ctl@ngu@g@{#1}\@nameuse{do\myLANG}}          \let\my@ch@pt@r@\@chapter     \renewcommandx\@chapter[3][1,2,3]{%       \ifthenelse{\isempty{#1}}{%         \GenericError{}{empty chapter name}{%%%           stop}{%%%%%%%%%%%%%%%%%%%%%%%%%%%%%           here.}}%%%%%%%%%%%%%%%%%%%%%%%%%%%%       \ifx\\#3\\\else\selectlanguage{#3}\fi%       \my@ch@pt@r@[#1]{#1}%       \addcontentsline{lof}{chapter}{\thechapter\nobreakspace#1}%       \addcontentsline{lot}{chapter}{\thechapter\nobreakspace#1}%       \ifx\\#2\\\else\label{chp:#2}\fi%     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \newenvironmentx{symbols}[1][1]{%       \pagestyle{empty}%%%%%%%       \thispagestyle{empty}%%%       \chapter*{Symbols}%       \addcontentsline{toc}{section}{Symbols}%       \begin{acronym}[{#1}]%     }{\end{acronym}%%%%%%%%%       \clearpage%     }          %    \end{macrocode}     % \end{macro}     % \end{macro}     % \end{macro}     % \end{macro}     % \end{macro}     % \end{macro}     % \end{macro}     % \end{macro}     % \end{environment}     % \end{macro}     % \end{macro}     % \end{macro}     % \end{macro}     % \end{macro}     % \end{macro}     % \end{environment}      This is `mwe.ins`.               \def\batchfile{mwe.ins}     \input docstrip.tex     \keepsilent     \generateFile{mwe.cls}{t}{\from{mwe.dtx}{class}}      This is `ltxdoc.cfg`.               \PassOptionsToClass{a4paper}{article}     \AtEndOfPackage{%     \hyphenation{tocprelim semifinal draft}     \RequirePackage{indentfirst}%     \RequirePackage{hyperref}%     }      This is `mwe.tex`.               % -*- mode: latex; unibyte: nil; coding: utf-8 -*-          \documentclass{./mwe}          \usepackage[romanian]{babel}     \usepackage{newunicodechar}          \newunicodechar{ș}{\c{s}}\newunicodechar{Ș}{\c{S}}     \newunicodechar{ț}{\c{t}}\newunicodechar{Ț}{\c{T}}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \newcommand\RO[1]{\foreignlanguage{romanian}{#1}\xspace{}}     \newcommand\doRO{\relax}     \xdef\myLANG{RO}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \makeatletter          \my@sym@def{sym}     \@expandtwoargs\my@sym@LANG@def{sym}{\myLANG}          \makeatother          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \title{Minimal Working Example}     \author{acronym}          \begin{document}[preamble][romanian]          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %--------------------------------------------------------------------%          \inputencoding{latin10}          \makeatletter          \newcounter{my@cnt}%     \setcounter{my@cnt}{0}%          \@whilenum\arabic{my@cnt}<24\do{%       \my@readwrite@line%       \stepcounter{my@cnt}%     }          \my@s@ut%          \makeatother          \noindent%     \input{templateRO}          \inputencoding{utf8}          %--------------------------------------------------------------------%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \chapter[Oscilații][osc][romanian]          \HZO~e formula pentru \HZO*.          \end{document}      This is `preamble.tex`.               % -*- mode: latex; unibyte: t; coding: utf-8 -*-          \maketitle          \begin{symbols}[WORD]            \symRO{HZO}{Apă}[\hfill făcută din 3 elemente și 2 molecule][$H_2O$]          \end{symbols}          \tableofcontents      The sequence is: latex mwe.ins; pdftex -shell-escape mwe.tex #twice The file `templateRO.txt` as specified here -- http://en.wikipedia.org/wiki/Romanian_alphabet#Unicode_and_HTML -- contains 8-bit letters with commas, not cedillas.               Thesis     Submitted in Partial Fulfillment of the Requirements for     the Degree of Doctor of Philosophy     in Computer Science     to the Faculty of Engineering of the     University of Rome     by          Conducător științific     Referenți științifici          Ziua susținerii tezei          Acest document este în domeniul public.          Acknowledgements          Dedicație          Keywords          Lista de acronime     Lista de teoreme     Lista de demonstrații      thank s.


title: Numbering new environment with chapter/section

text: If I have a new environment defined (with, say, `trivfloat`), is it possible to get that section to number with chapter/section? I use `\numberwithin` for equations, figures, and tables. For example, my equations and figures are numbered 1.1, 1.2, 1.3, 2.1, ... (or even 1.1.1, 1.1.2, ...) But if I have a new float type (say, graph), `\numberwithin` won't work.               \trivfloat{graph}     \numberwithin{graph}{section} % Error...      Same happens if I use `\DeclareCaptionType` from the caption package. Any thoughts on how to get this effect?


title: How do I achieve consistent font sizing in a tikz circuit?

text: When creating a circuit using the tikz circuits library, the objects may have a variety of different constructions. There may be labels containing fractions and there may be ordinary paths with labels. I have found that the font sizes are variable, which can make the resulting circuit difficult to read. Here is my minimal working example:               \documentclass{standalone}          \usepackage{amsmath}          \usepackage{tikz}     \usetikzlibrary{arrows,circuits.ee.IEC,positioning}          \begin{document}          \begin{tikzpicture}[circuit ee IEC,x=2cm,y=1.5cm,     every info/.style={font=\footnotesize},     small circuit symbols,     set inductor graphic=var inductor IEC graphic,     set diode graphic=var diode IEC graphic,     set make contact graphic= var make contact IEC graphic]     % Set the font size          % Let us start with some contacts:     \foreach \contact/\x in {0/0,2/3}     {     \node [contact] (upper contact \contact) at (\x,4) {};     \node [contact] (lower contact \contact) at (\x,0) {};     }     \node [coordinate] (upper right limit) at (6,4) {};     \node [coordinate] (lower right limit) at (6,0) {};          \draw (upper contact 0) to [current direction={near start,info=$I_1$},resistor={info={$\text{R}_1$}},inductor={near end,info={$\text{jX}_1$}}] (upper contact 2);     \draw (upper contact 2) to[current direction={near start,info=$\text{I}_2$},inductor={near end,info={$\text{jX}_2$}}] (upper right limit)         to[resistor={info={$\frac{\text{R}_2}{\text{s}}$}}] (lower right limit)         to (lower contact 2)         to ++(0,1) coordinate (lower fork) {}         -- ++(-1,0) to[resistor={info={$\text{R}_\text{m}$}}] ++(0,2)         to ++(1,0) coordinate (upper fork) {}         to [current direction'={info=$\text{I}_\text{m}$}] (upper contact 2);     \draw (upper fork) -- ++(1,0)         to[inductor={info={$\text{jX}_\text{m}$}}] ++(0,-2)         to (lower fork);     \draw[color=blue,thick,->] (upper contact 0) ++(0,-0.5) -- ++(0,-1.5) node[anchor=east] (spannung) {$\text{U}_1$} -- ++(0,-1.5);     \draw[color=blue,thick,->] (upper contact 2) ++(2,-0.5) -- ++(0,-1.5) node[anchor=east] (spannung) {$\text{U}_\text{Err}$} -- ++(0,-1.5);     \draw (lower contact 2) -- (lower contact 0);          \end{tikzpicture}          \end{document}      ![Different font sizes...](http://i.stack.imgur.com/F2s32.png) The U1 and UErr voltage labels are larger than those of the resistances and inductances, and the R_2/s on the right is especially small. Now, I can put font size parameters in front of the label text, just as I would in a regular LaTeX document, but the problem with this is that the starting size of every text element seems to be different, so I have to adjust the size by trial and error for every label. If I put something like \large right at the start of the tikzpicture environment, then only the U1 and UErr labels are affected. Is there a clean way of achieving a consistent font size for every label?


title: Spaces between rows and cols in a table - Better ways than mine?

text: I started using Latex recently and I put together 4 ways of changing the space in a table. Two general ways defining the general space between cols and rows as well as two ways of adding space between certain rows or cols. I was wondering if the 4 ways I use are the best or most common one to use to adjust space in a table? Here is my simple example:               \begin{table}              \setlength{\tabcolsep}{6pt} % General space between cols (6pt standard)         \renewcommand{\arraystretch}{1} % General space between rows (1 standard)         % Add @{\hskip Xpt} to tabular to add space between certain columns         % Add [Xpt] after \\ of a certain row to add extra space before next row              \begin{tabular}{c@{\hskip 12pt}c}                  % table content              \end{tabular}          \end{table}


title: suppress pagebreaks in titletoc's titlecontents* blocks

text: How do I suppress pagebreaks in the toc "paragraphs" produced by `titlesec`'s `\titlecontents*` command without stopping linebreaks between subsections? The follwoing suppresses linebreaks within subsection, but doesn't deal with pagebreaks. `titlesec` does internally use `\nobreak` and `\addpenalty` in the definition of `\ttl@outnoblock`, but I don't know where I would have to add them.               \documentclass{book}     \usepackage{titletoc}     \titlecontents*{subsection}[3.8em]{\filright\itshape\contentsmargin{2em}}%       {\thecontentslabel.\nobreakspace\mbox}{\mbox}{,\nobreakspace\thecontentspage}[][ -- ][.]          \setcounter{tocdepth}{2}     \setcounter{secnumdepth}{1}          \usepackage[linktocpage]{hyperref}     \usepackage{bookmark}          \begin{document}          \frontmatter          \phantomsection     \addcontentsline{toc}{chapter}{\contentsname}     \tableofcontents          \mainmatter          \chapter{my first chapter}\label{ch:first}     \section{my first section}\label{sec:first}     \addtocontents{toc}{\vspace{11cm}} %for the example     \chapter{my second chapter}     \section{my second section}\label{sec:second}     \subsection{first subsection}     \subsection{second subsection}     \subsection{third subsection}     \subsection{4th subsection}     \subsection{5th subsection}     \subsection{6th subsection}     \subsection{7th subsection}          \end{document}      It might in general be better just to increase the penalty than absolutely forbid the pagebreak, but in my particular case forbidding it might be sufficient. The pagebreak functionalities of `titletoc` should be retained if possible: > Pages are never broken between entries if the first one is of an higher > level than the second one as, for instance, between a section and a > subsection. If both of them are of the same level, the break is allowed, and > if the first is lower than the second, it is considered a good place for a > page break.


title: Should I use the article entry in Bibtex when the work is unpublished?

text: Looking at this page about Bibtex I see that the `article` entry should be used when the work has been published in a journal or in a magazine. Suppose that I have a small manual/guide, which probably has not been published, but which totally looks like an article (in the classic Latex meaning), then I can't use the `article` entry in Bibtex because the journal is a mandatory field. What kind of entry should one use in these cases?


title: Sideways table with rotated header on multiple pages

text: I am trying to have a sideways table on multiple pages with the header rotated at 90 deg. I have used `landscape` and `longtable` for the rotation and `multipage` span (`sidewaystable` doesn't work with `multipage` for some reason). And I have used `\rotatebox{90}` for the header. The header row of the table is too long. I would like to reduce it's height and have the text in those cells be on several "lines". Sample code:               \documentclass{article}     \usepackage{longtable}     \usepackage{pdflscape}     \usepackage{siunitx}     \begin{document}     \begin{landscape}                    \centering         \begin{longtable}{|c|c|c|c|c|c|c|c|c|c|c|c|}     \hline     {\rotatebox{90}{\textbf{Experiment No. }}}  &     {\rotatebox{90}{\textbf{Sample  }}}  &     {\rotatebox{90}{\textbf{Temperature  }}}  &     {\rotatebox{90}{\textbf{Sample Weight  }}}  &     {\rotatebox{90}{\textbf{Tar Fraction  }}}  &     {\rotatebox{90}{\textbf{Char Fraction  }}}  &     {\rotatebox{90}{\textbf{Steam Flow Rate [ml/min]  }}}  &     {\rotatebox{90}{\textbf{Nitrogen Flow Rate [ml/min]  }}}  &     {\rotatebox{90}{\textbf{Reaction Distance  }}}  &     {\rotatebox{90}{\textbf{Flow Rate/Sample Weight  }}}  &     {\rotatebox{90}{\textbf{Residence Time [s]  }}}  &     {\rotatebox{90}{\textbf{Stochiometric error  }}}  \hline \endhead %\\          017 & ABS & 700\Deg & 0.56 & 24.0\% & 0\% & 0.000 & 250.000 & 0.6 & 0.000 & 41.15 & 0.0 \\     029 & ABS & 700\Deg & 1.07 & 23.0\% & 0.0\% & 0.000 & 350.000 & 0.5 & 0.000 & 29.41 & 0.0 \\     021 & ABS & 700\Deg & 1.60 & 24.3\% & 0.0\% & 0.167 & 250.000 & 0.6 & 0.104 & 22.49 & 1.2 \\          \end{document}      ![enter image description here](http://i.stack.imgur.com/cPO4H.png)


title: ! Missing control sequence inserted. subfloat

text: I'm getting the below error when I try to run this:               \begin{figure}     \centering     \subfloat[]{\includegraphics[clip=true, trim=0cm .85cm 0cm 0cm, width=.32\linewidth]{rula_shldr.pdf}}     \subfloat[]{\includegraphics[width=.32\linewidth]{rula_elbow.pdf}}     \subfloat[]{\includegraphics[width=.32\linewidth]{rula_crossarms.pdf}}\\     \subfloat[]{\includegraphics[width=.32\linewidth]{rula_trunk.pdf}}     \subfloat[]{\includegraphics[clip=true, trim=0cm 2.5cm 0cm 0cm, width=.32\linewidth]{rula_trunk_side_bending.pdf}}     \subfloat[]{\includegraphics[width=.32\linewidth]{RULA_trunk_twist_front.pdf}}\\     \subfloat[]{\includegraphics[width=.32\linewidth]{rula_head.pdf}}     \subfloat[]{\includegraphics[width=.32\linewidth]{rula_head_side_bending.pdf}}     \subfloat[]{\includegraphics[width=.32\linewidth]{RULA_head_twisted_front.pdf}}     \caption{Rula scores range from 1 to 4 depending on the angle of the corresponding joint: a) Upper arm flexion angle ranges from -20\degree to 180\degree. b) Lower arm flexion angle ranges from 0\degree to 180\degree. c) Across midline angle ranges from 0\degree to 45\degree. d) Trunk flexion angle ranges from 0\degree to 90\degree. e) A score equals to 1 for trunk lateral flexion. f) A score equals to 1 for trunk rotation. g) Neck flexion angle ranges from -45\degree to 90\degree. h) A score equals to 1 for neck lateral flexion. i) A score equals to 1 for neck rotation.}     \label{fig:rulascore}     \end{figure}      error appearing:               ! Missing control sequence inserted.     <inserted text>                      \inaccessible      l.62 ...quals to 1 for neck rotation.\relax }}{89}      so if anyone could please advise


title: Absolutely position nested enumerate labels from page margin

text: I want to absolutely position nested enumerate labels based on the following scheme:               1. Top level - flush with left page margin and all text is     wrapped to the left margin.            a. Second level - label starts .25in from left page margin     and text is wrapped to the left margin.              (1) Third level - label starts .5in from left page margin     and text is wrapped to the left margin.              (a) Fourth level - label starts .5in from left page margin     and text is wrapped to the left margin.      I want the labels to line up at 0in, .25in and .5in and all text wrapped to the left margin of the document. I've struggled through getting the first list to work, but I don't understand which values to use for subsequent lists. One constraint: all customization **must** be completed in the preamble. I'm using Pandoc to generate LaTeX from markdown, so I can't edit the LaTeX directly.               \documentclass{article}          \usepackage[showframe,margin=1in]{geometry}     \usepackage{lipsum}     \usepackage{calc}     \usepackage{tikz}     \newcommand{\Gridlines}{       \begin{tikzpicture}[remember picture, overlay]         \node[anchor=south west,inner sep=0pt] at (current page.south west)         {\tikz \draw[line width=0.2pt,color=gray!10,step=0.125in] (0,0) grid ++(8.5in,11in);};         \node[anchor=south west,inner sep=0pt] at (current page.south west)         {\tikz \draw[line width=0.3pt,color=gray!20,step=0.25in] (0,0) grid ++(8.5in,11in);};         \node[anchor=south west,inner sep=0pt] at (current page.south west)         {\tikz \draw[line width=0.4pt,color=gray!30,step=1in] (0,0) grid ++(8.5in,11in);};       \end{tikzpicture}     }     \usepackage{enumitem}          % 1st level: 1. 2. 3. flush with left margin     % 2nd level: a. b. c. indent 0.25 in     % 3rd level: (1) (2) (3) indent 0.5 in     % 4th level: (a) (b) (c) indent 0.5 in, same as 3rd level     % Don't subdivide beyond 4 levels          \setlist{       itemindent=.5\leftmargin,     }          \setlist[1]{       labelindent=0in,       leftmargin=*,       align=left,       % itemindent=\labelwidth+\labelsep,       % after=\setlength{\itemindent}{\leftmargin}     }          % The tricky part is that each new list starts at the enclosing lists     % leftmargin.     \setlist[2]{       label=\alph*.,       % The additional amount we want to indent minus the labelsep and       % labelwidth of the enclosing enum. The 12.7778pt comes from the       % enclosing enumerate.       labelindent=.25in,       leftmargin=*,       align=left     }          \setlist[3]{       label=(\arabic*),       labelindent=.25in,       leftmargin=*,       align=left     }     \setlist[4]{       label=(\alph*),       labelindent=0in,       leftmargin=0pt,       align=left     }          \begin{document}     \Gridlines     \begin{enumerate} \item \lipsum[1]     \item labelindent: \the\labelindent,  labelwidth: \the\labelwidth,  labelsep: \the\labelsep,  leftmargin: \the\leftmargin,  itemindent: \the\itemindent       \begin{enumerate}       \item \lipsum[3]       \item labelindent: \the\labelindent,  labelwidth: \the\labelwidth,  labelsep: \the\labelsep,  leftmargin: \the\leftmargin,  itemindent: \the\itemindent         \begin{enumerate}         \item labelindent: \the\labelindent,  labelwidth: \the\labelwidth,  labelsep: \the\labelsep,  leftmargin: \the\leftmargin,  itemindent: \the\itemindent           \begin{enumerate}           \item labelindent: \the\labelindent,  labelwidth: \the\labelwidth,  labelsep: \the\labelsep,  leftmargin: \the\leftmargin,  itemindent: \the\itemindent           \end{enumerate}         \end{enumerate}       \end{enumerate}     \end{enumerate}          \end{document}      ![Example output](http://i.stack.imgur.com/iBScI.png)