title: Problem with axes and implicit plot : Shift enters the drawing of the axes and the implicit function

text: Observing this LaTeX example: I draw, with the `gnuplot` environment, one implicit curve (conic), a horizontal line and a vertical line (axes through the origin). I do not understand the result: the implicit fonction and also straight lines are not centered on the grid! I do not how to resolve this problem. Who can help me? Here, the entire file:               \documentclass[11pt,a4paper]{article}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{gnuplottex}     \usepackage[francais]{babel}          %\usepackage{tikz, pgfplots}             \usepackage{geometry}     \geometry{top=2cm, bottom=2cm, left=2cm, right=2cm}     % ------------------------------------------     \begin{document}          \begin{center}     \begin{gnuplot}[ scale=1.5]     # paramètres         phi = (38)*pi/180         g = 2         D = (0)*pi/180         I = pi/2         delta = 23.44*pi/180     # coefficients de la conique f(x,y)=0         A = sin(delta)**2-cos(phi)**2*sin(D)**2         B = sin(2*phi)*sin(D)*sin(I)+cos(phi)**2*sin(2*D)*cos(I)         C = sin(delta)**2-(sin(phi)*sin(I)+cos(phi)*cos(D)*cos(I))**2         D = g*(cos(phi)**2*sin(2*D)*sin(I)-sin(2*phi)*sin(D)*cos(I))         E = g*(sin(2*phi)*cos(D)*cos(2*I)+sin(2*I)*(sin(phi)**2-cos(phi)**2*cos(D)**2))         F = g**2*( sin(delta)**2-sin(phi)**2*cos(I)**2-cos(phi)**2*cos(D)**2*sin(I)**2+1/2*sin(2*phi)*cos(D)*sin(2*I))     # déclaration de la fonction implicite         f(x,y)=A*x**2+B*x*y+C*y**2+D*x+E*y+F     # quelques reglages         set cntrparam levels discrete 1.0         set isosamples 1500,1500         set xrange [-10:10]         set yrange [-10:10]         set title '$ax^2+bxy+cy^2+dx+ey+f=0$'         set ylabel '$y$'         set xlabel '$x$'         set size ratio 1         set nogrid         # show size         show offsets         set view 0,0         set cntrparam bspline         set contour base         unset surface         set table 'implicite.dat'         splot f(x,y), x, y         unset table     # représentation graphique de la fonction implicite         plot 'implicite.dat'  notitle w l     \end{gnuplot}     \end{center}     \end{document}


title: Lining numbers in bibitem label

text: I'm using luatex with `fontspec` and "Minion Pro" font. I want to typeset the labels in `thebibliography` environment in lining numerals instead of text numbers (as it is when you simply invoke Minion Pro), but couldn't achieve this. Could anybody help me with this?


title: Where is TeXfont in TeX Live 2012?

text: All of the font installation instructions in the ConTeXt Wiki say to use TeXfont. To my great despair, I can't seem to access TeXfontin my TeX Live installation on Windows. Given that I've installed all of the packages from TeXfont, how else should I install fonts into TeX Live 2012?


title: Latex template for Scientific Reports (Nature)

text: Don't know if this is the right place to ask for, but I googled around a lot with no success and I hope I can find here an help. Is there someone that has a Latex template for the online journal Scientific Report?


title: How to download MacTeX 2011 now that MacTex 2012 is available

text: Is there a way to download the older MacTeX-2011? I am transitioning to a new mac and would prefer to have both MacTeX2011 and the 2012 version available. I thought I was in luck when I found the the page: http://www.tug.org/mactex/2011, but sadly the link does not work and neither do the mirrors.


title: How to align bibliography to the left

