diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/arcs |
Initial commit
Diffstat (limited to 'macros/latex/contrib/arcs')
-rw-r--r-- | macros/latex/contrib/arcs/README | 16 | ||||
-rw-r--r-- | macros/latex/contrib/arcs/arcs.dtx | 148 | ||||
-rw-r--r-- | macros/latex/contrib/arcs/arcs.ins | 41 | ||||
-rw-r--r-- | macros/latex/contrib/arcs/arcs.pdf | bin | 0 -> 79529 bytes | |||
-rw-r--r-- | macros/latex/contrib/arcs/arcstest.tex | 70 |
5 files changed, 275 insertions, 0 deletions
diff --git a/macros/latex/contrib/arcs/README b/macros/latex/contrib/arcs/README new file mode 100644 index 0000000000..424dbbe4c0 --- /dev/null +++ b/macros/latex/contrib/arcs/README @@ -0,0 +1,16 @@ +This tiny package provides two commands for placing an arc +over/under a short piece of text. + +The code comes from my package `metre'. I have repackaged it +to make it more easily available and to allow the commands +to be used within math formulas. + +To install the package: + latex arcs.ins + latex arcs.dtx + +The file arcstest.tex contains some examples of usage. + +-- + Gianfranco Boggio-Togna + gbt@acm.org diff --git a/macros/latex/contrib/arcs/arcs.dtx b/macros/latex/contrib/arcs/arcs.dtx new file mode 100644 index 0000000000..8848d400b3 --- /dev/null +++ b/macros/latex/contrib/arcs/arcs.dtx @@ -0,0 +1,148 @@ +% \iffalse meta-comment +% +% arcs.dtx +% Copyright 2004 Gianfranco Boggio-Togna +% +% This program may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version~1.2 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% +% This program consists of the files arcs.dtx and arcs.ins +% +%<*driver> +\documentclass[11pt]{ltxdoc} +\setlength{\parindent}{0pt} +\setlength{\parskip}{1ex} +\MakeShortVerb{|} +% To get the documented source of the package, comment out +% the next line and uncomment the following one. +\OnlyDescription +%\AlsoImplementation +\begin{document} + \DocInput{arcs.dtx} +\end{document} +%</driver> +% +% \fi +% +% \CheckSum{188} +% \makeatletter +% \let\ps@titlepage=\ps@empty +% \makeatother +% +% \title{{\LARGE\tt arcs.sty}\\ +% Placing an arc over (under) some text\\ +% {\small Version 1\ \ (2004/05/09)}\\\ \\} +% \author{Gianfranco Boggio\,--Togna\\ +% \textsl{gbt\kern .08em @\kern .1em acm.org}} +% \date{} +% \maketitle +% \vspace{6ex} +% The package provides two commands for placing an arc over or under +% a short (up to three letters) piece of text. The commands generate an +% |\hbox| and can be used in math formulas +% (see \textit{The \TeX{}book}, p.\,151). +% +% |\overarc| puts an arc above the text given as argument.\\ +% |\underarc| puts the arc below the text. +% +% The size of the arc is chosen so that it embraces all the text. In +% some cases, you may wish to use a smaller or larger size. An +% optional argument can specify a factor which +% is multiplied by the width of the text: the size of the symbol is then +% chosen as if the text had that width. Keep in mind, however, that only +% a limited range of sizes is available in the Computer Modern fonts. +% \vfill +% {\footnotesize +% \noindent \copyright\ Copyright 2004 Gianfranco Boggio\,--Togna.\par +% This program may be distributed and/or modified under the +% conditions of the \LaTeX{} Project Public License, either version~1.2 +% of this license or (at your option) any later version. +% The latest version of this license is in +% \texttt{http://www.latex-project.org/lppl.txt} +% and version 1.2 or later is part of all distributions of \LaTeX{} +% version 1999/12/01 or later.\par +% This program consists of the files \texttt{arcs.dtx} and +% \texttt{arcs.ins} +% } +% \newpage +% \StopEventually{} +% \section*{The code} +% \begin{macrocode} +\NeedsTeXFormat {LaTeX2e}[2003/12/01] +\ProvidesPackage {arcs}[2004/05/09] +\RequirePackage {relsize} +\newcommand{\overarc}[2][1]{\over@under@arc{#1}{#2}\z@} +\newcommand{\underarc}[2][1]{\over@under@arc{#1}{#2}\@ne} +\newcommand{\over@under@arc}[3]{% + \leavevmode + \hbox {% + \setbox\z@ = \hbox {#2}% + \ifdim \ht\z@ = \z@ % arc over/under space + \ifdim \dp\z@ = \z@ + \ht\z@ = 1ex\relax + \fi + \fi + \dimen@ = #1\wd\z@ + \begingroup + \let \rs@size@warning = \@gobbletwo + \relsize{-10}% + \wd\@ne = \z@ + \@whiledim \wd\@ne < .95\dimen@ \do {% + \ifx \@currsize \Huge + \dimen@ = \z@ + \else + $% + \skip@ = \f@baselineskip + \fontencoding{OML}\fontfamily{cmm}\fontseries{m}% + \fontshape{it}\fontsize{\ssf@size}{\skip@}\selectfont + \global \setbox\@ne = \hbox {% + \hss\symbol{"5\ifnum #3=\z@ F\else E\fi}\hss}% + \ifdim \wd\@ne < \dimen@ + \fontsize{\sf@size}{\skip@}\selectfont + \global \setbox\@ne = \hbox {% + \hss\symbol{"5\ifnum #3=\z@ F\else E\fi}\hss}% + \ifdim \wd\@ne < \dimen@ + \fontsize{\tf@size}{\skip@}\selectfont + \global \setbox\@ne = \hbox {% + \hss\symbol{"5\ifnum #3=\z@ F\else E\fi}\hss}% + \fi + \fi + $% + \fi + \ifdim \wd\@ne < \dimen@ + \relsize{+1}% + \fi + \global \dimen@i = \fontdimen5\the\font + }% + \endgroup + \ifnum #3 = \z@ + \dimen@ii = 1.067\ht\z@ + \global \divide \dimen@i by \tw@ + \global \advance \dimen@i by -\ht\@ne + \advance \dimen@ii by .6\dimen@i + \else + \dimen@ii = -1.05\ht\@ne + \advance \dimen@ii by -.75pt + \ifdim \dp\z@ > \z@ + \advance \dimen@ii by -\dp\z@ + \fi + \fi + \copy\z@ + \dimen@ = \wd\z@ + \advance \dimen@ by \wd\@ne + \kern -.5\dimen@ + \raisebox {\dimen@ii}[\z@][\z@]{\copy\@ne}% + \dimen@ = \wd\z@ + \advance \dimen@ by -\wd\@ne + \dimen@ = .5\dimen@ + \kern \dimen@ + }% +} +% \end{macrocode} +%% \Finale +\endinput diff --git a/macros/latex/contrib/arcs/arcs.ins b/macros/latex/contrib/arcs/arcs.ins new file mode 100644 index 0000000000..7074fb5322 --- /dev/null +++ b/macros/latex/contrib/arcs/arcs.ins @@ -0,0 +1,41 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +\input docstrip +\preamble + +This is a generated file. + +Copyright 2004 Gianfranco Boggio-Togna + +This file may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.2 of this license or (at your option) any +later version. The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.2 or later is part of all distributions +of LaTeX version 1999/12/01 or later. + +\endpreamble +\keepsilent +\Msg{*** Generating the arcs package ***} +\generateFile{arcs.sty}{t}{\from{arcs.dtx}{package}} +\Msg{==============================================} +\Msg{} +\Msg{ To finish the installation move the file} +\Msg{ arcs.sty into a directory searched by TeX.} +\Msg{} +\Msg{ The package requires `relsize.sty'} +\Msg{ (from /macros/latex/contrib/misc).} +\Msg{} +\Msg{ To typeset the user guide run the file} +\Msg{ `arcs.dtx' through LaTeX.} +\Msg{} +\Msg{} +\Msg{==============================================} +\endbatchfile + + + diff --git a/macros/latex/contrib/arcs/arcs.pdf b/macros/latex/contrib/arcs/arcs.pdf Binary files differnew file mode 100644 index 0000000000..c391a4b893 --- /dev/null +++ b/macros/latex/contrib/arcs/arcs.pdf diff --git a/macros/latex/contrib/arcs/arcstest.tex b/macros/latex/contrib/arcs/arcstest.tex new file mode 100644 index 0000000000..71ded13e4a --- /dev/null +++ b/macros/latex/contrib/arcs/arcstest.tex @@ -0,0 +1,70 @@ +\documentclass[11pt]{report} +\usepackage{arcs} +\parindent 0pt +\pagestyle{empty} +\begin{document} +$\overarc[.1]{AB}\ \overarc[.2]{AB}\ \overarc[.3]{AB}\ + \overarc[.4]{AB}\ \overarc[.5]{AB}\ \overarc[.6]{AB}\ + \overarc[.7]{AB}\ \overarc[.8]{AB}\ \overarc[.9]{AB}\ + \overarc{AB}$\par +\vspace{2ex} +$\overarc[.1]{ABC}\ \overarc[.2]{ABC}\ \overarc[.3]{ABC}\ + \overarc[.4]{ABC}\ \overarc[.5]{ABC}\ \overarc[.6]{ABC}\ + \overarc[.7]{ABC}\ \overarc[.8]{ABC}\ \overarc[.9]{ABC}\ + \overarc{ABC}$\par +\vspace{2ex} +\overarc[.1]{ABC}\ \overarc[.2]{ABC}\ \overarc[.3]{ABC}\ + \overarc[.4]{ABC}\ \overarc[.5]{ABC}\ \overarc[.6]{ABC}\ + \overarc[.7]{ABC}\ \overarc[.8]{ABC}\ \overarc[.9]{ABC}\ + \overarc{ABC}\par +\vspace{4ex} +$\underarc[.1]{AB}\ \underarc[.2]{AB}\ \underarc[.3]{AB}\ + \underarc[.4]{AB}\ \underarc[.5]{AB}\ \underarc[.6]{AB}\ + \underarc[.7]{AB}\ \underarc[.8]{AB}\ \underarc[.9]{AB}\ + \underarc{AB}$\par +\vspace{2ex} +$\underarc[.1]{ABC}\ \underarc[.2]{ABC}\ \underarc[.3]{ABC}\ + \underarc[.4]{ABC}\ \underarc[.5]{ABC}\ \underarc[.6]{ABC}\ + \underarc[.7]{ABC}\ \underarc[.8]{ABC}\ \underarc[.9]{ABC}\ + \underarc{ABC}$\par +\vspace{2ex} +\underarc[.1]{ABC}\ \underarc[.2]{ABC}\ \underarc[.3]{ABC}\ +\underarc[.4]{ABC}\ \underarc[.5]{ABC}\ \underarc[.6]{ABC}\ +\underarc[.7]{ABC}\ \underarc[.8]{ABC}\ \underarc[.9]{ABC}\ +\underarc{ABC}\par +\vspace{4ex} +$\overarc[.1]{ab}\ \overarc[.2]{ab}\ \overarc[.3]{ab}\ + \overarc[.4]{ab}\ \overarc[.5]{ab}\ \overarc[.6]{ab}\ + \overarc[.7]{ab}\ \overarc[.8]{ab}\ \overarc[.9]{ab}\ + \overarc{ab}$\par +\vspace{2ex} +$\overarc[.1]{abc}\ \overarc[.2]{abc}\ \overarc[.3]{abc}\ + \overarc[.4]{abc}\ \overarc[.5]{abc}\ \overarc[.6]{abc}\ + \overarc[.7]{abc}\ \overarc[.8]{abc}\ \overarc[.9]{abc}\ + \overarc{abc}$\par +\vspace{2ex} +\overarc[.1]{abc}\ \overarc[.2]{abc}\ \overarc[.3]{abc}\ +\overarc[.4]{abc}\ \overarc[.5]{abc}\ \overarc[.6]{abc}\ +\overarc[.7]{abc}\ \overarc[.8]{abc}\ \overarc[.9]{abc}\ +\overarc{abc}\par +\vspace{4ex} +$\underarc[.1]{ag}\ \underarc[.2]{ag}\ \underarc[.3]{ag}\ + \underarc[.4]{ag}\ \underarc[.5]{ag}\ \underarc[.6]{ag}\ + \underarc[.7]{ag}\ \underarc[.8]{ag}\ \underarc[.9]{ag}\ + \underarc{ag}$\par +\vspace{2ex} +$\underarc[.1]{abg}\ \underarc[.2]{abg}\ \underarc[.3]{abg}\ + \underarc[.4]{abg}\ \underarc[.5]{abg}\ \underarc[.6]{abg}\ + \underarc[.7]{abg}\ \underarc[.8]{abg}\ \underarc[.9]{abg}\ + \underarc{abg}$\par +\vspace{2ex} +\underarc[.1]{abg}\ \underarc[.2]{abg}\ \underarc[.3]{abg}\ +\underarc[.4]{abg}\ \underarc[.5]{abg}\ \underarc[.6]{abg}\ +\underarc[.7]{abg}\ \underarc[.8]{abg}\ \underarc[.9]{abg}\ +\underarc{abg}\par +\vspace{4ex} +\overarc{a e}\ \underarc{a e}\ \overarc{$x+y$}\ +\underarc{$x+y$}\ +$a_{\underarc[.6]{\tiny xy}}$\ +$a^{\overarc[.6]{\tiny xy}}$ +\end{document} |