diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-11 23:50:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-11 23:50:57 +0000 |
commit | 545675cf041960f05256b0e0c05c6ba094c4c17c (patch) | |
tree | c0abf15ccc250227deed025e0b3c0e65f954c381 /Master/texmf-dist/source/latex/arcs | |
parent | d066e15c87ec6f4a0b87d286f9943118bdf59049 (diff) |
trunk/Master/texmf-dist/source/latex/arcs
git-svn-id: svn://tug.org/texlive/trunk@144 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/arcs')
-rw-r--r-- | Master/texmf-dist/source/latex/arcs/arcs.dtx | 148 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/arcs/arcs.ins | 41 |
2 files changed, 189 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/arcs/arcs.dtx b/Master/texmf-dist/source/latex/arcs/arcs.dtx new file mode 100644 index 00000000000..8848d400b34 --- /dev/null +++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/arcs/arcs.ins b/Master/texmf-dist/source/latex/arcs/arcs.ins new file mode 100644 index 00000000000..7074fb53228 --- /dev/null +++ b/Master/texmf-dist/source/latex/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 + + + |