From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/pmgraph/COPYING | 674 ++++++++++ macros/latex/contrib/pmgraph/README | 40 + macros/latex/contrib/pmgraph/pmgraph.pdf | Bin 0 -> 126517 bytes macros/latex/contrib/pmgraph/pmgraph.sty | 2114 ++++++++++++++++++++++++++++++ macros/latex/contrib/pmgraph/pmgraph.tex | 1014 ++++++++++++++ 5 files changed, 3842 insertions(+) create mode 100644 macros/latex/contrib/pmgraph/COPYING create mode 100644 macros/latex/contrib/pmgraph/README create mode 100644 macros/latex/contrib/pmgraph/pmgraph.pdf create mode 100644 macros/latex/contrib/pmgraph/pmgraph.sty create mode 100644 macros/latex/contrib/pmgraph/pmgraph.tex (limited to 'macros/latex/contrib/pmgraph') diff --git a/macros/latex/contrib/pmgraph/COPYING b/macros/latex/contrib/pmgraph/COPYING new file mode 100644 index 0000000000..94a9ed024d --- /dev/null +++ b/macros/latex/contrib/pmgraph/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/macros/latex/contrib/pmgraph/README b/macros/latex/contrib/pmgraph/README new file mode 100644 index 0000000000..405dc4f4e0 --- /dev/null +++ b/macros/latex/contrib/pmgraph/README @@ -0,0 +1,40 @@ +This README was added by Clea F. Rees on 2008/11/03. + +Licence +------- + +pmgraph is copyright 1996 Alexander Berdnikov, Olga Grineva + +This file is part of pmgraph. + +pmgraph is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +pmgraph is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with pmgraph. If not, see . + +Description +----------- + +pmgraph provides "Poor man's" graphics --- a set of extensions to +the LaTeX picture environment, including a wider range of vectors +and a lot more box frame styles. + +Files +----- + +pmgraph consists of the following files: + README + COPYING + pmgraph.tex + pmgraph.sty + pmgraph.pdf + + diff --git a/macros/latex/contrib/pmgraph/pmgraph.pdf b/macros/latex/contrib/pmgraph/pmgraph.pdf new file mode 100644 index 0000000000..1cd0e93c17 Binary files /dev/null and b/macros/latex/contrib/pmgraph/pmgraph.pdf differ diff --git a/macros/latex/contrib/pmgraph/pmgraph.sty b/macros/latex/contrib/pmgraph/pmgraph.sty new file mode 100644 index 0000000000..b0b56b7fdc --- /dev/null +++ b/macros/latex/contrib/pmgraph/pmgraph.sty @@ -0,0 +1,2114 @@ +%% The following copyright notice and licensing information was added +%% by Clea F. Rees on behalf of Alexander Berdnikov on 2008/11/03. +%% +%% Copyright 1996 Alexander Berdnikov, Olga Grineva +%% +%% This file is part of pmgraph. +%% +%% pmgraph is free software: you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% pmgraph is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +%% See the GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with pmgraph. If not, see . + +\chardef\oldatcatcode=\catcode`@ +\catcode`@=11 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% PMGRAPH.STY --- intermediate version %% +%% of poor-man-graphics style %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% +% save old LaTeX macro +% + +\let\ltx@thinlines=\thinlines +\let\ltx@thicklines=\thicklines +\let\ltx@@getcirc=\@getcirc +\let\ltx@@circ=\@circ +\let\ltx@vector=\vector +\let\ltx@@svector=\@svector +\let\ltx@@getlarrow=\@getlarrow +\let\ltx@@gerlarrow=\@getrarrow + + + +\newif\ifflag@thicklines + +\newdimen\@dimenA +\newdimen\@dimenB +\newdimen\@dimenC +\newdimen\@dimenD + +% this is \put(x,y) where and are dimensions +\def\@@put#1#2#3{\@killglue\raise#2\hbox to\z@{\hskip #1 #3\hss}} + +% dashed or solid vertical line +\def\vdashline#1{% + \@setdashlength{#1}% + \ifnum \@dashcnt>0 + \setbox\@dashbox\hbox{\vrule height \@dashdim + width \@wholewidth}% + \@tempcnta=0 + \leavevmode + \lower \@dashdim \hbox{\kern -\@halfwidth + \vbox{\@whilenum \@tempcnta<\@dashcnt + \do{\copy\@dashbox \vskip\@tempdimb \advance\@tempcnta by 1}% + }}% + \else + \advance\@tempdima \@halfwidth + \ifdim \@tempdima>0pt + \leavevmode\kern -\@halfwidth + \vrule width \@wholewidth + height \@tempdima + depth \@halfwidth \relax + \fi + \fi +} + +% dashed or solid horizontal line +\def\hdashline#1{% + \@setdashlength{#1}% + \ifnum \@dashcnt>0 + \setbox\@dashbox\hbox{\vrule width \@dashdim + height \@halfwidth + depth \@halfwidth + \hskip \@tempdimb}% + \@tempcnta=0 + \@whilenum \@tempcnta<\@dashcnt + \do{\copy\@dashbox \advance\@tempcnta by 1}% + \else + \advance\@tempdima \@wholewidth + \ifdim \@tempdima>0pt + \leavevmode\kern -\@halfwidth + \vrule width \@tempdima + height \@halfwidth + depth \@halfwidth \relax + \fi + \fi +} + +% length of the line is in \@tempdima +% output : \@dashdim is the dash length, +% \@tempdimb is the dash space +% \@dashcnt is the number of dashes +\def\@setdashlength#1{% + \@dashdim=#1\unitlength + \@tempdimb=0.5\@tempdima \advance\@tempdimb by 0.5\@dashdim + \@dashcnt=\@tempdimb \@tempcnta=\@dashdim + \ifnum \@tempcnta>0 + \divide\@dashcnt by \@tempcnta + \else + \@dashcnt=0 + \fi + \advance\@dashcnt by -1 + \ifnum \@dashcnt>0 + \@tempdimb=-\@dashdim \multiply\@tempdimb by \@dashcnt + \advance\@tempdimb by \@tempdima \advance\@tempdimb by -\@dashdim + \divide\@tempdimb by \@dashcnt + \advance\@dashcnt by 1 + \else + \@tempdimb=0pt\@dashcnt=0 + \fi +} + + +%%% +%%% romb frame commands +%%% + +\def\romb{\@ifnextchar[{\romb@}{\romb@[c]}} +\def\romb@[#1](#2,#3)#4{\csname romb@#1\endcsname(#2,#3){#4}} + +\def\romb@r(#1,#2)#3{% + \put(-#3,0){\romb@c(#1,#2){#3}} +} + +\def\romb@l(#1,#2)#3{% + \put(#3,0){\romb@c(#1,#2){#3}} +} + +\def\romb@c(#1,#2)#3{% + \put(-#3,0){\line(#1,#2){#3}} + \put(-#3,0){\line(#1,-#2){#3}} + \put(#3,0){\line(-#1,#2){#3}} + \put(#3,0){\line(-#1,-#2){#3}} +} + +\def\rombBox{\@ifnextchar[{\@rombBox}{\@rombBox[x]}} +\def\rombBoX{\@ifnextchar[{\@rombBoX}{\@rombBoX[x]}} +\def\rombBOX{\@ifnextchar[{\@rombBOX}{\@rombBOX[x]}} + +\def\@rombBox[#1](#2,#3){% + \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@ + \@HelpRomb{#2}{#3}{0}[#1]% + }\@makepicbox(#2,#3)} + +\def\@rombBoX[#1](#2,#3){% + \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@ + \@HelpRomb{#2}{#3}{0}[#1]% + \@HelpRomb{#2}{#3}{1}[#1]% + }\@makepicbox(#2,#3)} + +\def\@rombBOX[#1](#2,#3){% + \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@ + \@HelpRomb{#2}{#3}{0}[#1]% + \@HelpRomb{#2}{#3}{1}[#1]% + \@HelpRomb{#2}{#3}{2}[#1]% + }\@makepicbox(#2,#3)} + +\def\@HelpRomb#1#2#3[#4]{\@makerombslope + \@dimenA=\@RombL\relax \multiply\@dimenA by #3 \@dimenB=\@dimenA + \multiply\@dimenA by \@xarg \multiply\@dimenB by \@yarg + \@dimenC=-\@dimenA \@dimenD=\@dimenC + \multiply\@dimenA by 2 \@dimenB=\@dimenA + \advance\@dimenA #1\unitlength \advance\@dimenB #2\unitlength + \if x#4 \@romblengthX + \else \if y#4 \@romblengthY + \else \if z#4 \@romblengthZ + \else \@romblengthX + \fi\fi\fi + \@makeromb} + +\def\@makerombslope{% + \@xarg \@RombX\relax \@yarg \@RombY\relax + \ifnum \@xarg<0 \@xarg -\@xarg \fi + \ifnum \@yarg<0 \@yarg -\@yarg \fi + \ifnum \@xarg=0 \xarg 2 \@yarg 1 \fi + \ifnum \@yarg=0 \xarg 2 \@yarg 1 \fi +} + +\def\@romblengthX{\@linelen=0.5\@dimenA} + +\def\@romblengthY{\@linelen=0.5\@dimenB + \divide\@linelen by \@yarg \multiply\@linelen by \@xarg} + +\def\@romblengthZ{\@romblengthY \advance\@linelen by 0.5\@dimenA} + +% it is supposed that \@xarg and \@yarg are set to slope values, +% and \@linelen is equal to the length of the romb side +\def\@makeromb{% + \@makerombhlp \advance\@tempdima by -\@linelen + \@@put{\@tempdima}{\@tempdimb}{\@sline}% + \@yarg=-\@yarg + \@makerombhlp \advance\@tempdima by -\@linelen + \@@put{\@tempdima}{\@tempdimb}{\@sline}% + \@xarg=-\@xarg + \@makerombhlp \advance\@tempdima by \@linelen + \@@put{\@tempdima}{\@tempdimb}{\@sline}% + \@yarg=-\@yarg + \@makerombhlp \advance\@tempdima by \@linelen + \@@put{\@tempdima}{\@tempdimb}{\@sline}% +} + +\def\@makerombhlp{\@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima 0.5\@dimenA \advance\@tempdimb 0.5\@dimenB} + +\def\rombboxstyle(#1,#2,#3){\def\@RombX{#1}% + \def\@RombY{#2}% + \def\@RombL{#3}% + \ignorespaces} + +%%% +%%% rect frame commands +%%% + +\def\frameBox{\@ifnextchar[{\@frameBox}{\@frameBox[]}} +\def\frameBoX{\@ifnextchar[{\@frameBoX}{\@frameBoX[]}} +\def\frameBOX{\@ifnextchar[{\@frameBOX}{\@frameBOX[]}} + +\def\ovalBox{\@ifnextchar[{\@ovalBox}{\@ovalBox[]}} +\def\ovalBoX{\@ifnextchar[{\@ovalBoX}{\@ovalBoX[]}} +\def\ovalBOX{\@ifnextchar[{\@ovalBOX}{\@ovalBOX[]}} + +\def\astroBox{\@ifnextchar[{\@astroBox}{\@astroBox[]}} +\def\astroBoX{\@ifnextchar[{\@astroBoX}{\@astroBoX[]}} +\def\astroBOX{\@ifnextchar[{\@astroBOX}{\@astroBOX[]}} + +\def\parquetBox{\@ifnextchar[{\@parquetBox}{\@parquetBox[]}} +\def\parquetBoX{\@ifnextchar[{\@parquetBoX}{\@parquetBoX[]}} +\def\parquetBOX{\@ifnextchar[{\@parquetBOX}{\@parquetBOX[]}} + +\def\octalBox{\@ifnextchar[{\@octalBox}{\@octalBox[]}} +\def\octalBoX{\@ifnextchar[{\@octalBoX}{\@octalBoX[]}} +\def\octalBOX{\@ifnextchar[{\@octalBOX}{\@octalBOX[]}} + +\def\dashBox#1{\@ifnextchar[{\@dashBox{#1}}{\@dashBox{#1}[]}} +\def\dashBoX#1{\@ifnextchar[{\@dashBoX{#1}}{\@dashBoX{#1}[]}} +\def\dashBOX#1{\@ifnextchar[{\@dashBOX{#1}}{\@dashBOX{#1}[]}} + +\def\userBox#1#2{\@ifnextchar[{\@userBox{#1}{#2}}{\@userBox{#1}{#2}[]}} +\def\userBoX#1#2{\@ifnextchar[{\@userBoX{#1}{#2}}{\@userBoX{#1}{#2}[]}} +\def\userBOX#1#2{\@ifnextchar[{\@userBOX{#1}{#2}}{\@userBOX{#1}{#2}[]}} + +\def\@frameBox[#1](#2,#3){\@makeBox{#2}{#3}{#1}{0}{r}} +\def\@frameBoX[#1](#2,#3){\@makeBoX{#2}{#3}{#1}{0}{r}} +\def\@frameBOX[#1](#2,#3){\@makeBOX{#2}{#3}{#1}{0}{r}} + +\def\@ovalBox[#1](#2,#3){\@makeBox{#2}{#3}{#1}{0}{O}} +\def\@ovalBoX[#1](#2,#3){\@makeBoX{#2}{#3}{#1}{0}{O}} +\def\@ovalBOX[#1](#2,#3){\@makeBOX{#2}{#3}{#1}{0}{O}} + +\def\@astroBox[#1](#2,#3){\@makeBox{#2}{#3}{#1}{0}{A}} +\def\@astroBoX[#1](#2,#3){\@makeBoX{#2}{#3}{#1}{0}{A}} +\def\@astroBOX[#1](#2,#3){\@makeBOX{#2}{#3}{#1}{0}{A}} + +\def\@parquetBox[#1](#2,#3){\@makeBox{#2}{#3}{#1}{0}{P}} +\def\@parquetBoX[#1](#2,#3){\@makeBoX{#2}{#3}{#1}{0}{P}} +\def\@parquetBOX[#1](#2,#3){\@makeBOX{#2}{#3}{#1}{0}{P}} + +\def\@octalBox[#1](#2,#3){\@makeBox{#2}{#3}{#1}{0}{L}} +\def\@octalBoX[#1](#2,#3){\@makeBoX{#2}{#3}{#1}{0}{L}} +\def\@octalBOX[#1](#2,#3){\@makeBOX{#2}{#3}{#1}{0}{L}} + +\def\@dashBox#1[#2](#3,#4){\@makeBox{#3}{#4}{#2}{#1}{r}} +\def\@dashBoX#1[#2](#3,#4){\@makeBoX{#3}{#4}{#2}{#1}{r}} +\def\@dashBOX#1[#2](#3,#4){\@makeBOX{#3}{#4}{#2}{#1}{r}} + +\def\@userBox#1#2[#3](#4,#5){\@makeBox{#4}{#5}{#3}{#2}{#1}} +\def\@userBoX#1#2[#3](#4,#5){\@makeBoX{#4}{#5}{#3}{#2}{#1}} +\def\@userBOX#1#2[#3](#4,#5){\@makeBOX{#4}{#5}{#3}{#2}{#1}} + +% #1 = x, #2 = y +% #3 = shadows +% #4 = dash line (real) +% #5 = frame style (,O,A,C,R,???) +% +\def\@makeBox#1#2#3#4#5{% + \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@ + \@HelpFrame{#1}{#2}{0}{#3}{#4}{#5}% + }\@makepicbox(#1,#2)} +% +\def\@makeBoX#1#2#3#4#5{% + \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@ + \ifdim \framesepH>\z@ + \@HelpFrame{#1}{#2}{0}{}{#4}{#5}% + \@HelpFrame{#1}{#2}{1}{#3}{#4}{#5}% + \else + \@HelpFrame{#1}{#2}{1}{}{#4}{#5}% + \@HelpFrame{#1}{#2}{0}{#3}{#4}{#5}% + \fi}\@makepicbox(#1,#2)} +% +\def\@makeBOX#1#2#3#4#5{% + \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@ + \ifdim \framesepH>\z@ + \@HelpFrame{#1}{#2}{0}{}{#4}{#5}% + \@HelpFrame{#1}{#2}{1}{}{#4}{#5}% + \@HelpFrame{#1}{#2}{2}{#3}{#4}{#5}% + \else + \@HelpFrame{#1}{#2}{2}{}{#4}{#5}% + \@HelpFrame{#1}{#2}{1}{}{#4}{#5}% + \@HelpFrame{#1}{#2}{0}{#3}{#4}{#5}% + \fi}\@makepicbox(#1,#2)} + +\def\@warn@corner{\@warning{Unable to draw corner}} + +% #1 = x, #2 = y +% #3 = multiple frame +% #4 = list of shadows +% #5 = dash/solid line (real) +% #6 = frame corner style (,O,A,C,R,???) +% +\def\@HelpFrame#1#2#3#4#5#6{% + \@tempdima=\framesepH\relax \multiply\@tempdima by #3 + \@dimenA=\framesepXM\@tempdima \@dimenB=\framesepYM\@tempdima + \@dimenC=-\@dimenA \@dimenD=-\@dimenB + \advance\@dimenA by \framesepXP\@tempdima + \advance\@dimenB by \framesepYP\@tempdima + \advance\@dimenA #1\unitlength \advance\@dimenB #2\unitlength + \advance\@dimenA by \frameexpandX\relax + \advance\@dimenB by \frameexpandY\relax + \@@makeframe{#5}{#6}% + \advance\@dimenA by 2\@wholewidth \advance\@dimenB by 2\@wholewidth + \advance\@dimenC by -\@wholewidth \advance\@dimenD by -\@wholewidth + \@setshadowsize + \@tfor \@tempa := #4 \do + {\@negargtrue + \ifdim \@dimenA>0pt \ifdim \@dimenB>0pt + \csname @rectshadow@\@tempa\endcsname{#5}% + \@updateshadowsize + \@negargfalse + \fi\fi + \if@negarg \@warning{Shadow position is wrong}\fi + }% +} + +% in subsequent commands: +% \@dimenA is x-size of the box, +% \@dimenB is y-size of the box +% \@dimenC is x-shift, \@dimenD is y-shift + +% +% standard corner +% +\def\@prepdummy{\@ovxx=0pt \@ovyy=0pt + \@ovdx=0pt \@ovdy=0pt + \@yyarg=0 \@negargtrue} + +\def\@prepframe@R{\@prepdummy} +\def\tl@corner@R{} +\def\tr@corner@R{} +\def\bl@corner@R{} +\def\br@corner@R{} + +% +% Oval corners +% +\def\@prepframe@O{% + \@tempdima=\RoundCorner\relax \@tempdima=2\@tempdima + \@negargtrue + \ifdim \@tempdima>\@dimenA \@negargfalse \fi + \ifdim \@tempdima>\@dimenB \@negargfalse \fi + \if@negarg + \@getcirc\@tempdima \@yyarg=\@tempcnta + \@ovxx=0.5\wd\@tempboxa \@ovyy=\@ovxx + \@tempdima=0.5\ht\@tempboxa \advance\@tempdima by -0.5\dp\@tempboxa + \@ovdx=\@halfwidth \advance\@ovdx by -\@tempdima \@ovdy=\@ovdx + \else + \@warn@corner + \fi +} + +\def\tl@corner@O{\@@TLcircle} +\def\tr@corner@O{\@@TRcircle} +\def\bl@corner@O{\@@BLcircle} +\def\br@corner@O{\@@BRcircle} + +% +% Astro corners +% +\def\@prepframe@A{\@prepframe@O} +\def\tl@corner@A{\@@brcircle} +\def\tr@corner@A{\@@blcircle} +\def\bl@corner@A{\@@trcircle} +\def\br@corner@A{\@@tlcircle} + +% +% Parquet corners +% +\def\@prepframe@P{\@negargtrue + \@tempdima=\RectCorner\relax + \ifdim \@tempdima>0.5\@dimenA \@negargfalse \fi + \ifdim \@tempdima>0.5\@dimenB \@negargfalse \fi + \if@negarg + \@ovxx=\@tempdima \@ovyy=\@tempdima + \@yyarg=0 \@ovdx=\@halfwidth \@ovdy=\@halfwidth + \else + \@warn@corner + \fi +} +\def\tl@corner@P{% + \@tempdima=\@ovyy + \setbox\@tempboxa\hbox{\kern \@ovxx \raise -\@ovyy + \hbox{\vdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \@tempdima=\@ovxx + \setbox\@tempboxa\hbox{\kern 0pt \raise -\@ovyy + \hbox{\hdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \setbox\@tempboxa\hbox{}% +} +\def\tr@corner@P{% + \@tempdima=\@ovyy + \setbox\@tempboxa\hbox{\kern -\@ovxx \raise -\@ovyy + \hbox{\vdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \@tempdima=\@ovxx + \setbox\@tempboxa\hbox{\kern -\@ovxx \raise -\@ovyy + \hbox{\hdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \setbox\@tempboxa\hbox{}% +} +\def\bl@corner@P{% + \@tempdima=\@ovyy + \setbox\@tempboxa\hbox{\kern \@ovxx \raise 0pt + \hbox{\vdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \@tempdima=\@ovxx + \setbox\@tempboxa\hbox{\kern 0pt \raise \@ovyy + \hbox{\hdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \setbox\@tempboxa\hbox{}% +} +\def\br@corner@P{% + \@tempdima=\@ovyy + \setbox\@tempboxa\hbox{\kern -\@ovxx \raise 0pt + \hbox{\vdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \@tempdima=\@ovxx + \setbox\@tempboxa\hbox{\kern -\@ovxx \raise \@ovyy + \hbox{\hdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \setbox\@tempboxa\hbox{}% +} + +% +% Ordinary corners: init= \def\@prepframe@D{\@prepframe@P} +% +\def\tl@corner@D{% + \@tempdima=\@ovyy + \setbox\@tempboxa\hbox{\raise -\@ovyy + \hbox{\vdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \@tempdima=\@ovxx + \setbox\@tempboxa\hbox{\hdashline{\@tempa}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \setbox\@tempboxa\hbox{}% +} +\def\tr@corner@D{% + \@tempdima=\@ovyy + \setbox\@tempboxa\hbox{\raise -\@ovyy + \hbox{\vdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \@tempdima=\@ovxx + \setbox\@tempboxa\hbox{\kern -\@ovxx + \hbox{\hdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \setbox\@tempboxa\hbox{}% +} +\def\bl@corner@D{% + \@tempdima=\@ovyy + \setbox\@tempboxa\hbox{\vdashline{\@tempa}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \@tempdima=\@ovxx + \setbox\@tempboxa\hbox{\hdashline{\@tempa}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \setbox\@tempboxa\hbox{}% +} +\def\br@corner@D{% + \@tempdima=\@ovyy + \setbox\@tempboxa\hbox{\vdashline{\@tempa}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \@tempdima=\@ovxx + \setbox\@tempboxa\hbox{\kern -\@ovxx + \hbox{\hdashline{\@tempa}}}% + \wd\@tempboxa=0pt \copy\@tempboxa + \setbox\@tempboxa\hbox{}% +} + +% +% Octal corners +% +\def\@prepframe@L{% + \@negargtrue + \ifnum \@RombX>0 \else \@negargfalse \fi + \ifnum \@RombY>0 \else \@negargfalse \fi + \if@negarg + \ifnum \@RombX>\@RombY + \@tempdima=\LineCorner\relax + \@tempdimb=\@tempdima + \multiply\@tempdimb by \@RombY + \divide\@tempdimb by \@RombX + \else + \@tempdimb=\LineCorner\relax + \@tempdima=\@tempdimb + \multiply\@tempdima by \@RombX + \divide\@tempdima by \@RombY + \fi + \ifdim \@tempdima>0.5\@dimenA \@negargfalse \fi + \ifdim \@tempdimb>0.5\@dimenB \@negargfalse \fi + \@ovxx=\@tempdima \@ovyy=\@tempdimb + \ifnum \@RombX>\@RombY + \ifdim \@ovxx<10pt \@negargfalse \fi + \else + \ifdim \@ovyy<10pt \@negargfalse \fi + \fi + \if@negarg + \@ovxx=\@tempdima \@ovyy=\@tempdimb + \@yyarg=0 \@ovdx=\@halfwidth \@ovdy=\@halfwidth + \else + \@warn@corner + \fi + \fi +} + +\def\tl@corner@L{\@xarg=\@RombX \@yarg=\@RombY \@linelen=\@ovxx + \hbox{\raise -\@ovyy \hbox{\@sline}}} +\def\tr@corner@L{\@xarg=-\@RombX \@yarg=\@RombY \@linelen=\@ovxx + \hbox{\raise -\@ovyy \hbox{\@sline}}} +\def\bl@corner@L{\@xarg=\@RombX \@yarg=-\@RombY \@linelen=\@ovxx + \hbox{\raise \@ovyy \hbox{\@sline}}} +\def\br@corner@L{\@xarg=-\@RombX \@yarg=-\@RombY \@linelen=\@ovxx + \hbox{\raise \@ovyy \hbox{\@sline}}} + +% +% Black box corners +% +\def\@prepframe@b{\@prepframe@P\@ovdx=0pt\@ovdy=0pt} +\def\tl@corner@b{\@tempdima=\@ovxx \advance\@tempdima by \@halfwidth + \@tempdimb=\@ovyy \advance\@tempdimb by \@halfwidth + \kern -\@halfwidth \raise -\@ovyy + \hbox{\vrule height \@tempdimb depth 0pt width \@tempdima}} +\def\tr@corner@b{\@tempdima=\@ovxx \advance\@tempdima by \@halfwidth + \@tempdimb=\@ovyy \advance\@tempdimb by \@halfwidth + \kern -\@ovxx \raise -\@ovyy + \hbox{\vrule height \@tempdimb depth 0pt width \@tempdima}} +\def\bl@corner@b{\@tempdima=\@ovxx \advance\@tempdima by \@halfwidth + \@tempdimb=\@ovyy \advance\@tempdimb by \@halfwidth + \kern -\@halfwidth \raise -\@halfwidth + \hbox{\vrule height \@tempdimb depth 0pt width \@tempdima}} +\def\br@corner@b{\@tempdima=\@ovxx \advance\@tempdima by \@halfwidth + \@tempdimb=\@ovyy \advance\@tempdimb by \@halfwidth + \kern -\@ovxx \raise -\@halfwidth + \hbox{\vrule height \@tempdimb depth 0pt width \@tempdima}} + +% +% 0.75 Black box corners +% +\def\@prepframe@c{\@prepframe@P} +\def\tl@corner@c{\tl@corner@P\tl@corner@cc} +\def\tr@corner@c{\tr@corner@P\tr@corner@cc} +\def\bl@corner@c{\bl@corner@P\bl@corner@cc} +\def\br@corner@c{\br@corner@P\br@corner@cc} + +\def\tl@corner@cc{% + \@tempdima=0.75\@ovxx \advance\@tempdima by \@halfwidth + \@tempdimb=0.75\@ovyy \advance\@tempdimb by \@halfwidth + \setbox\@tempboxa\hbox{\kern -\@halfwidth \raise -0.75\@ovyy + \hbox{\vrule width \@tempdima depth 0pt height \@tempdimb}}% + \wd\@tempboxa=0pt \copy\@tempboxa +} +\def\tr@corner@cc{% + \@tempdima=0.75\@ovxx \advance\@tempdima by \@halfwidth + \@tempdimb=0.75\@ovyy \advance\@tempdimb by \@halfwidth + \setbox\@tempboxa\hbox{\kern -0.75\@ovxx \raise -0.75\@ovyy + \hbox{\vrule width \@tempdima depth 0pt height \@tempdimb}}% + \wd\@tempboxa=0pt \copy\@tempboxa +} +\def\bl@corner@cc{% + \@tempdima=0.75\@ovxx \advance\@tempdima by \@halfwidth + \@tempdimb=0.75\@ovyy \advance\@tempdimb by \@halfwidth + \setbox\@tempboxa\hbox{\kern -\@halfwidth \raise -\@halfwidth + \hbox{\vrule width \@tempdima height \@tempdimb depth 0pt}}% + \wd\@tempboxa=0pt \copy\@tempboxa +} +\def\br@corner@cc{% + \@tempdima=0.75\@ovxx \advance\@tempdima by \@halfwidth + \@tempdimb=0.75\@ovyy \advance\@tempdimb by \@halfwidth + \setbox\@tempboxa\hbox{\kern -0.75\@ovxx \raise -\@halfwidth + \hbox{\vrule width \@tempdima height \@tempdimb depth 0pt}}% + \wd\@tempboxa=0pt \copy\@tempboxa +} + +% +% 0.5 centered black box corners +% +\def\@prepframe@d{\@prepframe@P} +\def\tl@corner@d{\tl@corner@P\tl@corner@D\tl@corner@dd} +\def\tr@corner@d{\tr@corner@P\tr@corner@D\tr@corner@dd} +\def\bl@corner@d{\bl@corner@P\bl@corner@D\bl@corner@dd} +\def\br@corner@d{\br@corner@P\br@corner@D\br@corner@dd} + +\def\@prepframe@e{\@prepframe@P} +\def\tl@corner@e{\tl@corner@D\tl@corner@dd} +\def\tr@corner@e{\tr@corner@D\tr@corner@dd} +\def\bl@corner@e{\bl@corner@D\bl@corner@dd} +\def\br@corner@e{\br@corner@D\br@corner@dd} + +\def\@prepframe@f{\@prepframe@P} +\def\tl@corner@f{\tl@corner@P\tl@corner@dd} +\def\tr@corner@f{\tr@corner@P\tr@corner@dd} +\def\bl@corner@f{\bl@corner@P\bl@corner@dd} +\def\br@corner@f{\br@corner@P\br@corner@dd} + +\def\tl@corner@dd{% + \@tempdima=0.25\@ovxx \advance\@tempdima by 0.5\@halfwidth + \@tempdimb=-0.75\@ovyy \advance\@tempdimb by -0.5\@halfwidth + \setbox\@tempboxa\hbox{\kern \@tempdima \raise \@tempdimb + \hbox{\vrule width 0.5\@ovxx depth 0pt height 0.5\@ovyy}}% + \wd\@tempboxa=0pt \copy\@tempboxa +} +\def\tr@corner@dd{% + \@tempdima=-0.75\@ovxx \advance\@tempdima by -0.5\@halfwidth + \@tempdimb=-0.75\@ovyy \advance\@tempdimb by -0.5\@halfwidth + \setbox\@tempboxa\hbox{\kern \@tempdima \raise \@tempdimb + \hbox{\vrule width 0.5\@ovxx depth 0pt height 0.5\@ovyy}}% + \wd\@tempboxa=0pt \copy\@tempboxa +} +\def\bl@corner@dd{% + \@tempdima=0.25\@ovxx \advance\@tempdima by 0.5\@halfwidth + \@tempdimb=0.25\@ovyy \advance\@tempdimb by 0.5\@halfwidth + \setbox\@tempboxa\hbox{\kern \@tempdima \raise \@tempdimb + \hbox{\vrule width 0.5\@ovxx height 0.5\@ovyy depth 0pt}}% + \wd\@tempboxa=0pt \copy\@tempboxa +} +\def\br@corner@dd{% + \@tempdima=-0.75\@ovxx \advance\@tempdima by -0.5\@halfwidth + \@tempdimb=0.25\@ovyy \advance\@tempdimb by 0.5\@halfwidth + \setbox\@tempboxa\hbox{\kern \@tempdima \raise \@tempdimb + \hbox{\vrule width 0.5\@ovxx height 0.5\@ovyy depth 0pt}}% + \wd\@tempboxa=0pt \copy\@tempboxa +} + +% +% circle blobs at the corners +% +\def\@prepframe@o{\@tempdima=\DiskCorner\relax + \get@Disk\@tempdima + \if@negarg + \@yyarg=\@tempcnta \@ovxx=0.5\wd\@tempboxa + \@ovyy=\@ovxx \@ovdx=\@halfwidth \@ovdy=\@ovdx + \ifdim \@ovxx>0.25\@dimenA \@negargfalse \fi + \ifdim \@ovxx>0.25\@dimenB \@negargfalse \fi + \fi + \if@negarg \else \@warn@corner \fi +} +\def\tl@corner@o{% + \kern \@ovxx \raise -\@ovyy \hbox{\@circlefnt \char\@tempcnta}} +\def\tr@corner@o{% + \kern -\@ovxx \raise -\@ovyy \hbox{\@circlefnt \char\@tempcnta}} +\def\bl@corner@o{% + \kern \@ovxx \raise \@ovyy \hbox{\@circlefnt \char\@tempcnta}} +\def\br@corner@o{% + \kern -\@ovxx \raise \@ovyy \hbox{\@circlefnt \char\@tempcnta}} + +%%% +%%% frame drawing routine +%%% + +\def\@@makeframe#1#2{\@ovxx=0pt \@ovyy=0pt \@ovdx=0pt \@ovdy=0pt + \@yyarg=0 \@negargfalse + \csname @prepframe@#2\endcsname + \if@negarg + \def\@tempa{#1}% + \@tempdima=\@dimenC \advance\@tempdima by -\@halfwidth + \@tempdimb=\@dimenD \advance\@tempdimb by -\@halfwidth + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname bl@corner@#2\endcsname}% + \@tempdima=\@dimenC \advance\@tempdima by \@halfwidth + \advance\@tempdima by \@dimenA + \@tempdimb=\@dimenD \advance\@tempdimb by -\@halfwidth + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname br@corner@#2\endcsname}% + \@tempdima=\@dimenC \advance\@tempdima by -\@halfwidth + \@tempdimb=\@dimenD \advance\@tempdimb by \@halfwidth + \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname tl@corner@#2\endcsname}% + \@tempdima=\@dimenC \advance\@tempdima by \@halfwidth + \advance\@tempdima by \@dimenA + \@tempdimb=\@dimenD \advance\@tempdimb by \@halfwidth + \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname tr@corner@#2\endcsname}% + \fi + \@tempdima=\@dimenC \advance\@tempdima by -\@halfwidth + \@tempdimb=\@dimenD \advance\@tempdimb by -\@halfwidth + \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenB \advance\@tempdima by \@wholewidth + \advance\@tempdima by -2\@ovyy + \advance\@tempdima by -2\@ovdy + \vdashline{#1}}% + \@tempdima=\@dimenC \advance\@tempdima by \@halfwidth + \advance\@tempdima by \@dimenA + \@tempdimb=\@dimenD \advance\@tempdimb by -\@halfwidth + \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenB \advance\@tempdima by \@wholewidth + \advance\@tempdima by -2\@ovyy + \advance\@tempdima by -2\@ovdy + \vdashline{#1}}% + \@tempdima=\@dimenC \advance\@tempdima by -\@halfwidth + \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \@tempdimb=\@dimenD \advance\@tempdimb by -\@halfwidth + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenA \advance\@tempdima by \@wholewidth + \advance\@tempdima by -2\@ovxx + \advance\@tempdima by -2\@ovdx + \hdashline{#1}}% + \@tempdima=\@dimenC \advance\@tempdima by -\@halfwidth + \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \@tempdimb=\@dimenD \advance\@tempdimb by \@halfwidth + \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenA \advance\@tempdima by \@wholewidth + \advance\@tempdima by -2\@ovxx + \advance\@tempdima by -2\@ovdx + \hdashline{#1}}% +} + + +%%% +%%% shadow drawing routines +%%% + +% +% draw shadow corner(s) +% + +\def\@HelpshadowA#1#2{% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdimb by \@dimenB \advance\@tempdimb by -\@shadowstepY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname tr@corner@#2\endcsname}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdimb by -\@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname br@corner@#2\endcsname}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@shadowstepX \advance\@tempdimb by -\@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname bl@corner@#2\endcsname}% +} + +\def\@HelpshadowB#1#2{% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@shadowstepX + \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname tl@corner@#2\endcsname}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdimb by \@shadowstepY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname br@corner@#2\endcsname}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname tr@corner@#2\endcsname}% +} + +\def\@HelpshadowC#1#2{% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX + \advance\@tempdimb by \@shadowstepY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname bl@corner@#2\endcsname}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA \advance\@tempdima by -\@shadowstepX + \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname tr@corner@#2\endcsname}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX + \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname tl@corner@#2\endcsname}% +} + +\def\@HelpshadowD#1#2{% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX + \advance\@tempdimb by -\@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname bl@corner@#2\endcsname}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowstepX \advance\@tempdima by \@dimenA + \advance\@tempdimb by -\@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname br@corner@#2\endcsname}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX + \advance\@tempdimb by -\@shadowstepY \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg + \csname tl@corner@#2\endcsname}% +} + +% +% draw line shadow frame +% + +\def\@helpshadowA#1{% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA + \advance\@tempdimb by \@dimenB \advance\@tempdimb by -\@shadowstepY + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeX + \advance\@tempdima by -\@ovxx + \advance\@tempdima by -\@ovdx + \hdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenB + \advance\@tempdima by \@shadowsizeY + \advance\@tempdima by -\@shadowstepY + \advance\@tempdima by -2\@ovyy + \advance\@tempdima by -2\@ovdy + \vdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@shadowstepX + \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeY + \advance\@tempdima by -\@ovyy + \advance\@tempdima by -\@ovdy + \vdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@shadowstepX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by -\@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenA + \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \advance\@tempdima by -2\@ovxx + \advance\@tempdima by -2\@ovdx + \hdashline{#1}}% +} + +\def\@helpshadowB#1{% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@shadowstepX + \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeY + \advance\@tempdima by -\@ovyy + \advance\@tempdima by -\@ovdy + \vdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@shadowstepX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenA + \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \advance\@tempdima by -2\@ovxx + \advance\@tempdima by -2\@ovdx + \hdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA + \advance\@tempdimb by \@shadowstepY + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeX + \advance\@tempdima by -\@ovxx + \advance\@tempdima by -\@ovdx + \hdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdimb by \@shadowstepY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenB + \advance\@tempdima by \@shadowsizeY + \advance\@tempdima by -\@shadowstepY + \advance\@tempdima by -2\@ovyy + \advance\@tempdima by -2\@ovdy + \vdashline{#1}}% +} + +\def\@helpshadowC#1{% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by \@shadowstepY + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeX + \advance\@tempdima by -\@ovxx + \advance\@tempdima by -\@ovdx + \hdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX + \advance\@tempdimb by \@shadowstepY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenB + \advance\@tempdima by \@shadowsizeY + \advance\@tempdima by -\@shadowstepY + \advance\@tempdima by -2\@ovyy + \advance\@tempdima by -2\@ovdy + \vdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA \advance\@tempdima by -\@shadowstepX + \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeY + \advance\@tempdima by -\@ovyy + \advance\@tempdima by -\@ovdy + \vdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenA + \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \advance\@tempdima by -2\@ovxx + \advance\@tempdima by -2\@ovdx + \hdashline{#1}}% +} + +\def\@helpshadowD#1{% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by -\@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenA + \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \advance\@tempdima by -2\@ovxx + \advance\@tempdima by -2\@ovdx + \hdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowstepX \advance\@tempdima by \@dimenA + \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeY + \advance\@tempdima by -\@ovyy + \advance\@tempdima by -\@ovdy + \vdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX + \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenB + \advance\@tempdima by \@shadowsizeY + \advance\@tempdima by -\@shadowstepY + \advance\@tempdima by -2\@ovyy + \advance\@tempdima by -2\@ovdy + \vdashline{#1}}% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by -\@shadowstepY \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeX + \advance\@tempdima by -\@ovxx + \advance\@tempdima by -\@ovdx + \hdashline{#1}}% +} + +% +% draw solid shadow frame +% + +\def\@helpShadowA#1{% #1 is ignored here + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@shadowstepX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by -\@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \advance\@tempdima by -2\@ovxx + \advance\@tempdima by -2\@ovdx + \@tempdimb=\@shadowsizeY + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@shadowstepX + \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \@tempdimb=\@shadowsizeY \advance\@tempdimb by -\@ovyy + \advance\@tempdimb by -\@ovdy + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA + \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY + \advance\@tempdimb by -\@shadowstepY + \advance\@tempdimb by -2\@ovyy + \advance\@tempdimb by -2\@ovdy + \@tempdima=\@shadowsizeX + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA + \advance\@tempdimb by -\@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY + \advance\@tempdimb by -\@shadowstepY + \@tempdima=\@shadowsizeX \advance\@tempdima by -\@ovxx + \advance\@tempdima by -\@ovdx + \vrule height \@tempdimb width \@tempdima}% +} + +\def\@helpShadowB#1{% #1 is ignored here + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@shadowstepX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \advance\@tempdima by -2\@ovxx + \advance\@tempdima by -2\@ovdx + \@tempdimb=\@shadowsizeY + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@shadowstepX + \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \@tempdimb=\@shadowsizeY \advance\@tempdimb by -\@ovyy + \advance\@tempdimb by -\@ovdy + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA + \advance\@tempdimb by \@shadowstepY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY + \advance\@tempdimb by -\@shadowstepY + \advance\@tempdimb by -2\@ovyy + \advance\@tempdimb by -2\@ovdy + \@tempdima=\@shadowsizeX + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by \@dimenA + \advance\@tempdimb by \@shadowstepY + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY + \advance\@tempdimb by -\@shadowstepY + \@tempdima=\@shadowsizeX \advance\@tempdima by -\@ovxx + \advance\@tempdima by -\@ovdx + \vrule height \@tempdimb width \@tempdima}% +} + +\def\@helpShadowC#1{% #1 is ignored here + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \advance\@tempdima by -2\@ovxx + \advance\@tempdima by -2\@ovdx + \@tempdimb=\@shadowsizeY + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX + \advance\@tempdimb by \@dimenB + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \@tempdimb=\@shadowsizeY \advance\@tempdimb by -\@ovyy + \advance\@tempdimb by -\@ovdy + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX + \advance\@tempdimb by \@shadowstepY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY + \advance\@tempdimb by -\@shadowstepY + \advance\@tempdimb by -2\@ovyy + \advance\@tempdimb by -2\@ovdy + \@tempdima=\@shadowsizeX + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by \@shadowstepY + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY + \advance\@tempdimb by -\@shadowstepY + \@tempdima=\@shadowsizeX \advance\@tempdima by -\@ovxx + \advance\@tempdima by -\@ovdx + \vrule height \@tempdimb width \@tempdima}% +} + + +\def\@helpShadowD#1{% #1 is ignored here + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by -\@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \advance\@tempdima by -2\@ovxx + \advance\@tempdima by -2\@ovdx + \@tempdimb=\@shadowsizeY + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX + \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX + \advance\@tempdima by -\@shadowstepX + \@tempdimb=\@shadowsizeY \advance\@tempdimb by -\@ovyy + \advance\@tempdimb by -\@ovdy + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX + \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy + \advance\@tempdimb by \@ovdy + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY + \advance\@tempdimb by -\@shadowstepY + \advance\@tempdimb by -2\@ovyy + \advance\@tempdimb by -2\@ovdy + \@tempdima=\@shadowsizeX + \vrule height \@tempdimb width \@tempdima}% +% + \@tempdima=\@dimenC \@tempdimb=\@dimenD + \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx + \advance\@tempdima by \@ovdx + \advance\@tempdimb by -\@shadowsizeY + \@@put{\@tempdima}{\@tempdimb}{% + \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY + \advance\@tempdimb by -\@shadowstepY + \@tempdima=\@shadowsizeX \advance\@tempdima by -\@ovxx + \advance\@tempdima by -\@ovdx + \vrule height \@tempdimb width \@tempdima}% +} + +% +% correct shadow position before drawing +% + +\def\@Help@A{\advance\@dimenC \shadowsepX\relax + \advance\@dimenD -\shadowsepY\relax} +\def\@Help@B{\advance\@dimenC \shadowsepX\relax + \advance\@dimenD \shadowsepY\relax} +\def\@Help@C{\advance\@dimenC -\shadowsepX\relax + \advance\@dimenD \shadowsepY\relax} +\def\@Help@D{\advance\@dimenC -\shadowsepX\relax + \advance\@dimenD -\shadowsepY\relax} +% +% correct shadow position after drawing +% + +\def\@help@A{\advance\@dimenC \shadowstepX\relax + \advance\@dimenC \@halfwidth + \advance\@dimenD -\shadowstepY\relax + \advance\@dimenD -\@halfwidth} +\def\@help@B{\advance\@dimenC \shadowstepX\relax + \advance\@dimenC \@halfwidth + \advance\@dimenD \shadowstepY\relax + \advance\@dimenD \@halfwidth} +\def\@help@C{\advance\@dimenC -\shadowstepX\relax + \advance\@dimenC -\@halfwidth + \advance\@dimenD \shadowstepY\relax + \advance\@dimenD \@halfwidth} +\def\@help@D{\advance\@dimenC -\shadowstepX\relax + \advance\@dimenC -\@halfwidth + \advance\@dimenD -\shadowstepY\relax + \advance\@dimenD -\@halfwidth} + +%% +%% shadow types +%% + +% +% pure rectangle +% + +\def\@rectshadow@R#1{% + \csname @Help@\s@corn\endcsname + \@prepdummy + \csname @helpshadow\s@corn\endcsname{#1}% + \csname @help@\s@corn\endcsname} + +\def\@rectshadow@r#1{% + \csname @Help@\s@corn\endcsname + \@prepdummy + \csname @helpShadow\s@corn\endcsname{#1}% + \csname @help@\s@corn\endcsname} + +% +% parquet shadows +% + +\def\@prepshadow@P{\@tempdima=\RectCorner\relax + \ifdim \@tempdima>\@shadowsizeX\relax \@negargfalse \fi + \ifdim \@tempdima>\@shadowsizeY\relax \@negargfalse \fi + \@ovxx=\@tempdima \@ovyy=\@tempdima + \@yyarg=0 \@ovdx=\@halfwidth \@ovdy=\@halfwidth +} + +\def\@rectshadow@P#1{% + \csname @Help@\s@corn\endcsname + \@prepshadow@P + \if@negarg + \def\@tempa{#1}\csname @Helpshadow\s@corn\endcsname{#1}{P}% + \else + \@prepdummy + \@warn@corner + \fi + \csname @helpshadow\s@corn\endcsname{#1}% + \csname @help@\s@corn\endcsname} + +\def\@rectshadow@p#1{% + \csname @Help@\s@corn\endcsname + \@prepshadow@P + \if@negarg + \else + \@prepdummy + \@warn@corner + \fi + \csname @helpShadow\s@corn\endcsname{#1}% + \csname @help@\s@corn\endcsname} + +\def\@rectshadow@B#1{% + \csname @Help@\s@corn\endcsname + \@prepshadow@P + \if@negarg + \def\@tempa{#1}\csname @Helpshadow\s@corn\endcsname{#1}{c}% + \else + \@prepdummy + \@warn@corner + \fi + \csname @helpshadow\s@corn\endcsname{#1}% + \csname @help@\s@corn\endcsname} + +\def\@rectshadow@b#1{% + \csname @Help@\s@corn\endcsname + \@prepshadow@P + \if@negarg + \def\@tempa{#1}\csname @Helpshadow\s@corn\endcsname{#1}{cc}% + \else + \@prepdummy + \@warn@corner + \fi + \csname @helpShadow\s@corn\endcsname{#1}% + \csname @help@\s@corn\endcsname} + +% +% octal shadows +% + +\def\@prepshadow@L{\@negargtrue + \@ovxx=0pt \@ovyy=0pt \@ovdx=0pt \@ovdy=0pt + \ifnum \@RombX>0 \else \@negargfalse \fi + \ifnum \@RombY>0 \else \@negargfalse \fi + \if@negarg + \ifnum \@RombX>\@RombY + \@tempdima=\LineCorner\relax + \@tempdimb=\@tempdima + \multiply\@tempdimb by \@RombY + \divide\@tempdimb by \@RombX + \else + \@tempdimb=\LineCorner\relax + \@tempdima=\@tempdimb + \multiply\@tempdima by \@RombX + \divide\@tempdima by \@RombY + \fi + \ifdim \@tempdima>\@shadowsizeX\relax \@negargfalse \fi + \ifdim \@tempdimb>\@shadowsizeY\relax \@negargfalse \fi + \@ovxx=\@tempdima \@ovyy=\@tempdimb + \ifnum \@RombX>\@RombY + \ifdim \@ovxx<10pt \@negargfalse \fi + \else + \ifdim \@ovyy<10pt \@negargfalse \fi + \fi + \if@negarg + \@ovxx=\@tempdima \@ovyy=\@tempdimb + \@yyarg=0 \@ovdx=\@halfwidth \@ovdy=\@halfwidth + \fi + \fi +} + +\def\@rectshadow@L#1{% + \csname @Help@\s@corn\endcsname + \@prepshadow@L + \if@negarg + \csname @Helpshadow\s@corn\endcsname{#1}{L}% + \else + \@prepdummy + \@warn@corner + \fi + \csname @helpshadow\s@corn\endcsname{#1}% + \csname @help@\s@corn\endcsname} + +% +% oval shadows +% +\def\@prepshadow@O{\@negargtrue + \@tempdima=\RoundCorner\relax + \ifdim \@tempdima>\@shadowsizeX\relax \@negargfalse \fi + \ifdim \@tempdima>\@shadowsizeY\relax \@negargfalse \fi + \if@negarg \@tempdima=2\@tempdima \@getcirc\@tempdima \fi + \if@negarg + \@ovxx=0.5\wd\@tempboxa \@ovyy=\@ovxx \@yyarg=\@tempcnta + \@tempdima=0.5\ht\@tempboxa + \advance\@tempdima by -0.5\dp\@tempboxa + \@ovdx=\@halfwidth \advance\@ovdx by -\@tempdima + \@ovdy=\@ovdx + \fi +} + +\def\@rectshadow@O#1{% + \csname @Help@\s@corn\endcsname + \@prepshadow@O + \if@negarg + \csname @Helpshadow\s@corn\endcsname{#1}{O}% + \else + \@prepdummy + \@warn@corner + \fi + \csname @helpshadow\s@corn\endcsname{#1}% + \csname @help@\s@corn\endcsname} + +\def\@prepshadow@o{% + \@tempdima=\DiskCorner\relax + \get@Disk\@tempdima + \if@negarg + \@yyarg=\@tempcnta \@ovxx=0.5\wd\@tempboxa + \@ovyy=\@ovxx \@ovdx=\@halfwidth \@ovdy=\@ovdx + \ifdim 2\@ovxx>\@shadowsizeX\relax \@negargfalse \fi + \ifdim 2\@ovxx>\@shadowsizeY\relax \@negargfalse \fi + \fi +} + +\def\@rectshadow@o#1{% + \csname @Help@\s@corn\endcsname + \@prepshadow@o + \if@negarg + \csname @Helpshadow\s@corn\endcsname{#1}{o}% + \else + \@prepdummy + \@warn@corner + \fi + \csname @helpShadow\s@corn\endcsname{#1}% + \csname @help@\s@corn\endcsname} + +% +% astro shadows +% + +\def\@prepshadow@A{\@negargtrue + \@tempdima=\RoundCorner\relax + \ifdim \@tempdima>\@shadowsizeX\relax \@negargfalse \fi + \ifdim \@tempdima>\@shadowsizeY\relax \@negargfalse \fi + \if@negarg \@tempdima=2\@tempdima \@getcirc\@tempdima \fi + \if@negarg + \@ovxx=0.5\wd\@tempboxa \@ovyy=\@ovxx \@yyarg=\@tempcnta + \@tempdima=0.5\ht\@tempboxa + \advance\@tempdima by -0.5\dp\@tempboxa + \@ovdx=\@halfwidth \advance\@ovdx by -\@tempdima + \@ovdy=\@ovdx + \fi +} + +\def\@rectshadow@A#1{% + \csname @Help@\s@corn\endcsname + \@prepshadow@A + \if@negarg + \csname @Helpshadow\s@corn\endcsname{#1}{A}% + \else + \@prepdummy + \@warn@corner + \fi + \csname @helpshadow\s@corn\endcsname{#1}% + \csname @help@\s@corn\endcsname} + +% +% set frame/corner parameters +% + +\def\framesep#1{\def\framesepH{#1}% + \def\framesepXM{1.0}\def\framesepYM{1.0}% + \def\framesepXP{1.0}\def\framesepYP{1.0}% + \frameexpand{0pt}% + \ignorespaces} + +\def\frameexpand#1{\def\frameexpandX{#1}% + \def\frameexpandY{#1}% + \ignorespaces} + +\def\shadowsep#1{\def\shadowsepX{#1}% + \def\shadowsepY{#1}% + \ignorespaces} + +\def\shadowsize#1{\def\shadowstepX{#1}\def\shadowstepY{#1}% + \def\shadowsizeX{#1}\def\shadowsizeY{#1}% + \shadowshrink{1.0}\shadowminsize{0pt}% + \ignorespaces} + +\def\shadowminsize#1{\def\shadowminsizeX{#1}% + \def\shadowminsizeY{#1}% + \ignorespaces} + +\def\shadowshrink#1{% + \def\shadowshrinkstepX{#1}\def\shadowshrinkstepY{#1}% + \def\shadowshrinksizeX{#1}\def\shadowshrinksizeY{#1}% + \ignorespaces} + +\def\shadowcorner#1{% + \if A#1\relax \def\s@corn{A}% + \else \if a#1\relax \def\s@corn{A}% + \else \if B#1\relax \def\s@corn{B}% + \else \if b#1\relax \def\s@corn{B}% + \else \if C#1\relax \def\s@corn{C}% + \else \if c#1\relax \def\s@corn{C}% + \else \if D#1\relax \def\s@corn{D}% + \else \if d#1\relax \def\s@corn{D}% + \else \@warning{Illegal shadow corner (#1)}% + \fi\fi\fi\fi\fi\fi\fi\fi + \ignorespaces} + +\def\@setshadowsize{% + \let\@shadowstepX=\shadowstepX + \let\@shadowstepY=\shadowstepY + \let\@shadowsizeX=\shadowsizeX + \let\@shadowsizeY=\shadowsizeY +} + +\def\@updateshadowsize{% + \advance\@dimenA by \@shadowsizeX + \advance\@dimenA by -\@shadowstepX + \advance\@dimenB by \@shadowsizeY + \advance\@dimenB by -\@shadowstepY + \@shrink@size{\@shadowstepX}{\shadowshrinkstepX}% + \@shrink@size{\@shadowstepY}{\shadowshrinkstepY}% + \@shrink@size{\@shadowsizeX}{\shadowshrinksizeX}% + \@shrink@size{\@shadowsizeY}{\shadowshrinksizeY}% + \@tempdima=\@shadowstepX \advance\@tempdima by \shadowminsizeX + \ifdim \@tempdima<\@dimenA \relax \else \@dimenA=0pt \fi + \@tempdima=\@shadowstepY \advance\@tempdima by \shadowminsizeY + \ifdim \@tempdima<\@dimenB \relax \else \@dimenB=0pt \fi +} + +\def\@shrink@size#1#2{% + \@tempdima=#1\relax + \@tempdima=#2\@tempdima\relax + \edef #1{\the\@tempdima}% +} + +%%%%%%% !!!!!!!!!!!!!!!!!!!! %%%%%%%%%%%%% +%%%%%%% These are CIRC macro %%%%%%%%%%%%% +%%%%%%% !!!!!!!!!!!!!!!!!!!! %%%%%%%%%%%%% + +\def\mcircle@scaled{1000} + +\def\define@circlefnt{% + \ifflag@thicklines + \font\m@circlefnt=lcirclew10 scaled \mcircle@scaled + \else + \font\m@circlefnt=lcircle10 scaled \mcircle@scaled + \fi + \let\@circlefnt=\m@circlefnt \ignorespaces} + + +\def\magcircle#1{% + \edef\mcircle@scaled{% + \if 0#1 1000 + \else \if h#1 1095 + \else \if 1#1 1200 + \else \if 2#1 1440 + \else \if 3#1 1728 + \else \if 4#1 2074 + \else \if 5#1 2488 + \else 1000 + \fi\fi\fi\fi\fi\fi\fi + }\define@circlefnt \ignorespaces} + +\def\scaledcircle#1{% + \def\mcircle@scaled{#1}% + \ifnum #1>0 \def\mcircle@scaled{#1}% + \else \def\mcircle@scaled{1000}% + \fi + \define@circlefnt \ignorespaces} + +\def\circle@factor{% + \ifdim \@tempdima>16.383pt + \divide\@tempdima by \mcircle@scaled\relax + \multiply\@tempdima by 1000 + \else + \multiply\@tempdima by 1000 + \divide\@tempdima by \mcircle@scaled\relax + \fi +} + +%%% +%%% These macro are from LaTeX with some corrections +%%% + +% now set thin/thick flag and update circle scaled font +% +\def\thinlines{\flag@thicklinesfalse\define@circlefnt + \let\@linefnt\tenln \let\@circlefnt\tencirc + \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth} + +% now set thin/thick flag and update circle scaled font +% +\def\thicklines{\flag@thicklinestrue\define@circlefnt + \let\@linefnt\tenlnw \let\@circlefnt\tencircw + \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth} + +% calculate \@tempcnta = oval char code, +% \@tempboxa = base char, +% \@tempdima = diameter. +% it is corrected to scale circle font and to indicate +% diameter error: \@negarg = false if diameter is too small +% +\def\@getcirc#1{\@tempdima #1\relax \circle@factor + \advance\@tempdima 2\p@ \@tempcnta\@tempdima + \@tempdima 4\p@ \divide\@tempcnta\@tempdima + \ifnum \@tempcnta >10\relax \@tempcnta 10\relax\fi + \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne \@negargtrue + \else \@warning{Oval segment is too small}\@negargfalse \fi + \multiply\@tempcnta 4\relax + \setbox \@tempboxa \hbox{\@circlefnt \char \@tempcnta}% + \@tempdima \wd \@tempboxa} + +% this macro draws blobs and disks, +% it is corrected to scale circle font +% +\def\@circ#1#2{\get@circcode{#1}% + \advance\@tempcnta #2\relax + \@circlefnt \char\@tempcnta} + + +%%% +%%% New circle macros +%%% + +% calculate \@tempcnta = blob/circle char code +\def\get@circcode#1{\@tempdima=#1\relax + \circle@factor \@negargfalse + \advance\@tempdima by 0.5pt + \@tempcnta=\@tempdima \@tempdima=1pt + \divide\@tempcnta by \@tempdima + \ifnum \@tempcnta>15\relax \@tempcnta=15\relax \fi + \ifnum \@tempcnta>0\relax \advance\@tempcnta by -1 \@negargtrue \fi +} + +% it calculates \@tempcnta = blob char code +% \@tempboxa = base char, +% \@tempdima = diameter. +\def\get@Disk#1{\get@circcode{#1}% + \advance\@tempcnta by 112 + \setbox\@tempboxa\hbox{\@circlefnt \char\@tempcnta}% +} + + +% it calculates \@tempcnta = circle char code +% \@tempboxa = base char, +% \@tempdima = diameter. +\def\get@Circle#1{\get@circcode{#1}% + \advance\@tempcnta by 96 + \setbox\@tempboxa\hbox{\@circlefnt \char\@tempcnta}% +} + +% +% top right segment: \put(10,10){\trcircle{10}} +\def\trcircle#1{\@trcircle{#1\unitlength}} +\def\@trcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@trcircle} +\def\@@trcircle{\sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}% + \@tempdima 0.5\wd \@tempboxa + \@tempdimb 0.5\ht \@tempboxa + \advance \@tempdimb -0.5\dp \@tempboxa + \advance \@tempdima -\@tempdimb + \hbox{\kern \@tempdima + \lower -\@tempdima + \hbox{\usebox\@tempboxa}}% + \sbox{\@tempboxa}{}% + } +% +% bottom right segment: \put(10,10){\brcircle{10}} +\def\brcircle#1{\@brcircle{#1\unitlength}} +\def\@brcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@brcircle} +\def\@@brcircle{\advance\@tempcnta 1\relax + \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}% + \@tempdima 0.5\wd \@tempboxa + \@tempdimb 0.5\ht \@tempboxa + \advance \@tempdimb -0.5\dp \@tempboxa + \advance \@tempdima -\@tempdimb + \advance \@tempdimb 0.5\wd \@tempboxa + \hbox{\kern \@tempdima + \lower \@tempdimb + \hbox{\usebox\@tempboxa}}% + \sbox{\@tempboxa}{}% + } +% +% bottom left segment: \put(10,10){\blcircle{10}} +\def\blcircle#1{\@blcircle{#1\unitlength}} +\def\@blcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@blcircle} +\def\@@blcircle{\advance\@tempcnta 2\relax + \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}% + \@tempdima 0.5\wd \@tempboxa + \@tempdimb 0.5\ht \@tempboxa + \advance \@tempdimb -0.5\dp \@tempboxa + \advance \@tempdimb \@tempdima + \hbox{\kern -\@tempdimb + \lower \@tempdimb + \hbox{\usebox\@tempboxa}}% + \sbox{\@tempboxa}{}% + } +% +% top left segment: \put(10,10){\tlcircle{10}} +\def\tlcircle#1{\@tlcircle{#1\unitlength}} +\def\@tlcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@tlcircle} +\def\@@tlcircle{\advance\@tempcnta 3\relax + \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}% + \@tempdima 0.5\wd \@tempboxa + \@tempdimb 0.5\ht \@tempboxa + \advance \@tempdimb -0.5\dp \@tempboxa + \advance \@tempdimb \@tempdima + \hbox{\kern -\@tempdimb + \lower -\@tempdima + \hbox{\usebox\@tempboxa}}% + \sbox{\@tempboxa}{}% + } +% + +\def\TRcircle#1{\@TRcircle{#1\unitlength}} +\def\@TRcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@TRcircle} +\def\@@TRcircle{\sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}% + \@tempdimb 0.5\ht\@tempboxa \advance\@tempdimb -0.5\dp\@tempboxa + \hbox{\kern -\@tempdimb + \raise -\@tempdimb + \hbox{\usebox\@tempboxa}}% + \sbox{\@tempboxa}{}% +} + +\def\BRcircle#1{\@BRcircle{#1\unitlength}} +\def\@BRcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@BRcircle} +\def\@@BRcircle{\advance\@tempcnta 1\relax + \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}% + \@tempdimb 0.5\ht\@tempboxa \advance\@tempdimb -0.5\dp\@tempboxa + \hbox{\kern -\@tempdimb + \raise -\@tempdimb + \hbox{\usebox\@tempboxa}}% + \sbox{\@tempboxa}{}% +} + +\def\BLcircle#1{\@BLcircle{#1\unitlength}} +\def\@BLcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@BLcircle} +\def\@@BLcircle{\advance\@tempcnta 2\relax + \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}% + \@tempdimb 0.5\ht\@tempboxa \advance\@tempdimb -0.5\dp\@tempboxa + \hbox{\kern -\@tempdimb + \raise -\@tempdimb + \hbox{\usebox\@tempboxa}}% + \sbox{\@tempboxa}{}% +} + + +\def\TLcircle#1{\@TLcircle{#1\unitlength}} +\def\@TLcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@TLcircle} +\def\@@TLcircle{\advance\@tempcnta 3\relax + \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}% + \@tempdimb 0.5\ht\@tempboxa \advance\@tempdimb -0.5\dp\@tempboxa + \hbox{\kern -\@tempdimb + \raise -\@tempdimb + \hbox{\usebox\@tempboxa}}% + \sbox{\@tempboxa}{}% +} + +%%%%%%% !!!!!!!!!!!!!!!!!!!!!! %%%%%%%%%%%%% +%%%%%%% These are VECTOR macro %%%%%%%%%%%%% +%%%%%%% !!!!!!!!!!!!!!!!!!!!!! %%%%%%%%%%%%% + + +% parameters for vector arrows: +% \if@negarg shows that the arrow is rotated by 180^{\circ} +% \@tempb is the relative position of the point of alignment +% \@tempa is the alignment style: +% e - arrow +% b - backside +% m - middle +% E - above arrow +% B - before backside +\def\Vec@e{\def\@tempa{e}\def\@tempb{1.0}\@negargfalse} +\def\Vec@E{\def\@tempa{b}\def\@tempb{1.0}\@negargtrue} +\def\Vec@b{\def\@tempa{b}\def\@tempb{0.0}\@negargfalse} +\def\Vec@B{\def\@tempa{e}\def\@tempb{0.0}\@negargtrue} +\def\Vec@m{\def\@tempa{m}\def\@tempb{0.5}\@negargfalse} +\def\Vec@M{\def\@tempa{m}\def\@tempb{0.5}\@negargtrue} +\def\Vec@x{\def\@tempa{E}\def\@tempb{1.0}\@negargfalse} +\def\Vec@X{\def\@tempa{B}\def\@tempb{1.0}\@negargtrue} +\def\Vec@z{\def\@tempa{B}\def\@tempb{0.0}\@negargfalse} +\def\Vec@Z{\def\@tempa{E}\def\@tempb{0.0}\@negargtrue} + +\def\VectorStyle[#1]#2#3#4{% + \expandafter\edef\csname Vec@#1\endcsname{% + \def\@tempa{#2}\def\@tempb{#3}% + \if b#4 \@negargtrue \else \@negargfalse \fi + }% +} + +\def\@VecA@e{\@tempdimb 0pt} +\def\@VecA@b{\@tempdimb 4pt} +\def\@VecA@m{\@tempdimb 3pt} +\def\@VecA@E{\@tempdimb -2pt} +\def\@VecA@B{\@tempdimb 6pt} + +\def\VectorShiftStyle[#1]#2{% + \expandafter\edef\csname @VecA@#1\endcsname{\@tempdimb #2\relax}% +} + +\def\Vector{\@ifnextchar[{\@Vector}{\@Vector[e]}} + +\def\@Vector[#1](#2,#3)#4{% + \@put{0pt}{0pt}{\line(#2,#3){#4}}% + \@tfor\@tempa:=#1\do{% + \def\@tempb{x} \csname Vec@\@tempa\endcsname + \if\@tempb x\relax \else +% % \@tempdima is the length factor, + \ifnum #2=\z@ \@tempdima #4\unitlength + \else \ifnum #2<\z@ \@tempdima -#4\unitlength + \else \@tempdima #4\unitlength \fi + \divide\@tempdima#2 + \fi +% % \@tempb contains fraction (0 <= \@tempb <= 1), + \@tempdima \@tempb\@tempdima\relax +% % \@tempa is the alignment type -- set \@tempdimb = shift + \@tempdimb 0pt\relax \csname @VecA@\@tempa\endcsname +% % assign square root value to \@tempa + \@VecSqrt{#2}{#3}% +% % correct alignment shift + \@tempdimb \@tempa\@tempdimb\relax + \if@negarg \advance\@tempdima -\@tempdimb + \else \advance\@tempdima \@tempdimb \fi +% % calculate final value + \@tempdimb \@tempdima\relax + \@tempdima #2\@tempdima\relax + \@tempdimb #3\@tempdimb\relax +% % get character + \if@negarg \@xarg -#2\relax \@yarg -#3\relax + \else \@xarg #2\relax \@yarg #3\relax + \fi + \setbox\@linechar\hbox{\@linefnt + \ifnum \@xarg=0 \ifnum \@yarg>0 \char'66\relax + \else \char'77\relax \fi + \else + \ifnum \@xarg<0 \@getlarrow(-\@xarg,-\@yarg)% + \else \@getrarrow(\@xarg,\@yarg)% + \fi\fi}% +% % this is \put(x,y) + \ifnum \@xarg>0 \advance\@tempdima -\wd\@linechar \fi + \ifnum \@yarg>0 \advance\@tempdimb -\ht\@linechar \fi + \@@put{\@tempdima}{\@tempdimb}{\box\@linechar}% + \fi% + }% enddo \@tfor +} + +% assign square root value to \@tempa +\def\@VecSqrt#1#2{\@xarg #1\relax \@yarg #2\relax + \ifnum\@xarg<0 \@xarg -\@xarg \fi + \ifnum\@yarg<0 \@yarg -\@yarg \fi + \ifnum\@xarg<\@yarg \@yyarg \@xarg \relax \@xarg \@yarg \relax + \@yarg \@yyarg \relax \fi + \edef\@tempa{% + \ifcase \@xarg 0.0 + \or \ifcase \@yarg 1.0 + \else 0.70710678 + \fi + \or \ifcase \@yarg 1.0 + \or 0.44721360 + \else 0.35355339 + \fi + \or \ifcase \@yarg 1.0 + \or 0.31622777 + \or 0.27735010 + \else 0.23570226 + \fi + \or \ifcase \@yarg 1.0 + \or 0.24253563 + \or 0.22360680 + \or 0.20000000 + \else 0.17677670 + \fi + \or \ifcase \@yarg 1.0 + \or 0.19611614 + \or 0.18569534 + \or 0.17149859 + \or 0.15617376 + \else 0.14142136 + \fi + \or \ifcase \@yarg 1.0 + \or 0.16439899 + \or 0.15811388 + \or 0.14907120 + \or 0.13867505 + \or 0.12803688 + \else 0.11785113 + \fi + \else 0.0 + \fi}% +} + +%%% +%%% these are LaTeX macro which are corrected +%%% to suite our purposes +%%% + +\def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax +\@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi +\ifnum\@tempcnta<7\relax %% corr: 7 instead of 5 +\@linelen #3\unitlength +\ifnum\@xarg =\z@ \@vvector + \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi +\fi +\else\@badlinearg\fi} + + +\def\@svector{% %% corr: \@sline is moved from this place +\@tempcnta\@yarg \ifnum\@tempcnta <\z@ \@tempcnta -\@tempcnta\fi +\ifnum\@tempcnta <7 %% corr: 7 instead of 5 + \@sline %% corr: \@sline is moved to this place +%% original text was: +% \hskip -\wd\@linechar +% \@upordown\@clnht \hbox{\@linefnt \if@negarg +% \@getlarrow(\@xarg,\@yyarg)\else \@getrarrow(\@xarg,\@yyarg)\fi}% +%% corrected text: + \if@negarg \hskip -\wd\@linechar \fi + \ifnum \@yarg>\z@ \advance\@clnht \ht\@linechar \fi + \setbox\@linechar\hbox{\@linefnt \if@negarg \@getlarrow(\@xarg,\@yyarg)% + \else \@getrarrow(\@xarg,\@yyarg)% + \fi}% + \if@negarg \else \hskip -\wd\@linechar \fi + \ifnum \@yarg>\z@ \advance\@clnht -\ht\@linechar \fi + \@upordown\@clnht \copy\@linechar +\else\@badlinearg\fi} + + +%% calculate (\@tempcnta,\@tempcntb) as correct vector slopes +\def\@corrgetarrow#1#2{\@tempcnta #1\relax \@tempcntb #2\relax +\ifnum #2<\z@ \@tempcntb -\@tempcntb \fi +\ifcase \@tempcnta\relax % no action for x=0 + \or \ifnum \@tempcntb>4 \@tempcntb 4 \fi % action for x=1 + \or \ifnum \@tempcntb=5 \@tempcnta 1 \@tempcntb 3 \fi % action for x=2 + \or \ifnum \@tempcntb=5 \@tempcnta 2 \@tempcntb 3 \fi % action for x=3 + \or \ifnum \@tempcntb=5 \@tempcnta 3 \@tempcntb 4 \fi % action for x=4 + \or \ifcase \@tempcntb\relax % 5,0 + \or \@tempcnta 4% 5,1 + \or \@tempcnta 3 \@tempcntb 1 % 5,2 + \or \@tempcnta 3 \@tempcntb 2 % 5,3 + \or \@tempcnta 4 \@tempcntb 3 % 5,4 + \or \@tempcnta 1 \@tempcntb 1 % 5,5 + \or \@tempcnta 3 \@tempcntb 4 % 5,6 + \fi % action for x=5 + \or \ifnum \@tempcntb=1 \@tempcnta 4 \fi % 6,1 + \ifnum \@tempcntb=5 \@tempcnta 4 \@tempcntb 3 \fi % 6,5 + % action for x=6 +\fi +\ifnum #2<\z@ \@tempcntb -\@tempcntb \fi +} + +\def\@getlarrow(#1,#2){%% this macro is corrected +\@corrgetarrow{#1}{#2}% +\ifnum \@tempcntb=\z@ \@tempcnta'33 + \else \multiply\@tempcnta \sixt@@n + \advance\@tempcnta -9 + \multiply\@tempcntb \tw@ + \ifnum \@tempcntb >\z@ \advance\@tempcnta \@tempcntb + \else \advance\@tempcnta -\@tempcntb + \advance\@tempcnta 64 + \fi +\fi +\char\@tempcnta} + +\def\@getrarrow(#1,#2){%% this macro is corrected +\@corrgetarrow{#1}{#2}% +\ifnum\@tempcntb <\z@ \@tempcntb -\@tempcntb\relax\fi +\ifcase \@tempcntb \@tempcnta'55 + \or \ifnum \@tempcnta<\thr@@ \multiply\@tempcnta 24 + \advance\@tempcnta -6 + \else \ifnum \@tempcnta=\thr@@ \@tempcnta 49 + \else\@tempcnta 58 \fi + \fi + \or \ifnum \@tempcnta<\thr@@ \multiply\@tempcnta 24 + \advance\@tempcnta -\thr@@ + \else \@tempcnta 51 \fi + \or \multiply\@tempcnta \sixt@@n + \advance\@tempcnta -\tw@ + \else \multiply\@tempcnta \sixt@@n + \advance\@tempcnta 7 +\fi +\ifnum #2<\z@ \advance\@tempcnta 64 \fi +\char\@tempcnta} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% The command \pictureunit[percent]{xsize} +% selects the value of \unitlength so that the picture +% which is xsize units in width occupies percent +% width of the paper. By default percent=100 which +% correspond to 90% of the total width of the paper. +% \pictureunit calculates \unitlength corectly also for +% twocolumn mode and inside itemize/enumerate/etc. +% +% Example: +% \pictureunit{75} +% \begin{picture}(120,80) +% ..... +% +% Default percentage value can be changed by +% \renewcommand{\defaultpercent}{50} +% +% Environment mcpicture combines \pictureunit and +% \begin{picture}-\end{picture}. +% +% \begin{Picture}(120,80)(-60,-40) +% ....... +% \end{Picture} +% +% Optional parameter can contain percent width value +% which is used instead of \defaultpercent: +% +% \begin{Picture}[50](120,80)(-60,-40) +% ....... +% \end{Picture} +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\pictureunit{\@ifnextchar[{\mc@scaleunit}{\mc@scaleunit[\defaultpercent]}} + +\def\mc@scaleunit[#1]#2{\@tempdima=0.009\hsize + \@tempdima=#1\@tempdima + \@tempdimb=#2pt + \@divide{\@tempdima}{\@tempdimb}% + {\@tempdima}{\unitlength}% + \unitlength=\@tempdima} + +\newenvironment{Picture}{}{} + +\def\Picture{\@ifnextchar[{\mc@picture}{\mc@picture[\defaultpercent]}} + +\def\mc@picture[#1](#2,#3){% + \mc@scaleunit[#1]{#2}% + \picture(#2,#3)} + +\def\endPicture{\endpicture} + + +% ********************************************************************* +% *** The following macros are taken from PiCTeX with minor changes *** +% ********************************************************************* + +% DIVISION (Does long division of dimension registers) +% ** \@divide{DIVIDEND}{DIVISOR}{RESULT}{default} + +% ** \@divide DIVIDEND [by] DIVISOR [to get] ANSWER +% ** Divides the dimension DIVIDEND by the dimension DIVISOR, placing the +% ** quotient in the dimension register ANSWER. Values are understood to +% ** be in points. E.g. 12.5pt/1.4pt=8.92857pt. +% ** Quotient is accurate to 1/65536pt=2**[-16]pt +% ** |DIVISOR| should be < 2048pt (about 28 inches). +\def\@divide#1#2#3#4{% +\ifdim #2=\z@ #3=#4\relax +\else + \@dimenB=#1% ** dimB holds current remainder (r) + \@dimenC=#2% ** dimC holds divisor (d) + \@dimenD=\@dimenB% ** dimD holds quotient q=r/d for this + \divide \@dimenD \@dimenC% ** step, in units of scaled pts + \@dimenA=\@dimenD% ** dimA eventually holds answer (a) + \multiply\@dimenD \@dimenC% ** r <-- r - dq + \advance\@dimenB -\@dimenD% ** First step complete. Have integer part +% ** of a, and corresponding remainder. + \@dimenD=\@dimenC% ** Temporarily use dimD to hold |d| + \ifdim\@dimenD<\z@ \@dimenD=-\@dimenD + \fi + \ifdim\@dimenD<64pt% ** Branch on the magnitude of |d| + \@divstep[256]\@divstep[256]% + \else +% ** The following code handles divisors d with +% ** (1) .88in = 64pt <= d < 256pt = 3.54in +% ** (2) 3.54in = 256pt <= d < 2048pt = 28.34in +% ** Anything bigger than that may result in an overflow condition. + \ifdim\@dimenD<256pt + \@divstep[64]\@divstep[32]\@divstep[32]% + \else + \@divstep[8]\@divstep[8]\@divstep[8]\@divstep[8]\@divstep[8]% + \@dimenA=2\@dimenA + \fi +% ** For our purposes, we should never even see case (2). + \fi + #3=\@dimenA +\fi\ignorespaces} + + +% ** The following macro does the real long division work. +\def\@divstep[#1]{% ** #1 = "B" + \@dimenB=#1\@dimenB% ** r <-- B*r + \@dimenD=\@dimenB% ** dimD holds quotient q=r/d for this + \divide \@dimenD by \@dimenC% ** step, in units of scaled pts + \@dimenA=#1\@dimenA% ** a <-- B*a + q + \advance\@dimenA by \@dimenD% + \multiply\@dimenD by \@dimenC% ** r <-- r - dq + \advance\@dimenB by -\@dimenD} + +% ************************************************ +% ******** End of PiCTeX division macros ********* +% ************************************************ + + +%%%%%%% !!!!!!!!!!!!!!!!!! %%%%%%%%%%%%% +%%%%%%% Default style data %%%%%%%%%%%%% +%%%%%%% !!!!!!!!!!!!!!!!!! %%%%%%%%%%%%% + +\def\defaultpercent{100} + +\thinlines + +\def\DiskCorner{5pt} +\def\RoundCorner{5pt} +\def\LineCorner{10pt} +\def\RectCorner{5pt} + +\framesep{4pt} +\shadowsep{1pt} +\shadowsize{5pt} +\shadowshrink{1} + +\shadowcorner{A} + +\rombboxstyle(2,1,2pt) + +% +% save updated LaTeX macro +% + + +% +% switch two modes +% + +\let\grf@thinlines=\thinlines +\let\grf@thicklines=\thicklines +\let\grf@@getcirc=\@getcirc +\let\grf@@circ=\@circ +\let\grf@vector=\vector +\let\grf@@svector=\@svector +\let\grf@@getlarrow=\@getlarrow +\let\grf@@gerlarrow=\@getrarrow + + +\def\setlatexmacro{% + \let\thinlines=\ltx@thinlines + \let\thicklines=\ltx@thicklines + \let\@getcirc=\ltx@@getcirc + \let\@circ=\ltx@@circ + \let\vector=\ltx@vector + \let\@svector=\ltx@@svector + \let\@getlarrow=\ltx@@getlarrow + \let\@gerlarrow=\ltx@@getrarrow + \ignorespaces +} + +\def\settestmacro{% + \let\thinlines=\grf@thinlines + \let\thicklines=\grf@thicklines + \let\@getcirc=\grf@@getcirc + \let\@circ=\grf@@circ + \let\vector=\grf@vector + \let\@svector=\grf@@svector + \let\@getlarrow=\grf@@getlarrow + \let\@gerlarrow=\grf@@getrarrow + \ignorespaces +} + +% +\catcode`@=\oldatcatcode +% + diff --git a/macros/latex/contrib/pmgraph/pmgraph.tex b/macros/latex/contrib/pmgraph/pmgraph.tex new file mode 100644 index 0000000000..a3450c5551 --- /dev/null +++ b/macros/latex/contrib/pmgraph/pmgraph.tex @@ -0,0 +1,1014 @@ +%% The following copyright notice and licensing information was added +%% by Clea F. Rees on behalf of Alexander Berdnikov on 2008/11/03. +%% +%% Copyright 1996 Alexander Berdnikov, Olga Grineva +%% +%% This file is part of pmgraph. +%% +%% pmgraph is free software: you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% pmgraph is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +%% See the GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with pmgraph. If not, see . + +\documentstyle[12pt,a4,pmgraph]{article} + +\title{{\sc pmgraph.sty}: some useful macros which extends +the \LaTeX{} environment {\tt picture}\\[0.5\baselineskip] +\Large Version 1.0} + +\author{ +\begin{minipage}{0.4\textwidth} +\begin{center} A.S.Berdnikov\\{\tt berd{\sl @}ianin.spb.su} \end{center} +\end{minipage} +\hfill +\begin{minipage}{0.4\textwidth} +\begin{center} O.A.Grineva\\{\tt olga{\sl @}ianin.spb.su} \end{center} +\end{minipage} +} + +\date{} + +\def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC\spacefactor1000 } +\font\manual=logo10 at 12pt +\def\MF{{\manual META}\-{\manual FONT}\spacefactor1000 } +\def\AW{Addison\kern.1em-\penalty 0pt \hskip 0pt Wesley} +\def\CandT{{\sl Computers \& Typesetting}} +\def\TUB{{\sl TUGboat\/}} + +\newcommand{\bs}{\char '134 } % char \ +\newcommand{\lb}{\char '173 } % char { +\newcommand{\rb}{\char '175 } % char } +\makeatletter +\def\hackersmile{\@ifnextchar[{\@hackersmile}{\@hackersmile[10]}} +\def\@hackersmile[#1]{\hbox{% + \unitlength=1pt\relax + \unitlength=#1\unitlength + \divide\unitlength by 10\relax + \thicklines + \raise -3\unitlength \hbox{% + \begin{picture}(12,12)(-6,-6) + \put(0,0){\circle{10}} + \put(-2,1.75){\circle*{1}} + \put(2,1.75){\circle*{1}} + \thicklines + \put(-2.75,3){\line(1,0){1.5}} + \put(2.75,3){\line(-1,0){1.5}} + \put(0,-1){\line(0,1){3}} + \put(-2.5,-2.5){\line(1,0){5}} + \put(-2.5,-2.5){\line(0,1){1}} + \put(2.5,-2.5){\line(0,1){1}} + \end{picture}% +}}} +\makeatother + +\newcommand{\pmg}{{\sc pmgraph}} +\newcommand{\pmgs}{{\sc pmgraph.sty}} + +\begin{document} +\maketitle + + +The original \TeX/\LaTeX{} possibilities to create +pictures are relatively poor, and there are +many extensions ({\tt epic/eepic}, {\tt pictex}, {\tt drawtex}, +{\tt xypic}, {\tt mfpic}, etc.) which were created to extend +its possibilities to a higher level. The macro \pmgs{} +({\em poor-man-graphics}) which are +described here are not so general as the ones cited +above. They manupulate with the pseudo-graphical +fonts which are used by generic \LaTeX{} without additional +extensions --- mainly because the variations of +\PiC\TeX{}, \MF{} and new graphical font +themes are already realized by other authors +and on sufficiently higher level. +To some extend the purpose of our work was to see +how far it is possible to move in the development of new +useful graphical primitives for \LaTeX{} {\em without} +the investment of the external graphical tools. + +The style file \pmgs{} includes the following features: +\begin{itemize} +\item +the vectors with a set of slopes which is +as general as the line slopes implemented in \LaTeX; +\item +the vectors with an arrow at the beginning, +at the middle or at the end of vector with various orientations +of the arrow; +\item +the circles and circular arcs with nearly arbitrary diameter +using magnified {\tt circle} and {\tt circlew} \LaTeX{} fonts; +\item +the 1/4 circular arcs correctly positioned +at the centrum or at the corner; +\item +extended set of frames which include various +corner style and the optional multiple frame shadows +with a variety of styles; +\item +tools which enable the user to extend the variety of +frame styles and the shadow styles as far as his/her +fantasy allows it; +\item +automatic calculation of the picture size in terms +of the current text width --- including the {\tt picture} +inserted inside list environments. +\end{itemize} +Even not very complicated, these macros appears to +be useful in our work, and it seems that they can be +useful for other \TeX-users too. + +\section*{Vectors} + +The number of angles for inclined lines which can be used +in \LaTeX{} is limited to great extend, but the number of +angles for {\em vectors} is limited even more. +The variety of vectors can be extended if instead of the +{\em strictly} inclined arrows at the end of the inclined +line the arrow with the {\em approximate} inclination is added. +Corresponding changes are incorporated in \pmg{} where +the relation between strict inclinations and approximate +inclinations are shown in Table~\ref{Tab1}. The corrections require +the modifications of the internal \LaTeX{} commands +{\tt\bs{}@svector}, {\tt\bs{}@getlarrow}, {\tt\bs{}@getrarrow} +and the command {\tt\bs{}vector} itself. As a result the command +{\tt\bs{}vector} starts to draw the vectors for all inclinations +valid for \LaTeX{} lines as it is shown on Fig.~\ref{FigA}. +The vectors are not so ideal as it is required by \TeX{} standards, +but the results are acceptable for all inclinations except $(6,1)$. + +\begin{figure} +\centerline{% +\hfill +\begin{Picture}[23](600,600) +\put(300,300){\vector(1,0){300}} +\put(300,300){\vector(-1,0){300}} +\put(300,300){\vector(0,1){300}} +\put(300,300){\vector(0,-1){300}} +\put(300,300){\vector(1,1){300}} +\put(300,300){\vector(1,2){150}} +\put(300,300){\vector(1,3){100}} +\put(300,300){\vector(1,4){75}} +\put(300,300){\line(1,5){60}} +\put(300,300){\line(1,6){50}} +\put(300,300){\vector(2,1){300}} +\put(300,300){\vector(2,3){200}} +\put(300,300){\line(2,5){120}} +\put(300,300){\vector(3,1){300}} +\put(300,300){\vector(3,2){300}} +\put(300,300){\vector(3,4){225}} +\put(300,300){\line(3,5){180}} +\put(300,300){\vector(4,1){300}} +\put(300,300){\vector(4,3){300}} +\put(300,300){\line(4,5){240}} +\put(300,300){\line(5,1){300}} +\put(300,300){\line(5,2){300}} +\put(300,300){\line(5,3){300}} +\put(300,300){\line(5,4){300}} +\put(300,300){\line(5,6){250}} +\put(300,300){\line(6,1){300}} +\put(300,300){\line(6,5){300}} +\put(300,300){\vector(1,-1){300}} +\put(300,300){\vector(1,-2){150}} +\put(300,300){\vector(1,-3){100}} +\put(300,300){\vector(1,-4){75}} +\put(300,300){\line(1,-5){60}} +\put(300,300){\line(1,-6){50}} +\put(300,300){\vector(2,-1){300}} +\put(300,300){\vector(2,-3){200}} +\put(300,300){\line(2,-5){120}} +\put(300,300){\vector(3,-1){300}} +\put(300,300){\vector(3,-2){300}} +\put(300,300){\vector(3,-4){225}} +\put(300,300){\line(3,-5){180}} +\put(300,300){\vector(4,-1){300}} +\put(300,300){\vector(4,-3){300}} +\put(300,300){\line(4,-5){240}} +\put(300,300){\line(5,-1){300}} +\put(300,300){\line(5,-2){300}} +\put(300,300){\line(5,-3){300}} +\put(300,300){\line(5,-4){300}} +\put(300,300){\line(5,-6){250}} +\put(300,300){\line(6,-1){300}} +\put(300,300){\line(6,-5){300}} +\put(300,300){\vector(-1,1){300}} +\put(300,300){\vector(-1,2){150}} +\put(300,300){\vector(-1,3){100}} +\put(300,300){\vector(-1,4){75}} +\put(300,300){\line(-1,5){60}} +\put(300,300){\line(-1,6){50}} +\put(300,300){\vector(-2,1){300}} +\put(300,300){\vector(-2,3){200}} +\put(300,300){\line(-2,5){120}} +\put(300,300){\vector(-3,1){300}} +\put(300,300){\vector(-3,2){300}} +\put(300,300){\vector(-3,4){225}} +\put(300,300){\line(-3,5){180}} +\put(300,300){\vector(-4,1){300}} +\put(300,300){\vector(-4,3){300}} +\put(300,300){\line(-4,5){240}} +\put(300,300){\line(-5,1){300}} +\put(300,300){\line(-5,2){300}} +\put(300,300){\line(-5,3){300}} +\put(300,300){\line(-5,4){300}} +\put(300,300){\line(-5,6){250}} +\put(300,300){\line(-6,1){300}} +\put(300,300){\line(-6,5){300}} +\put(300,300){\vector(-1,-1){300}} +\put(300,300){\vector(-1,-2){150}} +\put(300,300){\vector(-1,-3){100}} +\put(300,300){\vector(-1,-4){75}} +\put(300,300){\line(-1,-5){60}} +\put(300,300){\line(-1,-6){50}} +\put(300,300){\vector(-2,-1){300}} +\put(300,300){\vector(-2,-3){200}} +\put(300,300){\line(-2,-5){120}} +\put(300,300){\vector(-3,-1){300}} +\put(300,300){\vector(-3,-2){300}} +\put(300,300){\vector(-3,-4){225}} +\put(300,300){\line(-3,-5){180}} +\put(300,300){\vector(-4,-1){300}} +\put(300,300){\vector(-4,-3){300}} +\put(300,300){\line(-4,-5){240}} +\put(300,300){\line(-5,-1){300}} +\put(300,300){\line(-5,-2){300}} +\put(300,300){\line(-5,-3){300}} +\put(300,300){\line(-5,-4){300}} +\put(300,300){\line(-5,-6){250}} +\put(300,300){\line(-6,-1){300}} +\put(300,300){\line(-6,-5){300}} +\end{Picture} +\hfill +\begin{Picture}[23](600,600) +\put(300,300){\vector(1,0){300}} +\put(300,300){\vector(-1,0){300}} +\put(300,300){\vector(0,1){300}} +\put(300,300){\vector(0,-1){300}} +\put(300,300){\vector(1,1){300}} +\put(300,300){\vector(1,2){150}} +\put(300,300){\vector(1,3){100}} +\put(300,300){\vector(1,4){75}} +\put(300,300){\vector(1,5){60}} +\put(300,300){\vector(1,6){50}} +\put(300,300){\vector(2,1){300}} +\put(300,300){\vector(2,3){200}} +\put(300,300){\vector(2,5){120}} +\put(300,300){\vector(3,1){300}} +\put(300,300){\vector(3,2){300}} +\put(300,300){\vector(3,4){225}} +\put(300,300){\vector(3,5){180}} +\put(300,300){\vector(4,1){300}} +\put(300,300){\vector(4,3){300}} +\put(300,300){\vector(4,5){240}} +\put(300,300){\vector(5,1){300}} +\put(300,300){\vector(5,2){300}} +\put(300,300){\vector(5,3){300}} +\put(300,300){\vector(5,4){300}} +\put(300,300){\vector(5,6){250}} +\put(300,300){\vector(6,1){300}} +\put(300,300){\vector(6,5){300}} +\put(300,300){\vector(1,-1){300}} +\put(300,300){\vector(1,-2){150}} +\put(300,300){\vector(1,-3){100}} +\put(300,300){\vector(1,-4){75}} +\put(300,300){\vector(1,-5){60}} +\put(300,300){\vector(1,-6){50}} +\put(300,300){\vector(2,-1){300}} +\put(300,300){\vector(2,-3){200}} +\put(300,300){\vector(2,-5){120}} +\put(300,300){\vector(3,-1){300}} +\put(300,300){\vector(3,-2){300}} +\put(300,300){\vector(3,-4){225}} +\put(300,300){\vector(3,-5){180}} +\put(300,300){\vector(4,-1){300}} +\put(300,300){\vector(4,-3){300}} +\put(300,300){\vector(4,-5){240}} +\put(300,300){\vector(5,-1){300}} +\put(300,300){\vector(5,-2){300}} +\put(300,300){\vector(5,-3){300}} +\put(300,300){\vector(5,-4){300}} +\put(300,300){\vector(5,-6){250}} +\put(300,300){\vector(6,-1){300}} +\put(300,300){\vector(6,-5){300}} +\put(300,300){\vector(-1,1){300}} +\put(300,300){\vector(-1,2){150}} +\put(300,300){\vector(-1,3){100}} +\put(300,300){\vector(-1,4){75}} +\put(300,300){\vector(-1,5){60}} +\put(300,300){\vector(-1,6){50}} +\put(300,300){\vector(-2,1){300}} +\put(300,300){\vector(-2,3){200}} +\put(300,300){\vector(-2,5){120}} +\put(300,300){\vector(-3,1){300}} +\put(300,300){\vector(-3,2){300}} +\put(300,300){\vector(-3,4){225}} +\put(300,300){\vector(-3,5){180}} +\put(300,300){\vector(-4,1){300}} +\put(300,300){\vector(-4,3){300}} +\put(300,300){\vector(-4,5){240}} +\put(300,300){\vector(-5,1){300}} +\put(300,300){\vector(-5,2){300}} +\put(300,300){\vector(-5,3){300}} +\put(300,300){\vector(-5,4){300}} +\put(300,300){\vector(-5,6){250}} +\put(300,300){\vector(-6,1){300}} +\put(300,300){\vector(-6,5){300}} +\put(300,300){\vector(-1,-1){300}} +\put(300,300){\vector(-1,-2){150}} +\put(300,300){\vector(-1,-3){100}} +\put(300,300){\vector(-1,-4){75}} +\put(300,300){\vector(-1,-5){60}} +\put(300,300){\vector(-1,-6){50}} +\put(300,300){\vector(-2,-1){300}} +\put(300,300){\vector(-2,-3){200}} +\put(300,300){\vector(-2,-5){120}} +\put(300,300){\vector(-3,-1){300}} +\put(300,300){\vector(-3,-2){300}} +\put(300,300){\vector(-3,-4){225}} +\put(300,300){\vector(-3,-5){180}} +\put(300,300){\vector(-4,-1){300}} +\put(300,300){\vector(-4,-3){300}} +\put(300,300){\vector(-4,-5){240}} +\put(300,300){\vector(-5,-1){300}} +\put(300,300){\vector(-5,-2){300}} +\put(300,300){\vector(-5,-3){300}} +\put(300,300){\vector(-5,-4){300}} +\put(300,300){\vector(-5,-6){250}} +\put(300,300){\vector(-6,-1){300}} +\put(300,300){\vector(-6,-5){300}} +\end{Picture} +\hfill +} +\caption{\LaTeX{} and \pmg{} vectors\label{FigA}} +\end{figure} + +\begin{table} +\begin{center} +\begin{tabular}{||c|c||c|c||c|c||} +\hline +$(1,1)$ & $(1,1)$ & $(4,1)$ & $(4,1)$ & $(5,3)$ & $(3,2)$ \\ +\hline +$(2,1)$ & $(2,1)$ & $(4,3)$ & $(4,3)$ & $(5,4)$ & $(4,3)$ \\ +\hline +$(3,1)$ & $(3,1)$ & $(5,1)$ & $(4,1)$ & $(6,1)$ & $(4,1)$ \\ +\hline +$(3,2)$ & $(3,2)$ & $(5,2)$ & $(3,1)$ & $(6,5)$ & $(4,3)$ \\ +\hline +\end{tabular} +\end{center} +\caption{Relation between line slopes +and approximate vector slopes\label{Tab1}} +\end{table} + +\LaTeX{} allows to put an arrow just at the end of the vector. +The command \verb?\Vector? enables to put +along the vector {\em arbitrary} arrows with different orientation +(see Fig.~\ref{TwoVec}). The predefined arrow styles +assign a letter to each position and orientation +of the arrow along the {\tt Vector}. + +\begin{figure} +\centerline{\fbox{\begin{Picture}[50](300,40) +\put(20,5){\Vector[bme](1,0){100}} +\put(20,30){\Vector[BME](1,0){100}} +\put(170,5){\Vector[xZmM](1,0){100}} +\put(170,30){\Vector[XzmM](1,0){100}} +\end{Picture}}} +\caption{Multi-arrow vectors\label{TwoVec}} +\end{figure} + +The arrows shown on Fig.~\ref{TwoVec} are drawn by the commands +\begin{quote} +\begin{verbatim} +\begin{picture}(300,40) +\put(20,5){\Vector[bme](1,0){100}} +\put(20,30){\Vector[BME](1,0){100}} +\put(170,5){\Vector[xmMZ](1,0){100}} +\put(170,30){\Vector[XmMz](1,0){100}} +. . . . . . . . +\end{verbatim} +\end{quote} + +Letter {\tt e} corresponds to normally oriented arrow +at the end of vector, {\tt E} --- to reverse oriented arrow, +{\tt b} and {\tt B} --- to (normally and reverse oriented) arrows at the +beginning of the vector, {\tt m} and {\tt M} --- to the arrows +at the middle, etc. +The list of letters as the optional parameter produces +the set of arrows along the {\tt Vector}. +It is possible to create user-defined styles of arrows using the commands +\verb?\VectorStyle? and \verb?\VectorShiftStyle? (where the parameters +in square brackets are {\em obligatory}, not {\em optional}): +\begin{itemize} +\item[] {\tt\bs{}VectorStyle[{\em style-char}]\{{\em shift-char}\}\{{\em position}\}\{{\em orientation}\}} +\begin{itemize} +\item {\em style-char} is the character which is assigned to vector style; +\item {\em shift-char} is the character which defines the relative shift + of the arrow with respect to {\em position} --- see command + {\tt\bs{VectorShiftStyle}} below; +\item {\em position} is the real value which defines the relative position + of the arrow along the vector (0.0 means starting point of the vector, + 1.0 means end point of the vector) which usually is in a range + $0..1$ but can be greater 1 or less 0 as well; +\item {\em orientation} is the character which defines the orientation + of the arrow with respect to the standard direction of the vecrtor: + {\tt b} means {\em backward} direction, {\tt f} (or any other + character) means forward direction. +\end{itemize} +\item[] {\tt\bs{}VectorShiftStyle[{\em style-char}]\{{\em shift}\}} +\begin{itemize} +\item {\em style-char} is the character which is assigned to vector-shift-style; +\item {\em shift} is the relative shift in {\tt pt} of the arrow along + the arrow direction with respect to the positioning point + (it is necessary to note that the length of the arrow body in \LaTeX{} + is equal to {\tt 4pt}). +\end{itemize} +\end{itemize} +Examples: +\begin{itemize} +\item standard {\em vector-shift-styles}: +\begin{description} +\item[\quad{\tt\bs{}VectorShiftStyle[e]\{0pt\}}] + --- style `{\tt e}' means that + the end of the arrow is positioned strictly at the point, + specified by the parameter {\em position}; +\item[\quad{\tt\bs{}VectorShiftStyle[b]\{4pt\}}] + --- style `{\tt b}' means that + the backside of the arrow is positioned at the point, + specified by the parameter {\em position}; +\item[\quad{\tt\bs{}VectorShiftStyle[m]\{3pt\}}] + --- style `{\tt m}' means that + the middle of the arrow body is positioned at the point, + specified by the parameter {\em position}; +\item[\quad{\tt\bs{}VectorShiftStyle[E]\{-2pt\}}] + --- style `{\tt E}' means that + the end of the arrow is positioned a little bit before + (i.e., by {\tt 2pt}) the point, + specified by the parameter {\em position}; +\item[\quad{\tt\bs{}VectorShiftStyle[B]\{6pt\}}] + --- style `{\tt B}' means that + the backside of the arrow is positioned a little bit after + (i.e., by {\tt 2pt}) the point, + specified by the parameter {\em position}. +\end{description} +\item standard {\em vector-styles}: +\begin{description} +\item[\quad{\tt\bs{}VectorStyle[e]\{e\}\{1.0\}\{f\}}] + --- style `{\tt e}' means that + the end of the arrow is positioned at the end of the vector, + and its orientation is along the vector orientation; +\item[\quad{\tt\bs{}VectorStyle[E]\{b\}\{1.0\}\{b\}}] + --- style `{\tt E}' means that + the backside of the arrow is positioned at the end of the vector, + and its orientation is rotated by $180^{\circ}$ with + respect to the vector orientation; +\item[\quad{\tt\bs{}VectorStyle[b]\{b\}\{0.0\}\{f\}}] + --- style `{\tt b}' means that + the backside of the arrow is positioned at the beginning of the vector, + and its orientation is along the vector orientation; +\item[\quad{\tt\bs{}VectorStyle[B]\{e\}\{0.0\}\{b\}}] + --- style `{\tt B}' means that + the end of the arrow is positioned at the beginning of the vector, + and its orientation is rotated by $180^{\circ}$ with + respect to the vector orientation; +\item[\quad{\tt\bs{}VectorStyle[m]\{m\}\{0.0\}\{f\}}] + --- style `{\tt m}' means that + the middle of the arrow body is positioned at the middle of the vector, + and its orientation is along the vector orientation; +\item[\quad{\tt\bs{}VectorStyle[M]\{m\}\{0.0\}\{b\}}] + --- style `{\tt M}' means that + the middle of the arrow body is positioned at the middle of the vector, + and its orientation is rotated by $180^{\circ}$ with + respect to the vector orientation; +\item[\quad{\tt\bs{}VectorStyle[x]\{E\}\{1.0\}\{f\}}] + --- style `{\tt x}' means that + the end of the arrow is positioned a little bit before + the end of the vector, + and its orientation is along the vector orientation; +\item[\quad{\tt\bs{}VectorStyle[X]\{B\}\{1.0\}\{b\}}] + --- style `{\tt X}' means that + the backside of the arrow is positioned a little bit before + the end of the vector, + and its orientation is rotated by $180^{\circ}$ with + respect to the vector orientation; +\item[\quad{\tt\bs{}VectorStyle[z]\{B\}\{0.0\}\{f\}}] + --- style `{\tt z}' means that + the backside of the arrow is positioned a little bit after + the beginning of the vector, + and its orientation is along the vector orientation; +\item[\quad{\tt\bs{}VectorStyle[Z]\{E\}\{0.0\}\{b\}}] + --- style `{\tt Z}' means that + the end of the arrow body is positioned a little bit after + the beginning of the vector, + and its orientation is rotated by $180^{\circ}$ with + respect to the vector orientation. +\end{description} +\end{itemize} + +\section*{Circles} + +The range of the diameters for circles and disks +(black circular blobs) available in \LaTeX{} is very restricted. +It can be enlarged by using the magnified pseudo-graphical \LaTeX{} fonts +if the User does not have something better at his/her disposal +like {\tt curves.sty}, \PiC\TeX{} or MF\PiC. +The disadvantage of this method is that the width +of the lines is magnified too which is inconsistent +with the rigorous \TeX{} accuracy requirements, +but for {\em poor man graphics} these circles +can be satisfactory. + +The scaling of circular fonts is performed by the commands +\begin{quote} +{\tt\bs{}scaledcircle\lb{\em factor}\rb} +\\ +{\tt\bs{}magcircle\lb{\em magstep}\rb} +\end{quote} +which are indentical to \TeX{} commands +\begin{quote} +{\tt\bs{}font ... scaled {\em factor}} +\\ +{\tt\bs{}font ... scaled \bs{}magstep {\em magstep}} +\end{quote} +The valid {\em magstep} values are {\tt 0}, {\tt h}, +{\tt 1}, {\tt 2}, {\tt 3}, {\tt 4}, {\tt 5}. +The values {\em factor}=1000 and {\em magstep}=0 +correspond to {\em one-to-one} magnification. +The circle magnification +like other \TeX{} commands returns to its +previous value outside the group inside which it was changed. + +\begin{figure} +\def\myframe#1{\begin{picture}(0,0) + \put(0,#1){\line(1,0){#1}} + \put(0,#1){\line(-1,0){#1}} + \put(0,-#1){\line(1,0){#1}} + \put(0,-#1){\line(-1,0){#1}}% + \put(#1,0){\line(0,1){#1}}% + \put(#1,0){\line(0,-1){#1}}% + \put(-#1,0){\line(0,1){#1}}% + \put(-#1,0){\line(0,-1){#1}}% + \end{picture}} +\begin{center} +\begin{Picture}[50](200,100)(-100,-50) +\unitlength=1pt +\put(-50,0){\thicklines\circle{80}} +\put(-50,0){\myframe{40}} +\put(50,0){\scaledcircle{2000}\circle{80}} +\put(50,0){\myframe{40}} +\end{Picture} +\end{center} +\caption{Magnified circles\label{Fig1}} +\end{figure} + +To calculate properly the circle character code +after the magnification it was necessary to redefine +some internal \LaTeX{} commands like +{\tt\bs{}@getcirc} and {\tt\bs{}@circ}. To reflect +in magnified fonts the changes of the line thickness, +the commands {\tt\bs{}thinlines} and {\tt\bs{}thicklines} +are corrected also. + +The example on Fig.~\ref{Fig1} is produced by +\begin{quote} +\begin{verbatim} +\setlength{\unitlength}{1pt} +\begin{picture}(200,100)(-100,-50) +\put(-50,0){\thicklines\circle{80}} +\put(-50,0){\squareframe{40}} +\magcircle{4} +\put(50,0){\thinlines\circle{80}} +\put(50,0){\squareframe{40}} +\end{picture} +\end{verbatim} +\end{quote} +where {\tt\bs{}squareframe} is the user-defined command which draws +the square with the specified side and the centrum at (0,0). +It shows how the usage of the magnified circles enables to overcome +the upper limit 40pt of the diameter of the \LaTeX{} cirles. +It is necessary to note that +the thickness of the {\tt\bs{}thinline} circles +after magnification with +{\tt\bs{}magcircle\lb{}4\rb} +corresponds approximately to the thickness +of the ordinary {\tt\bs{}thickline} circles +($\hbox{\tt\bs{}magstep4}\approx2000$). + +\bigskip + +\begin{figure} +\begin{center} +\begin{Picture}[50](200,60)(-100,-30) +\put(-60,10){\thicklines\tlcircle{50}} +\put(-60,10){\circle*{1}} +\put(-60,10){\line(-1,0){25}} +\put(-60,10){\line(0,1){25}} +\put(-60,-10){\thicklines\blcircle{50}} +\put(-60,-10){\circle*{1}} +\put(-60,-10){\line(-1,0){25}} +\put(-60,-10){\line(0,-1){25}} +\put(-40,10){\thicklines\trcircle{50}} +\put(-40,10){\circle*{1}} +\put(-40,10){\line(1,0){25}} +\put(-40,10){\line(0,1){25}} +\put(-40,-10){\thicklines\brcircle{50}} +\put(-40,-10){\circle*{1}} +\put(-40,-10){\line(1,0){25}} +\put(-40,-10){\line(0,-1){25}} +\put(40,10){\thicklines\BRcircle{50}} +\put(40,10){\circle*{1}} +\put(40,10){\line(-1,0){25}} +\put(40,10){\line(0,1){25}} +\put(40,-10){\thicklines\TRcircle{50}} +\put(40,-10){\circle*{1}} +\put(40,-10){\line(-1,0){25}} +\put(40,-10){\line(0,-1){25}} +\put(60,10){\thicklines\BLcircle{50}} +\put(60,10){\circle*{1}} +\put(60,10){\line(1,0){25}} +\put(60,10){\line(0,1){25}} +\put(60,-10){\thicklines\TLcircle{50}} +\put(60,-10){\circle*{1}} +\put(60,-10){\line(1,0){25}} +\put(60,-10){\line(0,-1){25}} +\end{Picture} +\end{center} +\caption{$90^{\circ}$ circular segments\label{Fig2}} +\end{figure} + +Additional macro enable to +draw $90^{\circ}$ qu\-a\-ters of the circles explicitly without +tricky refinement of the parameters of the command {\tt\bs{}oval}: +\begin{quote} +{\tt\bs{}trcircle\lb{\em diam}\rb} $\longrightarrow$ {\tt\bs{}oval[tr]...} +\\ +{\tt\bs{}brcircle\lb{\em diam}\rb} $\longrightarrow$ {\tt\bs{}oval[br]...} +\\ +{\tt\bs{}tlcircle\lb{\em diam}\rb} $\longrightarrow$ {\tt\bs{}oval[tl]...} +\\ +{\tt\bs{}blcircle\lb{\em diam}\rb} $\longrightarrow$ {\tt\bs{}oval[bl]...} +\end{quote} +The centrum of the circular arc is positioned strictly at the +point which is the argument of the corresponding {\tt\bs{}put}. +The commands {\tt\bs{}TRcircle}, {\tt\bs{}BRcircle}, {\tt\bs{}TLcircle}, +{\tt\bs{}BLcircle} draw the $90^{\circ}$ circular quaters +with the reference point positioned at the corner +instead of the centrum. +Similarly, the commands +\begin{itemize} +\item[] {\tt\bs{}tlsector}, {\tt\bs{}TLsector}, +{\tt\bs{}blsector}, {\tt\bs{}BLsector}, \dots +\end{itemize} +draw circular segments together with horizontal +and vertical radii. The proper positioning of the +circular segments requires special precausions +since it is necessary to take into account the +line thickness and the specific alignment of the +circular elements inside the character boxes. + +The example on Fig~\ref{Fig2} +shows the usage of these commands: +\begin{quote} +\begin{verbatim} +\begin{picture}(200,60)(-100,-30) +\put(-60,10){\thicklines\tlcircle{50}} +\put(-60,10){\circle*{1}} +\put(-60,10){\line(-1,0){25}} +\put(-60,10){\line(0,1){25}} +\put(40,10){\thicklines\BRcircle{50}} +\put(40,10){\circle*{1}} +\put(40,10){\line(-1,0){25}} +\put(40,10){\line(0,1){25}} +... ... ... +\end{verbatim} +\end{quote} +The actual diameter of the circular segment +is adjusted like it is done with the circles. +The commands {\tt\bs{}scaledcircle} and {\tt\bs{}magcircle} +affect the thickness and the diameter of these circular segments also. + + +\section*{Frames} + +\def\DiskCorner{8pt} +\def\RoundCorner{6pt} +\def\LineCorner{10pt} +\def\RectCorner{3pt} + +\framesep{-2pt} +\shadowsep{1pt} +\shadowsize{8pt} +\shadowshrink{1} + +The set of frames which are available in \LaTeX{} is +enhanced in \pmg{} --- except solid and dashed rectangular frames +it is possible to draw double and tripple frames in a variety +of styles (Fig.~\ref{ThrFr}). The commands +\verb?\frameBox?, \verb?\ovalBox?, \verb?\octalBox?, +\verb?\astroBox?, \verb?\parquetBox? have the same structure +as the command \verb?\framebox?, but they draw the +corresponding fancy frames: +\begin{quote} +\begin{verbatim} +\put(0,0){\ovalBox(100,50){oval}} +\put(70,0){\astroBox(100,50){astro}} +. . . . . . . . . . . . . +\end{verbatim} +\end{quote} +The ordinary solid frame is drawn by \verb?\frameBox?, +the double and triple frames are drawn by \verb?\frameBoX? +and \verb?\frameBOX?, respectively. Similar commands exist for +double and triple fancy frames. +The User can prepare the personal macro commands to draw frame corners +and extend the variety of fancy frames up to the limit of his/her fantasy. + +\begin{figure} +\centerline{\begin{Picture}[50](2000,800) +\put(100,0){\parquetBox(500,300){parquet}} +\put(100,500){\octalBox(500,300){octal}} +\put(700,0){\ovalBoX(500,300){oval}} +\put(700,500){\astroBoX(500,300){astro}} +\put(1300,0){\dashBOX{10}(500,300){dash}} +\put(1300,500){\frameBOX(500,300){frame}} +\end{Picture}} +\caption{Examples of frame styles\label{ThrFr}} +\end{figure} + +\begin{figure} +\centerline{\begin{Picture}[50](600,100)(-30,0) +\thicklines +\rombboxstyle(2,1,1pt) +\put(20,20){\rombBox[z](50,50){Box}} +\put(220,20){\rombBoX[z](50,50){BoX}} +\put(440,20){\rombBOX[z](50,50){BOX}} +\end{Picture}} +\caption{Romb-style frames\label{RombFram}} +\end{figure} + +\begin{figure} +\centerline{\begin{Picture}[50](800,200)(-130,0) +\put(-100,20){\frameBox(100,100){}} +\put(220,20){\frameBox(100,100){}} +\put(540,20){\frameBox(100,100){}} +\thicklines +\rombboxstyle(2,1,1pt) +\put(-100,20){\rombBox[x](100,100){\tt x}} +\put(220,20){\rombBox[y](100,100){\tt y}} +\put(540,20){\rombBox[z](100,100){\tt z}} +\end{Picture}} +\caption{Alignment of romb boxes\label{FigRR}} +\end{figure} + +More exotic variant of a frame can be created using +the commands {\tt\bs{}rombBox}, {\tt\bs{}rombBoX} +or {\tt\bs{}rombBOX} as it is shown on Fig.~\ref{RombFram}. +The style (i.e., inclination of the romb sides) +and the distance between multiple rombs +are set by the command {\tt\bs{}rombboxstyle} +\begin{description} +\item[\quad{\tt\bs{}rombboxstyle($\Delta x$,$\Delta y$,{\em len})}] + --- defines the inclination for the romb boxes and for the + corners of the {tt octal} frames and shadows. + Parameters $\Delta x$, $\Delta y$ specifies the inclination, + and the parameter {\em len} --- the length of the inclined + corners (for {\tt octal} frames and shadows only) in a style + similar to the command + {\tt\bs{}line($\Delta x$,$\Delta y$)\{{\em len}\}}. +\end{description} +with the default settings as +\begin{center} +{\tt\bs{}rombboxstyle(2,1,2pt)} +\end{center} +The alignment of the romb around the box specified +for these commands can be varied using +additional optional parameter(see Fig.~\ref{FigRR}. The full format of the +{\tt rombbox} commands is: +\begin{itemize} +\item[] + {\tt\bs{}rombBox[{\em char}]($\Delta X$,$\Delta Y$)\{{\em text}\}} +\end{itemize} +where + {\em char} -is one-character parameter which + defines the alignment of the romb frame with respect to + rectangle $(\Delta X,\Delta Y)$: + {\tt x} (default value) means that the $x$-axis coinsides with the + $x$-axis of the rectangle, + {\tt y} means that the $y$-axis coinsides with the + $y$-axis of the rectangle, + {\tt z} means that the corners of the rectangle are at the + sides of the romb frame. + +\begin{figure} +\begin{center} +\begin{Picture}[50](2000,1100)(0,-500) +\put(0,50){\frameBox[r](500,200){r}} +\put(0,400){\frameBox[R](500,200){R}} +\put(700,50){\frameBox[p](500,200){p}} +\put(700,400){\frameBox[P](500,200){P}} +\put(1400,50){\frameBox[o](500,200){o}} +\put(1400,400){\frameBox[O](500,200){O}} +\shadowsize{12pt} +\put(100,-400){\frameBox[A](800,300){A}} +\put(1100,-400){\frameBox[L](800,300){L}} +\end{Picture} +\end{center} +\caption{Examples of shadows\label{TypShad}} +\end{figure} + +\begin{figure} +\begin{center} +\begin{Picture}[35](2000,1500) +\shadowcorner{B} +\put(0,0){\frameBoX[oPRpAORr](1000,500){Shadows}} +\end{Picture} +\end{center} +\caption{Multiple shadows\label{TypShad2}} +\end{figure} + +Each rectangular box has the optional parameter which enable to specify +the ``shadows'' around this box. Each shadow style has a special letter, +and the list of letters as the optional parameter draws a list of shadows. +The standard shodow types are shown on Fig.~\ref{TypShad}. +It is possible to draw several shadows of different types +and around arbitrary corner of the frame as it is shown +on Fig.~\ref{TypShad2}: +\begin{quote} +\begin{verbatim} +\unitlength=10pt +\begin{picture}(20,15) +\shadowcorner{B} +\put(0,0){\frameBoX[oPR...](10,5){...}} +\end{picture} +\end{verbatim} +\end{quote} +The parameter of the shadows --- thickness, corner size, +additional shift, etc., --- can be varied +by the following User commands: +\begin{description} +\item[\quad{\tt\bs{}framesep\{{\em dist}\}}] + --- set the distance between double and triple + frames. It can be negative as well as positive. + Default value: {\tt\framesep\{2pt\}}. +\item[\quad{\tt\bs{}shadowsep\{{\em dist}\}}] + --- set the gap distance between the frame and the shadow + or between multiple shadows. + Default value: {\tt\shadowsep\{1pt\}}. +\item[\quad{\tt\bs{}shadowsize\{{\em dist}\}}] + --- set the depth of the shadow. + Default value: {\tt\shadowsize\{5pt\}}. +\item[\quad{\tt\bs{}shadowshrink\{{\em factor}\}}] + --- set the contraction factor for the subsequent shadows. + Default value: {\tt\shadowshrink\{1\}}. +\item[\quad{\tt\bs{}shadowcorner\{{\em char}\}}] + --- set the corner for the shadows. + Valid values: {\tt A}, {\tt B}, {\tt C}, {\tt D}. + Default value: {\tt\bs{}shadowcorner\{A\}}. +\item[\quad{\tt\bs{}RoundCorner\{{\em radius}\}}] + --- set the {\em radius} for the circular arcs + at the corners of oval frames and shadows with rounded corners. + Default value: {\tt\RoundCorner\{5pt\}}. +\item[\quad{\tt\bs{}DiskCorner\{{\em diam}\}}] + --- set the {\em diameter} for the bulbs + at the corners of black shadows with rounded corners. + Default value: {\tt\DiskCorner\{5pt\}}. +\item[\quad{\tt\bs{}LineCorner\{{\em len}\}}] + --- set the {\em length} for the inclined corners + of octal frames and shadows. + Default value: {\tt\LineCorner\{10pt\}}. +\item[\quad{\tt\bs{}RectCorner\{{\em size}\}}] + --- set the {\em size} for the parquette corners + of octal frames and shadows. + Default value: {\tt\RectCorner\{5pt\}}. +\end{description} + + +\section*{Rombs} + +Special command enable to draw rombs (see Fig.~\ref{FigRomb}): +\begin{itemize} +\item[] {\tt \bs{}put({\em x})({\em y}) + \{\bs{}romb[{\em pos}]($\Delta x$,$\Delta y$)\{{\em len}\}\}} +\end{itemize} +where: +\begin{itemize} +\item[] $(x,y)$ --- position of the romb inside {\tt picture};\\ + {\em pos} --- one-character option which shows the alignment of romb + with respect to $(x,y)$: {\tt r} means right corner, + {\tt l} means left corner; {\tt c} means center (default);\\ + $(\Delta x,\Delta y)$ and {\em len} are the parameters which + define the inclination and the length of the romb side + (similarly to {\tt\bs{}line}). +\end{itemize} + +\begin{figure} +\centerline{\begin{Picture}[75](800,200)(-30,-100) +\thicklines +\put(20,20){\romb[c](2,1){90}} +\put(20,20){\circle*{10}} +\put(20,-60){\makebox(0,0){\tt c}} +\put(220,20){\romb[l](2,1){90}} +\put(220,20){\circle*{10}} +\put(220,-60){\makebox(0,0){\tt l}} +\put(640,20){\romb[r](2,1){90}} +\put(640,20){\circle*{10}} +\put(640,-60){\makebox(0,0){\tt r}} +\end{Picture}} +\caption{Alignment of rombes\label{FigRomb}} +\end{figure} + +\section*{Automatically scaled pictures} + +The idea of the macros which are responsible for these functions +is to calculate the {\tt \bs{}unitlength} va\-lue in terms of the +{\em relative fraction} of the page width instead of explicit +specifying its value in points, centimeters, inches, etc. + +The command {\tt\bs{}pictureunit[{\em percent}]\lb{\em x-size}\rb} +selects the value of the variable {\tt\bs{}unitlength} so that the picture +which is {\em x-size} units in width occupies {\em percent} +width of the paper. +The environment {\tt Picture} combines the automatic calculation of +the {\tt\bs{}unitlength} with the {\tt\bs{}begin\lb{}picture\rb} -- +{\tt\bs{}end\lb{}picture\rb}. +By default {\em percent}=100 is used which corresponds to 90\% +of the paper width. The default {\em percent} value can be redefined +by the command +\begin{center} + {\tt\bs{}def\bs{}defaultpercent\lb{\em percent}\rb}. +\end{center} + +Examples: +\begin{center} +\begin{tabular}{l} + {\tt\bs{}pictureunit[75]\lb{}120\rb}\\ + {\tt\bs{}begin\lb{}picture\rb(120,80)}\\ + \dots\\ + {\tt\bs{}end\lb{}picture\rb}\\ + \phantom{.}\\ + {\tt\bs{}begin\lb{}Picture\rb[75](120,80)}\\ + \dots\\ + {\tt\bs{}end\lb{}Picture\rb} +\end{tabular} +\end{center} + +These macros are inspired by {\tt fullpict.sty} by Bruce Shawyer. +Carefull examination of the file {\tt fullpict.sty} +shows some bugs/warnings which require correction: +\begin{itemize} +\item +each automatic scaling of {\tt \bs{}unitlength} +allocates a new counter; +\item +automatic scaling uses {\tt\bs{}textwidth} +as the reference width which results to improper functioning +inside list and {\tt minipage} environments; +\item +the environments {\tt fullpicture}, {\tt halfpicture} +and {\tt scalepicture} are centered internally +with {\tt\bs{}begin\lb{}center\rb} --- {\tt\bs{}end\lb{}center\rb} +which prevents the proper positioning of the picture in most cases. +\end{itemize} +The \pmgs{} macros calculates the dimension +{\tt\bs{}unitlength} +using the value {\tt\bs{}hsize}, and as a result +it works corectly also for {\tt twocolumn} mode, +inside the {\em list} environments +{\tt itemize}, {\tt enumerate}, etc. +(for example, all the figures in this paper +are drawn using the environment {\tt Picture}). +The automatic centering and repeatedly allocation +of the registers are corrected as well. + +\section*{Acknowledgements} + +The authors are grateful to Dr.\ Kees van der Laan +for the possibility to present the results of our research +at the EURO\TeX'95 (Aarnhem, Netherland). + +One of the authors (A.S.Berdnikov) would like to express his warmest +thanks to Dr.\ A.Compagner from the Delft University of Technology +who spent a lot of his time and efforts trying to transform two naive +students from Russia (namely, him and his co-worker Sergey Turtia) +into serious scientists. + +This research was partially supported by a grant +from the Dutch Organization for Scientific Research +(NWO grant No 07--30--007). + +\end{document} + + + + + + + + -- cgit v1.2.3