summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/eqnnumwarn/eqnnumwarn.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/eqnnumwarn/eqnnumwarn.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/eqnnumwarn/eqnnumwarn.tex')
-rw-r--r--macros/latex/contrib/eqnnumwarn/eqnnumwarn.tex117
1 files changed, 117 insertions, 0 deletions
diff --git a/macros/latex/contrib/eqnnumwarn/eqnnumwarn.tex b/macros/latex/contrib/eqnnumwarn/eqnnumwarn.tex
new file mode 100644
index 0000000000..10795004cf
--- /dev/null
+++ b/macros/latex/contrib/eqnnumwarn/eqnnumwarn.tex
@@ -0,0 +1,117 @@
+\documentclass{ltxdockit}
+
+\usepackage[utf8]{luainputenc}
+\usepackage[american]{babel}
+\usepackage[tracking=true]{microtype}
+\usepackage{eqnnumwarn}
+\usepackage{shortvrb}
+\MakeShortVerb{\|}
+
+\newcommand{\blni}{\vspace*{\baselineskip}\noindent}
+
+\newcommand*{\version}{1.0}
+\renewcommand*{\date}{2017/10/09}
+
+\titlepage{%
+ title={The \sty{eqnnumwarn} Package},
+ subtitle={},
+ author={Jonathan Gleason},
+ email={jgleason@math.berkeley.edu},
+ revision={v\version},
+ date={\date}}
+
+\hypersetup{%
+ pdftitle={The eqnnumwarn Package},
+ pdfauthor={Jonathan Gleason},
+ pdfkeywords={tex, latex, class, package}}
+
+\begin{document}
+
+\printtitlepage
+
+\section{About}
+
+Sometimes an equation is too long that an equation number will be typeset below the equation itself, but yet not long enough to yield an ``overfull |\hbox|'' warning. The \sty{eqnnumwarn} package modifies the standard |amsmath| numbered equation environments to throw a warning whenever this occurs.
+
+\section{Usage}
+
+The package may be used simply by placing |\usepackage{eqnnumwarm}| somewhere in the preamble.
+
+\subsection{User Commands}
+
+The package includes two commands, \cmd{intomargin} and \cmd{noeqnnumwarn}, to modify the default behavior.
+
+\begin{ltxsyntax}
+
+\item[\cmd{intomargin}\hspace{1em}] When the equation is just slightly too large, it can be acceptable to move the equation into the margin just as much as needed to prevent the displacement of the equation number. To do this, place the command \cmd{intomargin} immediately before the equation environment. This currently only works with the |equation| environment.
+
+\item[\cmd{noeqnnumwarn}\hspace{1em}] If for whatever reason you wish to prevent a particular equation from generating a warning, place \cmd{noeqnnumwarn} immediately before the equation environment.
+
+\end{ltxsyntax}
+
+\section{Demonstration}
+
+The following equation doesn't displace the equation number, and so of course doesn't throw a warning.
+\newlength{\rulelength}
+\setlength{\rulelength}{165pt}
+\begin{equation}
+ \raisebox{.5ex}{\rule{\rulelength}{.5pt}}\, \text{No Warning}\, \raisebox{.5ex}{\rule{\rulelength}{.5pt}}
+\end{equation}
+
+\blni
+On the other hand, the following equation does displace the equation number, and so does throw a warning.
+\setlength{\rulelength}{177pt}
+\makeatletter
+\begin{equation}\label{eqn2}
+\raisebox{.5ex}{\rule{\rulelength}{.5pt}}\, \text{Warning}\, \raisebox{.5ex}{\rule{\rulelength}{.5pt}}
+\end{equation}
+
+\blni
+The following equation is identical to the previous except that it was immediately preceded by \cmd{intomargin}, which results in no displaced equation number (and hence no warning).
+\setlength{\rulelength}{177pt}
+\intomargin
+\begin{equation}
+\raisebox{.5ex}{\rule{\rulelength}{.5pt}}\, \text{Warning}\, \raisebox{.5ex}{\rule{\rulelength}{.5pt}}
+\end{equation}
+
+\blni
+The following is again identical to \eqref{eqn2}, except that it was preceded by \cmd{noeqnnumwarn}: the equation number is displaced, but yet no warning is thrown.
+\setlength{\rulelength}{177pt}
+\makeatletter
+\begin{equation}
+\raisebox{.5ex}{\rule{\rulelength}{.5pt}}\, \text{Warning}\, \raisebox{.5ex}{\rule{\rulelength}{.5pt}}
+\end{equation}
+
+\section{Miscellaneous}
+
+\subsection{Acknowledgments}
+
+The development of this package actually started with a question of mine on tex.stackexchange (\url{https://tex.stackexchange.com/questions/384222/}). I have incorporated some code by David Carlisle from his answer there.
+
+I also made use of code taken from another question on tex.stackexchange (\url{https://tex.stackexchange.com/questions/191140/}), which determines the stretchability/shrinkability of a given |\hbox|.
+
+This documentation was created using a template and class due to Philipp Lehman.
+
+\subsection{Reporting issues}
+
+The current version should still very much be considered in ``beta'', and as such I expect there are bugs to be found. If do find any problems, or otherwise have any comments, suggestions, etc., please e-mail me at \href{mailto:jgleason@math.berkeley.edu}{\texttt{jgleason@math.berkeley.edu}}.
+
+\subsection{Revision History}
+
+\begin{changelog}
+
+\begin{release}{\version}{\date}
+
+\item Initial public release
+
+\end{release}
+
+\end{changelog}
+
+\subsection{Licensing}
+
+Copyright \textcopyright\ 2017 by Jonathan Gleason <\href{mailto:jgleason@math.berkeley.edu}{\texttt{jgleason@math.berkeley.edu}}>
+
+This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is in \url{http://www.latex-project.org/lppl.txt} and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later.
+
+\end{document} \ No newline at end of file