From c9cc2a8459327fcce4b4c5e2e120db41a917d1f4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 15 Aug 2008 00:13:39 +0000 Subject: new pictex package autoarea git-svn-id: svn://tug.org/texlive/trunk@10353 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/autoarea/ANNOUNCE.txt | 24 +++ Master/texmf-dist/doc/latex/autoarea/README.aa | 14 ++ .../doc/latex/autoarea/autodemo/README.autodemo | 26 +++ .../doc/latex/autoarea/autodemo/autodemo+.log | 82 ++++++++ .../doc/latex/autoarea/autodemo/autodemo+.pdf | Bin 0 -> 24873 bytes .../doc/latex/autoarea/autodemo/autodemo+.tex | 4 + .../doc/latex/autoarea/autodemo/autodemo-.log | 80 ++++++++ .../doc/latex/autoarea/autodemo/autodemo-.pdf | Bin 0 -> 25493 bytes .../doc/latex/autoarea/autodemo/autodemo-.tex | 5 + .../doc/latex/autoarea/autodemo/autodemo.tex | 17 ++ Master/texmf-dist/tex/latex/autoarea/autoarea.sty | 220 +++++++++++++++++++++ 11 files changed, 472 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/autoarea/ANNOUNCE.txt create mode 100644 Master/texmf-dist/doc/latex/autoarea/README.aa create mode 100644 Master/texmf-dist/doc/latex/autoarea/autodemo/README.autodemo create mode 100644 Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.log create mode 100644 Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.pdf create mode 100644 Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.tex create mode 100644 Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.log create mode 100644 Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.pdf create mode 100644 Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.tex create mode 100644 Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo.tex create mode 100644 Master/texmf-dist/tex/latex/autoarea/autoarea.sty (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/autoarea/ANNOUNCE.txt b/Master/texmf-dist/doc/latex/autoarea/ANNOUNCE.txt new file mode 100644 index 00000000000..fa1d7034b5c --- /dev/null +++ b/Master/texmf-dist/doc/latex/autoarea/ANNOUNCE.txt @@ -0,0 +1,24 @@ +SUMMARY: automatic bounding boxes with PiCTeX + +PiCTeX is a "generic" set of TeX macros for drawing diagrams and +pictures, dating from 1987, written and described by Michael J. Wichura. +The last extensions contributed by other authors may have occurred +1999. It may be difficult to find somebody who uses it today ... +yet two users asked me for help this year ... + +A new generic package `autoarea.sty' makes PiCTeX recognize lines +and arcs in determining the "bounding box" of a picture +(PiCTeX so far accounted for put commands only). +The "bounding box" is essential for proper placement of a picture +between running text and margins and for keeping the running text away. +Examples provided demonstrate what `autoarea.sty' does. + +Yes, it should suffice to load the package to have this effect. +Read additional instructions and informations in the file +`autoarea.sty'. + +`autoarea.sty' has been tested successfully on 42 geometric figures +from a work by medieval scholar N. Oresme, as reproduced by Dr. +Richard Lorch using PiCTeX. + + diff --git a/Master/texmf-dist/doc/latex/autoarea/README.aa b/Master/texmf-dist/doc/latex/autoarea/README.aa new file mode 100644 index 00000000000..5ab324fe2fa --- /dev/null +++ b/Master/texmf-dist/doc/latex/autoarea/README.aa @@ -0,0 +1,14 @@ + File README.aa for + [tex-archive]/graphics/pictex/addon/autoarea/ + + +AUTOAREA.STY + makes PiCTeX's bounding boxes account for lines and arcs. + License is LPPL. Read the file for additional informations. + +AUTODEMO + this subdirectory demonstrates the effect of autoarea.sty . + + +________________________________________________________________________ +This file version 2008/04/25 Uwe Lueck, http://contact-ednotes.sty.de.vu diff --git a/Master/texmf-dist/doc/latex/autoarea/autodemo/README.autodemo b/Master/texmf-dist/doc/latex/autoarea/autodemo/README.autodemo new file mode 100644 index 00000000000..39b8f0abdaa --- /dev/null +++ b/Master/texmf-dist/doc/latex/autoarea/autodemo/README.autodemo @@ -0,0 +1,26 @@ + File README.autodemo for + [tex-archive]/graphics/pictex/addon/autoarea/autodemo/ + + +AUTODEMO.TEX + + contains a sample of code for a PiCTeX picture placed in the + middle running text on one page. + +AUTODEMO-.TEX + + runs AUTODEMO.TEX without loading AUTOAREA.STY. The outcome is + + AUTODEMO-.PDF + +AUTODEMO+.TEX + + runs AUTODEMO.TEX after loading AUTOAREA.STY. The outcome is + + AUTODEMO+.PDF + +Print both pages and watch them side by side. + + +________________________________________________________________________ +This file version 2008/04/25 Uwe Lueck, http://contact-ednotes.sty.de.vu diff --git a/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.log b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.log new file mode 100644 index 00000000000..4943212fba6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.log @@ -0,0 +1,82 @@ +This is pdfTeX, Version 3.141592-1.40.4 (MiKTeX 2.7) (preloaded format=pdflatex 2008.2.19) 7 MAY 2008 22:29 +entering extended mode +**autodemo+.tex +(autodemo+.tex +LaTeX2e <2005/12/01> +Babel and hyphenation patterns for english, dumylang, nohyphenation, ge +rman, ngerman, french, loaded. +File: autodemo+.tex 2008/04/19 autoarea.sty's effect +(autodemo.tex +File: autodemo.tex 2008/04/19 common sample for autoarea.sty + ("C:\Programme\MiKTeX 2.7\tex\latex\base\article.cls" +Document Class: article 2005/09/16 v1.4f Standard LaTeX document class +("C:\Programme\MiKTeX 2.7\tex\latex\base\size12.clo" +File: size12.clo 2005/09/16 v1.4f Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +("C:\Programme\MiKTeX 2.7\tex\generic\pictex\pictex.sty" +("C:\Programme\MiKTeX 2.7\tex\generic\pictex\prepictex.tex") +("C:\Programme\MiKTeX 2.7\tex\generic\pictex\pictex.tex") +("C:\Programme\MiKTeX 2.7\tex\generic\pictex\postpictex.tex") +("C:\Programme\MiKTeX 2.7\tex\generic\pictex\picmore.tex")) +("C:\Programme\MiKTeX 2.7\tex\latex\lipsum\lipsum.sty" +Package: lipsum 2005/01/26 v1.0 150 paragraphs of Lorem Ipsum dummy text +File: lipsum.dtx 2005/01/26 v1.0 150 paragraphs of Lorem Ipsum dummy text +\c@lips@count=\count103 +) (autoarea.sty +Package: autoarea 2008/05/07 automatic accounting for PiCTeX lines and arcs +) +No auxiliary output files. + +No file autodemo+.aux. +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 10. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 10. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 10. +[1 + +{C:/Dokumente und Einstellungen/akuehne/Lokale Einstellungen/Anwendungsdaten/Mi +KTeX/2.7/pdftex/config/pdftex.map}] ) ) +Here is how much of TeX's memory you used: + 1061 strings out of 95340 + 10992 string characters out of 1184281 + 171027 words of memory out of 1500000 + 4300 multiletter control sequences out of 110000 + 7336 words of font info for 26 fonts, out of 1200000 for 2000 + 14 hyphenation exceptions out of 8191 + 23i,4n,21p,256b,229s stack positions out of 5000i,500n,10000p,200000b,5000s + + +Output written on autodemo+.pdf (1 page, 24873 bytes). +PDF statistics: + 22 PDF objects out of 1000 (max. 8388607) + 0 named destinations out of 1000 (max. 131072) + 1 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.pdf b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.pdf new file mode 100644 index 00000000000..4ceb8ed8c8f Binary files /dev/null and b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.pdf differ diff --git a/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.tex b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.tex new file mode 100644 index 00000000000..e59401a4801 --- /dev/null +++ b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo+.tex @@ -0,0 +1,4 @@ +\ProvidesFile{autodemo+.tex}[2008/04/19 autoarea.sty's effect] +\newcommand{\autouse}{\usepackage{autoarea}} +\newcommand{\autofoot}{loaded autoarea.sty -- circle centered} +\input autodemo \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.log b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.log new file mode 100644 index 00000000000..454cccbfffc --- /dev/null +++ b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.log @@ -0,0 +1,80 @@ +This is pdfTeX, Version 3.141592-1.40.4 (MiKTeX 2.7) (preloaded format=pdflatex 2008.2.19) 7 MAY 2008 22:28 +entering extended mode +**autodemo-.tex +(autodemo-.tex +LaTeX2e <2005/12/01> +Babel and hyphenation patterns for english, dumylang, nohyphenation, ge +rman, ngerman, french, loaded. +File: autodemo-.tex 2008/04/19 what's missing without autoarea.sty +(autodemo.tex +File: autodemo.tex 2008/04/19 common sample for autoarea.sty + ("C:\Programme\MiKTeX 2.7\tex\latex\base\article.cls" +Document Class: article 2005/09/16 v1.4f Standard LaTeX document class +("C:\Programme\MiKTeX 2.7\tex\latex\base\size12.clo" +File: size12.clo 2005/09/16 v1.4f Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +("C:\Programme\MiKTeX 2.7\tex\generic\pictex\pictex.sty" +("C:\Programme\MiKTeX 2.7\tex\generic\pictex\prepictex.tex") +("C:\Programme\MiKTeX 2.7\tex\generic\pictex\pictex.tex") +("C:\Programme\MiKTeX 2.7\tex\generic\pictex\postpictex.tex") +("C:\Programme\MiKTeX 2.7\tex\generic\pictex\picmore.tex")) +("C:\Programme\MiKTeX 2.7\tex\latex\lipsum\lipsum.sty" +Package: lipsum 2005/01/26 v1.0 150 paragraphs of Lorem Ipsum dummy text +File: lipsum.dtx 2005/01/26 v1.0 150 paragraphs of Lorem Ipsum dummy text +\c@lips@count=\count103 +) +No auxiliary output files. + +No file autodemo-.aux. +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 10. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 10. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 10. +[1 + +{C:/Dokumente und Einstellungen/akuehne/Lokale Einstellungen/Anwendungsdaten/Mi +KTeX/2.7/pdftex/config/pdftex.map}] ) ) +Here is how much of TeX's memory you used: + 1046 strings out of 95340 + 10812 string characters out of 1184281 + 171053 words of memory out of 1500000 + 4288 multiletter control sequences out of 110000 + 7336 words of font info for 26 fonts, out of 1200000 for 2000 + 14 hyphenation exceptions out of 8191 + 23i,4n,19p,256b,207s stack positions out of 5000i,500n,10000p,200000b,5000s + + +Output written on autodemo-.pdf (1 page, 25493 bytes). +PDF statistics: + 22 PDF objects out of 1000 (max. 8388607) + 0 named destinations out of 1000 (max. 131072) + 1 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.pdf b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.pdf new file mode 100644 index 00000000000..03887de4551 Binary files /dev/null and b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.pdf differ diff --git a/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.tex b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.tex new file mode 100644 index 00000000000..3512c1d65a4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo-.tex @@ -0,0 +1,5 @@ +\ProvidesFile{autodemo-.tex}[2008/04/19 what's missing without autoarea.sty] +\newcommand{\autouse}{\relax} +\newcommand{\autofoot}{didn't load autoarea.sty -- + {\bf \textit{X}} centered, circle ignored} +\input autodemo \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo.tex b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo.tex new file mode 100644 index 00000000000..e033f3ff529 --- /dev/null +++ b/Master/texmf-dist/doc/latex/autoarea/autodemo/autodemo.tex @@ -0,0 +1,17 @@ +\ProvidesFile{autodemo.tex}[2008/04/19 common sample for autoarea.sty] +\documentclass[12pt]{article} +\usepackage{pictex,lipsum} +\autouse +\pagestyle{plain} +\renewcommand{\thepage}{\bfseries \sffamily \autofoot} +\nofiles +\begin{document} +\lipsum[1] +\[\beginpicture +\setcoordinatesystem units <1mm,1mm> point at 0 0 +% \setplotarea x from -35 to 35, y from -35 to 35 %% compare to autoarea.sty +\circulararc 360 degrees from 0 35 center at 0 0 +\put {\textbf{\itshape X}} at -20 20 +\endpicture\] +\lipsum[2] +\end{document} diff --git a/Master/texmf-dist/tex/latex/autoarea/autoarea.sty b/Master/texmf-dist/tex/latex/autoarea/autoarea.sty new file mode 100644 index 00000000000..84aa0160a75 --- /dev/null +++ b/Master/texmf-dist/tex/latex/autoarea/autoarea.sty @@ -0,0 +1,220 @@ +%% Macro package `autoarea.sty', supporting but not needing LaTeX2e, +%% copyright (C) 2008 Uwe Lueck [L\"uck] +%% http://www.contact-ednotes.sty.de.vu +%% - author-maintained, extending PiCTeX: + +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else + % german.sty trick + \ProvidesPackage{autoarea}[2008/08/12 v0.3a + automatic accounting for PiCTeX lines and arcs] + % +\fi + +% LEGAL/CONTACT +% +%% This file can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License, version 1.3c or later, cf. +%% http://www.latex-project.org/lppl.txt +%% -- NO WARRANTY! Please report bugs, problems, and suggestions via +%% http://www.contact-ednotes.sty.de.vu + +% FEATURES/USAGE +% +% This is an experimental package for use with pictex[wd].sty/.tex. +% It works with LaTeX2e as well as with Plain TeX or LaTeX2.09. +% It is "experimental" in that it has come from a mixture of knowing +% PiCTeX internals and guesses that surprisingly seem to work. +% +% PiCTeX's \plot, \circulararc and \ellipticalarc normally don't contribute to +% proper placement of the picture between text and margins, which may result +% in pictures overlapping with text or in uneven distances to text margins. +% You should find a file autodemo-.pdf nearby that illustrates how this may +% look. +% +% In such cases, the document author must use PiCTeX's \setplotarea to correct +% this manually, determining the "bounding box" (cf. documentation as indicated +% after \endinput below). PiCTeX's \put, on the opposite, normally DOES +% contribute to PiCTeX's automatical calculation of the boundaries. +% +% autoarea.sty tries to determine the bounding box even for lines and arcs +% automatically instead, so you can omit \setplotarea (at least for this +% purpose). You just have to load it (we hope) after pictex[wd].sty/.tex, by, +% e.g., +% +% \usepackage{pictexwd,autoarea} +% or +% \input pictexwd +% \input autoarea.sty +% +% The package defines just three user commands \plottedat, \autoaccountingoff, +% and \autoaccountingon - which you perhaps won't need, just loading the +% package may suffice. The samples autodemo-.pdf and autodemo+.pdf nearby both +% were generated by omitting \setplotarea, the difference being that +% autodemo+.pdf profits from \usepackage{autoarea}, which may convince you +% that it's worth trying autoarea. +% +% \plottedat XMIN YMIN \plottedat XMAX YMAX may (otherwise) replace +% \setplotarea x from XMIN to XMAX, y from YMIN to YMAX +% A single "\plottedat ..." may suffice if other \put commands +% contribute to proper placement of the picture sufficiently already. + + \expandafter %% ersatz-\newcommand if without LaTeX + \ifx \csname newcommand\endcsname \relax + \def\newcommand#1{\def#1} \fi + +\newcommand{\plottedat}{\put {} at } + +% (If the user doesn't want it, we still need it here!) +% +% Should a \plot or \circulararc command seem to produce more space than +% you want, put it between \autoaccountingoff and \autoaccountingon, +% then try \plottedat and \setplotarea if needed. +% +% Our trick will account for starting, ending, or corner points of curves. +% This may not suffice in general (e.g., with \setquadratic), +% then you still may need \plottedat or \setplotarea. Below \endinput you +% find more on CAVEATS etc. + +% INTERNALS + +\catcode`\!=11 % use and change PiCTeX internals + +\let\PT!!start\!start \let\PT!!ljoin\!ljoin \let\PT!!qjoin\!qjoin +\def\PTaa!start (#1,#2){\plottedat #1 #2 \PT!!start (#1,#2)} +\def\PTaa!ljoin (#1,#2){\plottedat #1 #2 \PT!!ljoin (#1,#2)} +\def\PTaa!qjoin (#1,#2) (#3,#4){% + \plottedat #1 #2 \plottedat #3 #4 \PT!!qjoin (#1,#2) (#3,#4)} + +\expandafter\ifx\csname newcommand\endcsname \def\newcommand#1{\def#1} \fi + +\newcommand{\autoaccountingon}{% + \let\!start\PTaa!start \let\!ljoin\PTaa!ljoin \let\!qjoin\PTaa!qjoin} + +\newcommand{\autoaccountingoff}{% + \let\!start\PT!!start \let\!ljoin\PT!!ljoin \let\!qjoin\PT!!qjoin} + +\catcode`\!=12 + +\autoaccountingon % turns on automatic accounting for lines and arcs. + +\endinput %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +CAVEATS + +1. I won't try to find out whether autoarea.sty makes \setplotarea entirely +superfluous: will drawing a coordinate system work without \setplotarea? + +2. Certainly it was not due to dullness that PiCTeX didn't provide autoarea's +feature originally. Around 1990, it was important to care for speed with PiCTeX +(and it may still be, I won't try complex examples). +Apart from up to four, line and arc commands are irrelevant for placing the +picture correctly. About the same holds for put commands, and that's why PiCTeX +has \accountingoff and \accountingon to ignore many of them. Our \autoaccountingoff +and \autoaccountingon serve the analoguous purpose for line and arc commands. + +3. I don't know exactly how arc commands work, therefore I wouldn't be astonished +if the result still is not properly centered. Our trick is take account of some +points all of which an approximating curve must meet. Can that curve bend out of +the bounding rectangle of those points? + + +ACKNOWLEDGEMENTS + +This work has been supported by edition projects at the Institute for +the History of the Sciences directed by Prof. Dr. Menso Folkerts. +Thanks to Dr. Richard Lorch for introducing me to the subject. + + + +CHANGE HISTORY + +v0.1 2008/02/14 Working, addressed compatibility with ArabTeX. +v0.2 2008/02/14a Moved compatibility to lorchpic.sty. + This one submitted to CTAN, soon kind of withdrawn. +v0.3 2008/04/19 Made generic, expanded prose. + 2008/04/25 `Lueck', not `Lück', for UNIX etc. + 2008/05/07 ersatz-\newcommand earlier, typo; + removed remarks on PiCTeX documentation. + 2008/05/08 Added version numbers, corrected ersatz-\newcommand; + uploaded in pictex_may_2008.zip - in vain. +v0.3a 2008/08/12 typo fix "too text" -> "to text". + +_________________________________________________________________________ + +FORMER VERSION 2008/02/13 (ul, 2008/02/14): + +I couldn't find a working redefinition of \circulararc +("Use of \ellipticalarc doesn't match its definition"); +on the other hand its internals seem to the job all ready; +and my redefinition seemed to raise further difficulties. +Here's what I had tried before: + +% \circulararc may do the trick for full circles (360 degree) only. +% CAVEAT: assumes that x and y units are the same. +% Otherwise or when something else goes wrong, put \circulararc between +% \autoaccountingarcoff and \autoaccountingarcon. +% +% These features come from the start if you load the present package. + +\catcode`\!=11 % use and change PiCTeX internals + +\let\PT@@start\!start \let\PT@@ljoin\!ljoin \let\PT@@qjoin\!qjoin +\def\PTaa@start (#1,#2){\plottedat #1 #2 \PT@@start (#1,#2)} +\def\PTaa@ljoin (#1,#2){\plottedat #1 #2 \PT@@ljoin (#1,#2)} +\def\PTaa@qjoin (#1,#2) (#3,#4){% + \plottedat #1 #2 \plottedat #3 #4 \PT@@qjoin (#1,#2) (#3,#4)} + +\let\PT@@circulararc\circulararc +\def\PTaa@circulararc #1 degrees from #2 #3 center at #4 #5 {% + \ifnum #1=360 + \!dimenE=#2pt \advance\!dimenE-#4pt + \!dimenF=#2pt \advance\!dimenF-#4pt + \!Pythag\!dimenE\!dimenF\!dimenG + \PTaa@plotcorner{#4}{#5}{-}% + \PTaa@plotcorner{#4}{#5}{}% + \fi + % \PT@@circulararc #1 degrees from #2 #3 center at #4 #5 + %\PT@@circulararc #1 degrees from #2 #3 center at #4 #5 } + \ellipticalarc axes ratio 1:1 360 degrees from 0 25 center at 0 0 } + %\ellipticalarc axes ratio 1:1 #1 degrees from #2 #3 center at #4 #5 } +\def\PTaa@plotcorner#1#2#3{% + \!dimenE#1pt \!dimenF#2pt + \advance\!dimenE#3\!dimenG \advance\!dimenF#3\!dimenG + \!removept\!dimenE\@tempa \!removept\!dimenF\@tempb + \edef\@tempc{\noexpand\plottedat \@tempa\space\@tempb}% + \@tempc +} +% <-: +% 1. May be \!qjoin of \ellipticalarc does the trick already. +% 2. FUTURE: \accountingcircle[tbrl] if circle isn't full. +% 3. CAVEAT: May not work in dimension mode. +% 4. May be improvable with better knowledge of internals than mine. + +\newcommand{\autoaccountingon}{% + \let\!start\PTaa@start \let\!ljoin\PTaa@ljoin \let\!qjoin\PTaa@qjoin + \autoaccountingarcon} +\newcommand{\autoaccountingarcon}{\let\circulararc\PTaa@circulararc} +\newcommand{\autoaccountingoff}{% + \let\!start\PT@@start \let\!ljoin\PT@@ljoin \let\!qjoin\PT@@qjoin + % <- Yet I can't imagine why this could be needed, just in case ... + \autoaccountingarcoff} +\newcommand{\autoaccountingarcoff}{\let\circulararc\PT@@circulararc} + +% \setnone FROM ARABTEX SUFFICES INSTEAD OF: +% +% COMPATIBILITY WITH ARABTEX ETC. +% +% ArabTeX and possibly other packages may disable PiCTeX commands +% using "<...,...>" syntax, notably \setcoordinatesystem units <1mm,1mm> etc. +%% TODO: TeX error: +% Precede such a command (if it breaks) with \restoreanglesyntax, +% best after \beginpicture to avoid disabling the other package. + +\newcommand{\restoreanglesyntax}{\@makeother\<\@makeother\>} + +%% todo: or better "compatibility" package ptangles.sty introducing +%% syntax without <...>!? + +%%% end of file -- cgit v1.2.3