text: I am using a custom bibliography style I created with makebst. For some reason, the references are not aligned to the left, only the first line is aligned to the left and the rest seems to be indented. How can I fix that. I use the package natbib and author-cite type of citations. ![Screenshot of bibliography layout in LyX](http://i.stack.imgur.com/GqYuV.png) This is the preamble of my document               \documentclass[12pt,a4paper,twoside,french]{article}     \usepackage{mathptmx}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \pagestyle{headings}     \usepackage[authoryear]{natbib}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \pdfpageheight\paperheight     \pdfpagewidth\paperwidth          \newcommand{\noun}[1]{\textsc{#1}}          \makeatother          \usepackage{babel}     \addto\extrasfrench{%        \providecommand{\og}{\leavevmode\flqq~}%        \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%     }          \begin{document}      It shows the bibliography the same way in LyX and TeXmaker. I uploaded the bst file as well : http://hu.lk/d5pn8ebdwjy8 How can I fix it ?


title: compare two diagrams side by side

text: I'm trying to compare two diagrams in pdf format side by side. I have this post - Two figures side by side to get some hint. This is the code that I'm coming up with.               \begin{figure}     \begin{minipage}[t]{0.45\linewidth}     \includegraphics[scale=0.30]{before.pdf}     \caption{(a) Before}     \end{minipage}%          \hfill\vrule\hfill     \begin{minipage}[t]{0.45\linewidth}     \includegraphics[scale=0.3]{after.pdf}     \caption{(b) After}     \end{minipage}%     \caption{Hello}     \end{figure}      And this is the result, which is not exactly what I expected. ![enter image description here](http://i.stack.imgur.com/ulR0r.png)   * What modifications are needed to make the pictures sit side by side?   * I just want the caption (a) Before and (b) After without any `Figure` prepended. What should I do?


title: IEEEtran authorrefmark and affiliation

text: How to change `IEEEtran` `\IEEEauthorrefmark` to numbered style 1, 2, 3... instead of the star and dagger marks and make the author affiliation as footnote in the first page?


title: CLSI on ubuntu 11.10 / 12.04 (EC2 instance) using chef

text: I'm trying to install CLSI on ubuntu 11.10 using chef (see: https://github.com/scribtex/clsi-chef). I'm trying to get a CLSI server up and running but I'm not able to :( Getting:               ================================================================================     Error executing action `install` on resource 'package[libreadline5-dev]'     ================================================================================          Chef::Exceptions::Package     -------------------------     libreadline5-dev has no candidate in the apt-cache          Resource Declaration:     ---------------------     # In /var/chef/cookbooks/nginx-passenger/recipes/default.rb           15: package "libreadline5-dev"      16: package "build-essential"          Compiled Resource:     ------------------     # Declared in /var/chef/cookbooks/nginx-passenger/recipes/default.rb:15:in `from_file'          package("libreadline5-dev") do       recipe_name "default"       retry_delay 2       cookbook_name :"nginx-passenger"       retries 0       action :install       package_name "libreadline5-dev"     end          [Wed, 14 Nov 2012 17:09:45 +0000] ERROR: Running exception handlers     [Wed, 14 Nov 2012 17:09:45 +0000] ERROR: Exception handlers complete     [Wed, 14 Nov 2012 17:09:45 +0000] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out     [Wed, 14 Nov 2012 17:09:45 +0000] FATAL: Chef::Exceptions::Package: package[libreadline5-dev] (nginx-passenger::default line 15) had an error: Chef::Exceptions::Package: libreadline5-dev has no candidate in the apt-cache      Is anyone able to successfully install it? I have added nginx-passenger in clsi.json so the line looks: > "run_list" : [ "mysql::server", "mysql::client", "nginx-passenger", "clsi" ]


title: \mathbb{Z} yields undefined control sequence error

text: I am using WinEdt 6 for compiling my TeX documents. I am getting an error with contains the line `$\mathbb{Z}$` showing that it is undefined control sequence. How should I rectify it? Should I include any math packages or something. I am a beginner in using TeX.


title: undefined control sequence on Expected value

text: I'm trying to type in conditional expected value E[yi|xi=x]=b1+b2*x, and no matter what I do it gives me error messages. Here is part of my code:               \usepackage{amsmath}          \[\mathbb{E}(\underline y_i \mid \underline x_i=x)=\beta_1+\beta_2*x\]      I searched for a dozen of pages and none of them worked. I'm using TeXworks.


title: How draw "nested" mathemathical sets?

text: I want to represent mathematical sets of number (R,Z,N) using nested circles like this: ![enter image description here](http://i.stack.imgur.com/YIHJH.png) This was very quickly created with gimp, but I am trying to do it properly in tikz but having some issue mainly to place circles and associated labels. I need a solution able to scale. What placement strategy should I use, I tried with > above =2 etc but it doesn't scale properly ?


title: Why doesn't LaTeX allow me to import my .eps file when I compile it?

text: Everything works perfectly except until the error below. I'm slightly new at LaTeX and perhaps I'm missing a package, but I already have the `graphicx` package. Any help will be greatly appreciated!               ! LaTeX Error: Unknown graphics extension: .eps.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.24 \includegraphics[width=2.6in]{02_1.eps}          ?


title: Creating multiple language versions from single latex source by fetching translation from file

text: I could not really find anything matching, maysome someone got an idea or a starting point: I want to maintain a collection of documents written in Kile, Using LaTeX converted by xetex into pdf format. These documents have to be updated from time to time. I required each document to be available in two or three languages. I do not want to maintain separate source files/collections for the different languages, since this will certainly lead to documents running out of sync. Instead I imagine something like this:               - each token of natural language ("phrase") will be enclosed in a macro     - the macro fetches the translation of the phrase from a local service     - this service could be a script reading translations from a file      Since there are applications suitable to maintain such phrase collections this appears to be a natural approach to me. However, I fail to find a good starting point..


title: Setting width of RawCaption

text: I have posted a question Different width for caption and floatfoot with floatrow (which contains a MWE) regarding setting caption and `\floatfoot` width in the `floatrow` package, which was answered so wonderfully! I was not sure if proper etiquette is to create a new question although related, so please feel free to let me know if I should have simply added this as a comment in the previous answer. In any case, I was wondering what the best way to set a custom width of the caption is, with regards to the method used in the previous question. I did some research and found Caption and footnote width with ctable, but it seems to pertain specifically to the `ctable` package and environment. So I was wondering what the best way to obtain a specific width for my caption in the first link would be. I wasn't sure if something like `minipage` or such would be a proper solution, or what the best/most proper way to define the width would be.


title: Align minipage on right side

text: I was thinking that this is a small matter, but I can't seem to get my head around this. I want to create a legend, which sits on the right side of the page. I created a `minipage` environment around the environment that I want to have on my right side and using `\begin{flushright}`. However, I can't add a title inside this minipage environment so that it gets displayed on top of the surrounded environment. The MWE is just an example. I don't use a table in my case. So how do align my title right above the other environment, in this case the table? MWE:               \documentclass[paper=a4,landscape]{scrartcl}     \usepackage{longtable}          \begin{document}              \begin{minipage}[t]{0.95\textwidth}             Some Title.             \begin{flushright}                 \begin{longtable}{ll}                     Bla & Bla \\                     Blubb & Blubb                 \end{longtable}                  \end{flushright}         \end{minipage}          \end{document}


title: Breaking an array of equations

text: I wanted to break long equations in an `array` environment. To do this, I used `dmath` environment from `breqn` package but it did not work. How can I write long equations in an `array` environment with line breaks? My attempt is as follows: ![LaTex Output from ScribTex.com](http://i.stack.imgur.com/CJSzU.png)               \documentclass[11pt,twocolumn]{article}     \usepackage{amsmath}     \usepackage{breqn}     \begin{document}     \begin{dmath*}       L_{\lambda}(\phi, \omega) =       \left\lbrace           \begin{array}{ll}             a \times b \times c \times d \times e \times f \times g \times h \times i \times j \times k \times l \condition[]{for $\phi$ even},             \\             a \times b \times c \times d \times e \times f \times g \times h \times i \times j \times k \times l \condition[]{for $\phi$ odd},           \end{array}       \right.     \end{dmath*}     \end{document}       # EDIT: Actual Equation : I thought the solution will be general so posted a nicer version of the problem earlier. Following is the actual equation I want to typeset. How can I typeset this equation nicely even with manual line breaks? ![output from scribtex.com](http://i.stack.imgur.com/xk7SQ.png)               \begin{dmath*}       L_{\lambda}(\phi, \omega) =       \left\lbrace           \begin{array}{ll}             2 \cos             \left[               \tanh \left(                 \frac{L_{\lambda-1}(\psi, \omega)}{2}                   \right) \times \tanh \left(                 \frac{L_{\lambda-1}(\psi, \omega+1)}{2}                   \right)             \right] \condition[]{for $\phi$ even},             \\             2 \sin             \left[               \tanh \left(                 \frac{B_{\lambda-1}(\psi, \omega+1)}{2}                   \right) \times \tanh \left(                 \frac{L_{\lambda-1}(\psi, \omega)}{2}                   \right)             \right] \condition[]{for $\phi$ odd},           \end{array}       \right.     \end{dmath*}


title: TikZ: bars width and size of plot

text: This is a followup on my previous question. I have tried to plot my data and I see the following now.![current image of the plot](http://i.stack.imgur.com/WLLrl.png) Would it be possible to define the size of the area that is used for the plot? I have tried to change the size with scale but that just does what it says. Is there also a way to use smaller bars? I'm trying to get nearly vertical lines (very narrow bars) stopping at 1 in my case. This is the part of the data file I'm trying to get working.               0.000021 1     0.000723 1     0.000835 1     0.024507 1     0.024628 1     0.027483 1     0.027548 1     0.027702 1     0.027778 1     0.027916 1


title: How to enable ligatures for emdash/endash in LuaTeX ?

text: I cannot switch on ligatures for emdash (---) and endash (--) in LuaLaTeX. Here is my test file:               % !Mode:: "TeX:UTF-8"     \documentclass{article}     \usepackage{fontspec}         \defaultfontfeatures{Ligatures=TeX}         \setmainfont{Cambria}         \setsansfont[Mapping=tex-text]{Calibri}     \usepackage{ifluatex,ifxetex}     \begin{document}          \ifxetex         This is XeTeX     \else\ifluatex         This is LuaTeX     \fi\fi          \section{rmfamily}     \rmfamily     \begin{enumerate}     \item <<double quote>> by ligatures \verb|<<ligatures>>|     \item «double quotes» by symbols \verb|«double quotes»|     \item en--dash by ligatures \verb|en--dash|     \item em---dash by ligatures \verb|em---dash|     \item en–dash by symbol \verb|en–dash|     \item em—dash by symbol \verb|em—dash|     \end{enumerate}          \section{sffamily}     \sffamily     \begin{enumerate}     \item <<double quote>> by ligatures \verb|<<ligatures>>|     \item «double quotes» by symbols \verb|«double quotes»|     \item en--dash by ligatures \verb|en--dash|     \item em---dash by ligatures \verb|em---dash|     \item en–dash by symbol \verb|en–dash|     \item em—dash by symbol \verb|em—dash|     \end{enumerate}          \end{document}       When it is compiled with XeLaTeX, `\sffamily` loaded with the obsolete option `Mapping=tex-text`                   \setsansfont[Mapping=tex-text]{Calibri}      activates the ligatures `\---` and `\--`, but in LuaTeX this options seemed to be equivalent to `Ligatures=TeX`, so that I don't know how to restore default (in LaTeX) behavior of these two ligatures. > Is it bug or a feature, introduced in a recent version of the `fontspec` > package? I've checked that the ligatures still work as expected under LuaTeX if I don't set OTF fonts by the commands                   \setmainfont{Cambria}         \setsansfont[Mapping=tex-text]{Calibri}


title: Equal dot spacing in table of contents and glossary

text: I want to make the dot separations I get using `\dotfill` in the `glossaries` package to match the dot separation I get in the `tocloft` package. The image below shows an entry from the table of contents on the top and an entry from the glossary on the bottom: ![compare](http://i.stack.imgur.com/Jwcm0.png) According to this answer, I can create a command called `\Dotfill` which has different spacing than `\dotfill`. Below is the definition for `\Dotfill` where the space between dots in `.33em`.               \makeatletter     \newcommand \Dotfill {\leavevmode \cleaders \hb@xt@ .33em{\hss .\hss }\hfill \kern \z@}     \makeatother      I can then use `\Dotfill` to add dots after the description in my glossary:               renewcommand*\glspostdescription{\Dotfill}      I can manually change `.33em` until the dot spacing appears to match, but is there a better way to do this? According to the documentation for tocloft, the value describing the space between the dots in the table of contents is given by `\@dotsep` which has default value 4.5. I am not sure how to utilize this in what is given above. Here is a minimal working example:               \documentclass{report}          \makeatletter     \newcommand \Dotfill {\leavevmode \cleaders \hb@xt@ .33em{\hss .\hss }\hfill \kern \z@}     \makeatother          \usepackage{tocloft}     \renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}          \usepackage[toc]{glossaries}     \makeglossaries     \renewcommand*\glspostdescription{\Dotfill}          \begin{document}          \newglossaryentry{Cab}{name={$C[a,b]$},sort=C,description={The space of continuous functions defined on $[a,b]$}}          \tableofcontents          \printglossary          \chapter{Chap 1}          \gls{Cab}          \end{document}      To compile, you must run `makeglossaries` in between calls to `latex`.


title: Hyphenation command does not work with Greek words

text: I am relatively new to LaTex. I am struggling to write a report that contains mixed Greek and English words. The main language of the report is Greek. Therefore, I use the babel package. However, latex keeps hyphenating the word "είναι" wrongly as "ε-ί-ναι" instead of "εί-ναι". Therefore, I tried to use the `\hyphenation` command as follows:               \documentclass[a4paper,12pt,twoside,openright]{report}     \usepackage{titlesec}     \usepackage[a4paper,inner=3.5cm,outer=2.5cm]{geometry}          \usepackage[english,greek]{babel}     \usepackage[utf8x]{inputenx}                    \usepackage{graphicx}     \usepackage[tight]{subfigure}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{cite}          \begin{document}     \selectlanguage{greek}          \hyphenation{εί-ναι}          \end{document}      However the `\hyphenation` command as used above generates the error: `Improper \hyphenation will be flushed \hyphenation{ε`. Is there a solution to this problem? Note that I tried the `\babelhyphenation[greek]{εί-ναι}` command but it is not recognized by LaTeX. I installed MikTex 2.9 (32-bit) for Win7. Any help will be much appreciated.


title: Rotate image according to pagenumber

text: For writing my master thesis I have an image in landscape that needs to be oriented correctly when it is eventually printed in a book. If the page with the image is on the left side (even page number) the image needs to be rotated 90 degrees, if it is on the right side (odd page number) it needs to be rotated -90 degrees. In both cases the bottom of the image needs to be near the spine of the book. Is there any way to do this automatically without me having to check each time if the image is oriented correctly? I'm using the `report` documentclass, if that helps.


title: multicolumn within the header of a longtabu and throw \omit errors

text: I've run into an error while using `longtabu`. I have an example of it working fine without `\multicolumn` in the header, and not working when I have a `\multicolumn` in the header.               \documentclass[10pt,letterpaper]{article}     \usepackage{comment}     \usepackage[top=2cm,bottom=4cm,left=2cm,right=2cm]{geometry}     \usepackage{colortbl}     \usepackage{tikz}     \usepackage{tabu}     \usepackage{longtable}     \usepackage{siunitx}          \begin{document}     \begin{longtabu} to \linewidth{|c|c|X|c|}     \hline     \rowfont\bfseries     \rowcolor{lightgray}     \multicolumn{2}{|c|}{From / To} & Description & Cost \\     \hline     \endfirsthead     \caption[]{(continued)}\\     \hline     \rowfont\bfseries     \rowcolor{lightgray}     From & To & Description & Cost \\     \hline     \endhead     \rowfont\bfseries     \multicolumn{4}{|l|}{\cellcolor{cyan}DAY 1 -- 2012-10-15} \\     \hline     1:00 & 2:00 & Action & \\     \hline     1:00 & 2:00 & Action & \\     \hline     \end{longtabu}          \begin{longtabu} to \linewidth{|c|c|X|c|}     \hline     \rowfont\bfseries     \rowcolor{lightgray}     From & To & Description & Cost \\     \hline     \endfirsthead     \caption[]{(continued)}\\     \hline     \rowfont\bfseries     \rowcolor{lightgray}     From & To & Description & Cost \\     \hline     \endhead     \rowfont\bfseries     \multicolumn{4}{|l|}{\cellcolor{cyan}DAY 1 -- 2012-10-15} \\     \hline     1:00 & 2:00 & Action & \\     \hline     1:00 & 2:00 & Action & \\     \hline     \end{longtabu}     \end{document}      Table 1 throws errors, Table 2 works fine. The only difference between the two is the use of `\multicolumn` in Table 1 in the header. I have tested with `\multicolumn` in firsthead and head separately and in both, and the same error is thrown.               ! Misplaced \omit.     \multispan ->\omit                     \@multispan      l.33   \end{longtabu}


title: How to write the documentclass into a file

text: Suppose I have received a selfcontained LaTeX source file, `main.tex`. It includes a file of macro definitions, `my_macros.tex`, that the author included in the preamble. This macro file is under my control, but, besides beeing included by the author, shall not interfer with the LaTeXing of the author. To make it more precise: The file `my_macros.tex` may well be empty, on the computer the author uses. But because the author is my customer, he agreed to including it. On my computer, I can fill `my_macros.tex` with whatever I like. Is it possible to write some macros, and put them into `my_macros.tex`, that do the following: After issuing               $ latex main.tex      I'll find a file in my filesystem, say `main.nem`, that contains the documentclass of the file `main.tex`. So if for example `main.tex` looked like this               \documentclass{eth_super_article}      % ...      \input{my_macros.tex}      % ....      \begin{document}      %....      \end{document}      then `main.nem` will contain the line and only the line               \documentclass{eth_super_article}


title: Is there a poisonous interaction between memoir, hyperref, and hyperxmp?

text: In another, now rather confused, question, I'm struggling to get copyright information into a PDF produced by `memoir`. The investigations so far have led to this problematical MWE:               % !TEX TS-program = XeLaTeX     % !TEX encoding = UTF-8 Unicode     \documentclass{article}     \usepackage{lipsum}     \usepackage{hyperref}     \usepackage{hyperxmp}     \hypersetup{         pdfauthor={Brent Longborough},         pdftitle={O Hai},         pdfcopyright={Copyright © 2012 by Brent Longborough. All rights reserved.},         }     \begin{document}     \lipsum[1]     \end{document}      which produces a PDF with the copyright notice successfully included in the metadata, and with the "PDF Producer" set to "XeTeX 0.9997" However, if I change the document class to:               \documentclass{memoir}      then I get no copyright notice, and the PDF Producer is now set to "xdvipdfmx (0.7.8)". After an hour or so ploughing through `memoir.sty` and `memhfixc.sty`, I'm flummoxed. Does anyone have any idea where to look next?


title: Float error with PNAS template

text: I'm attempting to use the PNAS template at writelatex.com however I'm encountering a strange compiling error when the default title is changed to one that is long enough to require a second line, and if any of the characters on that second line have tails (i.e. elements which go beneath the line). The error "Float(s) Lost" is shown in this screenshot: https://www.dropbox.com/s/nvaz1bhu9h6ys0c/Screenshot%202014-04-20%2015.47.26.png The template is available here: https://www.writelatex.com/979364xxsmgy Note the error occurs on my own local latex install as well as on writelatex.com. Can anyone advise on the cause of the problem?


title: How can I left-justify a paragraph cell in a table?

text: I have a table of maths as below, where I've used the `p{}` attribute to allow the list of partitions to wrap inside the cell. The problem is that it also justifies the column, which looks very strange for the rows 6-10 because you get huge gaps. What I want is the list of partitions to be left-justified with standard spacing, like in the first few rows, but still able to spill over onto multiple rows.               \usepackage{amsmath}          \begin{document}          \begin{table}     \renewcommand{\arraystretch}{1.3}      \begin{center}      \label{pntable}      \begin{tabular}{|c|p{6.5cm}|c|}      \hline      \textbf{Integer} & \textbf{Partitions} & \textbf{Number of partitions} \\ \hline      1 & 1 & 1 \\ \hline      2 & 2, 1+1 & 2 \\ \hline      3 & 3, 2+1, 1+1+1 & 3 \\ \hline      4 & 4, 3+1, 2+2, 2+1+1, 1+1+1+1 & 5 \\ \hline      5 & 5, 4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1, 1+1+1+1+1 & 7 \\ \hline      6 & 6, 5+1, 4+2, 4+1+1, 3+3, 3+2+1, 3+1+1+1, 2+2+2, 2+2+1+1, 2+1+1+1+1, 1+1+1+1+1+1 & 11 \\ \hline      7 & 7, 6+1, 5+2, 5+1+1, 4+3, 4+2+1, 4+1+1+1, 3+3+1, 3+2+2, 3+2+1+1, 3+1+1+1+1, 2+2+2+1, 2+2+1+1+1, 2+1+1+1+1+1, 1+1+1+1+1+1+1 & 15 \\ \hline      8 & 8, 7+1, 6+2, 6+1+1, 5+3, 5+2+1, 5+1+1+1, 4+4, 4+3+1, 4+2+2, 4+2+1+1, 4+1+1+1+1, 3+3+2, 3+3+1+1, 3+2+2+1, 3+2+1+1+1, 3+1+1+1+1+1, 2+2+2+2, 2+2+2+1+1, 2+2+1+1+1+1, 2+1+1+1+1+1+1, 1+1+1+1+1+1+1+1 & 22 \\ \hline      9 & 9, 8+1, 7+2, 7+1+1, 6+3, 6+2+1, 6+1+1+1, 5+4, 5+3+1, 5+2+2, 5+2+1+1, 5+1+1+1+1, 4+4+1, 4+3+2, 4+3+1+1, 4+2+2+1, 4+2+1+1+1, 4+1+1+1+1+1, 3+3+3, 3+3+2+1, 3+3+1+1+1, 3+2+2+2, 3+2+2+1+1, 3+2+1+1+1+1, 3+1+1+1+1+1+1, 2+2+2+2+1, 2+2+2+1+1+1, 2+2+1+1+1+1+1, 2+1+1+1+1+1+1+1, 1+1+1+1+1+1+1+1+1 & 30 \\ \hline      10 & 10, 9+1, 8+2, 8+1+1, 7+3, 7+2+1, 7+1+1+1, 6+4, 6+3+1, 6+2+2, 6+2+1+1, 6+1+1+1+1, 5+5, 5+4+1, 5+3+2, 5+3+1+1, 5+2+2+1, 5+2+1+1+1, 5+1+1+1+1+1, 4+4+2, 4+4+1+1, 4+3+3, 4+3+2+1, 4+3+1+1+1, 4+2+2+2, 4+2+2+1+1, 4+2+1+1+1+1, 4+1+1+1+1+1+1, 3+3+3+1, 3+3+2+2, 3+3+2+1+1, 3+3+1+1+1+1, 3+2+2+2+1, 3+2+2+1+1+1, 3+2+1+1+1+1+1, 3+1+1+1+1+1+1+1, 2+2+2+2+2, 2+2+2+2+1+1, 2+2+2+1+1+1+1, 2+2+1+1+1+1+1+1, 2+1+1+1+1+1+1+1+1, 1+1+1+1+1+1+1+1+1+1 & 42 \\ \hline      \end{tabular}      \end{center}      \caption{All the partitions of $n \in \{1,\ldots,10\}$}     \end{table}          \end{document}      Apologies in advance because I'm sure this will have been answered before, but I can't find it anywhere and really need some help!


title: algorithmic, arbitrary names for algorithms

text: The question is advanced version of my previous one. I need to name algorithms (package algorithmic) with arbitrary names so it appears like:               Algorithm MyAlgo      and `\ref{...}` will appear like `MyAlgo`. Next code is (by cmhughes) puts A in front of a number:               \documentclass{article}          \usepackage{algorithm}     \usepackage{algpseudocode}     \renewcommand{\thealgorithm}{A\arabic{algorithm}}          \begin{document}          \begin{algorithm}         \caption{Euclid’s algorithm}         \label{alg:euclid}         \begin{algorithmic}[1]             \Procedure{Euclid}{$a,b$}\Comment{The g.c.d. of a and b}             \State $r\gets a\bmod b$             \While{$r\not=0$}\Comment{We have the answer if r is 0}             \State $a\gets b$             \State $b\gets r$             \State $r\gets a\bmod b$             \EndWhile\label{euclidendwhile}            \State \textbf{return} $b$\Comment{The gcd is b}            \EndProcedure        \end{algorithmic}     \end{algorithm}          Test reference: \ref{alg:euclid}          \end{document}      But how to do it for arbitrary algorithm name? EDIT: Maybe I was unclear in my question. What I need is assigning to algorithms arbitrary names without numbering, so that `\ref{...}` will appear as name of the algorithm.


title: Image as a header extend the top of page limits

text: How can I get one image as a header that is not just the header but extends to the top of the page limits and also left and right? I have see this Minipage in Header? but is not to have the image to the top of the page limits, and this How do I put the top of an image at the top of a page but I do not understand what to do I have tried this but the result is not the expected. When Ι replace `width=\textwidth` with `width=\pagewidth` does not work.               \documentclass{article}          \usepackage{kantlipsum}     \usepackage{fancyhdr}     \usepackage[demo]{graphicx}          \usepackage[right=2.5cm,left=2.5cm,top=2.5cm,bottom=2.0cm,total={165mm,243mm},showframe,includeheadfoot]{geometry}          \pagestyle{fancy}          \fancyhead[L]{%     % \centering     % \vspace{-7cm}       \includegraphics[width=\textwidth,height=2.5cm]{logo.png}     }          % \fancyfoot[L]{\thepage}               \begin{document}     \kant     \end{document}      ![enter image description here](http://i.stack.imgur.com/sD7rf.png) **Update-1** What I want is probably very close to this approach http://www.texample.net/tikz/examples/fancy-chapter-headings/ but not be connected to the chapter but with one image


title: How to typeset a file path?

text: I would like to properly typeset a file path, e.g.               C:\Program Files\Some program\bin\executable.exe      The first problem I encountered was that LaTeX tries to treat `\Program` as a command. I tried escaping it with another backslash which created a linebreak. Then I found this package menukeys but I am not really happy because it typesets system-specific delimiters (i.e. `\` for Windows and `/` for Unix- like) as some weird arrows. Which leads to my question: what is the preferred way of typesetting a file path in LaTeX?


title: Page Number in Lyx

text: I would like to know how one would go about finding if you have started another page in Lyx. Is there anyway within the Lyx GUI to show where a new page will begin or end ? At the moment ..I am compiling a PDF and then adding 'page breaks' e.t.c from. Cheers B


title: How can I auto adjust a equation to appear in the entire page? (Scale to equations, is this exist?)

text: If I have a document like this:               \documentclass[landscape, 12pt]{report}          \usepackage[landscape]{geometry}          \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{amsmath, amssymb, graphics, setspace}     \newcommand{\mathsym}[1]{{}}     \newcommand{\unicode}[1]{{}}     \newcounter{mathematicapage}          \begin{document}    \begin{equation}\label{Equation:Naive_Bayes_Classifier}         P\left(H_h|E_1,E_2,\ldots ,E_e,\ldots    E_{\mathbb{E}}\right)=\frac{P\left(H_h\right) P\left(E_1|H_h\right)    P\left(E_2|H_h,E_1\right) \text{$\ldots $P}         \left(E_e|H_h,E_1,E_2,\ldots ,E_{e-1},E_{e+1} \ldots, E_{\mathbb{E}}\right) \text{$\ldots    $P}         \left(E_{\mathbb{E}}|H_h,E_1,E_2,\ldots ,E_{\mathbb{E}-1}\right)}{ P\left(E_1,E_2,\ldots,E_e, \ldots    ,E_{\mathbb{E}}\right)}     \end{equation}     \end{document}      How can I auto adjust this equation to appear in the entire page, using all horizontal space? (Without badboxes or smaller than the width of the page?) If is there a kind of scale to use in equations, giving explicity how greater the equation should become, this solver my problem too.


title: Change font of one frame in beamer

text: I'm writing a presentation using beamer, and I'd like to change the font of one frame only, or alternatively a part of one frame. I imagined this would be a common problem, but after quite a bit of searching I can't find anything that solves my problem.


title: Use specific font in LyX

text: I would like to use some of theese greek fonts in LyX for my thesis: http://aka-acid.com/fontsscript.html I installed the theme but I don't know how to use it in LyX I also installed XeTeX Can someone who uses LyX, guide me step by step?


title: XeLaTeX: Space between letters

text: I use XeLaTeX. I need that words look stretched in some places in the document. How I can configure the space between letters in a word?


title: Latex Quit: ! Undefined control sequence. l.62 \@writef

text: I was updating my tutor handouts for calculus and suddenly the whole thing refuses to compile. I have no idea what is wrong or why it is saying this. All I changed were some equations and I added a               \begin{aling}     text     \end{align}      This is line 62:               \let\originaleqref\eqref      I use it for `refs`, and it always worked until now.               \let\originaleqref\eqref \renewcommand{\eqref}{Eq.~\originaleqref}     \newcommand{\tref}[1]{Table (\ref{#1})}      \newcommand{\fref}[1]{Fig.     (\ref{#1})}      Please help me get this to work! I need to hand this out tomorrow.=/


title: Disable exceptional behavior of the first page in letter

text: I use the following code for my letter: \documentclass[a4paper, 11pt]{letter}               \usepackage{fontspec}     \usepackage{fancyhdr}               \newcommand{\DocumentTitle}{Motivation Letter}     \newcommand{\Author}{Johm Smith}          \setmainfont{Times New Roman}          \usepackage[hmargin=1in,vmargin=1in]{geometry}     \linespread{1.3}          \pagestyle{fancy}     \fancyhf{} % clear all header and footers     \fancyhead[L]{\DocumentTitle \\ \Author}     \fancyhead[R]{\thepage}     \fancyfoot[L]{\DocumentTitle \\ \Author}     \fancyfoot[R]{\thepage}          \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     \thispagestyle{fancy}          \begin{document}          \begin{letter}{ }          \signature{\Author}          \opening{To Whom It May Concern,}     \closing{Respectfully,}          \end{letter}          \end{document}      But there is no these header and footer on the first page. How to change this behavior?


title: Difference between \pgfmatharray{\a}{0}, \pgfmathparse{\a[0]}, and \pgfmathparse{array(\a, 0)}

text: There are at least 4 different (in code a-d) ways to access items in lists/arrays. Out of curiosity I wanted to see what happens with different combinations. I selected 6 different (in code A-F) input scenarios and tested them 2 levels deep. That means potentially 4*4*6=96 tests.               \documentclass{standalone}     \usepackage{tikz}     \usepackage{ifthen}     \begin{document}          \message{^^J}          \begin{tikzpicture}       \def \A {{{{9, 8, 7}}, {{6, 5}}}}       \def \B {{{9, 8, 7}, {6, 5}}}       \def \C {{9, 8, 7}}       \def \D {{{9, 8, 7}}, {{6, 5}}}       \def \E {{9, 8, 7}, {6, 5}}       \def \F {9, 8, 7}            \def \tests#1#2#3       {         \begingroup         \edef \depth {3.0}         \edef \olddepth {#3}         \def \arecurse {0}         \def \brecurse {0}         \def \crecurse {0}         \def \drecurse {0}              \pgfmathparse{\olddepth + 1}         \edef\newdepth{\pgfmathresult}              \ifthenelse{\equal{\newdepth}{\depth}}{}         {           \message{input (#1):}           \message{#2 ^^J}                %% a           \message{ foreach (#1+a):}           \foreach \x in #2           {             \xdef \aa {\x}             \message{\aa ^^J}             \breakforeach           }                %% b           \message{ pgfmatharray (#1+b):}           \pgfmatharray{#2}{0}           \edef \bb {\pgfmathresult}           \message{\bb ^^J}                %% c           \message{ pgfmathparse + index (#1+c):}           \ifthenelse{\equal{#1}{Ba} \or                       \equal{#1}{Da} \or                       \equal{#1}{F}}           {             \def \crecurse {1}             \message{Error ^^J}           }{             \pgfmathparse{#2[0]}             \edef \cc {\pgfmathresult}             \message{\cc ^^J}           }                %% d           \message{ pgfmathparse + array (#1+d):}           \ifthenelse{\equal{#1}{Ad} \or                       \equal{#1}{Ba} \or                       \equal{#1}{Bd} \or                       \equal{#1}{D} \or                       \equal{#1}{Da} \or                       \equal{#1}{E} \or                       \equal{#1}{F}}           {             \def \drecurse {1}             \message{Error ^^J}           }{             \pgfmathparse{array(#2, 0)}             \edef \dd {\pgfmathresult}             \message{\dd ^^J}           }                \ifthenelse{\arecurse = 0}{\tests{#1a}{\aa}{\newdepth}}{}           \ifthenelse{\brecurse = 0}{\tests{#1b}{\bb}{\newdepth}}{}           \ifthenelse{\crecurse = 0}{\tests{#1c}{\cc}{\newdepth}}{}           \ifthenelse{\drecurse = 0}{\tests{#1d}{\dd}{\newdepth}}{}         }         \endgroup       }            \tests{A}{\A}{0.0}       \tests{B}{\B}{0.0}       \tests{C}{\C}{0.0}       \tests{D}{\D}{0.0}       \tests{E}{\E}{0.0}       \tests{F}{\F}{0.0}     \end{tikzpicture}     \end{document}      In output, the performed operations can be deduced from the string inside parentheses. For example `(Aa+b)` or `(Aab)` means using input `A:{{{{9, 8, 7}}, {{6, 5}}}}` to `/foreach` to select the first item followed by `\pgfmatharray` to select the first item. Some combinations will produce an error so they are skipped by `\ifthenelse` for the code to complete. There are some interesting results. Some of the inputs, I know, are abominable, but curiosity makes me ask why the particular things produce the outputs? `foreach` works quite consistently               input:                        foreach:     (A): {{{9, 8, 7}}, {{6, 5}}}  (A+a): {{9, 8, 7}}, {{6, 5}}     (Aa): {{9, 8, 7}}, {{6, 5}}   (Aa+a): {9, 8, 7}     (Ab): {9}{8}{7}               (Ab+a): {9}{8}{7}     (Ac): {{9}{8}{7}}             (Ac+a): {9}{8}{7}     (Ad): {9}{8}{7}               (Ad+a): {9}{8}{7}     (B): {{9, 8, 7}, {6, 5}}      (B+a): {9, 8, 7}, {6, 5}     (Ba): {9, 8, 7}, {6, 5}       (Ba+a): 9, 8, 7     (Bb): {9}{8}{7}               (Bb+a): {9}{8}{7}     (Bc): {{9}{8}{7}}             (Bc+a): {9}{8}{7}     (Bd): {9}{8}{7}               (Bd+a): {9}{8}{7}     (C): {9, 8, 7}                (C+a): 9, 8, 7     (Ca): 9, 8, 7                 (Ca+a): 9     (Cb): 9                       (Cb+a): 9     (Cc): 9                       (Cc+a): 9     (Cd): 9                       (Cd+a): 9                        (D): {{9, 8, 7}}, {{6, 5}}    (D+a): {9, 8, 7}     (Da): {9, 8, 7}               (Da+a): 9, 8, 7     (Db): {9}{8}{7}               (Db+a): {9}{8}{7}     (Dc): {{9}{8}{7}}{{6}{5}}     (Dc+a): {{9}{8}{7}}{{6}{5}}     (E): {9, 8, 7}, {6, 5}        (E+a): 9, 8, 7     (Ea): 9, 8, 7                 (Ea+a): 9     (Eb): {9}{8}{7}               (Eb+a): {9}{8}{7}     (Ec): {{9}{8}{7}}{6}          (Ec+a): {{9}{8}{7}}{6}     (F): 9, 8, 7                  (F+a): 9     (Fa): 9                       (Fa+a): 9     (Fb): 9                       (Fb+a): 9      There is a definite difference between `pgfmath*` workings. `pgfmatharray` and `pgfmathparse + array` are clearly close to each other. The latter just seems to choke every once a while so the former is preferred. `pgfmathparse + index` is clearly the odd one out. It seems somewhat inconsistent, for example the case of (E+c). The cases where the result is 5,6, or 7 are interesting. Why return the last element if return anything at all when trying to access the first one? It looks like the macro parses the input and just returns the last item that is left. Why the difference between the `pgfmath*` versions at all? The interesting question is which one to use? They obviously return different things even with sane input.               input:                        pgfmatharray:     pgfmathparse + array:   pgfmathparse + index:     (A): {{{9, 8, 7}}, {{6, 5}}}  (A+b): {9}{8}{7}  (A+d): {9}{8}{7}        (A+c): {{9}{8}{7}}     (Aa): {{9, 8, 7}}, {{6, 5}}   (Aa+b): 9         (Aa+d): 9               (Aa+c): 9     (Ab): {9}{8}{7}               (Ab+b): 7         (Ab+d): 7               (Ab+c): 7     (Ac): {{9}{8}{7}}             (Ac+b): 7         (Ac+d): 7               (Ac+c): 7     (Ad): {9}{8}{7}               (Ad+b): 7         (Ad+d): Error           (Ad+c): 7     (B): {{9, 8, 7}, {6, 5}}      (B+b): {9}{8}{7}  (B+d): {9}{8}{7}        (B+c): {{9}{8}{7}}     (Ba): {9, 8, 7}, {6, 5}       (Ba+b): 9         (Ba+d): Error           (Ba+c): Error     (Bb): {9}{8}{7}               (Bb+b): 7         (Bb+d): 7               (Bb+c): 7     (Bc): {{9}{8}{7}}             (Bc+b): 7         (Bc+d): 7               (Bc+c): 7     (Bd): {9}{8}{7}               (Bd+b): 7         (Bd+d): Error           (Bd+c): 7     (C): {9, 8, 7}                (C+b): 9          (C+d): 9                (C+c): 9     (Ca): 9, 8, 7                 (Ca+b): 9         (Ca+d): 9               (Ca+c): 9     (Cb): 9                       (Cb+b): 9         (Cb+d): 9               (Cb+c): 9     (Cc): 9                       (Cc+b): 9         (Cc+d): 9               (Cc+c): 9     (Cd): 9                       (Cd+b): 9         (Cd+d): 9               (Cd+c): 9     (D): {{9, 8, 7}}, {{6, 5}}    (D+b): {9}{8}{7}  (D+d): Error            (D+c): {{9}{8}{7}}{{6}{5}}     (Da): {9, 8, 7}               (Da+b): 9         (Da+d): Error           (Da+c): Error     (Db): {9}{8}{7}               (Db+b): 7         (Db+d): 7               (Db+c): 7     (Dc): {{9}{8}{7}}{{6}{5}}     (Dc+b): 5         (Dc+d): 5               (Dc+c): 5     (E): {9, 8, 7}, {6, 5}        (E+b): {9}{8}{7}  (E+d): Error            (E+c): {{9}{8}{7}}{6}     (Ea): 9, 8, 7                 (Ea+b): 9         (Ea+d): 9               (Ea+c): 9     (Eb): {9}{8}{7}               (Eb+b): 7         (Eb+d): 7               (Eb+c): 7     (Ec): {{9}{8}{7}}{6}          (Ec+b): 6         (Ec+d): 6               (Ec+c): 6     (F): 9, 8, 7                  (F+b): 9          (F+d): Error            (F+c): Error     (Fa): 9                       (Fa+b): 9         (Fa+d): 9               (Fa+c): 9     (Fb): 9                       (Fb+b): 9         (Fb+d): 9               (Fb+c): 9      Same input should give same results. When input is sorted these stand out. There is something going on there.               input:                        pgfmatharray:     pgfmathparse + array:   pgfmathparse + index:     (Ca): 9, 8, 7                 (Ca+b): 9         (Ca+d): 9               (Ca+c): 9     (Ea): 9, 8, 7                 (Ea+b): 9         (Ea+d): 9               (Ea+c): 9     (F): 9, 8, 7                  (F+b): 9          (F+d): Error            (F+c): Error          (C): {9, 8, 7}                (C+b): 9          (C+d): 9                (C+c): 9     (Da): {9, 8, 7}               (Da+b): 9         (Da+d): Error           (Da+c): Error          (Ba): {9, 8, 7}, {6, 5}       (Ba+b): 9         (Ba+d): Error           (Ba+c): Error     (E): {9, 8, 7}, {6, 5}        (E+b): {9}{8}{7}  (E+d): Error            (E+c): {{9}{8}{7}}{6}          (Ab): {9}{8}{7}               (Ab+b): 7         (Ab+d): 7               (Ab+c): 7     (Bb): {9}{8}{7}               (Bb+b): 7         (Bb+d): 7               (Bb+c): 7     (Db): {9}{8}{7}               (Db+b): 7         (Db+d): 7               (Db+c): 7     (Eb): {9}{8}{7}               (Eb+b): 7         (Eb+d): 7               (Eb+c): 7     (Ad): {9}{8}{7}               (Ad+b): 7         (Ad+d): Error           (Ad+c): 7     (Bd): {9}{8}{7}               (Bd+b): 7         (Bd+d): Error           (Bd+c): 7          (Aa): {{9, 8, 7}}, {{6, 5}}   (Aa+b): 9         (Aa+d): 9               (Aa+c): 9     (D): {{9, 8, 7}}, {{6, 5}}    (D+b): {9}{8}{7}  (D+d): Error            (D+c): {{9}{8}{7}}{{6}{5}}          (Ec): {{9}{8}{7}}{6}          (Ec+b): 6         (Ec+d): 6               (Ec+c): 6     (Eca): {{9}{8}{7}}{6}         (Eca+b): 6        (Eca+d): Error          (Eca+c): 6      The original output               input (A): {{{9, 8, 7}}, {{6, 5}}}      foreach (A+a): {{9, 8, 7}}, {{6, 5}}      pgfmatharray (A+b): {9}{8}{7}      pgfmathparse + index (A+c): {{9}{8}{7}}      pgfmathparse + array (A+d): {9}{8}{7}     input (Aa): {{9, 8, 7}}, {{6, 5}}      foreach (Aa+a): {9, 8, 7}      pgfmatharray (Aa+b): 9      pgfmathparse + index (Aa+c): 9      pgfmathparse + array (Aa+d): 9     input (Ab): {9}{8}{7}      foreach (Ab+a): {9}{8}{7}      pgfmatharray (Ab+b): 7                           % 1. Why last?      pgfmathparse + index (Ab+c): 7                   % 1. Why last?      pgfmathparse + array (Ab+d): 7                   % 1. Why last?     input (Ac): {{9}{8}{7}}      foreach (Ac+a): {9}{8}{7}      pgfmatharray (Ac+b): 7                           % 1. Why last?      pgfmathparse + index (Ac+c): 7                   % 1. Why last?      pgfmathparse + array (Ac+d): 7                   % 1. Why last?     input (Ad): {9}{8}{7}      foreach (Ad+a): {9}{8}{7}      pgfmatharray (Ad+b): 7                           % 1. Why last?      pgfmathparse + index (Ad+c): 7                   % 1. Why last?      pgfmathparse + array (Ad+d): Error               % 2. Why differ from (Ab+d)?     input (B): {{9, 8, 7}, {6, 5}}      foreach (B+a): {9, 8, 7}, {6, 5}      pgfmatharray (B+b): {9}{8}{7}      pgfmathparse + index (B+c): {{9}{8}{7}}      pgfmathparse + array (B+d): {9}{8}{7}     input (Ba): {9, 8, 7}, {6, 5}      foreach (Ba+a): 9, 8, 7      pgfmatharray (Ba+b): 9      pgfmathparse + index (Ba+c): Error      pgfmathparse + array (Ba+d): Error     input (Bb): {9}{8}{7}      foreach (Bb+a): {9}{8}{7}      pgfmatharray (Bb+b): 7                           % 1. Why last?      pgfmathparse + index (Bb+c): 7                   % 1. Why last?      pgfmathparse + array (Bb+d): 7                   % 1. Why last?     input (Bc): {{9}{8}{7}}      foreach (Bc+a): {9}{8}{7}      pgfmatharray (Bc+b): 7                           % 1. Why last?      pgfmathparse + index (Bc+c): 7                   % 1. Why last?      pgfmathparse + array (Bc+d): 7                   % 1. Why last?     input (Bd): {9}{8}{7}      foreach (Bd+a): {9}{8}{7}      pgfmatharray (Bd+b): 7                           % 1. Why last?      pgfmathparse + index (Bd+c): 7                   % 1. Why last?      pgfmathparse + array (Bd+d): Error               % 2. Why differ from (Bb+d)?     input (C): {9, 8, 7}      foreach (C+a): 9, 8, 7      pgfmatharray (C+b): 9      pgfmathparse + index (C+c): 9      pgfmathparse + array (C+d): 9     input (Ca): 9, 8, 7      foreach (Ca+a): 9      pgfmatharray (Ca+b): 9      pgfmathparse + index (Ca+c): 9      pgfmathparse + array (Ca+d): 9     input (Cb): 9      foreach (Cb+a): 9      pgfmatharray (Cb+b): 9      pgfmathparse + index (Cb+c): 9      pgfmathparse + array (Cb+d): 9     input (Cc): 9      foreach (Cc+a): 9      pgfmatharray (Cc+b): 9      pgfmathparse + index (Cc+c): 9      pgfmathparse + array (Cc+d): 9     input (Cd): 9      foreach (Cd+a): 9      pgfmatharray (Cd+b): 9      pgfmathparse + index (Cd+c): 9      pgfmathparse + array (Cd+d): 9     input (D): {{9, 8, 7}}, {{6, 5}}      foreach (D+a): {9, 8, 7}      pgfmatharray (D+b): {9}{8}{7}      pgfmathparse + index (D+c): {{9}{8}{7}}{{6}{5}}      pgfmathparse + array (D+d): Error                % 3. Why differ from (D+c)?     input (Da): {9, 8, 7}      foreach (Da+a): 9, 8, 7      pgfmatharray (Da+b): 9      pgfmathparse + index (Da+c): Error      pgfmathparse + array (Da+d): Error     input (Db): {9}{8}{7}      foreach (Db+a): {9}{8}{7}      pgfmatharray (Db+b): 7                           % 1. Why last?      pgfmathparse + index (Db+c): 7                   % 1. Why last?      pgfmathparse + array (Db+d): 7                   % 1. Why last?     input (Dc): {{9}{8}{7}}{{6}{5}}      foreach (Dc+a): {{9}{8}{7}}{{6}{5}}      pgfmatharray (Dc+b): 5                           % 1. Why last?      pgfmathparse + index (Dc+c): 5                   % 1. Why last?      pgfmathparse + array (Dc+d): 5                   % 1. Why last?     input (E): {9, 8, 7}, {6, 5}      foreach (E+a): 9, 8, 7      pgfmatharray (E+b): {9}{8}{7}      pgfmathparse + index (E+c): {{9}{8}{7}}{6}       % 4. Strange. Why?      pgfmathparse + array (E+d): Error                % 3. Why differ from (E+c)?     input (Ea): 9, 8, 7      foreach (Ea+a): 9      pgfmatharray (Ea+b): 9      pgfmathparse + index (Ea+c): 9      pgfmathparse + array (Ea+d): 9     input (Eb): {9}{8}{7}      foreach (Eb+a): {9}{8}{7}      pgfmatharray (Eb+b): 7                           % 1. Why last?      pgfmathparse + index (Eb+c): 7                   % 1. Why last?      pgfmathparse + array (Eb+d): 7                   % 1. Why last?     input (Ec): {{9}{8}{7}}{6}      foreach (Ec+a): {{9}{8}{7}}{6}      pgfmatharray (Ec+b): 6                           % 1. Why last?      pgfmathparse + index (Ec+c): 6                   % 1. Why last?      pgfmathparse + array (Ec+d): 6                   % 1. Why last?     input (F): 9, 8, 7      foreach (F+a): 9      pgfmatharray (F+b): 9      pgfmathparse + index (F+c): Error      pgfmathparse + array (F+d): Error     input (Fa): 9      foreach (Fa+a): 9      pgfmatharray (Fa+b): 9      pgfmathparse + index (Fa+c): 9      pgfmathparse + array (Fa+d): 9     input (Fb): 9      foreach (Fb+a): 9      pgfmatharray (Fb+b): 9      pgfmathparse + index (Fb+c): 9      pgfmathparse + array (Fb+d): 9      Does there exist a badge for the longest post without comments?


title: Illegal unit of measure (pt inserted) error when using \foreach with node[pos]

text: I am trying to draw a path and position nodes on it and fill them using this code and it works               \documentclass[varwidth=20cm]{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \draw [dotted](0,0)--(2.5,0.5)       node(2)[pos=0.1]{} node(3)[pos=0.2]{} node(4)[pos=0.3]{} node(5)[pos=0.4]{} node(6)[pos=0.5]{} node(7)[pos=0.6]{} node(8)[pos=0.7]{} node(9)[pos=0.8]{}  node(1)[pos=0.9]{} node(10)[pos=1]{};     %  \draw [red,dotted] plot [smooth] coordinates {(0,0) (1,0.1) (2,0.3) (2.5,0.5)};            \fill (1) circle[radius=1pt];       \fill (2) circle[radius=1pt];       \fill (3) circle[radius=1pt];       \fill (4) circle[radius=1pt];       \fill (5) circle[radius=1pt];       \fill (6) circle[radius=1pt];       \fill (7) circle[radius=1pt];       \fill (8) circle[radius=1pt];       \fill (9) circle[radius=1pt];       \fill (10)circle[radius=1pt];       \end{tikzpicture}     \end{document}      Now, i want to make it more efficient and not to repeat the same line of code 10 times by using `\foreach`. I stared by this piece of code put it gives this error **Illegal unit of measure (pt inserted)**               \documentclass[varwidth=20cm]{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \draw [dotted](0,0)--(2.5,0.5)       \foreach \x [evaluate=\x] in {1,2,...,10}         node(\x) [pos={\x/10}]{}         \fill (\x) circle[radius=1pt];     \end{tikzpicture}     \end{document}


title: Problems with copy and paste from PDF using lstlisting (Again)

text: So I had already posted a similar question concerning the minus sign (`-`), but now I have an issue with the apostrophe (`'`) that the previous solutions do not seem to solve. This seems to be a problem unrelated to `listings` since I cannot even get `\verb!'!` to create a PDF that when copied I get ASCII code 39. All I manage to get is an extended character (e2 80 99 according to hexdump). Here's a MWE:               \documentclass{article}     \begin{document}     \verb!'!     \end{document}      So the question is: > How can I create a PDF that shows a single quote that when copied has the > ASCII value of a single quote?


title: Can't tell what is the error

text: \makecvtitle          \section{Education}     \cventry{2011--2014}{Computer science engineering diploma}{Faculty of sciences-Elmanar}{Tunis}{\textit{}}{}     \cventry{2008--2011}{bachelor degree in sciences and technologies of information and communication}{Faculty of sciences-Elmanar}{Tunis}{\textit{}}{major in electronics and signals transmission with honours }     \cventry{2008}{bachelor}{khemir High school}{Aindrahem}{\textit{}}{major in Maths with honours}          \section{Experience}     \subsection{Vocational}     \cventry{July-August 2013}{Internship}{Ngtrend}{Tunis}{}{building and testing an MMS sending/receiving platform with Mbuni(gateway Open Source) and Nokia mms developer's suite}     \cventry{March 2013}{Realtime Translator}{Nomad, Forum Social Mondial}{Tunis}{}{using raspberry pi cards along with FM transmitters to set realtime translators during the "World Social Forum 2013"}     \cventry{June 2011}{Internship}{Tunisie Telecom}{Tunis}{}{developing a platform to send bulk sms.}     \subsection{Pedagogical}     \cventry{2013--2014}{Quadcopter project}{Tunis}{operating an arduino duemilanove card to build a quadcopter and control it with an android tablet (currently)}     \cventry{April 2013}{databases}{Tunis}{designing and building an appliction to manage students candidacies in our faculty using oracle forms}     \cventry{December 2013}{Embedded linux}{Tunis}{building a linux system on a raspberry pi}          \section{Computer skills}     \cvitem{programming langages}{C,C++,java,JEE,VHDL,Prolog,Assembly,Html,PHP}     \cvitem{IDE}{Netbeans,Altuim Designer,Isis,IAR,Arduino,Xilinx,Matlab,Eclipse,Oracle}     \cvitem{OS's}{Redhat(Fedora),Debian(Ubuntu,Mint),Backtrack,Windows}     \cvitem{Servers}{Tomcat,Apache,Mysql server}     \cvitem{Networks}{LANs,CISCO,signals transmission}          \section{Activities}     \cvitem{IEEE}{active member in IEEE FST student branch 2013}     \cvitem{Microdesign club}{active member in the embedded systems' club Microdesign}     \cvitem{CertifFST}{active member in the certification club CertifFST}     \cvitem{CTunis Extended, Forum Social Mondial}{streaming and enlarging orgnizations'activities during the World Social Forum 2013}     \cvitem{IEEE, RobotComp'2013}{participation in an annual robotics competition organized by IEEE}          \section{Languages}     \cvitem {English}{fluent}     \cvitem {French}{bilingual}     \cvitem {Arabic}{native}     \cvitem {Italian}{Basics}          \nocite{*}     \bibliographystyle{plain}     \bibliography{publications}                        % 'publications' is the name of a BibTeX file          \clearpage          %\clearpage\end{CJK*}                              % if you are typesetting your resume in Chinese using CJK; the \clearpage is required for fancyhdr to work correctly with CJK, though it kills the page numbering by making \lastpage undefined     \end{document}      I get this error > ! Argument of \cventry has an extra }.\par \cventry{April 2013} and this > ! Paragraph ended before \cventry was complete.\par \cventry{April 2013} and this > ! Misplaced \cr. \cr \cventry{April 2013} All at the same line!! what can be the error?


title: How to solve hyperref anchor warnings?

text: I'm writing a report document, at some point I create a new section inside a chapter and I got this message from sharetex LaTeX compiler: > main.tex:122 [hyperref] The anchor of a bookmark and its parent's must not > be the same. Added a new anchor. (page 3) > > undefined:undefined `!h' float specifier changed to`!ht'. (page 3) It looks like two different problems however I have no clue about what is causing the second one, since I have no `!h` statement. This is a Minimum non Working Example:               \documentclass[a4paper,12pt]{report}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage[pdftex,bookmarks=true,colorlinks=true,linkcolor=blue,citecolor=blue]{hyperref}     \usepackage{varioref}     \usepackage{cleveref}     \usepackage[hyperpageref]{backref}          \begin{document}     \tableofcontents          \chapter{Introduction}     \begin{itemize}         \item {\bf Finalização} onde são finalizados os histogramas, eventualmente traçadas curvas de ajuste \emph{(fit)} e guardados os resultados no disco.     \end{itemize}          \chapter{Contextualização}     \section{Modelo de dados}          \end{document}


title: Specifying a no-indent for a list

text: I have the following:               This is just normal text...          \begin{enumerate}     \item First Item ?\\\\     This is the text of the first item     \item Second Item ?\\\\     This is the text of the second item     \end{enumerate}      Which renders the following:               This is just normal text...          1. First Item ?             This is the text of the first item          2. Second Item ?              This is the text of the second item      I want to specify that the text of the items has no indentation. Basically, I want it to be rendered like such:               This is just normal text...          1. First Item ?          This is the text of the first item          2. Second Item ?           This is the text of the second item      How can I specify this form of no indentation?


title: How can I set the color of an \sbox / \usebox?

text: In the following code, I want to produce a coloured shape, for example a `\rule{1em}{1em}`. If I use the `\rule` as is, it works as expected. However, putting it in an `\sbox` somehow breaks colouring and I get a black box.               \documentclass{standalone}     \usepackage{xcolor}          \newsavebox\myrule     \sbox\myrule{\rule{1em}{1em}}          \begin{document}            \color{red}       \usebox\myrule   % this gives me a black square       \rule{1em}{1em}  % this gives me a red square          \end{document}      Could someone kindly explain the reason for this behaviour? I know that the box could also be put in a macro definition instead, I'm just a bit confused why it doesn't work with `\usebox`. Moreover, is there some straightforward way to enable my `\usebox\myrule` to take on the current text colour, so that it can be basically be used like a usual glyph?


title: Putting text at the side of a tikzpicture

text: I've just completed a tikz diagram. I need the text > In the following diagram, what can you say about $\angle F$, $\angle B$ > and$\angle E$? to go to the right of the diagram to save space on the paper. This is what I have:               \documentclass[10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{pgf,tikz}     \usetikzlibrary{arrows}     \pagestyle{empty}     \begin{document}     \definecolor{uuuuuu}{rgb}{0.27,0.27,0.27}     \definecolor{qqqqff}{rgb}{0,0,1}     \definecolor{xdxdff}{rgb}{0.49,0.49,1}     \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]     \clip(-4.3,-5.44) rectangle (18.7,6.3);     \draw(0,0) circle (4.01cm);     \draw (-4.01,0)-- (0,0);     \draw (0,0)-- (4.01,0);     \draw (-0.28,4)-- (-4.01,0);     \draw (-0.28,4)-- (4.01,0);     \draw (-4.01,0)-- (1.62,3.67);     \draw (1.62,3.67)-- (4.01,0);     \draw (-2.27,3.3)-- (-4.01,0);     \draw (-2.27,3.3)-- (4.01,0);     \begin{scriptsize}     \fill [color=black] (0,0) circle (1.5pt);     \draw[color=black] (0.14,0.28) node {$A$};     \fill [color=black] (-0.28,4) circle (1.5pt);     \draw[color=black] (-0.12,4.28) node {$B$};     \fill [color=black] (-4.01,0) circle (1.5pt);     \draw[color=black] (-3.84,0.28) node {$C$};     \fill [color=black] (4.01,0) circle (1.5pt);     \draw[color=black] (4.16,0.28) node {$D$};     \fill [color=black] (1.62,3.67) circle (1.5pt);     \draw[color=black] (1.78,3.94) node {$E$};     \fill [color=black] (-2.27,3.3) circle (1.5pt);     \draw[color=black] (-2.14,3.58) node {$F$};     \end{scriptsize}     \end{tikzpicture}          \begin{center}      In the following diagram, what can you say about $\angle F$, $\angle B$ and$\angle E$?      \end{center}           \end{document}


title: Merge columns in LaTeX

text: I would like to merge column in LaTeX. I can make that but this line is incomplete because it still open on the left. Perhaps you will not understand what I mean, but this is the code that I wrote               \documentclass{article}     \usepackage{array}          \usepackage[french]{babel}          \begin{document}    \begin{table}[!h]     \begin{center}     \begin{tabular}{|c|c|c|c|}      %\begin{tabular}{|p{2cm}|p{2.1cm}|p{3.5cm}|p{3.3cm}|p{1.6cm}|p{1.7cm}|p{1.7cm}|}       \hline      \bf Id Page  & \bf Politique de Partage & \bf Nombre Amis & \bf Nombre Pages qui ont reçu la pub \\       \hline        78 & Amis Seulement & 23&23 \\        81&Amis Seulement&25&25\\        65&Amis Seulement&25&25\\        59&Amis et leurs Amis&26&51\\        16&Tout le Monde&27&100\\        45&Amis et leurs Amis&27&71\\        69&Amis Seulement&27&27\\        74&Amis Seulement&27&27\\        99&Amis Seulement &27&27\\        30&Amis et leurs Amis&27&64\\                  \hline        \multicolumn{3}{|c|}{Moyenne des pages qui ont reçu  }              \\         \hline       \end{tabular}     \end{center}     \bf {\caption{Publication partagée avec une page ayant un nombre minimal d'amis dans réseau 1}}     \end{table}     \end{document}


title: \arrayrulewidth does not work - different thickness

text: I´m using `\arrayrulewidth` to specify my rule´s width/thickness, e.g. in tables:               \taburulecolor{title}     \arrayrulewidth=1pt     \setlength{\arrayrulewidth}{1pt} % Definiert die Liniendicke von Trennlinien in den array- und tabular-Umgebungen.           %referenced by  btable     \newenvironment{mycustomtable}     {       \begin{center}       \def\arraystretch{1} %Seems to be better than to use %\renewcommand{\baselinestretch}{1} % Zeilenabstand       \tabulinesep=1.2mm % cell padding according to http://mirror.ctan.org/macros/latex/contrib/tabu/tabu.pdf       \begin{longtabu}[l]     }     {       \end{longtabu}       %\renewcommand{\baselinestretch}{1.5}% Zeilenabstand       \end{center}     }      Changing `\arrayrulewidth` does effect the thickness. But: It´s not fixed and changes from time to time. In some cases, `\arrayrulewidth` seems to adjust automatically within the same environment, e.g. after a pagebreak. Why is that and how can I specify arrayrulewidth to a fixed value that will not (never) change?


title: Biblatex/biber - no citation, bibdata, or bibstyle found in .aux file

text: Yo peeps - sorry for the long post, trying to be thorough. I'm having a bit of an issue with biblatex/biber. I was having trouble implementing the `acro` package which I believed was due to old support files hanging out in the directory. So I cleaned it out (FYI I'm using TeXnicCenter and I used the Build>Clean Project menu function). Possibly a bad idea. My file stopped compiling, complaining "Couldn't find input index file or .idx" and "Couldn't open file name ". So to try and fix it I just created 2 blank text files with .idx and .aux file extensions. The problem then was that it complained that it couldn't find any \citation, \bibdata, and \bibstyle commands in the .aux file. I then decided use LEd, it created the .idx and .aux files for me, and even puts some stuff in the .aux. It was getting stuck trying to find the location of the images, so after commenting all out of the images (and references to their labels), it compiled. But it still had the same original problem as TeXnicCenter where it couldn't find \citation, \bibdata, and \bibstyle commands. My preamble is as follows:               \documentclass[a4paper, 11pt, oneside]{book}          \usepackage[left=3cm, right=3cm, bottom=3.5cm, top=3.5cm]{geometry}       \usepackage[         font=footnotesize,          center         ]{caption}     \usepackage[         backend=biber,         style=authoryear-comp,         natbib=true,         maxnames=2,         sorting=nyt,         sortcites=false,         block=space,         date=long,         url=false,          doi=false,         eprint=false,         isbn=false,         uniquename=false,         uniquelist=false,         terseinits=true,         firstinits=false         ]{biblatex}     \addbibresource{../../BibTex/library.bib}          %Put initials after names...     \DeclareNameAlias{sortname}{last-first}     \DeclareNameAlias{default}{last-first}              %Remove "and" before last name. However, this also removes "and" in a textcite...     \renewcommand*{\finalnamedelim}{\addcomma\space}     \usepackage{fancyhdr}     \usepackage{graphicx}     \usepackage{wrapfig}     \usepackage{sidecap}     \usepackage{subfig}     \usepackage[big,compact]{titlesec}     \usepackage{pdfpages}     \usepackage[hidelinks]{hyperref}     \hypersetup{pdftitle=xxxx,             pdfauthor=xxxx,             pdfkeywords=xxxx             }          \makeindex          \setlength{\parindent}{0in}     \usepackage{setspace}     \doublespacing     \newcommand{\comment}[1]{}          \begin{document}     \printbibliography[heading=bibintoc]                                      \end{document}      I tried putting `\nocite{*}` in the preamble, but that didn't work. I also wondered if it has something to do with `[backend=biber]{biblatex}` as I have read that this may put info in a .bcf file rather than the .aux file it expects.


title: bottom right page numbering in table of content, list of figures, table and nomenclature

text: I wanted to have all page numbering at right bottom of each page. So I used package `fancyhdr`. I put this at the preamble               %customize page numbering on right hand side     \fancyhf{} %clear all header and footer fields     \fancyfoot[RO]{\thepage}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}      It works OK, especially at first page of every chapters with `\thispagestyle{fancy}` where I put after `\chapter{}`. but it doesn't work at these pages below, table of contents, figures, tables and nomenclature. They are appear bottom of page at the middle. Am I missing something here?               %Table of content          \newpage     \thispagestyle{fancy}     \renewcommand\contentsname{CONTENTS}     \tableofcontents     \addcontentsline{toc}{chapter}{CONTENTS}          %List of tables           \newpage     \thispagestyle{fancy}     \renewcommand\listtablename{LIST OF TABLES}     \listoftables     \addcontentsline{toc}{chapter}{LIST OF TABLES}          %List of figures          \newpage     \thispagestyle{fancy}     \renewcommand\listfigurename{LIST OF FIGURES}     \listoffigures     \addcontentsline{toc}{chapter}{LIST OF FIGURES}          %Nomenclature          \newpage     \thispagestyle{fancy}     \addcontentsline{toc}{chapter}{NOMENCLATURE}     \printnomenclature[3cm]


title: Teletype \textbackslash in alltt environment

text: The `alltt` package provides a beefed up `verbatim` environment where `\` and `{}` are not treated literally. A literal backslash can be inserted with `\textbackslash`, however, it does not have the same teletype font as the rest of the verbatim text. I tried some variataions such as `\texttt{\textbackslash}` but these don't seem to help. Any ideas how to insert a backslash (or curly braces) in teletype font when using `alltt`?


title: using macros in tikz/pgf

text: I am trying to plot a family of hyperbolas and don't want to repeat the function definition every time. So for example I have this:               \documentclass{article}     \usepackage{tikz}          \begin{document}         \begin{tikzpicture}[domain=-2:2]             \draw plot ({exp(\x)+exp(-\x)}, {exp(\x)-exp(-\x)});         \end{tikzpicture}     \end{document}      But now I want to put the point in a function:               \documentclass{article}     \usepackage{tikz}          \begin{document}         \begin{tikzpicture}[domain=-2:2]             \def\hyper#1#2#3{({#1*exp(#3)+#2*exp(-#3)}, {#1*exp(#3)-#2*exp(-#3)})}             \draw plot \hyper{1}{1}{\x};         \end{tikzpicture}     \end{document}      But then I get > ! Package tikz Error: Cannot parse this plotting data. I there an easy way to use such predefined macro as a point? Or is it not possible with `plot`? I have seen Problem using macros to define tree substructures and Forcing tikz/pgf to expand macros within commands as well as pgf macro that returns a node and Programming in TikZ but I still don't understand what can be done when. Any pointers to enlightening parts of the `TikZ/PGF` manual are also welcome.


title: Is it possible to make automatic multiple citations with csquotes and biblatex?

text: I'm using `csquotes` package with `biblatex`. There is a number of citations that require multiple references, which can be introduced with the `\autocites` command --- e.g. second hand citations (“cited in“ ou “ _apud_ ”). However, `\blockcquote[<pre>][<post>]{<Ref>}{<citation>}` accepts only single citations. Is that right? have I missed something? To revert this, I'm using a simple `\blockquote{...\autocites[pre1][post1]{ref1}[pre2][post2]{ref2}\relax}` (the `\relax` [or a line break] is being required sometimes). But this way, the `\autocite` command doesn't respect the global citation style, resulting in a more simplified citation. By the way, i'm working with the `verbose-trad3` style. Here's a compilable example:               \documentclass{article}     \usepackage{filecontents}% To add the contents of the .bib file in the .tex file         \begin{filecontents}{bibliography.bib}             @book{test1,                 author = {John Doe},                 title = {Example book to be cited},                 address = {Nowhere},                 publisher = {Some Publisher},                 year = {1990},             }             @book{test2,                 author = {Jane Smith},                 title = {A book that cites the former},                 address = {Somewhere},                 publisher = {A Publishing House},                 year = {2010},             }                 @book{test1a,                     author = {Jane Deo},                     title = {Title for a first test},                     address = {Location},                     publisher = {Publisher 1},                     year = {2010},                 }                 @book{test2a,                     author = {John Sthim},                     title = {Title for a first test to cite another one},                     address = {Address},                     publisher = {Publisher 2},                     year = {2010},                 }         \end{filecontents}     \usepackage[style=verbose-trad3]{biblatex}         \bibliography{bibliography}     \usepackage{csquotes}         \SetCiteCommand{\autocite}         \SetBlockEnvironment{quotation}     \newcommand{\loremipsum}{%  I did this because using the lipsum package, the reference appeared in a new line     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent dapibus ante at urna tempor iaculis. Donec et mi augue. Cras condimentum, orci non vehicula rutrum, purus diam fermentum est, ut pretium urna risus a mauris. Aliquam pretium, nunc quis mattis mattis, felis mauris euismod massa, a elementum massa felis sed metus. Nunc porttitor metus a lorem mollis nec ornare erat placerat. Aenean eget lacus libero. Vivamus hendrerit, ligula eget porta mollis, tortor velit dictum neque, ac sagittis enim quam gravida erat. Aenean eu leo quis erat aliquam volutpat id eget lorem. Integer eleifend mi eget magna dapibus commodo. Fusce id dui vel augue porta hendrerit eu vitae sapien. Nullam tellus nisi, elementum imperdiet vehicula sit amet, egestas in risus. Curabitur nec tortor et est feugiat convallis. Mauris sed rhoncus urna. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin mattis placerat dapibus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris arcu nibh, adipiscing quis feugiat ut, mattis a velit.}     \begin{document}     A block quotation with the multiple citation --- note that the author name, for example, appears reduced to its surname (even in the first citation):     \blockquote{\loremipsum\autocites(Some global pre-note)(some global post-note)[some local pre-note][100]{test1a}[apud][200]{test2a}\relax}     A first block quotation, with a full citation of \texttt{test1} ref.:     \blockcquote[some pre-note][100]{test1}{\loremipsum}     A first block quotation, with a full citation of \texttt{test2} ref.:     \blockcquote[some pre-note][100]{test2}{\loremipsum}     A second block quotation, with a shortened citation of \texttt{test1} ref.:     \blockcquote[some pre-note][200]{test1}{\loremipsum}     A second block quotation, with a shortened citation of \texttt{test2} ref.:     \blockcquote[some pre-note][200]{test2}{\loremipsum}     A block quotation with the multiple citation --- note that the author name, for example, appears reduced to its surname:     \blockquote{\loremipsum\autocites(Some global pre-note)(some global post-note)[some local pre-note][100]{test1}[apud][200]{test2}\relax}     \end{document}


title: Aligning subcaptions with tikz pictures vertically

text: A simple follow-up question to this one How to place and scale TikZ pictures in subfigure? I shamelessly copied the same code that was presented in the answer there because it fits my needs exactly as well. Maybe the code need not to be repeated here, as it can be seen from the link above. This is what it outputs anyway. (Would have inserted the image here, but seems like I couldn't as a new user, please see the link for that also). Looks nice and all, but I would like to have only "(a)", "(b") and so forth as my subcaptions. I can do this for example by just modifying the subfigure- lines to "\subfigure []". When I do this, the letters below the pictures don't align vertically with the first node (the root of the "tree" in the picture). I tried adding a label to the tikzpicture below/above a node, but it didn't really work out and it felt very hackish anyway. What would be an easy to way to accomplish this?


title: Add a "on behalf of ..." line to the author field in an article

text: I'm writing a conference proceeding using the standard `article` class. To typeset authors and their affiliation I'm using the authblk package, and I'm really satisfied with it. However, the people writing the paper are a subset of a larger team, so, after the authors' names, I'd like to display a line saying _on behalf of NameOfTheTeam_ (and only then the affiliation). As an example: ![alt text](http://i.stack.imgur.com/wjuyU.jpg) How can I achieve it? Should I modify the `\maketitle` macro? Or something inside the authblk package?


title: How to make a recursive macro in (La)TeX?

text: The following MWE is the code of my attempt translating my working algorithm in C# to (La)TeX. I don't understand why it does not work. Can you probe the source of problem? Remarks:   1. `#1` is a list of binary elements. Either character `1` (move upward) or `0` (move to the right) will be appended to this list recursively. In the beginning it is an empty list.   2. `#2` represents the remaining number of movements to the right.   3. `#3` represents the remaining number of movements upward.               \documentclass{article}     \usepackage{ifthen,pgf}          \parindent=0pt          \newcommand{\Populate}[3]%     {%             \ifthenelse{#2=0}% on the most left border?             {%                      \ifthenelse{#3=0}% on the most top border?                     {%                              #1\endgraf% I need to trim the most left comma later!                     }%                     {%                              % move upward                             \pgfmathtruncatemacro{\ups}{#3-1}%                             \Populate{#1,1}{#2}{\ups}%                     }%               }%                   {%                      \ifthenelse{#2=#3}% on the diagonal border?                     {%                             % move to the right                             \pgfmathtruncatemacro{\rights}{#2-1}%                             \Populate{#1,0}{\rights}{#3}%                     }%                     {%                             % move to the right                             \pgfmathtruncatemacro{\rights}{#2-1}%                             \Populate{#1,0}{\rights}{#3}%                             % move upward                             \pgfmathtruncatemacro{\ups}{#3-1}%                             \Populate{#1,1}{#2}{\ups}%                     }%             }%           }               \begin{document}     \Populate{}{4}{4}     \end{document}      It produced a wrong output as follows:               ,0,0,0,0,1,1,1,1     ,0,0,0,1,1,1,1     ,0,0,1,1,1,1     ,0,1,1,1,1      The expected output must be as follows: (the leading comma will be removed later)               ,0,0,0,0,1,1,1,1     ,0,0,0,1,0,1,1,1     ,0,0,0,1,1,0,1,1     ,0,0,0,1,1,1,0,1     ,0,0,1,0,0,1,1,1     ,0,0,1,0,1,0,1,1     ,0,0,1,0,1,1,0,1     ,0,0,1,1,0,0,1,1     ,0,0,1,1,0,1,0,1     ,0,1,0,0,0,1,1,1     ,0,1,0,0,1,0,1,1     ,0,1,0,0,1,1,0,1     ,0,1,0,1,0,0,1,1     ,0,1,0,1,0,1,0,1      **The last edit:** For `N x N` case, use `\Populate{0}{N-1}{N}` to avoid having an extra job to remove the leading commas above. (I just got this enlightenment)


title: Creating symbols: $\oeq$ and $\oneq$

text: How do I create my own custom symbols? I want to make a symbol similar to that of `$\otimes,\ominus$`, etc. It should be an equals sign enclosed by a circle, and also a slashed equals sign enclosed by a circle. Preferrably, the code should read `$\oeq$` and `$\oneq$`, or something similar. * * * Thank you for your answers, they were very beneficial. I am, so far, satisfied with the following definition for `$\oeq$`:               \newcommand\opn{\mathrel{\ooalign{$-$\cr       \hidewidth\raise.45ex\hbox{$-$}\cr}}}     \newcommand\oeqq{\mathrel{\ooalign{$\opn$\cr       \hidewidth\raise.21ex\hbox{$\ocircle\mkern.0mu$}\cr}}}     \newcommand{\oeq}{\mathrel{\lower.22ex\hbox{$\oeqq$}}}      Could anyone use this definition to obtain similarly `$\oneq$`, with the slash fully inside the circle?


title: Insert key words & key phrases into toc

text: To make the structure of documents (here: my PhD-thesis) comprehensible straight from the ToC, I would like to insert some key words or key phrases in each element of the ToC. I saw this device in a teaching book and I thought it would be a helpful little improvement for longer documents. My first description of the desired layout lacked of precision, I hope this one is more clear. Requirements for user-friendlybility: I am looking for a solution that handles key words or key phrases which belong to one part, section etc. in the following way: a) puts key words/phrases in rows b) divides them through hyphens c) one line under the actual part, section etc. d) key words/phrases without page number e) depending on the number of key words/phrases it can exceed one line It should look like this: > Contents > > 1 section .............................1 > > key word 1 - key phrase 2 - key word 3 > >> 1.1 subsection ...............................5 >> >> key word 1 - key phrase 2 - key word 3 - >> >> key word 4 - key phrase 5 - key word 6 Requirement for writer-friendlybility: To make it easier for the writer of the document one command is hoped-for that adapts to a given section, part etc. without any specification within the command in order to prevent him from adjusting the command every time when he is copying it from one sections to a part, subsection, etc. In the .tex-file it should look like this:               \begin{document}     \section{section}      bla bla \command{keyword1} few lines or pages of bla bla \command{keyword2} ....          \subsection{subsection}      bla bla \command{keyword1} few lines or pages of bla bla \command{key phrase2} ....     \end{document}      Does anyone have an idea how to do it? PS: To convert the keywords in the toc into hyperref-keywords take a look here: Hyperref-ize the keywords in toc. It works with egregs solution.


title: Hyperref and Sideways Figures

text: I was wondering if anyone could help me. I don't know much about LaTeX, but I'm trying to reference sideways figures in my text. When I click on the links in the pdf they take me to completely different pages to those intended. All the other links to figures which are not sideways work fine though.               \documentclass{book}     \renewcommand{\rmdefault}{pbk}     \usepackage[margin=1in]{geometry}                       \geometry{a4paper,margin=1in,}                      \usepackage[demo]{graphicx}     \usepackage{amssymb}     \usepackage{epstopdf}     \usepackage{textcomp}     \usepackage{fontenc}     \usepackage{rotating}     \usepackage{multirow}     \usepackage{amsmath}     \usepackage{mathcomp}     \usepackage{url}     \usepackage{makeidx}     \usepackage{mathabx}     \usepackage{hyperref}     \usepackage[all]{hypcap}          \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}     \newcommand{\LINN}[1]{\emph{#1}}          \renewcommand{\rmdefault}{pbk}     \renewcommand{\sfdefault}{pag}     \renewcommand{\ttdefault}{pcr}          \makeindex          \begin{document}          A map and satellite picture of the study site are presented in figure~\ref{fig:studysite}.                \begin{center}     \begin{sidewaysfigure}     \centering     \includegraphics[scale=0.48]{../../../PHDMaps/Studysite.jpg}     \caption{Map and satellite picture of the study site.\label{fig:studysite}}     \end{sidewaysfigure}     \end{center}     \end{document}


title: TikZ copy command

text: Does TikZ have a `copy` command? the copy command means, e.g., I draw a rectangle first, then I draw whatever e.g., circle, writing text etc. in the rectangle. let me define a `source object` that includes all objects in the rectangle and the rectangle itself. Now I want to `copy` the `source object` based on the lower left corner of rectangle to a new position. @Martin @Jan @Caramdir, following is an example, but it has some error. please also refer to my comment.               \documentclass[titlepage,a4paper]{article}          \usepackage[english]{babel}     \usepackage{TikZ}   %Create PostScript and PDF graphics in TeX          \begin{document}     \begin{tikzpicture}[scale=0.962661,thick]       \foreach \xbase/\ybase in {0mm/0mm,46.700000mm/0mm}       {         %grid line         \draw[xstep=11.200000mm,ystep=12.051000mm] (\xbase,\ybase) grid (\xbase + 44.800000mm,\ybase + 36.153000mm);       }     \end{tikzpicture}          \end{document}      @Martin @Jan @Caramdir, i updated the above example. it is better except that the most left vertical line of right grid is missing.               \documentclass[titlepage,a4paper]{article}          \usepackage[english]{babel}     \usepackage{TikZ}   %Create PostScript and PDF graphics in TeX          \begin{document}     \begin{tikzpicture}[scale=0.962661,thick]       \foreach \xbase/\ybase/\xoffset in {0mm/0mm/0mm,44.800000mm/0mm/1.9mm}       {         %grid line         \draw[xstep=11.200000mm,ystep=12.051000mm,xshift=\xoffset] (\xbase,\ybase) grid (\xbase + 44.800000mm,\ybase + 36.153000mm);       }      \end{tikzpicture}           \end{document}      it seemed that `grid` always uses the origin (0,0) as its reference. my way is to add shift to the base point and cares about the coordinates by myself. but the most left vertical line of right grid is missing. i don't know why. it looked like that the line should be in the range of the grid. is there a rationale for this? i mean make `grid` use (x,y) instead of (0,0) as the reference point.


title: Biblatex+Biber footcite style when using autocite

text: I'm referring to this post. Please consider the following MWE:               \documentclass{article}     \usepackage[style=alphabetic, autocite=footnote]{biblatex}          % Footnote modifications:         \DeclareCiteCommand{\footcite}[\mkbibfootnote]             {\usebibmacro{prenote}}             {\usebibmacro{citeindex}%                 \printtext[brackets]{\usebibmacro{cite} \usebibmacro{postnote}}}             {\multicitedelim}             {}            \DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]%         {\footcite}{\multicitedelim}          \DeclareAutoCiteCommand{footnote}[l]{\footcite}{\footcites}          \DeclareFieldFormat{sentencecase}{\MakeSentenceCase{#1}}     \usepackage{xpatch}     \xpatchbibmacro{prenote}{\printfield{prenote}}{\printfield[sentencecase]{prenote}}{}{}          % Inline modifications:         \DeclareCiteCommand{\parencite}[\mkbibparens]             {\usebibmacro{prenote}}             {\usebibmacro{citeindex}%                 \printtext[brackets]{\usebibmacro{cite} \usebibmacro{postnote}}}             {\multicitedelim}             {}          \DeclareMultiCiteCommand{\parencites}[\mkbibparens]%       {\parencite}{\multicitedelim}          \begin{filecontents*}{bibliography.bib}     @BOOK{Cornelisse1979,       author = {Cornelisse, J. W. and Schöyer, H. Ferry R. and Wakker, Karel F.},       title = {Rocket Propulsion and Spaceflight Dynamics},       year = {1979},       publisher = {Pitman},     }     \end{filecontents*}          \bibliography{bibliography.bib}          \begin{document}     \null     \vfill          How one citation with autocite look like: \autocite[see][35]{Cornelisse1979}     How multicite with autocites look like: \autocites(\autocap{s}ee)()[][20]{Cornelisse1979}[][35]{Cornelisse1979}     How multicite with autocites should look like: \footcites(\autocap{s}ee)()[][20]{Cornelisse1979}[][35]{Cornelisse1979}     \end{document}      With this I can easily switch between inline and footnote citation by changing `autocite=footnote` to `autocite=inline` in the package options. Moreover the prenote of any citation will be written with a leading capital letter when using `autocite=footnote` and with a lower case letter when using `autocite=inline` (ok need to comment sth. out but it is easy enough). **But** what doesn't work. I want the multicite with `\autocites` to look exactly like the one with `\footcites`. But any modification shouldn't effect the style when I use `autocite=inline` instead of `autocite=footnote` in the package options, because I want to switch between both styles back and forth. Has anyone an idea how to influence the `\autocites` command?


title: How do I install CTAN packages on Mac OS with TexShop?

text: I run TexShop on my Mac OS 10.6. I'd like to install new packages like this: http://www.ctan.org/tex- archive/macros/latex/contrib/listings/ How do I install it? I've downloaded the zip file.


title: Slide ticker in beamer presentations

text: I am using 'beamer' for presentations. I have a Main Titles and a few slides under each. For example, Introduction has 4 slides Methods have 5 slides. I want to put kind of a ticker at the top of each slide saying what slide we are at currently. For Introduction it should have 4 small circles (coz 4 slides) below it and the slide number should be a highlighted circle. How can I go about it? Thanks


title: Library of reusable equations

text: I want to do something that sounds simple. I want to create an external file where I will store my equations. Then I would like to be able to these equations and input them in a document without writing them all over again. For example I would like something like that: > equations.tex               \begin{equation}     F = ma     \label{newton2ndLaw}     \end{equation}          \begin{equation}     det(A-\lambda I)=0     \label{eigValProb}     \end{equation}      And so on. Then I would go on and use the above file in a document. > document.tex               %other \usepackages ...     \usepackage{Magic package that does what I want}     \useeqlibrary{equations.tex} %I just made up this command          \begin{document}     Lorem Ipsum text          \begin{equation}      \geteq{eigValProb} %made up this command also      \label{anequationlabel}     \end{equation}          \end{document}      During compilation the equation TeX code would be inserted automatically in the document. Something like: "Type once, use many times, keep code clean". Does anyone of you have anything in mind?


title: The xcolor package detected undefined color

text: I was writing a coloured book that requires to define 12 colours. However, sometimes I get `!package xcolor Error: Undefined color`. However, it does not specifiy any colors went wrong but indicates the line of error contains `\mainmatter`. Here is my MWE.               \documentclass[12pt,a4paper,headinclude,openright]{scrbook}     \usepackage{etoolbox}     \usepackage[usenames,dvipsnames,svgnames,table,x11names]{xcolor}     \usepackage{microtype}     \definecolor{color01}{named}{Maroon}     \definecolor{color02}{named}{Firebrick3}     \renewcommand\chapterbackcolor{%     \ifcase\value{chapter} \or color01\or color02\fi}     \usepackage[listings,theorems,skins,breakable]{tcolorbox}     %======================== Ch.1 boxes ===========================     \tcbset{exercisestyle01/.style={arc=0.5mm, fonttitle=\sffamily\bfseries,colback=LightPink1,colframe=color01}}          \newtcolorbox[auto counter,number within=chapter,list inside=eg]%     {examples01}[2][]{exercisestyle01,     title={Example ~\thetcbcounter: #2}}     %===============================================================     \begin{document}     \begin{examples01}{Equation of position of double pendulum}     With two masses $m_1$ and $m_2$ are suspended on rigid string has length $r_1$ and $r_2$. Find the possible co-ordinates with respect to the origin point.     \tcblower     First of all, it is a rotational motion, hence it requires co-ordinate systems to consist of angle co-ordinates. Since the $y$-axis is constant during motion, we imagine a cylindrical plane pass through the $y$-$z$ plane. There should be angles denoted as $\theta_1$ for $m_1$, and $\theta_2$ for $m_2$. (Note that the angles are not shown in here)          However, the double pendulum is hung not from the origin \footnote{It can be due to our choice of reference frame.}. It can be said it is translated to a point where the pivot is. Such that the position, although not given in the diagram, is $A(x_0,y_0,z_0)$.     \end{examples01}     \backmatter     \end{document}      The `.log` file is such as LaTeX Font Info: Font shape `T1/pmy/m/sl' in size <40> not available (Font) Font shape`T1/pmy/m/it' tried instead on input line 243.               <example-image-a.png, id=188, 401.5pt x 301.125pt>     File: example-image-a.png Graphic file (type png) <use example-image-a.png>     Package pdftex.def Info: example-image-a.png used on input line 243.     (pdftex.def)             Requested size: 85.35896pt x 42.67642pt.               ! Package xcolor Error: Undefined color ` '.          See the xcolor package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.243 \mainmatter          Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.          LaTeX Font Info:    Font shape `T1/pmy/m/sl' in size <12> not available      (Font)              Font shape `T1/pmy/m/it' tried instead on input line 243.          ! Package pgfkeys Error: I do not know the key '/tikz/ ' and I am going to ignore it. Perhaps you misspelled it.          See the pgfkeys package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.243 \mainmatter          This error message was generated by an \errmessage     command, so I can't give any explicit help.     Pretend that you're Hercule Poirot: Examine all clues,     and deduce the truth by order and method.          LaTeX Font Info:    Font shape `T1/pmy/m/sl' in size <17.28> not available     (Font)              Font shape `T1/pmy/m/it' tried instead on input line 243.          ! Package xcolor Error: Undefined color `'.          See the xcolor package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.243 \mainmatter          Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.          [5 <c:/texlive/2013/texmf-dist/tex/latex/mwe/example-image-a.png>]       Normally I saw people have problems with `xcolor` package, they do have a specific colour undefined. _Note:_   * I understand that the MWE is compilable, but my document is not, which stresses me.   * I examined all possible clues, and... nothing solved.


title: How to add PGF plot marker separately to document?

text: Say I have some PGF plot, which uses some custom plot markers, for instance:               \newcommand{\scaleofcirc}{0.85}     \pgfdeclareplotmark{manualcirc}     {     \pgfpathmoveto{\pgfpoint{\pgfplotmarksize*\scaleofcirc}{0pt}}     \pgfpatharc{0}{360}{\pgfplotmarksize*\scaleofcirc}     \pgfpathclose     \pgfusepathqfill     }      For some reason, I want to typeset the plot marker separately, so not as part of a plot, in a latex document. It should be typeset as part of some text. What is the best way to achieve this?


title: Why does xcolor not like \fbox (or vice versa)?

text: This document would not compile and a rather cryptic `! Illegal unit of measure (pt inserted)` pops up. Here's the MnWE:               \documentclass{article}          \usepackage{xcolor}          \renewcommand{\fboxrule}{0.9pt}          \begin{document}     \fbox{\colorbox{yellow}{\rule[-1.25ex]{0pt}{4ex}\hspace{1em}\textbf{Random Text}\hspace{1em}}}     \end{document}      The funny thing that puzzles me is that it turns immediately into a _working_ example when I use `color` instead of `xcolor`. What does `xcolor` break? Why is the error related to units? What has the color got to do with it?


title: Minipage won't format properly

text: I need help with this. Why `Block B` is being printed below `Block A`? I need to have it right to `Block A`.               \documentclass[10pt]{article} % Font size - 10pt, 11pt or 12pt.          \usepackage[hmargin=1.25cm, vmargin=1.5cm]{geometry} % Document margins.          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \rfoot{{\sffamily Last update: \today}}          \renewcommand{\headrulewidth}{0pt} % Get rid of the default rule in the header.          \begin{document}          \begin{minipage}[t]{0.5\textwidth} % Start the left-hand side of the page.     \vspace{0pt} % Trick for alignment.     Block A.     \end{minipage} % End the left-hand side of the page.          \hfill % ----------------------------------------------------------------------          \begin{minipage}[t]{0.44\textwidth} % Start the right-hand side of the page.     \vspace{0pt} % Trick for alignment.     Block B.     \end{minipage} % End right-hand side of the page.          \end{document}


title: Random start of line

text: I would like to add a random white space at the begining of each line in a flushleft typeset paragraph. The idea is to simulate a hand-written manuscript. I thought I could do trick lineno package to do this but that's not the logic. Any idea would be welcome. * * * # Follow-up question Sašo Živanović's solution works, but in a similar context, it conflicts with a previously defined macro: the paragraph shape remains normal.               % Based on some ideas from http://tex.stackexchange.com/a/29458     \documentclass{article}          % thanks to Bruno Le Floch     \usepackage{rotating}     \usepackage[first=-3,last=5]{lcg}% you can play around with these values     \makeatletter     \newcommand{\globalrand}{\rand\global\cr@nd\cr@nd}     \makeatother     \newcommand{\randomrotation}[1]{\globalrand\turnbox{\value{rand}}{#1}\phantom{#1}}     % thanks...     \makeatletter     \def\handmove#1{%       \@handmove#1 \@empty }     \def\@handmove#1 #2{%       \randomrotation{#1}\space       \ifx #2\@empty       \else         \expandafter\@handmove       \fi       #2%     }     \makeatother          %la macro de Saso Zivanovic     \usepackage{pgf,pgffor}     \usepackage{etoolbox}          \def\randomflushleftpercent{0.3}     \def\randomflushleftn{42}          \newenvironment{randomflushleft}{%       \raggedright       \everypar={\computerandomparshape}     }{}          \def\computerandomparshape{%       \gdef\myparshape{\parshape\randomflushleftn\space}%       \foreach \n in {1,2,...,\randomflushleftn} {%         \pgfmathparse{rnd*\randomflushleftpercent*\textwidth}%         \xappto\myparshape{\pgfmathresult pt }%         \pgfmathparse{\textwidth-\pgfmathresult}%         \xappto\myparshape{\pgfmathresult pt }%       }%       \myparshape     }     \begin{document}     \pagestyle{empty}     \begin{randomflushleft}       \handmove{Solacia dua, nequaquam paria tanto dolori, solacia         tamen. Solacia dua, nequaquam paria tanto dolori, solacia         tamen. Solacia dua, nequaquam paria tanto dolori, solacia         tamen.}     \end{randomflushleft}     \end{document}      ![Wrong result](http://i.stack.imgur.com/OEslx.png)


title: Automatic new directory for new files

text: I am looking for some way to have a tidy folder system. My idea is, when I create a new file for latex to automatically create a new folder under the same name inside my working directory and put all files in that folder (`.aux`, `.pdf`, `.tex`, `.loc` etc). It might be the case that some package does that, but I am relatively new to this. Do you know any way of achieving something like this?


title: Put a frame around all pages, except one, in a book

text: I am writing a book and would like to put a red, 5pt thick frame around all pages, except around one page in the middle of the book, which contains a figure that is bigger than the frame. The frame should be placed 1cm above the upper text margin, 1cm under the bottom margin and 1.5cm from the left and right margins; it should not suround the header or the footer, which both should be just outside the frame. I am using XeLaTeX, but have not descided if I am going to use the memoir or the KOMA-script class for the book. It might depend on this answer.