summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/combinedgraphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/combinedgraphics
Initial commit
Diffstat (limited to 'macros/latex/contrib/combinedgraphics')
-rw-r--r--macros/latex/contrib/combinedgraphics/COPYING674
-rw-r--r--macros/latex/contrib/combinedgraphics/Makefile81
-rw-r--r--macros/latex/contrib/combinedgraphics/README125
-rw-r--r--macros/latex/contrib/combinedgraphics/combinedgraphics.dtx976
-rw-r--r--macros/latex/contrib/combinedgraphics/combinedgraphics.ins78
-rw-r--r--macros/latex/contrib/combinedgraphics/combinedgraphics.pdfbin0 -> 313147 bytes
-rw-r--r--macros/latex/contrib/combinedgraphics/test/Makefile88
-rw-r--r--macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.pdfbin0 -> 129450 bytes
-rw-r--r--macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.tex226
-rw-r--r--macros/latex/contrib/combinedgraphics/test/gnuplot42.eps655
-rw-r--r--macros/latex/contrib/combinedgraphics/test/gnuplot42.pdfbin0 -> 3409 bytes
-rw-r--r--macros/latex/contrib/combinedgraphics/test/gnuplot42.plt16
-rw-r--r--macros/latex/contrib/combinedgraphics/test/gnuplot42.tex109
-rw-r--r--macros/latex/contrib/combinedgraphics/test/xfig325.eps113
-rw-r--r--macros/latex/contrib/combinedgraphics/test/xfig325.fig12
-rw-r--r--macros/latex/contrib/combinedgraphics/test/xfig325.pdfbin0 -> 2462 bytes
-rw-r--r--macros/latex/contrib/combinedgraphics/test/xfig325.tex12
17 files changed, 3165 insertions, 0 deletions
diff --git a/macros/latex/contrib/combinedgraphics/COPYING b/macros/latex/contrib/combinedgraphics/COPYING
new file mode 100644
index 0000000000..94a9ed024d
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ 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.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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 <http://www.gnu.org/licenses/>.
+
+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:
+
+ <program> Copyright (C) <year> <name of author>
+ 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
+<http://www.gnu.org/licenses/>.
+
+ 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
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/macros/latex/contrib/combinedgraphics/Makefile b/macros/latex/contrib/combinedgraphics/Makefile
new file mode 100644
index 0000000000..29763aaedb
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/Makefile
@@ -0,0 +1,81 @@
+#
+# Makefile for combinedgraphics package
+#
+# Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu>
+#
+# This file is part of combinedgraphics.
+#
+# combinedgraphics is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 3 as
+# published by the Free Software Foundation, not any later version.
+#
+# combinedgraphics 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 combinedgraphics. If not, see <http://www.gnu.org/licenses/>.
+#
+# WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS!
+#
+
+export PACKAGE := combinedgraphics
+
+PDFLATEX := pdflatex
+MAKEINDEX := makeindex
+
+# installation directories
+DESTDIR := $(HOME)/.texmf
+DOCDIR := $(DESTDIR)/doc/latex/$(PACKAGE)
+SRCDIR := $(DESTDIR)/source/latex/$(PACKAGE)
+TEXDIR := $(DESTDIR)/tex/latex/$(PACKAGE)
+
+.PHONY: all pkg doc test install clean distclean force
+
+all: pkg doc test
+
+%.sty: %.ins %.dtx
+ $(RM) $@
+ $(PDFLATEX) -interaction=nonstopmode $<
+
+%.idx %.glo: %.dtx %.sty
+ $(PDFLATEX) -interaction=nonstopmode $<
+
+%.ind: %.idx
+ $(MAKEINDEX) -s gind.ist -o $@ $<
+
+%.gls: %.glo
+ $(MAKEINDEX) -s gglo.ist -o $@ $<
+
+$(PACKAGE).pdf: %.pdf: %.dtx %.sty %.ind %.gls
+ $(PDFLATEX) -interaction=nonstopmode $<
+ $(PDFLATEX) -interaction=nonstopmode $<
+ $(PDFLATEX) -interaction=nonstopmode $<
+
+pkg: $(PACKAGE).sty
+
+doc: $(PACKAGE).pdf
+
+test: $(PACKAGE).sty
+ $(MAKE) -C test
+
+install:
+ mkdir -p $(DOCDIR) $(SRCDIR) $(TEXDIR)
+ install -m 644 README COPYING $(PACKAGE).pdf $(DOCDIR)
+ install -m 644 $(PACKAGE).ins $(PACKAGE).dtx Makefile $(SRCDIR)
+ install -m 644 $(PACKAGE).sty $(TEXDIR)
+ $(MAKE) -C test install
+ mktexlsr $(DESTDIR)
+
+clean:
+ $(RM) *.aux *.glo *.gls *.idx *.ilg *.ind *.log *.toc *~
+ $(MAKE) -C test clean
+
+distclean: clean
+ $(RM) $(PACKAGE).sty
+ $(MAKE) -C test distclean
+
+mrproper: distclean
+ $(RM) $(PACKAGE).pdf
+ $(MAKE) -C test mrproper
diff --git a/macros/latex/contrib/combinedgraphics/README b/macros/latex/contrib/combinedgraphics/README
new file mode 100644
index 0000000000..5ffea6722e
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/README
@@ -0,0 +1,125 @@
+SHORT DESCRIPTION
+=================
+
+(This is a copy of the LaTeX code of the documentation's abstract.)
+
+This package provides a macro (|\includecombinedgraphics|) for the
+inclusion of combined EPS/\LaTeX{} and PDF/\LaTeX{} graphics (an export
+format of Gnuplot, Xfig, and maybe other programs). Instead of including
+the graphics with a simple |\input|, the |\includecombinedgraphics| macro
+has some benefits:
+
+\begin{itemize}
+ \item changing the font and color of the text of the \LaTeX{} parts
+ \item rescaling the graphics without affecting the font of the \LaTeX{}
+ parts
+ \item automatic inclusion of the vector graphics parts, as far as \LaTeX{}
+ parts do not do it (e.\,g., for files exported from Gnuplot before
+ version 4.2 or Xfig)
+ \item changing the inclusion order of \LaTeX{} and vector graphics
+ parts (e.\,g., Gnuplot 4.4 exports files in a way that the vector
+ graphics part overlays the \LaTeX{} part, which means that text may be
+ hidden under shaded areas)
+ \item rescaling and rotating of complete graphics (similar to
+ |\includegraphics| from \textsf{graphicx} package)
+ \item scaling the vector graphics part (without affecting the font) to
+ a defined width or height of the graphics, which might, e.g., be of
+ importance for graphics that are intended for publication in a journal
+ requesting a certain size of graphics
+\end{itemize}
+
+A test PDF file with extensively commented examples is shipped with this
+package and a BASH script (\texttt{texpic2epspdf.sh}) to convert combined
+EPS/\LaTeX{} and PDF/\LaTeX{} graphics to EPS or PDF files with text part
+included.
+
+See `combinedgraphics.pdf' for detailed information on usage.
+
+BUILDING
+========
+
+If you do not want to use any pre-build `combinedgraphics.sty' and
+`combinedgraphics.pdf' files, you will have to choose one of the following
+two ways for building them. Otherwise you can skip this section.
+
+1) Building with make
+---------------------
+
+Running `make' will create the LaTeX package, the documentation and the test
+file:
+ $ make
+
+2) Building manually
+--------------------
+
+a) Generation of package (.sty file):
+
+Run `combinedgraphics.ins' through LaTeX:
+ $ pdflatex -interaction=nonstopmode combinedgraphics.ins
+
+b) Generation of documentation:
+
+Run `combinedgraphics.dtx' through LaTeX:
+ $ pdflatex -interaction=nonstopmode combinedgraphics.dtx
+
+Then create the index and change history:
+ $ makeindex -s gind.ist -o combinedgraphics.ind combinedgraphics.idx
+ $ makeindex -s gglo.ist -o combinedgraphics.gls combinedgraphics.glo
+
+Finally, run `combinedgraphics.dtx' three time through LaTeX:
+ $ pdflatex -interaction=nonstopmode combinedgraphics.dtx
+ $ pdflatex -interaction=nonstopmode combinedgraphics.dtx
+ $ pdflatex -interaction=nonstopmode combinedgraphics.dtx
+
+Optionally you can compile the test file:
+ $ pdflatex -interaction=nonstopmode combinedgraphics_test.tex
+ $ pdflatex -interaction=nonstopmode combinedgraphics_text.tex
+ $ pdflatex -interaction=nonstopmode combinedgraphics_text.tex
+
+INSTALLATION
+============
+
+1) Installing with make
+-----------------------
+
+To install the package into a TDS (= TeX directory structure; typically its base
+directory is named `texmf' or something similar), run the following command:
+ $ make DESTDIR=<your TDS> install
+
+Note: `$(DESTDIR)' defaults to `$(HOME)/.texmf'.
+
+2) Installing manually
+----------------------
+
+In principle, you will only habe to copy the file `ionumbers.sty' into a
+directory, where LaTeX can find it. If you copy it into a TDS (TeX directory
+structure), you will most probably have to run the following command afterwards:
+ $ mktexlsr <your TDS>
+
+LICENSE
+=======
+
+Copyright 2009,2011 Christian Schneider <software(at)chschneider(dot)eu>
+
+ion@addto@macro: identical to l@addto@macro from koma-script
+ bundle v2.9t
+Copyright 1994-2004 Markus Kohm and Frank Neukam
+
+Thanks to Markus Kohm for permitting to use his code in this package.
+Please do not bother Markus with questions or bugs concering this package!
+
+This file is part of combinedgraphics.
+
+combinedgraphics is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 3 as
+published by the Free Software Foundation, not any later version.
+
+combinedgraphics 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 combinedgraphics. If not, see <http://www.gnu.org/licenses/>.
+
+WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS!
diff --git a/macros/latex/contrib/combinedgraphics/combinedgraphics.dtx b/macros/latex/contrib/combinedgraphics/combinedgraphics.dtx
new file mode 100644
index 0000000000..1ebb72a685
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/combinedgraphics.dtx
@@ -0,0 +1,976 @@
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \iffalse meta-comment
+%
+% DocStrip file for combinedgraphics package
+%
+% Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu>
+%
+% cgr@addto@macro: identical to l@addto@macro from koma-script
+% bundle v2.9t
+% Copyright 1994-2004 Markus Kohm and Frank Neukam
+%
+% Thanks to Markus Kohm for permitting to use his code in this package.
+% Please do not bother Markus with questions or bugs concering this package!
+%
+% This file is part of combinedgraphics.
+%
+% combinedgraphics is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License version 3 as
+% published by the Free Software Foundation, not any later version.
+%
+% combinedgraphics 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 combinedgraphics. If not, see <http://www.gnu.org/licenses/>.
+%
+% WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS!
+%
+% \fi
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \iffalse
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{combinedgraphics}
+%<package> [2012/07/13 v0.2.2 inclusion of combined EPS/LaTeX graphics]
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+\usepackage{combinedgraphics}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+%
+% modified description environment
+\newcommand{\listmark}{$\bullet$}
+\newcommand{\listlengths}{%
+ \setlength{\parsep}{0pt}%
+ \setlength{\itemsep}{0pt}%
+ \setlength{\leftmargin}{10.5em}%
+ \setlength{\rightmargin}{0pt}%
+ \setlength{\labelsep}{1em}%
+ \setlength{\labelwidth}{9.5em}}
+\newenvironment{mydescription}{%
+ \begin{list}{\listmark}{\listlengths}%
+}{%
+ \end{list}%
+}
+%
+\begin{document}
+ \DocInput{combinedgraphics.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \changes{v0.0.1-alpha}{2009/10/04}{initial .dtx version}
+% \changes{v0.0.2-alpha}{2009/11/01}{initial release}
+% \changes{v0.1.0-alpha}{2011/06/12}{added options for changing the inclusion
+% order of \LaTeX{} and vector graphics parts}
+% \changes{v0.1.1-alpha}{2011/06/15}{fix in Makefiles of package}
+% \changes{v0.2.0}{2012/01/04}{added options for scaling vector graphics
+% part to a certain width or height, respectively, plus removed ``alpha''
+% from version}
+% \changes{v0.2.1}{2012/01/07}{simplified a macro}
+% \changes{v0.2.2}{2012/07/12}{added comments to test file}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \CheckSum{704}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \GetFileInfo{combinedgraphics.sty}
+%
+% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
+% \DoNotIndex{\@ne}
+% \DoNotIndex{\advance,\begingroup,\catcode,\closein}
+% \DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \title{The \textsf{combinedgraphics} package\thanks{This document corresponds
+% to \textsf{combinedgraphics}~\fileversion, dated~\filedate. Copyright
+% 2009,2011,2012 Christian Schneider \texttt{<software(at)chschneider(dot)eu>}.}}
+% \author{Christian Schneider\\ \texttt{<software(at)chschneider(dot)eu>}}
+%
+% \maketitle
+%
+% \tableofcontents
+% \clearpage
+%
+% \begin{abstract}
+% This package provides a macro (|\includecombinedgraphics|) for the
+% inclusion of combined EPS/\LaTeX{} and PDF/\LaTeX{} graphics (an export
+% format of Gnuplot, Xfig, and maybe other programs). Instead of including
+% the graphics with a simple |\input|, the |\includecombinedgraphics| macro
+% has some benefits:
+%
+% \begin{itemize}
+% \item changing the font and color of the text of the \LaTeX{} parts
+% \item rescaling the graphics without affecting the font of the \LaTeX{}
+% parts
+% \item automatic inclusion of the vector graphics parts, as far as \LaTeX{}
+% parts do not do it (e.\,g., for files exported from Gnuplot before
+% version 4.2 or Xfig)
+% \item changing the inclusion order of \LaTeX{} and vector graphics
+% parts (e.\,g., Gnuplot 4.4 exports files in a way that the vector
+% graphics part overlays the \LaTeX{} part, which means that text may be
+% hidden under shaded areas)
+% \item rescaling and rotating of complete graphics (similar to
+% |\includegraphics| from \textsf{graphicx} package)
+% \item scaling the vector graphics part (without affecting the font) to
+% a defined width or height of the graphics, which might, e.g., be of
+% importance for graphics that are intended for publication in a journal
+% requesting a certain size of graphics
+% \end{itemize}
+%
+% A test PDF file with extensively commented examples is shipped with this
+% package and a BASH script (\texttt{texpic2epspdf.sh}) to convert combined
+% EPS/\LaTeX{} and PDF/\LaTeX{} graphics to EPS or PDF files with text part
+% included.
+% \end{abstract}
+%
+% \section{The Combined EPS/\LaTeX{} format}
+%
+% Graphics in combined EPS/\LaTeX{} or PDF/\LaTeX{} format consist of two files:
+% \begin{enumerate}
+% \item an EPS or PDF file containing the vector graphics part
+% \item an \LaTeX{} file containing the text part
+% \end{enumerate}
+%
+% This format has the advantage that it is possible to generate a high-quality
+% vector graphics with text containing all symbols, macros and other stuff
+% provided by \LaTeX{}. The text is formatted by \LaTeX{} itsself when including
+% the graphics (\emph{not} during creation of the graphics!) and thus it is
+% possible to use everything provided by \LaTeX{} up to the font of the
+% document for text inside the graphics.
+%
+% Typically, the \LaTeX{} part of the graphics is included by |\input|.
+% The vector graphics part is either included automatically by the \LaTeX{}
+% part with an |\includegraphics| command (or something similar) and overlayed
+% by the text or the user will have to combine both parts manually like this
+% (e.\,g., for gnuplot before version 4.2 or Xfig) for a pair of files
+% |foobar.tex|/|foobar.eps|:
+%
+% \begin{verbatim}
+% \begin{picture}(0,0)%
+% \includegraphics{foobar}%
+% \end{picture}%
+% \input{foobar}
+% \end{verbatim}
+%
+% Although the format has some nice advantages compared to other formats, the
+% user has to know whether to include the vector graphics part for (some of)
+% his graphics or not, font changes sometimes require some knowledge of the
+% internal commands of the \LaTeX{} part (depending on the tool that generated
+% the graphics), and the user is not intended to change the scaling of just
+% the vector graphics part without affecting the text format. Furthermore,
+% rotating, scaling and resizing the whole graphics requires extra-macros,
+% e.\,g. |\rotatebox|, |\scalebox|, or |\resizebox| from the
+% \textsf{graphics}/\textsf{graphicx} package.
+%
+% The intention of this package is to provide a macro for easier handling of
+% combined EPS/\LaTeX{} or PDF/\LaTeX{} graphics, just as easy as
+% |\includegraphics|, and removing the limitations mentioned above.
+%
+% \section{Usage}
+%
+% \subsection{The macro}
+%
+% \DescribeMacro{\includecombinedgraphics}
+% The macro |\includecombinedgraphics|\oarg{option list}\marg{graphics file}
+% is used to include a combined EPS/\LaTeX{} or PDF/\LaTeX{} file, where
+% \meta{graphics file} is the name of the \LaTeX{} part of the graphics
+% (\emph{without} |.tex| extension) and \meta{option list} is an optional list
+% of \meta{key}|=|\meta{value} pairs (see below).
+%
+% \subsection{Basic macro options}
+% \label{sec:basic}
+%
+% The following options are processed first. If an option is specified
+% several times, the last appearance will overwrite the previous ones.
+%
+% \begin{mydescription}
+% \item[\texttt{textfont}=\meta{value}] one or more commands for reformatting
+% the text in \LaTeX{} part (e.\,g., |textfont=\Large\bfseries| for large
+% bold-face font or |textfont={}| for default font of graphics overwriting
+% package option)
+% \item[\texttt{textcolor}=\meta{value}] one or more commands for recoloring
+% the text in \LaTeX{} part (e.\,g., |textcolor=\color{red}| for red text
+% or |textcolor={}| for default text color of graphics overwriting
+% package option)
+% \item[\texttt{vecscale}=\meta{value}] scaling factor for rescaling the
+% graphics without affecting the font of the \LaTeX{} part
+% (Note that this will overwrite |vecwidth| or |vecheight|, if they are
+% specified before.)
+% \item[\texttt{vecwidth}=\meta{value}] analogous to |vecscale|, but
+% the scaling factor will be calculated such that the new width of the
+% total graphics will be \meta{value}; the aspect ratio will be preserved
+% (Note that this will overwrite |vecscale| or |vecheight|, if they are
+% specified before.)
+% \item[\texttt{vecheight}=\meta{value}] analogous to |vecscale|, but
+% the scaling factor will be calculated such that the new (total) height of
+% the total graphics will be \meta{value}; the aspect ratio will be
+% preserved
+% (Note that this will overwrite |vecscale| or |vecwidth|, if they are
+% specified before.)
+% \item[\texttt{vecinclude}=\meta{value}] generate code to include the vector
+% graphics part; \meta{value}s are: |auto| to automatically determine if
+% code is required (default), |true|/|false| to always/never generate
+% that code, or |overwrite| to disable any inclusion of a vector graphics
+% part in the \LaTeX{} part and generate new code
+% \item[\texttt{vecfirst}=\meta{value}] inclusion order of vector
+% graphics part; valid \meta{value}s are: |true| (default) or |false| to
+% include the vector graphics part before or after the \LaTeX{} part,
+% respectively
+% \item[\texttt{vecfile}=\meta{value}] filename of vector graphics part, if
+% different from filename of \LaTeX{} part (except for extension); implies
+% |vecinclude=overwrite|
+% \end{mydescription}
+%
+% Note: If the vector graphics part is already included by the \LaTeX{} part,
+% |vecinclude| and |vecscale| will require the vector graphics part to be
+% included by an |\includegraphics| command for proper functioning. Other
+% graphics inclusion macros will not be detected. Furthermore,
+% |vecscale| also requires that the \LaTeX{} part puts its text inside a
+% |picture| environment whose scaling is set with
+% |\setlength{\unitlength}|\marg{some length}. These two prerequisites are
+% fulfilled by graphics exported from Gnuplot and Xfig.
+%
+% \subsection{Extended macro options}
+%
+% The following options are processed \emph{after} the basic options \emph{in
+% the order} of their appearances and affect the \emph{whole} graphics
+% (\LaTeX{} and vector graphics part). They may be specified several times.
+%
+% \subsubsection*{Rotating}
+%
+% Rotating is basically performed with the means of |\rotatebox| from the
+% \textsf{graphics}/\textsf{graphicx} package.
+%
+% \begin{mydescription}
+% \item[\texttt{angle}=\meta{value}] angle of rotation
+% \end{mydescription}
+%
+% The following options can be used to fine adjust the effect of a rotation and
+% apply to only the next |angle| value specified in the options list.
+%
+% \begin{mydescription}
+% \item[\texttt{origin}=\meta{value}] up to two of |lrctbB| (|B| stands for
+% the baseline)
+% \item[\texttt{x}=\meta{value}] the |x| coordinate of the center of rotation
+% \item[\texttt{y}=\meta{value}] the |y| coordinate of the center of rotation
+% \item[\texttt{units}=\meta{value}] units of rotation angle (e.\,g., |-360|
+% denotes clockwise rotation)
+% \end{mydescription}
+%
+% \subsubsection*{Rescaling}
+%
+% Rescaling is performed with the means of |\scalebox| from the
+% \textsf{graphics} package.
+%
+% \begin{mydescription}
+% \item[\texttt{scale}=\meta{value}] scaling factor
+% \item[\texttt{hscale}=\meta{value}] horizontal scaling factor
+% \item[\texttt{vscale}=\meta{value}] vertical scaling factor
+% \end{mydescription}
+%
+% Note: A scaling via |hscale| and |vscale| will only be performed, if a pair
+% of both values is specified.
+%
+% \subsubsection*{Resizing}
+%
+% Resizing is performed with the means of |\resizebox| from the
+% \textsf{graphics} package.
+%
+% \begin{mydescription}
+% \item[\texttt{height}=\meta{value}] height of graphics
+% \item[\texttt{totalheight}=\meta{value}] height + depth of graphics
+% \item[\texttt{width}=\meta{value}] width of graphics
+% \item[\texttt{keepaspectratio}] if only one of the values
+% for |height|/|totalheight| or |width| is specified, the other one will
+% be calculated to keep the aspect ratio
+% \end{mydescription}
+%
+% Note: Resizing will only be performed, if a pair of |height|/|totalheight|
+% and |width| is specified or one of them is specified followed by
+% |keepaspectratio|.
+%
+% \subsection{Package options}
+%
+% The following options can be passed to the package as defaults for the
+% macro options. If an option is specified several times, the last appearance
+% will overwrite the previous ones.
+%
+% \begin{mydescription}
+% \item[\texttt{textfontcmd}=\meta{value}] name of a command (\emph{without}
+% leading backslash) for reformatting text in \LaTeX{} part
+% \item[\texttt{textcolorcmd}=\meta{value}] name of a command (\emph{without}
+% leading backslash) for recoloring text in \LaTeX{} part
+% \item[\texttt{vecscale}=\meta{value}] see section~\ref{sec:basic}
+% \item[\texttt{vecwidth}=\meta{value}] see section~\ref{sec:basic}; in
+% contrast to the macro options, you must not use a length as \meta{value}
+% here (workaround: use |\the\somelength|)
+% \item[\texttt{vecheight}=\meta{value}] see section~\ref{sec:basic}; in
+% contrast to the macro options, you must not use a length as \meta{value}
+% here (workaround: use |\the\somelength|)
+% \item[\texttt{vecinclude}=\meta{value}] see section~\ref{sec:basic}
+% \item[\texttt{vecfirst}=\meta{value}] see section~\ref{sec:basic}
+% \end{mydescription}
+%
+% \section{Bugs, problems, and suggestions}
+%
+% Please report bugs and problems or send suggestions for this package to
+% Christian Schneider. Check for updates before reporting bugs at the website
+% mentioned above.
+%
+% \StopEventually{\PrintChanges\PrintIndex}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \section{Implementation}
+%
+% Load required packages for graphics, color and \meta{key}|=|\meta{value}
+% pairs:
+% \begin{macrocode}
+\RequirePackage{keyval}
+\RequirePackage{graphicx}
+\RequirePackage{color}
+% \end{macrocode}
+%
+% \subsection{Package options}
+%
+% This |if| is required to remember the inclusion order. The macro specifies
+% the package option from |vecscale|, |vecwidth|, |vecheight| used last.
+% \begin{macrocode}
+\newif\ifcgr@vecfirst
+\def\cgr@vecscale@type{0}
+% \end{macrocode}
+%
+% Definitions of package options as \meta{key}|=|\meta{value} pairs. The
+% \meta{value}s are saved in the specified macros that are undefined by default.
+% \begin{macrocode}
+\newcommand*\cgr@defopts{\define@key{cgr}}
+\newcommand*\cgr@setopts{\setkeys{cgr}}
+\cgr@defopts{textfontcmd}{\gdef\cgr@textfont@default{\@nameuse{#1}}}
+\cgr@defopts{textcolorcmd}{\gdef\cgr@textcolor@default{\@nameuse{#1}}}
+\cgr@defopts{vecscale}{\gdef\cgr@vecscale@default{#1}%
+ \gdef\cgr@vecscale@type{0}}
+\cgr@defopts{vecwidth}{\gdef\cgr@vecwidth@default{#1}%
+ \gdef\cgr@vecscale@type{1}}
+\cgr@defopts{vecheight}{\gdef\cgr@vecheight@default{#1}%
+ \gdef\cgr@vecscale@type{2}}
+\cgr@defopts{vecinclude}{\gdef\cgr@vecinclude@default{#1}}
+\cgr@defopts{vecfirst}{\gdef\cgr@vecfirst@default{#1}}
+% \end{macrocode}
+%
+% Next the package options are processed.
+% \begin{macrocode}
+\DeclareOption*{%
+ \expandafter\cgr@setopts\expandafter{\CurrentOption}%
+}
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% \subsection{Basic macro options}
+%
+% Now the \meta{key}|=|\meta{value} pairs for the optional argument of
+% |\includecombinedgraphics| are defined. The following two macro are just
+% shortcuts for this purpose.
+% \begin{macrocode}
+\newcommand*\cgr@defopts@combgrphcs{\define@key{cgr@combgrphcs}}
+\newcommand*\cgr@setopts@combgrphcs{\setkeys{cgr@combgrphcs}}
+% \end{macrocode}
+%
+% The basic macro options set some macros that are executed while tinkering the
+% graphics from its two parts.
+%
+% |textfont| and |textcolor| set |\cgr@textfont| and |\cgr@textcolor| macro,
+% respectively, that will be applied to the text in the \LaTeX{} part of
+% graphics \emph{and} disable further formatting of fonts and colors inside the
+% \LaTeX{} part by overwriting some macros afterwards (if not empty).
+% \begin{macrocode}
+\cgr@defopts@combgrphcs{textfont}{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@empty%
+ \def\cgr@textfont{}%
+ \else%
+ \def\cgr@textfont{%
+ #1%
+ \def\SetFigFont{\cgr@gobblefive}% %% Xfig <= 3.2.4
+ \def\SetFigFontNFSS{\cgr@gobblefive}% %% Xfig >= 3.2.5-alpha
+ }%
+ \fi%
+}
+\cgr@defopts@combgrphcs{textcolor}{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@empty%
+ \def\cgr@textcolor{}%
+ \else%
+ \def\cgr@textcolor{%
+ #1%
+ \def\color{\cgr@gobble@optone}%
+ }%
+ \fi%
+}
+% \end{macrocode}
+%
+% |vecscale| sets the macro |\cgr@vecscale| to the scaling factor. Furthermore,
+% it overwrites |\setlength| and |\includegraphics| in order to apply the
+% scaling factor to the |picture| environment inside the \LaTeX{} part (via
+% |\setlength{\unitlength}...|) and to the |\includegraphics| command for
+% inclusion of the vector graphics part, respectively.
+% \begin{macrocode}
+\cgr@defopts@combgrphcs{vecscale}{%
+ \def\cgr@vecscale{#1}%
+ \def\setlength{\cgr@setlength}%
+ \def\includegraphics{\cgr@includegraphics}%
+}
+% \end{macrocode}
+%
+% |vecwidth| and |vecheight|, respectively, calculate the scaling factor for
+% |vecscale| such that the width or (total) height of the vector graphics part
+% equals the specified \meta{dimen}. |\vecscale| is set to |-1| to indicate
+% that the factor shall be calculated.
+% \begin{macrocode}
+\cgr@defopts@combgrphcs{vecwidth}{%
+ \cgr@vecscale@wd{\cgr@texfile}{\cgr@vecfile}{#1}%
+ \def\setlength{\cgr@setlength}%
+ \def\includegraphics{\cgr@includegraphics}%
+}
+\cgr@defopts@combgrphcs{vecheight}{%
+ \cgr@vecscale@ht{\cgr@texfile}{\cgr@vecfile}{#1}%
+ \def\setlength{\cgr@setlength}%
+ \def\includegraphics{\cgr@includegraphics}%
+}
+% \end{macrocode}
+%
+% |vecinclude| switches between the different \meta{value}s by setting
+% |\cgr@vecinclude| to one of the for macros
+% |\cgr@requires@graphics|\meta{value}.
+% \begin{macrocode}
+\cgr@defopts@combgrphcs{vecinclude}{%
+ \def\cgr@vecinclude{\@nameuse{cgr@requires@graphics#1}}%
+}
+% \end{macrocode}
+%
+% |vecfirst| switches between the \meta{value}s |true| and |false| by setting
+% |\cgr@vecfirsttrue| or |\cgr@vecfirstfalse|, respectively.
+% \begin{macrocode}
+\cgr@defopts@combgrphcs{vecfirst}{%
+ \@nameuse{cgr@vecfirst#1}%
+}
+% \end{macrocode}
+%
+% |vecfile| resets |\cgr@vecfile| that defaults to the mandatory argument of
+% |\includecombinedgraphics| to something else \emph{and} sets |vecinclude| to
+% |overwrite|.
+% \begin{macrocode}
+\cgr@defopts@combgrphcs{vecfile}{%
+ \def\cgr@vecfile{#1}%
+ \cgr@setopts@combgrphcs{vecinclude=overwrite}%
+}
+% \end{macrocode}
+%
+% \subsection{Extended macro options}
+%
+% |\includecombinedgraphics| first tinkers the graphics applying the basic macro
+% options and saves the result in |\cgr@curr@pic|. The extended macro options
+% will redefine |\cgr@curr@pic| in the order of their occurance and put a
+% |\rotatebox|, |\scalebox| or |\resizebox| around it, if all information is
+% already available to do so: |\cgr@curr@pic|
+% $\rightarrow$ |\...box{\cgr@curr@pic}|. Otherwise the \meta{value} will be
+% saved in a macro for later processing (e.\,g., if |hscale| is set without
+% |vscale| being set before).
+%
+% \begin{macrocode}
+\cgr@defopts@combgrphcs{angle}{%
+ \ifx\cgr@curr@scaleopts\@empty%
+ \cgr@raddto@macro[groupfirst]{\cgr@curr@pic}{\rotatebox{#1}}%
+ \else%
+ \cgr@raddto@macro[groupfirst]{\cgr@curr@pic}{]}%
+ \cgr@raddto@macro[expand]{\cgr@curr@pic}{\cgr@curr@scaleopts}%
+ \cgr@raddto@macro{\cgr@curr@pic}{\rotatebox[}%
+ \def\cgr@curr@scaleopts{}%
+ \fi%
+}
+\cgr@defopts@combgrphcs{origin}{\cgr@addto@macro{\cgr@curr@scaleopts}{%
+ origin=#1,}%
+}
+\cgr@defopts@combgrphcs{x}{\cgr@addto@macro{\cgr@curr@scaleopts}{x=#1,}}
+\cgr@defopts@combgrphcs{y}{\cgr@addto@macro{\cgr@curr@scaleopts}{y=#1,}}
+\cgr@defopts@combgrphcs{units}{\cgr@addto@macro{\cgr@curr@scaleopts}{units=#1,}}
+\cgr@defopts@combgrphcs{scale}{%
+ \cgr@raddto@macro[groupfirst]{\cgr@curr@pic}{\scalebox{#1}}%
+}
+\cgr@defopts@combgrphcs{hscale}{%
+ \def\cgr@curr@hscale{#1}%
+ \ifx\cgr@curr@vscale\@empty%
+ \else%
+ \cgr@raddto@macro[groupfirst]{\cgr@curr@pic}{]}%
+ \cgr@raddto@macro[expand]{\cgr@curr@pic}{\cgr@curr@vscale}%
+ \cgr@raddto@macro{\cgr@curr@pic}{[}%
+ \cgr@raddto@macro[expand,groupsecond]{\cgr@curr@pic}{\cgr@curr@hscale}%
+ \cgr@raddto@macro{\cgr@curr@pic}{\scalebox}%
+ \def\cgr@curr@hscale{}%
+ \def\cgr@curr@vscale{}%
+ \fi%
+}
+\cgr@defopts@combgrphcs{vscale}{%
+ \def\cgr@curr@vscale{#1}%
+ \ifx\cgr@curr@hscale\@empty%
+ \else%
+ \cgr@raddto@macro[groupfirst]{\cgr@curr@pic}{]}%
+ \cgr@raddto@macro[expand]{\cgr@curr@pic}{\cgr@curr@vscale}%
+ \cgr@raddto@macro{\cgr@curr@pic}{[}%
+ \cgr@raddto@macro[expand,groupsecond]{\cgr@curr@pic}{\cgr@curr@hscale}%
+ \cgr@raddto@macro{\cgr@curr@pic}{\scalebox}%
+ \def\cgr@curr@hscale{}%
+ \def\cgr@curr@vscale{}%
+ \fi%
+}
+\cgr@defopts@combgrphcs{height}{%
+ \def\cgr@curr@height{#1}%
+ \ifx\cgr@curr@width\@empty%
+ \else%
+ \cgr@raddto@macro[groupfirst,groupsecond,expand]{\cgr@curr@pic}{%
+ \cgr@curr@height%
+ }%
+ \cgr@raddto@macro[groupsecond,expand]{\cgr@curr@pic}{\cgr@curr@width}%
+ \cgr@raddto@macro{\cgr@curr@pic}{\resizebox}%
+ \def\cgr@curr@height{}%
+ \def\cgr@curr@width{}%
+ \fi%
+}
+\cgr@defopts@combgrphcs{totalheight}{%
+ \def\cgr@curr@totalheight{#1}%
+ \ifx\cgr@curr@width\@empty%
+ \else%
+ \cgr@raddto@macro[groupfirst,groupsecond,expand]{\cgr@curr@pic}{%
+ \cgr@curr@totalheight%
+ }%
+ \cgr@raddto@macro[groupsecond,expand]{\cgr@curr@pic}{\cgr@curr@width}%
+ \cgr@raddto@macro{\cgr@curr@pic}{\resizebox*}%
+ \def\cgr@curr@totalheight{}%
+ \def\cgr@curr@width{}%
+ \fi%
+}
+\cgr@defopts@combgrphcs{width}{%
+ \def\cgr@curr@width{#1}%
+ \ifx\cgr@curr@height\@empty%
+ \ifx\cgr@curr@totalheight\@empty%
+ \else%
+ \cgr@raddto@macro[groupfirst,groupsecond,expand]{\cgr@curr@pic}{%
+ \cgr@curr@totalheight%
+ }%
+ \cgr@raddto@macro[groupsecond,expand]{\cgr@curr@pic}{\cgr@curr@width}%
+ \cgr@raddto@macro{\cgr@curr@pic}{\resizebox*}%
+ \def\cgr@curr@totalheight{}%
+ \def\cgr@curr@width{}%
+ \fi%
+ \else%
+ \cgr@raddto@macro[groupfirst,groupsecond,expand]{\cgr@curr@pic}{%
+ \cgr@curr@height%
+ }%
+ \cgr@raddto@macro[groupsecond,expand]{\cgr@curr@pic}{\cgr@curr@width}%
+ \cgr@raddto@macro{\cgr@curr@pic}{\resizebox}%
+ \def\cgr@curr@height{}%
+ \def\cgr@curr@totalheight{}%
+ \def\cgr@curr@width{}%
+ \fi%
+}
+\cgr@defopts@combgrphcs{keepaspectratio}[]{%
+ \ifx\cgr@curr@height\@empty%
+ \ifx\cgr@curr@totalheight\@empty%
+ \ifx\cgr@curr@width\@empty%
+ \else%
+ \cgr@setopts@combgrphcs{height=!}%
+ \fi%
+ \else%
+ \cgr@setopts@combgrphcs{width=!}%
+ \fi%
+ \else%
+ \cgr@setopts@combgrphcs{width=!}%
+ \def\cgr@curr@totalheight{}%
+ \fi%
+}
+% \end{macrocode}
+%
+% \subsection{The macro}
+%
+% First of all, |\cgr@curr@pic| and the |\cgr@requires@graphics...| macros are
+% initialized.
+% \begin{macrocode}
+\long\def\cgr@curr@pic{}
+\newif\ifcgr@requires@graphics\cgr@requires@graphicstrue
+\def\cgr@requires@graphicsauto{}
+\def\cgr@requires@graphicsoverwrite{%
+ \cgr@requires@graphicstrue%
+ \def\includegraphics{\cgr@gobble@optone}%
+}
+% \end{macrocode}
+%
+% Now the macros and |if| for the basic macro options and for temporarily saving
+% \meta{value}s of the extended macro options are initialized.
+% \begin{macrocode}
+\def\cgr@textfont{}
+\def\cgr@textcolor{}
+\def\cgr@vecscale{1}
+\def\cgr@vecinclude{\cgr@requires@graphicsauto}
+\cgr@vecfirsttrue
+\def\cgr@texfile{}
+\def\cgr@vecfile{}
+\def\cgr@curr@hscale{}
+\def\cgr@curr@vscale{}
+\def\cgr@curr@scaleopts{}
+\def\cgr@curr@height{}
+\def\cgr@curr@width{}
+\def\cgr@curr@totalheight{}
+% \end{macrocode}
+%
+% At this point the macro itself is defined.
+% \begin{macrocode}
+\newcommand{\includecombinedgraphics}[2][]{%
+ \begingroup%
+% \end{macrocode}
+%
+% To get to know, whether the vector graphics are already included in the
+% \LaTeX{} parts or not, a check for an appearance of |\includegraphics| in the
+% \LaTeX{} part is performed: the \LaTeX{} parts are expanded inside a box with
+% |\includegraphics| being redefined to set an appropriate conditional (and eat
+% the arguments of |\includegraphics|).
+% \begin{macrocode}
+ \global\cgr@requires@graphicstrue%
+ \setbox\@tempboxa\hbox{%
+ \def\includegraphics{%
+ \global\cgr@requires@graphicsfalse\cgr@gobble@optone%
+ }%
+ \input{#2}%
+ }%
+% \end{macrocode}
+%
+% Now the the macros resulting from the basic macro options, the vector
+% graphics part and the \LaTeX{} part are added to the (empty) |\cgr@curr@pic|
+% macro. We have to distinguish between two cases:
+% (1) If the vector graphics part is included before the \LaTeX{} part
+% (|vecfirst=true|), the vector graphics file will simply be loaded by
+% |\includegraphics| inside a picture environment followed by the \LaTeX{} part
+% included by |\input|. (2) If the vector graphics part is included after the
+% \LaTeX{} part (|vecfirst=false|), the |\includegraphics| macro will be put
+% inside the |picture| environment of the \LaTeX{} part at the offset position
+% passed to the |picture| environment. Therefore, we will have to wrap the
+% |\picture| macro to gain access to the offsets passed to the |picture|
+% environment in the \LaTeX{} part and wrap the |\endpicture| macro to add
+% |\includegraphics| into this |picture| environment.
+% \begin{macrocode}
+ \cgr@addto@macro{\cgr@curr@pic}{%
+ %% from basic macro options
+ \cgr@vecinclude\cgr@textfont\cgr@textcolor%
+ %% inclusion of vector graphics part
+ \ifcgr@requires@graphics%
+ \ifcgr@vecfirst%
+ \begin{picture}(0,0)%
+ \cgr@includegraphics@orig[scale=\cgr@vecscale]{\cgr@vecfile}%
+ \end{picture}%
+ \else%
+ \def\picture{\cgr@picture}%
+ \def\endpicture{%
+ \put(\cgr@picture@xoffs,\cgr@picture@yoffs)%
+ {\cgr@includegraphics@orig[scale=\cgr@vecscale]{\cgr@vecfile}}%
+ \cgr@endpicture@orig%
+ }%
+ \fi%
+ \fi%
+ %% inclusion of \LaTeX{} part
+ \input{#2}%
+ }%
+% \end{macrocode}
+%
+% Afterwards, a macro containing the name of the \LaTeX{} and vector graphics
+% part, respectively, is initialized.
+% \begin{macrocode}
+ \def\cgr@vecfile{#2}%
+ \def\cgr@texfile{#2}%
+% \end{macrocode}
+%
+% If set, the package options will be processed. (Suggestions for easier
+% handling of package options are welcome.)
+% \begin{macrocode}
+ \if0\cgr@vecscale@type%
+ \@ifundefined{cgr@vecscale@default}{}{%
+ \cgr@setopts@combgrphcs{vecscale=\cgr@vecscale@default}%
+ }%
+ \fi%
+ \if1\cgr@vecscale@type%
+ \@ifundefined{cgr@vecwidth@default}{}{%
+ \cgr@setopts@combgrphcs{vecwidth=\cgr@vecwidth@default}%
+ }%
+ \fi%
+ \if2\cgr@vecscale@type%
+ \@ifundefined{cgr@vecheight@default}{}{%
+ \cgr@setopts@combgrphcs{vecheight=\cgr@vecheight@default}%
+ }%
+ \fi%
+ \@ifundefined{cgr@textfont@default}{}{%
+ \cgr@setopts@combgrphcs{textfont=\cgr@textfont@default}%
+ }%
+ \@ifundefined{cgr@textcolor@default}{}{%
+ \cgr@setopts@combgrphcs{textcolor=\cgr@textcolor@default}%
+ }%
+ \@ifundefined{cgr@vecinclude@default}{}{%
+ \cgr@setopts@combgrphcs{vecinclude=\cgr@vecinclude@default}%
+ }%
+ \@ifundefined{cgr@vecfirst@default}{}{%
+ \cgr@setopts@combgrphcs{vecfirst=\cgr@vecfirst@default}%
+ }%
+% \end{macrocode}
+%
+% Now, the options passed the the macro are processed.
+% \begin{macrocode}
+ \cgr@setopts@combgrphcs{#1}%
+% \end{macrocode}
+%
+% Finally, the macro |\cgr@curr@pic| is complete and can be output.
+% \begin{macrocode}
+ \cgr@curr@pic%
+ \endgroup%
+}
+% \end{macrocode}
+%
+% \subsection{Helper macros}
+%
+% This macro eats five arguments (analogous to |\@gobble| or |\@gobbletwo| from
+% the \LaTeX{} kernel).
+% \begin{macrocode}
+\long\def\cgr@gobblefive#1#2#3#4#5{}
+% \end{macrocode}
+%
+% This macro eats all stars (if any), all arguments in square brackets (if any)
+% and one mandatory argument.
+% \begin{macrocode}
+\long\def\cgr@gobble@optone{\@ifstar{\cgr@gobble@optone}{\cgr@gobble@optone@}}
+\long\def\cgr@gobble@optone@{\@ifnextchar [{\cgr@gobble@optone@@}{\@gobble}}
+\long\def\cgr@gobble@optone@@[#1]{\cgr@gobble@optone@}
+% \end{macrocode}
+%
+% In order to rescale the |picture| environment inside the \LaTeX{} part, the
+% |\setlength{\unitlength}{|\meta{some dimen}|}| must be changed to scale
+% \meta{some dimen} by |\cgr@vecscale| at its first appearance in the \LaTeX{}
+% part. This is the |\setlength| substitute to do so.
+% \begin{macrocode}
+\let\cgr@setlength@orig=\setlength
+\def\cgr@setlength#1#2{%
+ \ifx#1\unitlength%
+ \@tempdima=#2%
+ \cgr@setlength@orig{#1}{\cgr@vecscale\@tempdima}%
+ \def\setlength{\cgr@setlength@orig}%
+ \else%
+ \cgr@setlength@orig{#1}{#2}%
+ \fi%
+}
+% \end{macrocode}
+%
+% Additionally, a |scale=\cgr@vecscale| option must be passed to the
+% |\includegraphics| macro inside the \LaTeX{} part. This is the substitute of
+% |\includegraphics| for this purpose.
+% \begin{macrocode}
+\let\cgr@includegraphics@orig=\includegraphics
+\def\cgr@includegraphics{%
+ \@ifstar{%
+ \cgr@includegraphics@s@%
+ }{%
+ \cgr@includegraphics@%
+ }%
+}
+\def\cgr@includegraphics@{%
+ \@ifnextchar [{%
+ \cgr@includegraphics@@%
+ }{%
+ \cgr@includegraphics@orig[scale=\cgr@vecscale]%
+ }%
+}
+\def\cgr@includegraphics@@[#1]{%
+ \@ifnextchar [{%
+ \cgr@includegraphics@@@[#1]%
+ }{%
+ \cgr@includegraphics@orig[#1,scale=\cgr@vecscale]%
+ }%
+}
+\def\cgr@includegraphics@@@[#1][#2]{%
+ \cgr@includegraphics@orig[#1][#2,scale=\cgr@vecscale]%
+}
+\def\cgr@includegraphics@s@{%
+ \@ifnextchar [{%
+ \cgr@includegraphics@s@@%
+ }{%
+ \cgr@includegraphics@orig*[scale=\cgr@vecscale]%
+ }%
+}
+\def\cgr@includegraphics@s@@[#1]{%
+ \@ifnextchar [{%
+ \cgr@includegraphics@s@@@[#1]%
+ }{%
+ \cgr@includegraphics@orig*[#1,scale=\cgr@vecscale]%
+ }%
+}
+\def\cgr@includegraphics@s@@@[#1][#2]{%
+ \cgr@includegraphics@orig*[#1][#2,scale=\cgr@vecscale]%
+}
+% \end{macrocode}
+%
+% To play the trick of including the vector graphics part after the \LaTeX{}
+% part (|vecfirst=false|), we need to know the offset passed to the picture
+% environment in the \LaTeX{} part. Therefore, the |\picture| macro is
+% redefined.
+% \begin{macrocode}
+\let\cgr@picture@orig=\picture
+\let\cgr@endpicture@orig=\endpicture
+\long\def\cgr@picture(#1,#2){%
+ \@ifnextchar({%
+ \cgr@picture@(#1,#2)%
+ }{%
+ \cgr@picture@(#1,#2)(0,0)%
+ }%
+}
+\def\cgr@picture@(#1,#2)(#3,#4){%
+ \def\cgr@picture@xoffs{#3}%
+ \def\cgr@picture@yoffs{#4}%
+ \cgr@picture@orig(#1,#2)(#3,#4)%
+}
+% \end{macrocode}
+%
+% This macro is identical to |\l@addto@macro| from \textsf{koma-script bundle}.
+% It adds the stuff passed to its second argument to the end of the macro from
+% its first argument.
+% \begin{macrocode}
+\newcommand{\cgr@addto@macro}[2]{%
+ \begingroup\toks@\expandafter{#1#2}%
+ \edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}%
+ \@tempa%
+}
+% \end{macrocode}
+%
+% The next macro is similar, but adds the stuff passed to its second argument
+% to the \emph{beginning} of the macro from its first argument. An optional
+% argument allows for fine tuning: A comma-separated list containing |expand|
+% (expands the stuff from the second argument before adding it), |groupfirst|,
+% and/or |groupsecond| (puts the stuff from the first/second argument in
+% braces before adding) may be passed.
+% \begin{macrocode}
+\newcommand*\cgr@defopts@raddto{\define@key{cgr@raddto}}
+\newcommand*\cgr@setopts@raddto{\setkeys{cgr@raddto}}
+\newif\ifcgr@raddto@expand\cgr@raddto@expandfalse
+\newif\ifcgr@raddto@groupfirst\cgr@raddto@groupfirstfalse
+\newif\ifcgr@raddto@groupsecond\cgr@raddto@groupsecondfalse
+\cgr@defopts@raddto{expand}[true]{\@nameuse{cgr@raddto@expand#1}}
+\cgr@defopts@raddto{groupfirst}[true]{\@nameuse{cgr@raddto@groupfirst#1}}
+\cgr@defopts@raddto{groupsecond}[true]{\@nameuse{cgr@raddto@groupsecond#1}}
+\newtoks\cgr@token@a
+\newtoks\cgr@token@b
+\newcommand{\cgr@raddto@macro}[3][]{%
+ \begingroup%
+ \cgr@setopts@raddto{#1}%
+ \cgr@token@a\expandafter{#2}%
+ \ifcgr@raddto@expand%
+ \cgr@token@b\expandafter{#3}%
+ \else%
+ \cgr@token@b{#3}%
+ \fi%
+ \ifcgr@raddto@groupfirst%
+ \ifcgr@raddto@groupsecond%
+ \edef\@tempa{\endgroup%
+ \def\noexpand#2{{\the\cgr@token@b}{\the\cgr@token@a}}%
+ }%
+ \else%
+ \edef\@tempa{\endgroup%
+ \def\noexpand#2{\the\cgr@token@b{\the\cgr@token@a}}%
+ }%
+ \fi%
+ \else%
+ \ifcgr@raddto@groupsecond%
+ \edef\@tempa{\endgroup%
+ \def\noexpand#2{{\the\cgr@token@b}\the\cgr@token@a}%
+ }%
+ \else%
+ \edef\@tempa{\endgroup%
+ \def\noexpand#2{\the\cgr@token@b\the\cgr@token@a}%
+ }%
+ \fi%
+ \fi%
+ \@tempa%
+}
+% \end{macrocode}
+%
+% The way of calculating the scaling factor for |vecwidth| and |vecheight| is
+% a simplified and adapted version of |\ratio| from the |calc.sty| package.
+% First, the width or (total) height of the original graphics part is measured.
+% In order to do this, the graphics are put into a box.
+% Afterwards, the places before the decimal point are calculated by \TeX{}'s
+% built-in integer division. Finally, the decimal places are calculated with
+% an algorithm as division has been taught at school.
+% \begin{macrocode}
+\newcount\cgr@tempdigit
+\newcommand*\cgr@vecscale@wd[3]{%
+ \cgr@vecscale@graphicsbox{#1}{#2}%
+ \cgr@vecscale@calc{\wd\@tempboxa}{#3}%
+}
+\newcommand*\cgr@vecscale@ht[3]{%
+ \cgr@vecscale@graphicsbox{#1}{#2}%
+ \@tempdimc=\ht\@tempboxa%
+ \advance\@tempdimc by\dp\@tempboxa%
+ \cgr@vecscale@calc{\@tempdimc}{#3}%
+}
+\newcommand*\cgr@vecscale@graphicsbox[2]{%
+ \setbox\@tempboxa\hbox{%
+ \begingroup%
+ \def\setlength{\cgr@setlength@orig}%
+ \def\includegraphics{\cgr@gobble@optone}%
+ \input{#1}%
+ \endgroup%
+ }%
+}
+\newcommand*\cgr@vecscale@calc[2]{%
+ \@tempdimb=#1%
+ \@tempcntb=\@tempdimb%
+ \@tempdima=#2%
+ \@tempcnta=\@tempdima%
+ \cgr@tempdigit=\@tempcnta%
+ \divide\cgr@tempdigit by\@tempcntb%
+ \edef\cgr@vecscale{\the\cgr@tempdigit.}%
+ \cgr@next@digit\cgr@next@digit\cgr@next@digit%
+ \cgr@next@digit\cgr@next@digit\cgr@next@digit%
+}
+\newcommand*\cgr@next@digit{%
+ \multiply\cgr@tempdigit by\@tempcntb%
+ \advance\@tempcnta by-\cgr@tempdigit%
+ \multiply\@tempcnta by10%
+ \cgr@tempdigit=\@tempcnta%
+ \divide\cgr@tempdigit by\@tempcntb%
+ \edef\cgr@vecscale{\cgr@vecscale\the\cgr@tempdigit}%
+}
+% \end{macrocode}
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \Finale
+%
+\endinput
diff --git a/macros/latex/contrib/combinedgraphics/combinedgraphics.ins b/macros/latex/contrib/combinedgraphics/combinedgraphics.ins
new file mode 100644
index 0000000000..09dde658b8
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/combinedgraphics.ins
@@ -0,0 +1,78 @@
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% installation file for combinedgraphics package
+%
+% Copyright 2009 Christian Schneider <software(at)chschneider(dot)eu>
+%
+% This file is part of combinedgraphics.
+%
+% combinedgraphics is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License version 3 as
+% published by the Free Software Foundation, not any later version.
+%
+% combinedgraphics 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 combinedgraphics. If not, see <http://www.gnu.org/licenses/>.
+%
+% WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS!
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\input docstrip.tex
+%\keepsilent
+
+\usedir{tex/latex/combinedgraphics}
+
+\preamble
+
+This is a generated file.
+
+Copyright 2009 Christian Schneider <software(at)chschneider(dot)eu>
+
+ion@addto@macro: identical to l@addto@macro from koma-script
+ bundle v2.9t
+Copyright 1994-2004 Markus Kohm and Frank Neukam
+
+Thanks to Markus Kohm for permitting to use his code in this package.
+Please do not bother Markus with questions or bugs concering this package!
+
+This file is part of combinedgraphics.
+
+combinedgraphics is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 3 as
+published by the Free Software Foundation, not any later version.
+
+combinedgraphics 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 combinedgraphics. If not, see <http://www.gnu.org/licenses/>.
+
+WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS!
+
+\endpreamble
+
+\generate{\file{combinedgraphics.sty}{\from{combinedgraphics.dtx}{package}}}
+
+\obeyspaces
+\Msg{****************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the *}
+\Msg{* following file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* combinedgraphics.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file *}
+\Msg{* combinedgraphics.dtx through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{****************************************************}
+
+\endbatchfile
diff --git a/macros/latex/contrib/combinedgraphics/combinedgraphics.pdf b/macros/latex/contrib/combinedgraphics/combinedgraphics.pdf
new file mode 100644
index 0000000000..4261218a7f
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/combinedgraphics.pdf
Binary files differ
diff --git a/macros/latex/contrib/combinedgraphics/test/Makefile b/macros/latex/contrib/combinedgraphics/test/Makefile
new file mode 100644
index 0000000000..5107d5a91e
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/Makefile
@@ -0,0 +1,88 @@
+#
+# Makefile for tests of combinedgraphics package
+#
+# Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu>
+#
+# This file is part of combinedgraphics.
+#
+# combinedgraphics is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 3 as
+# published by the Free Software Foundation, not any later version.
+#
+# combinedgraphics 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 combinedgraphics. If not, see <http://www.gnu.org/licenses/>.
+#
+# WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS!
+#
+
+# input files
+SRCFILE := combinedgraphics_test.tex
+STYFILES := ../combinedgraphics.sty
+FIGFILES := xfig325.fig
+PLTFILES := gnuplot42.plt
+
+# installation directories
+DESTDIR := $(HOME)/.texmf
+DOCDIR := $(DESTDIR)/doc/latex/$(PACKAGE)/test
+SRCDIR := $(DESTDIR)/source/latex/$(PACKAGE)/test
+
+# output files
+PDFFILE := $(patsubst %.tex,%.pdf,$(SRCFILE))
+TEXGRAPHICS := $(patsubst %.fig,%.tex,$(FIGFILES)) \
+ $(patsubst %.plt,%.tex,$(PLTFILES))
+EPSGRAPHICS := $(patsubst %.fig,%.eps,$(FIGFILES)) \
+ $(patsubst %.plt,%.eps,$(PLTFILES))
+PDFGRAPHICS := $(patsubst %.fig,%.pdf,$(FIGFILES)) \
+ $(patsubst %.plt,%.pdf,$(PLTFILES))
+
+# required tools
+PDFLATEX := pdflatex
+FIG2DEV := fig2dev
+GNUPLOT := gnuplot
+EPSTOPDF := epstopdf
+
+# environment variables of (pdf)latex
+export TEXINPUTS := .:..:$(TEXINPUTS)
+export TEXPICTS := .:..:$(TEXPICTS)
+
+.PHONY: all test install clean distclean force
+
+all: test
+
+%.tex: %.fig
+ $(FIG2DEV) -L pstex_t $< $@
+
+%.eps: %.fig
+ $(FIG2DEV) -L pstex $< $@
+
+%.tex %.eps: %.plt
+ $(GNUPLOT) $<
+
+%.pdf: %.eps
+ $(EPSTOPDF) --outfile=$@ $<
+
+$(PDFFILE): %.pdf: %.tex $(STYFILES) $(TEXGRAPHICS) $(PDFGRAPHICS)
+ $(PDFLATEX) -interaction=nonstopmode $<
+ $(PDFLATEX) -interaction=nonstopmode $<
+ $(PDFLATEX) -interaction=nonstopmode $<
+
+test: $(PDFFILE) $(EPSGRAPHICS)
+
+install:
+ mkdir -p $(DOCDIR) $(SRCDIR)
+ install -m 644 $(PDFFILE) $(DOCDIR)
+ install -m 644 $(SRCFILE) $(FIGFILES) $(PLTFILES) Makefile \
+ $(TEXGRAPHICS) $(EPSGRAPHICS) $(PDFGRAPHICS) $(SRCDIR)
+
+clean:
+ $(RM) *.aux *.glo *.gls *.idx *.ilg *.ind *.log *.toc *~
+
+distclean: clean
+
+mrproper: distclean
+ $(RM) $(PDFFILE) $(TEXGRAPHICS) $(EPSGRAPHICS) $(PDFGRAPHICS)
diff --git a/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.pdf b/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.pdf
new file mode 100644
index 0000000000..fa8ba4d747
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.pdf
Binary files differ
diff --git a/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.tex b/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.tex
new file mode 100644
index 0000000000..e67a523afe
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/combinedgraphics_test.tex
@@ -0,0 +1,226 @@
+%
+% LaTeX test file for combinedgraphics package
+%
+% Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu>
+%
+% This file is part of combinedgraphics.
+%
+% combinedgraphics is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License version 3 as
+% published by the Free Software Foundation, not any later version.
+%
+% combinedgraphics 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 combinedgraphics. If not, see <http://www.gnu.org/licenses/>.
+%
+% WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS!
+%
+
+\documentclass[DIV12]{scrartcl}
+
+\usepackage{combinedgraphics}
+%\usepackage{combinedgraphics}
+
+\newcommand*\mycolor{\color{blue}}
+\newcommand*\myfont{\bfseries\Large}
+\newcommand*\combinput[1]{%
+ \begin{picture}(0,0)%
+ \includegraphics{#1}%
+ \end{picture}%
+ \input{#1}%
+}
+
+\begin{document}
+ \section*{Test: no macro parameters}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics{xfig325}}%
+ \fbox{\includecombinedgraphics{gnuplot42}}\\[3ex]
+ The default output generated by manually including the graphics is given in
+ the first line and the output of \texttt{\textbackslash
+ includecombinedgraphics} with the options indicated in the headline is given
+ in the next line. Here, we should see exactly the same output in both lines,
+ because \texttt{\textbackslash includecombinedgraphics} is used without any
+ parameters.
+
+ \clearpage
+
+ \section*{Test: \texttt{textfont=\textbackslash bfseries\textbackslash
+ Large},\texttt{textcolor=\textbackslash color\{blue\}}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[textfont=\myfont,textcolor=\mycolor]{xfig325}}%
+ \fbox{\includecombinedgraphics[textfont=\myfont,textcolor=\mycolor]%
+ {gnuplot42}}\\[3ex]
+ The font size is increased, the font series changed to bold-face and the color
+ to blue. Note, that the vector graphics part is not affected.
+
+ \clearpage
+
+ \section*{Test: \texttt{vecscale=1.2}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecscale=1.2]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecscale=1.2]{gnuplot42}}\\[3ex]
+ The vector graphics part is scaled by a factor of $1.2$. Note, that the text
+ positions are changed accordingly, but the font and color are not affected.
+
+ \clearpage
+
+ \section*{Test: \texttt{vecwidth=7cm}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecwidth=7cm]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecwidth=7cm]{gnuplot42}}\\
+ \fbox{\rlap{\raise 5pt\hbox{length: 7cm}}\rule{7cm}{1pt}}%
+ \fbox{\rlap{\raise 5pt\hbox{length: 7cm}}\rule{7cm}{1pt}}\\[3ex]
+ These examples are similar to the \texttt{vecscale=\ldots} examples, but the
+ scaling factor is calculated automatically such that the graphics have a
+ width of $7$cm.
+
+ \clearpage
+
+ \section*{Test: \texttt{vecheight=6cm}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\rotatebox{90}{length: 6cm}\rule{1pt}{6cm}}%
+ \fbox{\includecombinedgraphics[vecheight=6cm]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecheight=6cm]{gnuplot42}}\\[3ex]
+ Similiar example, but in this case the height is specified.
+
+ \clearpage
+
+ \section*{Test: \texttt{vecfile=\ldots}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecfile=gnuplot42]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecfile=xfig325]{gnuplot42}}\\[3ex]
+ Here, the vector graphics parts of the two graphics are interchanged (at the
+ inclusion of the first graphics file, the vector graphics part of the second
+ graphics file is passed to its \texttt{vecfile} parameter and vice versa).
+ This leads to some ``chaotic'' output, but the \texttt{vecfile} parameter
+ works as expected.
+
+ \clearpage
+
+ \section*{Test: \texttt{vecinclude=false}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecinclude=false]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecinclude=false]{gnuplot42}}\\[3ex]
+ Here, the automatic inclusion of the vector graphics part is disabled. As
+ the \LaTeX{} part of Xfig graphics do not include it (left), the vector
+ graphics part is not shown. In contrast gnuplot includes the vector graphics
+ part in the \LaTeX{} part (right).
+
+ \clearpage
+
+ \section*{Test: \texttt{vecinclude=overwrite}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecinclude=overwrite]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecinclude=overwrite]{gnuplot42}}\\[3ex]
+ The inclusion of the vector graphics part by the \LaTeX{} part is disabled
+ (if any) and \texttt{\textbackslash includecombinedgraphics} generates its
+ own code for the inclusion. In this case the vector graphics part is included
+ first, because \texttt{vecfirst=true} is the default. Note, that the label
+ ``filled'' in the gnuplot graphics has become visible. (In gnuplot's
+ \LaTeX{} parts labels are output before including the vector graphics part
+ and, hence, can become invisible under filled curves.)
+
+ \clearpage
+
+ \section*{Test: \texttt{vecfirst=false,vecinclude=overwrite}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[vecfirst=false,vecinclude=overwrite]{xfig325}}%
+ \fbox{\includecombinedgraphics[vecfirst=false,vecinclude=overwrite]%
+ {gnuplot42}}\\[3ex]
+ This example is similar to the previous one, but now the vector graphics
+ part is forced to be included after the \LaTeX{} part. Note, that the text
+ in the left one is hidden and in addition to the label ``filled'', parts
+ of the axes labels etc. are hidden in the right one.
+
+ \clearpage
+
+ \section*{Test: \texttt{angle=90}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[angle=90]{xfig325}}%
+ \fbox{\includecombinedgraphics[angle=90]{gnuplot42}}\\[3ex]
+ The graphics are rotated by 90 degrees.
+
+ \clearpage
+
+ \section*{Test: \texttt{scale=0.8}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[scale=0.8]{xfig325}}%
+ \fbox{\includecombinedgraphics[scale=0.8]{gnuplot42}}\\[3ex]
+ The \emph{whole} graphics (vector graphics part and font) are scaled by a
+ factor of $0.8$.
+
+ \clearpage
+
+ \section*{Test: \texttt{hscale=1.2,vscale=0.8}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[hscale=1.2,vscale=0.8]{xfig325}}%
+ \fbox{\includecombinedgraphics[hscale=1.2,vscale=0.8]{gnuplot42}}\\[3ex]
+ Similar to the example before, by the horizontal and vertical scaling factors
+ differ.
+
+ \clearpage
+
+ \section*{Test: \texttt{width=0.49\textbackslash textwidth,height=5cm}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[width=0.49\textwidth,height=5cm]{xfig325}}%
+ \fbox{\includecombinedgraphics[width=0.49\textwidth,height=5cm]%
+ {gnuplot42}}\\[3ex]
+ Similar to the example before, but instead of scaling factors explicit
+ heights and widths are given.
+
+ \clearpage
+
+ \section*{Test: \texttt{width=0.49\textbackslash textwidth,keepaspectratio}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[width=0.49\textwidth,keepaspectratio]%
+ {xfig325}}%
+ \fbox{\includecombinedgraphics[width=0.49\textwidth,keepaspectratio]%
+ {gnuplot42}}\\[3ex]
+ Again, similar as the examples before, but the new height is automatically
+ calculated such that the aspect ratio of the graphics does not change.
+
+ \clearpage
+
+ \section*{Test: \texttt{angle=30,scale=0.75,angle=15}}
+ \noindent
+ \fbox{\combinput{xfig325}}%
+ \fbox{\input{gnuplot42}}\\[3ex]
+ \fbox{\includecombinedgraphics[angle=30,scale=0.75,angle=15]{xfig325}}%
+ \fbox{\includecombinedgraphics[angle=30,scale=0.75,angle=15]{gnuplot42}}%
+ \\[3ex]
+ Here, a combination of different rotations and scalings is shown. In contrast
+ to other parameters, some (like \texttt{angle} and \texttt{scale}) do not
+ overwrite previously specified parameters, but they accumulate.
+\end{document}
diff --git a/macros/latex/contrib/combinedgraphics/test/gnuplot42.eps b/macros/latex/contrib/combinedgraphics/test/gnuplot42.eps
new file mode 100644
index 0000000000..21884fd0bf
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/gnuplot42.eps
@@ -0,0 +1,655 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: gnuplot42.tex
+%%Creator: gnuplot 4.4 patchlevel 0
+%%CreationDate: Fri Jul 13 20:19:16 2012
+%%DocumentFonts:
+%%BoundingBox: 50 50 230 176
+%%EndComments
+%%BeginProlog
+/gnudict 256 dict def
+gnudict begin
+%
+% The following true/false flags may be edited by hand if desired.
+% The unit line width and grayscale image gamma correction may also be changed.
+%
+/Color false def
+/Blacktext true def
+/Solid false def
+/Dashlength 1 def
+/Landscape false def
+/Level1 false def
+/Rounded false def
+/ClipToBoundingBox false def
+/TransparentPatterns false def
+/gnulinewidth 5.000 def
+/userlinewidth gnulinewidth def
+/Gamma 1.0 def
+%
+/vshift -73 def
+/dl1 {
+ 10.0 Dashlength mul mul
+ Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if
+} def
+/dl2 {
+ 10.0 Dashlength mul mul
+ Rounded { currentlinewidth 0.75 mul add } if
+} def
+/hpt_ 31.5 def
+/vpt_ 31.5 def
+/hpt hpt_ def
+/vpt vpt_ def
+Level1 {} {
+/SDict 10 dict def
+systemdict /pdfmark known not {
+ userdict /pdfmark systemdict /cleartomark get put
+} if
+SDict begin [
+ /Title (gnuplot42.tex)
+ /Subject (gnuplot plot)
+ /Creator (gnuplot 4.4 patchlevel 0)
+ /Author (chsch)
+% /Producer (gnuplot)
+% /Keywords ()
+ /CreationDate (Fri Jul 13 20:19:16 2012)
+ /DOCINFO pdfmark
+end
+} ifelse
+/doclip {
+ ClipToBoundingBox {
+ newpath 50 50 moveto 230 50 lineto 230 176 lineto 50 176 lineto closepath
+ clip
+ } if
+} def
+%
+% Gnuplot Prolog Version 4.4 (January 2010)
+%
+%/SuppressPDFMark true def
+%
+/M {moveto} bind def
+/L {lineto} bind def
+/R {rmoveto} bind def
+/V {rlineto} bind def
+/N {newpath moveto} bind def
+/Z {closepath} bind def
+/C {setrgbcolor} bind def
+/f {rlineto fill} bind def
+/Gshow {show} def % May be redefined later in the file to support UTF-8
+/vpt2 vpt 2 mul def
+/hpt2 hpt 2 mul def
+/Lshow {currentpoint stroke M 0 vshift R
+ Blacktext {gsave 0 setgray show grestore} {show} ifelse} def
+/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R
+ Blacktext {gsave 0 setgray show grestore} {show} ifelse} def
+/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R
+ Blacktext {gsave 0 setgray show grestore} {show} ifelse} def
+/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def
+ /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def
+/DL {Color {setrgbcolor Solid {pop []} if 0 setdash}
+ {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def
+/BL {stroke userlinewidth 2 mul setlinewidth
+ Rounded {1 setlinejoin 1 setlinecap} if} def
+/AL {stroke userlinewidth 2 div setlinewidth
+ Rounded {1 setlinejoin 1 setlinecap} if} def
+/UL {dup gnulinewidth mul /userlinewidth exch def
+ dup 1 lt {pop 1} if 10 mul /udl exch def} def
+/PL {stroke userlinewidth setlinewidth
+ Rounded {1 setlinejoin 1 setlinecap} if} def
+% Default Line colors
+/LCw {1 1 1} def
+/LCb {0 0 0} def
+/LCa {0 0 0} def
+/LC0 {1 0 0} def
+/LC1 {0 1 0} def
+/LC2 {0 0 1} def
+/LC3 {1 0 1} def
+/LC4 {0 1 1} def
+/LC5 {1 1 0} def
+/LC6 {0 0 0} def
+/LC7 {1 0.3 0} def
+/LC8 {0.5 0.5 0.5} def
+% Default Line Types
+/LTw {PL [] 1 setgray} def
+/LTb {BL [] LCb DL} def
+/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def
+/LT0 {PL [] LC0 DL} def
+/LT1 {PL [4 dl1 2 dl2] LC1 DL} def
+/LT2 {PL [2 dl1 3 dl2] LC2 DL} def
+/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def
+/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def
+/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def
+/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def
+/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def
+/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def
+/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def
+/Dia {stroke [] 0 setdash 2 copy vpt add M
+ hpt neg vpt neg V hpt vpt neg V
+ hpt vpt V hpt neg vpt V closepath stroke
+ Pnt} def
+/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V
+ currentpoint stroke M
+ hpt neg vpt neg R hpt2 0 V stroke
+ } def
+/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
+ 0 vpt2 neg V hpt2 0 V 0 vpt2 V
+ hpt2 neg 0 V closepath stroke
+ Pnt} def
+/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M
+ hpt2 vpt2 neg V currentpoint stroke M
+ hpt2 neg 0 R hpt2 vpt2 V stroke} def
+/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M
+ hpt neg vpt -1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt 1.62 mul V closepath stroke
+ Pnt} def
+/Star {2 copy Pls Crs} def
+/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M
+ 0 vpt2 neg V hpt2 0 V 0 vpt2 V
+ hpt2 neg 0 V closepath fill} def
+/TriUF {stroke [] 0 setdash vpt 1.12 mul add M
+ hpt neg vpt -1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt 1.62 mul V closepath fill} def
+/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
+ hpt neg vpt 1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt -1.62 mul V closepath stroke
+ Pnt} def
+/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M
+ hpt neg vpt 1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt -1.62 mul V closepath fill} def
+/DiaF {stroke [] 0 setdash vpt add M
+ hpt neg vpt neg V hpt vpt neg V
+ hpt vpt V hpt neg vpt V closepath fill} def
+/Pent {stroke [] 0 setdash 2 copy gsave
+ translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
+ closepath stroke grestore Pnt} def
+/PentF {stroke [] 0 setdash gsave
+ translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
+ closepath fill grestore} def
+/Circle {stroke [] 0 setdash 2 copy
+ hpt 0 360 arc stroke Pnt} def
+/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def
+/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def
+/C1 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 90 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C2 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 90 180 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C3 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 180 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C4 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 180 270 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C5 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 90 arc
+ 2 copy moveto
+ 2 copy vpt 180 270 arc closepath fill
+ vpt 0 360 arc} bind def
+/C6 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 90 270 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C7 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 270 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C8 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 270 360 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C9 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 270 450 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
+ 2 copy moveto
+ 2 copy vpt 90 180 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C11 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 180 arc closepath fill
+ 2 copy moveto
+ 2 copy vpt 270 360 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C12 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 180 360 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C13 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 0 90 arc closepath fill
+ 2 copy moveto
+ 2 copy vpt 180 360 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/C14 {BL [] 0 setdash 2 copy moveto
+ 2 copy vpt 90 360 arc closepath fill
+ vpt 0 360 arc} bind def
+/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
+ vpt 0 360 arc closepath} bind def
+/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
+ neg 0 rlineto closepath} bind def
+/Square {dup Rec} bind def
+/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def
+/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def
+/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def
+/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
+/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def
+/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
+/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill
+ exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
+/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def
+/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
+ 2 copy vpt Square fill Bsquare} bind def
+/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def
+/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def
+/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
+ Bsquare} bind def
+/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
+ Bsquare} bind def
+/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def
+/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
+ 2 copy vpt Square fill Bsquare} bind def
+/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
+ 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
+/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def
+/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def
+/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def
+/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def
+/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def
+/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def
+/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def
+/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def
+/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def
+/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def
+/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def
+/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def
+/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def
+/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def
+/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def
+/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def
+/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def
+/DiaE {stroke [] 0 setdash vpt add M
+ hpt neg vpt neg V hpt vpt neg V
+ hpt vpt V hpt neg vpt V closepath stroke} def
+/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M
+ 0 vpt2 neg V hpt2 0 V 0 vpt2 V
+ hpt2 neg 0 V closepath stroke} def
+/TriUE {stroke [] 0 setdash vpt 1.12 mul add M
+ hpt neg vpt -1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt 1.62 mul V closepath stroke} def
+/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M
+ hpt neg vpt 1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt -1.62 mul V closepath stroke} def
+/PentE {stroke [] 0 setdash gsave
+ translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
+ closepath stroke grestore} def
+/CircE {stroke [] 0 setdash
+ hpt 0 360 arc stroke} def
+/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def
+/DiaW {stroke [] 0 setdash vpt add M
+ hpt neg vpt neg V hpt vpt neg V
+ hpt vpt V hpt neg vpt V Opaque stroke} def
+/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M
+ 0 vpt2 neg V hpt2 0 V 0 vpt2 V
+ hpt2 neg 0 V Opaque stroke} def
+/TriUW {stroke [] 0 setdash vpt 1.12 mul add M
+ hpt neg vpt -1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt 1.62 mul V Opaque stroke} def
+/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M
+ hpt neg vpt 1.62 mul V
+ hpt 2 mul 0 V
+ hpt neg vpt -1.62 mul V Opaque stroke} def
+/PentW {stroke [] 0 setdash gsave
+ translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
+ Opaque stroke grestore} def
+/CircW {stroke [] 0 setdash
+ hpt 0 360 arc Opaque stroke} def
+/BoxFill {gsave Rec 1 setgray fill grestore} def
+/Density {
+ /Fillden exch def
+ currentrgbcolor
+ /ColB exch def /ColG exch def /ColR exch def
+ /ColR ColR Fillden mul Fillden sub 1 add def
+ /ColG ColG Fillden mul Fillden sub 1 add def
+ /ColB ColB Fillden mul Fillden sub 1 add def
+ ColR ColG ColB setrgbcolor} def
+/BoxColFill {gsave Rec PolyFill} def
+/PolyFill {gsave Density fill grestore grestore} def
+/h {rlineto rlineto rlineto gsave closepath fill grestore} bind def
+%
+% PostScript Level 1 Pattern Fill routine for rectangles
+% Usage: x y w h s a XX PatternFill
+% x,y = lower left corner of box to be filled
+% w,h = width and height of box
+% a = angle in degrees between lines and x-axis
+% XX = 0/1 for no/yes cross-hatch
+%
+/PatternFill {gsave /PFa [ 9 2 roll ] def
+ PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate
+ PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec
+ gsave 1 setgray fill grestore clip
+ currentlinewidth 0.5 mul setlinewidth
+ /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def
+ 0 0 M PFa 5 get rotate PFs -2 div dup translate
+ 0 1 PFs PFa 4 get div 1 add floor cvi
+ {PFa 4 get mul 0 M 0 PFs V} for
+ 0 PFa 6 get ne {
+ 0 1 PFs PFa 4 get div 1 add floor cvi
+ {PFa 4 get mul 0 2 1 roll M PFs 0 V} for
+ } if
+ stroke grestore} def
+%
+/languagelevel where
+ {pop languagelevel} {1} ifelse
+ 2 lt
+ {/InterpretLevel1 true def}
+ {/InterpretLevel1 Level1 def}
+ ifelse
+%
+% PostScript level 2 pattern fill definitions
+%
+/Level2PatternFill {
+/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8}
+ bind def
+/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke}
+>> matrix makepattern
+/Pat1 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke
+ 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke}
+>> matrix makepattern
+/Pat2 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L
+ 8 8 L 8 0 L 0 0 L fill}
+>> matrix makepattern
+/Pat3 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L
+ 0 12 M 12 0 L stroke}
+>> matrix makepattern
+/Pat4 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L
+ 0 -4 M 12 8 L stroke}
+>> matrix makepattern
+/Pat5 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L
+ 0 12 M 8 -4 L 4 12 M 10 0 L stroke}
+>> matrix makepattern
+/Pat6 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L
+ 0 -4 M 8 12 L 4 -4 M 10 8 L stroke}
+>> matrix makepattern
+/Pat7 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L
+ 12 0 M -4 8 L 12 4 M 0 10 L stroke}
+>> matrix makepattern
+/Pat8 exch def
+<< Tile8x8
+ /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L
+ -4 0 M 12 8 L -4 4 M 8 10 L stroke}
+>> matrix makepattern
+/Pat9 exch def
+/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def
+/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def
+/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def
+/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def
+/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def
+/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def
+/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def
+} def
+%
+%
+%End of PostScript Level 2 code
+%
+/PatternBgnd {
+ TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse
+} def
+%
+% Substitute for Level 2 pattern fill codes with
+% grayscale if Level 2 support is not selected.
+%
+/Level1PatternFill {
+/Pattern1 {0.250 Density} bind def
+/Pattern2 {0.500 Density} bind def
+/Pattern3 {0.750 Density} bind def
+/Pattern4 {0.125 Density} bind def
+/Pattern5 {0.375 Density} bind def
+/Pattern6 {0.625 Density} bind def
+/Pattern7 {0.875 Density} bind def
+} def
+%
+% Now test for support of Level 2 code
+%
+Level1 {Level1PatternFill} {Level2PatternFill} ifelse
+%
+/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont
+dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall
+currentdict end definefont pop
+end
+%%EndProlog
+gnudict begin
+gsave
+doclip
+50 50 translate
+0.050 0.050 scale
+0 setgray
+newpath
+1.000 UL
+LTb
+1210 704 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 820 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 935 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1051 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1166 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1282 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1398 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1513 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1629 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1744 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 1860 M
+63 0 V
+1996 0 R
+-63 0 V
+1210 704 M
+0 63 V
+0 1093 R
+0 -63 V
+1538 704 M
+0 63 V
+0 1093 R
+0 -63 V
+1865 704 M
+0 63 V
+0 1093 R
+0 -63 V
+2193 704 M
+0 63 V
+0 1093 R
+0 -63 V
+2521 704 M
+0 63 V
+0 1093 R
+0 -63 V
+2849 704 M
+0 63 V
+0 1093 R
+0 -63 V
+3176 704 M
+0 63 V
+0 1093 R
+0 -63 V
+stroke
+1210 1860 N
+0 -1156 V
+2059 0 V
+0 1156 V
+-2059 0 V
+Z stroke
+1.000 UP
+1.000 UL
+LTb
+1.000 UL
+LT0
+LTb
+LT0
+0.200 2414 1632 591 110 BoxColFill
+2414 1632 N
+591 0 V
+0 110 V
+-591 0 V
+0 -110 V
+Z stroke
+LT0
+gsave 1210 1282 N 0 0 V 21 37 V 21 36 V 20 36 V 21 36 V 21 35 V 21 35 V 21 33 V 20 33 V 21 31 V 21 31 V 21 29 V 21 27 V 20 26 V 21 24 V 21 22 V 21 20 V 21 18 V 20 17 V 21 14 V 21 12 V 21 10 V 21 7 V 20 5 V 21 3 V 21 1 V 21 -2 V 21 -4 V 20 -6 V 21 -9 V 21 -11 V 21 -13 V 21 -15 V 20 -17 V 21 -20 V 21 -21 V 21 -23 V 21 -25 V 20 -27 V 21 -28 V 21 -29 V 21 -31 V 21 -32 V 20 -33 V 21 -34 V 21 -35 V 21 -36 V 21 -36 V 20 -36 V 21 -37 V 21 -36 V 21 -37 V 20 -36 V 21 -36 V 21 -36 V 21 -35 V 21 -34 V 20 -33 V 21 -32 V 21 -31 V 21 -29 V 21 -28 V 20 -27 V 21 -25 V 21 -23 V 21 -21 V 21 -20 V 20 -17 V 21 -15 V 21 -13 V 21 -11 V 21 -9 V 20 -6 V 21 -4 V 21 -2 V 21 1 V 21 3 V 20 5 V 21 7 V 21 10 V 21 12 V 21 14 V 20 17 V 21 18 V 21 20 V 21 22 V 21 24 V 20 26 V 21 27 V 21 29 V 21 31 V 21 31 V 20 33 V 21 33 V 21 35 V 21 35 V 21 36 V 20 36 V 21 36 V 21 37 V 0 0 V -2059 0 V 0.20 PolyFill
+1210 1282 M
+21 37 V
+21 36 V
+20 36 V
+21 36 V
+21 35 V
+21 35 V
+21 33 V
+20 33 V
+21 31 V
+21 31 V
+21 29 V
+21 27 V
+20 26 V
+21 24 V
+21 22 V
+21 20 V
+21 18 V
+20 17 V
+21 14 V
+21 12 V
+21 10 V
+21 7 V
+20 5 V
+21 3 V
+21 1 V
+21 -2 V
+21 -4 V
+20 -6 V
+21 -9 V
+21 -11 V
+21 -13 V
+21 -15 V
+20 -17 V
+21 -20 V
+21 -21 V
+21 -23 V
+21 -25 V
+20 -27 V
+21 -28 V
+21 -29 V
+21 -31 V
+21 -32 V
+20 -33 V
+21 -34 V
+21 -35 V
+21 -36 V
+21 -36 V
+20 -36 V
+21 -37 V
+21 -36 V
+21 -37 V
+20 -36 V
+21 -36 V
+21 -36 V
+21 -35 V
+21 -34 V
+20 -33 V
+21 -32 V
+21 -31 V
+21 -29 V
+21 -28 V
+20 -27 V
+21 -25 V
+21 -23 V
+21 -21 V
+21 -20 V
+20 -17 V
+21 -15 V
+21 -13 V
+21 -11 V
+21 -9 V
+20 -6 V
+21 -4 V
+21 -2 V
+21 1 V
+21 3 V
+20 5 V
+21 7 V
+21 10 V
+21 12 V
+21 14 V
+20 17 V
+21 18 V
+21 20 V
+21 22 V
+21 24 V
+20 26 V
+21 27 V
+21 29 V
+21 31 V
+21 31 V
+20 33 V
+21 33 V
+21 35 V
+21 35 V
+21 36 V
+20 36 V
+21 36 V
+21 37 V
+stroke
+LTb
+1210 1860 N
+0 -1156 V
+2059 0 V
+0 1156 V
+-2059 0 V
+Z stroke
+1.000 UP
+1.000 UL
+LTb
+stroke
+grestore
+end
+showpage
+%%Trailer
diff --git a/macros/latex/contrib/combinedgraphics/test/gnuplot42.pdf b/macros/latex/contrib/combinedgraphics/test/gnuplot42.pdf
new file mode 100644
index 0000000000..b363d9fc11
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/gnuplot42.pdf
Binary files differ
diff --git a/macros/latex/contrib/combinedgraphics/test/gnuplot42.plt b/macros/latex/contrib/combinedgraphics/test/gnuplot42.plt
new file mode 100644
index 0000000000..99effb6a61
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/gnuplot42.plt
@@ -0,0 +1,16 @@
+# gnuplot 4.2/4.4 file
+
+set terminal epslatex
+set output "gnuplot42.tex"
+
+set size 0.5, 0.5
+
+set title "Sinus"
+set xlabel "x"
+set ylabel "sin(x)"
+set xrange [ 0 : 2 * pi ]
+
+set style fill solid 0.2
+set label "filled" at pi / 2., 0.333 center
+
+plot sin(x) with filledcurves y1 = 0
diff --git a/macros/latex/contrib/combinedgraphics/test/gnuplot42.tex b/macros/latex/contrib/combinedgraphics/test/gnuplot42.tex
new file mode 100644
index 0000000000..b1a39a2df9
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/gnuplot42.tex
@@ -0,0 +1,109 @@
+% GNUPLOT: LaTeX picture with Postscript
+\begingroup
+ \makeatletter
+ \providecommand\color[2][]{%
+ \GenericError{(gnuplot) \space\space\space\@spaces}{%
+ Package color not loaded in conjunction with
+ terminal option `colourtext'%
+ }{See the gnuplot documentation for explanation.%
+ }{Either use 'blacktext' in gnuplot or load the package
+ color.sty in LaTeX.}%
+ \renewcommand\color[2][]{}%
+ }%
+ \providecommand\includegraphics[2][]{%
+ \GenericError{(gnuplot) \space\space\space\@spaces}{%
+ Package graphicx or graphics not loaded%
+ }{See the gnuplot documentation for explanation.%
+ }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}%
+ \renewcommand\includegraphics[2][]{}%
+ }%
+ \providecommand\rotatebox[2]{#2}%
+ \@ifundefined{ifGPcolor}{%
+ \newif\ifGPcolor
+ \GPcolorfalse
+ }{}%
+ \@ifundefined{ifGPblacktext}{%
+ \newif\ifGPblacktext
+ \GPblacktexttrue
+ }{}%
+ % define a \g@addto@macro without @ in the name:
+ \let\gplgaddtomacro\g@addto@macro
+ % define empty templates for all commands taking text:
+ \gdef\gplbacktext{}%
+ \gdef\gplfronttext{}%
+ \makeatother
+ \ifGPblacktext
+ % no textcolor at all
+ \def\colorrgb#1{}%
+ \def\colorgray#1{}%
+ \else
+ % gray or color?
+ \ifGPcolor
+ \def\colorrgb#1{\color[rgb]{#1}}%
+ \def\colorgray#1{\color[gray]{#1}}%
+ \expandafter\def\csname LTw\endcsname{\color{white}}%
+ \expandafter\def\csname LTb\endcsname{\color{black}}%
+ \expandafter\def\csname LTa\endcsname{\color{black}}%
+ \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}%
+ \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}%
+ \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}%
+ \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}%
+ \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}%
+ \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}%
+ \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}%
+ \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}%
+ \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}%
+ \else
+ % gray
+ \def\colorrgb#1{\color{black}}%
+ \def\colorgray#1{\color[gray]{#1}}%
+ \expandafter\def\csname LTw\endcsname{\color{white}}%
+ \expandafter\def\csname LTb\endcsname{\color{black}}%
+ \expandafter\def\csname LTa\endcsname{\color{black}}%
+ \expandafter\def\csname LT0\endcsname{\color{black}}%
+ \expandafter\def\csname LT1\endcsname{\color{black}}%
+ \expandafter\def\csname LT2\endcsname{\color{black}}%
+ \expandafter\def\csname LT3\endcsname{\color{black}}%
+ \expandafter\def\csname LT4\endcsname{\color{black}}%
+ \expandafter\def\csname LT5\endcsname{\color{black}}%
+ \expandafter\def\csname LT6\endcsname{\color{black}}%
+ \expandafter\def\csname LT7\endcsname{\color{black}}%
+ \expandafter\def\csname LT8\endcsname{\color{black}}%
+ \fi
+ \fi
+ \setlength{\unitlength}{0.0500bp}%
+ \begin{picture}(3600.00,2520.00)%
+ \gplgaddtomacro\gplbacktext{%
+ \csname LTb\endcsname%
+ \put(1078,704){\makebox(0,0)[r]{\strut{}-1}}%
+ \put(1078,820){\makebox(0,0)[r]{\strut{}-0.8}}%
+ \put(1078,935){\makebox(0,0)[r]{\strut{}-0.6}}%
+ \put(1078,1051){\makebox(0,0)[r]{\strut{}-0.4}}%
+ \put(1078,1166){\makebox(0,0)[r]{\strut{}-0.2}}%
+ \put(1078,1282){\makebox(0,0)[r]{\strut{} 0}}%
+ \put(1078,1398){\makebox(0,0)[r]{\strut{} 0.2}}%
+ \put(1078,1513){\makebox(0,0)[r]{\strut{} 0.4}}%
+ \put(1078,1629){\makebox(0,0)[r]{\strut{} 0.6}}%
+ \put(1078,1744){\makebox(0,0)[r]{\strut{} 0.8}}%
+ \put(1078,1860){\makebox(0,0)[r]{\strut{} 1}}%
+ \put(1210,484){\makebox(0,0){\strut{} 0}}%
+ \put(1538,484){\makebox(0,0){\strut{} 1}}%
+ \put(1865,484){\makebox(0,0){\strut{} 2}}%
+ \put(2193,484){\makebox(0,0){\strut{} 3}}%
+ \put(2521,484){\makebox(0,0){\strut{} 4}}%
+ \put(2849,484){\makebox(0,0){\strut{} 5}}%
+ \put(3176,484){\makebox(0,0){\strut{} 6}}%
+ \put(308,1282){\rotatebox{-270}{\makebox(0,0){\strut{}sin(x)}}}%
+ \put(2239,154){\makebox(0,0){\strut{}x}}%
+ \put(2239,2190){\makebox(0,0){\strut{}Sinus}}%
+ \put(1725,1474){\makebox(0,0){\strut{}filled}}%
+ }%
+ \gplgaddtomacro\gplfronttext{%
+ \csname LTb\endcsname%
+ \put(2282,1687){\makebox(0,0)[r]{\strut{}sin(x)}}%
+ }%
+ \gplbacktext
+ \put(0,0){\includegraphics{gnuplot42}}%
+ \gplfronttext
+ \end{picture}%
+\endgroup
diff --git a/macros/latex/contrib/combinedgraphics/test/xfig325.eps b/macros/latex/contrib/combinedgraphics/test/xfig325.eps
new file mode 100644
index 0000000000..d082483938
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/xfig325.eps
@@ -0,0 +1,113 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: xfig325.fig
+%%Creator: fig2dev Version 3.2 Patchlevel 5c
+%%CreationDate: Fri Jul 13 20:19:16 2012
+%%BoundingBox: 0 0 87 87
+%Magnification: 1.0000
+%%EndComments
+%%BeginProlog
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+/pageheader {
+save
+newpath 0 87 moveto 0 0 lineto 87 0 lineto 87 87 lineto closepath clip newpath
+0.8 85.8 translate
+1 -1 scale
+$F2psBegin
+10 setmiterlimit
+0 slj 0 slc
+ 0.06299 0.06299 sc
+} bind def
+/pagefooter {
+$F2psEnd
+restore
+} bind def
+%%EndProlog
+pageheader
+%
+% Fig objects follow
+%
+%
+% here starts figure with depth 50
+% Polyline
+0 slj
+0 slc
+7.500 slw
+n 0 0 m 1350 0 l 1350 1350 l 0 1350 l
+ cp gs col6 1.00 shd ef gr gs col0 s gr
+% here ends figure;
+pagefooter
+showpage
+%%Trailer
+%EOF
diff --git a/macros/latex/contrib/combinedgraphics/test/xfig325.fig b/macros/latex/contrib/combinedgraphics/test/xfig325.fig
new file mode 100644
index 0000000000..570a574e7c
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/xfig325.fig
@@ -0,0 +1,12 @@
+#FIG 3.2 Produced by xfig version 3.2.5
+Landscape
+Center
+Metric
+A4
+100.00
+Single
+-2
+1200 2
+2 2 0 1 0 6 50 -1 20 0.000 0 0 -1 0 0 5
+ 0 0 1350 0 1350 1350 0 1350 0 0
+4 1 4 50 -1 1 12 0.0000 6 135 555 675 720 square\001
diff --git a/macros/latex/contrib/combinedgraphics/test/xfig325.pdf b/macros/latex/contrib/combinedgraphics/test/xfig325.pdf
new file mode 100644
index 0000000000..3ecbd00cff
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/xfig325.pdf
Binary files differ
diff --git a/macros/latex/contrib/combinedgraphics/test/xfig325.tex b/macros/latex/contrib/combinedgraphics/test/xfig325.tex
new file mode 100644
index 0000000000..2db079d030
--- /dev/null
+++ b/macros/latex/contrib/combinedgraphics/test/xfig325.tex
@@ -0,0 +1,12 @@
+\setlength{\unitlength}{4144sp}%
+%
+\begingroup\makeatletter\ifx\SetFigFont\undefined%
+\gdef\SetFigFont#1#2#3#4#5{%
+ \reset@font\fontsize{#1}{#2pt}%
+ \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
+ \selectfont}%
+\fi\endgroup%
+\begin{picture}(1374,1374)(-11,-523)
+\put(676,119){\makebox(0,0)[b]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\itdefault}{\color[rgb]{1,0,0}square}%
+}}}}
+\end{picture}%