title: Square Root Radical Sign

text: Is it possible to type a radical of a square root equation as `\sqrt{}` with any number inside the bracket? I looked up how to do it but there were only these answers with advanced LaTeX that I don't understand. Any help someone?


title: Commutative diagram with curved arrows, colour, and changing the style of arrows

text: I am using xy matrix and I would to curve an arrow over other arrows in a diagram, at the same time as setting some of these curved arrows to equal and changing their colour. This is what I have so far:               \usepackage[all]{xy}              \xymatrix{         &&H(Z) \ar@/^2.0pc/[rr]^{F(f^{op} \circ g^{op})} \ar[r]^{H^{*}(g^{op})} & H(Y) \ar@{=}[dl] \ar[r]^{H^{*}(f^{op})} & H(X) \ar@{=}[dl] \ar@/^2.0pc/[ddll]\\         & H(Z) \ar@{=}[ur] & H(Y) \ar[u]_{G(g^{op})} & H(X) \ar@{=}[dl] \ar[u]_{G(f^{op})}\\         H(Z) \ar[r]^{H^{*}(g^{op})} \ar@{=}[ur]  &H(Y) \ar@{=}[ur] \ar[r]^{H^{*}(f^{op})}  \ar[u]_{G(g^{op})} &H(X)   \ar[u]_{G(f^{op})} \ar@/^2.0pc/[uu]^{G(f^{op} \circ g^{op})}  \\         }      I would like the larger curved arrows to be red, with the curved arrow in the bottom right hand corner of the diagram to be an = arrow as in `ar@{=}[ddll]`.


title: Draw a normal distribution by Latex

