Quantcast
Channel: Active questions tagged mathtools - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 122

Custom equation style with optional tag

$
0
0

In his classic book "Introduction to Geometry" H.S.M. Coxeter uses the following equationnumbering style:

book excerpt

Each equation uses Chapter.Section Equation labelling but in some cases it devolves intoChapter.Section Equation Index labelling as with 1.531 above.

If one is not a TeX hacker it is possible to achieve this by using the following MWE:

\documentclass[leqno]{book}\usepackage{mathtools}\newtagform{coxeter}[\bfseries]{}{}\newtagform{addone}[\bfseries]{}{1}\numberwithin{equation}{section}\renewcommand{\theequation}{\arabic{chapter}.\arabic{section}\arabic{equation}}\usepackage{tikz}\begin{document}\chapter{One}\section{A}\usetagform{coxeter}\begin{equation}x = y+ z\end{equation}\usetagform{addone}\begin{equation}f(x) = x^2+1  \end{equation}\usetagform{coxeter}\section{B}\begin{equation}    \begin{minipage}[t]{.85\textwidth}    If a straight line meets two other straight lines so as to make the two     interior angles on one side of it together less than two right angles, the     other straight lines, if extended indefinitely, will meet on that side on which    the angles are less than two right angles.    \end{minipage}\end{equation}\begin{equation}    \begin{minipage}[t]{.85\textwidth}    A circle may be inscribed with any center and any radius.    \end{minipage}\end{equation}\usetagform{addone}\begin{equation}    \begin{minipage}[t]{.85\textwidth}    All right angles are equal to one another.    \end{minipage}\end{equation}\end{document}

which produces

example

I am certain that this is a very primitive solution and there is a way to customize the equation environment with optional tags added at the end of the equation number. Any suggestions on how to go about this?


Viewing all articles
Browse latest Browse all 122

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>