Tag Info

Hot answers tagged

5

Using \llap instead of \marginpar does the trick, without even loading marginnote: \documentclass{article} \usepackage{lipsum} \usepackage{color} \usepackage{multicol} \setlength\parindent{0cm} \setlength\columnsep{30pt} \newcounter{pc} \newcommand{\pn}{\bfseries\thepc} \newenvironment{pns}{% \par \setcounter{pc}{0} ...


4

Note after edits: This answer now demonstrates how to align the paragraph numbers using a numerical test and \hphantom; the next section (first edit) trims the code and demonstrates its application to longer texts; finally it shows a slightly different method to put the notes in the outside margins of a two-column layout, using the memoir class. All ...


4

Assuming that these numbered quote environments are at the top level and not nested in other list environments, you can exploit the fact that, unless your equation numbers are too wide, they will fit in the available white space; in case they are wider for fitting, you should redefine quote in the first place. \documentclass{article} \usepackage{blindtext} ...


3

Although the question was about makeindex, I'll show a solution with xindy and using imakeidx for automatic numerical sorting of the index. One - column index is achieved by columns=-1, the letter group heading can be switched off by dumping \lettergroup to do do nothing after \theindex started. \documentclass{scrartcl} \usepackage{etoolbox}% ...


3

Immediately after creating the theorem, change the way the theorem number is displayed via a \renewcommand: \renewcommand{\thethm}{\thechapter-\arabic{thm}} Here is a complete minimal example: \documentclass{report} \usepackage{amsthm} \newtheoremstyle{theorem} {1em} % Space above {} % Space below {\itshape} % Body font {} % Indent amount % Indent ...


3

The procedure environment is a special form of the algorithm environment. Passing the option procnumbered to algorithm2e numbers procedures using the same counter as algorithms: \documentclass{article} \usepackage[procnumbered,ruled]{algorithm2e} \begin{document} \begin{procedure} \caption{myproc()} This is a procedure \end{procedure} ...


3

Whenever your document has extensive math, you should load amsmath. However, just to answer your question, the simplest way is to use, once in a lifetime, the “forbidden” $$. After all, we know what we're doing in this particular case. \documentclass[leqno]{article} \usepackage{lipsum} \begin{document} \lipsum*[2] \begin{equation} ...


3

A closer look at class option leqno reveals that it loads leqno.clo with just one redefinition: \ProvidesFile{leqno.clo} [1998/08/17 v1.1c Standard LaTeX option (left equation numbers)] \renewcommand\@eqnnum{\hb@xt@.01\p@{}% \rlap{\normalfont\normalcolor \hskip ...


3

For example (Please observe changing of the meaning of HoM. I am assuming that it is your intention): \documentclass{article} \usepackage{amsmath} \DeclareMathOperator{\HoM}{Hom} \begin{document} The first bijection is induced... \begin{equation} \begin{aligned} \pi(X,Y)&\to\HoM(X,Y)\\ [f]&\mapsto[RQf] \end{aligned} \end{equation} if $X$ is ...


3

In my opinion it makes little sense having two numbers for a single mathematical object (the system of equations). Anyway, if you really want this, use empheq (and alignat as the inner environment, because align would spread the parts too much): \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{empheq} \begin{document} ...


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} } ...


2

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}


2

Others have now posted answers, but for the record this what I had in mind. It works with all the standard classes. \documentclass{article} \makeatletter \let\r@eqnnum\@eqnnum \input{leqno.clo} \let\l@eqnnum\@eqnnum \newcommand{\leqnos}{\let\@eqnnum\l@eqnnum} \newcommand{\reqnos}{\let\@eqnnum\r@eqnnum} \reqnos \makeatother \begin{document} ...


2

I'm not sure if this would help readers: two numbers for the same equation could be confusing. If the first appearance of the equation is in some introductory material, I'd leave it unnumbered, explaining that it will reappear as “equation (3)” or whatever. However, here's a way to do as you wish. Try it and think again whether using it. The idea is to ...


2

Replace align* with align and use \nonumber for lines you do not want numbering.


2

I must say that your MWE is not easy to understand. I just ditched all that code you have there for sections and for French and English. Here is a very simple approach for having some paragraphs appear in the TOC and others not: \documentclass{memoir} \setcounter{secnumdepth}{5} \setcounter{tocdepth}5 \newcommand\simpleparagraph[1]{% ...


1

Using makeindex, you may add a sorting key inside your \index macros. Just add as many leading zeros as needed to fill up to the width of the largest number: \documentclass{scrartcl} \usepackage{makeidx} \makeindex \begin{document} Refering to OM A 1.1\index{OM A!01.01@1.1}.\\ Refering to OM A 1.2\index{OM A!01.02@1.2}.\\ Refering to OM A 2.2\index{OM ...


1

The following MWE works for a book. \documentclass{book} \usepackage{lipsum} % to generate filler text \usepackage{tocloft} \setlength\cftsecnumwidth{72pt} % adds space for the word Appendix \renewcommand{\cftsecaftersnum}{.} % if you want a period (or whatever punctuation after the appendix letter \begin{document} \tableofcontents % \mainmatter % ...


1

The cause of this behaviour as described by the OP is the resetting of section counters, thus confusing hyperref. Using hypertexnames=false as an option to hyperref will generate unique page anchor link names. \documentclass[12pt, a4paper, ngerman, oneside, bibtotoc, liststotoc, bibtotocnumbered, toctotoc]{scrartcl} \usepackage{fancyhdr} ...


1

I had to fool hyperref into thinking you were using chapters. \documentclass[12pt, a4paper, ngerman, oneside, bibtotoc, liststotoc, bibtotocnumbered, toctotoc]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{fancyhdr} \newcounter{chapter}% causes hyperref to use chapter numbers \usepackage{hyperref} \pagestyle{fancy} \fancyhf{} ...


1

A small simplification of the code with the overload option of empheq, and a variant if you want to emulate the numcases environment. Also it's pointless to load amsmath as empheq loads mathtools which loads it: \documentclass{article} \usepackage{amssymb} \usepackage[overload]{empheq} \begin{document} \begin{alignat}{2}[left=\empheqlbrace] & u_t = ...


1

\documentclass{book} \usepackage{remreset} \makeatletter \@removefromreset{section}{chapter} \makeatother \renewcommand{\thesection}{\arabic{section}} \begin{document} \tableofcontents \chapter{First} \section{First} \section{Second} \section{Third} \chapter{Second} \section{Fourth} \section{Fifth} \section{Sixth} \end{document}


1

When using Pandoc to get PDF outputs, it goes through Latex. Using the following gets numbered equations by default: \begin{align} x=y \end{align} But you'll have to be willing to give up using the $$ marker for an equation.



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