title: How can I run VLC in a href (beamer)

text: I have a beamer presentation and I want to launch a video clicking on a picture               \documentclass{beamer}     \usepackage{multimedia}     \usepackage{graphicx}     \usepackage{hyperref}     ...     \href{run:C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe getR.avi}{\includegraphics[width=1cm,height=1cm]{Rlogo.jpg}}      When I do this I see the Rlogo.jpg but when I click on it I get "Cannot open file" How can I do this ? **EDIT:** Alex solution gave an error Here is the code               \frame{ \frametitle{une petite vidéo ;-)}     \includemedia[       addresource=getR.mp4,       windowed=1024x768,       flashvars={         source=getR.mp4        &autoPlay=true        &scaleMode=letterbox       }     ]{\includegraphics[width=1cm,height=1cm]{RStudio.jpg}}{VPlayer.swf}     }      * * * Here is the slide ![the slide](http://i.stack.imgur.com/Wqg6S.jpg) * * * Here is the result when I click ![the error when I click](http://i.stack.imgur.com/PEdbX.jpg) * * * Here is my package version ![what miktex tells me about media9](http://i.stack.imgur.com/Qz4ZG.jpg)


title: How do you store all your TeX files long-term?

text: Reading through As an expert, can you always use TeX for (nearly) any kind of document?, it seems most people use TeX for almost all their documents. My question is this: how do you store these documents on your system? At the moment, I create a folder called `document_name` for each document, create `document_name.tex` inside it, and after typesetting to get out `document_name.pdf` I leave all the temp/aux files in the folder with the documents. So for every single document I have a folder with a dozen files in it. It just seems a bit messy - so how do you store these documents on your system? Do you remove (automatically?) the ~10-20 typesetting files LaTeX generates? Or am I over-thinking this?


title: Cross referencing in Beamer produces question marks

text: I was working on the replies given here. However, none of them properly worked. Here are the screenshots (note the question marks) ![First reply](http://i.stack.imgur.com/MR5sX.png) ![Second reply](http://i.stack.imgur.com/9KlaB.png) I just copied and pasted the codes. What is wrong then?


title: How to use tkiz point from two different nodes on separate axis?

text: I know I need to use the x from the `counter` node and the y from the `rectangle` node, but so far the right syntax has eluded me. Green indicates what I'm trying to fill, and red indicates the where the line should extend to. ![enter image description here](http://i.stack.imgur.com/feMo7.png)               \documentclass{scrbook}     \usepackage[letterpaper,asymmetric,left=108pt,right=54pt,top=41pt,bottom=41pt,headsep=13pt,headheight=14pt,footskip=23pt,marginparwidth=72pt]{geometry}     \usepackage[compact,explicit,calcwidth]{titlesec}     \usepackage{tikz,lipsum}     \usetikzlibrary{calc}          \setkomafont{section}{\normalfont\bfseries}          \pgfdeclarelayer{background}     \pgfsetlayers{background,main}          \newlength\titlemarginwidth     \setlength\titlemarginwidth{54pt}          \newcommand\boxedsection[1]{{%       \usekomafont{sectioning}\usekomafont{section}%       \begin{tikzpicture}[x=1pt,y=1pt,inner sep=0, inner ysep=0.7ex]         \node[anchor=base west,text width=\titlemarginwidth-\columnsep,color=white] at (0,0) (counter) {\hspace{1ex}\thesection};         \node[anchor=base west,text width=\textwidth] at ($(counter.base east)+(\columnsep,0)$) (rectangle) {#1};         \begin{pgfonlayer}{background}             \fill[color=black] let \p1=(counter.north), \p2=(counter.north) in (0,{max(\y1,\y2)}) rectangle (counter.south east);             \draw[black,thick] let \p1=(counter.north), \p2=(counter.north) in (0,{max(\y1,\y2)}) -- (rectangle.north east);             \draw[black,thick] (rectangle.south west) -- (rectangle.south east);         \end{pgfonlayer}       \end{tikzpicture}     }}          \titlespacing{\section}{-\titlemarginwidth}{1em}{0em}     \titleformat{\section}[block]       {}%       {}{0pt}{\boxedsection{#1}}          \begin{document}     \chapter{Testing One Two Three!}     \section{Extremely long section title that is absolutely absurd and obnoxious that goes on forever and ever and ever and ever!}     \lipsum[1]     \end{document}      I switched to `tikz` after having trouble with spacing using just `titlesec` rules and boxes. This answer was extremely helpful in getting me started.


title: How to Get The Output Like This

text: Appendix A:       Table A.1       Table A.2            Appendix B:        Table B.1       Table B.2           Appendix C:      Table C.1       Table C.2       How to Get output like this


title: pgfplot — label, referencing and caption

text: I've the following pgfplot:               \begin{center}         \begin{tikzpicture}             \begin{axis}[                 xlabel = Number of threads (\#),                 ylabel = Task completion time (seconds),                 xtick = {0, 4, 8, 12, 16},                 ytick = {0, 5000, 10000, 15000, 20000, 25000},                 % ymax = 6,                 % ymin = 0,                 x = 2.5cm/4,                 legend pos = north east]                  \addplot[smooth, thick, color = red, mark = *]                 plot coordinates {                     (1, 23849)                     (2, 11920)                     (3, 7955.8)                     (4, 5971.6)                     (5, 4786.2)                     (6, 3991.8)                     (7, 3440.4)                     (8, 3018.4)                     (9, 3656.2)                     (10, 3411.2)                     (11, 3299)                     (12, 3233)                     (13, 3165.8)                     (14, 3168.2)                     (15, 3099.4)                     (16, 3050.4)                 };             \addlegendentry{CoinFlip --- \texttt{Running Time}}              \end{axis}         \end{tikzpicture}     \end{center}      ![enter image description here](http://i.stack.imgur.com/ACACU.png) I wish to add a label like: `\label{graph:running_time_1}` and then somehow refer to it like in images and tables. Also, I would like to add captions for this. I've been somehow unsuccessful in finding the right way of doing this. I don't wish to create images and then add captions or labels; I just want pgfplots to handle all of that.


title: Putting multiple algorithm2e procedures in figure

text: I want to put some `algorithm2e` procedures into a figure like:               \begin{figure}     \begin{procedure}     some code \;     \caption{abc (n).}     \end{procedure}          \begin{procedure}     some code \;     \caption{abc (n).}     \end{procedure}          \caption{some procedures.}     \end{figure}      Please, how to do it?


title: LanguageTool and apostroph

text: Using LanguageTool (http://www.languagetool.org/) in TexStudio for my Latex project, I'm facing problem with "apostrophes" (I'm french, we use it a lot). The problem is that LanguageTool tells that "c'est à dire" is wrong (we need "minus"), and want to replace by "c’est-à-dire" => note the different character for the simple quote between "c" and "est", this is replaced by an apostroph (that I don't find on my keyboard...). And then... aspell now indicates that "c’est-à-dire" is wrong, because it considers "apostroph" as an error. Writing "c'est-à-dire" is ok for both. And as I said, the "’" char is not the default on keyboard. So, is there a way to configure LanguageTool to use simple quotes instead of apostroph char on correction ?


title: How to include a postscript image and change the fonts inside it?

text: I need to include a postscript file in a XeLaTeX document. The text in the PS file has western digits, but I need Persian digits. How should I do this?


title: Keeping the definition of tables/figures separated from main text

text: Disclamer: This is not a question regarding the micromanagement of tables/figures placement during typesetting, but rather about organization of the original latex file itself. Prologue: During the preparation of a substantial latex document, I feel that mixing the definition of tables/figures/algorithms/... inside the body of the text results most often in a confusing mess. While writing/proofreading the original latex document (not the typeset file), focusing on the scientific content is difficult when the text is diluted by the numerous commands needed to include the tabulated results or figures (specially for very complicated tables). To overcome this problem, I ended up encapsulating the definition of my tables/figures inside `\newcommand` elements. This way, all my tables/figures are grouped at the beginning of the document, and then the more meaningful text appears as a bloc. The following MWE gives an idea:               \documentclass{article}     \usepackage{graphicx}          \begin{document}          \newcommand{\plugFigureApple}{         \begin{figure}[h]         \includegraphics{foo}         \caption{This is the caption for the apple figure.}         \label{fig:apple}         \end{figure}     }          \newcommand{\plugFigureOrange}{         \begin{figure}[h]         \includegraphics{bar}         \caption{This is the caption for the orange figure.}         \label{fig:orange}         \end{figure}     }          \newcommand{\plugTableFruits}{         \begin{table}[h]         \caption{This is the caption for the fruits table.}         \label{tab:fruits}         \begin{tabular}{ l | c }         Fruit & Calories \\         \hline         Apple  & 52 \\         Orange & 47 \\         \end{tabular}         \end{table}     }          This is a paragraph where apples are presented in Figure~\ref{fig:apple}. This is a very serious discussion regarding apples.     \plugFigureApple{}          This is a paragraph where oranges are presented in Figure~\ref{fig:orange}. This is a quite a comprehensive analysis.     \plugFigureOrange{}          This is one final paragraph where fruits are discussed in Table~\ref{tab:fruits}. This is a thorough discussion.     \plugTableFruits{}          \end{document}      This effectively allows to focus on the text with minimal distraction. But as some files have a very important number of tables and figures, scrolling down to find the first meaningful sentence have now become impractical. Ideally, I would like the real text to come first so that the table/figure definitions would end up at the bottom of the latex file. This is not an option using my proposition, since the `\newcommand` elements have to be defined beforehand. So here's my question: is there a way (or a package) that would allow me to start with the main text and end with all the table/figure definitions at the bottom of the file, while having some sort of control over the placement of those tables/figures during typesetting (as I don't want those to simply appear as a list at the end of the document). I do not mind manually providing some positional marks (as for example the `\plugFigureApple{}` in the above MWE), but the tables/figures could also be placed automatically as close as they can from their respective first reference.


title: Draw an inclined ellipse in PStricks

text: I would like to draw an inclined ellipse in PStricks, but seems the angle command does not work here. How can I make my ellipse inclinde?                 \psellipse[linestyle=dashed,angle=-30,linecolor=red,dash=3pt 2pt](-2,3)(0.5,0.5)


title: Align: one line centered and the next right-justified

text: Consider the following code:               \documentclass{amsart}     \usepackage{amsthm, amssymb, amsfonts}          \begin{align*}     F_{X^2}(x) = P(X^2 \leq x) = P(X \leq \sqrt{x}) = F_{X}(\sqrt{x}) =          \sqrt{x}     \\     F_{Y^2}(y) = P(Y^2 \leq y) = P(-\sqrt{y} \leq Y \leq \sqrt{y}) =         F_{Y(\sqrt{y}) - F_{Y}(-\sqrt{y}) =      \\     \frac{\sqrt{y}- (-1)}{2} - \frac{- \sqrt{y}-(-1)}{2} = \sqrt{y}     \end{align*}          \end{document}      Note I am making two statements, the first of which takes one line, and the second of which takes up two lines. As written, all three lines are right- justified. It would seem that it would make more sense to the reader if the first line were centered, and the third line were right-justified, so that it is clear that it is a continuation of line two. Does anyone have a tip for how to achieve this? Should I make the first line its own block, in other words, use `$$$$` for the first line, and `align` for the second line? Any other suggestions as to how to make my meaning visually clear are welcome.


title: Change the color model of an included pdf

text: Say I have a pdf file `foo.pdf` that I want to include in my `bla.tex` document _via_ `\includegraphics{foo.pdf}`. Say that `foo.pdf` is a colored document and that I need `bla.pdf` to be in gray levels. How can I do?


title: BibLaTeX doesn't show bibliography when compiling

text: I've just watched some YouTube videos given by ShareLatex. In the video I saw he constructed a Thesis in LaTeX. It is available here. Now, I downloaded the whole package to see if it would run in my LaTeX editor (TexStudio), but when I ran/compiled it, everything seemed to be working, except the bibliography. It was supposed to be in the end, but nothing shows, and the citing just writes out the keyword of the .bib file. I haven't touched anything at all, I just clicked Compile and "Build and View" when I opened the main document. So yeah, why does it work on the ShareLatex website, but not on my computer in TexStudio. I'm obviously doing something wrong, but what ? Thanks in advance.


title: How to numprint result of command?

text: Faulty code:               \documentclass{article}     \usepackage{fp}     \usepackage{numprint}          \newcommand{\ratio}{%       \FPdiv\result{\x}{\y}%       \FPround\result\result{2}%       \result%     }          \begin{document}     \FPset\x{2}     \FPset\y{3}     \numprint{\ratio}     \end{document}      LaTeX complains: > ! Undefined control sequence. \next ->\@nil > > l.14 \numprint{\ratio} _How do I evaluate`\ratio` and print it with `\numprint`?_


title: \Mapsto in tikz-cd

text: I'm loving using tikz-cd to draw compiler correctness diagrams, but I can't manage to get quite the same arrows for relations that I'm using in the text. In particular, I'm not sure how to get `\Mapsto` in a tikz-cd diagram. I did try combining arrow options to get `\Mapsto` to work:               \documentclass{article}          \usepackage{tikz}     \usepackage{tikz-cd}          \begin{document}          \begin{tikzcd}       M \rar[Rightarrow] \dar[maps to] & N \dar[maps to, Rightarrow] \\       M' \rar[Rightarrow, maps to] & N'     \end{tikzcd}          \end{document}      But this wound up less than satisfactory (on TeXLive 2013): ![Garbled arrows](http://i.stack.imgur.com/cTXti.png) As you can see, depending on the order I give the arguments, the bar is either missing (there should be one on the N-to-N' arrow) or comically huge. I assume this is a bug? Any known workaround?


title: Configuring latexmk to use a preprocessor (lhs2TeX)

text: I want to preprocess an input file before compiling it with, say, pdflatex. I found one way to do this using the "internal" specification described in the latexmk manual, but I expected there to be a simpler and more flexible way using custom dependencies. I'm using the preprocessor lhs2TeX (version 1.18.1) with the file extension `.lhs`. My latexmk version is 4.37 (2 July 2013). ## The "internal" way A document `input.lhs`:               \documentclass{article}     %include polycode.fmt     \begin{document}     Hello, |world|! % The | and | are used by lhs2TeX.     \end{document}      The `.latexmkrc`:               push @generated_exts, 'tex'; # Remove generated .tex on clean-up          # Use subroutine to do preprocessing and running pdflatex     $pdflatex = 'internal mylatex %B %O';     sub mylatex {       my $base = shift @_;       my $tex = "$base.tex";       # Run the preprocessor       system('lhs2TeX', '--poly', '-o', $tex, "$base.lhs") == 0 or return $?;       # Run pdflatex       return system('pdflatex', @_, $tex);     }      At the command line:               $ latexmk -silent -pdf input.lhs     Latexmk: Run number 1 of rule 'pdflatex'     Latexmk: calling mylatex( input -interaction=batchmode -recorder )     This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode      This successfully produces an appropriate `input.pdf`. But it also required me to hardcode `pdflatex`. ## A failed attempt using custom dependencies The `.latexmkrc`:               $cleanup_includes_cusdep_generated = 1; # Remove generated .tex on clean-up          # Set preprocessor as a custom dependency     add_cus_dep('lhs', 'tex', 1, 'run_lhs2TeX');     sub run_lhs2TeX {       my $base = shift @_;       # Run the preprocessor       return system('lhs2TeX', '--poly', '-o', "$base.tex", "$base.lhs");     }      The rule created here never fires. I'm guessing this doesn't work because latexmk doesn't use dependencies for the initial inputs, only for files included within other files (e.g. via `\input`). ## Conclusion Is there a _simple_ way, possibly similar to the above custom dependency attempt, to configure latexmk to use a preprocessor? It shouldn't require hardcoding the compiler. (I could do this with a Makefile, but if I'm using latexmk anyway, then I would prefer to do everything with latexmk.)


title: Plots are not appearing in PDF after using Sweave

text: In general, Sweave is making great looking PDFs for me. However, when I plot a histogram, it is not appearing in my PDF. I have a bare bones Sweave document as follows. I can't seem to isolate what is missing!               \documentclass{article}     \usepackage{listings}          \begin{document}     \SweaveOpts{concordance=TRUE}          <<ReadOrder,tidy=TRUE,highlight=FALSE>>=          p <- ggplot(diamonds, aes(x=carat))     p <- p + geom_histogram()     p     @      (PS : yes, I have the 'listings' package installed in my LaTex package! And yes, the plot is being printed to the terminal.) Thanks in advance for any advice.


title: Problem with itemisation

text: \subsection{IDENTITY :}     \begin{itemize}     \item Left Identity $:$ e_{l} $ \star $ a $=$ a     \item Right Identity $:$ a $\star $ e_{r} $=$ a      \end{itemize}      i am not getting alphabet 'a' in the second item properly.what is the problem. please help.


title: How can I move a ganttbar label to the right of the bar?

text: I have a label for a ganttbar that is longer than the bar itself, and need to move it outside the bar to its right. Sketch of desired output:               ----     |  |  My label here     ----        I tried to use the (sparse!) suggestion given in the manual (p.25) and wrote something like:               \ganttbar[inline label node/.append style={right=5mm}]{0.1,0.2}{2}{2}      but the result is actually the opposite of what I need. I get something like:                             ----     My label here |  |                   ----      Moreover, no matter how I play with the parameter of the style option (e..g right, left, different mm values, etc), I always get the same result, with the label on the left. I am obviously missing something important about the syntax of the ganttbar options. Here is a MWE showing the wrong behavior:               \documentclass[a4paper,10pt]{article}     \usepackage{pgfgantt}     \begin{document}     \begin{ganttchart} {1}{10}        \ganttbar{Deliverable}{2}{2}        \ganttbar[inline label node/.append style={right=5mm}]{0.1,0.2}{2}{2}     \end{ganttchart}     \end{document}


title: StrSubstitute for multiple replacements in a loop?

text: I am trying to replace multiple keywords using `\StrSubstitute` inside a loop using `foreach` - but unable to accumulate all the results. The result of each `\StrSubstitute` call is getting lost inside the loop. I am using the method suggested at capturing the result. Sample code is as below:               \documentclass[11pt]{article}     \usepackage{etoolbox}     \usepackage{xstring}     \usepackage{tikz}          \begin{document}          \def\KeyWords{one, two, three}     \def\MyText{This is one, followed by two later by three}     \expandarg          Original Text: \MyText\\          \foreach \keyword in \KeyWords     {        Replacing: \texttt{\keyword}       \StrSubstitute{\MyText}{\keyword}{\textbf{\keyword}}[\MyText]            Now MyText: \MyText  \\ \\     }     Final: \MyText \\      In the above sample, in each iteration the particular word one, two or three gets bold correctly - but when it finally comes out of the loop, the `\MyText` ends up being the same as original. Even `\csgdef` did not work (assuming global vs local definitions is the problem). Tried `\renewcommand{\MyText}{\StrSubstitute{\MyText}{\keyword}{\textbf{\keyword}}}` to directly assign the substitution result to `\MyText` but it just hangs saying something like               [Loading MPS to PDF converter (version 2006.09.02).]       (I am using `MikTeX` 2.9 and `pdflatex` if that matters ) What is the correct mechanism to achieve this? Goal is to substitute one or more comma separated supplied keywords with their respective replacement words in a given string.


title: Where do i get good quality (possibly free) templates in TEX for software development.

text: My documents include:   1. Functionality Specification   2. Software Requirement Specification   3. Software manual   4. High Level Design Document   5. Configuration Management.... and so on Any TEX template for the above will be appreciated


title: Why does TeX have limited capacity?

text: With today's computers having several gigabytes of memory, why does TeX still have such limited capacity, and why are modern TeX installations not adjusted for higher capacity by default? Why is adjusting TeX capacity only recommended as a last resort?


title: how to right-align on a page a block of multi-lined text which is itself left-aligned within the block?

text: I am trying to re-create the letter format using just regular LaTex commands since the letter packages do not give me the desired effect. In a standard US letter, my (the sender) address would be on the right side of the page, while every line of my address should be flush on the left end. I am wondering how I can achieve this? Example: Office 123   Some building   Some company that has a long name   Some city   some zip 12345   Some country I want the right end of the longest line of my address block, ``Some company that has a long name'' to align with the right edge of the body text of my letter, and at the same time, all lines within my block are flush left. Any idea how I can do that in LaTex? Thanks! --- follow up ---               \documentclass[10pt]{article}          %this is for setting up text fonts, pick one and comment out all others     %\usepackage{charter}     \usepackage{kpfonts}     %\usepackage{Times}     \usepackage{graphicx}     %\usepackage{showframe}     \usepackage{calc}     \usepackage{pbox}     % Text layout     \topmargin -2.0cm     \oddsidemargin 0.2 cm     \evensidemargin 0.4cm     \textwidth 15.5cm     \textheight 25cm     \setlength{\parindent}{0pt}          \begin{document}     \thispagestyle{empty}     \begin{minipage}[t]{\textwidth}     \includegraphics[width=3.5cm]{Olympics.jpg}          \hfill     \begin{tabular}{@{}l@{}}     Office 123 \\     Some building \\     Some company that has a long name\\     Some city, some zip 12345 \\     Some country     \end{tabular}          \end{minipage}     \end{document}


title: List of floats with the number of pages

text: A big issue is how to control float placement. I don't want to stress this problem but I would like to get an automatic overview over problem. What I mean: Is there the possibility to get a list with all floats, where the page of definition of float is written as well as the placement page of float. Then one can easily see, how many pages the float "floats". An example:               Text text text %which is on page 3       \begin{figure}       Figure       \end{figure}       text text text %also on page 3      The figure was placed on page 8. Now it would like a list showing: > Figure 4.1: definition page 3, placement page 8 So the page floats 5 pages... Is this easily possible? Regards, Andreas


title: TikZ - How can I filldraw areas spanned over an arc?

text: I'd like to draw an angle transmitter: ![enter image description here](http://i.stack.imgur.com/p2fxz.jpg) The following code shows what I have come up with so far, which is basically nothing. I can't figure out how to fill up for cells per quadrant... in a radial fashion. I've succeeded with rectangles and circles of some sort, but not this one. Starting at 12 o'clock and going counter-clockwise, the pattern is 8f(ull)-8e(mpty) cells on the outer ring, then the same on the 2nd outer ring with an offset of 4 cells, then 4f-4e with an offset of 2 cells and the inner ring has a 2f-2e pattern with an offset of one.               \documentclass[     a4paper     ]{scrartcl}          \usepackage{         newtxtext,         amsmath,     }     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepackage{tikz}     \usetikzlibrary{         external,     }          \listfiles          \begin{document}     \begin{center}         \begin{tikzpicture}[font=\small]         \draw[thick] (0,0) circle [radius=2cm];         \draw[thick] (0,0) circle [radius=4cm];     %   \foreach \a in {2,2.5,...,4}     %       \foreach \w in {0,22.5,45,...,337.5} {     %   \fill ($(\w:\a;     %   }         \end{tikzpicture}     \end{center}     \end{document}


title: Can we make a love heart with LaTeX?

text: I understand that this post may cause some down votes because it seems a bit off-topic, but having seen the discussion on Christmas Tree with LaTeX I am still willing to try. My Girlfriend's birthday is coming _(OK, actually less than 12 hrs!)_. I would like to write her a little love note. Both of us have just started our PhD. So I suddenly come up with this idea of **drawing a red cute love heart to her using LaTeX**. It must be of a lot of fun! Come on! Show your romantics, TeX geeks and gurus! Who says we only know about technology?! We **do** understand love! :D


title: Fix URL overfull

text: when I break the URL in the bbl file I had to do more than one step and it takes time, but I would like to know a way or a usepackage to break the URL automatically


title: Connecting two nodes in tree rectangular

text: I want to draw a tree like this: ![tree with nodes connected](http://i.stack.imgur.com/HuIbX.png) The closest I could get to this was the following code:               \documentclass{minimal}          \usepackage{tikz-qtree}          \begin{document}          \begin{tikzpicture}     \tikzset{level 1+/.style={level distance=2\baselineskip}}     \Tree[.IP NP            [.VP [.\node(v){V}; [ \node(v1){}; ] ]                 NP                  [.PP [.\node(p){P}; \node(p1){}; ]                      NP ]             ]     ]     \draw (v) -- (v1) -- (p1) -- (p);     \end{tikzpicture}               \end{document}      But this involves empty auxiliary nodes and the lines have some space in the middle. Is there a simpler way to do this? Are there options to `\draw`that can do this?


How could I use scalebox to rescale a table such that it fits exactly in the usable page width (i.e., between the margins)? Is there some way in which something such as `\hsize` could be used as an argument for \scalebox?


title: How to generate a database or reference in bibliography?

text: I am new to LyX. I want to add bibliography but I don't have any database to insert. So how can I type the references directly in LyX or how to create a database and then insert it? Also is there any software which has to be installed for creating the data base?


title: What is character in all table cells except bottom right cell?

text: And how do I get rid of them?               \documentclass[letterpaper,10pt]{memoir}     \usepackage{tabularx}     \usepackage{caption}     \begin{document}     \begin{table}[ht]     \centering     \captionsetup{font={tt,Large}}     \caption*{Summertime Checklist}     \begin{tabularx}{262pt}{l|l|l|l|l|l|l|l|l}     \toprule     &     \texttt{Mo.} &     \texttt{Tu.} &     \texttt{We.} &     \texttt{Th.} &     \texttt{Fr.} &     \texttt{Sa.} &     \texttt{Su.}     \\      \midrule     \texttt{GO FISHING} &     | &| &| &| &| &| &| &     \\     \midrule     \texttt{GO CAMPING} &     | &| &| &| &| &| &     \\     \midrule     \end{tabularx}     \end{table}     \end{document}      Here's my MikTex/pdfLatex output ![Table](http://i.stack.imgur.com/f1evV.png)


I am using texlive 2013, and just ran the following command to update the packages.               sudo ./tlmgr update  -all      After it finished, I tried to compile tex documents that uses `tikz` package as the following MWE shows:                \documentclass{article}      \usepackage{tikz}      \begin{document}           aaaa      \end{document}      Then pdflatex complains; it said:                (/usr/local/texlive/2013/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty      (/usr/local/texlive/2013/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex      ! I can't find file `pgfutil-common-lists.tex'.      l.556 \input pgfutil-common-lists.tex      The problem is that, **pgfutil-common-lists.tex** is indeed in the directory:                /usr/local/texlive/2013/texmf-dist/tex/generic/pgf/utilities/      Why is that? pdflatex should be able to find it, right? I even download the pgf package again, and replace the pgf directory in                /usr/local/texlive/2013/texmf-dist/tex/generic/      Nothing changed at all........... Any idea? Thank you for your critics. %===================================================================== Then followed the comments, I type the following command in the terminal:   1. `sudo mktexlsr` gives me `command not found`;    2. `mktexlsr` gives me: mktexlsr: /usr/local/texlive/2013/../texmf-local: directory not writable. Skipping... mktexlsr: /usr/local/texlive/2013/texmf-config: directory not writable. Skipping... mktexlsr: /usr/local/texlive/2013/texmf-dist: directory not writable. Skipping... mktexlsr: /usr/local/texlive/2013/texmf-var: directory not writable. Skipping... mktexlsr: Done;   3. For`kpsewhich pgfutil-common-lists.tex`, nothing pops up.


title: Remove strange line from KDE beamer template.

text: I'm doing a presentation using the kde beamer template, it's a really cool template. However there is a bug (?) that is killing me. There is two strange lines that is between the logo. Does any one know how can I remove it??? Here is the image: ![http://i51.tinypic.com/2k34zl.png](http://i.stack.imgur.com/7Mkte.png) Here is the kde beamer style source:               \usetheme{Rochester}          \RequirePackage{pgf}          \pgfdeclareimage[width=1.0\paperwidth]{oxygen-header}{oxygen-header}          \setbeamertemplate{blocks}[rounded][shadow=true]     \setbeamercovered{transparent}          \beamer@headheight=0.13\paperwidth          \definecolor{oxygenorange}{HTML}{F7800A}     \definecolor{oxygengray}{HTML}{686868}     \definecolor{oxygenlightgray}{HTML}{EEEEEE}     \definecolor{oxygenblue}{HTML}{236EAF}     \setbeamercolor*{Title bar}{fg=white}     \setbeamercolor*{Location bar}{fg=oxygenorange,bg=oxygenlightgray}     \setbeamercolor*{frametitle}{parent=Title bar}     \setbeamercolor*{block title}{bg=oxygenblue,fg=white}     \setbeamercolor*{block body}{bg=oxygenlightgray,fg=oxygengray}     \setbeamercolor*{normal text}{bg=white,fg=oxygengray}     \setbeamercolor*{section in head/foot}{bg=oxygenblue,fg=white}          \usecolortheme[named=oxygenorange]{structure}          \setbeamerfont{section in head/foot}{size=\tiny,series=\normalfont}     \setbeamerfont{frametitle}{size=\Large}          %\setbeamertemplate{headline}     \setbeamertemplate{frametitle}     {       \vskip-0.25\beamer@headheight       \vskip-\baselineskip       \vskip-0.2cm       \hskip0.7cm\usebeamerfont*{frametitle}\insertframetitle       \vskip-0.10em       \hskip0.7cm\usebeamerfont*{framesubtitle}\insertframesubtitle     }          \setbeamertemplate{headline}     {       \pgfuseimage{oxygen-header}       \vskip -1.95cm       \linethickness{0.25pt}            \framelatex{       \begin{beamercolorbox}[wd=\paperwidth,ht=0.3\beamer@headheight]{Title bar}         \usebeamerfont{section in head/foot}%         \insertsectionnavigationhorizontal{0pt}{\hskip0.22cm}{}%       \end{beamercolorbox}}            \framelatex{       \begin{beamercolorbox}[wd=\paperwidth,ht=0.7\beamer@headheight]{Title bar}       \end{beamercolorbox}}     }          \setbeamertemplate{footline}     {       \linethickness{0.25pt}       \framelatex{       \begin{beamercolorbox}[leftskip=.3cm,wd=\paperwidth,ht=0.3\beamer@headheight,sep=0.1cm]{Location bar}         \usebeamerfont{section in head/foot}%         \insertshortauthor~|~\insertshorttitle         \hfill         \insertframenumber/\inserttotalframenumber       \end{beamercolorbox}}     }


title: Adding some text on a page break

text: How can one test if certain chunks of text (say, numbered questions in a questionnaire) is split between two pages and add automatically related text ("Continued question NN") on the top of the second page? (That is what longtable does with its head, but I need it for plain text.) I doubt if MWE make sense here, 'cause I'm not reporting a bug and I cannot suggest any solution to the problem. Anyway, let it be.               \documentclass{book}          \usepackage{geometry}     \geometry{lines=9,showframe}          \def\lorem{Lorem ipsum dolor sit amet, consectetur adipisicing elit,       sed do eiusmod tempor incididunt ut labore et dolore magna       aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco       laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure       dolor in reprehenderit in voluptate velit esse cillum dolore eu       fugiat nulla pariatur. Excepteur sint occaecat cupidatat non       proident, sunt in culpa qui officia deserunt mollit anim id est       laborum.}          \newcounter{question}     \newcommand\question[1]{\par     \refstepcounter{question}\textbf{\thequestion.} #1\par}          \begin{document}     \question{\lorem}     \question{\lorem}     \question{\lorem}          \end{document}      I would like to have a line _Continued question 2_ as a 1st line of page 2 **body** for 9-lines body and nothing for 10-lines body. As `longtable` does with its `...\endhead` instruction. * * * I think about 2 solutions: one just puts the chunk in a `vbox`, tests if its height is greater than the remaining space and, if necessary, `vsplits` it and adds page break followed by the desired text and the remainigs (iterating if it is too big for one page). Another one puts 2 labels at the beginning and the end of a chunk and defines a command for page N (the command name includes N as its part) that prints the desired line if these two label appears on pages N-1 and N. This command can be called from `\output`, but I don't know the right way and moment to do it.


title: Image next to Equation

text: I am trying to make my first LaTeX file and have been reading syntax for a bit and have not been able to figure one thing out yet and don't seem to find anything about it online so I thought I might just ask:) How is it possible to place an image next to an equation? I tried to do it by wrapping it around, putting it into a table or anything similar but I can't get it working... Of course I could just have used the syntax wrong since I'm new to the subject:) It's for a summary for my exams and the pages are limited so I would like to save some space, plus it would look a lot better. Additionally, if anyone could give me a link to a tutorial that is a bit more extensive than just the basics i would be very thankful as well!               \documentclass[11pt, a4paper]{article}           \usepackage{geometry}                             \usepackage{amsmath}     \usepackage{wrapfig}     \geometry{a4paper}                                           \usepackage{graphicx}                        \usepackage{amssymb}     \geometry{left=5mm, right=5mm, top=0mm, bottom=5mm}          \title{\huge {\textbf{Lineare Algebra}}}     \author{ David Wright}          \date{\today}          \begin{document}     \maketitle{\large{\textbf{Vektorgeometrie}}}     \vspace {5mm}          \maketitle{\textbf{Skalarprodukt}}          Das Skalarprodukt ergibt die L\"{a}nge der Projektion von \ensuremath{\vec{a}} auf \ensuremath{\vec{b}}.               \begin {tabular}{p{10cm}l}     {\begin {align*}     \vec{a} \bullet \vec{b}& = |\vec{a}| \cdot |\vec{b}| \cdot \cos(\phi) \\                            & = a_x  \cdot b_x + a_y \cdot b_y + a_z \cdot b_z \\                 \cos(\phi) & =  \frac {\vec{a} \bullet \vec{b}}{|\vec{a}| \cdot  |\vec{b}|}\\                            & = \frac {a_x  \cdot b_x + a_y \cdot b_y + a_z \cdot b_z}{\sqrt{a_x^2 + a_y2 + a_z^2}\sqrt{b_x^2 + b_y^2 + b_z^2}}     \end {align*}}     &          \includegraphics[keepaspectratio = true, scale = 1] {dotp.jpg}     \end{tabular}          \vspace{5mm}          \maketitle{\textbf{Vektorprodukt}}          TextTextTextTextTextTextTextTextTextText               \end{document}        ![This is the outcome now](http://i.stack.imgur.com/cXkK4.png)


title: Drawing arrows to nodes in trees

text: I try to draw rhe following three figures. The left is just a sequence of symbols NP V NP AP, the middle one is a unary branching tree and the right one is a binary brancing tree. I want to place a V below the respective items and connect the V with an arrow to the V in the leftmost figure to the lower V in the middle figure and to the lower right V in the right figure. I guess there is a straightforward way (or several ways) to do this.               \documentclass{scrbook}           \usepackage{tikz-qtree}     \tikzset{every roof node/.append style={inner sep=0.1pt,text height=2ex,text depth=0.3ex}}          \newcommand{\sliste}[1]{%     \mbox{%     $\left\langle\mbox{\scshape #1}\right\rangle$}%     }          \newcommand{\trace}{\raisebox{0.2ex}{\_}\rule{0cm}{0.7em}}                    \begin{document}          \begin{figure}[htbp]     \hfill     \begin{tikzpicture}[baseline=(construction.base)]     \draw (0,0) node {V} -- (0,1) node (construction) {NP V NP AP};     \end{tikzpicture}     \hfill     \begin{tikzpicture}[baseline=(V.base)]     \Tree[.\node (V) {V \sliste{ NP, NP, AP }}; \node (v-in) {V \sliste{ NP }}; ]     \node (v-lex) {V};     \draw (v-lex) (v-in);     \end{tikzpicture}     \hfill     \begin{tikzpicture}[baseline=(V.base)]     \Tree[.\node (V) {V \sliste{ NP, NP, AP }};             [.{V \sliste{ NP, NP, AP, [1] }} \trace{} ]             \node (v-in) {[1] V \sliste{ NP }}; ]     \node (v-lex) {V};     \draw (v-lex) (v-in);     \end{tikzpicture}               \hfill\mbox{}     \caption{\label{phrasal-lexical-empty}Phrasal analysis, lexical analysis and analysis with an empty head}     \end{figure}          \end{document}


title: How can I alter `\printindex` to start a new chapter (up to TOC/headers) in memoir?

text: @egreg's answer to How to add \printindex to tableofcontents provides multiple options to add the index to the table of contents, but you can see from the screenshot below that the headers in `memoir` still reflect an older chapter. Is there any way I can add a new chapter to reflect the index name (in this case `General Index`) in the header _without_ having a new page started?               \documentclass{memoir}     \let\bf=\bfseries     \usepackage{multind}          \makeindex{idx}          \begin{document}     \chapter{Some Chapter}          Some \index{idx}{text}text, and \index{idx}{some}some more \index{idx}{text}text.          \appendix          \printindex{idx}{General Index}     \end{document}      ![problem output](http://i.stack.imgur.com/8RkRK.png) In essence, I'd like something such as this:               Chapter 1     Some Chapter          Some text, and some more text.          ...     ...     ...          ----------------------------------------------------------------                                                   CHAPTER 1: SOME CHAPTER          blah blah blah          ...     ...     ...          ----------------------------------------------------------------          Appendix A     General Index          some, 1     text, 1          ...     ...     ...          ----------------------------------------------------------------                                                 APPENDIX A: GENERAL INDEX          blah, 2          ...     ...     ...


title: The \pbox makes the text crowded

text: The result is as follows: you will see it is too crowded. And the MWE is:               \documentclass[12pt,a4paper]{book}     \usepackage{fontspec,amsmath}     \usepackage{tabularx}     \usepackage{pbox}     % For multiletter symbols     \newcommand\Rey{\mbox{\textit{Re}}}  % Reynolds number     \newcommand\Str{\mbox{\textit{St}}}          \begin{document}            \begin{tabularx}{\textwidth}{l}\hline         \hline         \pbox{55cm}{$\Rey=68$ \\$\Str=0.12$ }\\         \pbox{55cm}{$\Rey=84$ \\$\Str=0.13$}\\         \pbox{55cm}{$\Rey=103$\\$\Str=0.14$}\\         \pbox{55cm}{$\Rey=119$\\$\Str=0.15$}\\         \pbox{55cm}{$\Rey=134$\\$\Str=0.16$}\\         \pbox{55cm}{$\Rey=171$\\$\Str=0.17$}\\\hline       \end{tabularx}          \end{document}      ![enter image description here](http://i.stack.imgur.com/eqzM2.jpg)


title: Handling images with wrapfig - text around the image is not behaving, there must be a conflict somewhere

text: I am trying to control text after inserting an image. The text is being indented like around the image long even after the image ends on the page. It's like the `\end{wrapfigure}` statement does not execute where it is inserted, but after a few text paragraphs. I don't know hoe to attach the image to this question (just 145K). And I've tried to read other posts related to `wrapfig`, none helped. Here is my example:               \documentclass[11pt,twoside,fleqn,letterpaper]{article}       % ROMANIAN CHARACTERS        \makeatletter       \providecommand\textcommabelow[1]         {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex        \hbox{\check@mathfonts\fontsize\ssf@size\z@ \math@fontsfalse\selectfont,}\hidewidth}  \egroup}            \newcommand{\cS}{\textcommabelow S}       \newcommand{\cs}{\textcommabelow s}       \newcommand{\cT}{\textcommabelow T}       \newcommand{\ct}{\textcommabelow t}       % \cs\ \cS \ct\ \cT \^a \^A \u a \u A  \^\i\  \^I       % END ROMANIAN CHARACTERS            \usepackage{float}       \usepackage[margin=2.0cm]{geometry}       \usepackage{setspace}       \usepackage[pdftex]{graphicx}        \usepackage{wrapfig}       \setlength{\parindent}{0in}       \thispagestyle{empty}       \everymath{\displaystyle}       \doublespacing            \begin{document}          \large          \textbf{Solu\ct ie problema 6.}\\          \begin{wrapfigure}{l}{8.00 cm} \hspace*{-0.5cm}\includegraphics[height=100mm]{R1_01_P06.jpg} \end{wrapfigure}            \hspace*{1.0cm} Lu\u am punctele $A$ \cs i $B$ astfel \^inc\^at $A$ s\u a fie mai aproape de axa $Oy$ \cs i $B$  s\u a fie mai aproape de axa $Ox$\, (vezi figura). Not\u am coordonatele astfel: $A( x_{A}\,,\, y_{A} )$ \cs i $B( x_{B}\,,\, y_{B} )$\,.\\     \hspace*{1.0cm} Construim apoi simetricele lui $A$ \cs i $B$ fa\ct \u a de axele $Ox$ \cs i $Oy$ \cs i ob\ct inem punctele $A'$ \cs i $B'$\,.\\          \hspace*{3.0cm}\begin{minipage}[t]{6.5cm}     $A'$ este simetricul lui $A$ fa\ct \u a de axa $Oy$\,,\, iar $B'$ este simetricul lui $B$ fa\ct \u a de axa $Ox$\,.      Observ\u am c\u a avem deci coordonatele $( x_{B}\,,\, - y_{B})$ pentru $B'$ \cs i $( - x_{A} \,,\, y_{A} )$ pentru $A'$\,.\\[1.0cm]     \end{minipage}               \hspace*{1.0cm} Unim punctele $A'$ \cs i $B'$ printr-un segment de dreapt\u a \cs i not\u am cu $M$ intersec\ct ia segmentului $A'B'$ cu axa $Oy$\,,\, \cs i cu $N$ intersec\ct ia segmentului $A'B'$ cu axa $Ox$\,. Se observ\u a c\u a $A'M \,=\, AM$ \cs i $A'M_{2} \,=\, AM_{2}$ \cs i $A'M_{1} \,=\, AM_{1}$\,,\, egalitate care este adev\u arat\u a pentru orice punct de pe axa $Ox$ \^in raport cu punctele $A$ \cs i $A'$\,.\, La fel, se observ\u a c\u a $B'N \,=\, BN$ \cs i $B'N_{2} \,=\, BN_{2}$ \cs i $B'N_{1} \,=\, BN_{1}$\,,\, egalitate care este adev\u arat\u a pentru orice punct de pe axa $Oy$ \^in raport cu punctele $B$ \cs i $B'$\,.\\          Where is this text indented and why???\\          Where is this text indented and why???\\          \end{document}


title: How to Center a BeamerColorBox

text: The question is, how to horizontally center a `beamercolorbox` on the page? I put it in the `center` environment, but that doesn't work.               \setbeamercolor{bgcolor}{fg=black,bg=blue}     \begin{center}         \begin{beamercolorbox}[rounded=true, center=true, shadow=true, wd=6cm]{bgcolor}             Some text goes here...         \end{beamercolorbox}     \end{center}


title: How to 'center' 'page number' in beamer slides

text: When inserting page numbers into beamer slides, I usually use:               \setbeamertemplate{footline}[page number]      Then the page numbers will appear at bottom right. Is it possible to put the page numbers at the bottom center? considering that I also have other content (e.g. title, section) at bottom right and bottom left? For example, I want to put `\insertsection`, `\insertshorttitle`, and `page number` into each header of the slides. How could I make one on the left, one on the right and one in the middle?               \defbeamertemplate{headline}{my header}{%     \vskip1pt%     \insertsection%     \insertshorttitle%     \setbeamertemplate{footline}[page number]%     \usebeamertemplate{footline}%     }     \setbeamertemplate{headline}[my header]      I tried to center the `title` by `\insershorttitle[center]`, but it doesn't work.


title: What are the pros and cons pertaining to "latex -> dvipdfm" versus "latex -> dvips -> ps2pdf"?

text: There is another option to produce PDF actually, i.e., using pdftex. But let's omit it in this topic. I usually do "latex -> dvips -> ps2pdf" to get pdf output. My LaTeX input file contains eps graphics, pstricks codes, and plain text. I have not tried to use "latex -> dvipdfm". What are the pros and cons pertaining to both options?


title: How to create a link in a pdf document to open a file using a specified application installed on the machine?

text: Assume I have a file on my machine at `file:///c:\figure.bmp.` From my pdf document, that is created by LaTeX using hyperref.sty, how can I open `figure.bmp` using `mspaint.exe` (microsoft built-in image editor)? What is the correct command to do this scenario? If I call as follows               \href{file:///c:\figure.bmp}{To open the figure, click here.}      the `figure.bmp` will be opened using Illustrator (for example). Actually I can change the file association to open bmp using mspaint instead of illustrator. But, I prefer to find another elegant approach, i.e., by specifying both file to be opened and the application used to open.


title: Notepad++ automatically completing \begin{env} \end{env}

text: Is there a way to configure Notepad++ to do the following:   * After I type `\begin{env}` (and perhaps some shortcut keys), it automatically closes the environment with `\end{env}` and moves the cursor to a line between the opening and closure of the environment. Here `env` is any environment name. I know this can be done in Emacs, as is shown in Get emacs to automatically insert \end{} commands after a \begin{} command. I'm wondering if there's a Notepad++ equivalent.


title: How to draw process scheduling schemes?

text: I was wondering whether it was possible to draw something like the following in Latex. If so what kind of package do I need to use? An example: ![Scheduled processes](http://i.stack.imgur.com/XLBmi.png) Thanks!


title: Special Command and Caption

text: I use the following code excessivle,               \makeatletter     \def\ifinstr#1#2{%       \def\@ifinstr##1#2##2\@nil{%         \ifstrempty{##2}{\@secondoftwo}{\@firstoftwo}}%       \@ifinstr#1\@@nil#2\@nil     }          \def\popleft#1#2{%       \edef\@tmpa{#1}%       \expandafter\@popleft\expandafter{\@tmpa}{#1}{#2}}     \def\@popleft#1#2#3{%       \ifinstr{#1}{|}         {\@@popleft{#2}{#3}\q@nil#1\q@stop}         {\@@popleft{#2}{#3}\q@nil#1|\q@stop}}     \def\@@popleft#1#2\q@nil#3|#4\q@stop{\edef#1{#4}\edef#2{#3}}          \DeclareRobustCommand*\assignvalues[2]{\@assignvalues{#1}{#2}}     \def\@assignvalues#1#2{%       \edef\@tmpb{#1}\edef\@tmpc{#2}%       \popleft\@tmpb\currentvalueA       \popleft\@tmpc\currentvalueB       \csedef{\currentvalueA}{\currentvalueB}%       \ifdefempty\@tmpb{}{\assignvalues\@tmpb\@tmpc}%     }     \makeatother      But this piece of code doesn't work if i use the caption command in this way...               \assignvalues{bcaption}{Äußere Restfeuchte}      ....               \end{pspicture}     \caption[Warscheinlichkeitsverteilung~\protect\bcaption]{\space~\protect\bcaption\space (AD)}       The first compile works, but the second one generates an entry in the lof file the following entry will be shwon as               \contentsline {figure}{\numberline {1.12}{\ignorespaces Wahrscheinlichkeitsplot Äu\T 1\ss ere Restfeuchte Rohstoff C}}{11}{figure.caption.18}      Has anybody an idea what the problem could be, for sure its a combination of the code above and the caption argument, which has to be robust. But I cannot solve the problem at the moment. Any ideas? Update 1: MWE (non Working more than one times)               \documentclass{scrreprt}     \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage{lmodern}     \usepackage{textcomp} % Euro-Zeichen etc...     \usepackage{etoolbox}     \usepackage{graphicx}     \usepackage{caption}[2008/08/24]     \usepackage{pstricks}     \usepackage{pst-all}     \usepackage{pstricks-add}           \makeatletter     \def\ifinstr#1#2{%       \def\@ifinstr##1#2##2\@nil{%         \ifstrempty{##2}{\@secondoftwo}{\@firstoftwo}}%       \@ifinstr#1\@@nil#2\@nil     }          \def\popleft#1#2{%       \edef\@tmpa{#1}%       \expandafter\@popleft\expandafter{\@tmpa}{#1}{#2}}     \def\@popleft#1#2#3{%       \ifinstr{#1}{|}         {\@@popleft{#2}{#3}\q@nil#1\q@stop}         {\@@popleft{#2}{#3}\q@nil#1|\q@stop}}     \def\@@popleft#1#2\q@nil#3|#4\q@stop{\edef#1{#4}\edef#2{#3}}          \DeclareRobustCommand*\assignvalues[2]{\@assignvalues{#1}{#2}}     \def\@assignvalues#1#2{%       \edef\@tmpb{#1}\edef\@tmpc{#2}%       \popleft\@tmpb\currentvalueA       \popleft\@tmpc\currentvalueB       \csedef{\currentvalueA}{\currentvalueB}%       \ifdefempty\@tmpb{}{\assignvalues\@tmpb\@tmpc}%     }     \makeatother               \newcommand{\blankimageX}{     \begin{figure}[!ht]     \begin{center}     \psset{xunit=\scalex cm,yunit=\scaley cm, runit=\scaler cm}     \psCancel{\begin{pspicture}(\xstart,\ystart)(\xend,\yend)     % Achsen     % X-Achse     \psline(\xstart,\yistart)(\xend,\yistart)     % Y-Achse     \psline(\xstart,\yistart)(\xstart,\yend)     \psline(\xend,\yistart)(\xend,\yend)     \psline(\xstart,\yend)(\xend,\yend)     \end{pspicture}}     \caption[Wahrscheinlichkeitsplot \bcaption]{Wahrscheinlichkeitsplot \bcaption nach Anderson-Darling}          \label{\lab}     \end{center}     \end{figure}     }          \begin{document}     \tableofcontents     \listoffigures          \chapter{Chapter A}     \assignvalues{scalex|scaley|scaler|xstart|xend|ystart|yend|yistart}{1|1|1|0|8|0|5|-1}     \assignvalues{bcaption|lab}{Äußere Restfeuchte|fig:picdesc}          \bcaption          \section{Section A}     \chapter{Chapter B}          \blankimageX          \section{Section B}     \end{document}      LG Goldnas


title: lilypond enviroment inside a table

text: While making a song book I came to a point in which I wanted to insert lilypond code inside a table (tried also a box); this was due to some placing notes around texts and similarly things. But this returns some errors from which I deduced that it cannot be done in the way I'm doing it. The code looks like this:               \documentclass[a4paper]{article}     \begin{document}     \begin{tabular}{c}        first cell \\          \begin{lilypond} [fragment,relative=2,quote,staffsize=26,verbatim]          d4 c b a        \end{lilypond}      \end{tabular}     \end{document}      Can something like this be done? I want to keep text and notes music in one file. Importing once compiled lilypond notes would works by something like \includegraphic, but music and text would not be in the same file. Using MiKTex 2.9, Lilypond 2.18.2 on win 7. Files extensions are lytex and compilation is done lilypond-book at first and by pdflatex at second.


title: How can I make AUCTeX spell check in the language specified by babel and csquotes macros?

text: It is possible to make AUCTeX load the spelling dictionary of the language which `babel` is loaded with. One further convenience would be for it to appropriately react to changes of language within a document. Such changes can be made with macros of `babel` and `csquotes`. So, is it possible to make AUCTeX spell check in the correct language according to the language macros of a document? Here follows a test document. A solution would make AUCTeX automatically spell check the first paragraph in English and the other paragraphs should be spell checked according to the specified language.               \documentclass{article}          \usepackage[danish,english]{babel}     \usepackage{csquotes}          \begin{document}          In computing, a spell checker (or spell check) is an application     program that flags words in a document that may not be spelled     correctly.          \foreignquote{danish}{I computerterminologi er en stavekontrol en     design feature eller et software program designet til at tjekke     stavningen af ord i et dokument og som normalt kan komme med forslag     til stavningsforslag.}          \hyphenquote{danish}{I computerterminologi er en stavekontrol en     design feature eller et software program designet til at tjekke     stavningen af ord i et dokument og som normalt kan komme med forslag     til stavningsforslag.}          \foreignlanguage{danish}{I computerterminologi er en stavekontrol en     design feature eller et software program designet til at tjekke     stavningen af ord i et dokument og som normalt kan komme med forslag     til stavningsforslag.}          \begin{hyphenrules}{danish} I computerterminologi er en stavekontrol     en design feature eller et software program designet til at tjekke     stavningen af ord i et dokument og som normalt kan komme med forslag     til stavningsforslag.     \end{hyphenrules}          This sentence should be spell checked with an English dictionary.          \end{document}


title: Blackboard bold characters of the txmia font

text: I included the blackboard bold characters adding the following lines to my preamble. (Inspired by txfonts.sty)               \let\mathbb\relax     \DeclareSymbolFont{lettersA}{U}{txmia}{m}{it}          \DeclareMathSymbol{\m@thbbch@rA}{\mathord}{lettersA}{129}     \DeclareMathSymbol{\m@thbbch@rB}{\mathord}{lettersA}{130}     \DeclareMathSymbol{\m@thbbch@rC}{\mathord}{lettersA}{131}     \DeclareMathSymbol{\m@thbbch@rD}{\mathord}{lettersA}{132}     \DeclareMathSymbol{\m@thbbch@rE}{\mathord}{lettersA}{133}     \DeclareMathSymbol{\m@thbbch@rF}{\mathord}{lettersA}{134}     \DeclareMathSymbol{\m@thbbch@rG}{\mathord}{lettersA}{135}     \DeclareMathSymbol{\m@thbbch@rH}{\mathord}{lettersA}{136}     \DeclareMathSymbol{\m@thbbch@rI}{\mathord}{lettersA}{137}     \DeclareMathSymbol{\m@thbbch@rJ}{\mathord}{lettersA}{138}     \DeclareMathSymbol{\m@thbbch@rK}{\mathord}{lettersA}{139}     \DeclareMathSymbol{\m@thbbch@rL}{\mathord}{lettersA}{140}     \DeclareMathSymbol{\m@thbbch@rM}{\mathord}{lettersA}{141}     \DeclareMathSymbol{\m@thbbch@rN}{\mathord}{lettersA}{142}     \DeclareMathSymbol{\m@thbbch@rO}{\mathord}{lettersA}{143}     \DeclareMathSymbol{\m@thbbch@rP}{\mathord}{lettersA}{144}     \DeclareMathSymbol{\m@thbbch@rQ}{\mathord}{lettersA}{145}     \DeclareMathSymbol{\m@thbbch@rR}{\mathord}{lettersA}{146}     \DeclareMathSymbol{\m@thbbch@rS}{\mathord}{lettersA}{147}     \DeclareMathSymbol{\m@thbbch@rT}{\mathord}{lettersA}{148}     \DeclareMathSymbol{\m@thbbch@rU}{\mathord}{lettersA}{149}     \DeclareMathSymbol{\m@thbbch@rV}{\mathord}{lettersA}{150}     \DeclareMathSymbol{\m@thbbch@rW}{\mathord}{lettersA}{151}     \DeclareMathSymbol{\m@thbbch@rX}{\mathord}{lettersA}{152}     \DeclareMathSymbol{\m@thbbch@rY}{\mathord}{lettersA}{153}     \DeclareMathSymbol{\m@thbbch@rZ}{\mathord}{lettersA}{154}          \DeclareRobustCommand*{\mathbb}[1]{\csname m@thbbch@r#1\endcsname}      Now I wonder whether there is a more elegant way to achieve this goal. But replacing the above with               \let\mathbb\relax     \DeclareMathAlphabet{\mathbb}{U}{txmia}{m}{it}      yields the typical `\mathfrak`-characters. (I should mention that the packages `fourier`, `amsmath`, `amssymb` are loaded.)


title: Using argument command as argument without brackets

text: I would not be surprised if this has been asked before, but my searches did not yield any results. Neither would it surprise me if this is not possible without doing some really dangerous hacking of the TeX kernel or something. But allow me to ask anyway. I use the following code as a shortcut for bold letters in math mode as recommended here:               \documentclass{memoir}     \usepackage{amsmath,bm,amsfonts}          \def\*#1{\bm{\mathrm{#1}}}          \begin{document}     Let $\*v$ be a vector in $\mathbb R^n$ with $A\*v = \*v$.     \end{document}      This is nice and handy in most contexts, but it sometimes gets tedious to write `\\*v` inside the argument of other commands. For instance, I may want to write the derivative of `\\*v` as `\dot{\\*v}`. I wonder if there is a way to avoid having to write the `{}`s. Concretely, what I want is to redefine the command `\\*` so that               $\dot\*v$      or even               $\dot\*{longvector}$      can be parsed correctly.


title: Putting an underscore in a \label

text: I am trying to use `pdflatex` to type set some files that have underscores in the `\label`. Such as `\label{abc_xyz}` and have been unsuccessful. I keep getting errors such as:               ! Missing \endcsname inserted.     <to be read again>                        \protect      MWE:               \documentclass[twoside]{article}     \def\itt{\tt #1}     \def\litt#1{\tt #1\label{#1}}     \begin{document}     \itt{pqr_mno}     \litt{abc_xyz}     \litt{xyz_abc}     \end{document}      I have made several changes and all have been unsuccessful. Any help would be appreciated


title: Indent Theorem like \hangindent, but for multiple paragraphs

text: I would like to create a theorem style which indents the theorem exactly like a \hangindent would do, expect that the indention should continue for **all paragraphs of the theorem**. For example:               Theorem 1.2.3: Lipsum Lorem ipsum dolor sit amet,         consectetuer adipiscing elit.  Ut purus elit,          vestibulum ut, placerat ac, adipiscing vitae, felis.              Curabitur dictum gravida mauris. Nam arcu libero,          nonummy eget, consectetuer id, vulputate ...      I tried this, but it does not work correctly:               \documentclass[parskip=half]{scrartcl}     \usepackage{amsthm,thmtools}     \usepackage{lipsum}     \usepackage{showframe}          \let\thm\relax     \declaretheoremstyle[         headfont=\bfseries,         bodyfont=\normalfont\leftskip2.5em,         headindent={-2.5em}     ]{INDENTthm}     \declaretheorem[         within=section,         style=INDENTthm,         name=Theorem     ]{thm}          \begin{document}     \begin{thm}         \lipsum[1]              \lipsum[2]     \end{thm}     \end{document}      What happens is that the theorem header suddenly has a negative indention relative to the page, i.e. starts just a little to the left of the actual page, although I would expect "2.5em-2.5em=0em"... :-)


title: Could't have permission to view the PDF (preview)

text: I am using mac, preview to check the PDFLaTeX files under the Texmaker.![enter image description here](http://i.stack.imgur.com/xgB75.png) [The file couldn’t be opened because you don’t have permission to view it.] To view or change permissions, select the item in the Finder and choose File > Get Info. But I can read and write. What' t the wrong? Thank you very much! I have check the preview again, But I still couldn't find the place where to change. Is it in the Services?enter image description here ![enter image description here](http://i.stack.imgur.com/xd4ia.png) ![enter image description here](http://i.stack.imgur.com/wsGSp.png)


title: How can I have doc/docstrip output more than one file?

text: I am trying to use `doc\docstrip` to write a small package. I have one main class `.dtx`, which is processed via an `.ins` file. Is it possible to include two small test files in the `.dtx` file and generate them via the `doc/docstrip` method or do I have to write them as separate files.


title: Exam Class : Points in the right Margin for \question

text: I've a `.tex` file with `\question` `\part` and `\subpart` (sample `.tex` file pasted in this question). I need all points in the right margin; currently for `\question` it's not coming in the margin. Also I want to replace default Question number with something like : "Q.1" (currently it's showing only "1") Can you please help to solve both issues mentioned above?               \documentclass[addpoints,answers,10pt]{exam}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage{tabularx}     \usepackage{nonfloat}     \usepackage{caption}     \usepackage{amsmath,amssymb}     \usepackage{lmodern}     \usepackage{textcomp}     \usepackage{ifpdf}     \usepackage[export]{adjustbox}     \marksnotpoints     \bracketedpoints     \pointsdroppedatright     \pointsinrightmargin     \pagestyle{headandfoot}     \headrule     \footrule     \renewcommand{\thepartno}{\Alph{partno}}     \newcolumntype{b}{X}     \newcolumntype{s}{>{\hsize=.1\hsize}X}     \begin{document}     \begin{questions}     \question{\textbf{ Solve ANY ONE}}[4]  \begin{parts}     \part[2]      Prepare a speech, to be belivered at your school, on the topic "Health is Wealth", on the occasion of world Health Day .     \part[2]     Solve Any TWO     \begin{subparts}     \subpart[1]  \rule{1cm}{0.4pt}  was known as peace-loving and cultured city-state. (Marathon, Athens, Sparta)     \subpart[1] The first tool made by man was  \rule{1cm}{0.4pt}  . (Hand axe, a Spear, an Adaze)     \subpart[1] Lord Buddha preached in  \rule{1cm}{0.4pt}  language. (Hindi, Pali, Sanskrit)     \end{subparts}     \end{parts}     \end{questions}     \end{document}


title: How can I use two x axes in pgfplots?

text: I would like to draw two x axes with ticks and legends in the bottom and top axes where one axis is a linear transformation of the other for the same y range. There is a similar application described in section 4.8.10 of the pgfplots manual for two y axes. Are two x axes possible using the axis environment?


title: Table and graphic frame

text: Is there any LaTeX package that can produce tables and figures like the example in the folowing image by default? ![wanted](http://i.stack.imgur.com/HKsVX.png) EDIT: I used `tcolorbox` but I did not get the result needed as I'm not familiar with its options. here is my code (I found it here)               \newtcolorbox{theorem}[1][]{     breakable,     enhanced,     colback=white,     colframe=black,     top=\baselineskip,     enlarge top by=\topsep,     overlay unbroken and first={       \node[xshift=100pt,thick,draw=black,fill=white,anchor=west] at (frame.north west) %       {\refstepcounter{theorem}\strut{\bfseries\theoname~\thetheorem}\if#1\@empty\relax\relax\else~: #1\fi};       }     }      and this is the result ![enter image description here](http://i.stack.imgur.com/xe5Bs.png) How can I customise it in order to be similar to the above one?


title: Page numbers using leaflet class

text: I'm attempting to typeset a very short paper as a pamphlet, and am doing so using the leaflet class. Using it, a two-page document is produced, each page having three columns, each treated as a page (e.g. a page break induces the same behavior as a column break would do in a multi-column document.) The class does not be default have page numbers (1-6), and they are not produced using the `fancyhdr` package. How could I obtain footers with centered page numbers?


title: How to add dot after \section number in headline and ToC, without adding dot to \ref command

text: I need `\section` (`\subsection`, `\subsubsection` ...) titles printed with dot after numbering. Example:   1. My Title For this purpose i use:               \renewcommand\thesection{\normalfont \arabic{section}.}          \renewcommand\thesubsection{\thesection\arabic{subsection}.}          \renewcommand\thesubsubsection{\thesubsection\arabic{subsubsection}.}          \renewcommand\theparagraph{\thesubsubsection\arabic{paragraph}.}      But this method also adds extra dot to `\ref{}` commands. So code "Look at section `\ref{section:label}`." produces string "Look at section 3.." Is there any way to add dot only to headlines and ToC, but not to references?


title: Define a pair/point as a pair/point along a path length METAPOST

text: Is it possible to define a pair as a point along a specified length of a path? so for example               beginfig     u=2cm;     path x;     x=(0,0)..u*dir(225);     %v= a point along a fraction of the length of x in a specific direction      endfig


title: PNAS style and non-latin characters in author's name

text: I am using style PNAStwo (for a submission to PNAS). However, its fonts for authors, affiliations and abstract seem do not contain non-latin characters like ł (`\l`) or ø (`\o`), and produce some _random_ symbols like `"`. (In the main text such letters work perfectly fine, tough.) Is there a workaround to use ł (which is part of my surname) in `\author{...}`? Ideally, in a way so my surname is parsed to `Migdał` or, at least, `Migdal`.


title: Polyglossia: Arabic Text, English Bibliography

text: I am writing a mainly Arabic book. But all the references are western/English. So I'd like the bibliography to appear left to right. I write:               \documentclass[12pt,english]{book}     \usepackage{polyglossia}     \setmainlanguage[numerals=maghrib]{arabic}     \setotherlanguage{english}     \newfontfamily\arabicfont[Script=Arabic,Scale=1.5]{Arabic Typesetting}          \begin{document}     \selectlanguage{arabic}     تجربة     \selectlanguage{english}     \nocite{*}     \bibliographystyle{plain}     \bibliography{MyRef}     \end{document}      and after compiling with XeTeX and BibTeX, I get: `Undefined control sequence \begin{thebibliography}{10}` But if I remove the `\selectlanguage{english}` command, then it works fine, but references are now right to left. EDIT: the (left to right) bibliography do appear correctly, although this need lots of iterations, deleting .aux files, deleting .bbl file, re-compiling, etc. But the error is always there and I believe there is something wrong.


title: How to change the color of Table of Contents from red to black?

text: Now the color of Table of Contents is red, i want it be black color. I use hyperref               \usepackage[colorlinks=true]{hyperref}      if I change it to               \usepackage{hyperref}      or               \usepackage[colorlinks=false]{hyperref}      Then, the red color is changed to black, but with a red color rectangle. How to make it as black color? just like as a normal book does


title: Find out which packages are used

text: I have written a LaTeX Document and it compiles fine on my machine, but now I would like to give the sources to someone else. Is there a quick way to list all the packages that have been used for compilation?


title: ConTeXt: Using system-installed TrueType/OpenType fonts

text: I'm trying to use Cambria for text and Calibri for headings in a ConTeXt document, but I don't understand what is happening at all, nothing seems to have any effect and in the end it falls back to LMRoman/LMSans. As a minimal starting point, I'm trying to recreate this document. I can just compile it with `lualatex` and it finds my fonts, they are installed system- wide through fontconfig. `pdffonts` shows that two TrueType faces from each family are embedded, nothing else.               \documentclass{minimal}     \usepackage{fontspec}     \setmainfont{Cambria}     \setsansfont{Calibri}     \begin{document}     Cambria \textsf{Calibri}     \emph{Cambria \textsf{Calibri}}     \end{document}      ![output1](http://i.stack.imgur.com/iZEgc.png) How do I create this document using ConTeXt? I tried this:               \setupbodyfont[Cambria]     %no idea how to set sans     \starttext     Cambria \sans{Calibri}     \em{Cambria \sans{Calibri}}     \stoptext      ![output2](http://i.stack.imgur.com/EBFoE.png) But only got LM, the log contained an error about `loc`, which isn't mentioned in my file, is this a bug in the typefile? It seems to try to do something with the argument but fails before loading...               fonts           > typescripts > unknown library 'loc'     (/usr/local/texlive/2013/texmf-dist/tex/context/base/type-imp-cambria.mkiv)      As far as I understand, both fontspec and ConTeXt use luatex' facilities to locate and load the fonts, so I don't have to install them manually, is that true? In my installation, `type-otf.mkiv` is empty except for a comment claiming that it's unnecessary since OTF fonts can be found by name. * * * With               \setupbodyfont[libertine]     \starttext ...      ![output3](http://i.stack.imgur.com/rFvRi.png) I get Biolinum as the roman font and Libertine as sans, but only for the first `\sans`, everything in `\em` is roman.


title: Basic tkz-graph usage problems, errors, bad output

text: I'm using TeXLive 2011 via MacTeX, and I keep my packages updated. I'm trying to start simple with `tkz-graph`. When I use the following code, copied directly from the `tkz-graph` documentation:               \begin{tikzpicture}         \GraphInit[vstyle=Classic]         \Vertices[Lpos=90,unit=2]{circle}{A,B,C,D,E,F}     \end{tikzpicture}      I get the error               Latex Error: ./myfile.tex:26 Package xkeyval Error: `unit' undefined in families `vertex'.      And when I try this:               \begin{tikzpicture}         \GraphInit[vstyle=Classic]         \Vertices{circle}{A,B,C,D,E,F}     \end{tikzpicture}      The output is:   ![](http://i.stack.imgur.com/joRjK.png) Clearly something is very wrong, but what is it? How can I fix this? * * * **Edit:** Minimum breaking example:               \documentclass{article}     \usepackage{tkz-graph}          \begin{document}     \begin{tikzpicture}         \GraphInit[vstyle=Classic]         \Vertices[Lpos=90,unit=2]{circle}{A,B,C,D,E,F}     \end{tikzpicture}     \end{document}      And more information:               $ tlmgr show tkz-graph     package:     tkz-graph     category:    Package     shortdesc:   Draw graph-theory graphs.     longdesc:    The package is designed to create graph diagrams as simply as possible, using TikZ     installed:   Yes     revision:    22832     cat-version: 1.00     cat-date:    2011-06-24 10:33:31 +0200     cat-license: lppl     collection:  collection-pictures      And it's not my editor, either — if I run `latex` or `pdflatex` directly from the command line, the same thing happens. * * * **More edit:** in addition, it seems that even using `\SetGraphUnit` results in an `Undefined control sequence.` error. Including `\listfiles`:                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     tkz-graph.sty    18/11/2008 v 2.7d base for graphs         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)       ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)      xkeyval.sty    2008/08/13 v2.6a package option processing (HA)      xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)         tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)          pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)       pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)       pgfrcs.code.tex      pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)      ltxcmds.sty    2011/04/18 v1.20 LaTeX kernel commands for general use (HO)       pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)       pgfsys.code.tex     pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive      pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)       pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)      pgfkeys.sty          pgfkeys.code.tex       pgffor.code.tex         tikz.code.tex     supp-pdf.mkii     pdftexcmds.sty    2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf       grfext.sty    2010/08/19 v1.1 Managing graphics extensions (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Defining keys (HO)     kvoptions.sty    2010/12/23 v3.10 Keyval support for LaTeX options (HO)     kvsetkeys.sty    2011/04/07 v1.13 Key value parser (HO)     etexcmds.sty    2011/02/16 v1.5 Prefix for e-TeX command names (HO)     epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live      ***********


title: Is it possible to remove specific section page number in TOC without losing page numbers for its subsections?

text: \documentclass[twoside,onecolumn,11pt,reqno, a4paper]{amsart}      \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amssymb}     \usepackage{mathrsfs}     \usepackage{graphicx}     \makeatletter     \def\@tocline#1#2#3#4#5#6#7{\relax       \ifnum #1>\c@tocdepth % then omit       \else         \par \addpenalty\@secpenalty\addvspace{#2}%         \begingroup \hyphenpenalty\@M         \@ifempty{#4}{%         \@tempdima\csname r@tocindent\number#1\endcsname\relax         }{%         \@tempdima#4\relax         }%         \parindent\z@ \leftskip#3\relax \advance\leftskip\@tempdima\relax         \rightskip\@pnumwidth plus4em \parfillskip-\@pnumwidth         #5\leavevmode\hskip-\@tempdima         \ifcase #1         \or\or \hskip 1em \or \hskip 2em \else \hskip 3em \fi%         #6\nobreak\relax         \dotfill\hbox to\@pnumwidth{\@tocpagenum{#7}}\par         \nobreak         \endgroup         \fi}     \makeatother     \usepackage{hyperref}          \begin{document}      \pagenumbering{roman}     \tableofcontents     \cleardoublepage     \maketitle     \begin{abstract}     \end{abstract}          \pagenumbering{arabic}          \setcounter{page}{1} %reset the page counter          \section{Introduction}          \section{Section}          \subsection{Subsection}          \subsection{Subsection}          \subsection{Subsection}          \section{Section}          \section{Section}          \subsection{Subsection}     \subsection{Subsection}     \subsection{Subsection}     \subsubsection{subsub}     \subsubsection{subsub}     \subsubsection{subsub}     \section{Section}     \section{Section}               \appendix          \subsection{Subsection}          \subsection{Subsection}          \subsection{Subsection}     \begin{thebibliography}{3}     \end{thebibliography}     \end{document}


title: Unable to Move Root Directory

text: I want to use the newest beta-version of exam.cls to create my assessments (I teach high school math and physics). I obtained it and successfully created my local directory using this source: http://docs.miktex.org/2.8/manual/localadditions.html As mentioned at bottom in Figure 4.8 of above source, the order in the list determines which directory is searched first. I am unable to move my local directory above the installation directory. (The option to move Up/Down is not highlighted.) Therefore, every time I compile my exam, MikTeX tells me I'm missing the exam.cls and that I should install it. Upon saying no, it compiles anyway because I do have exam.cls that it just now found in the local directory. The workaround I've found is to not allow MikTeX to search for/install any missing packages I may need (by going into Settings and disabling it), but I'm not satisfied with this. Is there something I must do to get the option to move root directories up/down the list? I have extensively searched for a solution but have been unable to find one. I apologize if this is a beginner question.


What is the default font size of a LaTeX document?


title: What does scale in the graphicx package actually do?

text: I ran into the following curiosity while using the graphicx package. When including two images of the same size, I scaled them using the same ratio (see example below). However the images didn't come out the same size. Does this have something to do with pixel density? Here is a MWE:               \documentclass{article}     \usepackage{graphicx}          \begin{document}         \includegraphics[scale=0.25]{ModularComponents0.png}           \includegraphics[scale=0.25]{ModularComponents1.png}     \end{document}      Here are the two images:![enter image description here](http://i.stack.imgur.com/QAYLh.png) ![enter image description here](http://i.stack.imgur.com/GinUc.png) and finally here is the screen shot of the MWE: ![enter image description here](http://i.stack.imgur.com/G9aLf.png)


title: A\b Using mcode package

text: How do I typeset "x=A\b" in mcode, which represents "matrix division" in MATLAB? Here is a MWE:               \documentclass[12pt]{report}     \usepackage{amsthm,amsmath, amssymb, paralist, fancybox, listings, mathtools, verbatim, textcomp}     \usepackage{mcode}     \usepackage[unicode,pdfborder={0 0 0 0}, colorlinks=true, urlcolor=red, linkcolor=black]{hyperref}     \usepackage{float}     \usepackage[font=small,labelsep=none]{caption}     \lstset{language=Matlab}     \begin{document}     In MATLAB, it can be solved by executing the statement \mcode{x  =  A \ b}     \end{document}


title: Consecutive \footcite commands and separating commas in the text

text: When using the `\footcite` commands with biblatex, it is not clear how the separating commas in the text should be handled. For instance, `\footcite{key1},\footcite{key2}` will be problematic in the text because of a normal comma separating two exponents. Intead, `\footcite{key1}\textsuperscript{,}\footcite{key2}` should be preferred but looks problematic. What is the right way to achieve the expected result?


title: How to use only one glyph from textcomp

text: I'd like to use the symbol given by `textordmasculine` from the `textcomp` package. But **I don't want to load** `textcomp` since it is too much and I only want that symbol (in fact I need the masculine order symbol with the underline and I didn't find this symbol except using `textcomp`). From CTAN I found               \DeclareTextSymbol{\textordmasculine}{TS1}{'272}     \DeclareTextSymbolDefault{\textordmasculine}{TS1}      but have no idea how to use these lines to load that symbol. If I use both I get               Encoding scheme `TS1' unknown. ...ontFamily{TS1}{cmr}{\hyphenchar\font\m@ne}     Encoding scheme `TS1' unknown. \DeclareFontFamily{TS1}{phv}{}


title: Getting this particular layout

text: For some time I've had in my mind a PDF I saw, and that I found exactly what I want to achieve for my classes. I'm a teacher at the University, and some times I want to give my students some material that serves both as a slide for me to present, and as a reference material for them to study. The PDF I'm refering to is here, and a sample here: ![sample page](http://i.stack.imgur.com/bxHhG.png) As you can see, it is similar to what can be achieved using some tweaking in Beamer, but I'm not sure if using Beamer is the right option here. To be more concrete, this is what I want, and I summarize the differences I see with Beamer:   1. Generate PDFs with a page size, say, half of an a4 (that displays nicely if you display it in a monitor). I know you can control page size in Beamer (not sure what is the best package for this (geometry?), but still, Beamer is oriented towards the screen.   2. Have by default big fonts (here Beamer is very flexible)   3. Instead of being oriented to frames (in Beamer you have `\begin{frame}` and `\end{frame}`), I would like it to be just a document in which I can insert some kind of `\newframe` command. For instance, in Beamer you divide the document in sections, but frames are _inside_ each section. Also, frames are by default with the text centered, so it is difficult to include "paragraphs", that can become study material when printed. Looking at the requirements again (and sorry for the length of the question), what I would like to have is a usual document that generates PDF (either with pdfLaTeX or XeLaTeX) with a flexible page size, bigger fonts for headings, and perhaps a `\newslide` command to step to the next slide/page. So the question is: given these requirements, what packages would you use to set up the page, bigger fonts, etc? (Preferably using some kind of configutation on Beamer, that I'm familiar with).


title: Cannot access column name in pgfplotsstable

text: I followed the standard way (to the extent of my knowledge) of accessing the column name in pgfplotstable but it doesn't seem to be working. This is the code:               \begin{figure}[H]     \pgfplotstabletypeset[         col sep=comma,         string type,         columns/name/.style={column name=$\epsilon$, column type={|c|}},         columns/surname/.style={column name=$\phi$, column type={|c|}},         every head row/.style={before row=\hline,after row=\hline},         every last row/.style={after row=\hline},         ]{test.csv}     \caption{Results}     \end{figure}      and this is what it generates: ![enter image description here](http://i.stack.imgur.com/Od7Ip.png) It is supposed to have `\phi` and `\epsilon` in there but it doesn't. This is what the data file test.csv contains               parameter,test     1,2     1,2     1,3      Thanks for the help.


title: need a front page (cover) before title page (apa6.cls)

text: I am new to LateX and want to create my M.Sc. Article with it (psychology, so I am using the `apa6.cls`). But here's a problem, I didn't find a solution for as of yet: I need a front/cover page as first page which appears before the usual title page (I am working in man style). Problem is, I would have to insert it right after begin document. But if the `\maketitle` command creating the title page doesn't come right after the begin document, it doesn't work correctly, as is also noted in the manual of the `apa6.cls`. That is, the Running Head is displayed without saying "RUNNING HEAD: HERE IS MY RUNNINGHEAD" but only "HERE IS MY RUNNING HEAD", so only the Running head itself, on my title page (hope you know what I mean). Inserting a front page from another file with `\input` doesn't work either.               \documentclass[ngerman,man,12pt,a4paper,noextraspace,donotrepeattitle]{apa6}     \usepackage[english,ngerman]{babel}          \begin{document}     \input{Deckblatt}     \maketitle      ("Deckblatt" is german for front page) Thanks for your Posts!


title: Keyword command parameters with table (tabular)

text: I am trying to make a command with named (key-value) parameters to produce a table row. The reason is that table has more than 9 columns (command parameters) that will have position changed, be deleted or added. So it is hard to keep it with regular command (both because positions and limited number of args). I tried to make it work with `xkeyval` package, but something gets broken inside table. Here is MWE:               \documentclass{article}     \usepackage{xkeyval}     \begin{document}          \makeatletter     \define@key{myrowkey}{name}{\def\MyRowName{#1}}     \define@key{myrowkey}{num}{\def\MyRowNum{#1}}     \makeatother          \newcommand\myrow[1]{       \setkeys{myrowkey}{#1}       \MyRowName, \MyRowNum & \\ \hline     }          \newcommand\myrowb[1]{       \setkeys{myrowkey}{#1}       \MyRowName & \MyRowNum \\ \hline     }          \begin{table}       \begin{tabular}{|c|c|}\hline         A & B \\ \hline         \myrow{name=Abc,num=2000}         \myrow{name=Def,num=2000}       \end{tabular}     \end{table}          \end{document}      Command `\myrow` works as I'd like it to, while `\myrowb` does not, i.e., it produces an error. If I replace `\def\MyRowName{...}` with `\newcommand\MyRowName{}` and then `\renewcommand\MyRowName{#1}` there is no error any more, but an empty cell instead of the value (num).


title: Section numbering with numbering like 1.11

text: How do I set my section numbers like the given format? I'm in need of the format given below. I'm using `gsm-l.cls`. I'm just using tags like:               \chapter{name}     \section{sectionname}     \begin{theorem}     \end{theorem}      Example: Chapter 1   1.1. Section name   Theorem: 1.1.1.   Theorem: 1.1.2.   Remark: 1.1.3.


title: How to use pstricks package within beamer? I know the pure English typseting method using pstricks in beamer, but failed xelatex pstricks beamer

text: In order to display simple figure, I began to learn `pstricks` package. I copied a piece of sample code to a `beamer` file. When I compile it, something goes wrong. How can I fix it? Process `latex->dvips->ps2pdf` does not work,neither with `xelatex`, who can help me? Here is the code:               \documentclass{beamer}     \usepackage{xeCJK}     \usepackage{tikz}     \usepackage{pstricks}     \setCJKmainfont{SimSun}     \setbeamertemplate{items}[square]     %\setbeamerfont{title}{WenQuanYi Zen Hei Mono}     %\setbeamercolor{title}{green}          \usetheme{CambridgeUS}     \setbeamertemplate{navigation symbols}{}     \begin{document}          \title{moumou专题}     \author{author}     \institute{moumou@gmail.com}     \date{2013-07-22}          \begin{frame}     \titlepage     \end{frame}          \begin{frame}[t]     %\tiny     \scriptsize     在平面直角坐标系$xoy$中,点B与点$\text{A}(-1,1)$关于原点O对称,P是动点,且直线AP与BP的斜率之积等于$-\dfrac{1}{3}$.\\     %\begin{enumerate}     %    \item 求动点P的轨迹方程;     %    \item 设直线AP和BP分别与直线$x=3$交于点M,N,问:是否存在点P使得$\bigtriangleup\text{PAB}$与$\bigtriangleup\text{PMN}$的面积相等?若存在,求出点P的坐标;若不存在,说明理由.     (I)求动点P的轨迹方程;\\     (II)设直线AP和BP分别与直线$x=3$交于点M,N,问:是否存在点P使得$\bigtriangleup\text{PAB}$与$\bigtriangleup\text{PMN}$的面积相等?若存在,求出点P的坐标;若不存在,说明理由.     %\end{enumerate}               \begin{tikzpicture}     \draw (0,0) -- (0,2) -- (2,0)-- (0,0);     \end{tikzpicture}     \end{frame}          \begin{frame}[t]     \begin{tikzpicture}     \draw (0,0) -- (0,2) -- (2,0)-- (0,0);     \end{tikzpicture}     \end{frame}          \begin{frame}[t]     \begin{tikzpicture}[domain=0:2]     \draw[thick,color=gray,step=.5cm,     dashed] (-0.5,-.5) grid (3,3);     \draw[->] (-1,0) -- (3.5,0)     node[below right] {$x$};     \draw[->] (0,-1) -- (0,3.5)     node[left] {$y$};     \draw plot[id=x] function{x*x};     \end{tikzpicture}          \end{frame}          \begin{frame}     \begin{pspicture}(0,0)(5,2)     \psline[linecolor=blue](1,1)(2,2)(3,1)(4,2)(5,1)     \psline[linearc=0.5,linecolor=red](1,1)(2,2)(3,1)(4,2)(5,1)     \end{pspicture}     \end{fram}               \end{document}      Here is the compiling information screenshot: ![compiling information](http://i.stack.imgur.com/0mYGZ.png)


title: How can I produce the history graph of a Git repository in LaTeX?

text: Is there a relatively simple way to produce the history graph of a git repository in LaTeX? I'm looking for something nicer-looking than the verbatim output of               git log --graph --oneline


title: Indented block in ConTeXt

text: I need to write pseudocode in ConTeXt. Since there is no documentation of the _t-algorithmic_ module, and because I don't have so much to write, I decided to format the code myself. Here is what I tried:               \def\>{\space\space\space\space}          {\bf for all} $i \in [0, 43[$\\     \>  blah blah      Sadly, this doesn't work. How can I indent a specific line ? Or an entire paragraph. Thanks !


title: \@currentlabelname and custom counter

text: Suppose I have a counter, say, count. I can do something like this               \setcounter{count}{0}     \refstepcounter{count}\thecounter{count}\label{cool}     \ref{cool}      This will give me "1" in the end. Now, I would like to be able to use `nameref` in the following way (which doesn't quite work, and which is the reason why I ask this question)               \setcounter{count}{0}     \refstepcounter{count}\thecounter{count}     \@currentlabelname{awesome:\thecount}}\phantomsection\label{cool}     \stepcounter{count}     \nameref{cool}      I would like the result to be `awesome:1`, but it will be `2` in this case, because when I do `nameref`, `\thecount` gives value `2`. The problem is that `\thecount` doesn't save the value at the point it's called. How do I fix this? As a side note, something like `\tag` (for equation) might work. For example, if I have `\tag{awesome:\thecount}\label{cool}` and have `\eqref{cool}` later on, I actually get the correct result.


title: Split-like environment inside cases environment

text: I'd like to have a `cases` environment with some cases that are too long to fit on one line. I tried this:               \begin{cases}       \begin{split}         long expression \\ second line of long expression       \end{split} & condition \\       ...      but I get the warning > Package amsmath Warning: Cannot use 'split' here; trying to recover with > 'aligned' on input line 201. It automatically replaces the `split` with an `aligned` environment, which looks like this: ![alt text](http://i.stack.imgur.com/CzsLG.png) Is there any way to get these long expressions to behave like they were in `split` or `multline` environments, with the top line flush left and the next line indented a little?


title: How can I get todonotes in the left margin

text: I want to use the package todonotes. Standard, the package prints the todo's in the right margin, while I want to have them in the left margin. Funny is, that in the manual itself they are placed in the left margin, but no documentation is given how to do that. How can I get my todonotes nicely in my left margin! (I am using `\usepackage[left=3.7cm,right=2cm,top=2cm,bottom=4.2cm]{geometry}` as my margins, if that's relevant. Also, if somebody thinks another package with the same functionality is better, please suggest)


title: Winedt 6.0 toc tree and window view automation?

text: I have several questions concerning possible features / configurations I am searching for in Winedt6. I'd like to do the following stuff but I even don't know if this is possible or if there are respective options: a) I'd like the tex tree to be built automatically all the time. That is, I don't want to click any button in order to refresh the tree. b) The TOC tree should show the numbering of the sections etc. c) I'd like to clone my window such that I can see and edit the very same file in two views/panes/windows in parallel/simultaneously. d) I want the TOC tree to expand till the level of sections by default. e) If I edit a file opened in Winedt6.0 with another editor, I want Winedt to update its Window silently without asking me if it should show the changes made externally. Any suggestions?


title: Problem with \begin{thebibliography}

text: Well i' m trying to include a bibliography in my essay, and I have about 7 or 8 references! I tried to include (let's say) the following lines but when compiling it results to an error.                \begin{thebibliography}{9}           \bibitem{notes} John W. Dower {\em Readings compiled for History 21.479.}  1991.           \bibitem{impj}  The Japan Reader {\em Imperial Japan 1800-1945} 1973:Random House, N.Y.           \bibitem{norman} E. H. Norman {\em Japan's emergence as a modern state} 1940: International Secretariat, Institute of Pacific Relations.           \bibitem{fo} Bob Tadashi Wakabayashi {\em Anti-Foreignism and Western Learning in Early-Modern Japan} 1986: Harvard University Press.           \end{thebibliography}      I put these just before the end document command. The error is the following ![error image](http://i.stack.imgur.com/aceUc.jpg) What am I doing wrong? My full code is about 3500 lines but it starts with               \documentclass[12pt]{report}     \usepackage{fullpage}     \usepackage[english,greek]{babel}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{wrapfig}     \usepackage[pdftex]{graphicx,color}     \usepackage{tabularx}     \usepackage{CV}     \usepackage{url}     \usepackage{array}     \usepackage{amsmath}     \usepackage{enumitem}     \usepackage{booktabs}     \usepackage{pgfplots}     \usepackage{sidecap}     \usepackage{appendix}     \usepackage{listings}     \usepackage{color}          \definecolor{light-gray}{gray}{0.80}     \begin{document}      The problem is that if I use just these lines , the bibliography, and the end command it compiles just right!!! Is it possible that something previous chapters interferes with the problem?


title: Manually set destination name for pdflatex

text: This question is related to an attempt to fix the following warning in my case. > pdfTeX warning (ext4): destination with the same identifier (...) has been > already used, duplicate ignored I have a counter, say named thm. If I use it, and then reset it, and then use it (by use, I mean `\refstepcounter`), I would get the error above. In my situation, I have other variables that helps differentiating between different these different instants. So I would like to be able to use these extra information to create new names for these destinations. So, the short question: is it possible to define some replacement for \refstepcounter so I can set the name manually? Thank you.


title: How to make images appear at their actual size?

text: Whenever I insert an image into my PDFTex document (using the code below) it seems to be resized to fit the width of the page. I know I can change this using the scale parameter, but that means I have to play with the scaling factor until it comes out roughly the size I actually created it.               \begin{center}     \includegraphics[scale=0.75]{ikonos.png}     \end{center}      Is there a way to display an image without scaling it to the width of the page?


title: Is there any site to get good and free font families?

text: Since I started to use XeTeX, I found out that having many font families installed is very useful when we want to change the look of the document? Does anybody know a place to get good fonts (if possible, families)?


title: Poisson distribution with tikzpicture

text: I am new to 'drawing' in LaTeX with pgfplots, tikz, etc. I am trying to plot a Poisson distribution with varying means. Here is what I have tried (based on this answer)               \documentclass{article}     \usepackage{pgfplots}     \pgfmathdeclarefunction{poiss}{1}{%       \pgfmathparse{(#1^x)*exp(-#1)/(x!)}%     }     \begin{document}     \begin{figure}     \begin{tikzpicture}     \begin{axis}[every axis plot post/.append style={       mark=none,domain=0:20,samples=20},       axis x line*=bottom,       axis y line*=left,       enlargelimits=upper]       \addplot {poiss(1)};       \addplot {poiss(2)};       \addplot {poiss(3)};     \end{axis}     \end{tikzpicture}     \end{figure}     \end{document}      What happens next is very strange to me; if I plot this with `domain=0:20,samples=20`, it looks like the following: ![poisson - 20 samples](http://i.stack.imgur.com/RGrF6.png) However, if I change `domain=0:10,samples=10`, it looks like the following: ![poisson - 10 samples](http://i.stack.imgur.com/IIgOj.png) You can see that the higher mean distributions are 'taller' than they should be, depending on the number of samples; the larger the number samples, the more correct the distributions look but obviously a graph going from 0 to 50 on the x-axis with nothing interesting after 10 is no good! I'm wondering why is this happening, and how can I fix it? Forgive me if it's something painfully obvious. Thanks.