# Tag Info

10

You can make things so the figure environment shares the counter with lstlisting. However, you should ensure that lstlisting environments are floating too, otherwise the numbers could not agree and a figure could appear before a listing with a lower number. \documentclass{article} \usepackage{listings} \makeatletter \AtBeginDocument{% ...

6

The definition of \newcounter is \expandafter\@ifdefinable\csname c@#1\endcsname{\@definecounter{#1}} \@ifnextchar[{\@newctr{#1}}{} where \@definecounter is \expandafter\newcount\csname c@#1\endcsname \setcounter{#1}\z@ \global\expandafter\let\csname cl@#1\endcsname\@empty \addtoreset{#1}{@ckpt} \global\expandafter\let\csname p@#1\endcsname\@empty ...

6

\alph expects a counter following it. But you could resort to using clues from the internal meaning of \alph \documentclass{article} \usepackage{pgffor} \makeatletter \def\aeAlph#1{\@alph{#1}} \makeatother \begin{document} \foreach \n in {1,...,10}{ \edef\letter{\aeAlph{\n}} Letter=\letter\par } \end{document} Calling texdef -t latex alph ...

6


6

Forget the renaming of \refname and simply use »tocbibind«. \documentclass[11pt,a4paper]{article} \usepackage[T1]{fontenc} \usepackage[nottoc,numbib]{tocbibind} \begin{document} \tableofcontents \bigskip \begin{thebibliography}{9} \bibitem{key} Author, Title, Journal \end{thebibliography} \end{document}

5

You could update the way the section counter is formatted/printed. This is done by the macro \@seccntformat: \documentclass[12pt]{amsproc}% http://ctan.org/pkg/amsproc \makeatletter \def\@seccntformat#1{% Section~\protect\textup{\protect\@secnumfont \csname the#1\endcsname \protect\@secnumpunct }% } \makeatother \begin{document} ...

5

You should set the counter secnumdepth. Making this 0 means chapters are numbered but not sections, 1 numbers sections but not subsections. \documentclass{book} \setcounter{secnumdepth}{0} \begin{document} \tableofcontents \chapter{Test} \section{Test section} \subsection{Test subsection} \chapter{More} \end{document}

5

Here is a solution: \documentclass{article} \newcounter{chem} \newcounter{temp} \usepackage{amsmath} \usepackage{mhchem} \newenvironment{chequation}{% \setcounter{temp}{\value{equation}}% \setcounter{equation}{\value{chem}}% \renewcommand{\theequation}{R\arabic{equation}}% }{% \setcounter{chem}{\value{equation}}% ...

5

You're missing \usepackage{amsthm}. I'd improve the definition, though, with enumitem instead of enumerate: \documentclass[11pt]{article} \usepackage{amsthm,enumitem,xcolor} \usepackage{mdframed} \definecolor{lightgray}{gray}{0.9} \newtheorem*{hulprule}{Rule settings} \newenvironment{drule}[3] {\begin{mdframed}[backgroundcolor=lightgray]% ...

5

Add the following in your Local Layout of LyX (Document > Settings... > Local Layout): #\DeclareLyXModule{Other} #DescriptionBegin #Defines Axiomp (primed axioms) #DescriptionEnd #Requires: theorems-ams-extended #Category: theorems Format 35 Requires amsmath # The environments defined (regular and starred) are : # - Axiomp Style Axiomp CopyStyle ...

5

Your Mistake You are actually using the book or report class or something like that. \documentclass{book} \begin{document} \section{Section 1} \section{Section 2} \subsection{SubSection 1} \end{document} So, your output looks like this as reported by you. The Solution Please use the article class in place of book class. \documentclass{article} ...

5

Hope I haven't misunderstood the question... If you want to add the word "Appendix" each time a chapter title is printed (inside appendices), you can add the line \renewcommand*\printchaptername{\Large\bfseries\appendixname~} just after issuing the \appendix command. MWE \documentclass[a4paper,openany,article]{memoir} \usepackage[utf8]{inputenc} ...

5

Option 1: replace \usepackage[nottoc,numbib]{tocbibind} with \usepackage[nottoc]{tocbibind} See section 2 of the tocbibind documentation in case numbib is not self-explanatory. Option 2: As you're using a KOMA-Script class, don't load the tocbibind package at all; instead add the class option bibliography=totoc.

5

Here's a simple solution defining an environment, eqn, that gives roman numbering. If you want shared numbering % arara: pdflatex \documentclass{article} \usepackage{amsmath} \newenvironment{eqn}{% \refstepcounter{equation}\equation} {\tag{\roman{equation}}\endequation} \begin{document} $$y=mx+b$$ ...

4

The \newtheorem construction offers two optional arguments. The first one fixes your numbering. In this case it means that proposition should use the same counter as theorem. \documentclass{article} \usepackage{amsthm} \begin{document} \newtheorem{theorem}{Theorem} \newtheorem{proposition}[theorem]{Proposition} \begin{theorem} 1+1=2. \end{theorem} ...

4

You almost had it; just use the patch for redefining \thefootnote to do nothing. I've reduced the MWE to a real MWE. \documentclass[11pt,titlepage]{article} \usepackage{etoolbox} \patchcmd{\maketitle}{\let\footnoterule\relax}{\def\thefootnote{}}{}{} \usepackage{hyperref} \begin{document} \author{Me \and Another Person\thanks{Some Thanks}} \date{First ...

4

First off: Don't use the eqnarray environment. Use the align environment of the amsmath package instead. Second, to achieve your specific equation numbering objective, you should use the subequations environment, also provided by the amsmath package. Finally, I recommend you insert a \phantom{-} directive at the start of the right hand side (RHS) of the ...

4

There's a much neater way: \documentclass[11pt]{report} \usepackage{capt-of} \begin{document} \chapter{Chapter} \begin{figure} \fbox{ABCDEFGHIJKLMNOPQRSTUVWXYZ} \caption{Alphabet} \medskip \captionof{table}{Numerals} \medskip \begin{tabular}{l}1\\23\\456\\7890\end{tabular} \end{figure} \end{document} Instead of capt-of you can use caption, that ...

4

According to the author of the Spanish version of babel lower case roman numerals should not be used when writing in Spanish. You can find more information about this issue in this blog (in Spanish) and in the babel-spanish manual at page 4 (again, in Spanish). Lower case roman numerals can be restored via the es-lcroman option, which is documented at ...

4


4

I'm sure the caption package will have hooks that let you do it easily, but one can do it with basic latex: The command that provides for the text surrounding the number in the caption is \fnum@figure for figures and \fnum@table for tables. The default is essentially \figurename~\thefigure. You just want to add ~(above) to that \begin{figure} .\\ ..\\ ... ...

4

Using the titlesec package should do it. Just try this code: \documentclass[12pt]{amsproc}% http://ctan.org/pkg/amsproc \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{titlesec} \usepackage[dotinlabels]{titletoc} \titleformat{\section}[block]{\bfseries\large\filcenter}{Section \thesection.}{0.4em}{} ...

4

If all you need is to exclude a section from the TOC, you need simply change the tocdepth before you write the section information to the TOC. \documentclass{article} \usepackage{titlesec} \titleformat{\section}{\large\bfseries}{\thesection}{8pt}{\large} \newcommand{\restoretoc}{\addtocontents{toc}{\setcounter{tocdepth}{1}}} ...

3

The problem is that amsart loads amsmath in a way that it is not compatible with empheq, at least with respect to the reqno option. You can work round this by loading the package first, before the document class: \RequirePackage[reqno]{amsmath} \documentclass[a4paper,12pt]{amsart} \usepackage{empheq} \numberwithin{equation}{section} ...

3

If you do not want to adapted the spacing in every individual \section*{} you can define your own command for the space \documentclass{article} \usepackage{titlesec} \newcommand{\myspace}{8pt} \titleformat{\section}{\large\bf}{\thesection}{\myspace}{\large} \begin{document} ...

3

If there are no slides between part x and part (x+1), then you can use the current page number minus the page where subsection starts plus 1. The following macro does the calculation: \newcommand\subsectnum{% (part~\number\numexpr \insertpagenumber-\insertsubsectionstartpage+1\relax)% } Full Code \documentclass{beamer} \usetheme{Berlin} ...

3

Assuming that you have a good reason to do that, here's how you can do. Put, just after each unnumbered subsection, the lines \stepcounter{subsection} \addcontentsline{toc}{subsection}{\thesubsection\hspace*{1em}<name>} where <name> is the name of the subsection. Note that I've used \stepcounter instead of \refstepcounter voluntarily, hoping ...

3


3

this is a riff on @Thorsten's example, which really provides the mechanism for modifying the tocdepth. this is presented as an answer only because i didn't want to pollute his example with code that he might not understand. (in a comment, he requested an elaboration, and this is too extensive for a comment.) \documentclass[11pt]{report} ...

2

You can do the following: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} \label{a} a+b\\ \label{b} c+d\\ \label{c} e+f\tag{i}\\ \label{d} g+h\\ \label{e} i+j\tag{ii}\\ \label{f} k+l\\ \label{g} m+n \end{align} Equation~\eqref{a}. Equation~\eqref{b}. Equation~\eqref{c}. Equation~\eqref{d}. ...

Only top voted, non community-wiki answers of a minimum length are eligible