Tag Info

Hot answers tagged

8

Use \newcolumntype{C}{>{\makebox[1em][r]{\mycount}\hspace{0.5em}}l}


7

\documentclass{article} \makeatletter \def\@arabic#1{\number\numexpr#1-1\relax} \makeatother \begin{document} \section{zzz} aa \begin{equation}1=0\end{equation} \subsection{bbb} zz \begin{equation}1=0\end{equation} \subsection{bbb} \section{hhh} \subsection{lll} zz \begin{figure} \fbox{XXXXX} \caption{zzz} \end{figure} \begin{enumerate} \item zzz ...


5

The .aux file is read in a group, thus you need global definitions, e.g.: \newcommand*{\labelprop}[2]{% \@bsphack \label{#2}% \protected@write\@auxout{}{\string\@labelpropdef{my-ref-#2}{#1}}% \@namedef{my-ref-#2}{#1}% \@esphack } \newcommand*{\labelpropdef}{% \global\@namedef } Remarks: I have added comment signs at the line ends to avoid ...


5

\documentclass{scrreprt} \begin{document} \tableofcontents \chapter{Chapter 1} \section{Something} \subsection{Subsection 1} At this point I'd like to refer to an Image and a short text in the attachment. See here: \ref{my_reference}. \chapter{Chapter 2} \section{\ldots} \chapter{Chapter 3} \chapter{Chapter 4} \chapter{Chapter 5} ...


4

The subequations environment increments the equation counter every time with a new instance. You can use only one subequations environment. If you want the separation between the two sets add a \jot as shown below: \documentclass{article} \usepackage{empheq} \begin{document} \begin{subequations} \begin{empheq}{align} & a = b \label{E1} \\ & c = d ...


4

You should load the amsmath package (if you don't do so already) and use its \tag macro to assign whatever number or symbol you like to a given equation. Cross-references to such equations can ba made via the usual \label--\ref (or \eqref) mechanism. \documentclass{article} \usepackage{amsmath} % for \tag and \eqref macros \setlength\textwidth{7cm} % ...


4

The OP used \frontmatter in file titlepage.tex -- this is not an error, but there is no \mainmatter as a follow-up, thereby leading the first chapter to be effectively unnumbered and the chapter counter value to be 0. This document shows the wrong usage: \documentclass{scrbook} \begin{document} \tableofcontents \frontmatter \chapter{My sophisticated ...


4

Use \ZeroRoman as defined below: \documentclass{book} \newcommand{\ZeroRoman}[1]{% 0 + \Roman \ifcase\value{#1}\relax 0\else% Chapter 0 \Roman{#1}\fi}% All other chapters \renewcommand{\thechapter}{\ZeroRoman{chapter}} \setcounter{chapter}{-1}% To start chapter numbering from 0 \begin{document} \tableofcontents \chapter{First chapter} ...


4

Too long for a comment. It is not clear whether you want all equation numbers with a * or only some of them. This should be a rough hack you may find useful \documentclass{book} \usepackage{amsmath} \begin{document} \chapter{One} \makeatletter \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)*}} \makeatother \begin{align}\label{eq:d2} ...


4

I believe that you want to divide the four equations into two pairs, each of which has an equation and its dual, based on the presence of \top and \bot. You can use the \tag* feature that allows pretty much everything as the “equation number”: \documentclass{report} \usepackage{amsmath} \DeclareRobustCommand{\zeroast}{\makebox[0pt][l]{*}} ...


4

One possibility is to use showkeys instead of showlabels (we've had healthy rivalry for a few decades:-) but if you want to stick with the opposition you can add some defensive coding to numcases so that the additional boxes don't break it: \documentclass[a4paper]{article} %\usepackage{showkeys} \usepackage{showlabels} \usepackage{cases} \makeatletter ...


4

You can change all counters using arabic numbers into oldstyle arabic numbers by re-defining the inner macro \@arabic. As well, I provided \Arabic which gives the standard arabic numbering, so for instance, if you wanted enumerate to use standard digits, you can do \renewcommand*\theenumi{\Arabic{enumi}}. However, there is some trouble with page counter and ...


4

Use empheq (but first think again if you really need separate numbers): \documentclass{article} \usepackage{amsmath} \usepackage{empheq} \begin{document} \setcounter{equation}{9} % just for the example \begin{subequations} \begin{empheq}[left=\empheqlbrace]{align} k \cdot E &= 0 \\ k \cdot B &= 0 \end{empheq} \end{subequations} \end{document}


4

You are apparently using biblatex, so you can simply use \printbibliography[heading=bibnumbered]


4

This is a quick solution for book.cls, but this does not affect the page chaptermark headings. The book class uses the command\@makechapterhead for setting the chapter heading via \@chapapp\space \thechapter. Replacing this by a patch by \@chapapp\space \Numberstring{chapter} Chapter 1 will be Chapter One etc. The macro \Numberstring from fmtcount ...


3

Absolutely no warranty! but since you asked for pointers, here is this. \documentclass{article} \usepackage{varwidth} \newcounter{verse} \setcounter{verse}{0} \newenvironment{Verse} {\refstepcounter{verse} \equation \let\theequation\theverse \varwidth[b]{\linewidth} } {\endvarwidth \endequation \addtocounter{equation}{-1} } ...


3

Numbering all equations makes it easier for the reader to find a specific equation. If only important equations are numbered, then you can have pages without any numbered equation, so you cannot know whether the equation you are looking for is before or after that page. The purpose of numbering equations is not to indicate which ones are important, but to ...


3

\documentclass{report} \newtheorem{example}{Example}[chapter] \begin{document} \chapter{zz} zz zz zzzzzz \begin{table}[ht] \begin{tabular}{cc} 1&22\\ 33&4 \end{tabular} \caption{some numbers\label{ttt}} \end{table} \begin{example}\label{ee} some stuff \end{example} see table \ref{ttt} and example \ref{ee} \end{document}


3

I'm not sure of what you want to achieve, but this should be it: it's just using the second column (with left alignment) instead of the first for the material that should be at the left margin. Don't forget it's \makebox[0pt][l]{...} or TeX would use centering in the available space, surely not what you want. \documentclass[11pt,a4paper]{article} ...


3

You don't state this explicitly in the posting, but I assume that all equations need to be "numbered" with an asterisk. I further assume you'll need to cross-reference some of these specially marked equations and that the asterisks should show up in the cross-references as well. One way to achieve the cross-referencing objective would be to use the cleveref ...


3

Here are a few options: Code: \documentclass[a4paper,10pt]{article} \usepackage{showframe} \usepackage{amsthm} \usepackage{amsmath, amssymb, amsfonts} \usepackage{dsfont} \begin{document} \begin{equation} \parbox{0.7\linewidth}{ Als X een overaftelbare deelverzameling van $\mathds{R}$ is, dan is er een bijectie van X naar $\mathds{R}$. $\implies$ it ...


3

Like this, for instance? \documentclass[a4paper]{article} \begin{document} \section{Section 1} \subsection{Subsection 1.1} \subsection{Subsection 1.2} \section{Section 2} \renewcommand\thesubsection{\Alph{subsection}} \subsection{Subsection 2.1} \subsection{Subsection 2.2} \subsection{Subsection 2.3} \end{document}


3

\documentclass{report} \usepackage[leqno]{amsmath} \makeatletter \newcommand{\leqnomode}{\tagsleft@true\let\veqno\@@leqno} \newcommand{\reqnomode}{\tagsleft@false\let\veqno\@@eqno} \makeatother \begin{document} \begin{align} f(x) &= ax^2 + bx + c \\ g(x) &= dx^2 + ex + f \end{align} \reqnomode \begin{align} f(x) &= ax^2 + bx + c \\ ...


2

I cannot understand why lines of a cases environment should be separately numbered. However, you get the effect with empheq: \documentclass{article} \usepackage{empheq} \usepackage{showlabels} \begin{document} \begin{empheq}[left=\empheqlbrace]{alignat=2} &a\qquad & b \label{a}\\ &c\qquad & d \label{b} \end{empheq} \end{document}


2

I'm not sure this is good style. Better, I'm sure this is not good style. ;-) \documentclass{amsbook} \usepackage{etoolbox,chngcntr} \makeatletter % at \@startsection, set also the level we're at \pretocmd{\@startsection}{\setcounter{voigtlevel}{#2}}{}{} \makeatother \newcounter{voigtlevel} % keeps track of the current level % all counters should be ...


2

The simplest implementation would combine a custom counter with a \marginpar. You can define a command that sets the counter to the start page, and another that both increments the counter and prints it in the margins in the style of your choice. \documentclass{article} % count source pages \newcounter{spp} % format marginal note ...


2

You want to change the digits in math mode: \documentclass[ a4paper, final, 12pt, numbers=noendperiod, BCOR=5.00mm, bibliography=totoc, listof=totoc, headinclude ]{scrreprt} \usepackage[oldstyle]{libertine} \usepackage[scaled=.83]{beramono} \usepackage[libertine]{newtxmath} \usepackage{hyperref} ...


2

Once the Corrollary environment cor is defined you can reset the number by redefining \thecor. In your case putting \show\thecor after the definition reveals > \thecor=macro: ->\thechapter .\arabic {cor}. l.9 \show\thecor in the log file. So the format you wish for can be obtained by replacing \arabic by \Roman here as follows ...


2

Both environments use the algocf counter; you can teach LaTeX to use another one for procedures. \documentclass{article} \usepackage[procnumbered,ruled]{algorithm2e} \usepackage{etoolbox} \newcounter{procedure} \makeatletter \AtBeginEnvironment{procedure}{\let\c@algocf\c@procedure} \makeatother \begin{document} \begin{procedure}[!htp] \caption{myproc()} ...


2

I suspect that many readers will be quite confused when they encounter a cross-reference to an object numbered "6.1.1" even though no single object in the document is actually numbered "6.1.1". Is it reasonable to assume that your readers will figure out that the object being cross-referenced is an unnumbered subsection? I understand that hyperref will be ...



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