I am using the appendices and the varioref package to refer at them.  The code for the appendices is the following:  \documentclass{book}     \begin{document}     \begin{appendices}     \appendixpage     \noappendicestocpagenum     \addappheadtotoc      \chapter[MATLAB codes]{List of MATLAB codes} \label{app:MATLAB}      \begin{lstlisting} [language=Matlab, caption=Reconstruction function., label=code:reconstruction]      some text      \end{lstlsiting}     \end{appendices}     \end{document}   when i quote them in the text i do it this way:   In appendix \vref{app:MATLAB} we have the code \vref{code:reconstruction}   the results are strange, like:"In the appendix chapter A we have the code ?? A.1 on page 121".  Is it normal?  I am using (in this order) these packages:  \usepackage{varioref} \usepackage{hyperref} \usepackage{cleveref}   Thank you in advance.
121212
\documentclass{scrbook}  \usepackage{listings} \usepackage{cleveref}  \begin{document}  Ref: \ref{test}. Cref: \cref{test}.  \begin{lstlisting}[caption={Test},label={test}] test \end{lstlisting}  \end{document}   This produces Ref: 1. Cref: ?? 1.. I expected something like Ref: 1. Cref: Listing 1.  I get a LaTeX Warning: \Cref reference format for label type 'lstlisting' undefined on input line 9.
12367
For  I wanted to define a shortcut for creating a matrix inside a tikzpicture. As a minimal example, consider  \newcommand\mymatrix[1]{     \begin{tikzpicture}         \matrix[matrix of math nodes] {#1};     \end{tikzpicture}% }   which would then be used as  \mymatrix{     a &amp; b \\     e &amp; f \\ }   But LaTeX complains about Package pgfbasematrix Error: Single ampersand used with wrong catcode at the line with the closing brace of \amatrix{}. Why does it do that and how can I avoid it?
53085
I link two questions below because I use their solution, to number my equations and generate a list of my equations.   My question about numbering equations:  Generate a list of equations:    Although they might not be directly relevant, I mention I use them because I am not sure if this messes up possible solutions.  Below my MWE. This works fine so far (Figures attached).  But I want the "list name" of my equation (in this case: \myequations{PDE of the diffsion process}) to be available as a kind of variable so that I can refer to it as "The \XXX is given by", where \XXX is a command giving me the Name (\myequations{...}) of the equation I refer to (e.g., \tag{\ref{eq:litdiff}}).  I hope my equation is clear, if not, please tell.  MWE:  \documentclass[12pt]{report} \usepackage{tocloft} \usepackage{amsmath} \usepackage{physics} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}  \newcommand{\listequationsname}{List of Equations} \newlistof{myequations}{equ}{\listequationsname} \newcommand{\myequations}[1]{% \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par} \setlength{\cftmyequationsnumwidth}{2.5em}  \newcommand{\subs}{\text{s}}  \begin{document}  \listofmyequations  \chapter{Diffsion}  The PDE of the diffsion process is given by \begin{subequations}\label{eq:litdiff} \begin{equation} \pdv{}{t} (\widetilde{c}_{\subs}(r,z,t)+c_{\subs,0})=\frac{D_{\subs}}{r^{2}}\pdv{}{r} \left(r^{2}\frac{\partial (\widetilde{c}_{\subs}(r,z,t)+c_{\subs,0})}{\partial r}\right) \tag{\ref{eq:litdiff}} \end{equation} \myequations{PDE of the diffsion process} \noindent The boundary conditions of Eq.~\eqref{eq:litdiff} are given by \begin{align} D_{\subs}\pdv{}{r} \widetilde{c}_{\subs}(0,z,t) &amp;= 0 \label{eq:diffusionpartialdiff_boundaries0}\\ D_{\subs}\pdv{}{r} \widetilde{c}_{\subs}(R_{\subs},z,t) &amp;= -j(z,t)\label{eq:diffusionpartialdiff_boundariesRs} \end{align} and the initial condition is given by     \begin{equation}         \widetilde{c}_{\subs}(r,z,0) = 0 \quad r\in [0;R_{\subs}].     \label{eq:diffusionpartialdiff_init}     \end{equation} \end{subequations}  \end{document}
10557
I wanna display A as Appendix A in TOC, as shown below.     I tried to add \backmatter before \appendix as shown in , but cref{label} will display as Section 1. I also used \renewcommand as suggested in the most posts on this site, but it doesn't make any changes. Here is the source code.  \documentclass[twoside,12pt]{article}  \usepackage{cleveref}  \usepackage[english]{babel} \usepackage[toc, title]{appendix} \renewcommand\appendixname{Anexo} %\renewcommand\appendixpagename{Anexos} \renewcommand\appendixtocname{Appendix}  \begin{document}  \tableofcontents  \section{The main body of the text} Refer to \cref{appendix} for more information.  \appendix \section{A complete table.} \label{appendix} Some text.  \end{document}
36105
I have a problem with cleveref. Apparently, it does not work with mdframed.  \documentclass[12pt,a4paper]{book} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage[left=2.50cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry} \usepackage{xcolor} % Definition of colors \definecolor{toc_heading}{RGB}{0 51 89} \definecolor{toc}{RGB}{0 119 138} \definecolor{section}{RGB}{0 113 187} \definecolor{subsection}{RGB}{0 115 207} \definecolor{headline}{RGB}{77 112 139} \definecolor{citecolor}{RGB}{0 124 48}  \usepackage{amsthm}  \usepackage[framemethod=TikZ]{mdframed} \mdfsetup{skipbelow=3ex} \newtheorem{dummy}{dummy}[chapter]   \newmdtheoremenv [%  hidealllines=true, leftline=true,  linewidth = 2pt,  linecolor=section,  leftmargin = 0,rightmargin = 0,%  skipabove=\dimexpr\parskip+10pt\relax,  innertopmargin = 0,splittopskip =3ex,  innerrightmargin=2ex,splitbottomskip=3ex,innerbottommargin=2ex,  ntheorem = false ,backgroundcolor=section!20% ]{theorem}[dummy]{Theorem} \usepackage{hyperref} \usepackage{cleveref} \crefname{theorem}{theorem}{theorems} \begin{document} \chapter{Chapter 1} \begin{theorem}\label{thm:1}    bla \end{theorem}  This is \cref{thm:1}.  \end{document}   This code produces: This is ?? 1.1.   Has anyone encountered a similar problem?
65207
Dear friends: there is a problem with appendix and ápendice.  I have a scrbook document and I use appendix package,   \usepackage[title, titletoc]{appendix}    because I like the word "Apéndice" in the toc  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}   However, when I compile with latex there is an error in file.toc (maybe in file.aux before). The reason is that in the file.aux there is a line like this:  \@writefile{toc}{\contentsline {chapter}{Ap\IeC {\'e}ndice \numberline {A}Sobre el \LaTeX  }{27}{ApÈndice.1.Alph1}}   and in the second compilation the character "È" produces and error. If I compile with lualatex I have not any error.  I have tried to modify \indexname, \@chapapp but I can not find any solution.    Yes, that is a solution. I am going to clarify the problem with a MWE. In my opinion the problem is motivated by UTF-8 codify and inputenc package, as it is possible to see with this code:  \documentclass[paper=a4,10pt, twoside]{scrbook}%  \usepackage{etoolbox}  \usepackage{tgheros}    % (Una versión libre de Helvetica) \renewcommand{\sfdefault}{qhv} %qhv  %:Fuente para todo lo demás (Una versión libre de Times) \renewcommand{\rmdefault}{qtm} \usepackage{textcomp} \normalfont  \usepackage[T1]{fontenc}         \usepackage[utf8]{inputenc} %para LaTex   %:Paquetes relacionados con el idioma y codificación \usepackage[english, spanish, es-nosectiondot, es-noindentfirst, es-nolists, activeacute]{babel}  \spanishdecimal{.}  %:Para poner las referencias y los nombres de figuras y tablas en castellano \addto\captionsspanish {% \def\figurename{Figura}% \def\tablename{Tabla}% \def\listfigurename{Índice de Figuras} \def\listtablename{Índice de Tablas} \def\contentsname{Índice}% \def\chaptername{Capítulo} \def\Agradecimientos{Agradecimientos} \def\Prefacename{Prefacio}% \def\refname{Referencias}% \def\abstractname{Resumen}% \def\bibname{{Bibliografía}} \def\appendixname{Apéndice} \def\miapendice{\appendixname} \def\glossaryname{Glosario}% \def\indexname{{Índice Alfabético}} }  %:Para definir APÉNDICES \usepackage[title, titletoc]{appendix}  \usepackage{hyperref}   \begin{document}  \cleardoublepage \phantomsection \tableofcontents  %:Empieza el contenido del libro \mainmatter  \chapter{Primer capítulo} \section{Primera sección, primer capítulo}  \chapter{Segundo capítulo} \section{Primera sección, segundo capítulo}  \begin{appendices}  \chapter{Primer apéndice} \section{Primera sección, primer apéndice}  \chapter{Segundo apéndice} \section{Primera sección, segundo apéndice}  \end{appendices}  \end{document}   If you compile, you obtain this error message:     Package inputenc Error: Unicode char \u8:énd not set up for use with La- TeXSee the inputenc package documentation for explanation.Your command was ignored.Type I   to replace it with another command,or  to continue without it.ice.alph1.Alph11ice.alph1.Alph20P   But the solution proposed it is perfect. Thank you
68599
The following code is in the preamble of my LaTeX document:  \documentclass{llncs} \usepackage{amsmath,amssymb} \usepackage{url} \usepackage[algoruled,vlined]{algorithm2e} \usepackage{graphicx,subfigure}   \usepackage{hyperref}  \hypersetup{colorlinks=true,citecolor=blue}   \numberwithin{equation}{section} % numbering according to the section \bibliographystyle{plain}  %Choose a bibliograhpic style \begin{document}  \title{The Title} \maketitle \section{A} \label{sect:A} \subsection{a} \subsection{b} % ... \section{B} \label{sect:B} \subsection{a} \subsection{b} % ... \section{C} \label{sect:C} \subsection{a} \subsection{b} % ... \end{document}   Note that the text is organized into sections and subsection. However, after compiling the code, the Adobe PDF preview does not show the "tree" branching on the left. Instead, it just shows "The Title", and that option has no branching with the "+/-" sings. How could I achieve this?
18573
I am using the listings package to include sample Perl source code in LaTeX. I included the package with \usepackage{listings}, and used the following code:  \lstset{language=Perl} \lstset{commentstyle=\textit} \lstset{frame=shadowbox} \begin{lstlisting}[numbers=left] $subject = "&lt;owamp:subject xmlns:owamp=\"http://ggf.org/ns/nmwg/tools/owamp/2.0/\" id=\"subject\"&gt;\n"; \end{lstlisting}   The resulting output is:    The line doesn't seem to breaking, but I read that lines break automatically when using the listings package. This line is the entire PDF snapshot of the code.  Am I doing anything wrong as far as the code is concerned?
116262
My thesis is about a project I developed in a company. During the project, I generate several official documents that I'm appending at the end (using includepdf package). These documents have their own cover, so it's not necessary to create an almost blank page with only "Appendix A - Lorem ipsum", but if I don't include this I lose my reference in the index. What should I do? Thanks in advance!
91144
I have been trying to get the appendix for my thesis done. I've read a lot about it and as always you can chose between a fiddly way and a magic package that doas the job to solve a problem (I usually prefer a magic package). Unfortunately both approaches didn't work out, so here is how far I got.  Four requirements  This is what my appendix should look like for a document with class 'article', there are four requirements:  Sections should look like this:  Appendix A    Title1  Appendix B    Title2   They should appear in the same way in the TOC:  Appendix A    Title1                    56  Appendix B    Title2                    88   \ref{app:foo} should be able to return the letter of the corresponding appendix.  Tables and Figures should be labeled as Table A1. or Figure A1.  Fiddly approach  \documentclass{article}  \renewcommand\appendix{\par   \setcounter{section}{0}   \setcounter{subsection}{0}   \setcounter{figure}{0}   \setcounter{table}{0}   \renewcommand\thesection{Appendix \Alph{section}}   \renewcommand\thefigure{\Alph{section}\arabic{figure}}   \renewcommand\thetable{\Alph{section}\arabic{table}} }  \begin{document} \tableofcontents  \section{Dolor sit amet} Have a look at \ref{app:foobar}  \appendix \section{foo} \label{app:foobar}  \begin{table}[h] \caption{foo} \begin{tabular}{cc} \textbf{ a } &amp; \textbf{ b }\\ 1 &amp; 3 \\ 2 &amp; 4\\ \end{tabular} \end{table}  \end{document}   It worked out pretty good. The problem is that in the TOC the appendix title "foo" gets written onto "Appendix A". Is there a way to adjust the position of the title in the TOC?  Magic package 'appendix'  The solution I found  unfortunately applies only to the documentclass 'report' where chapters are used. But my document has the class 'article' and no chapters whatsoever. I also don't like it that the appendix titles are not in the same lines as "Appendix A" and in table labels there is a dot between the section and table number "Table A.1.".  \documentclass{report} \usepackage[titletoc,toc]{appendix}  \begin{document} \tableofcontents  \section{Dolor sit amet} Have a look at \ref{app:foobar}  \begin{appendices}   \chapter{Consectetur adipiscing elit} \label{app:foobar}     \begin{table}[h]     \caption{foo}     \begin{tabular}{cc}     \textbf{ a } &amp; \textbf{ b }\\     1 &amp; 3 \\     2 &amp; 4\\     \end{tabular}     \end{table}   \chapter{Mauris euismod} \end{appendices} \end{document}    Is there a proper way using the appendix package? I played around with the toc, title and titletoc arguments for the package. But it didn't do what it said in the manual.  It would great if someone could help me, no matter on which approach!  Update  Thank you very much for your help! The first comment from Alan Munn reassuring me that the appendix package should work as expected helped me to find the error. This is the erroneous code:  \documentclass[a4paper,12pt]{article}  %appendix \usepackage[title,titletoc,toc]{appendix}  %format paragraphs \usepackage{titlesec} \titleformat{\paragraph}[runin]{\normalfont\normalsize\itshape}{\theparagraph}{}{}[.] %format paragraph italic and ser a period after it \titlespacing{\paragraph}{0pt}{0pt}{*1} %remove spacing and add one characterspace after paragraph  \begin{document} \tableofcontents  \section{Method} (The entire results are detailed in Appendix \ref{app:bar}).     \begin{appendices} \section{foo} \label{app:foo} asd \section{bar} \label{app:bar} \end{appendices} \end{document}   The three lines which format paragraphs cause the appendices to fail in the toc. If taken out, everything works fine. But what about my paragraphs then? Do I have to pose another question for that? ;)
40109
I am looking for an example for using the  package to write a cover letter, with names and addresses on a spreadsheet. The package comes with an example, but you have to manually enter all the data.
81994
My article uses the twocolumn parameter of the article document class. However I want to list my images as a multipage appendix at the end of the document (in a new page) but I want a single column appendix so that I can center my figures properly.   I have tried to use the minipage environment inside \twocolumn [  ] but it does not seem to work. Take a look at the code:  %document body, packages etc. \newpage  \section*{Appendix} \begin{center} \begin{minipage}[c]{\textwidth}  \begin{figure}     \includegraphics[width=\columnwidth]{curve1}   \caption{An arbitrary initial poinset $\mathbb{S}^2$.}     \label{curve1} \end{figure} %figure curve 1    \end{minipage}   \end{center} \end{document}   For instance, the figure does not appear to be rendered and the error which is returned by the compiler is:  Not in outer par mode
91546
Given the MWE below from  (compiled version on the link) :   \documentclass{article} \usepackage{float} \usepackage{tikz} \usetikzlibrary{positioning, fit, calc, shapes, arrows} \usepackage[underline=false]{pgf-umlsd} \begin{document}  \begin{figure}[H]     \centering     \begin{sequencediagram}         \newinst{c}{Client}         \newinst[6]{s}{Server}          \mess[1]{c}{Longer label}{s}         \mess[1]{s}{label}{c}         \mess[1]{c}{label}{s}         \mess[1]{s}{Longer label}{c}     \end{sequencediagram}     \caption{Client-Server messaging} \end{figure} \end{document}   I would like to add some "processing contents" on the left of the left dotted vertical bar and on the right of the right dotted  vertical bar. (If possible to add some \newline inside of these "processing contents" also)    Text example "linearised"* :           Client          Server       c^2 | ---------------&gt;| init           |                 | f=f(c^2)    g=g(f) | &lt;---------------| f         g | ---------------&gt;| check if h=g           | &lt;---------------| OK     *What I mean is that I still want to use the above tex form, which has a nice rendering.  The only thing I would like to add are information on both sides at every start and end of an arrow. I am looking for a simple solution if it is possible.  Thank you in advance for any help you may provide.
15486
I'm trying to this:  \newcommand{\code}[1] {\begin{lstlisting} {#1} \end{lstlisting} }   But I keep getting this error:  Package Listings Warning: Text dropped after begin of listing   I'm calling \usepackage and all so, do any of you knows how to solve this?
48894
I need some help with creating an appendix for my thesis. I have about 10 figures which need to be in the appendix. I have a good appendix with the following code:   \appendix  \addcontentsline{toc}{chapter}{APPENDICES}  \chapter{XXXX}   I have a main thesis.tex file where I call this appendix.tex file after the last chapter. Problems are:   The appendix starts without any notice that it is the appendix except for the chapter number being A, but I want to have either a separate page which says "Appendix" prior to the start of the appendix or on top of the first appendix page to explicitly say "Appendix". Now I use the \chapter{} command to have the title of the appendix but I think I will have only one chapter in the appendix. Is there some command which can make the title insited of chapter?
56711
This thread evoked from .  \documentclass{article}  \usepackage{unicode-math} % This causes the question mark bug % This code requises unicode-math % How can you use the code without unicode-math -package? \setmathfont[BoldFont={latinmodern-math.otf}]{latinmodern-math.otf} \setmathfont[range=\mathscr,Scale=MatchUppercase]{Asana-Math.otf} \usepackage{tikz} \usetikzlibrary{tikzmark,decorations.pathreplacing,calc} \newcommand\MyText[4][0pt]{% \begin{tikzpicture}[overlay, remember picture] \draw [decoration={brace},decorate,thick]    ( $ ({pic cs:#3}|-{pic cs:#2}) + (#1,1.3ex) $ ) --       node[anchor=west,xshift=5pt,text width=5cm] {#4}    ( $ (pic cs:#3) + (#1,0) $ ); \end{tikzpicture}% }  % I have defined question like this \usepackage[framemethod=tikz]{mdframed} \newtheorem{question}{Question} \mdfdefinestyle{que}{   linecolor=cyan,   backgroundcolor=cyan!20, } \surroundwithmdframed[style=que]{question}  \begin{document} \begin{question} Lorem ipsum? \end{question} \end{document}   I am thinking why you need the  package for the TikZ code.  Why does the TikZ code require unicode-math package?
62174
The code for reference is this  @article{matcontcl,  title= {MATCONT and CL MATCONT},  author = {A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and  B.Sautois},  year = {2006},  journal = {Continuation toolboxes in matlab}, }   This is the error that follows  This is BibTeX, Version 0.99d (TeX Live 2015/W32TeX) The top-level auxiliary file: PropuestaInvestigacion.aux The style file: abbrv.bst Database file #1: biblio.bib Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1049 of file abbrv.bst Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1049 of file abbrv.bst Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1090 of file abbrv.bst Too many commas in name 1 of "A. Dhooge, W. Govaerts, Yu.A. Kuznetsov, W. Mestrom, A.M. Riet and B.Sautois" for entry matcontcl while executing---line 1090 of file abbrv.bst (There were 4 error messages)   How could I fix it?