text: I would like to draw the following picture by Latex. Please help me a bit. Kind Regards ![enter image description here](http://i.stack.imgur.com/HQ4CE.jpg)


title: Filling in the area under a normal distribution curve

text: ![enter image description here](http://i.stack.imgur.com/vSCzm.png) I'm trying to fill the area between the two $z$-scores but I'm not having any luck. Could someone please help me with this?               \begin{tikzpicture}     \begin{axis}[       no markers,        domain=0:6,        samples=100,       ymin=0,       axis lines*=left,        every axis y label/.style={at=(current axis.above origin),anchor=south},       every axis x label/.style={at=(current axis.right of origin),anchor=west},       height=5cm,        width=12cm,       xtick=\empty,        ytick=\empty,       enlargelimits=false,        clip=false,        axis on top,       grid = major,       hide y axis       ]      \addplot [very thick,cyan!50!black] {gauss(x, 3, 1)};          \pgfmathsetmacro\valueB{gauss(1,1,7)}     \pgfmathsetmacro\valueA{gauss(1,1,1.7)}     \pgfmathsetmacro\valueC{gauss(1,1,1)}          \draw [very thick, red]  (axis cs:1,0) -- (axis cs:1,\valueB);     \draw [very thick, red]  (axis cs:2,0) -- (axis cs:2,\valueA);     \draw [very thick, red]  (axis cs:3,0) -- (axis cs:3,\valueC);          \node[below] at (axis cs:3, 0)  {$\mu$};      \node[below] at (axis cs: 2, 0) {$z=-1.8$};     \node[below] at (axis cs: 1,0) {$z=-2.97$};     \end{axis}     \end{tikzpicture}


title: How to automatically inline \input commands and bibliography?

text: I have a document that uses some `\input` commands and creates the bibliography via an external `.bib` file and `bibtex`. Now I have to inline the `\input` commands (i.e. replace each `\input` command with the content of the corresponding file) and inline the bibliography (i.e. replace the bibliography command with the .tex code which is generated by bibtex). The inlining is required by the editor. How can I do this automatically?


title: Does dvips's "ps:" special alter the standard PostScript (bp) units?

text: Working on developing some clipping code based on the approach taken by `pgf`, I've stumbled across some odd effects with the `\special{ps:` construct of `dvips`. A couple of examples will show this. The first is doing some simple drawing:               \def\squaredemo{%       newpath       0 0 moveto       0 72 lineto       72 72 lineto       72 0 lineto       closepath       stroke     }          \vbox to 72bp%       {\special{" \squaredemo}}     \vbox to 72bp%       {\special{ps: gsave \squaredemo grestore}}     \bye      The two operations should be equivalent: according to the `dvips` manual, the `"` form of the special inserts a save/restore but other than that is the same as `ps:`. However, the output of the two is different: the square in the second case is a lot smaller. The second case, and the one that led me to this, is seen when you do some clipping:               \newbox\tmpbox          \setbox\tmpbox=\hbox{\vrule width 1in height 1in depth 0 in }     \noindent\box\tmpbox          \setbox\tmpbox=\hbox{\vrule width 1in height 1in depth 0 in }     \setbox\tmpbox=\hbox{%       \special{ps:gsave}%       \special{         ps:           currentpoint           currentpoint translate           /savedmatrix matrix currentmatrix def           Resolution 72 div VResolution 72 div scale           0 0 36 -72 rectclip           savedmatrix setmatrix           neg exch neg exch translate       }%       \wd\tmpbox 0pt %       \rlap{\box\tmpbox}%       \special{ps:grestore}%       \hskip 0.5in %     }     \noindent\box\tmpbox           \setbox\tmpbox=\hbox{\vrule width 1in height 1in depth 0 in }     \setbox\tmpbox=\hbox{%       \special{ps:gsave}%       \special{         ps:           currentpoint           currentpoint translate           /savedmatrix matrix currentmatrix def           Resolution VResolution scale           0 0 0.5 -1 rectclip           savedmatrix setmatrix           neg exch neg exch translate       }%       \wd\tmpbox 0pt %       \rlap{\box\tmpbox}%       \special{ps:grestore}%       \hskip 0.5in %     }     \noindent\box\tmpbox     \bye      Notice that to get the clipping to behave correctly you need to scale by a factor which seems to be the `Resolution`. So the question is why this is happening: standard PostScript units should be big points. Is this something 'built in' to `dvips`, is it specific to the `ps:` special or am I making a mistake somewhere?


title: Shared counter between enumerate and equations

text: I'm currently writing some math stuff in LaTeX and I've encountered the following problem: I'd like to have "shared" counters in equations and specific lists, s.t. for example               \begin{equation}         a + b = c     \end{equation}     and additionally     \begin{mycoolenum}         \item $c + d = e$         \item $c - f = e$     \end{mycoolenum}      results in               (1.1)      a + b = c          and additionally         (1.2) c + d = e         (1.3) c + f = e      The reason why I want to do this is to have consistent reference names throughout my work. I've tried playing around with [resume] and the list enviornment but to no avail. What it should kinda look like:               \documentclass{scrartcl}     \usepackage{amsmath}          \numberwithin{equation}{section}          \begin{document}         \section{Section 1}         \begin{equation}             a + b = c         \end{equation}         \begin{list}{\theequation}{}             \addtocounter{equation}{1}             \item $c + d = e$             \addtocounter{equation}{1}             \item $c - f = e$         \end{list}         \begin{equation}             1 + 1 = 2         \end{equation}     \end{document}      EDIT: To clarify: I'm currently using `flalign` to somewhat imitate the desired behavior, but this has some disadvantages regarding both code and the final result.


title: How to ignore the underbrace{}{} in a square root?

text: I want to keep the size of the square root unchanged without putting the underbrace outside > \sqrt{\underbrace{=A}{B}}


title: How to denote number of summands below the expression?

text: If we want to write for example `$\mathbb{N}=\mathbb{N}\times\dots \mathbb{N}$` and below the RHS write "n copies" how we will do it in Latex?


title: Generalize \@ifnextchar to consider more than one character.

text: I am looking for a clever way to write a `switch` statement based on the next input characters, ideally, one could write:               \@switchnextchars            \@case{abc}{\typeout{You gave me an abc}}%            \@case{ab+}{\typeout{You gave me an ab+}}%            \@default{\typeout{Nothing that I heard of!}%      \@endswitch      but also               \@ifnextchars{abc}{yes code}{no code}      or even               \@ifnexttwochars{ab}{yes code}{no code}      would be useful.


title: Automatically assign a number to every paragraph

text: I would like to add a marginal number (don't know the right term; in german „Randnummer“) to every paragraph of text I write. I don't see any other solution, than to write every single number manually with `\marginpar`. This is impossible, especially when you write longer texts. Does anyone know a good solution? This image shows what I'd like to achieve. (from: grundrechteforum.de) ![enter image description here](http://i.stack.imgur.com/3571Q.jpg)


title: Put \cite in Figure caption, but don't want to show this in TOC

text: > **Possible Duplicate:**   >  Cite in the caption of a graphic but not in \listoffigures? I have a question regarding \cite and List Of Figures For instance, I declared this               \begin{figure}[ht]       \centering       \includegraphics[scale=0.5]{images/heike/seamless_connection}       \caption[Seamless Connection of Network \cite{vision4g}]{Seamless Connection of Network \cite{vision4g}}       \label{Seamless}     \end{figure}      However, the \cite in caption is causing the List of Figures also show this citing next to the title of Figure. For instance in my List of Figure, I see something like               Seamless Connection of Network [1].....................20      As my documents List of Figure (LOF) is located before the table of content, they all show the reference number next to the Figure in LOF. This caused when I tried to reference something to `"some words \cite{otherciting}"` on page 1 chapter 1, it will show as `"some words [2]"`. While actually the first thing that come is some words, so I expect it to have "some words [1]. This get worse if for instance I have 20 Figures with each reference and all are shown in List of Figures, then the "some words" will refer to [21] although this is in page 1. I used IEEEtran for bilbiography.. I can do a work around by putting the LOF after conclussion, but I just want to know if there is a work around for this. Thank you for any response


title: \input{...} is ignored with beamer option ignorenonframetext

text: I'm using `beamer` to create my slides and wanted to use `beamerarticle` to create written paper which is not just printed slides 3 on 1 page. The option `ignorenonframetext` for the `beamer` class forces it to ignore any text but `\section{}` etc. that is not inside a `frame` environment. This is intended for interaction with the `beamerarticle` class to edit all information (frames and additional text) at the same place. Unfortunately the `\input{}` command is ignored as well, making it impossible to organize my document in the usual way, i.e. one file for any section for example. Is there any additional option to activate this kind of "infrastructure" command in `beamer`? **Example**               \documentclass[ignorenonframetext]{beamer}     %\documentclass{scrartcl} \usepackage{beamerarticle}          \usetheme{Goettingen}     \usecolortheme{crane}     \title{Test slides}     \author{Christoph Juengling}          \begin{document}     \maketitle     \begin{frame}       \titlepage     \end{frame}          \input{sec-one}          This is explaning text at the end of the first section.          \input{sec-two}          \end{document}      In this example, using the `beamerarticle` class all looks fine, but with the `beamer` class activated with the specified option, nothing but the title frame will be created. The two additional files do contain valid LaTeX code with frames!


title: How to make different caption placement for figures on odd and even pages?

text: For small figures, I want for captions to go on the right or on the left depending on the page number, whether it is odd or even. To do that I define the command `\row` as follows:               \newcommand{\row}[2]{%         \ifodd\value{page}             #2 \hfil #1         \else             #1 \hfil #2         \fi     }      Typically, it is used inside the `figure` environment, for example,               \begin{figure}     \row{%       \begin{minipage}[c]{0.67\textwidth}         \includegraphics[width=\textwidth]{2011-03-03}       \end{minipage}%     }{%       \begin{minipage}[c]{0.3\textwidth}         \caption{The transition temperature vs. density of the hydrogen}          \label{fig:03-03}       \end{minipage}}     \end{figure}      This works as desired in most cases, however, sometimes, placement of the caption goes wrong. I wonder why? And how to modify my code to avoid troubles?


title: How to plot a graph with separate scale reference lines?

text: I have searched through different plots generated by pgfplots and could not find my desired style as below: I know how to hide axes, but would like to know does PGFplots have an option to automatically generate scale reference lines (seen at southeast of the image) ![enter image description here](http://i.stack.imgur.com/S77nq.png)


title: How to make Bourbaki's style remarks

text: I like my remarks comes in the fashion of Bourbaki's. Lines and the "Remark" are indented inwards equally, and the font is one size smaller. I used these simple lines of code:               \newtheoremstyle{myrem}%name      {3pt}%Space above      {3pt}%Space below      {\small}%Body font      { }%Indent amount      {\itshape}% Theorem head font      {:}%Punctuation after theorem head      { }%Space after theorem head 2      { }%Theorem head spec (can be left empty, meaning ‘normal’)      \theoremstyle{myrem}{\newtheorem{remark}{Remark}}       Then               \begin{document}%      Some texts here.     \begin{remark}%     \leftskip\parindent%     All Bourbaki type comments are flushed left with hanging indent come here.      Moreover, they are numbered, as I wished. But is there a way to make     \leftskip\parindent     automatic, as part of the style? Since, the book has been finished.     \end{remark}     \end{document}      This works all right but should be added to all the "Remarks." I do not want to use the ntheorem package since it creates conflicts difficult to resolve. Further, I like to know how to put the Bourbaki's dangerous zone `\danger` in the margin (but this is easy to find out).


title: How to convert PDF to (La)TeX?

text: I know that hardly any information is passed to the PDF when a .tex file is compiled. But is there a tool that can convert a PDF document back to (La)TeX?


title: Generating LaTeX code from scanned LaTeX pdf

text: I have a paper copy of some old LaTeX notes, but I lost the source file. If I scanned them as a .pdf, does any OCR software exist that could convert the scanned .pdf to LaTeX source (.tex)? I also have a paper copy of some old notes created using Microsoft Word's Equation Editor. While I am considerably less hopeful, I ask the same question -- does an OCR software exist that could convert a scanned .pdf to .tex? Thank you for your help.


title: Is there a way to extract the source .tex from a pdf file?

text: I have a pdf file that I'm positive was originally set up in TeX. Is there a way to extract the original markup from this? If it's any help, I work with Windows 7 and MikTeX 2.9


title: pdf output back to aux

text: Can a PDF file be used to generate a Latex (Tex Studio, etc) file with aux. files? A PDF was generated from an original Latex file but I lost the Tex files and only have the PDF.


title: Copying latex from scanned book

text: Suppose I have a scanned book with equations, is there a convenient way to obtain latex that reproduces them?


title: Recover TeX file back from compiled PDF

text: > **Possible Duplicate:**   >  How to convert PDF to (La)TeX? Has anyone written a piece of code that (at least) tries to reconstruct (standard) LaTeX from a compiled PDF file? I mean, identifying indices and exponents, common fonts, footnotes, linebreaks should mostly be algorithmizable, if somewhat error-prone. Basically I am looking for an approximative section of the map _pdflatex: tex → pdf_ which does most of the work, leaving maybe a few minor corrections (but not the whole design) to be done at hand. No, I am not asking for an auto-plagiarizer tool. I am sure I am not the only one here with data loss issues...


title: IMAGE PDF to LaTeX Conversion

text: What toolchains are available to convert scans to LaTeX I am looking for a freeware way to convert PDFs (via OCR and other methods) to LaTeX. The scanned documents   * are in PDF form.   * have a resolution of about 300 to 600dpi.   * contain only few mathematical expressions.   * contain pictures and text. I can work with Windows or Ubunto equally fine. My research so far turned up InftyReader and writer2latex.


title: Reverse LaTeXing

text: My system got formatted completely. I dont have any files related to tex. So I installed TeXLive and texmaker on my pc. But yes, I have the pdf generated by the tex file. Is it possible to get my tex file using the pdf?If so, how do I do it?


title: Is it possible to get the source code of a LaTeX rendered PDF file if one has the hard copy?

text: > **Possible Duplicate:**   >  How to convert PDF to (La)TeX?   >  Lost LaTeX-file - but served pdf - File I know there are a couple of apps floating around where you can get the source code if you handwrite the equations, but is it possible to reveal the source code from a hard copy of a latex rendered document? edit: by hard copy i mean literally a paper copy.


title: Lost LaTeX-file - but served pdf - File

text: > **Possible Duplicate:**   >  How to convert PDF to (La)TeX?   >  Recover TeX file back from compiled PDF I wrote a long book in LaTeX - but my pc broke down and now it is all lost, only a pdf copy of the book is still on my pc. Can anybody help me how to get my LaTeX-Version back?


What is the most minimal code to work with ConTeXt?


title: How to compare two dates using TeX primitives

text: This is a follow up to TeX capacity exceeded while parsing a date string I want to compare two dates, say today's date and a due date. I have the due date information stored (as number strings) in macros `\dueday`, `\duemonth`, and `\duemonth`. I use the following, from `etoolbox` package:               \newcommand{\dueday}{6}     \newcommand{\duemonth}{5} % May     \newcommand{\dueyear}{2012}          \ifboolexpr{         (test {\ifnumcomp{\dueyear}{>}{\year}})         or (test {\ifnumcomp{\dueyear}{=}{\year}} and test {\ifnumcomp{\duemonth}{>}{\month}})         or (test {\ifnumcomp{\dueyear}{=}{\year}} and test {\ifnumcomp{\duemonth}{=}{\month}} and test {\ifnumcomp{\dueday}{>}{\day}})         }         {Not due yet}         {Due immediately}      which does work, but I'm looking for a TeX-based solution that, perhaps, can do this more efficiently and without having to use `etoolbox`.


title: Set default font to tikz flowchart

text: I am a beginner with latex and tikz, and am using a .sty template to set my default fonts etc throughout the document (university requirement). This makes all the default text slightly larger than usual and adds 1.5 line spacing. However I would like to add a flowchart (which I built successfully in a separate latex file using tikz). The problem is that once I pasted the code into the other document (the one with the template), the text inside the flowchart changed to that document's default (larger and with 1.5 line spacing). Obviously this made all the process boxes of the flowchart larger and they no longer fit in a page. Is there a way to only change the font of the tikz shapes to the latex default? I found ways how to add line spacing to the tikz shapes, or change the font, but cannot find how to set it to the latex default (which is not the default of that document). Thanks. Your help is greatly appreciated.


title: Intersections in PGFplots

text: I can get intersections to work in TikZ, but not PGF plots. I defined a command to show the intersections to make sure that it is identical in both cases. Commenting out the `\ShowIntersection` line in the 2nd graph results in a syntax error. Is there a different way to name the curves in PGF plots?               \documentclass{standalone}          \usepackage{pgfplots}     \usetikzlibrary{intersections}          \begin{document}          % Define this as a command to ensure that it is same in both cases     \newcommand*{\ShowIntersection}{     \fill          [name intersections={of=GraphCurve and HorizontalLine, name=i, total=\t}]          [red, opacity=1, every node/.style={above left, black, opacity=1}]          \foreach \s in {1,...,\t}{(i-\s) circle (2pt)             node [above left] {\s}};     }          \begin{tikzpicture}     \draw[name path=GraphCurve, mark=none, domain=-2.5:2.5, thick]%         plot ({\x},{\x*\x});%          \draw [red, thick, name path=HorizontalLine]          (-2.5,3) -- (2.5,3);%          \ShowIntersection% Works fine here     \end{tikzpicture}               \begin{tikzpicture}     \begin{axis}          \addplot[name path=GraphCurve, mark=none, domain=-2.5:2.5, thick]%         ({x},{x*x});%          \addplot [red, thick, name path=HorizontalLine]          coordinates{(-2.5,3) (2.5,3)};%          %\ShowIntersection% Error: Do not know path "GraphCurve"           \end{axis}      \end{tikzpicture}     \end{document}


title: TexLive cannot find Ruby.exe

text: > **Possible Duplicate:**   >  How to fix error "ruby.exe seems not to be installed" in Windows 7 where > both Miktex 2.9 and Ruby have been installed? I just installed TexLive 2010 on a computer that already had Ruby installed but get the _`Ruby.exe` not found_ message when running `texexec hello`. Is there something I must set?


title: Are there any LaTeX template for travel guides?

text: I would like to make a travel guide that focuses on cities. I am looking for a usable template for a fast creation of this guide. I was thinking about using something similar to the `cookybooky` package. Another way would be to use a beamer... Any ideas?


title: biblatex: how to abbreviate forenames

text: I have several full names in my rather large bibiography. Since I do not want to change all these I'd like to have the forename shortened to an initial. So "Lieschen Mueller" should get "Mueller L.". I use the standard `authoryear` style.


title: How to draw this picture with LaTeX? TikZ?

text: I think I can deal with LaTeX but I really have problems to draw with it. I have some problems to handle TikZ. As an exercise I would like to draw the following picture: ![example to draw](http://i.stack.imgur.com/cQPrF.png) Maybe anybody can tell me how I can draw this (not necessarily with the frame around it) with LaTeX? In best case a little bit bigger than this. Would be very helpful because I do not know how to do it.


title: biblatex: Reverse numbering (i.e., count down)

text: I was wondering if it is possible to get the citation numbers to count down               [3] newest item     [2] item     [1] oldest item      in `biblatex`? I am sorting using either using `sorting=none` and entering in reverse order or using `sorting=ydnt` and I would like the number of the newest (top) entry to be the highest and at the top of the list. This is for the publications section of a CV. If needed, a full example can be seen in my github repo for my CV, in the `main.tex` file.


Can `movie15.sty` work with Silverlight application?


title: Asking a tikz picture to render at a specific relative location and to not take any space

text: I was wondering if there is a way to get the following behavior using TikZ (overlaying text with at a location relative to the anchor point in the text) ![enter image description here](http://i.stack.imgur.com/EMEYy.png) The code would look like this:               Here is a list:          \begin{itemize}     \item One     \item Two     \item Three     \end{itemize}          Here's what I want:          \begin{itemize}     \item \placetext{2007,-0.3cm,0cm} One     \item \placetext{2009,-0.3cm,0cm} Two     \item \placetext{2012,-0.3cm,0cm} Three     \end{itemize}      where the command `\placetext{text,x_location,y_location}` should place the text `text` at the **relative** location `x_location` and `y_location` from the anchor point on the text. I have been experimenting with the following code that I found in this thread to ask LaTeX and TikZ to print text that "does not take space" with no success.               \makebox[0pt][c]{%     \begin{tikzpicture}[scale=4, overlay]     \node[draw=none,fill=none]  {Hello};\end{tikzpicture}}      Is this possible at all with TikZ? How can I do it?


title: Sideways figure with rotated page number

text: The submission requirements require that any landscaped image have the page number on the 11" side of the page, at the bottom and centered. I can't figure out how to do this. I'm using `sidewaysfigure` for my landscaped images. They are on their own page.


title: Recommendation for Collecting Feedback on Numerous Files

text: Before I go down the path of the solution I am thinking of, I thought I should solicit feedback/suggestions as others must have come across this situation before. ## Background: I have hundreds of separate PDF files (all generated by LaTeX) over various levels of hierarchy that are cross linked via `\href`. I would like to come up with a system that I can give a hierarchical directory structure containing the PDF files and collect feedback from reviewers on the content of the files. ## Considerations:   * Assume that reviewers do NOT have s/w installed to process the source `.tex` files.   * Need to know that every file was actually looked at.   * Manage feedback from several users.   * A Unix (MacOS) only solution is acceptable but would prefer one that could also work on Windows. ## References:   * I proposed a similar process for creating/managing numerous external files in Automating error message references, so this solution for collecting feedback would be usable in a situation such as that. ## Solution being Considered:   * As part of the build process that generates the PDFs, I would copy the PDFs into a separate directory tree, and also create a parallel directory structure that contains _empty_ `.txt` (not `.tex`) files with the same file name as the corresponding `.pdf` file.  Reason for a separate directory for the feedback is so that I just need to get the feedback directory from the reviewers. The links in the PDFs are all relative so as long as the hierarchy is maintained the links will still work.   * Provide a click able link in each file ( **REVIEW** button) that will open the corresponding `.txt` with `Edit` on the Mac, and perhaps `WordPad` on a PC. Reviewers enter their comments and `Save` the file.  On the Mac I would `touch` the file before opening it to ensure that the time stamp was updated, and the user would only be required to close the file. Am assuming that there is something similar on Windows. This would handle the case of where the file was reviewed but no comments were necessary.   * Once I get the review directories back, I iterate through my `.tex` file hierarchy and produce an output file that contains a link to the source `.tex` file and a link to each reviewer's `.txt` file. I would color code this so that I could distinguish between the cases of:      1. File not reviewed: The time stamp of `.txt` file has not changed since the build time.      2. File approved (i.e, was looked at but no comments made on it): The time stamp of the `.txt` file has changed, but the file is empty.     3. Comments were made on this file: The time stamp of the `.txt` file has changed, and the file is not empty. Would be interested in any alternate suggestions, or how to improve this process.


title: Cannot add metadata to pdf

text: i noticed that i am not able to add metadata to my pdf.. any clues? Here is a minimal working example. The produced pdf has no author or title metadata. I am using miktex and texworks.               % !TeX program = xelatex     \documentclass[a4paper,10pt,draft]{report}          \usepackage[xetex]{hyperref}     %Provides some compatiblity with latex and     %Loads the fixltx2e, metalogo, xunicode, fontspec packages     \usepackage{xltxtra}      \usepackage{xgreek} %Set greek hypenation and support in general               \usepackage{graphicx} %Extends the \includegraphics command     \usepackage{amsmath}  %Improoved math support e.g scalable brackets     \usepackage{array}  %Extends the array command     \usepackage{subfigure}     \usepackage{rotating}     \usepackage{alltt}     \usepackage{float}     \usepackage{multirow}     \usepackage{pdfpages}     \usepackage{listings}     \usepackage{unicode-math}     \usepackage{tikz} %pgf-tikz pakcage          \usetikzlibrary{intersections}     \usetikzlibrary{calc}     \usetikzlibrary{through}                    \setmainfont{XITS}     \setmathfont{XITS Math}               \hypersetup{         colorlinks=true,linkcolor=blue,linktocpage,bookmarksopen=true,         pdfauthor=Name,         pdftitle={Title}     }               \begin{document}         Hello world     \end{document}


title: Scaling a tikzpicture for a Beamer slide

text: I have the following Beamer slide:               \documentclass{beamer}          \usepackage{tikz}     \usetikzlibrary{shapes,arrows}          \tikzstyle{decision} = [diamond, draw, fill=blue!20, text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]     \tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=5em, text centered, rounded corners, minimum height=4em]     \tikzstyle{line} = [draw, -latex    ]     \tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm, minimum height=2em]          \begin{document}          \begin{frame}{Simulated Annealing (SA)}         \begin{center}             \begin{tikzpicture}[node distance = 2cm, auto]                 \node[block]                  (init){Init $n=0$, $T_0$, and $S_0$};                 \node[block, below of=init]   (nbrh){$S_{n+1}=N(S_n)$};                 \node[decision, below of=nbrh](ovgt){$f(S_{n+1}) \le f(S_n)$};                 \node[block, below of=ovgt]   (accp){Accept $S_{n+1}$};                 \node[decision, right of=ovgt](rand){$e^{-\frac{\Delta f}{t_n}}$};                 \node[block, right of=nbrh]   (rejj){Reject $S_{n+1}$};                 \node[block, below of=accp]   (incr){$T_{n+1} = K(T_n)$ and $n++$};                 \node[block, below of=incr]   (stop){Stop};                 \node[decision, left of=stop] (stcd){Stop?};                      \path[line] (init) --          (nbrh);                 \path[line] (nbrh) --          (ovgt);                 \path[line] (ovgt) -- node{yes}(accp);                 \path[line] (ovgt) -- node{no} (rand);                 \path[line] (rand) -- node{no} (rejj);                 \path[line] (rejj) --          (nbrh);                 \path[line] (rand) |- node{yes}(accp);                 \path[line] (accp) -|          (stcd);                 \path[line] (stcd) -- node{yes}(stop);                 \path[line] (stcd) |- node{no} (nbrh);             \end{tikzpicture}         \end{center}     \end{frame}          \end{document}      and I got the code mostly from here. The only problem is that it doesn't fit in the beamer slide. It isn't auto scaled, and it runs way off the bottom. I have tried adding `scale = 0.25` to the `\begin{tikzpicture}[]` but that didn't do anything at all. Is there any way to auto-fit the whole tikzpicture into the available space in my frame? ![enter image description here](http://i.stack.imgur.com/0bPZP.png) Bonus question: Why is Reject S_{n+1} not horizontally aligned with the exponential decision underneath, and as such - why is the arrow connecting them at an angle? (i.e., how is this fixed?)


title: precision in xy axis in tikz

text: I have this code                 \begin{tikzpicture}          \begin{axis}[%     width=\figurewidth,     height=\figureheight,     scale only axis,     xmin=0,     xmax=1.5e-05,     ymin=1.222e-07,     ymax=1.224e-07     ]     \addplot [color=red,line width=4.0pt,only marks,mark=*,mark options={solid},forget plot]       table[row sep=crcr]{     1e-06   1.22231e-07 \\     2e-06   1.22234e-07 \\     3e-06   1.22239e-07 \\     4e-06   1.22246e-07 \\     5e-06   1.22255e-07 \\     6e-06   1.22266e-07 \\     7e-06   1.22279e-07 \\     8e-06   1.22294e-07 \\     9e-06   1.22311e-07 \\     1e-05   1.2233e-07  \\     };     \end{axis}     \end{tikzpicture}%                   \documentclass[12pt]{report}     \usepackage{pgfplots}     \usetikzlibrary{plotmarks}     \begin{document}      I call this in latex.                \documentclass[12pt]{report}     \usepackage{pgfplots}     \usetikzlibrary{plotmarks}     \begin{document}     \begin{figure}[htbp]       \centering        \setlength\figureheight{3in}        \setlength\figurewidth{2.5in}        \input{fit12.tex}       \caption{ Figure}     \label{fig:2}     \end{figure}          \end{document}      I got this ![enter image description here](http://i.stack.imgur.com/5hPnk.png) How can I replace "." with "x" and as you can see in y-axis , the three-sigfig is not enough for precision. How can I change the label precision? It could be great if the labeling can be readjust automatically like in matlab.


title: Insert multiline example in a table environment

text: I would like to put the example in the right cell of a table, and a description on the left. I can't manage to do it though.               \documentclass[12pt]{article}          \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{gb4e}     \usepackage{stmaryrd}     \usepackage{natbib}     \usepackage{qtree}     \usepackage{fixltx2e}          \title{Your Paper}          \author{You}          \date{\today}          \begin{document}     \maketitle          \begin{abstract}     Your abstract.     \end{abstract}          \begin{exe}     \ex \label {basicnolaga}     \gll a b-te c d \\ a.\textsc{nom} v-\textsc{prt} c d \\     \trans `a b c d.'     \end {exe}          \begin{table}[h]     \begin{tabular}{ll}     example above here n three lines & a description     \end{tabular}     \end{table}          \end{document}


title: How to split a frame (of beamer) into 2 parts (minipage) side by side?

text: I would like to split a frame into 2 parts side by side by minipage. But it seems that the following code puts one on top of the other:               \begin{minipage}[t]{0.48\linewidth}     left part     \end{minipage}\hfill     \begin{minipage}[t]{0.48\linewidth}     right part     \end{minipage}      Could anyone tell me how to do that, and if it is correct to set `0.48\linewidth`?


title: When I add a "hat" to a character, I cannot get a gap before the superscript

text: I like how there is a gap between the subscript and the superscript when I write `${w_i}^T$`. However, if I try to put a hat on the vector, like `$\hat{w}_i^T$`, this space goes away. Any ideas? I tried putting in an extra set of braces, as suggested for a similar question here, but it didn't work.


title: supervisor field on the page of the title with Beamer

text: I am editing a presentation of a research project, I am wondering if there is a field for "supervisor" on the page of the title, for instance `\supervisor`(which actually does not work)... If not, where do people conventionally add it?


title: How do I update my TeX distribution?

text: I'm trying to compile a document that only works with an up-to-date distribution, so I'd like to know: **how do I update my distribution?** Please provide screenshots where appropriate. List of answers   * MacTeX (Mac)   * MiKTeX GUI (Windows XP/Vista/7/8)   * MiKTeX Command line (Windows XP/Vista/7/8)   * TeX Live from the Terminal/Command Prompt (Windows/Mac/Linux)   * TeX Live GUI (Windows XP/Vista/7/8)   * TeX Live OpenBSD  To keep an eye on what’s going on at CTAN you may subscribe to the `ctan-ann` list or the RSS feed `feed://www.mail-archive.com/ctan- ann@dante.de/maillist.xml`


title: Installing TikZ and PGF for WinEdt in Windows 7

text: > **Possible Duplicate:**   >  How do I update my TeX distribution? I have tried to follow http://www.texample.net/media/pgf/builds/pgfmanualCVS2012-05-18.pdf to install TikZ and PGF for windows, but failed. I can't really find pgf and xcolor in the udpate manager of MikTex. Is there any installation guide specifically for this that I can follow?


title: Changing to kpfonts

text: I am editing a document in Texmaker and am fairly new to LaTeX. I am using the output PDFLaTeX/view PDF. I added the `kpfonts` package to my document to change the font:               \usepackage{kpfonts}     \usepackage[T1]{fontenc}      and got the following error:               ! LateX Error: File 'kpfonts.sty' not found.      What does this mean?


title: How to install missing packages in texeditor in Windows 7 ultimate

text: I'm trying to include several `.tex` files to a single master file using `subfiles`,. but it seems that the package (`subfiles.sty`) is missing. How do I install it? I'm using texeditor in Windows 7.


title: How can I change the package repository?

text: The package repository shows that the packages can be installed from internet. But I need it to be installed from random package repository. How can I change it Please help me


title: How to install titlesec and secsty packages?

text: > **Possible Duplicate:**   >  How do I update my TeX distribution?   >  How can I change the package repository? Please help me to install packages. When I install the options for random repository package is not shown.


title: lyx url.sty missing

text: New installation of full Lyx package.   Inserted a hyperlink in paper and I am getting the following error. Any solutions suggested, I've tried inserting a couple insert package solutions and none have worked, not sure why lyx isn't finding this file.   ![enter image description here](http://i.stack.imgur.com/VJUe6.png)


title: How do I conveniently install LaTeX packages?

text: I am trying to install a LaTeX package: http://www.ctan.org/tex- archive/macros/latex/contrib/adjustbox How do I efficiently install it? Right now, I am just downloading each file one at a time from the page. Next, I think I have to meticulously place certain files into various folders on my Mac ...


title: Installing new package in TeXstudio

text: How to install a new package in TeXstudio? Spesifically I want to install TikZ package to draw automata.


title: How to install titlesec?

text: I see all the files in titlesec here at ctan: http://www.ctan.org/tex- archive/macros/latex/contrib/titlesec/ I also see a titlesec folder in my texmf-texlive tree. Apparently what happened is that during a fresh installation of texmaker, the installation process cleared out the titlesec.sty and related files. Why it would do such a thing, I do not know. It seems obvious to me that I should just put all the files on the ctan site into the titlesec folder. Do I have to download all those ctan files individually or is there another way?


title: Automatically download missing packages in texstudio

text: I want to use package clipboard through texstudio, but it shows the package doesn't exist on my system. I faintly remember that earlier texstudio used to automatically download required packages. Not sure how it stopped doing it. How can i configure texstudio to do the same? In case I am wrong, and texstudio doesn't have the said feature, can someone let me know how to manually download a package using texstudio. Thanks.


title: TeX Live packages administration, tlmgr don't work on Open Suse

text: I want to know how install and manage packages for TeX Live 2011 on Linux Open Suse; with Windows systems it is possible to manage packages for TeX Live with the Package Manager program included in the MiKTeX installation, but I don't now how to install and manage packages for TeX Live on Linux. I installed TeX Live 2011 with YaST2 Software Management but when I want execute the command `tlmgr` I get the following message:                   dev@dhcppc1:~> tlmgr     If 'tlmgr' is not a typo you can use command-not-found to lookup the package that contains it, like this:         cnf tlmgr      So, how I can manage packages if `tlmgr` is not found or does not work? How I can "reinstall" `tlmgr`? My TeX Live version is: TeX, Version 3.1415926 (TeX Live 2011)   My OS: Open Suse 12.2


title: Problem with beamer documentclass: xcolor.sty not found

text: I am trying to run the following code:               \documentclass[10pt]{beamer}     \mode<beamer>{%     \usetheme[hideothersubsections,     right,width=22mm]{Goettingen}     }     \title{Simple Presentation}     \author[D. Flipo]{Daniel Flipo}     \institute{U.S.T.L. \& GUTenberg}     \titlegraphic{\includegraphics[width=20mm]{USTL}}     \date{2005}     \begin{document}     \begin{frame}<handout:0>     \titlepage     \end{frame}     \section{An Example}     \begin{frame}     \frametitle{Things to do on a Sunday Afternoon}     \begin{block}{One could \ldots}     \begin{itemize}     \item walk the dog\dots \pause     \item read a book\pause     \item confuse a cat\pause     \end{itemize}     \end{block}     and many other things     \end{frame}     \end{document}      but I am getting the following error:               xcolor.sty not found      I have also tried               \usepackage{xcolor}      in the preamble of the document with and without options like `dvips` and `svgnames` but I cannot get rid of the error               xcolor.sty not found      I run the code by pressing 'PDFLaTeX' on LED and am using MiKTeX 2.9 distribution.


title: WinEdt 8.0 Configuration - PDF Viewer

text: When I compile and run my pdf, I get my output like this. How do I rectify this: ![enter image description here](http://i.stack.imgur.com/33ExM.png)


title: Define additional math operators to be typeset in roman

text: Mathematical operators, such as function names, should be set in roman type, not italics. Latex already has commands for some operators, including `\max`, `\min`, and `\log`. How can I define additional such commands?


title: How to represent the trace of a matrix

text: > **Possible Duplicate:**   >  Define additional math operators to be typeset in roman The trace of a matrix is often written as "Tr [matrix] ", but there does not seem to be a naive LaTeX symbol for this. The trace is defined as the sum on the main diagonal.


title: Is there a command for inverse secant (arcsec)?

text: > **Possible Duplicate:**   >  Define additional math operators to be typeset in roman `\arccos`, `\arcsin`, and `\arctan` seem to work, but not `\arcsec`, `\arccot`, `\arccsc`. I'm using the following math packages: `amsmath`,`amssymb`,`amsthm`.


title: How should I write arctanh?

text: > **Possible Duplicate:**   >  Define additional math operators to be typeset in roman If I want to use the function sin in LaTeX, I write `$\sin x$` or `$\sin(x+1)$`. If I want to use the function arctanh, I can't use `$\arctanh x$`:               ! Undefined control sequence.     <argument> ...\ (\cos x)' &= -\sin x \\ (\arctanh                                                        x)' &= \frac {1}{\sqrt {1 ...     l.74 \end{align*}          ?      ! Emergency stop.      **What should I use instead for arctanh?** I thought of `$\text{arctanh} x$`, but this doesn't leave a space after arctanh. Additionally, it seems to be semantically incorrect, as arctanh is not "only" text.


title: Definition of cotan function

text: > **Possible Duplicate:**   >  Define additional math operators to be typeset in roman Is the cotan function defined somewhere? I cannot find it. It is defined as cotan(x)=cos(x)/sin(x). Should it be `\newcommand{\cotan}{\mathrm{cotan}}`? I'm suspecting somewhere a `declareoperator` command or something.


title: How to type hyperbolic secant (sech)?

text: > **Possible Duplicate:**   >  Define additional math operators to be typeset in roman I'm trying to type the `sech` (Hyperbolic Secant) in LaTeX, but when I do use `\sech(z)` it will be known as an "Undefined control sequence". So how should I type it in LaTeX?


title: How to write maths without italics

text: > **Possible Duplicate:**   >  Define additional math operators to be typeset in roman easy question. I am writing some maths and I want to write the epigraph of a function so I type `$epi(\varphi)$` but the `epi` comes out in italics. I want it to come out as `$\log(x)$` would except obviously I cannot use `$\epi$`. How do I do it?


title: Binary Logarithm Function

text: > **Possible Duplicate:**   >  Define additional math operators to be typeset in roman Math mode provides different functions to use in formulas like `\sin`, `\cos`, `\tan` or `\log`. According to Wikipedia, the alternative form of the binary logarithm _log2(n)_ is either written _ld(n)_ (common practice) or _lb(n)_ (ISO standard). LaTeX provides a function `\log` and `\lg`, but no `\ld` or `\lb`. Is this on purpose? Am I missing some package? Or can I achieve the same look (I assume it's just non-cursive text) by creating some custom functions/macros?


title: Avoiding italicization in math mode

text: I want to avoid text being italicized when it's inside dollar signs. For example I want the Gal part of `$Gal(f)$` to show as plain text, without having to write `Gal$(f)$`. How do I do this? Thanks.


title: Generating a table but an error occurs

text: What is the most efficient way of getting the table at http://en.wikipedia.org/wiki/Electrical_resistivity_and_conductivity#Resistivity_of_various_materials into LaTeX syntax? I tried to get it in, and I get the following error:               LaTeX Error: Command \texttimes unavailable in enco     ding OT1.      ...                                                   l.84 Carbon (graphene) & 1×                                 10−8 \\ \hline      The table in question has this syntax:               %Fig xxxxx table of material resistivity     \begin{table}[h]     \centering     \begin{tabular}{|l|l|}     Material                        & $\rho \Omega  \dotsm$ m at 20 \si{\degreeCelsius}                                                    \\ \hline     Carbon (graphene) & 1×10−8 \\ \hline     Silver & 1.59×10−8 \\ \hline     Copper & 1.68×10−8 \\ \hline


title: Tikz:: shift and rotate in 3d?

text: I would like to translate `(Tx,Ty,Tz)` and rotate `(roll,pitch,yaw)` in 3D space an object defined in `scope` similar to the same way we can do in 2D space as below:               \begin{scope}[shift={(7,9)},rotate=30]     % draw some object     \end{scope}      Is there any simple way for 3D rotation and translation?


title: Don't split words in section title

text: > **Possible Duplicate:**   >  How to disable hyphenation in all section and subsection titles?   >  No hyphen for a word How to I tell LaTeX not to split words in section title? For example:               \section{Protokol CAN in ISO/OSI referenčni model}      ... gets printed as "Protokol CAN in ISO/OSI referenčni mo-del". How do I tell him to put last word in new line? Thanks!


title: How to disable hyphenation in all section and subsection titles?

text: Is there a way to disable hyphenation (splitting up a word) in all section and subsection titles (while leaving hyphenation in the main text unchanged)? They look a bit odd to me. Thank you.


title: Difference between {} and \/ for breaking ligatures

text: The Guide to LaTeX (4th ed.) states that `\/` is used to break up ligatures (p. 30 and p. 469), which I thought was standardly done with `{}`. As `\/` is normally known to insert an italic correction (see "How does italic correction work?"), and **`{}` and `\/` yield demonstrably different output, which of the two options is considered best practice**? Are there subtleties to be aware of, for choosing one vs the other? In the following code               \documentclass{article}          \begin{document}          shelfful   % (1) ligature          shelf{}ful % (2) no ligature          shelf\/ful % (3) no ligature, wider than in the line above          \end{document}      the spacing between the two "f" letters is wider in line 3 than in line 2, which is not surprising, but if a hair space is meant, the question is whether one is justified and also whether an italic correction makes sense for this purpose (as this is not actually a situation with italics). * * * **Additional options:** The question linked to by David Carlisle lists other (creative but hacky) options: `{shelf}ful` (identical to `shelf{}ful`, according to that source), `shelf{\kern0pt}ful`, `shelf\\-ful`, and `shelf\discretionary{-}{}{\kern.033333em}ful` (the `babel` solution `"|` essentially combines this approach with some fine-tuning). This question was meant to differentiate just between the two recommendations which one is likely to encounter (namely `{}` and `\/`), to help unconfuse the learner. In any case, it seems like neither is optimal, with the best solution being `babel`'s `"|`. This question-answer set serves as documentation for this whole situation.


title: Sharing an "Unavailable" layout

text: I am writing a document, on which I work on several computers, and also with a colleague. The document uses a certain article layout that by default is unavailable on LyX. The LyX wiki page says that, in order to make it available, I have to do a certain system-specific installation (download relevant files, put them in OS- specific folders, etc.). However, this means that me and my colleague have to do the same installation procedure on every computer, which is very time- consuming. Is there a better way to use an "unavailable" layout, that does not require system-specific installation? For example, is it possible to bundle all required files with my LyX file, so that I can send them to my colleague, and he puts them on the same folder, and it just works, with no installation?


title: Set up MacTex distribution as default on mac os

text: I have installed the MacTex distribution on OSX10 and until now I've been using the TexShop editor quite successfully. I want to change and start writing latex using the Vim editor but I haven't nearly enough latex packages installed on the mac. Instead of having to download each package seperately using macports, **how do I set up vim to use the full latex distribution of MacTex** ?


title: What else do I need to produce two dots above o?

text: In tex file:                 Toks\"{o}z      It produces ![enter image description here](http://i.stack.imgur.com/oDAtF.png)


title: alignment problem with multicolumn in table (with dcolumn)

text: According to this question One header for all subtables: Correct arranging of Columns I am creating a table. Everything works fine except of two things: 1) When I use multicolumn over multiple columns the alignment is not in line anymore. 2) I put table notes on top of the table as well as below the table. For the table notes on top there is a huge gap to the caption of the table. Moreover, when I add $-$ to the numeric value, there is an error. I solved this by marking that as a "whole package": \mc{$-$123456}               %General Layout     \documentclass[a4paper, 12pt]{article}     \usepackage[left=3cm, right=2cm, top=2cm, bottom=3cm]{geometry}     %Mathematics     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{textgreek}     \usepackage{rotating}     \usepackage{tikz}     \usepackage[outdir=./]{epstopdf}     \usepackage{graphicx}     \usepackage{float}     \usepackage{multirow}     \usepackage{longtable}     \usepackage{booktabs}     \usepackage{tabulary}     \usepackage{tabularx}     \usepackage{threeparttable}          \usepackage[labelsep=newline,% line break after label        justification=raggedright,        singlelinecheck=off,        font=sc]{caption}          \usepackage{subcaption}     \usepackage{siunitx}     \usepackage{etoolbox}     \robustify\bfseries      \sisetup{detect-weight=true,detect-inline-weight=math}     \usepackage{fancybox}     \usepackage{array}     \usepackage{dcolumn}     \newcolumntype{d}[1]{D{.}{.}{#1}}     \newcommand\mc[1]{\multicolumn{1}{c}{#1}}     \usepackage{colortbl}     %%%%%%%%%% Journal of Finance requirements %%%%%%%%%%     \renewcommand{\thesection}{\Roman{section}}      \renewcommand{\thesubsection}{\Alph{subsection}}      \renewcommand{\thetable}{\Roman{table}}      \renewcommand{\abstractname}{\textsc{ABSTRACT}}     \makeatletter     % we need a period (.) after sectioning numbers, but not in cites thereto.     \renewcommand{\@seccntformat}[1]{{\csname the#1\endcsname}.\hspace{0.5em}}          \long\def\@makefigcaption#1#2{%      \vskip\abovecaptionskip      %#1\\\footnotesize#2      %\sbox\@tempboxa{\footnotesize\bf#1.\footnotesize#2}%      %\sbox\@tempboxa{\footnotesize{\textbf{#1.}} footnotesize#2}%      %\sbox\@tempboxa{\textbf{#1.} footnotesize#2}%      %\sbox\@tempboxa      \footnotesize\textbf{#1.} \footnotesize#2      \ifdim \wd\@tempboxa >\hsize      \textbf{#1.} #2\par      \else       \global \@minipagefalse       \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%      \fi      \vskip\belowcaptionskip}           \renewcommand{\figure}{\let\@makecaption\@makefigcaption\@float{figure}}          \long\def\@maketblcaption#1#2{%      \vskip\abovecaptionskip      \begin{center}\small\bf#1\\\normalsize#2\end{center}     % \sbox\@tempboxa{\textbf{#1.} #2}%     % \global \@minipagefalse     % \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%      \vskip\belowcaptionskip}           \renewcommand{\table}{\let\@makecaption\@maketblcaption\@float{table}}     %\renewcommand{\sidewaystable}{\let\@makecaption\@maketblcaption\@float{sidewaystable}}          \makeatother          %%%%%%%%%% End: Journal of Finance requirements %%%%%%%%%%          \begin{table}[htp!]     \caption{Regression of [0,50] Buy-and-Hold Equity Return on Adjusted DSUE}     \footnotesize     \begin{threeparttable}     \begin{tablenotes}[flushleft]\singlespacing     \setlength\labelsep{0pt}     \item M subtable-specific headnote \\     \end{tablenotes}     \begin{tabular*}{\textwidth}%       { @{\extracolsep{\fill}} l *{6}{d{2.3}} @{} }     \toprule     & \multicolumn{2}{c}{\hphantom{$-$}(1) DSUE1$\hphantom{^{***}}$} & \multicolumn{2}{c}{\hphantom{$-$}(2) DSUE2$\hphantom{^{***}}$} & \multicolumn{2}{c}{\hphantom{$-$}(3) DSUE3$\hphantom{^{***}}$} \\     \cmidrule{2-3} \cmidrule{4-5} \cmidrule{6-7}     Variables & \mc{\hphantom{$-$}Estimate$\hphantom{^{***}}$} & \mc{\hphantom{$-$}t$-$Value$\hphantom{^{**}}$} & \mc{\hphantom{$-$}Estimate$\hphantom{^{***}}$} & \mc{\hphantom{$-$}t$-$Value$\hphantom{^{**}}$} & \mc{\hphantom{$-$}Estimate$\hphantom{^{***}}$} & \mc{\hphantom{$-$}t$-$Value$\hphantom{^{**}}$} \\ [0.5ex]     \midrule     \multicolumn{7}{l}{\textbf{Panel A:} [0, 50] Buy-and-Hold CDS Return (in \%)} \\ [0.5ex]     Intercept & \mc{$-$0.14$^{***}$} & \mc{$-$2.86$\hphantom{^{**}}$} & \mc{$-$0.14$^{***}$} & \mc{$-$2.64$\hphantom{^{**}}$} & \mc{$-$0.14$^{***}$} & \mc{$-$2.85$\hphantom{^{**}}$} \\     DSUE & \mc{\hphantom{$-$}0.09$\hphantom{^{***}}$} & \mc{\hphantom{$-$}1.42$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.09$\hphantom{^{***}}$} & \mc{\hphantom{$-$}1.30$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.14$^{*}\hphantom{^{**}}$} & \mc{\hphantom{$-$}1.66$\hphantom{^{**}}$} \\     BHAR & \mc{$-$3.56$^{***}$} & \mc{$-$5.94$\hphantom{^{**}}$} & \mc{$-$3.45$^{***}$} & \mc{$-$5.76$\hphantom{^{**}}$} & \mc{$-$3.53$^{***}$} & \mc{$-$5.59$\hphantom{^{**}}$} \\     $\Delta$VOLA & \mc{\hphantom{$-$}7.45$\hphantom{^{***}}$} & \mc{\hphantom{$-$}0.39$\hphantom{^{**}}$} & \mc{\hphantom{$-$}10.99$\hphantom{^{***}}$} & \mc{\hphantom{$-$}0.55$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.55$\hphantom{^{***}}$} & \mc{\hphantom{$-$}0.04$\hphantom{^{**}}$} \\     $\Delta$LEVERAGE & \mc{\hphantom{$-$}0.86$\hphantom{^{***}}$} & \mc{\hphantom{$-$}1.52$\hphantom{^{**}}$} & \mc{\hphantom{$-$}1.04$\hphantom{^{***}}$} & \mc{\hphantom{$-$}1.64$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.97$\hphantom{^{***}}$} & \mc{\hphantom{$-$}1.40$\hphantom{^{**}}$} \\     UPGRADE & \mc{\hphantom{$-$}0.05$\hphantom{^{***}}$} & \mc{\hphantom{$-$}1.04$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.04$\hphantom{^{***}}$} & \mc{\hphantom{$-$}0.91$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.06$\hphantom{^{***}}$} & \mc{\hphantom{$-$}1.07$\hphantom{^{**}}$} \\     DOWNGRADE & \mc{\hphantom{$-$}0.04$\hphantom{^{***}}$} & \mc{\hphantom{$-$}0.73$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.03$\hphantom{^{***}}$} & \mc{\hphantom{$-$}0.71$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.02$\hphantom{^{***}}$} & \mc{\hphantom{$-$}0.40$\hphantom{^{**}}$} \\     $\Delta$SPOT & \mc{$-$32.44$^{***}$} & \mc{$-$3.99$\hphantom{^{**}}$} & \mc{$-$32.74$^{***}$} & \mc{$-$4.03$\hphantom{^{**}}$} & \mc{$-$31.92$^{***}$} & \mc{$-$3.64$\hphantom{^{**}}$} \\     $\Delta$SLOPE & \mc{$-$1.87$\hphantom{^{***}}$} & \mc{$-$0.19$\hphantom{^{**}}$} & \mc{$-$2.72$\hphantom{^{***}}$} & \mc{$-$0.29$\hphantom{^{**}}$} & \mc{$-$4.59$\hphantom{^{***}}$} & \mc{$-$0.44$\hphantom{^{**}}$} \\     Time dummies & \mc{\hphantom{$-$}Yes$\hphantom{^{***}}$} &  & \mc{\hphantom{$-$}Yes$\hphantom{^{***}}$} &  & \mc{\hphantom{$-$}Yes$\hphantom{^{***}}$} &  \\     N & \mc{\hphantom{$-$}9,814$\hphantom{^{***}}$} &  & \mc{\hphantom{$-$}9,821$\hphantom{^{***}}$} &  & \mc{\hphantom{$-$}8,896$\hphantom{^{***}}$} &  \\     Adj. R$^{2}$ & \mc{\hphantom{$-$}0.168$\hphantom{^{***}}$} &  & \mc{\hphantom{$-$}0.160$\hphantom{^{***}}$} &  & \mc{\hphantom{$-$}0.161$\hphantom{^{***}}$} & \\ [0.5ex]     \midrule     \multicolumn{7}{l}{\textbf{Panel B: [0, 50]} Buy-and-Hold Equity Return } \\ [0.5ex]     Intercept & \mc{\hphantom{$-$}0.0069$\hphantom{^{***}}$} & \mc{\hphantom{$-$}1.39$\hphantom{^{**}}$}      & \mc{\hphantom{$-$}0.0060$\hphantom{^{***}}$} & \mc{\hphantom{$-$}1.23$\hphantom{^{**}}$} & \mc{$-$0.0011$\hphantom{^{***}}$} & \mc{{$-$}0.20$\hphantom{^{**}}$}\\     DSUE & \mc{\hphantom{$-$}0.0279$^{***}$} & \mc{\hphantom{$-$}5.39$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.0289$^{***}$} & \mc{\hphantom{$-$}6.21$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.0600$^{***}$} & \mc{\hphantom{$-$}11.81$\hphantom{^{***}}$} \\     Time Dummies & \mc{\hphantom{$-$}Yes$\hphantom{^{***}}$} & &  \mc{\hphantom{$-$}Yes$\hphantom{^{***}}$} & & \mc{\hphantom{$-$}Yes$\hphantom{^{***}}$} \\      N & \mc{\hphantom{$-$}13,347$\hphantom{^{***}}$} & & \mc{\hphantom{$-$}13,365$\hphantom{^{***}}$} & & \mc{\hphantom{$-$}12,048$\hphantom{^{***}}$} \\     Adj. R-squared & \mc{\hphantom{$-$}0.0182$\hphantom{^{***}}$} & &  \mc{\hphantom{$-$}0.0182$\hphantom{^{***}}$} & & \mc{\hphantom{$-$}0.0334$\hphantom{^{***}}$} \\ [1ex]     \bottomrule     \end{tabular*}     \begin{tablenotes}     \item[a] A subtable-specific footnote          \end{tablenotes}          \end{threeparttable}          \end{table}     \end{document}      thank you very much.


title: xkeyval's \presetkeys

text: Please is there a way to avoid _xkeyval_ package bombing out in endless loop, as implied by the following simplified case?               \documentclass{article}     \usepackage{xkeyval}     \makeatletter     \define@key{fam}{key1}[key1-def]{\def\x##1{#1*##1}}     \define@cmdkey{fam}[store@]{key2}[key2-def]{\setkeys{fam}{key1=#1}}     %\define@key{fam}{key3}[key3-def]{\def\keyvalue{#1}}     \presetkeys{fam}{key2=val2}{}     \setkeys{fam}{key1}     \makeatother          \begin{document}     x     \end{document}      I get "If you really absolutely need more capacity, you can ask a wizard to enlarge me."


title: Unwanted tabulation in Kile editor after pressing Return

text: I'm using Kile to edit LaTeX code. When I press Return to get a new line, Kile does create a new line but automatically adds a tabulation (an indentation) at the beginning of the new line. This happens regardless of whethere there are trailing spaces after the cursor when I press Return. This is quite annoying (especially when I paste things, it adds additional tabs, and I end up with a pyramid of indents...) I have tried to change the indentation mode to "None" (and other values e.g. Python) to no avail. Any suggestions on the options I should look at? I tried a lot of them, but I'm not sure which one is the correct one. (Or could it be a bug?)


title: Special characters

text: I'm using XeLaTeX to compile my document. If I write in my document `\---` I don't get `—`, but `\---` in my PDF document. Same for `–` (`\--`) character. I'm sure that font which I'm using have this character (Myriad Pro). Are there other ways to get this characters working?If copy&paste this character, it works then. But never when using `\--` or `\---` shortcuts.


title: Plot magnification using sub-plot within a plot!

text: How can I produce such kind of zooming shown in the figure? Here the selected portion is plotted again with new axis displaying more details than just magnifying the portion. One solution is to generate separate axis in a node and plot the selected portion again like what is mentioned in http://tex.stackexchange.com/a/42591/24167. However, this method needs inputting the plot points again for the new axis which might not be straightforward and if the whole chunk of the data is copied and pasted the tikz file size may significantly increase when plotting the data point by point. Using `tikz spy` the portion is magnified, line widths increase and no plot details added. I would like to re-plot the selection so I can get more waveform details in the magnified area. Is there any code/package available with similar and easy usage as `tikz spy` to produce these kind of zooming? ![enter image description here](http://i.stack.imgur.com/g04Pg.png) **EDIT:** MWE:               \documentclass[]{article}          \usepackage{pgfplots}     \pgfplotsset{width=10cm,compat=newest}     \usepgfplotslibrary{units}     \usetikzlibrary{spy,backgrounds}     \usepackage{pgfplotstable}     \begin{document}               \begin{tikzpicture}          \begin{axis}     \addplot [     color=blue,     solid,     forget plot     ]     coordinates {(1,-0.483783330986617)(2,-0.0340145593918096)(3,-0.436539522180039)(4,0.209777110368882)(5,0.859135420044728)(6,0.85161903717295)(7,1.55934912950599)(8,0.784047156239403)(9,-0.0792693910524122)(10,1.51723070777856)(11,1.40411965889846)(12,0.698986700228326)(13,1.05260397767063)(14,1.29723031913342)(15,1.15137784963834)(16,1.27812037219483)(17,0.946578586782951)(18,0.958318150506974)(19,0.981535539332581)(20,0.593435037539142)(21,1.43239361416853)(22,0.811029077471436)(23,1.02029755131029)(24,0.333489727091801)(25,0.168378017112723)(26,0.479114471344012)(27,0.326271147058235)(28,0.812917677609558)(29,0.481674812959686)(30,0.357325779724704)(31,-0.536395105252668)(32,-0.445451666510484)(33,-0.0769251588562435)(34,-0.394692291260873)(35,0.165251968372529)(36,0.0939410842571161)(37,-0.76215521666867)(38,-0.261803650146044)(39,-0.129586204410865)(40,-0.62840840652669)(41,-0.168924127696477)(42,-0.446602448770101)(43,-0.83052384153562)(44,-0.600880793103123)(45,-0.899767313148666)(46,-1.15964786754054)(47,-0.856539763806029)(48,-0.981675541618192)(49,-1.12830507985998)(50,-0.25051644785583)(51,-0.837305455241527)(52,0.208696378227061)(53,-0.950733595562766)(54,-0.54704626678199)(55,-0.0724920603515025)(56,0.46042541141183)(57,-0.42925983026122)(58,-0.78070557085291)(59,-0.0525245718275866)(60,-0.807376579142401)(61,-0.291700808122719)(62,0.0256573658235369)(63,0.612635303598783)(64,0.691405814766423)(65,0.204095429463616)(66,0.681113889563989)(67,0.276337752630281)(68,0.758563305598775)(69,1.34455733980387)(70,0.719690442645654)(71,0.608754456948268)(72,0.593653952861215)(73,1.13702517285714)(74,1.43362358662853)(75,1.78827195551751)(76,0.989537985806528)(77,1.05338260108987)(78,0.745460649186608)(79,1.64373793892591)(80,0.959178756948547)(81,0.780594953512541)(82,1.81442687142266)(83,1.22612427626548)(84,1.14113602979919)(85,0.396258658838045)(86,0.907991743167006)(87,0.871026667132155)(88,0.148019385955106)(89,0.410703075736867)(90,0.250149774622082)(91,0.530242048517334)(92,-0.179895231545825)(93,0.560065131748798)(94,0.738725310101912)(95,-0.196652928509654)(96,-0.177805433820475)(97,-0.069106615796877)(98,0.114821666222169)(99,-0.24872880189583)(100,-0.38520267397054)          };     \coordinate (pt) at (axis cs:30,0.7);     \end{axis}               \node[pin=10:{%         \begin{tikzpicture}[trim axis left,trim axis right]         \begin{axis}[           xmin=27,xmax=30,           ymin=0.6,ymax=0.7,           line join=round,           enlargelimits,width = 4cm         ]     \addplot [     color=blue,     solid,     forget plot     ]     coordinates{      (1,-0.483783330986617)(2,-0.0340145593918096)(3,-0.436539522180039)(4,0.209777110368882)(5,0.859135420044728)(6,0.85161903717295)(7,1.55934912950599)(8,0.784047156239403)(9,-0.0792693910524122)(10,1.51723070777856)(11,1.40411965889846)(12,0.698986700228326)(13,1.05260397767063)(14,1.29723031913342)(15,1.15137784963834)(16,1.27812037219483)(17,0.946578586782951)(18,0.958318150506974)(19,0.981535539332581)(20,0.593435037539142)(21,1.43239361416853)(22,0.811029077471436)(23,1.02029755131029)(24,0.333489727091801)(25,0.168378017112723)(26,0.479114471344012)(27,0.326271147058235)(28,0.812917677609558)(29,0.481674812959686)(30,0.357325779724704)(31,-0.536395105252668)(32,-0.445451666510484)(33,-0.0769251588562435)(34,-0.394692291260873)(35,0.165251968372529)(36,0.0939410842571161)(37,-0.76215521666867)(38,-0.261803650146044)(39,-0.129586204410865)(40,-0.62840840652669)(41,-0.168924127696477)(42,-0.446602448770101)(43,-0.83052384153562)(44,-0.600880793103123)(45,-0.899767313148666)(46,-1.15964786754054)(47,-0.856539763806029)(48,-0.981675541618192)(49,-1.12830507985998)(50,-0.25051644785583)(51,-0.837305455241527)(52,0.208696378227061)(53,-0.950733595562766)(54,-0.54704626678199)(55,-0.0724920603515025)(56,0.46042541141183)(57,-0.42925983026122)(58,-0.78070557085291)(59,-0.0525245718275866)(60,-0.807376579142401)(61,-0.291700808122719)(62,0.0256573658235369)(63,0.612635303598783)(64,0.691405814766423)(65,0.204095429463616)(66,0.681113889563989)(67,0.276337752630281)(68,0.758563305598775)(69,1.34455733980387)(70,0.719690442645654)(71,0.608754456948268)(72,0.593653952861215)(73,1.13702517285714)(74,1.43362358662853)(75,1.78827195551751)(76,0.989537985806528)(77,1.05338260108987)(78,0.745460649186608)(79,1.64373793892591)(80,0.959178756948547)(81,0.780594953512541)(82,1.81442687142266)(83,1.22612427626548)(84,1.14113602979919)(85,0.396258658838045)(86,0.907991743167006)(87,0.871026667132155)(88,0.148019385955106)(89,0.410703075736867)(90,0.250149774622082)(91,0.530242048517334)(92,-0.179895231545825)(93,0.560065131748798)(94,0.738725310101912)(95,-0.196652928509654)(96,-0.177805433820475)(97,-0.069106615796877)(98,0.114821666222169)(99,-0.24872880189583)(100,-0.38520267397054)       };           \end{axis}         \end{tikzpicture}%     }] at (pt) {};     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/nw7je.png)


title: How to draw container box in TikZ? How to get it with rounded corner?

text: I want to draw something like this: ![enter image description here](http://i.stack.imgur.com/72CGx.jpg) This is what I am able to draw: ![enter image description here](http://i.stack.imgur.com/nVdgU.png) This is my TikZ code:               \documentclass{article}     \usepackage{verbatim}     \usepackage[active,tightpage,floats]{preview}     \setlength\PreviewBorder{30pt}%     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          \begin{figure}[ht]       \centering       \begin{tikzpicture}         \coordinate (Origin)   at (0,0);         \coordinate (XAxisMin) at (0,0);         \coordinate (XAxisMax) at (5.5,0);         \coordinate (YAxisMin) at (0,0);         \coordinate (YAxisMax) at (0,4.5);         \draw [thick, gray,-latex] (XAxisMin) -- (XAxisMax);% Draw x axis         \draw [thin, gray,-latex] (YAxisMin) -- (YAxisMax);% Draw y axis                   \foreach \x in {1,2,...,10}{% Two indices running over each           \foreach \y in {1,2,...,8}{% node on the grid we have drawn              \node[thick,draw,circle,inner sep=2pt,fill=gray!60] at (0.5*\x,0.5*\y) {};                 % Places a dot at those points           }         }            \end{tikzpicture}       \caption{Single tile of computation (highlighted)}       \label{figure:single}     \end{figure}     \end{document}


title: bold square root with bm

text: I use the `bm` package. This is the expression I use:               \bm{A=\sqrt{B^2+C^2}}      My letters are bold as expected, but the square root is thinner and more ugly than without `\bm`. Everything looks fine when using               \bm{A=\sqrt{C}}      So I guess it has something to do with space. Does somebody know how to fix this?


title: How to fix longtable in right margin

text: Hello I tried some solutions proposed in other similar questions but I didn't get any solution, my problem is that the longtable don't fix as I want.                \documentclass[12pt]{article}         \usepackage{longtable}         \usepackage{multirow}         \usepackage{lscape}         \usepackage{pbox}              \begin{document}         \begin{center}         \setlength{\tabcolsep}{2pt}         \small      \begin{longtable}{p{3cm}p{3cm}p{5.5cm}}      \hline \multicolumn{1}{l}{ \textbf{Clase:} Controller}  \\      \hline \multicolumn{3}{l}{\textbf{Descripci\'{o}n de la clase:} Esta clase ser\'{a} la encargada de realizar la comunicaci\'{o}n con Condor, estableciendo una conexi\'{o}n con el servicio web. Contiene m\'{e}todos para el establecimiento de la conexi\'{o}n, creaci\'{o}n de trabajos u obtenci\'{o}n de informaci\'{o}n del cl\'{u}ster.}\\        \hline \multicolumn{3}{l}{\textbf{Datos} }\\       \hline transacionTime & Integer & Esta variable es utilizada para determinar el tiempo de transacci\'{o}n utilizado en la llamada por pasos a las funciones del webservice Condor\\      \hline  collectorUrl &  String & Almacena la direcci\'{o}n del servidor web de Condor y el puerto del collector.\\      \hline  scheddUrl & String  & Almacena la direcci\'{o}n del servidor web de Condor y el puerto del schedd.\\      \hline  collector & Client & Es el cliente para la comunicaci\'{o}n con el collector de Condor, con \'{e}l se realizar\'{a}n las llamadas a las funciones que ofrezca dicho collector.\\      \hline  schedd & Client  & Es el cliente para la comunicaci\'{o}n con el schedd de Condor, con \'{e}l se realizar\'{a}n las llamadas a las funciones que ofrezca dicho schedd.\\      \hline  \multicolumn{3}{l}{ \textbf{Clase: M\'{e}todos}}  \\      \hline  constructor &  tipo\_metodo & descripci\'{o}n del m\'{e}todo\\      \hline  createJob &  Job & Esta funci\'{o}n crea y devuelve un objeto de la clase Job configurado mediante los argumentos estabecidos en la funci\'{o}n.\\      \hline  closeSpool &  void & Cierra el spool de un proceso, y todos los archivos contenidos dentro del mismo son eliminados.\\      \hline  listSpool &  List & devuelve una lista con todos los archivos que se encuentran en el spool de un proceso dado.\\      \hline  jobStatus &  Integer & Consulta a Condor el estado en el que se encuentra un proceso. En el manual de c\'{o}digo se especifica cuales son los estados en los que se puede encontrar un proceso.\\      \hline  retrieveFiles &  void & Recupera y guarda e la carpeta asignada todos los archivos que se encuentran dentro del spool perteneciente a un proceso.\\      \hline  getJob & ClassAd & Devuelve en forma de ClassAdd un proceso que se encuentra actualmente en el cl\'{u}ster.\\      \hline  getPlatform &  String & Devuelve mediante un String la plataforma sobre la que se est\'{a} ejecutando Condor\\      \hline  getVersion &  String & Devuelve en forma de String la versi\'{o}n de Condor.\\      \hline  getMachines &  List & Devuelve una lista con todas las m\'{a}quinas que est\'{a}n conectadas actualmente en el cl\'{u}ster.\\      \hline           \caption[Ejemplo de especifiaci\'{o}n de clases]{Ejemplo de especifiaci\'{o}n de clases}      \label{tab:especificacion_clase_controller}           \end{longtable}         \end{center}         \end{document}      here the result: ![enter image description here](http://i.stack.imgur.com/h7yTS.jpg)


title: How to separate the CV and cover letter in moderncv?

text: I am using the moderncv template to create both a _CV_ and a _cover letter_. The resulting document contains the _CV_ and the _cover letter_ **concatenated** and with the **same page numbering**. Is there some easy way to render these two documents **separate** with separate **numbering**?


title: flip book in master thesis

text: I am right now writing my master thesis in computer science about a visualization topic. Since the core stuff of my thesis is a complex 3D visualization that only quite sends its message through user interaction (click/drag/turn to view from different angles), my only option to get this message across on paper would be a bunch of screenshots. 30 screenshots side by side or spread across a couple of pages _should_ be ok, but I thought it'd be rather nice to have some kind of flipbook where the screenshots are in a specific spot spread on consecutive pages. Is this a good idea at all? For now this is what I am using:               \usepackage[automark]{scrpage2}     \ofoot[\pagemark]{\pagemark}      since there are less screenshots than pages of my thesis I would start these on some specific page in the middle of the thesis (is that even a good idea, I'm starting to doubt this whole thing...) like this:               \cfoot[{     \IfFileExists{pics/s\thepage.png}{     \raisebox{-40mm}{\includegraphics[trim = 40mm 40mm 40mm 40mm,clip,height=40mm]{s\thepage.png}}}{\raisebox{-40mm}     {}}     }]{     \IfFileExists{pics/s\thepage.png}{         \raisebox{-40mm}{\includegraphics[trim = 40mm 40mm 40mm 40mm,clip,height=40mm]{s\thepage.png}}}{\raisebox{-40mm}     {}}      So as you see I was putting the screenshots in the footer, which is also not ideal ( ideal would probably be an area on the lower right of the page where the screenshots would go and the text would wrap around, but I don't know how to do that). So with this in place I can not really control the footer. the `\pagemark` jumps lower or highter when the pages start with the screenshots in the footer compared to those without screenshots, and also the sceenshots will end up very close to the text - I'd like to see a larger space there but I can't control the footer height. What to do? I'm thankful for every input, also for people telling me: "don't do this!" ( or the contrary) EDIT: just so you know what I'm talking about: ![grain interface](http://i.stack.imgur.com/TfSYg.jpg) These are microstructures. The thick brownish/pink lines represent grains in copper. the greyish thing in the middle is the separating interface between the two grains. The thinner lines form a grid representing the crystal orientations. This output is quite customizable, I could change colors, switch of either grid, change the grid density and obviously change the view. I was just now thinking of including for each grid one set of 3 thick Arrows that the eye could make out easier on paper. I'll probably do this. Also, I'll probably not go this way of doing the flipbook somewhere in the footer or margin, but actually put just a few of these shots consecutively as figures in the appendix.


title: A MiKTeX update removed amsmath as obsolete – can I use another package or get it back?

text: I have a problem with `amsmath` package. After an update this package was removed because it was obsolete. But what package can use instead of `amsmath`?


title: Could not compile pdf after updated

text: I have updated my MiKTeX to 2.9. But unfortunately it cannot compile pdf file by either PdfLaTeX and XeLaTeX. When use XeLaTeX it lag at the begining, and for PdfLaTeX it returns errors:               Command Line:   D:\CTEX\MiKTeX\miktex\bin\x64\latex.exe --src --interaction=errorstopmode --synctex=-1 "asd.tex"     Startup Folder: E:\temp\exersice          This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)     entering extended mode     (E:\temp\exersice\asd.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, ... loaded.     (D:\CTEX\MiKTeX\tex\latex\base\article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (D:\CTEX\MiKTeX\tex\latex\base\size10.clo))latex.exe: GUI framework cannot be initialized.          LaTeX failed to create a dvi file.     For possible explanations start the command from the Command Prompt...      My article is               \documentclass{article}          \usepackage{amsmath}          \begin{document}      $$\mathfrak{A}$$     \end{document}      It is sound. So I think there must be some thing wrong with the config but I cannot find any.


title: amsthm and amssymb disappeared after updating?

text: I had recently updated my MikTeX 2.9, but after I did that, two packages - `amsthm` and `amssymb` - disappeared. My editor outputs an error whenever I call them, and I can't find them in the package manager. Any idea on how this happened? Can I download `amsthm.sty` and `amssymb.sty` from anywhere else? EDIT: It turns out that `amsthm` and `amssymb` are part of the `amscls` package - so installing that package off of the package manager did the trick.


title: Two column? list with arrows between items

text: How would one achieve a list of two columns like this one: ![enter image description here](http://i.stack.imgur.com/lPLps.png) I only want list bullets on the left side, so in fact if each entry is a single item that's fine. Items never span multiple lines. I've tried using an align block and two-column lists, but I'm not getting anywhere.


title: Citing a range of papers (using numeric keys)?

text: Is there a way so that, when I cite a range of papers, the output is a range of numbers, instead of a list of numbers? In other words, when I type               ... some dummy text here is due to me \cite{me1, me2, me3, me4} ...      I want the output to be > ... some dummy text here is due to me [3-6] ... instead of > ... some dummy text here is due to me [3.4.5.6] ... (I use LaTeX, and am currently using the `amsart` class and whatever it includes. But I am open to other suggestions.)


title: On using \cite or something else to group successive references together

text: > **Possible Duplicate:**   >  Citing a range of papers (using numeric keys)? Quick question. Let's say I have five references to cite which are A to E. Currently, I'm using `\cite{A,B,C,D,E}` which produces > [1,2,3,8,11] How do I modify it so that it produces the output of > [1-3,8,11] or at least it groups the consecutive references together so as not to have a very long output format? I hope this is possible.


title: Cite multiple references with Bibtex?

text: So I use bibtex and I have set my `\bibliographystyle` to be unsrt. I want Latex to render something like this: **ref [1]-[5] support this claim.** but if i write:               \cite{x1} - \cite{x5} blah blah      citation items 2, 3 and 4 are not gonna be listed in the bibliography list in the end, whereas I want them to be present. How can I do it?


title: How to display citations in text grouped as [1-3] in stead of [1,2,3]

text: > **Possible Duplicate:**   >  Citing a range of papers (using numeric keys)? In Latex I am using BibTex for the bibliography and use `\bibliographystyle{unsrt}` to manage my references. When I use multiple references i.e. `\cite{article1,article2,article3}` I would love to see this appear in the text as:               blah blah [1-3] blah blah      instead I get:               blah blah [1, 2, 3] blah blah      I use the format of `\bibliographystyle{unsrt}` because it numbers the references in the order they appear and would like to keep this feature but I could be flexible on which style I use.


title: How to change the reference appearance in paper and after paper?

text: A journal editor asked me to change my reference format in my paper. For example, in my paper, reference numbers appear as `[10, 8, 11, 1, 13, 16]`, and he wants it to be `[1, 8, 10-11, 13, 16]`, how do I change that? Also, he has specific format request for papers listed in the references session. According to his request, in the reference titles it should be like this: Comma after last author (not a period), do not put the word "in" in front of the journal title or proceedings titles, for conferences do not italicize, then where it took place, page numbers, the last is to be the year. So my original reference               E. Achtert, C. Bohm, P. Kroger, P. Kunath, A. Pryakhin, and M. Renz.      Efficient reverse k-nearest neighbor search in arbitrary metric spaces. In      SIGMOD ’06, pages 515–526, New York, NY, USA, 2006. ACM      should be               E. Achtert, C. Bohm, P. Kroger, P. Kunath, A. Pryakhin, and M. Renz, "Efficient      Reverse k-Nearest Neighbor Search in Arbitrary Metric Spaces,"  SIGMOD '06,      ACM, New York, NY, USA, pp. 515-526, 2006.      How do I change that?


title: How do I cite range of references?

text: I have to cite in LaTeX a range of sources (I'm using Miktex 2.9, TexnicCenter and Bibtex), all together. If I write               ... in 1990 \cite{ref1,ref2,ref3,ref4,ref5}      I would like to get "... in 1990 [1-5]", but actually I get "... in 1990 [1,2,3,4,5]". Any suggestion? Thank you


title: Hyphenate a series of consecutively numbered references

text: > **Possible Duplicate:**   >  Citing a range of papers (using numeric keys)? I am using the package `bibentry` and the `\cite` command to include numerical references to a bibliography. If one cites multiple consecutive references, the series is displayed as a comma separated list (e.g., [1, 2, 3, 4, 5, 6, 7, 8]). Is it possible to have such a list displayed using only the first and last references in the series, separated by a hyphen or en-dash (e.g., [1-- 8])? Preferably, this method would also work with lists that comprise consecutive and non-consecutive elements (e.g, [1, 3, 4, 5] would become [1, 3 --5]). Here is an MWE demonstrating inability to hyphenate a series of references with `bibentry`: ![enter image description here](http://i.stack.imgur.com/SO9yE.png)                   \documentclass{article}         \usepackage{bibentry}         \begin{document}         Accumulating evidence indicates that the Earth is round~\cite{ref1,ref2,ref3}.         \bibliographystyle{unsrt}         \bibliography{refs}         \end{document}      The `bibentry` source files are included in the natbib package, but it is not mentioned in the pdf documentation files.


title: How can I write a group of reference briefly? ([1, 2, 3, 4, 5] change to [1-5] but show the all refer on reference)

text: > **Possible Duplicate:**   >  Citing a range of papers (using numeric keys)? When we are writing a article we should `[1, 2, 3, 4, 5]` change to `[1-5]` but show the all refer on reference. How can I do this? In addition, I use a `MyReferences.bib` file and below code                \pagestyle{empty}     {     \onehalfspacing     \bibliographystyle{unsrt-fa}     \bibliography{MyReferences}     }      It is very important that write all refer on reference (at the end of article).


title: How to install MathTime Pro 2 fonts on MikTeX

text: I have been trying for a long time now to install the MathTime Professional II (mtpro2) fonts on my system. (I am running MikTeX 2.9 under Windows 7, but what likely matters is "recent MikTeX, under Windows", which is general enough to be of interest to many people.) I've tried various things:   1. First step:      * Merging the "texmf" directory structure into my MikTeX root directory ("C:\Program Files\MiKTeX 2.9") _or_     * registering a new root directory ("C:\Local TeX Files") and        * putting `mtpro2`'s "texmf" directory directly in there _or_       * putting the subdirectories of `mtpro2`'s "texmf" directory in there   2. Second step: Running `initexmf --edit-config-file updmap` and adding the lines "# MathTimePro II" and "Map mtpro2.map" to the file.   3. Third step: Running any and all of the following commands in various orders and combinations:      * From the command prompt (always in Administrator mode (right-click -> "Run as administrator")): `updmap`, `texhash`, `mktexlsr`, `initexmf --admin -u`     * Accessing the MikTeX "Options" dialogue (via running MikTeX 2.9 -> Settings as Administrator) and then choosing both "Refresh FNDB" and "Update Formats" None of this seems to work. Right now the error messages I get when trying to compile the enclosed sample file "MTPro2 LaTeX test.tex" is the following: > !pdfTeX error: pdflatex.exe (file mt2exf): Font mt2exf at 2400 not found > > ==> Fatal error occurred, no output PDF file produced! I have no clue what's happening. Also I hope I haven't cluttered the hash/database files with incorrect information in this process. How do I install the MathTime Professional II fonts under MikTeX?


title: Fill a triangle in space using asymptote

text: I am trying to draw a triangle in space, given its three vertices, using asymptote. A minimal example is               import grid3;     import graph3;          size(12cm,0);          currentprojection=orthographic(1,-2,1);     currentlight=(1,-1,0.5);          triple p0=(0,0,0);     triple p1=(0,1,1);     triple p2=(1,1,1);          grid3(new grid3routines [] {XYXgrid(0)},           pGrid=new pen[] {0.5blue},           pgrid=new pen[] {0.5blue});          draw(p0--p1--p2--cycle);      This yields the boundary of the polygon. However, I fail to fill the triangle. I assume I could parameterize it and plot it as a parameterized surface, but this didn't work for me as well. I tried to use the following               triple f(pair t) {return((1-t.x)*((1-t.y)*p0+t.y*p1)+t.x*p2);}     surface s=surface(f,(0,1),(0,1),10,10,Spline);     s.colors(palette(s.map(zpart),Rainbow()));     draw(s,render(merge=true));      instead of the last `draw` in the previous snippet. This attempt yields an empty page. **How can I fill (and draw its boundary?) a triangle in space using`asymptote`?**


title: \newenvironment creating an extra page

text: The following code produces: ![enter image description here](http://i.stack.imgur.com/dHcnd.png)               \documentclass[11pt,twoside,openany]{book}          \usepackage{amsmath,amssymb}     \usepackage{lipsum}     \usepackage{multicol}          %-------------------------------------------------------------------------------     \usepackage[centering,marginparwidth=2in]{geometry}     \evensidemargin 1.5in     \oddsidemargin 1.5in     \setlength{\textwidth}{5.5in}     %-------------------------------------------------------------------------------          \newenvironment{exotmp}{%     \begingroup       \begin{list}{}{%       \setlength{\leftmargin}{-1.5in}%       \setlength{\rightmargin}{0pt}%       \setlength{\parfillskip}{0pt plus 2fil}       }%        \item%     }     {\end{list}%     \endgroup}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}     \chapter{Introduction to Problem Solving}     \lipsum[2]     \section{The Problem-Solving Process and Strategies}     \lipsum[4-7]     \section{Three Additional Strategies}     \lipsum[5-12]     \begin{exotmp}     \setlength{\columnsep}{0.5cm}     \begin{multicols}{2}     \lipsum[2-9]     \end{multicols}     \begin{enumerate}     \item     \item     \item \lipsum[2-3]     \end{enumerate}     \end{exotmp}     \end{document}      Evidently there is something wrong as an extra page is produced. Can any one explain why this is happening and how to re-write the command so that it stops behaving in that manner?


title: How to draw this figure with arrows

text: How can I draw the following figure ![enter image description here](http://i.stack.imgur.com/40qud.jpg)


title: chapterfolder or import for a thesis with figures in subdirectories

text: I've been poking around on here trying to work out the best way of keeping my individual chapters and their associated figures in subdirectories. After reading a few threads I've been testing out `chapterfolder` and `import` (example at the bottom). Is there any particular advantage to using one or the other? Both seem extremely similar. Thus far the only differences seem to be:   * The need for a workaround for `\includegraphics` with `chapterfolder`   * `chapterfolder` automatically inserts the chapter title, whereas I'd need to do that manually with `import`.  Given that the latter might actually be an advantage (e.g. if I wanted to process the chapter individually without the parent document), I'm currently leaning towards `import`. Is there anything I'm missing? Exmple below: what I'd really like to do is not have to add the subdirectory `figures` to each of my `\includegraphics{figures/fig1.pdf}` commands - I have a lot of figures to do this for manually, but I am pretty sure there is no way to define a `\graphicspath` for each subdirectory individually - am I right? Example: parent directory contains:   `main.tex`   `subfolder/sub.tex`   `subfolder/figures/fig1.pdf` where `subfolder/sub.tex` consists of:               text          \begin{figure}       \includegraphics{figures/fig1.pdf}       \caption{caption}     \end{figure}      and `main.tex` consists of: **Option 1**               \documentclass[12pt]{report}          \usepackage{graphicx}    % needed for including graphics     \usepackage{import}          \begin{document}          \subimport{introduction/}{introduction.tex}          \end{document}      **or Option 2**               \documentclass[12pt]{report}          \usepackage{graphicx}    % needed for including graphics     \usepackage{chapterfolder}     % and we re-write includegraphics     \let\includegraphicsWithoutCF\includegraphics     \renewcommand{\includegraphics}[2][]{\includegraphicsWithoutCF[#1]{\cfcurrentfolder#2}}          \begin{document}          \cfchapter{Introduction}{introduction}{introduction.tex}          \end{document}


title: #10 envelope page size -- Skim / Adobe default to 8.5" x 11"

text: Each time I print an envelope, I've been manually selecting the #10 envelope size from the Skim print menu on an OSX machine because the application thinks it is 8.5" x 11". Is there any configuration in the LaTeX code that would create a *.pdf that Skim could automatically recognize as a # 10 envelope? Adobe Acrobat Professional has the same issue.               \documentclass{letter}     \usepackage[left=.2in,top=0.15in,papersize={4.12in,9.50in},landscape,twoside=false]{geometry}     \setlength\parskip{0pt}     \pagestyle{empty}          \begin{document}          \large{     \textbf{Sender Name}          \textbf{Company Name}          \textbf{Street Address}          \textbf{City, State \ Zip}     }          \vspace{1.0in}\LARGE     \setlength\parindent{3.5in}          Recipient Name          Company Name          Street Address          City, State \ Zip          \end{document}


title: How to hyphenate Russian text with dvilualatex?

text: I'm failing to hyphenate Russian text with LuaTeX in DVI mode (dvilualatex). Please, don't tell me to use `fontspec` I need a DVI file. MWE:               \documentclass{article}     \usepackage[T1,T2A]{fontenc}     \usepackage[cp1251]{luainputenc}     \usepackage[russian]{babel}          \begin{document}     \fontfamily{DejaVuSansCondensed-TLF}\selectfont          \vbox{\hsize=10pt     эпидемиологических     эпидемиологических     }     \end{document}      dvilualatex output: ![enter image description here](http://i.stack.imgur.com/T9ns1.png) latex output: ![enter image description here](http://i.stack.imgur.com/NOzgj.png) There is something wrong with input re-encoding (`luainputenc`). I understand that **luatex** reads utf8 input and `luainputenc` tries to split input characters to single bytes. This some how breaks hyphenation. Maybe someone could explain what is happening and how it could be solved?


title: Two problems with Emacs and Latex

text: The first problem is that when (in AucTex mode) I click the "view dvi" in emacs, xdvi appears for a millisecond and then disappears. Doesn't happen for files that are just a few pages long. When I open the dvi file with xdvi outside emacs, there is no problem at all. Happens for both Emacs 23 and 24. This problem started when I upgraded from Ubuntu 13.04 to Ubuntu 13.10. I don't know what to do. Emacs doesn't give any messages related to this. (I can't use pdftex in general because I use xfig images with "embedded" TeX.) The second problem is simply that in the Auctex mode the toolbar buttons are accompanied by their text description (even the separator!). I played quite a bit with the options but couldn't fix it.


title: \tableofcontents does not list the unnumbered chapter

text: My question is just like the title. Here is a MWE for my case :               \usepackage[paperwidth=16cm,paperheight=24cm]{geometry}     \usepackage{amsmath,amsxtra,amssymb,latexsym,amscd,amsfonts,enumerate,ifthen,stmaryrd,amsthm,amstext}     \usepackage[mathscr]{eucal}     \usepackage[pdftex]{graphicx}     \usepackage{xspace}     \usepackage{multicol,color}     \usepackage{mathrsfs}     \usepackage{makeidx}     \usepackage{indentfirst}     \usepackage[utf8]{inputenc}     \usepackage[utf8]{vietnam}      \usepackage{eso-pic}     \usepackage{perpage}      \MakePerPage{footnote}     \usepackage{fancyhdr}     \renewcommand{\headrulewidth}{0pt}      \makeindex     \begin{document}     \pagenumbering{roman}     \pagestyle{fancy}     \tableofcontents      \chapter*{Foreword}      Blah blah blah      \chapter*{Preface}      \pagenumbering{arabic}         Blah Blah       Mirella gọi là papa, dạy toán ở nhà cho Mirella.       \thispagestyle{plain}      \chapter{Dido's problem}      \label{chapter:Dido}      \index{Dido (công chúa)} \index{bài toán công chúa Dido}        Blah blah blah       \end{document}      Why the unnumered chapter does not appear in the table of content ? Please help me. Thanks.


title: How do I remove numbering from the chapter titles?

text: At the moment I get this: > 1 Chapter 1   >  1.1 Subsection I would like to remove the number preceding the Chapter 1 part to give: > Chapter 1   >  1.1 Subsection


title: How to remove chapter numbering without removing it from tableofcontents

text: It seems I have a two day trying to find out the solution of my problem. I have just finished typing my M.Sc thesis using LATEX (MIKTEX 2.9). Unfortunately, all my chapters begin with the chapter number at the top left corner of a page. My supervisor asked me to remove that numbering of the chapters without removing it from the table of contents. I have tried all my best to do that but I failed. The last attempt I made is `\chapter*{chapter title}`, the moment I compiled my work I found out that it begin sectioning from 0.1,0.2, and so on, which I don't like. Please can somebody help me out? * * * I have this code in side my thesis:               \chapter*     {\quad \quad \quad \quad \quad\quad \large{CHAPTER ONE}}     \addcontentsline{toc}{chapter}{CHAPTER ONE}          %Introduction}{}     \pagenumbering{arabic}     \onehalfspacing     \begin{center}     \textbf{\large \quad INTRODUCTION}     \end{center}          \section{Introduction} This chapter gives a brief  highlight on the concept of the Newton and quasi-Newton methods for solving nonlinear system of equations. The chapter contains motivation of the study, the aim and objectives, scope and limitations, methodology of the research. It includes some basic fundamentals  and definitions of some basic terms.      * * * After compiling, it gives me this:               CHAPTER ONE          INTRODUCTION          0.1 Introduction     This chapter gives a brief highlight on the concept of the Newton and quasi-     Newton methods for solving nonlinear system of equations. The chapter contains     motivation of the study, the aim and objectives, scope and limitations, methodol-     ogy of the research. It includes some basic fundamentals and definitions of some     basic terms.       NB: Please observe how the section Introduction is numbered. I want it to be numbered 1.1 not 0.1.


title: Lower overbrace in math enviroment

text: I would like to achieve the following inside an math environment ![enter image description here](http://i.stack.imgur.com/71722.png) But i can't get the text below the equation               \operatorname{min} \left|     \overbrace{\text{Hadamard product}}^{\begin{pmatrix}     X \circ X \end{pmatrix}} - \begin{pmatrix} 1 & 2 & 3 & \dots & M \end{pmatrix}     \right|^2      results in: ![enter image description here](http://i.stack.imgur.com/WjBsr.png)


title: how to align page numbers in the toc when parts entries are centered and others are left aligned?

text: ![enter image description here](http://i.stack.imgur.com/4Sywk.png) MWE:               \documentclass{scrartcl} %{scrbook}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{tocstyle}     \renewcommand*{\addparttocentry}[2]{%       \addtocentrydefault{part}{}{\protect\parbox{\textwidth}{\protect\centering#2}\vspace{3ex}}     } % center the parts entries in the toc and add a 3ex vspace after     \settocstylefeature[-1]{entryvskip}{5ex} % add a 5ex vspace before parts entries in the toc          \begin{document}     \tableofcontents     \part{part 1}     \section{section 1}     \section{section 2}     \part{part 2}     \section{section 1}     \section{section 2}     \end{document}


title: Converting string to number

text: I am trying to write an environment which provides (some of) the functionality parallel environment through tabular syntax so that the following two code snippets would give equivalent results:               \begin{Parallel}{4cm}{5cm}     \ParallelLText{TEXT 1}     \ParallelRText{TEXT 2}     \end{ParallelWithTabularSyntax}      ( _usual_ syntax above)               \begin{ParallelWithTabularSyntax}{p{4cm}p{5cm}}     TEXT 1 & TEXT 2     \end{ParallelWithTabularSyntax}      So far, I've got the following code, which works:               \NewEnviron{ParallelWithTabularSyntax}[1]{%       \StrFindGroup{#1}{1}[\dimL]       \StrFindGroup{#1}{2}[\dimR]            \def \textL {\StrBefore{\BODY}{&}}       \def \textR {\StrBehind{\BODY}{&}}            \begin{Parallel}{0.5\textwidth}{0.5\textwidth}         \ParallelLText{\textL}         \ParallelRText{\textR}       \end{Parallel}     }      However, I would like two write the code below to use the arguments given by the user, but this gives the error ! Missing number, treated as zero. I guess the cause for this is that the digits in the string \textL is threated as letters and not as digits. How do you make LaTeX/TeX treat the digits as digits?               \NewEnviron{ParallelWithTabularSyntax}[1]{%       \StrFindGroup{#1}{1}[\dimL]       \StrFindGroup{#1}{2}[\dimR]            \def \textL {\StrBefore{\BODY}{&}}       \def \textR {\StrBehind{\BODY}{&}}            \begin{Parallel}{\dimL}{\dimR}         \ParallelLText{\textL} % Problematic rows         \ParallelRText{\textR} % ----------------       \end{Parallel}     }