%%
%% Documentation for arcs2 (user manual).
%% Copyright 2026 John Souther
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%%
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{arcs2}

\title{The \textsf{arcs2} package}
\author{John Souther}
\date{2026-08-24\qquad version 1.0.3}

\begin{document}
\maketitle

\begin{abstract}
\textsf{arcs2} places a shallow circular-looking arc over or under a
short piece of text or mathematics. It is an independent original
implementation. It is not a derivative of the historical CTAN
package \textsf{arcs} and does not ship or modify \texttt{arcs.sty}.
The command names requested for this package are provided so that
existing notes that mention \verb|\overarc| and \verb|\underarc| remain
easy to follow.
\end{abstract}

\tableofcontents
\vspace{1em}

\section{Licence}

This work is distributed under the \LaTeX\ Project Public License,
version 1.3c or any later version (LPPL~1.3c+). The latest text of the
licence is at \texttt{https://www.latex-project.org/lppl.txt}.

The Current Maintainer is John Souther.

\section{Installation}

Place \texttt{arcs2.sty} on the \LaTeX\ search path, for example in the
same directory as your document, or in
\texttt{texmf-local/tex/latex/arcs2/} followed by a filename-database
refresh (\texttt{mktexlsr} or the equivalent in your \TeX\ distribution).

Then load the package in the preamble:
\begin{verbatim}
\usepackage{arcs2}
\end{verbatim}
No package options are defined. The implementation uses only the
\LaTeX\ kernel (the \texttt{picture} environment and \verb|\qbezier|).

\section{User commands}

All four commands take the same arguments and may be used in text mode
or in math mode. They produce an \verb|\hbox|, so they also work as
ordinary atoms in a formula.

\begin{center}
\begin{tabular}{ll}
\texttt{\string\overarc}\texttt{[}$n$\texttt{]}\texttt{\{}arg\texttt{\}} &
  arc above \textit{arg}\\
\texttt{\string\underarc}\texttt{[}$n$\texttt{]}\texttt{\{}arg\texttt{\}} &
  arc below \textit{arg}\\
\texttt{\string\wideoverarc}\texttt{[}$n$\texttt{]}\texttt{\{}arg\texttt{\}} &
  same as \verb|\overarc|, span $1.5\times$\\
\texttt{\string\wideunderarc}\texttt{[}$n$\texttt{]}\texttt{\{}arg\texttt{\}} &
  same as \verb|\underarc|, span $1.5\times$\\
\end{tabular}
\end{center}

The optional argument $n$ is a positive integer, the intended
\textit{number of letters} the arc should cover. If $n$ is omitted,
the package uses $n=2$. The span is $n$ times the width of the letter
\texttt{x} in the current font, centred on \textit{arg}. It does
\emph{not} scale to the full width of \textit{arg}.

More generally the standard span is
\[
  \mathrm{span} = \frac{n}{2}\times \mathrm{width}(\textit{arg}).
\]
The wide commands multiply that span by $1.5$. The rise of the stroke
is about $4\,\mathrm{pt}$ in every case.

If you need a bolder letter, wrap the argument (or the whole command)
in \verb|\textbf| or \verb|\mathbf|. The stroke is drawn slightly
thicker when the current text series is bold or when the current math
version is bold.

Color comes from the standard \texttt{color} package, which
\textsf{arcs2} loads for you. Wrap the command (or a block) in
\verb|\textcolor| or \verb|\color|; both the letters and the stroke
follow the current color. You do not need to load \texttt{xcolor}
yourself, though it is compatible if you already use it.

\section{Examples}

\subsection{Default optional argument (two letters)}

Text: \overarc{AB} and \underarc{CD}.

Math: $\overarc{AB}+\underarc{CD}=0$.

\subsection{Optional argument on}

Three-letter span: \overarc[3]{ABC} and \underarc[3]{xyz}.

One-letter span (tighter): \overarc[1]{AB}.

Four-letter span (looser): \overarc[4]{AB}.

\subsection{Wide variants}

Standard versus wide, same two-letter default:

\overarc{AB} \quad \wideoverarc{AB}

\underarc{PQ} \quad \wideunderarc{PQ}

And in math: $\wideoverarc{XY}\ne\overarc{XY}$.

Wide with an explicit letter count:
\wideoverarc[3]{ABC}, \wideunderarc[4]{WXYZ}.

\subsection{Text and math together}

In running text an arc may mark a segment such as \overarc{mn} or
sit under a gloss \underarc{ie}. The same commands in a display
\[
  \overarc{AC} \parallel \underarc{BD},
  \qquad
  \wideoverarc{ABC}\supset\overarc{AB}.
\]

\subsection{Color}

Red letters and a red stroke:
\textcolor{red}{\overarc[4]{ABCD}}
\quad
\textbf{\textcolor{red}{\overarc[4]{ABCD}}}.

Blue under-arc: \textcolor{blue}{\underarc[3]{xyz}}.

Math: $\textcolor{red}{\overarc{AB}}$.

\subsection{Bold}

Text bold: \textbf{\overarc{AB} \underarc{CD}
\wideoverarc{EF} \wideunderarc{GH}}.

Argument bold only: \overarc{\textbf{AB}}.

Math bold letters: $\overarc{\mathbf{AB}}+\wideunderarc{\mathbf{xy}}$.

Bold math version:
\mathversion{bold}%
$\overarc{UV}\quad\underarc{WZ}$%
\mathversion{normal}.

\section{Notes and limitations}

\begin{itemize}
\item The stroke is a quadratic B\'ezier that peaks $4\,\mathrm{pt}$
  from the chord. It is not a Computer Modern math accent and does
  not load extra fonts.
\item Very long arguments remain one box; pass a larger $n$ if you
  want a wider bow, or use a wide command.
\item Nested use inside another box is supported; page breaks cannot
  occur inside an arc command.
\item This package does not change or require the CTAN package
  \textsf{arcs}. If both are loaded, whichever is loaded last wins
  for \verb|\overarc| and \verb|\underarc|.
\end{itemize}

\section{Version}

1.0.3 (2026-08-24). Color: the package loads \texttt{color} so
\verb|\textcolor| works, and the stroke follows the current color.
1.0.2 (2026-08-23) was the first public release.

\end{document}
