diff options
author | Karl Berry <karl@freefriends.org> | 2020-02-17 22:15:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-02-17 22:15:57 +0000 |
commit | 1517aa8d6a39c67f54d541b55ef9b4f2b85b64d1 (patch) | |
tree | 85baa48ec3ec410b2c3d7439e4088f65dc95111d /Master/texmf-dist/doc/latex/circuit-macros | |
parent | 4cd4f4003232c8e0e50766507fe129ec5cce8603 (diff) |
circuit-macros (17feb20)
git-svn-id: svn://tug.org/texlive/trunk@53821 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros')
130 files changed, 5492 insertions, 1678 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/CHANGES b/Master/texmf-dist/doc/latex/circuit-macros/CHANGES index 55dd822d359..8713597bf9a 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/CHANGES +++ b/Master/texmf-dist/doc/latex/circuit-macros/CHANGES @@ -1,6 +1,8 @@ CHANGES - (The stable CTAN version will be nn.n; intermediate versions nn.n.n): +Version 9.2: New options for macros contact, dswitch, FlipFlop, + FlipFlopX. New macros pvcell, contacts, relaycoil. Modified cbreaker + and relay. New file Licence.txt. Change from siunits to siunitx.sty. Version 9.1: Corrected two examples; added others including vacuum tubes. Tweaked dashline. Removed an extraneous log file and extraneous code from libgen.m4. New pic macros for operations on complex numbers. New diff --git a/Master/texmf-dist/doc/latex/circuit-macros/Copying b/Master/texmf-dist/doc/latex/circuit-macros/Copying index 72d57ff5b73..4359dd7830f 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/Copying +++ b/Master/texmf-dist/doc/latex/circuit-macros/Copying @@ -1,6 +1,6 @@ -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * diff --git a/Master/texmf-dist/doc/latex/circuit-macros/Licence.txt b/Master/texmf-dist/doc/latex/circuit-macros/Licence.txt new file mode 100644 index 00000000000..890d8766beb --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/Licence.txt @@ -0,0 +1,417 @@ +The LaTeX Project Public License +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +LPPL Version 1.3c 2008-05-04 + +Copyright 1999 2002-2008 LaTeX3 Project + Everyone is allowed to distribute verbatim copies of this + license document, but modification of it is not allowed. + + +PREAMBLE +======== + +The LaTeX Project Public License (LPPL) is the primary license under +which the LaTeX kernel and the base LaTeX packages are distributed. + +You may use this license for any work of which you hold the copyright +and which you wish to distribute. This license may be particularly +suitable if your work is TeX-related (such as a LaTeX package), but +it is written in such a way that you can use it even if your work is +unrelated to TeX. + +The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', +below, gives instructions, examples, and recommendations for authors +who are considering distributing their works under this license. + +This license gives conditions under which a work may be distributed +and modified, as well as conditions under which modified versions of +that work may be distributed. + +We, the LaTeX3 Project, believe that the conditions below give you +the freedom to make and distribute modified versions of your work +that conform with whatever technical specifications you wish while +maintaining the availability, integrity, and reliability of +that work. If you do not see how to achieve your goal while +meeting these conditions, then read the document `cfgguide.tex' +and `modguide.tex' in the base LaTeX distribution for suggestions. + + +DEFINITIONS +=========== + +In this license document the following terms are used: + + `Work' + Any work being distributed under this License. + + `Derived Work' + Any work that under any applicable law is derived from the Work. + + `Modification' + Any procedure that produces a Derived Work under any applicable + law -- for example, the production of a file containing an + original file associated with the Work or a significant portion of + such a file, either verbatim or with modifications and/or + translated into another language. + + `Modify' + To apply any procedure that produces a Derived Work under any + applicable law. + + `Distribution' + Making copies of the Work available from one person to another, in + whole or in part. Distribution includes (but is not limited to) + making any electronic components of the Work accessible by + file transfer protocols such as FTP or HTTP or by shared file + systems such as Sun's Network File System (NFS). + + `Compiled Work' + A version of the Work that has been processed into a form where it + is directly usable on a computer system. This processing may + include using installation facilities provided by the Work, + transformations of the Work, copying of components of the Work, or + other activities. Note that modification of any installation + facilities provided by the Work constitutes modification of the Work. + + `Current Maintainer' + A person or persons nominated as such within the Work. If there is + no such explicit nomination then it is the `Copyright Holder' under + any applicable law. + + `Base Interpreter' + A program or process that is normally needed for running or + interpreting a part or the whole of the Work. + + A Base Interpreter may depend on external components but these + are not considered part of the Base Interpreter provided that each + external component clearly identifies itself whenever it is used + interactively. Unless explicitly specified when applying the + license to the Work, the only applicable Base Interpreter is a + `LaTeX-Format' or in the case of files belonging to the + `LaTeX-format' a program implementing the `TeX language'. + + + +CONDITIONS ON DISTRIBUTION AND MODIFICATION +=========================================== + +1. Activities other than distribution and/or modification of the Work +are not covered by this license; they are outside its scope. In +particular, the act of running the Work is not restricted and no +requirements are made concerning any offers of support for the Work. + +2. You may distribute a complete, unmodified copy of the Work as you +received it. Distribution of only part of the Work is considered +modification of the Work, and no right to distribute such a Derived +Work may be assumed under the terms of this clause. + +3. You may distribute a Compiled Work that has been generated from a +complete, unmodified copy of the Work as distributed under Clause 2 +above, as long as that Compiled Work is distributed in such a way that +the recipients may install the Compiled Work on their system exactly +as it would have been installed if they generated a Compiled Work +directly from the Work. + +4. If you are the Current Maintainer of the Work, you may, without +restriction, modify the Work, thus creating a Derived Work. You may +also distribute the Derived Work without restriction, including +Compiled Works generated from the Derived Work. Derived Works +distributed in this manner by the Current Maintainer are considered to +be updated versions of the Work. + +5. If you are not the Current Maintainer of the Work, you may modify +your copy of the Work, thus creating a Derived Work based on the Work, +and compile this Derived Work, thus creating a Compiled Work based on +the Derived Work. + +6. If you are not the Current Maintainer of the Work, you may +distribute a Derived Work provided the following conditions are met +for every component of the Work unless that component clearly states +in the copyright notice that it is exempt from that condition. Only +the Current Maintainer is allowed to add such statements of exemption +to a component of the Work. + + a. If a component of this Derived Work can be a direct replacement + for a component of the Work when that component is used with the + Base Interpreter, then, wherever this component of the Work + identifies itself to the user when used interactively with that + Base Interpreter, the replacement component of this Derived Work + clearly and unambiguously identifies itself as a modified version + of this component to the user when used interactively with that + Base Interpreter. + + b. Every component of the Derived Work contains prominent notices + detailing the nature of the changes to that component, or a + prominent reference to another file that is distributed as part + of the Derived Work and that contains a complete and accurate log + of the changes. + + c. No information in the Derived Work implies that any persons, + including (but not limited to) the authors of the original version + of the Work, provide any support, including (but not limited to) + the reporting and handling of errors, to recipients of the + Derived Work unless those persons have stated explicitly that + they do provide such support for the Derived Work. + + d. You distribute at least one of the following with the Derived Work: + + 1. A complete, unmodified copy of the Work; + if your distribution of a modified component is made by + offering access to copy the modified component from a + designated place, then offering equivalent access to copy + the Work from the same or some similar place meets this + condition, even though third parties are not compelled to + copy the Work along with the modified component; + + 2. Information that is sufficient to obtain a complete, + unmodified copy of the Work. + +7. If you are not the Current Maintainer of the Work, you may +distribute a Compiled Work generated from a Derived Work, as long as +the Derived Work is distributed to all recipients of the Compiled +Work, and as long as the conditions of Clause 6, above, are met with +regard to the Derived Work. + +8. The conditions above are not intended to prohibit, and hence do not +apply to, the modification, by any method, of any component so that it +becomes identical to an updated version of that component of the Work as +it is distributed by the Current Maintainer under Clause 4, above. + +9. Distribution of the Work or any Derived Work in an alternative +format, where the Work or that Derived Work (in whole or in part) is +then produced by applying some process to that format, does not relax or +nullify any sections of this license as they pertain to the results of +applying that process. + +10. a. A Derived Work may be distributed under a different license + provided that license itself honors the conditions listed in + Clause 6 above, in regard to the Work, though it does not have + to honor the rest of the conditions in this license. + + b. If a Derived Work is distributed under a different license, that + Derived Work must provide sufficient documentation as part of + itself to allow each recipient of that Derived Work to honor the + restrictions in Clause 6 above, concerning changes from the Work. + +11. This license places no restrictions on works that are unrelated to +the Work, nor does this license place any restrictions on aggregating +such works with the Work by any means. + +12. Nothing in this license is intended to, or may be used to, prevent +complete compliance by all parties with all applicable laws. + + +NO WARRANTY +=========== + +There is no warranty for the Work. Except when otherwise stated in +writing, the Copyright Holder provides the Work `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 Work is with you. Should the Work prove defective, you assume +the cost of all necessary servicing, repair, or correction. + +In no event unless required by applicable law or agreed to in writing +will The Copyright Holder, or any author named in the components of the +Work, or any other party who may distribute and/or modify the Work as +permitted above, be liable to you for damages, including any general, +special, incidental or consequential damages arising out of any use of +the Work or out of inability to use the Work (including, but not limited +to, loss of data, data being rendered inaccurate, or losses sustained by +anyone as a result of any failure of the Work to operate with any other +programs), even if the Copyright Holder or said author or said other +party has been advised of the possibility of such damages. + + +MAINTENANCE OF THE WORK +======================= + +The Work has the status `author-maintained' if the Copyright Holder +explicitly and prominently states near the primary copyright notice in +the Work that the Work can only be maintained by the Copyright Holder +or simply that it is `author-maintained'. + +The Work has the status `maintained' if there is a Current Maintainer +who has indicated in the Work that they are willing to receive error +reports for the Work (for example, by supplying a valid e-mail +address). It is not required for the Current Maintainer to acknowledge +or act upon these error reports. + +The Work changes from status `maintained' to `unmaintained' if there +is no Current Maintainer, or the person stated to be Current +Maintainer of the work cannot be reached through the indicated means +of communication for a period of six months, and there are no other +significant signs of active maintenance. + +You can become the Current Maintainer of the Work by agreement with +any existing Current Maintainer to take over this role. + +If the Work is unmaintained, you can become the Current Maintainer of +the Work through the following steps: + + 1. Make a reasonable attempt to trace the Current Maintainer (and + the Copyright Holder, if the two differ) through the means of + an Internet or similar search. + + 2. If this search is successful, then enquire whether the Work + is still maintained. + + a. If it is being maintained, then ask the Current Maintainer + to update their communication data within one month. + + b. If the search is unsuccessful or no action to resume active + maintenance is taken by the Current Maintainer, then announce + within the pertinent community your intention to take over + maintenance. (If the Work is a LaTeX work, this could be + done, for example, by posting to comp.text.tex.) + + 3a. If the Current Maintainer is reachable and agrees to pass + maintenance of the Work to you, then this takes effect + immediately upon announcement. + + b. If the Current Maintainer is not reachable and the Copyright + Holder agrees that maintenance of the Work be passed to you, + then this takes effect immediately upon announcement. + + 4. If you make an `intention announcement' as described in 2b. above + and after three months your intention is challenged neither by + the Current Maintainer nor by the Copyright Holder nor by other + people, then you may arrange for the Work to be changed so as + to name you as the (new) Current Maintainer. + + 5. If the previously unreachable Current Maintainer becomes + reachable once more within three months of a change completed + under the terms of 3b) or 4), then that Current Maintainer must + become or remain the Current Maintainer upon request provided + they then update their communication data within one month. + +A change in the Current Maintainer does not, of itself, alter the fact +that the Work is distributed under the LPPL license. + +If you become the Current Maintainer of the Work, you should +immediately provide, within the Work, a prominent and unambiguous +statement of your status as Current Maintainer. You should also +announce your new status to the same pertinent community as +in 2b) above. + + +WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE +====================================================== + +This section contains important instructions, examples, and +recommendations for authors who are considering distributing their +works under this license. These authors are addressed as `you' in +this section. + +Choosing This License or Another License +---------------------------------------- + +If for any part of your work you want or need to use *distribution* +conditions that differ significantly from those in this license, then +do not refer to this license anywhere in your work but, instead, +distribute your work under a different license. You may use the text +of this license as a model for your own license, but your license +should not refer to the LPPL or otherwise give the impression that +your work is distributed under the LPPL. + +The document `modguide.tex' in the base LaTeX distribution explains +the motivation behind the conditions of this license. It explains, +for example, why distributing LaTeX under the GNU General Public +License (GPL) was considered inappropriate. Even if your work is +unrelated to LaTeX, the discussion in `modguide.tex' may still be +relevant, and authors intending to distribute their works under any +license are encouraged to read it. + +A Recommendation on Modification Without Distribution +----------------------------------------------------- + +It is wise never to modify a component of the Work, even for your own +personal use, without also meeting the above conditions for +distributing the modified component. While you might intend that such +modifications will never be distributed, often this will happen by +accident -- you may forget that you have modified that component; or +it may not occur to you when allowing others to access the modified +version that you are thus distributing it and violating the conditions +of this license in ways that could have legal implications and, worse, +cause problems for the community. It is therefore usually in your +best interest to keep your copy of the Work identical with the public +one. Many works provide ways to control the behavior of that work +without altering any of its licensed components. + +How to Use This License +----------------------- + +To use this license, place in each of the components of your work both +an explicit copyright notice including your name and the year the work +was authored and/or last substantially modified. Include also a +statement that the distribution and/or modification of that +component is constrained by the conditions in this license. + +Here is an example of such a notice and statement: + + %% pig.dtx + %% Copyright 2005 M. Y. Name + % + % This work may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3 or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % + % This work has the LPPL maintenance status `maintained'. + % + % The Current Maintainer of this work is M. Y. Name. + % + % This work consists of the files pig.dtx and pig.ins + % and the derived file pig.sty. + +Given such a notice and statement in a file, the conditions +given in this license document would apply, with the `Work' referring +to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being +generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' +referring to any `LaTeX-Format', and both `Copyright Holder' and +`Current Maintainer' referring to the person `M. Y. Name'. + +If you do not want the Maintenance section of LPPL to apply to your +Work, change `maintained' above into `author-maintained'. +However, we recommend that you use `maintained', as the Maintenance +section was added in order to ensure that your Work remains useful to +the community even when you can no longer maintain and support it +yourself. + +Derived Works That Are Not Replacements +--------------------------------------- + +Several clauses of the LPPL specify means to provide reliability and +stability for the user community. They therefore concern themselves +with the case that a Derived Work is intended to be used as a +(compatible or incompatible) replacement of the original Work. If +this is not the case (e.g., if a few lines of code are reused for a +completely different task), then clauses 6b and 6d shall not apply. + + +Important Recommendations +------------------------- + + Defining What Constitutes the Work + + The LPPL requires that distributions of the Work contain all the + files of the Work. It is therefore important that you provide a + way for the licensee to determine which files constitute the Work. + This could, for example, be achieved by explicitly listing all the + files of the Work near the copyright notice of each file or by + using a line such as: + + % This work consists of all files listed in manifest.txt. + + in that place. In the absence of an unequivocal list it might be + impossible for the licensee to determine what is considered by you + to comprise the Work and, in such a case, the licensee would be + entitled to make reasonable conjectures as to which files comprise + the Work. + +--------------------------------------------------------------------- diff --git a/Master/texmf-dist/doc/latex/circuit-macros/README b/Master/texmf-dist/doc/latex/circuit-macros/README index 40768bb81af..3d31e4eb616 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/README +++ b/Master/texmf-dist/doc/latex/circuit-macros/README @@ -1,10 +1,10 @@ -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * This is a set of macros for drawing high-quality line diagrams to include in LaTeX, web, or similar documents, with support for SVG @@ -26,6 +26,9 @@ recursion. Arbitrary text for formatting by LaTeX can be included. Free interpreters for m4 and pic are readily available. +Sources are available as a git repository at + https://gitlab.com/aplevich/Circuit_macros + REQUIRED SOFTWARE: Preferred setup: GNU m4, dpic (see below), LaTeX, PSTricks, dvips @@ -56,7 +59,8 @@ USAGE or pstricks graphics for LaTeX; see below for integration with other tools and production of other formats. You probably should try out the basic usage before integrating the macros with sophisticated - system-dependent tools. + system-dependent tools. When developing your own diagrams, refer to + the macro descriptions in the List of Macros section of Circuit_macros.pdf. Suppose that a source file, cct.m4 say, has been created and the top two lines are @@ -114,7 +118,7 @@ USAGE INSTALLATION: 1. Decide where you will be installing the .m4 library files. In - principle, they can go anywhere, for example, $HOME/Circuit_macros, + principle, they can go anywhere; for example, $HOME/Circuit_macros, c:\localtexmf\Circuit_macros, /usr/local/share/Circuit_macros, or ~/texmf/tex/latex/Circuit_macros. Copy the files from the top-level directory of the distribution to the installation @@ -186,10 +190,14 @@ TESTING: The .m4 files in the examples directory can serve as models for your diagrams but keep in mind that some of them contain details that allow - the source to be used with a variety of postprocessors. Sticking to - one postprocessor such as tikz or PStricks allows for the simplest - source. You might also wish to browse some of the files that are not - used for examples.ps. + the source to be used with a variety of postprocessors. Sticking to one + postprocessor such as tikz or PStricks allows for the simplest source. + You might also wish to browse some of the included files that are not + used to make examples.ps. + + A few of the sources in the examples directory are copies of files + from the doc directory. They are duplicated to provide flexibility + of directory structure and independency of sources. No "make" facility? You have to test by hand (but see below for diagram production software). Copy a test file as above into @@ -246,6 +254,9 @@ DPIC: http://ece.uwaterloo.ca/~aplevich/dpic/ and a git repository containing complete source is at https://gitlab.com/aplevich/dpic + The source can be found in a number of repositories but many contain + older versions, see https://repology.org/project/dpic/badges + The best advice is to obtain the newest version. The dpic distribution includes a manual dpic-doc.pdf containing a summary of the pic language and descriptions of features unique to dpic. @@ -257,7 +268,7 @@ EXAMPLES AND INTEGRATION WITH OTHER TOOLS: Read the manual Circuit_macros.pdf and view or print the file examples.ps in the examples directory. There are a few other source - files in the examples directory that are not shown in examples.ps. + files in the examples directory that are not shown in examples.pdf. For the possibly unstable development version of these macros, try http://ece.uwaterloo.ca/~aplevich/Circuit_macros/ @@ -270,41 +281,35 @@ EXAMPLES AND INTEGRATION WITH OTHER TOOLS: beginning so archived instructions on the net may be slightly more complicated than currently necessary. However, a number of people have developed tools that simplify workflow for their circumstances, - which are beyond the scope of this distribution. The following may - be of interest: - - Fabrice Salvaire provides a brief introduction at - https://www.fabrice-salvaire.fr/en/blog/electronic-circuit-diagrams/ + which are beyond the scope of this distribution. A set of examples and hints intended for his colleagues has been produced by Alan Robert Clark at http://ytdp.ee.wits.ac.za/cct.html - A KDE interface created by Matteo Agostinelli can be found at - http://wwwu.uni-klu.ac.at/magostin/cirkuit.html - A git repository of a newer version of cirkuit by Andrew G. for Linux is at - https://github.com/ag-ckt/cirkuit/tree/V0.5.0 + A Python-based GUI called PyCirkuit is at + https://pypi.org/project/pycirkuit/ and + https://github.com/orestesmas/pycirkuit. + For an introduction, look at the FOSDEM video by Orestes Mas: + https://ftp.osuosl.org/pub/fosdem/2020/H.2215/pycirkuit.webm - The GUI front end PyCirkuit at https://pypi.org/project/pycirkuit/ - and https://github.com/orestesmas/pycirkuit - is Python-based and inspired by cirkuit. + A KDE interface created by Matteo Agostinelli can be found at + http://wwwu.uni-klu.ac.at/magostin/cirkuit.html. A git repository + of a newer version of cirkuit by Andrew G. for Linux is at + https://github.com/ag-ckt/cirkuit/tree/V0.5.0. Because of changes + in library dependencies, there is uncertainty about installation + possibilities. A wiki offering examples and tips is at http://swwiki.e-dschungel.de/circuit_macros It is in German but Google translate works well on the page. + Variations: + See eschpic on Github for IEC-style electrical drawings. + Mac users: A previewer app for Mac OS X written by Collin J. Delker is available at http://www.collindelker.com/wp/2013/04/circuit_macros_previewer/ - For more examples in the context of a textbook, have a look at - Aplevich, J.D., "The Essentials of Linear State-Space Systems," New - York: John Wiley & Sons Inc., 2000. In Canada, look at Andrews, - G.C., Aplevich, J.D., Fraser, and R.A., MacGregor, C.G., - "Introduction to Professional Engineering in Canada," (fifth edition) - Toronto: Pearson Education Canada, Inc., 2018. Some samples from these - books can be found at - http://ece.uwaterloo.ca/~aplevich/ - For an example of the use of dpic in a wiki (thanks to Jason Grout), see http://jasongrout.org/software/dokuwiki/format-plugin @@ -329,9 +334,6 @@ EXAMPLES AND INTEGRATION WITH OTHER TOOLS: Stevens illustrated his books on Unix and TCP/IP using pic macros. Some of the sources found there need minor tuning to work under dpic. -TikZ-PGF: Check the Makefile in the examples/pgf directory as described - in the README file, and type "make" or "make examples.pdf". - MetaPost examples: Go to the examples/mpost directory. Check the Makefile as described in the README file, type "make", and stand well back. diff --git a/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4 b/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4 index 9f762bfec9f..590760c0817 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/darrow.m4 @@ -1,12 +1,12 @@ divert(-1) darrow.m4 Macros for double lines and arrows -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * `Notes: these macros have been reworked (Jan 2013) so that dlthick is the diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/CctTable.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/CctTable.m4 index 40b5849d668..f7e47d0758e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/CctTable.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/CctTable.m4 @@ -83,5 +83,8 @@ vm = 0.28 move right_ hm {reed(,,,fill_(0.9),CR) ; move ; "`{\tt reed(,{,},fill\_(0.9),CR)}'" ljust} } + move down 0.25; right_ +{ {pvcell ; move;"`{\tt pvcell}'" ljust} +} .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf b/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf Binary files differindex e0a03e9510a..302f862d93f 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.pdf diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.tex b/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.tex index 36f9bdf6946..49e6570970b 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Circuit_macros.tex @@ -14,7 +14,7 @@ \usepackage[T1]{fontenc} \usepackage{lmodern} %\usepackage{textcomp} -%\usepackage{microtype} +\usepackage{microtype} %\DisableLigatures{encoding=T1,family=tt*} % \addtolength{\textwidth}{3cm} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Contact.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/Contact.m4 new file mode 100644 index 00000000000..26f8d5a9822 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Contact.m4 @@ -0,0 +1,98 @@ +.PS +# Contact +cct_init + +movw = 0.45 +{ + contact + {S:`"\tt contact"' at last [].s+(0,-0.15) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O + "\sl C" ljust at last [].C } + move right_ movw; contact(R) + {`"\tt (R)"' at (last [].s,S) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O + "\sl C" ljust at last [].C } + move right_ movw; contact(O); {`"\tt (O)"' at (last [],S)} + move right_ movw; contact(C); {`"\tt (C)"' at (last [],S)} + + move right_ movw; contact(P) + {S: `"\tt (P)"' at last [].s+(0,-0.15) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O + "\sl C" ljust at last [].C } + move right_ movw; contact(PR) + {S: `"\tt (PR)"' at last [].s+(0,-0.15) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O + "\sl C" ljust at last [].C } + move right_ movw; contact(PO); {`"\tt (PO)"' at (last [],S)} + {"\sl O" ljust at last [].O + "\sl C" ljust at last [].C } + move right_ movw; contact(PC); {`"\tt (PC)"' at (last [],S)} +} + +move down 0.75; right_ ; { + contact(I); {`S: "\tt (I)"' at last [].s+(0,-12bp__) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O.e + "\sl C" ljust at last [].C.e } + move right_ movw; contact(RI) + {`"\tt (RI)"' at (last [],S) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O.e + "\sl C" ljust at last [].C.e } + move right_ movw; contact(OI); {`"\tt (OI)"' at (last [],S)} + move right_ movw; contact(CI); {`"\tt (CI)"' at (last [],S)} + + move right_ movw; contact(PI); {`"\tt (PI)"' at (last [],S) } + {"\sl O" ljust at last [].O.e + "\sl C" ljust at last [].C.e } + move right_ movw; contact(PIO); {`"\tt (PIO)"' at (last [],S) } + move right_ movw; contact(PIC); {`"\tt (PIC)"' at (last [],S) } +} + +movewid = movw + move down 0.65; right_; { + K: contact(T) + {S: `"\tt (T)"' at last [].s+(0,-0.15) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.C; "$\;\;$\sl C" + spline <- right 0.09 then down 0.05 right 0.05 from K.O; "$\;\;$\sl O" + thicklines_ } + move; K: contact(RT) + {`"\tt (RT)"' at (last [],S) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.O; "$\;\;$\sl O" + spline <- right 0.09 then down 0.05 right 0.05 from K.C; "$\;\;$\sl C" + thicklines_ } + move; contact(OT); {S: `"\tt (OT)"' at (last [],S) } + move; contact(CT); {S: `"\tt (CT)"' at (last [],S) } + move; contact(PT); {S: `"\tt (PT)"' at (last [],S) } + move; contact(PTO); {S: `"\tt (PTO)"' at (last [],S) } + move; contact(PTC); {S: `"\tt (PTC)"' at (last [],S) } +} + + move down 0.65; right_; { + K: contact(U) + {S: `"\tt (U)"' at last [].s+(0,-0.15) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.C; "$\;\;$\sl C" + spline <- right 0.09 then down 0.05 right 0.05 from K.O; "$\;\;$\sl O" + thicklines_ } + move; K: contact(RU) + {`"\tt (RU)"' at (last [],S) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.O; "$\;\;$\sl O" + spline <- right 0.09 then down 0.05 right 0.05 from K.C; "$\;\;$\sl C" + thicklines_ } + move; K: contact(OU); {S: `"\tt (OU)"' at (last [],S) + "\sl O" ljust at K.O.e } + move; K: contact(CU); {S: `"\tt (CU)"' at (last [],S) + "\sl C" ljust at K.C.e } + move; contact(PU); {S: `"\tt (PU)"' at (last [],S) } + move; contact(PUO); {S: `"\tt (PUO)"' at (last [],S) } + move; contact(PUC); {S: `"\tt (PUC)"' at (last [],S) } +} +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Contacts.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/Contacts.m4 new file mode 100644 index 00000000000..9e006218e35 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Contacts.m4 @@ -0,0 +1,46 @@ +.PS +# Contacts.m4 +cct_init + + space = 0.75 + KS:contacts(2) + {`"\tt contacts(2)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,I) with .sw at last [].se+(space,0) + {`"\tt (2,I)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,IO) with .sw at last [].se+(space,0) + {`"\tt (2,IO)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) ') } + + KS:contacts(2,PICD) with .sw at last [].se+(space,0) + {`"\tt (2,PICD)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,PTCD) with .sw at last [].se+(space,0) + {`"\tt (2,PTCD)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,PUCD) with .sw at last [].se+(space,0) + {`"\tt (2,PUCD)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,0) ') } +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/FlipFlop.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/FlipFlop.m4 index c04ca6ba896..a4fca852842 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/FlipFlop.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/FlipFlop.m4 @@ -1,20 +1,24 @@ .PS # `FlipFlop.m4' log_init -iflatex(`textoffset = 1bp__; ifpsfrag(,`latexcommand({\sf)') ') +iflatex(`ifpsfrag(,`latexcommand({\sf)') ') s_init(Flipflop) sinclude(Circuit_macros.dim) + +[ right_ { Q1: FlipFlop(D,Q1) s_box(``\tt FlipFlop(D,Q1)'') at last [].Chip.s below h1 = L_unit*20 w1 = L_unit*12 FlipFlop(T,Q2,ht h1 wid w1 fill_(0.9)) with .w at last [].e+(0.25,0) - s_box(``\tt FlipFlop(T,Q2,ht h1 wid w1 fill\_(0.9))'') \ + s_box(``\shortstack{\tt FlipFlop(T,Q2,\\ + \tt\quad ht h1 wid w1 fill\_(0.9))}'') \ at (last [].Chip,2nd last [].Chip.s)+(0,-0.25) - FlipFlop(RS) with .w at last [].e+(0.25,0) - s_box(``\tt FlipFlop(RS)'') at last [].Chip.s below - FlipFlop(JK) with .w at last [].e+(0.25,0) + FlipFlop(RS,,,Chip.wid/8) with .w at last [].e+(0.5,0) + s_box(``\shortstack[l]{\tt FlipFlop(RS,{,},\\ + \tt\quad Chip.wid/8)}'') at last [].sw below ljust + FlipFlop(JK) with .w at last [].e+(0.5,0) s_box(``\tt FlipFlop(JK)'') with .n at last [].PinPR.end } move down 1.5; right_ @@ -28,5 +32,29 @@ right_ s_box(``\shortstack[l]{\tt FlipFlopX(,{,} \\ \tt\quad:J;E:CK;:K,N:CLR,:Q;)}'') at last [].Chip.s below } +] + +if 0 then { +[ +# Redrawn from +# https://tex.stackexchange.com/questions/521724/how-could-i-write-this-in-a-more-exportable-way + + for_(0,4,1,` + Q: FlipFlopX(ifelse(m4x,0,`fill_(0.95)'),, + :Q:PinQ; :lg_bartxt(Q):PinNQ, + :CLR:PinCLR, + :J:PinJ; E::PinCK; :K:PinK, + :PRST:PinPRST, + 0) with .PinCK at Here + ifelse(m4x,0, + `S: source(right_ sourcerad_*2 at Q.Chip,U) + line from S.start to Q.PinCK') + T: Q.PinQ-(Q.Chip.wid/2,0) + arrow from Q.PinQ to T then up Q.Chip.ht/2; { "$Q_`'m4x$" above } + ifelse(m4x,4,,`arrow from T to (T,Q.PinCK) then left Q.Chip.wid/2') + ') +] with .nw at last [].sw+(0,-0.5) +} + iflatex(ifpsfrag(,`latexcommand(})')) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Jack.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/Jack.m4 index 3c56061e674..b9a005d2794 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Jack.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Jack.m4 @@ -73,6 +73,6 @@ L: [ right_ `"\tt ..(L,RLS)"' below at (J3,last "") `"\tt ..(L,RLBLMLMS)"' below at (J4,last "") `"\tt ..(,RSBSMLB)"' below at (J5,last "") -] with .nw at P.sw + (0,0.1) +] with .nw at P.sw #+ (0,0.1) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/doc/Makefile index a934e20bba4..463f3c0ec15 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Makefile @@ -8,14 +8,14 @@ PICTEX = \ AmpTable.tex Antennas.tex Audio.tex Axes.tex \ Buffer.tex BigResistor.tex Bip.tex \ CctTable.tex Composite.tex ConfigA.tex ConfigB.tex ConfigC.tex Conn.tex \ - Corners.tex \ + Corners.tex Contact.tex Contacts.tex \ Dac.tex Darlington.tex Demultiplexer.tex Diodes.tex \ Emarrows.tex FF.tex FlipFlop.tex \ Flowdiag.tex Fuses.tex Grounds.tex \ Headers.tex HybridPi.tex Jack.tex \ Logic.tex Loop.tex Multiplexer.tex NPDT.tex NLG.tex Nport.tex \ Oblique.tex Opamp.tex Opto.tex \ - ParSeries.tex Pconn.tex Potentiometers.tex Relay.tex \ + ParSeries.tex Pconn.tex Potentiometers.tex Relay.tex relaycoil.tex \ Series.tex ShiftR.tex Sinus.tex Sources.tex Switches.tex \ Taps.tex Tgate.tex Thermal.tex Tline.tex Ttree.tex \ Variable.tex Xform.tex Windings.tex Workflow.tex \ @@ -64,13 +64,14 @@ M4LIBS = $(MODE).m4 $(M4) $(M4LIBS) $(DOC).dim $*.m4 > $*.pic ($(PRE) $(PIC) $*.pic $(POST)) > $*.tex -CMpdf: +$(DOC).pdf: touch mode.tex -if grep -q tikz mode.tex ; then true ; else \ make clean ; printf "\\usepackage{tikz}\n" > mode.tex ; fi make MODE=pgf PIC="dpic -g" LATEX=pdflatex SFX=pdf \ POST="; printf '\\\\vspace*{-0.5\\\\baselineskip}\\n'" \ $(DOC).pdf + optpdf $(DOC).pdf chmod 644 $(DOC).pdf $(DOC).ps: @@ -134,9 +135,8 @@ ex08.m4: ../examples/ex08.m4 clobber: clean rm -f *.dvi Circuit_macros.pdf -# rm -f Circuit_macros.pdf clean: rm -f *.bbl *.log *.aux *.blg *.toc citations *.verb ex08.m4 - rm -f *.pic $(PICTEX) heading.tex *.dim *.uu Circuit_macros.ps Circuit_macros.dvi - rm -f mode.tex Circuit_macros.out *.upa *.upb *.brf + rm -f *.pic $(PICTEX) heading.tex *.dim *.uu Circuit_macros.ps + rm -f mode.tex Circuit_macros.out *.upa *.upb *.brf Circuit_macros.dvi diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Pconn.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/Pconn.m4 index 946ec0fda65..fbda5cc2e7e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Pconn.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Pconn.m4 @@ -24,8 +24,6 @@ P1: [ C3: pconnex(,ACF) with .w at last [].e+(0.2,0) `"\tt (,ACF)"' at last [].s below - C4: pconnex(,P) with .w at last [].e+(0.2,0) - `"\tt (,P)"' at (C4,last "") below C5: pconnex(U,D) with .w at last [].e+(0.2,0) `"\tt (U,D)"' at last [].s below C6: pconnex(U,DF) with .w at last [].e+(0.2,0) @@ -37,7 +35,11 @@ P1: [ ] P2: [ - C9: pconnex(,G) + C4: pconnex(,P) + `"\tt (,P)"' at last [].s below + C11: pconnex(,PF) with .w at last [].e+(0.2,0) + `"\tt (,PF)"' at (C11,last "") below + C9: pconnex(,G) with .w at last [].e+(0.2,0) `"\tt (,G)"' at last [].s below C91: pconnex(,GF) with .w at last [].e+(0.2,0) `"\tt (,GF)"' at last [].s below diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Relay.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/Relay.m4 index ee52fa49943..20c51ebb6a2 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Relay.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Relay.m4 @@ -1,84 +1,44 @@ .PS -# Relay.m4 +# Relay cct_init -movw = 0.85 -{contact - {`"\tt contact"' at last [].s+(0,-0.2) - "\sl P" rjust at last [].P.w - "\sl O" ljust at last [].O - "\sl C" ljust at last [].C } - move right_ movw; contact(R,) - {`"\tt contact(,R)"' at last [].s+(0,-0.2) - "\sl P" rjust at last [].P.w - "\sl O" ljust at last [].O - "\sl C" ljust at last [].C } - move right_ movw; contact(P) - {`"\tt contact(P)"' at last [].s+(0,-0.2) - "\sl P" rjust at last [].P.w - "\sl O" ljust at last [].O - "\sl C" ljust at last [].C } - move right_ movw; contact(O,); {`"\tt contact(O,)"' at last [].s+(0,-0.2)} - move right_ movw; contact(C,); {`"\tt contact(C,)"' at last [].s+(0,-0.2)} -#move right_ movw; reed; {`"\tt reed"' at last [].s+(0,-0.2)} -} -move down 0.8 -right_ -{contact(I) - {`"\tt contact(I)"' at last [].s+(0,-0.2) - "\sl P" rjust at last [].P.w - "\sl O" ljust at last [].O.e - "\sl C" ljust at last [].C.e } - move right_ movw; contact(RI) - {`"\tt contact(RI)"' at last [].s+(0,-0.2) - "\sl P" rjust at last [].P.w - "\sl O" ljust at last [].O.e - "\sl C" ljust at last [].C.e } - move right_ movw; contact(PI) - {`"\tt contact(PI)"' at last [].s+(0,-0.2) - "\sl P" rjust at last [].P.w - "\sl O" ljust at last [].O.e - "\sl C" ljust at last [].C.e } - move right_ movw; contact(OI); {`"\tt contact(OI)"' at last [].s+(0,-0.2)} - move right_ movw; contact(CI); {`"\tt contact(CI)"' at last [].s+(0,-0.2)} -#move right_ movw; reed(,,,fill_(0.9),CR); -# {`"\shortstack[l]{\tt reed(\\\tt$\;\;$,{,},fill\_(0.9),CR)}"' \ -# at last [].s+(0,-0.2)} -} -move down 1.2 -right_ -{ -relay +skip = 1.1 + +R1:relay {"\sl V1" wid 0.16 rjust at last [].V1 "\sl V2" ljust at last [].V2 - "\sl P1" rjust at last [].P1.w + "\sl P1" rjust at last [].P1-(dotrad_,0) "\sl O1" ljust at last [].O1 "\sl C1" ljust at last [].C1 } -`"\tt relay"' at last [].s+(0,-0.2) -relay(2) with .sw at last [].sw+(1.2,0) + S: `"\tt relay"' at last [].s+(0,-0.2) + +R5:relay(2,CTh) with .sw at last [].sw+(skip,0) + { for_(1,2,1,` + "\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x ') } + `"\tt (2,CTh)"' at (last [],S) + +R4:relay(2,O) with .sw at last [].sw+(skip,0) + {for_(1,2,1,` + "\sl P1" rjust at last [].P1-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x ')} + `"\tt (2,O)"' at (last [],S) + +R3:relay(2,PIAX) with .sw at last [].sw+(skip,0) {"\sl V1" rjust at last [].V1 - "\sl V2" ljust at last [].V2 - "\sl P1" rjust at last [].P1.w - "\sl O1" ljust at last [].O1 - "\sl C1" ljust below at last [].C1 - "\sl P2" rjust at last [].P2.w - "\sl O2" ljust at last [].O2 - "\sl C2" ljust at last [].C2 } -`"\tt relay(2)"' at last [].s+(0,-0.2) -relay(2,RPI) with .sw at last [].sw+(1.2,0) + "\sl V2" rjust at last [].V2 + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,-2pt__) ') } + `"\tt (2,PIAX)"' at (last [],S) + +R2:relay(2,R) with .sw at last [].sw+(skip,0) {"\sl V1" rjust at last [].V1 "\sl V2" ljust at last [].V2 - "\sl P1" rjust at last [].P1.w - "\sl O1" ljust at last [].O1 - "\sl C1" ljust at last [].C1+(0,2pt__) - "\sl P2" rjust at last [].P2.w - "\sl O2" ljust at last [].O2+(0,-2pt__) - "\sl C2" ljust at last [].C2 } -`"\tt relay(2,RIP)"' at last [].s+(0,-0.2) -relay(2,O) with .sw at last [].sw+(1.2,0) -`"\tt relay(2,O)"' at last [].s+(0,-0.2) -relay(2,CT) with .sw at last [].sw+(1.2,0) -`"\tt relay(2,CT)"' at last [].s+(0,-0.2) -} - + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x + "\sl C`'m4x" ljust at last [].C`'m4x ') } + `"\tt relay(2,R)"' at (last [],S) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Switches.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/Switches.m4 index 03218d4ab52..d8262be92db 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Switches.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Switches.m4 @@ -1,99 +1,117 @@ .PS # Switches.m4 cct_init + movewid = 0.25 -moveht = moveht*1.25 +# Row 1 right_; { - lswitch; rlabel(,`\hbox{\tt `lswitch'}') + lswitch; {S:"\tt ls{}witch" at last [].s+(0,-10bp__)} move right_ - lswitch(,,O); rlabel(,`\hbox{\tt (,{,}O)}') + lswitch(,,O); {"\tt (,,O)" at (last [],S)} move right_ - lswitch(,,C); rlabel(,`\hbox{\tt (,{,}C)}') + lswitch(,,C); {"\tt (,,C)" at (last [],S)} move right_ - lswitch(,,DA); rlabel(,`\hbox{\tt (,{,}DA)}') + lswitch(,,DA); {"\tt (,,DA)" at (last [],S)} move right_ - lswitch(,,DO); rlabel(,`\hbox{\tt (,{,}DO)}') + lswitch(,,dDO); {"\tt (,,dDO)" at (last [],S)} move right_ - lswitch(,,DC); rlabel(,`\hbox{\tt (,{,}DC)}') + lswitch(,,uDC); {"\tt (,,uDC)" at (last [],S)} } +# Row 2 move down; right_; { - lswitch(,,K); rlabel(,`\hbox{\tt (,{,}K)}') + lswitch(,,K); {S:"\tt (,,K)" at last [].s+(0,-10bp__)} move right_ - lswitch(,,KD); rlabel(,`\hbox{\tt (,{,}KD)}') + lswitch(,,KD); {"\tt (,,KD)" at (last [],S)} move right_ - lswitch(,,KOD); rlabel(,`\hbox{\tt (,{,}KOD)}') + lswitch(,,KOD); {"\tt (,,KOD)" at (last [],S)} move right_ - lswitch(,,KCD); rlabel(,`\hbox{\tt (,{,}KCD)}') + lswitch(,,KCD); {"\tt (,,KCD)" at (last [],S)} move right_ - bswitch; rlabel(,`\hbox{\tt `bswitch'}') + bswitch; {"\tt `bswitch'" at (last [],S)} move right_ - bswitch(,,C); rlabel(,`\hbox{\tt (,{,}C)}') + bswitch(,,C); {"\tt (,,C)" at (last [],S)} } +# Row 3 move down; right_; { - S: dswitch(,,) - ifgpic(`{[line invis] at S.c+(0,-0.2)}') - rlabel(,`\hbox{\tt \shortstack{`dswitch'=\\`switch'(,{,},D)}}') - thinlines_ - { spline <- from 0.25 along_(S) up 0.1 then up 0.05 left 0.1 - "\tt W" rjust - spline <- from S.c+(0,m4sc*2) up 0.1 then up 0.05 left 0.1 - "\tt B" rjust } - thicklines_ - move right_ - S: dswitch(,,WdBK); rlabel(,`\hbox{\tt (,{,}WdBK)}') - thinlines_ - { spline <- from tr_xy(0,-2) up 0.1 then up 0.10 left 0.1 - "\tt dB" rjust - spline <- from tr_xy(4,-2) right 0.1 then right 0.05 up 0.15 - "\tt K" above } - thicklines_ - move right_ - dswitch(,,WBuD); rlabel(,`\hbox{\tt (,{,}WBuD)}') - move right_ - dswitch(,,WdBKF); rlabel(,`\hbox{\tt (,{,}WdBKF)}') - move right_ - dswitch(,,WBL); rlabel(,`\hbox{\tt (,{,}WBL)}') - move right_ - dswitch(,,WdBKL); rlabel(,`\hbox{\tt (,{,}WdBKL)}') + D: dswitch(,,); {S: "\tt ds{}witch(,{},)" at last [].s+(0,-10bp__)} + thinlines_ + { spline <- from 0.25 along_(D) up 0.1 then up 0.05 left 0.1 + {"\tt W" rjust} + spline <- from D.c+(0,m4sc*2) up 0.1 then up 0.05 left 0.1 + {"\tt B" rjust }} + thicklines_ + move right_ + D: dswitch(,,WdBK); {"\tt (,,WdBK)" at (last [],S)+(0,-4bp__)} + thinlines_ + { spline <- from tr_xy(0,-2) up 0.1 then up 0.10 left 0.1 + {"\tt dB" rjust} + spline <- from tr_xy(4,-2) right 0.1 then right 0.05 up 0.15 + {"\tt K" above }} + thicklines_ + move right_ + dswitch(,,WBmdDK); {"\tt (,,WBmdDK)" at (last [],S)} + move right_ + dswitch(,,WBKTr); {"\tt (,,WBKTr)" at (last [],S)} + move right_ + dswitch(,,WdBL); {"\tt (,,WdBL)" at (last [],S+(0,-4bp__))} + move right_ + dswitch(,,WBCo); {"\tt (,,WBCo)" at (last [],S)} } +# Row 4 move down; right_; { - dswitch(,,WBT); rlabel(,`\hbox{\tt (,{,}WBT)}') + dswitch(,,WBKCo); {S: "\tt (,,WBKCo)" at last [].s+(0,-10bp__)} move right_ - dswitch(,,WdBKC); rlabel(,`\hbox{\tt (,{,}WdBKC)}') + dswitch(,,WBCb); {"\tt (,,WBCb)" at (last [],S)} move right_ - dswitch(,,WBM); rlabel(,`\hbox{\tt (,{,}WBM)}') + dswitch(,,WBDI); {"\tt (,,WBDI)" at (last [],S)} move right_ - dswitch(,,WBCO); rlabel(,`\hbox{\tt (,{,}WBCO)}') + dswitch(,,WBSd); {"\tt (,,WBSd)" at (last [],S)} move right_ - dswitch(,,WBMP); rlabel(,`\hbox{\tt (,{,}WBMP)}') + dswitch(,,WBFDI); {"\tt (,,WBFDI)" at (last [],S)} move right_ - dswitch(,,WBoKCP); rlabel(,`\hbox{\tt (,{,}WBoKCP)}') + dswitch(,,WBFSd); {"\tt (,,WBFSd)" at (last [],S)} } - move down; right_; { - dswitch(,,WBCY); rlabel(,`\hbox{\tt (,{,}WBCY)}') +# Row 5 + move down moveht*5/4; right_; { + dswitch(,,WBTh); {S: "\tt (,,WBTh)" at last [].s+(0,-10bp__)} + move right_ + dswitch(,,WBKC); {"\tt (,,WBKC)" at (last [],S)} + move right_ + dswitch(,,WBM); {"\tt (,,WBM)" at (last [],S)} + move right_ + dswitch(,,WBCO); {"\tt (,,WBCO)" at (last [],S)} + move right_ + dswitch(,,WBMP); {"\tt (,,WBMP)" at (last [],S)} + move right_ + dswitch(,,WBoKCP); {"\tt (,,WBoKCP)" at (last [],S)} + } +# Row 6 + move down moveht*5/4; right_; { + dswitch(,,WBCY); {S: "\tt (,,WBCY)" at last [].s+(0,-10bp__)} move right_ - dswitch(,,WBCZ); rlabel(,`\hbox{\tt (,{,}WBCZ)}') + dswitch(,,WBCZ); {"\tt (,,WBCZ)" at (last [],S)} move right_ - dswitch(,,WBCE); rlabel(,`\hbox{\tt (,{,}WBCE)}') + dswitch(,,WBCE); {"\tt (,,WBCE)" at (last [],S)} move right_ - dswitch(,,WBRH); rlabel(,`\hbox{\tt (,{,}WBRH)}') + dswitch(,,WBRH); {"\tt (,,WBRH)" at (last [],S)} move right_ - dswitch(,,WBRdH); rlabel(,`\hbox{\tt (,{,}WBRdH)}') + dswitch(,,WBRdH); {"\tt (,,WBRdH)" at (last [],S)} move right_ - dswitch(,,WBRHH); rlabel(,`\hbox{\tt (,{,}WBRHH)}') + dswitch(,,WBRHH); {"\tt (,,WBRHH)" at (last [],S)} } +# Row 7 move down; right_; { - dswitch(,,WBMMR); rlabel(,`\hbox{\tt (,{,}WBMMR)}') + dswitch(,,WBMMR); {S: "\tt (,,WBMMR)" at last [].s+(0,-10bp__)} move right_ - dswitch(,,WBMM); rlabel(,`\hbox{\tt (,{,}WBMM)}') + dswitch(,,WBMM); {"\tt (,,WBMM)" at (last [],S)} move right_ - dswitch(,,WBMR); rlabel(,`\hbox{\tt (,{,}WBMR)}') + dswitch(,,WBMR); {"\tt (,,WBMR)" at (last [],S)} move right_ - dswitch(,,WBEL); rlabel(,`\hbox{\tt (,{,}WBEL)}') + dswitch(,,WBEL); {"\tt (,,WBEL)" at (last [],S)} move right_ - dswitch(,,WBLE); rlabel(,`\hbox{\tt (,{,}WBLE)}') + dswitch(,,WBLE); {"\tt (,,WBLE)" at (last [],S)} move right_ - dswitch(,,WdBoKEL); rlabel(,`\hbox{\tt (,{,}WdBoKEL)}') + dswitch(,,WBoKEL); {"\tt (,,WBoKEL)" at (last [],S)} } .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Thermal.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/Thermal.m4 index 6feffc36808..68cdd7a0c07 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Thermal.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Thermal.m4 @@ -2,7 +2,7 @@ # Thermal.m4 cct_init define(`thermalsw', - `dswitch(`$1',`$2',WDdBT) + `dswitch(`$1',`$2',WDdBTh) circle rad distance(M4T,last line.c) at last line.c') thermalsw .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex b/Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex index f10e7100063..4bb8dbffa5a 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/Version.tex @@ -1 +1 @@ -Version 9.1 +Version 9.2 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex b/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex index 91c8fbe3ec6..38aff51f3b8 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/body.tex @@ -82,9 +82,8 @@ combinations of them for particular drawings. \xection{Using the macros\label{Using:}} This section describes the basic process of adding circuit diagrams to \latex documents to produce postscript or pdf files. On some operating -systems, project management software with graphical interfaces can be used -to automate the process, -but the steps can also be performed by a script, +systems, project management software with graphical interfaces can +automate the process, but the steps can also be performed by a script, makefile, or by hand for simple documents as described in~\SR{Quickstart:}. The diagram source file is preprocessed as illustrated in @@ -836,9 +835,10 @@ The two-terminal elements are shown in \FRS{CctTable} to~\REF{Diodes} and \FRS{Fuses} to~\REF{Switches}. Several elements are included more than once to illustrate some of their arguments, which are listed in \SR{defines}. +\enlargethispage{\baselineskip} \begin{figure}[h!] \input CctTable - \ifpdf\vspace*{-0.5\baselineskip}\fi% + \ifpdf\vspace*{-\baselineskip}\fi% \caption{Basic two-terminal elements, showing some variations.} \label{CctTable} \end{figure} @@ -1446,18 +1446,6 @@ A {\tt D1} puts phase dots at the {\sl P1, S1} end, {\tt D2} at the and centre-tap points.} \label{Xform} \end{figure} -\iffalse -A transformer with four connections is illustrated -in \FR{tran}. -\begin{figure}[hbt] - \parbox{4in}{\small \verbatiminput{tranbody.m4}}% - \quad\raise-0.2in\hbox{\input tran }% - \vspace{-\baselineskip} - \caption{Showing the - {\tt transformer(\linespec,L|R,np,A,ns)} macro.} - \label{tran} - \end{figure} -\fi %\enlargethispage{\baselineskip} \FR{Audio} shows some audio devices, defined in {\tt []} blocks, @@ -1479,7 +1467,6 @@ Thus, {\tt S: speaker(U) with .In2 at Here} \noindent -%\enlargethispage{\baselineskip} places an upward-facing speaker with input {\sl In2} at the current location. @@ -1536,63 +1523,79 @@ define(`nullor',`nport(`$1' The above example and the related gyrator macro are illustrated in \FR{NLG}. + \ifpdf\vspace*{\baselineskip}\fi% \begin{figure}[h!t] \input NLG - \ifpdf\vspace*{-1.5\baselineskip}\fi% \caption{The {\tt nullor} example and the {\tt gyrator} macro are customizations of the {\tt nport} macro.} \label{NLG} \end{figure} -A basic winding macro for magnetic-circuit sketches and similar figures -is shown in \FR{Windings}. +The double-throw switches shown in \FR{NPDT} are drawn in the +current drawing direction like the two-terminal elements, but are +composite elements that must be placed accordingly. \begin{figure}[h!t] - \vspace*{-\baselineskip}% -% \ifpdf\vspace*{-2\baselineskip}\else \vspace{-\baselineskip}\fi - \input Windings - \ifpdf\vspace*{-\baselineskip}\else\vspace*{-1ex}\fi - \caption{The {\tt winding(L|R, diam, pitch, turns, core wid, core color)} - macro draws a coil with axis along the current drawing direction. - Terminals {\tt T1} and {\tt T2} are defined. - Setting the first argument to {\tt R} draws a right-hand winding.} - \label{Windings} + \ifpdf\vspace*{-0.5\baselineskip}\fi% + \input NPDT + \ifpdf\vspace*{-0.5\baselineskip}\fi% + \caption{Multipole double-throw switches drawn by + {\tt NPDT({\sl npoles}, [R])}.} + \label{NPDT} \end{figure} -For simplicity, the complete spline -is first drawn and then blanked in appropriate places using the background -(core) color (\verb!lightgray! for example, default \verb!white!). -\FR{Relay} shows the macro {\tt contact({\sl chars})}, +\FR{Contact} shows the macro {\tt contact({\sl chars})}, which contains predefined locations {\sl P, C, O} for the armature and normally closed and normally open terminals. An {\tt I} in the first argument draws open circles for contacts. -The macro {\tt relay({\sl poles, chars})} -defines coil terminals {\sl V1, V2} and contact -terminals {\sl P$_i$, C$_i$, O$_i$.} -\begin{figure}[ht] +\begin{figure}[h!t] \ifpdf\vspace*{-\baselineskip}\else\vspace*{-0.5\baselineskip}\fi% - \input Relay + \input Contact \vspace{-1ex} \caption{The {\tt contact({\sl chars})} - and {\tt relay({\sl poles, chars})} - macros (default direction right).} - \label{Relay} + macro (default drawing direction right) + can be used alone, in a set of ganged contacts, or in relays.} + \label{Contact} \end{figure} -The double-throw switches shown in \FR{NPDT} are drawn in the -current drawing direction like the two-terminal elements, but are -composite elements that must be placed accordingly. +The {\tt contacts({\sl poles, chars})} macro in \FR{Contacts} +draws multiple contacts. \begin{figure}[h!t] - \ifpdf\vspace*{-0.5\baselineskip}\fi% - \input NPDT - \ifpdf\vspace*{-0.5\baselineskip}\fi% - \caption{Multipole double-throw switches drawn by - {\tt NPDT({\sl npoles}, [R])}.} - \label{NPDT} + \ifpdf\vspace*{-\baselineskip}\else\vspace*{-0.5\baselineskip}\fi% + \input Contacts + \vspace{-1ex} + \caption{The {\tt contacts({\sl poles, chars})} + macro (drawing direction right).} + \label{Contacts} + \end{figure} + +For drawing relays, the macro + {\tt relaycoil({\sl chars, wid, ht,} {\tt U|D|L|R|}{\sl degrees})} +shown in \FR{relaycoil} provides a choice of connection points and +actuator types. +\begin{figure}[h!t] + \ifpdf\vspace*{-\baselineskip}\else\vspace*{-0.5\baselineskip}\fi% + \input relaycoil + \vspace{-1ex} + \caption{The {\tt relaycoil} macro.} + \label{relaycoil} + \end{figure} + +The {\tt relay({\sl poles, chars})} macro in \FR{Relay} +defines coil terminals {\sl V1, V2} and contact +terminals {\sl P$_i$, C$_i$, O$_i$.} +\begin{figure}[h!t] + \ifpdf\vspace*{-\baselineskip}\else\vspace*{-0.5\baselineskip}\fi% + \input Relay + \vspace{-1ex} + \caption{The {\tt relay({\sl poles, chars})} + macro (drawing direction right).} + \label{Relay} \end{figure} The {\tt jack} and {\tt plug} macros and their defined points are illustrated in \FR{Jack}. + The first argument of both macros establishes the drawing direction. \begin{figure}[h!t] \input Jack \vspace{-1ex} @@ -1601,21 +1604,11 @@ The {\tt jack} and {\tt plug} macros and their defined points are and their defined points.} \label{Jack} \end{figure} - The first argument of both macros - establishes the drawing direction. The second argument is a string of - characters defining drawn components. + The second argument is a string of characters defining drawn components. An {\tt R} in the string specifies a right orientation with respect to the drawing direction. The two principal terminals of the jack are included by putting \hbox{{\tt L} {\tt S}} -% -% This is a kludge to put a blank line on the bottom -\phantom{or both into the string with associated make ({\tt M}) -or break ({\tt B}) points. Thus, {\tt LMB} within the third}\hfill\break -\phantom{or both into the string with associated make ({\tt M}) -or break ({\tt B}) points. Thus, {\tt LMB} within the third}\hfill\break -% -% or both into the string with associated make ({\tt M}) or break ({\tt B}) points. Thus, {\tt LMB} within the third argument draws the {\tt L} contact with @@ -1623,10 +1616,26 @@ or break ({\tt B}) points. Thus, {\tt LMB} within the third}\hfill\break or {\tt S[M|B]} substrings add auxiliary contacts with specified make or break points. -%\pagebreak +A basic winding macro for magnetic-circuit sketches and similar figures +is shown in \FR{Windings}. +For simplicity, the complete spline +is first drawn and then blanked in appropriate places using the background +(core) color (\verb!lightgray! for example, default \verb!white!). +\begin{figure}[h!t] + \vspace*{-\baselineskip}% +% \ifpdf\vspace*{-2\baselineskip}\else \vspace{-\baselineskip}\fi + \input Windings + \ifpdf\vspace*{-\baselineskip}\else\vspace*{-1ex}\fi + \caption{The {\tt winding(L|R, diam, pitch, turns, core wid, core color)} + macro draws a coil with axis along the current drawing direction. + Terminals {\tt T1} and {\tt T2} are defined. + Setting the first argument to {\tt R} draws a right-hand winding.} + \label{Windings} + \end{figure} + A macro for drawing headers is in \FR{Headers}, and some experimental connectors are shown in \FR{Conn} and \FR{Pconn}. -The {\tt tstrip} macro allows {\sl key}{\tt =}{\sl value}{\tt ;} arguments +The {\tt tstrip} macro allows ``{\sl key}{\tt =}{\sl value}{\tt ;}'' arguments \begin{figure}[h!t] \ifpdf\vspace*{-0.5\baselineskip}\fi% \input Headers @@ -1655,21 +1664,23 @@ for width and height. \label{Pconn} \end{figure} +\pagebreak \subsection{Semiconductors\label{Semiconductors:}}% \FR{Bip} shows the variants of bipolar transistor macro {\tt bi\_tr(\linespec,L|R,P,E)} which contains predefined internal locations {\sl E}, {\sl B}, {\sl C}. -The first argument defines the distance and direction -from {\sl E} to {\sl C,} with location determined by the enclosing -block as for other elements, and the base placed -\begin{figure}[h!b] +The first argument defines the distance and direction from {\sl E} +\begin{figure}[h!t] \ifpdf\vspace*{-0.5\baselineskip}\fi% \input Bip \ifpdf\vspace*{-0.5\baselineskip}\fi% - \caption{Bipolar transistor variants (current direction upward).} + \caption{Variants of bipolar transistor {\tt bi\_tr(\linespec,L|R,P,E)} + (current direction upward).} \label{Bip} \end{figure} +to {\sl C,} with location determined by the enclosing +block as for other elements, and the base placed to the left or right of the current drawing direction according to the second argument. Setting the third argument to {\tt P} creates a PNP device instead of NPN, and setting the @@ -1708,6 +1719,7 @@ specified as shown in \FR{bitrans}. \label{bitrans} \end{figure} +\pagebreak A UJT macro with predefined internal locations {\sl B1,} {\sl B2,} and {\sl E} is shown in \FR{ujt}, and a thyristor macro with predefined internal locations @@ -1748,6 +1760,19 @@ draws the element from position {\sl A} to position {\sl B} with label Some FETs with predefined internal locations {\sl S,} {\sl D,} and {\sl G} are also included, with similar arguments to those of {\tt bi\_tr,} as shown in \FR{fet}. +\begin{figure}[h!t] + \ifpdf\vspace*{-\baselineskip}\fi% + \input fet + \ifpdf\vspace*{-\baselineskip}\fi% + \caption{JFET, insulated-gate enhancement and depletion MOSFETs, + and simplified versions. + These macros are wrappers that invoke the {\tt mosfet} + macro as shown in the middle and bottom rows. + The two lower-right examples show custom devices, the first + defined by omitting the substrate connection, and the second + defined using a wrapper macro.} + \label{fet} + \end{figure} In all cases the first argument is a linespec, and entering {\tt R} as the second argument orients the {\sl G} terminal to the right of the @@ -1765,21 +1790,8 @@ The obsolete letter {\tt L} is equivalent to {\tt dM} and has been kept temporarily for compatibility. This system allows considerable freedom in choosing or customizing components, as illustrated in \FR{fet}. -\begin{figure}[h!t] - \ifpdf\vspace*{-\baselineskip}\fi% - \input fet - \ifpdf\vspace*{-\baselineskip}\fi% - \caption{JFET, insulated-gate enhancement and depletion MOSFETs, - and simplified versions. - These macros are wrappers that invoke the {\tt mosfet} - macro as shown in the middle and bottom rows. - The two lower-right examples show custom devices, the first - defined by omitting the substrate connection, and the second - defined using a wrapper macro.} - \label{fet} - \end{figure} -\pagebreak +%\pagebreak The number of possible semiconductor symbols is very large, so these macros must be regarded as prototypes. Often an element is a minor modification of existing elements. For example, @@ -1904,7 +1916,7 @@ By default, $N=2$ except for macros {\tt NOT\_gate} and {\tt BUFFER\_gate}, which have one input {\tt In1} unless they are given a first argument, which is treated as the line specification of a two-terminal element. -\begin{figure}[h!t] +\begin{figure}[h!] \input Logic \caption{Basic logic gates. The input and output locations of a three-input NOR gate are shown. Inputs are negated by @@ -1932,7 +1944,6 @@ regardless of gate orientation, as in \FR{FF}. \end{figure} Beyond a default number (6) of inputs, the gates are given wings as in \FR{exVIII}. -\pagebreak Negated inputs or outputs are marked by circles drawn using the \verb|NOT_circle| macro. The name marks the point at the outer edge of the circle and the circle itself has the same name prefixed by~{\tt N\_}. @@ -1986,7 +1997,7 @@ but requires internal locations of the block to be referenced using \label{Buffer} \end{figure} -\pagebreak +%\pagebreak A good strategy for drawing complex logic circuits might be summarized as follows: \begin{itemize}\itemsep=0pt @@ -2027,16 +2038,19 @@ the very similar demultiplexer. \end{figure} \FR{FlipFlops} shows -the macro {\tt FlipFlop(D|T|RS|JK, {\sl label, boxspec})}, which is a +the macro {\tt FlipFlop(D|T|RS|JK, {\sl label, boxspec, pinlength})}, +which is a wrapper for the more general macro {\tt FlipFlopX(}{\sl boxspec, label, -leftpins, toppins, rightpins, bottompins}{\tt )}. +leftpins, toppins, rightpins, bottompins, pinlength}{\tt )}. \begin{figure}[h!t] \input FlipFlop \caption{The {\tt FlipFlop} and {\tt FlipFlopX} macros, with variations.} \label{FlipFlops} \end{figure} +The first argument modifies the box (labelled Chip) default specification. Each of arguments 3 to 6 is null or a string of {\sl pinspecs} separated -by semicolons ({\tt;}). {\sl Pinspecs} are either empty (null) or of the form +by semicolons ({\tt;}). +A {\sl pinspec} is either empty (null) or of the form {\tt[}{\sl pinopts}{\tt]:[}{\sl label}{\tt[:}{\sl Picname}{\tt]]}. The first colon draws the pin. Pins are placed top to bottom or left to right along the box edges with @@ -2045,10 +2059,12 @@ by default; eg {\tt W1, W2, ..., N1, N2, ..., E1, ..., S1, ...} ; however, if {\tt:}{\sl Picname} is present in a {\sl pinspec} then {\sl Picname} replaces the default name. A {\sl pinspec} label is text placed at the pin base. Semicolons are -not allowed in labels; use eg \verb|\char59{}| instead, and to put a bar over +not allowed in labels; use e.g., \verb|\char59{}| instead. To put a bar over a label, use {\tt lg\_bartxt(}{\sl label}{\tt)}. The {\sl pinopts} are {\tt [L|M|I|O][N][E]} as for the \verb|lg_pin| macro. +Option argument 7 is the pin length in drawing units. +\pagebreak Customized gates can be defined simply. For example, the following code defines the custom flipflops in \FR{ShiftR}. \begin{figure}[h!t] @@ -2070,7 +2086,7 @@ illustrated in \FR{Dac}. The figure shows the default and predefined internal locations, the number of which can be specified as macro arguments. \begin{figure}[h!t] - \ifpdf\vspace*{-\baselineskip}\fi% +% \ifpdf\vspace*{-\baselineskip}\fi% \input Dac \ifpdf\vspace*{-\baselineskip}\fi% \caption{The {\tt dac({\sl width,height},nIn,nN,nOut,nS)} @@ -2081,7 +2097,6 @@ of which can be specified as macro arguments. In addition to the logic gates described here, some experimental IC chip diagrams are included with the distributed example files. -\pagebreak \xection{Element and diagram scaling\label{Scaling:}} There are several issues related to scale changes. You may wish to use @@ -2220,6 +2235,7 @@ to defer macro expansion. Macro arguments are referenced inside a macro by number; thus {\tt \$1} refers to the first argument. A few examples will be given. +\pagebreak %\enlargethispage{\baselineskip} %\noindent\hbox{}\\ {\bf Example 1:} %\par\noindent {\bf Example 1:} @@ -2227,9 +2243,9 @@ A few examples will be given. Custom two-terminal elements can often be defined by writing a wrapper for an existing element. For example, an enclosed thermal switch can be defined as shown in \FR{Thermal}. -\begin{figure}[h!] +\begin{figure}[h!t] \parbox{4.2in}{\tt define(`thermalsw',\hfill\break - \hbox{}\space`dswitch(`\$1',`\$2',WDdBT)\hfill\break + \hbox{}\space`dswitch(`\$1',`\$2',WDdBTh)\hfill\break \hbox{}\space\space circle rad distance(M4T,last line.c) at last line.c ') }% \hfill\raise-0.15in\hbox{\input Thermal } @@ -2252,6 +2268,7 @@ a subcircuit that is replicated several times to generate \FR{Tline}. \label{Tline} \end{figure} +\pagebreak \Example{3} %\par\noindent {\bf Example 3:} Composite elements containing several basic elements may be diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex b/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex index 6b8f615fe29..8e21bba0ec6 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/defines.tex @@ -287,9 +287,9 @@ C,P: {\tt dimen\_}$/4$, E,K: {\tt dimen\_}$/5$) arg5 = wid (defaults F: {\sl height}*0.3, C,P: {\sl height}*0.4, E,K: {\sl height}) \seesect{Twoterminal:}} -\macrodef{cbreaker}{cbreaker}{(\linespec,L|R,D|T|TS)} +\macrodef{cbreaker}{cbreaker}{(\linespec,L|R,D|Th|TS)} {cct} - {circuit breaker to left or right, {\tt D}=with dots; {\tt T}=thermal; + {circuit breaker to left or right, {\tt D}=with dots; {\tt Th}=thermal; {\tt TS}=squared thermal\seesect{Twoterminal:}} \macrodef{ccoax}{ccoax}{(at {\sl location}, M|F, {\sl diameter})} {cct} @@ -318,9 +318,26 @@ {\tt R}=reversed polarity\seesect{Twoterminal:}} \macrodef{contact}{contact}{({\sl chars})} {cct} - {single-pole contact: {\tt P}= three position, {\tt O}= normally open, - {\tt C}= normally closed, {\tt I}= circle contacts, {\tt R}= right - orientation + {single-pole contact: + {\tt O}= normally open, + {\tt C}= normally closed (default), + {\tt I}= open circle contacts, + {\tt P}= three position, + {\tt R}= right orientation, + {\tt T}= T contacts, + {\tt U}= U contacts + \seesect{Composite:}} +\macrodef{contacts}{contacts}{({\sl count, chars})} + {cct} + {multiple ganged single-pole contacts: + {\tt P}= three position, + {\tt O}= normally open, + {\tt C}= normally closed, + {\tt D}= dashed ganging line over contact armatures + {\tt I}= open circle contacts, + {\tt R}= right orientation, + {\tt T}= T contacts, + {\tt U}= U contact lines parallel to drawing direction \seesect{Composite:}} \macrodef{contline}{contline}{({\sl line})} {gen} @@ -526,7 +543,7 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,% label},{\sl label},{\sl chars})} {cct} {general triple label; {\sl chars:} - X displacement is from the centre of the last + $x$ (drawing direction) displacement is from the centre of the last line rather than the centre of the last {\tt [ ]}; L,R,A,B align labels ljust, rjust, above, or below (absolute) respectively \seesect{Labels:}} @@ -591,29 +608,30 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,% {cct} {SPST switch left or right, W=baseline, B=contact blade, dB=contact blade to the right of drawing direction, - K=vertical closing contact line, + Bm = mirror contact blade, + Bo = contact blade more widely open, + Cb = circuit-breaker function, + Co = contactor function, C = external operating mechanism, D = circle at contact and hinge, (dD = hinge only, uD = contact only) E = emergency button, - EL = early close - (or late open), + EL = early close (or late open), LE = late close (or early open), F = fused, H = time delay closing, uH = time delay opening, - HH = time delay - opening and closing, - K = vertical closing contact, + HH = time delay opening and closing, + K=vertical closing contact line, L = limit, M = maintained (latched), MM = momentary contact on make, MR = momentary contact on release, - MMR = momentary contact - on make and release, + MMR = momentary contact on make and release, O = hand operation button, P = pushbutton, - T = thermal control linkage, + Th = thermal control linkage, + Tr = tripping, Y = pull switch, Z = turn switch \seesect{Twoterminal:}} @@ -696,7 +714,8 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,% \macrodef{fitcurve}{fitcurve}{(V,n,[e.g. dotted],m (default 0))} {gen} {Draw a spline through positions V[m], $ldots$ V[n]: Works only with dpic.} -\macrodef{FlipFlop}{FlipFlop}{(D|T|RS|JK,{\sl label},{\sl boxspec})} +\macrodef{FlipFlop}{FlipFlop}{(D|T|RS|JK,{\sl label},{\sl boxspec},% + {\sl pinlength})} {log} {flip-flops, {\sl boxspec}=e.g.\ ht x wid y \seesect{Logicgates:}} @@ -715,10 +734,12 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,% in future}. Similar to {\tt FlipFlop6}.} \macrodef{FlipFlopX}{FlipFlopX}{({\sl boxspec, label, leftpins, toppins, - rightpins, bottompins})} + rightpins, bottompins, pinlength})} {log} - {General flipflop. Each of args 3 to 6 is null or a string of {\sl pinspecs} - separated by semicolons ({\tt;}). {\sl Pinspecs} are either empty + {General flipflop. + Arg 1 modifies the box (labelled Chip) default specification. + Each of args 3 to 6 is null or a string of {\sl pinspecs} + separated by semicolons ({\tt;}). A {\sl Pinspec} is either empty or of the form {\tt[}{\sl pinopts}{\tt]:[}{\sl label}{\tt[:}{\sl Picname}{\tt]]}. The first colon draws the pin. @@ -729,12 +750,13 @@ B|CR|D|G|L|LE[R]|P[R]|S|Sh|T|V|v|w|Z|chars,% replaces the default name. A {\sl pinspec} label is text placed at the pin base. Semicolons are not allowed in labels; use, e.g., {\tt \char92{}char59\char123\char125} - instead, - and to put a bar over a label, use {\tt lg\_bartxt(}{\sl label}{\tt)}. + instead. + To put a bar over a label, use {\tt lg\_bartxt(}{\sl label}{\tt)}. The {\sl pinopts} are {\tt[N|L|M][E]}; {\tt N}=pin with not circle; {\tt L}=active low out; {\tt M}=active low in; - {\tt E}=edge trigger \seesect{Logicgates:}} + {\tt E}=edge trigger \seesect{Logicgates:}. Optional arg 7 is the length + of pins} \macrodef{for\_}{for_}{({\sl start},{\sl end},{\sl increment},`{\sl actions}')} {gen} {integer for loop with index variable {\tt m4x} \seesect{Looping:}} @@ -1259,6 +1281,9 @@ nw,nn,ne,ns,pin lgth,style, other commands})} \macrodef{pc\_\_}{pc__}{} {gen} {absolute points} +\macrodef{pvcell}{pvcell}{({\sl linespec, width, height})} + {cct} + {PV cell} \macrodef{px\_\_}{px__}{} {gen} {absolute SVG screen pixels} @@ -1338,15 +1363,37 @@ nw,nn,ne,ns,pin lgth,style, other commands})} {\tt R}=right orientation; {\tt C}=closed contact; e.g., {\tt reed(,,dimen\_/5,shaded "lightgreen"} \seesect{Composite:}} +\macrodef{relay}{relay}{({\sl number of poles, chars})} {cct} {relay: n poles (default 1), {\sl chars:} {\tt O}=normally open, {\tt C}=normally closed, {\tt P}=three position, default double throw, {\tt L}=drawn left (default), - {\tt R}=drawn right, {\tt T}=thermal. + {\tt R}=drawn right, {\tt Th}=thermal. Argument 3={\tt [L|R]} is deprecated but works for backward compatibility \seesect{Composite:}} -\macrodef{resetdir\_)}{resetdir_)}{} +\macrodef{relaycoil}{relaycoil}{({\sl chars, wid, ht,} R|L|U|D|{\sl degrees})} + {cct} + {chars: + {\tt X}=or default: external lines from A2 and B2; + {\tt AX}=external lines at positions A1,A3; + {\tt BX}=external lines at positions B1,B3; + {\tt NX}=no lines at positions A1,A2,A3,B1,B2,B3; + {\tt SO}=slow operating; + {\tt SOR}=slow operating and release; + {\tt SR}=slow release; + {\tt HS}=hight speed; + {\tt HS}=hight speed; + {\tt NAC}=unaffected by AC current; + {\tt AC AC}=current; + {\tt ML}=mechanically latched; + {\tt PO}=polarized; + {\tt RM}=remanent; + {\tt RH}=remanent; + {\tt TH}=thermal; + {\tt EL}=electronic + \seesect{Composite:}} +\macrodef{resetdir\_}{resetdir_)}{} {gen} {resets direction set by {\tt setdir\_}} \macrodef{resetrgb}{resetrgb}{} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/md.tex b/Master/texmf-dist/doc/latex/circuit-macros/doc/md.tex deleted file mode 100644 index 7d195339e1f..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/md.tex +++ /dev/null @@ -1,59 +0,0 @@ -% -\newdimen{\leftwid}\setlength{\leftwid}{2in} -\newdimen{\libwid}\setlength{\libwid}{0.5in} -\newdimen\rightwid -\setlength{\rightwid}{\textwidth} -\addtolength{\rightwid}{-\leftwid} -\addtolength{\rightwid}{-\libwid} -% -\newbox\Defbox -%\iffalse% original macrodef: -%\newcommand{\macrodef}[3]{\setbox\Defbox=\hbox{\tt #1}% -% \ifdim\wd\Defbox>\textwidth% -% \setbox\Defbox=\hbox{\parbox{\textwidth}{\tt #1}}\fi -% \ifdim\wd\Defbox>\leftwid% -% \box\Defbox\hfill\break\hspace*{\leftwid}% -% \else\hbox to \leftwid{\box\Defbox\hfill}\fi% -% \hbox to \libwid{#2\hfill}\parbox[t]{\rightwid}% -% {\raggedright #3}\vspace{\parsep}\\} -%\fi - -\newcommand{\macx}[2]{% - \phantomsection\pdfbookmark[subsection]{#1}{#2}#1} - -\newcommand{\macrodef}[5]{\begin{samepage}% -\phantomsection\pdfbookmark[subsection]{#1}{#2}% -\setbox\Defbox=\hbox{\tt #1#3}% - \ifdim\wd\Defbox>\textwidth% - \setbox\Defbox=\hbox{\parbox{\textwidth}{\tt #1#3}}\fi - \ifdim\wd\Defbox>\leftwid% - \box\Defbox\hfill\break\hspace*{\leftwid}% - \else\hbox to \leftwid{\box\Defbox\hfill}\fi% - \hbox to \libwid{#4\hfill}\parbox[t]{\rightwid}% - {\raggedright #5}\end{samepage}\vspace{\parsep}\\} - -\newcommand{\seesect}[1]{ (see \SR{#1})} - - -\vspace{\abovedisplayskip} -\noindent -\macrodef{Along\_}{Along_}{({\sl LinearObj,distance,}[R])} - {gen} - {Distance arg2 (default all the way) along a linear object - from {\tt .start} to {\tt .end} - (from {\tt .end} to {\tt .start} if arg3={\tt R}) } -\macrodef{AND\_gate}{AND_gate}{({\sl n},N)} - {log} - {basic `and' gate, 2 or {\sl n\/} inputs; {\tt N}=negated input. - Otherwise, arg1 can be a sequence of letters {\tt P|N} - to define normal or negated inputs - \seesect{Logicgates:}} -\macrodef{AND\_gen}{AND_gen}{($n$,{\sl chars},[{\sl wid},[{\sl ht}]])} - {log} - {general AND gate: $n$=number of inputs $(0\leq n\leq 16)$; - {\sl chars:} - B=base and straight sides; A=Arc; - [N]NE,[N]SE,[N]I,[N]N,[N]S=inputs or circles; - [N]O=output; C=center. - Otherwise, arg1 can be a sequence of letters {\tt P|N} - to define normal or negated inputs.} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/relaycoil.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/relaycoil.m4 new file mode 100644 index 00000000000..b3273794cd0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/doc/relaycoil.m4 @@ -0,0 +1,40 @@ +.PS +# relaycoil.m4 +cct_init + + spc = dimen_/3 +{ relaycoil; S: "\tt re{}laycoil" at last [].s+(0,-20bp__) + { "\sl V1" wid 10bp__ at last [].V1 rjust + "\sl V2" at last [].V2 ljust } + K: relaycoil(NX) with .nw at last [].ne+(spc*4,0); "\tt (NX)" at (last [],S) + { thinlines_ + spline <- from K.A1 left 7bp__ then up 4bp__ left 4bp__; "\sl A1" rjust + arrow <- from K.A2 left 10bp__; "\sl A2" rjust + spline <- from K.A3 left 7bp__ then down 4bp__ left 4bp__; "\sl A3" rjust + spline <- from K.B1 right 7bp__ then up 4bp__ right 4bp__; "\sl B1" ljust + arrow <- from K.B2 right 10bp__; "\sl B2" ljust + spline <- from K.B3 right 7bp__ then down 4bp__ right 4bp__; "\sl B3" ljust + thicklines_ + } + relaycoil(AXSR) with .nw at last [].ne+(spc*5,0); "\tt (AXSR)" at (last [],S) + { "\sl V1" at last [].V1 rjust; "\sl V2" at last [].V2 rjust } + relaycoil(BXSR) with .nw at last [].ne+(spc*2,0); "\tt (BXSR)" at (last [],S) + { "\sl V1" at last [].V1 ljust; "\sl V2" at last [].V2 ljust } + relaycoil(SR) with .nw at last [].ne+(spc*4,0); "\tt (SR)" at (last [],S) + relaycoil(SO) with .nw at last [].ne+(spc,0); "\tt (SO)" at (last [],S) + relaycoil(SOR) with .nw at last [].ne+(spc,0); "\tt (SOR)" at (last [],S) + } +{ + move down_ 3/4; right_ + relaycoil(HS); S: "\tt (HS)" at last [].s+(0,-12bp__) + relaycoil(NAC) with .nw at last [].ne+(spc,0); "\tt (NAC)" at (last [],S) + relaycoil(AC) with .nw at last [].ne+(spc,0); "\tt (AC)" at (last [],S) + relaycoil(ML) with .nw at last [].ne+(spc,0); "\tt (ML)" at (last [],S) + relaycoil(PO) with .nw at last [].ne+(spc,0); "\tt (PO)" at (last [],S) + relaycoil(RM) with .nw at last [].ne+(spc,0); "\tt (RM)" at (last [],S) + relaycoil(RH) with .nw at last [].ne+(spc,0); "\tt (RH)" at (last [],S) + relaycoil(TH) with .nw at last [].ne+(spc,0); "\tt (TH)" at (last [],S) + relaycoil(EL) with .nw at last [].ne+(spc,0); "\tt (EL)" at (last [],S) + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/tran.m4 b/Master/texmf-dist/doc/latex/circuit-macros/doc/tran.m4 deleted file mode 100644 index 3314be47e0f..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/tran.m4 +++ /dev/null @@ -1,5 +0,0 @@ -.PS -# `tran.m4' -cct_init -include(tranbody.m4) -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/doc/tran.tex b/Master/texmf-dist/doc/latex/circuit-macros/doc/tran.tex deleted file mode 100644 index a894de26d59..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/doc/tran.tex +++ /dev/null @@ -1,76 +0,0 @@ -% tran.m4 -\begin{tikzpicture}[scale=2.54] -% dpic version 2014.03.24 option -g for TikZ and PGF 1.01 -\ifx\dpiclw\undefined\newdimen\dpiclw\fi -\global\def\dpicdraw{\draw[line width=\dpiclw]} -\global\def\dpicstop{;} -\dpiclw=0.8bp -\dpiclw=0.8bp -\dpicdraw (0,0) - --(0.2,0)\dpicstop -\dpicdraw (0.2,0.333333) - --(0.2,0.291667)\dpicstop -\dpicdraw (0.2,0.291667) - --(0.194444,0.291667)\dpicstop -\dpicdraw (0.2,0.291667) - ..controls (0.217259,0.291667) and (0.23125,0.277676) - ..(0.23125,0.260417) - ..controls (0.23125,0.243158) and (0.217259,0.229167) - ..(0.2,0.229167)\dpicstop -\dpicdraw (0.2,0.229167) - --(0.194444,0.229167)\dpicstop -\dpicdraw (0.2,0.229167) - ..controls (0.217259,0.229167) and (0.23125,0.215176) - ..(0.23125,0.197917) - ..controls (0.23125,0.180658) and (0.217259,0.166667) - ..(0.2,0.166667)\dpicstop -\dpicdraw (0.2,0.166667) - --(0.194444,0.166667)\dpicstop -\dpicdraw (0.2,0.166667) - ..controls (0.241667,0.166667) and (0.241667,0.104167) - ..(0.2,0.104167)\dpicstop -\dpicdraw (0.2,0.104167) - --(0.194444,0.104167)\dpicstop -\dpicdraw (0.2,0.104167) - ..controls (0.241667,0.104167) and (0.241667,0.041667) - ..(0.2,0.041667)\dpicstop -\dpicdraw (0.2,0.041667) - --(0.194444,0.041667)\dpicstop -\dpicdraw (0.2,0.041667) - --(0.2,-0)\dpicstop -\dpicdraw (0.272917,0.291667) - --(0.272917,0.041667)\dpicstop -\dpicdraw (0.335417,0.291667) - --(0.335417,0.041667)\dpicstop -\dpicdraw (0.408333,0.072917) - --(0.408333,0.072917)\dpicstop -\dpicdraw (0.408333,0.072917) - --(0.413889,0.072917)\dpicstop -\dpicdraw (0.408333,0.072917) - ..controls (0.366667,0.072917) and (0.366667,0.135417) - ..(0.408333,0.135417)\dpicstop -\dpicdraw (0.408333,0.135417) - --(0.413889,0.135417)\dpicstop -\dpicdraw (0.408333,0.135417) - ..controls (0.391074,0.135417) and (0.377083,0.149408) - ..(0.377083,0.166667) - ..controls (0.377083,0.183926) and (0.391074,0.197917) - ..(0.408333,0.197917)\dpicstop -\dpicdraw (0.408333,0.197917) - --(0.413889,0.197917)\dpicstop -\dpicdraw (0.408333,0.197917) - ..controls (0.366667,0.197917) and (0.366667,0.260417) - ..(0.408333,0.260417)\dpicstop -\dpicdraw (0.408333,0.260417) - --(0.413889,0.260417)\dpicstop -\dpicdraw (0.408333,0.260417) - --(0.408333,0.260417)\dpicstop -\dpicdraw (0.2,0.333333) - --(0,0.333333)\dpicstop -\dpicdraw (0.408333,0.260417) - --(0.608333,0.260417) - --(0.608333,0.360417)\dpicstop -\dpicdraw (0.408333,0.072917) - --(0.608333,0.072917) - --(0.608333,-0.027083)\dpicstop -\end{tikzpicture} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic b/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic index 40d621943eb..ead69e973e4 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic +++ b/Master/texmf-dist/doc/latex/circuit-macros/dpictools.pic @@ -3,12 +3,12 @@ # m4 macro NeedDpicTools or the pic statement copy "HOMELIB_/dpictools.pic" # when HOMELIB_ is defined or, generically, copy "<path>dpictools.pic" -# Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under # -# the LaTeX Project Public License. The files of this distribution may # -# be redistributed or modified provided that this copyright notice is # -# included and provided that modifications are clearly marked to # -# distinguish them from this distribution. There is no warranty # -# whatsoever for these files. # +# Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under # +# the LaTeX Project Public Licence in file Licence.txt. The files of # +# this distribution may be redistributed or modified provided that this # +# copyright notice is included and provided that modifications are clearly # +# marked to distinguish them from this distribution. There is no warranty # +# whatsoever for these files. # # findroot(function,left bound,right bound,tolerance,var name) # Solve function(x)=0 by the method of bisection @@ -61,11 +61,56 @@ define loop {ld__+=1 define array { for i_array=2 to $+ do { exec sprintf("$1[%g] = $%g",i_array-1,i_array); }} +# array2(var,expr1,expr2,...) +# var[expr1,1]=expr2; var[expr1,2]=expr3,... +define array2 { for i_array=3 to $+ do { + exec sprintf("$1[%g,%g]=$%g",$2,i_array-2,i_array);}} + # posarray(Var,position1,position2,...) # Var[1]:position1; Var[2]:Position2,... define posarray { for i_array=2 to $+ do { exec sprintf("$1[%g] : $%g",i_array-1,i_array); }} +# posarray2(Var,expr,position1,position2,...) +# Var[expr,1]:position1; Var[expr,2]:Position2,... +define posarray2 { for i_array=3 to $+ do { + exec sprintf("$1[%g,%g] : $%g",$2,i_array-2,i_array); }} + +# Operations on 3-d vectors (could be generalized +# except for cross): +# $3 = $1 + $2 +define sum3 { + $3[1]=$1[1]+$2[1] + $3[2]=$1[2]+$2[2] + $3[3]=$1[3]+$2[3]} + +# $3 = $1 - $2 +define diff3 { + $3[1]=$1[1]-$2[1] + $3[2]=$1[2]-$2[2] + $3[3]=$1[3]-$2[3]} + +# $3 = $1 X $2 +define cross3 { + $3[1]=$1[2]*$2[3]-$1[3]*$2[2] + $3[2]=$1[3]*$2[1]-$1[1]*$2[3] + $3[3]=$1[1]*$2[2]-$1[2]*$2[1]} + +# $1 . $2 +define dot3 {($1[1]*$2[1]+$1[2]*$2[2]+$1[3]*$2[3])} + +# |$1| +define length3 { sqrt($1[1]^2+$1[2]^2+$1[3]^2) } + +# Expand a vector +define vec3 {$1[1],$1[2],$1[3]} + +# $2 = $1 +define copy3 { + $2[1] = $1[1] + $2[2] = $1[2] + $2[3] = $1[3] } + # slantbox(wid,ht,xslant,yslant,attributes) define slantbox { [ if "$1"=="" then { w = boxwid } else { w = $1 } @@ -367,15 +412,24 @@ define prval { print sprintf("$1=%g",$1) } define prval2 { print sprintf("$1=%g, $2=%g",$1,$2) } define prval3 { print sprintf("$1=%g, $2=%g, $3=%g",$1,$2,$3) } -# prow(array name,lo,hi) -# print array[lo:hi] as a row -# eg array(x,6,4,5); prow(x,1,3) +# prow(array name,rowno,lo,hi) +# print array[rowno,lo:hi] as a row +# rowno can be omitted, e.g., +# array(x,6,4,5); prow(x,1,3) define prow { - sh "echo -n \"print \\"\" > $1_xxx" - for i=$2 to $3-1 do { sh sprintf("echo -n \"%g \" >> $1_xxx",$1[i]) } - sh sprintf("echo \"%g\\"\" >> $1_xxx",$1[$3]) - copy "$1_xxx" - sh "rm $1_xxx" + sh "echo -n \"print \\"\" > $1_prow" + if ($+ < 4) || ("$2"=="") then { + for i_prow=$2 to $3-1 do { + sh sprintf("echo -n \"%g \" >> $1_prow", $1[i_prow]) } + sh sprintf("echo \"%g\\"\" >> $1_prow", $1[$3]) + } \ + else { + for i_prow=$2 to $3-1 do { + sh sprintf("echo -n \"%g \" >> $1_prow", $1[($4,i_prow)]) } + sh sprintf("echo \"%g\\"\" >> $1_prow", $1[($4,$3)]) + } + copy "$1_prow" + sh "rm $1_prow" } define rnd {int($1+sign($1)/2)} # round function diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/AmpTable.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/AmpTable.m4 new file mode 100644 index 00000000000..c94f682cbcb --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/AmpTable.m4 @@ -0,0 +1,22 @@ +.PS +# `Amptable.m4' +cct_init +movewid = 2pt__ +{ + {amp ; move ; "{\tt `amp'}" ljust} + move down 0.4; right_ + {amp(,0.3) ; move ; "{\tt `amp'(,0.3)}" ljust} + } + move right_ 2.0 +{ {delay ; move ; "{\tt `delay'}" ljust} + move down 0.4; right_ + {delay(,0.2) ; move ; "{\tt `delay'(,0.2)}" ljust} + } + + move right_ 2.0 +{ {integrator ; move ; "{\tt `integrator'}" ljust} + move down 0.5; right_ + {integrator(,0.3) ; move ; "{\tt `integrator'(,0.3)}" wid 82pt__ ljust} + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Antennas.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Antennas.m4 new file mode 100644 index 00000000000..6053cd2e3f0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Antennas.m4 @@ -0,0 +1,40 @@ +.PS +# `Antennas.m4' +cct_init +s_init(Antennas) +sinclude(Circuit_macros.dim) + + define(`elen_',elen_*0.9) + B: Here + A: antenna + s_box(T) below at A.T + s_box(`\tt an`'tenna') at A.n above + A: antenna(at A.T+(elen_,0),T) + s_box(T) below at A.T + s_box(`\tt (,T)') at A.n above + A: antenna(at A.T+(elen_,0),,L) + s_box(T1) below rjust at A.T1 + s_box(T2) below ljust at A.T2 + s_box(`\tt (,{,}L)') at A.n above + A: antenna(at A.T+(elen_,0),T,L) + s_box(T1) below rjust at A.T1 + s_box(T2) below ljust at A.T2 + s_box(`\tt (,T,L)') at A.n above + A: antenna(at A.T+(elen_,0),,T) + s_box(T) below at A.T + s_box(`\tt (,{,}T)') at A.n above + A: antenna(at A.T+(elen_,0),,S) + s_box(T1) below rjust at A.T1 + s_box(T2) below ljust at A.T2 + s_box(`\tt (,{,}S)') at A.n above + A: antenna(at A.T+(elen_,0),,D) + s_box(T1) below rjust at A.T1 + s_box(T2) below ljust at A.T2 + s_box(`\tt (,{,}D)') at A.n above + A: antenna(at A.T+(elen_,0),,P) + s_box(T) below at A.T + s_box(`\tt (,{,}P)') at A.n above + A: antenna(at A.T+(elen_,0),,F) + s_box(T) below at A.T + s_box(`\tt (,{,}F)') at A.n above +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 new file mode 100644 index 00000000000..566fb4c8141 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/AntiqueClock.m4 @@ -0,0 +1,142 @@ +.PS +# AntiqueClock.m4 +gen_init +NeedDpicTools +iflatex(command "{\sf") + +# https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals + +# `hms2deg(hr,min,sec) hr:min:sec to degrees +# blank arg1: degrees for minute hand +# blank arg1 and arg2: degrees for second hand' +define(`hms2deg',`ifelse(`$1',, + `ifelse(`$2',, + `(90-pmod(ifelse(`$3',,0,`$3'),60)/60*360)', + `(90-(pmod(`$2',60)/60 + pmod(ifelse(`$3',,0,`$3'),60)/60/60)*360)')', + `(90-(pmod(`$1',12) + pmod(ifelse(`$2',,0,`$2'),60)/60 + dnl + pmod(ifelse(`$3',,0,`$3'),60)/3600)/12*360)')') + +# `SecondHand(length,hr,min,sec)' +define(`SecondHand',`[ shsf = (`$1')/3.2 + C: Here + { L: rpoint_(to (Rect_(`$1',hms2deg(,,`$4')))) } + line thick 8*shsf to rvec_(`$1',0) + ]') + +# `AntiqueMinuteHand(length,hr,min,sec)' +define(`AntiqueMinuteHand',`[ mhsf = (`$1')/2.84 + L: rpoint_(to (Rect_(`$1',hms2deg(,`$3',`$4')))) + C: circle fill_(0) diam 0.47*mhsf at L.start + move to C + spline from rvec_(0,0.047*mhsf) \ + to rvec_(1.65*mhsf,0.11*mhsf) \ + then to rvec_(`$1',0.018*mhsf) \ + then to rvec_(`$1',-0.018*mhsf) \ + then to rvec_(1.65*mhsf,-0.11*mhsf) \ + then to rvec_(0,-0.047*mhsf) \ + shaded rgbstring(0,0,0) + ]') + +# `AntiqueHourHand(length,hr,min,sec)' +define(`AntiqueHourHand',`[ hhsf = (`$1')/2.2 + L: rpoint_(to (Rect_(`$1',hms2deg(`$2',`$3',`$4')))) + C: circle fill_(0) diam 0.6*hhsf at L.start + move to C + v = 0.25*hhsf + { line to rvec_(1.1*hhsf,0) thick 0.15/(1bp__)*hhsf } + { C1: circle rad v at rvec_(1.25*hhsf,0) fill_(0) } + d = `$1'-1.25*hhsf + q = 1bp__*hhsf + r1 = (d^2 + q^2 - v^2)/(v-q)/2 + h = r1+v + shade(0, + arc ccw from C1+vec_(d/h*v,(r1+q)/h*v) to \ + C1+vec_(d,q) rad r1 with .c at C1+vec_(d,r1+q) + arc ccw from C1+vec_(d,-q) to C1+vec_(d/h*v,-(r1+q)/h*v) rad r1 \ + with .c at C1+vec_(d,-r1-q)) + ]') + +define(`AntiqueClock',`[ # h,m,s,diam +# Clock size parameters: + hour = ifelse(`$1',,3,`$1') + minute = ifelse(`$2',,41,`$2') + second = ifelse(`$3',,51,`$3') + # outer radius + ifelse(`$4',,`skale=0.5; r1=2',`r1=(`$4')/2; skale=r1/4') + r2 = r1-0.5*skale + r3 = r2-0.14*skale + r4 = r3 - 0.35*skale + r5 = r4 - 0.17*skale + r6 = r5 - 0.63*skale + r7 = r6 - 0.17*skale + shadelinethick = 1.0 + +C: circle thick 0.2 rad r1 + +define shadeline { + s = 1-($`'1)*2 + v = r*s + h = sqrt(r^2-v^2) + t = 1-abs(s) + line from (vrot_(-h,v,cost,sint)) to (vrot_(h,v,cost,sint)) \ + thick shadelinethick outlined rgbstring(t,t,t) + } + + r = r1 # Bezel outer + nlines = int(2*r/(shadelinethick pt__)*1.1) + cost = cosd(10); sint = sind(10); + ShadeObject(shadeline,nlines, 0, 0,0,0, 0.5, 1,1,1, 1, 0,0,0 ) at C + + r = r2 # Bezel inner + nlines = int(2*r/(shadelinethick pt__)*1.1) + cost = cosd(-10); sint = sind(-10); + ShadeObject(shadeline,nlines, 0, 0,0,0, 0.25, 0.8,0.8,0.8, 0.5, 1,1,1, + 0.75, 0.8,0.8,0.8, 1, 0,0,0 ) at C + +# Clock face +Face: circle thick 0 fill_(1) rad r3 at C + circle rad r4 at C + circle rad r5 at C + circle rad r6 at C + circle rad r7 at C + +# Text rotation for PSTricks or TikZ + define(`rottext', + `ifpstricks(`\rput[c]{%g}(0,0)')ifpgf(`\pgftext[rotate=%g]')') +# Outer numbers + command sprintf("\font\outerfont=cmss12 at %4.2fin",r3-r4) + for mn = -15 to 15 by 5 do { sprintf("rottext{\outerfont %g}",\ + -mn/60*360,pmod(mn,60)) at C+(Rect_((r3+r4)/2,90-mn/60*360)) } + for mn = 20 to 40 by 5 do { sprintf("rottext{\outerfont %g}",\ + 180-mn/60*360,mn) at C+(Rect_((r3+r4)/2,90-mn/60*360)) } +# Outer tics + for mn = 1 to 60 do { t = 90-mn/60*360 + line from C+(Rect_(r5,t)) to C+(Rect_(r4,t)) } + +# Inner numbers + command sprintf("\font\innerfont=cmss12 at %4.2fin",r5-r6) + Loopover_(`mx',`t = (m4Lx-4)/12*360; + sprintf("rottext{\scalebox{0.7}[1.0]{\innerfont mx}}",-t) \ + at C+(Rect_((r5+r6)/2,90-t))', IX,X,XI,XII,I,II,III) + Loopover_(`mx',`t = (m4Lx+3)/12*360; + sprintf("rottext{\scalebox{0.7}[1.0]{\innerfont mx}}",-t+180) \ + at C+(Rect_((r5+r6)/2,90-t))', IV,V,VI,VII,VIII) + +# Inner tics + for mn = 5 to 60 by 5 do { t = 90-mn/60*360 + line from C+(Rect_(r7,t)) to C+(Rect_(r6,t)) } + +# Hands + AntiqueHourHand(r6,hour,minute,second) with .C at C + AntiqueMinuteHand(r5,hour,minute,second) with .C at C + SecondHand((r3+r4)/2,hour,minute,second) with .C at C + +# Center + dot(at C,0.1/4*r1,1) + ]') + + Clock1: AntiqueClock(,,,3) +# Clock2: AntiqueClock(4,50,07,2) at Clock1.e+(1.5,0) + +iflatex(command "}%") +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Audio.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Audio.m4 new file mode 100644 index 00000000000..722a2434d8a --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Audio.m4 @@ -0,0 +1,94 @@ +.PS +# `Audio.m4' +cct_init + +define(`In123',` +thinlines_ + arrow <- from `$1'.In1 up 0.05 left 0.15 + "{\sl In1}sp_" rjust above + arrow <- left 0.15 from `$1'.In2 + "{\sl In2}sp_" wid 0.2 rjust + arrow <- from `$1'.In3 down 0.05 left 0.15 + "{\sl In3}sp_" rjust below +thicklines_ ') + +L:[ + [ + S: speaker + `"\tt speaker"' at S.s+(0,-0.2) #below + In123(S) + thinlines_ + arrow <- from S.In4 left 0.05 up 0.15 + "{\sl In4}" above rjust + arrow <- from S.In5 right 0.05 up 0.15 + "{\sl In5}" above + arrow <- from S.In6 left 0.05 down 0.15 + "{\sl In6}" below rjust + arrow <- from S.In7 right 0.05 down 0.15 + "{\sl In7}" below + spline <- from S.Box.e+(0,0.05) right 0.27 up 0.10 \ + then right 0.1 up 0.2 + "\sl Box" above + thicklines_ + ] +[ + H: speaker(,,H) + `"\tt speaker(,{,}H)"' at H.s+(0,-0.30) #below + ] with .sw at last [].se+(0.25,-0.1) + ] +[ + B: bell + `"\tt bell"' at B.s+(0,-0.2) #below + In123(B) + thinlines_ + arrow <- from B.Box.n+(-0.1,0) up 0.15 left 0.1 ; "\sl Box" above + arrow <- from B.Circle.n up 0.15 ; "\sl Circle" above + thicklines_ + ] with .w at last [].e+(0.0,0.5) +[ + M: microphone + `"\tt microphone"' at M.s+(0,-0.2) #below + In123(M) + thinlines_ + arrow <- from M.Circle.n up 0.15 ; "\sl Circle" above + thicklines_ + ] with .sw at last [].se+(0.4,0) +[ + Z: buzzer + `"\tt buzzer"' at Z.s+(0,-0.2) #below + In123(Z) + thinlines_ + arrow <- from Z.Box.n up 0.15 ; "\sl Box" above + thicklines_ + ] with .sw at last [].se+(0.4,0) +R:[ + Z: buzzer(,,C) + `"\tt buzzer(,{,}C)"' at Z.s+(0,-0.2) #below + In123(Z) + thinlines_ + spline <- from 0.8<Z.Face.s,Z.Face.n> right 2*arrowht up 0.5*arrowht \ + then up 0.15 right 0.05 + "\sl Face" above + thicklines_ + ] with .sw at last [].se+(0.4,0) +[[ + E: earphone + `"\tt earphone"' at E.s+(0,-0.2) #below + In123(E) + thinlines_ + arrow <- from E.Box.n up 0.15 left 0.15 ; "\sl Box" above + thicklines_ + ] + [ + E: earphone(,,C) + `"\tt earphone(,{,}C)"' at E.s+(0,-0.2) #below + thinlines_ + arrow <- from E.L up 0.15 left 0.15; "\sl L" rjust + arrow <- from E.R up 0.15 right 0.15; "\sl R" ljust + "\sl N" at E.N above + "\sl C" at E.C + thicklines_ + ] with .sw at last [].se+(0.6,0) +] with .n at (0.6 between L and R, R.s)+(0,0.1-ifdpic(0.2,0.25)) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Bip.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Bip.m4 new file mode 100644 index 00000000000..121517d16d8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Bip.m4 @@ -0,0 +1,60 @@ +.PS +# `Bip.m4' +cct_init + + up_ +Q1: bi_tr(up_ dimen_) + thinlines_ + showbox_(,dotted) + thicklines_ + "\hbox{\sl E}" at Q1.E-(0,0.05) below + "\hbox{\sl B}sp_" at Q1.B rjust + "\hbox{\sl C}" at Q1.C above + "`{\tt bi\_tr(up\_ dimen\_)}'" wid 1.2 at Q1.s + (0,-0.35) below + +Q2: bi_tr(,R) with .E at Q1.E+(0.25,0) + thinlines_ + showbox_(,dotted) + thicklines_ + "\hbox{\sl E}" at Q2.E-(0,0.05) below + "sp_\hbox{\sl B}" at Q2.B ljust + "\hbox{\sl C}" at Q2.C above + "`{\tt bi\_tr(,R)}'" at Q2.s + (0,-0.2) below + +Q3: bi_tr(,,P) with .C at Q2.C+(1.15,0) + thinlines_ + showbox_(,dotted) + thicklines_ + "\hbox{\sl E}" at Q3.E-(0,0.05) below + "\hbox{\sl B}sp_" at Q3.B rjust + "\hbox{\sl C}" at Q3.C above + "`{\tt bi\_tr(,{,}P)}'" at Q3.s + (0,-0.35) below + +Q4: bi_tr(,,,E) with .C at Q3.C+(0.9,0) + thinlines_ + showbox_(,dotted) + thicklines_ + "\hbox{\sl E}" at Q4.E-(0,0.05) below + "\hbox{\sl B}sp_" at Q4.B rjust + "\hbox{\sl C}" at Q4.C above + "`{\tt bi\_tr(,{,},E)}'" at (Q4.s,Q4.E) + (0,-0.2) below + +Q5: igbt(,,) with .E at Q4.E+(0.65,0) + thinlines_ + showbox_(,dotted) + thicklines_ + "\hbox{\sl E}" at Q5.E-(0,0.05) below + "\hbox{\sl G}sp_" at Q5.G rjust + "\hbox{\sl C}" at Q5.C above + "`{\tt igbt}'" at Q5.s + (0,-0.35) below + +Q6: igbt(,,LD) with .E at Q5.E+(0.55,0) + thinlines_ + showbox_(,dotted) + thicklines_ + "\hbox{\sl E}" at Q6.E-(0,0.05) below + "\hbox{\sl G}sp_" at Q6.G rjust + "\hbox{\sl C}" at Q6.C above + "`{\tt igbt(,{,}LD)}'" at (Q6.s,Q6.E) + (0,-0.2) below + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Btree.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Btree.m4 index ebe09864331..d17a192cc44 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Btree.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Btree.m4 @@ -2,7 +2,7 @@ # Btree.m4 # One way to draw a binary tree using pic macros gen_init -circlerad = 0.35 +circlerad = 0.30 define n { [C: circle fill_(0.9) $1 if "$2" != "" then { diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/CctTable.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/CctTable.m4 new file mode 100644 index 00000000000..f7e47d0758e --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/CctTable.m4 @@ -0,0 +1,90 @@ +.PS +# `CctTable.m4' +cct_init + +movewid = 2 pt__ +hm = 2.05 +vm = 0.28 +{ {resistor ; move ;"`{\tt resistor}'" ljust} + move right_ hm + {resistor(,,Q) ; move ;"`\tt resistor(,{,}Q) '" ljust} + move right_ hm + {resistor(,,E) ; move + "`\shortstack[l]{\tt resistor(,{,}E)\\ {\tt $\equiv$ ebox}}'" ljust} +} + move down vm; right_ +{ {resistor(,,ES) ; move ;"`\tt resistor(,{,}ES) '" ljust} + move right_ hm + {resistor(,,H) ; move ;"`\tt resistor(,{,}H) '" ljust} + move right_ hm + {ebox(,,,0.5) ; move ;"`{\tt ebox(,{,},0.5)}'" ljust} +} + move down vm; right_ +{ {resistor(,,V) ; move ;"`{\tt resistor(,{,}V)}'" ljust} + move right_ hm + {move down_ 0.05; right_ + thermocouple ; move;"`{\tt thermocouple}'" ljust; move up_ 0.05} + move right_ hm + {ebox(,0.5,0.3) ; move ;"`{\tt ebox(,0.5,0.3)}'" ljust} +} + move down vm; right_ +{ {inductor ; move ;"`{\tt inductor}'" ljust} + move right_ hm + {inductor(,W); move ;"`{\tt inductor(,W)}'" ljust} + move right_ hm + {inductor(,L); move ;"`{\tt inductor(,L)}'" ljust} +} + move down vm; right_ +{ {inductor(,,,M) ; move ;"`{\tt inductor(,{,},M)}'" ljust} + move right_ hm + {inductor(,W,6,P); move ;"`{\tt inductor(,W,6,P)}'" ljust} + move right_ hm + {move right_ 0.2; ttmotor(,G) ; move ;"`{\tt ttmotor(,G)}'" ljust} +} + move down vm; right_ +{ {capacitor ; move ;"`{\tt capacitor}'" ljust} + move right_ hm + {capacitor(,C); move ;"`{\tt capacitor(,C)}'" ljust} + move right_ hm + {capacitor(,C+); move ;"`{\tt capacitor(,C+)}'" ljust} +} + move down vm; right_ +{ {capacitor(,P); move ;"`{\tt capacitor(,P)}'" ljust} + move right_ hm + {capacitor(,E); move ;"`{\tt capacitor(,E)}'" ljust} + move right_ hm + {capacitor(,K); move ;"`{\tt capacitor(,K)}'" ljust} +} + move down 0.25; right_ +{ {capacitor(,M); move ;"`{\tt capacitor(,M)}'" ljust} + move right_ hm + {capacitor(,N); move ;"`{\tt capacitor(,N)}'" ljust} + move right_ hm + {xtal ; move ;"`{\tt xtal}'" ljust} +} + move down 0.25; right_ +{ {memristor ; move;"`{\tt memristor}'" ljust} + move right_ hm + {heater; move;"`{\tt heater}'" ljust} + move right_ hm + {tline ; move;"`{\tt tline}'" ljust} +} + move down 0.25; right_ +{ {move up_ 0.05; right_; gap ; move ;"`{\tt gap}'" ljust} + move right_ hm + {gap(,,A) ; move ;"`{\tt gap(,{,}A)}'" ljust} + move right_ hm + {arrowline ; move;"`{\tt arrowline}'" ljust} +} + move down 0.25; right_ +{ {lamp ; move;"`{\tt lamp}'" ljust} + move right_ hm + {reed ; move ;"`{\tt reed}'" ljust} + move right_ hm + {reed(,,,fill_(0.9),CR) ; move ; "`{\tt reed(,{,},fill\_(0.9),CR)}'" ljust} +} + move down 0.25; right_ +{ {pvcell ; move;"`{\tt pvcell}'" ljust} +} + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4 new file mode 100644 index 00000000000..7253d2b313e --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Conn.m4 @@ -0,0 +1,69 @@ +.PS +# `Conn.m4' +cct_init + +T:[ + ifelse(ifmpost(T)`'ifpostscript(T),,`command "{\sf"') + S1: tstrip(U) + thinlines_ + arrow <- left 0.15 from S1.L1; "L1" rjust + arrow <- left 0.15 from S1.L4; "L4" wid 0.2 rjust + "$\vdots$" at (0.5 between last "" and 2nd last "")+(-0.15,0.02) + arrow <- right 0.25 from S1.R1; "R1" ljust + arrow <- right 0.25 from S1.R4; "R4" ljust + "$\vdots$" at (0.5 between last "" and 2nd last "")+(0.15,0.02) + arrow <- right 0.15 up 0.10 from S1.T1; "T1" ljust + arrow <- right 0.15 up 0.10 from S1.T4; "T4" ht 11 pt__ ljust + "$\vdots$" at (0.5 between last "" and 2nd last "")+(0.15,0.02) + thicklines_ + CS1: "`\tt tstrip(U)'" at S1.s+(0,-0.15) + S2: tstrip(R,5,DO;wid=1.0;ht=0.25) with .sw at S1.se+(0.7,0.15) + thinlines_ + arrow <- up 0.2 right 0.1 from S2.T1; "T1" above + arrow <- up 0.2 right 0.1 from S2.T5; "T5" above + "$\cdots$" at 0.5 between last "" and 2nd last "" above + CS2: `"\tt tstrip(R,5,"' ht 0.1 ljust \ + `"\tt $\;\;$DO;wid=1.0;ht=0.25)"' ljust at S2.sw+(-0.1,-0.2) + ifelse(ifmpost(T)`'ifpostscript(T),,`command "}"') +] + +C: [ + C1: ccoax + `"\tt ccoax\vphantom{(}"' ht 11 pt__ at C1.s below + thinlines_ + arrow <- up 0.1 right 0.1 from C1.C.ne; "C" ljust + arrow <- down 0.05 right 0.1 from C1.S.e; "S" wid 0.1 ht 11pt__ ljust + thicklines_ + C2: ccoax(at C1+(0,0.3),F) + `"\tt ccoax(,F)"' ht 11 pt__ wid 0.65 at C2.ne ljust + ] with .C1.sw at T.S2.se+(0.5,0.0) + +Y: [ + tconn(,O) + {`"\tt tconn(,O)"' at last line.c+(0,-0.2) wid 43 pt__ } + move to Here+(0.3,0) + P1: tconn(,>) + {`"\tt (,>)"' at last line.c+(0,-0.2)} + move to P1.end+(0.3,0) + tconn(,>>) + {`"\tt (,>>)"' at last line.c+(0,-0.2)} + move to P1.start+(0,linewid) + P3: tconn(,<) + {`"\tt tconn(,<)"' at last line.c+(0,-0.2)} + move to P3.end+(0.3,0) + tconn(,<<) + {`"\tt (,<<)"' at last line.c+(0,-0.2)} + +] with .sw at (C.e.x-0.4,T.s.y) + +B: [ + tbox(V_2) + `"\tt tbox(V\_2)"' at last [].sw below ljust + [ left_; + tbox(V_1,,,<>) ] with .nw at last [].sw+(0,-0.25) + `"\tt tbox(V\_1,{,},<>)"' at last [].sw below ljust +# `"\tt left\_"' at last [].sw +(0,-0.2) ljust `"\tt tbox(V\_1)"' ljust +] with .nw at Y.ne+(0.2,0) + + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Contact.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Contact.m4 new file mode 100644 index 00000000000..26f8d5a9822 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Contact.m4 @@ -0,0 +1,98 @@ +.PS +# Contact +cct_init + +movw = 0.45 +{ + contact + {S:`"\tt contact"' at last [].s+(0,-0.15) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O + "\sl C" ljust at last [].C } + move right_ movw; contact(R) + {`"\tt (R)"' at (last [].s,S) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O + "\sl C" ljust at last [].C } + move right_ movw; contact(O); {`"\tt (O)"' at (last [],S)} + move right_ movw; contact(C); {`"\tt (C)"' at (last [],S)} + + move right_ movw; contact(P) + {S: `"\tt (P)"' at last [].s+(0,-0.15) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O + "\sl C" ljust at last [].C } + move right_ movw; contact(PR) + {S: `"\tt (PR)"' at last [].s+(0,-0.15) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O + "\sl C" ljust at last [].C } + move right_ movw; contact(PO); {`"\tt (PO)"' at (last [],S)} + {"\sl O" ljust at last [].O + "\sl C" ljust at last [].C } + move right_ movw; contact(PC); {`"\tt (PC)"' at (last [],S)} +} + +move down 0.75; right_ ; { + contact(I); {`S: "\tt (I)"' at last [].s+(0,-12bp__) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O.e + "\sl C" ljust at last [].C.e } + move right_ movw; contact(RI) + {`"\tt (RI)"' at (last [],S) + "\sl P" rjust at last [].P.w + "\sl O" ljust at last [].O.e + "\sl C" ljust at last [].C.e } + move right_ movw; contact(OI); {`"\tt (OI)"' at (last [],S)} + move right_ movw; contact(CI); {`"\tt (CI)"' at (last [],S)} + + move right_ movw; contact(PI); {`"\tt (PI)"' at (last [],S) } + {"\sl O" ljust at last [].O.e + "\sl C" ljust at last [].C.e } + move right_ movw; contact(PIO); {`"\tt (PIO)"' at (last [],S) } + move right_ movw; contact(PIC); {`"\tt (PIC)"' at (last [],S) } +} + +movewid = movw + move down 0.65; right_; { + K: contact(T) + {S: `"\tt (T)"' at last [].s+(0,-0.15) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.C; "$\;\;$\sl C" + spline <- right 0.09 then down 0.05 right 0.05 from K.O; "$\;\;$\sl O" + thicklines_ } + move; K: contact(RT) + {`"\tt (RT)"' at (last [],S) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.O; "$\;\;$\sl O" + spline <- right 0.09 then down 0.05 right 0.05 from K.C; "$\;\;$\sl C" + thicklines_ } + move; contact(OT); {S: `"\tt (OT)"' at (last [],S) } + move; contact(CT); {S: `"\tt (CT)"' at (last [],S) } + move; contact(PT); {S: `"\tt (PT)"' at (last [],S) } + move; contact(PTO); {S: `"\tt (PTO)"' at (last [],S) } + move; contact(PTC); {S: `"\tt (PTC)"' at (last [],S) } +} + + move down 0.65; right_; { + K: contact(U) + {S: `"\tt (U)"' at last [].s+(0,-0.15) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.C; "$\;\;$\sl C" + spline <- right 0.09 then down 0.05 right 0.05 from K.O; "$\;\;$\sl O" + thicklines_ } + move; K: contact(RU) + {`"\tt (RU)"' at (last [],S) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.O; "$\;\;$\sl O" + spline <- right 0.09 then down 0.05 right 0.05 from K.C; "$\;\;$\sl C" + thicklines_ } + move; K: contact(OU); {S: `"\tt (OU)"' at (last [],S) + "\sl O" ljust at K.O.e } + move; K: contact(CU); {S: `"\tt (CU)"' at (last [],S) + "\sl C" ljust at K.C.e } + move; contact(PU); {S: `"\tt (PU)"' at (last [],S) } + move; contact(PUO); {S: `"\tt (PUO)"' at (last [],S) } + move; contact(PUC); {S: `"\tt (PUC)"' at (last [],S) } +} +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Contacts.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Contacts.m4 new file mode 100644 index 00000000000..9e006218e35 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Contacts.m4 @@ -0,0 +1,46 @@ +.PS +# Contacts.m4 +cct_init + + space = 0.75 + KS:contacts(2) + {`"\tt contacts(2)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,I) with .sw at last [].se+(space,0) + {`"\tt (2,I)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,IO) with .sw at last [].se+(space,0) + {`"\tt (2,IO)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) ') } + + KS:contacts(2,PICD) with .sw at last [].se+(space,0) + {`"\tt (2,PICD)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,PTCD) with .sw at last [].se+(space,0) + {`"\tt (2,PTCD)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,PUCD) with .sw at last [].se+(space,0) + {`"\tt (2,PUCD)"' at KS.s +(0,-12bp__) + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,0) ') } +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Crow.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Crow.m4 index 61e2a3ce508..91434c0c01b 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Crow.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Crow.m4 @@ -33,22 +33,22 @@ define(`boxtext',`s_box(\parbox{%gpt}{\sf `$1'},int(last box.wid/(1pt__))) \ boxwid = boxwid*1.15 boxsep = boxwid/2 - custombox(Class,ht boxht*2.2, + custombox(Class,ht boxht*1.7, `classkey\\ class\_type\\ class\_desc') custombox(Product,ht Class.ht with .nw at Class.ne+(boxsep,0), `classkey\\ prodkey\\ prod\_name\\ pkg\_type') - custombox(Sales,ht boxht*3.3 with .nw at Product.ne+(boxsep*2,15pt__), + custombox(Sales,ht boxht*2.75 with .nw at Product.ne+(boxsep*2,13pt__), `perkey\\ classkey\\ prodkey\\ storekey\\ promokey\\ quantity\\ dollars') custombox(Period,ht Sales.ht with .nw at Sales.ne+(boxsep*2,0), `perkey\\ date\\ day\\ week\\ month\\ qtr\\ year') - custombox(Market,ht Sales.ht with .nw at Class.sw+(0,-boxsep*2), + custombox(Market,ht Sales.ht with .nw at Class.sw+(0,-boxsep*3/2), `perkey\\ date\\ day\\ week\\ month\\ qtr\\ year') - custombox(Store,ht boxht*3.6 with .sw at (Product.w,Market.s), + custombox(Store,ht boxht*3.2 with .sw at (Product.w,Market.s), `storekey\\ mktkey\\ store\_type\\ store\_name\\ street\\ city\\ state\\ zip') custombox(Promotion,ht Market.ht with .sw at (Period.w,Market.s), @@ -61,7 +61,7 @@ define(`boxtext',`s_box(\parbox{%gpt}{\sf `$1'},int(last box.wid/(1pt__))) \ T: last line.c+(0,-crow_wd*2.5) move to Period.nw+(0,-10pt__); crowline(to (Sales.e,Here),,1.75*crow_wd) -Q: (last line.c,0.4 between Sales.se and Sales.ne) +Q: (last line.c,0.35 between Sales.se and Sales.ne) move to Market.ne+(0,-10pt__); crowline(to (Store.w,Here)) move to Store.ne+(0,-10pt__); line to (T,Here) then to T diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Csource.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Csource.m4 index 1441cfcb17b..f2902525c05 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Csource.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Csource.m4 @@ -31,7 +31,7 @@ define(`ppair',`[define(`m4lr',ifelse(`$1',,ljust,rjust)) line from J.D to S then to Q.C ]') R2: resistor(down_ dimen_) - llabel(,"$R_2$" ljust "\unit{150}{}") + llabel(,"$R_2$" ljust "\num{150}") dot Q13: bi_tr(down_ dimen_,,P,E) with .E at Here rlabel(,"$Q_{13}$" rjust "2N4236") @@ -41,7 +41,7 @@ define(`ppair',`[define(`m4lr',ifelse(`$1',,ljust,rjust)) dot(at Q14.E) { line left_ dimen_*1.3 then up_ dimen_ R1: potentiometer(up_ dimen_) with .Start at Here - rlabel(,"$R_1$" ljust "\unit{20}{\kilo}") + rlabel(,"$R_1$" ljust "\SI{20}{\kilo{}}") { ground(at R1.T1) } line from R1.End to (R1.End,Q13.E) then to Q13.E } { dot(at Q13.C+(0,-elen_)) @@ -50,7 +50,7 @@ define(`ppair',`[define(`m4lr',ifelse(`$1',,ljust,rjust)) V1: gap(down_ dimen_,1); rlabel(+,V_1,-) line down_ dimen_/4 chop dotrad_ chop 0; ground(,T) } R3: resistor(down_ dimen_) - llabel(,"$R_3$" ljust "\unit{150}{}") + llabel(,"$R_3$" ljust "\num{150}") dot(at Q13.C+(0,-2*elen_)) line right_ dimen_/2 A1: opamp with .In2 at Here; "A$_1$" at A1.C @@ -58,17 +58,17 @@ define(`ppair',`[define(`m4lr',ifelse(`$1',,ljust,rjust)) line left_ dimen_/4 from A1.In1 then up_ dimen_/2 then right dimen_ dot { resistor(up_ elen_) - llabel(,"$R_{14}$" rjust "\unit{19}{\kilo}") + llabel(,"$R_{14}$" rjust "\SI{19}{\kilo{}}") line to (Here,Q13.E) then to Q13.E } line to (A1.Out,Here) dot { line to A1.Out dot resistor(down_ to (Here,Q14.E)) - llabel(,"$R_{13}$" ljust "\unit{91}{\kilo}") + llabel(,"$R_{13}$" ljust "\SI{91}{\kilo{}}") line to Q14.E } R6: resistor(right_ dimen_) - clabel(,"$R_6$" "\vphantom{x}" "\unit{15}{\kilo}") + clabel(,"$R_6$" "\vphantom{x}" "\SI{15}{\kilo{}}") dot line to (Here,A1.In1) then right_ dimen_/4 A2: opamp with .In1 at Here; "A$_2$" at A2.C @@ -101,39 +101,39 @@ define(`ppair',`[define(`m4lr',ifelse(`$1',,ljust,rjust)) line to Q13.B line from DP3.G to (T,DP3.G) then to (T,DP4.G) then to DP4.G R11: resistor(down_ dimen_ from DP4.S) - rlabel(,"$R_{11}$" rjust "\unit{20}{}") + rlabel(,"$R_{11}$" rjust "\num{20}") D5: diode(up_ from DP3.S to (DP3.S,A2),Z) llabel(,"$D_5$" rjust "1N4729$_{\strut}$") line to R11.end C4: capacitor(right_ dimen_*1.3 from DP3.S,C) - llabel(,C_4); rlabel(,\unit{0.68}{\micro\farad}) + llabel(,C_4); rlabel(,\SI{0.68}{\micro\farad}) C3: capacitor(right_ dimen_*1.3 from DP4.S,C) - llabel(,C_3); rlabel(,\unit{0.68}{\micro\farad}) + llabel(,C_3); rlabel(,\SI{0.68}{\micro\farad}) dot dot(at (Here,R6)) C2: reversed(`capacitor',left_ dimen_*1.3,C) - rlabel(,C_2); llabel(,\unit{0.1}{\micro\farad}) + rlabel(,C_2); llabel(,\SI{0.1}{\micro\farad}) line to R6.end R5: resistor(up_ from R6.end to (R6.end,Q13.B)) - rlabel(,"$R_5$" ljust "\unit{100}{\kilo}") + rlabel(,"$R_5$" ljust "\SI{100}{\kilo{}}") dot(at R5.top-(0,dimen_/2)) line left_ dimen_/2 capacitor(down_ dimen_,C) - rlabel(,"$C_1$" rjust "\unit{1}{\micro\farad}") + rlabel(,"$C_1$" rjust "\SI{1}{\micro\farad}") ground(,T) line from DP4.E to (DP4.E,R2.bottom) resistor(up_ to (Here,R2.top)) - rlabel(,"$R_9$" ljust "\unit{910}{}") + rlabel(,"$R_9$" ljust "\num{910}") dot resistor(down_ from DP3.E to (DP3.E,R3.bottom)) - llabel(,"$R_{10}$" ljust "\unit{910}{}") + llabel(,"$R_{10}$" ljust "\num{910}") dot line from R5.top to (R5,Q13.E) resistor(right_ elen_) - clabel(,"$R_4$" "\vphantom{x}" "\unit{100}{\kilo}") + clabel(,"$R_4$" "\vphantom{x}" "\SI{100}{\kilo{}}") line to (C4.end,Here) then to C4.end DP5: npair(L,11,10) with .E at (C4.end,DP1.E)+(elen_*0.8,0) @@ -149,7 +149,7 @@ define(`ppair',`[define(`m4lr',ifelse(`$1',,ljust,rjust)) dot(,,1) `"$+E_{CC}$"' ljust at last [].e resistor(down_ from DP6.S to (DP6.S,C2)) - rlabel(,"$R_{12}$" rjust "\unit{20}{}") + rlabel(,"$R_{12}$" rjust "\num{20}") dot { line to C2.e } line to D6.end @@ -162,7 +162,7 @@ define(`ppair',`[define(`m4lr',ifelse(`$1',,ljust,rjust)) dot(at (Vr,T)) resistor(left_ to (DP6.E,Here)) - clabel("$R_{15}$" "" "\unit{200}{}" ljust) + clabel("$R_{15}$" "" "\num{200}" ljust) line to (DP1.E,Here) dot diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Demultiplexer.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Demultiplexer.m4 new file mode 100644 index 00000000000..210b6434412 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Demultiplexer.m4 @@ -0,0 +1,44 @@ +.PS +# `Demultiplexer.m4' +log_init + + ifmpost(`command "verbatimtex {\sf etex"', + `ifpostscript(, + `command "{\sf"')') + + right_ + + Demux(4,DM1) + `"\tt Demux(4,DM1)"' at last [].s below + `"\sl Out0"' at last [].Out0.end +(6bp__,6bp__) + `"\sl Out3"' at last [].Out3.end +(6bp__,-6bp__) + `"\sl In"' at last [].In.end rjust wid 11bp__ + `"\sl Sel"' at last [].Sel.end ljust above + left_; Demux(4,,LOE) with .c at last [].c+(1.2,0) + `"\tt left\_; Demux(4,{,}LOE)"' at last [].s + (0,-20bp__) ht 10bp__ + `"\sl Sel"' at last [].Sel.end rjust + `"\sl Out0"' at last [].Out0.end +(-6bp__,6bp__) + `"\sl OE"' at last [].OE.end ljust + `"\sl In"' at last [].In.end+(0,5bp__) ljust + right_; Demux(4,,NOEBN2) with .c at last [].c+(1.2,0) + `"\tt (4,{,}NOEBN2)"' at last [].s below + `"\sl Sel0"' at last [].Sel0.end rjust + `"\sl Sel1"' at last [].Sel1.end ljust + `"\sl Out0"' at last [].Out0.end +(5bp__,6bp__) + `"\sl Out3"' at last [].Out3.end +(5bp__,6bp__) + `"\sl NOE"' at last [].NOE.end rjust + `"\sl In"' at last [].In.end above + down_; Demux(8,,L3,,28*L_unit) with .c at last [].c+(1.8,0) + `"\tt down\_; Demux(8,{,}L3,{,}28*L\_unit)"' at last [].s+(0,-15bp__) \ + ht 10bp__ wid 170bp__ + `"\sl Sel0"' at last [].Sel0.end rjust + `"\sl Sel2"' at last [].Sel2.end rjust below + `"\sl Out0"' at last [].Out0.end rjust + `"\sl Out7"' at last [].Out7.end ljust + `"\sl In"' at last [].In.end rjust + +ifmpost(`command "verbatimtex } etex"', +`ifpostscript(, +`command "}"')') + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Dini.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Dini.m4 new file mode 100644 index 00000000000..5631a4822fb --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Dini.m4 @@ -0,0 +1,193 @@ +.PS +# Dini.m4 +# This diagram can be produced using, e.g. +# m4 pdf.m4 Dini.m4 | dpic -d > Dini.pdf + +threeD_init +NeedDpicTools +scale = 1.5 +[ + viewazimuth = 0 # View angles in degrees + viewelevation = 20 + setview(viewazimuth,viewelevation,0) + + a = 1.5 + b = 0.25 + +define(`Dini', +`a*cos(`$1')*sin(`$2'),dnl + a*sin(`$1')*sin(`$2'),dnl + (a*(cos(`$2')+loge(tan((`$2')/2))) + b*(`$1'))') + + umin = 0; umax = 4*pi_ + vmin = 0.2; vmax = 2.0 + ugrid = 80; vgrid = 20 + + ur = umax-umin + vr = vmax-vmin +`define cu {umin+($1)/ugrid*ur}' +`define cv {vmin+($1)/vgrid*vr}' + +# Generate points and sort + n = -1 + for iu=0 to ugrid do { + for iv=0 to vgrid do { + n +=1 + ciu[n] = cu(iu) + civ[n] = cv(iv) + d[n] = dot3D(View3D,Dini(ciu[n],civ[n])) + ix[n] = n + } + } + dpquicksort(d,0,n,ix) + +# Draw the facets + linethick = 0.4 + du = ur/ugrid/2 + dv = vr/vgrid/2 + for i=0 to n do { + NE: project(Dini(ciu[ix[i]]+du,civ[ix[i]]+dv)) + SE: project(Dini(ciu[ix[i]]+du,civ[ix[i]]-dv)) + SW: project(Dini(ciu[ix[i]]-du,civ[ix[i]]-dv)) + NW: project(Dini(ciu[ix[i]]-du,civ[ix[i]]+dv)) + f = (-cos(ciu[ix[i]])+1)/2 + g = ( sin(ciu[ix[i]])+1)/2 + line from NE to SE then to SW then to NW then to NE \ + outlined rgbstring(f,g,0) shaded rgbstring(f,g,0) +# outlined rgbstring(0,0.5,0) shaded rgbstring(f,g,0) + } +] +# Icosahedron.m4 +[ +#threeD_init +#NeedDpicTools + # Computing facets is complicated, so list them. + # 60 vertices: +define(`m4x',-1) + array2(v,m4inx,0, 0, 1.021) + array2(v,m4inx,0.4035482, 0, 0.9378643) + array2(v,m4inx,-0.2274644, 0.3333333, 0.9378643) + array2(v,m4inx,-0.1471226, -0.375774, 0.9378643) + array2(v,m4inx,0.579632, 0.3333333, 0.7715933) + array2(v,m4inx,0.5058321, -0.375774, 0.8033483) + array2(v,m4inx,-0.6020514, 0.2908927, 0.7715933) + array2(v,m4inx,-0.05138057, 0.6666667, 0.7715933) + array2(v,m4inx,0.1654988, -0.6080151, 0.8033483) + array2(v,m4inx,-0.5217096, -0.4182147, 0.7715933) + array2(v,m4inx,0.8579998, 0.2908927, 0.4708062) + array2(v,m4inx,0.3521676, 0.6666667, 0.6884578) + array2(v,m4inx,0.7841999, -0.4182147, 0.5025612) + array2(v,m4inx,-0.657475, 0.5979962, 0.5025612) + array2(v,m4inx,-0.749174, -0.08488134, 0.6884578) + array2(v,m4inx,-0.3171418, 0.8302373, 0.5025612) + array2(v,m4inx,0.1035333, -0.8826969, 0.5025612) + array2(v,m4inx,-0.5836751, -0.6928964, 0.4708062) + array2(v,m4inx,0.8025761, 0.5979962, 0.2017741) + array2(v,m4inx,0.9602837, -0.08488134, 0.3362902) + array2(v,m4inx,0.4899547, 0.8302373, 0.3362902) + array2(v,m4inx,0.7222343, -0.6928964, 0.2017741) + array2(v,m4inx,-0.8600213, 0.5293258, 0.1503935) + array2(v,m4inx,-0.9517203, -0.1535518, 0.3362902) + array2(v,m4inx,-0.1793548, 0.993808, 0.1503935) + array2(v,m4inx,0.381901, -0.9251375, 0.2017741) + array2(v,m4inx,-0.2710537, -0.9251375, 0.3362902) + array2(v,m4inx,-0.8494363, -0.5293258, 0.2017741) + array2(v,m4inx,0.8494363, 0.5293258, -0.2017741) + array2(v,m4inx,1.007144, -0.1535518, -0.06725804) + array2(v,m4inx,0.2241935, 0.993808, 0.06725804) + array2(v,m4inx,0.8600213, -0.5293258, -0.1503935) + array2(v,m4inx,-0.7222343, 0.6928964, -0.2017741) + array2(v,m4inx,-1.007144, 0.1535518, 0.06725804) + array2(v,m4inx,-0.381901, 0.9251375, -0.2017741) + array2(v,m4inx,0.1793548, -0.993808, -0.1503935) + array2(v,m4inx,-0.2241935, -0.993808, -0.06725804) + array2(v,m4inx,-0.8025761, -0.5979962, -0.2017741) + array2(v,m4inx,0.5836751, 0.6928964, -0.4708062) + array2(v,m4inx,0.9517203, 0.1535518, -0.3362902) + array2(v,m4inx,0.2710537, 0.9251375, -0.3362902) + array2(v,m4inx,0.657475, -0.5979962, -0.5025612) + array2(v,m4inx,-0.7841999, 0.4182147, -0.5025612) + array2(v,m4inx,-0.9602837, 0.08488134, -0.3362902) + array2(v,m4inx,-0.1035333, 0.8826969, -0.5025612) + array2(v,m4inx,0.3171418, -0.8302373, -0.5025612) + array2(v,m4inx,-0.4899547, -0.8302373, -0.3362902) + array2(v,m4inx,-0.8579998, -0.2908927, -0.4708062) + array2(v,m4inx,0.5217096, 0.4182147, -0.7715933) + array2(v,m4inx,0.749174, 0.08488134, -0.6884578) + array2(v,m4inx,0.6020514, -0.2908927, -0.7715933) + array2(v,m4inx,-0.5058321, 0.375774, -0.8033483) + array2(v,m4inx,-0.1654988, 0.6080151, -0.8033483) + array2(v,m4inx,0.05138057, -0.6666667, -0.7715933) + array2(v,m4inx,-0.3521676, -0.6666667, -0.6884578) + array2(v,m4inx,-0.579632, -0.3333333, -0.7715933) + array2(v,m4inx,0.1471226, 0.375774, -0.9378643) + array2(v,m4inx,0.2274644, -0.3333333, -0.9378643) + array2(v,m4inx,-0.4035482, 0, -0.9378643) + array2(v,m4inx,0, 0, -1.021) + + # 12 pentagons +undefine(`m4x') +array2(p,m4inx,0,3,8,5,1) +array2(p,m4inx,2,7,15,13,6) +array2(p,m4inx,4,10,18,20,11) +array2(p,m4inx,9,14,23,27,17) +array2(p,m4inx,12,21,31,29,19) +array2(p,m4inx,16,26,36,35,25) +array2(p,m4inx,22,32,42,43,33) +array2(p,m4inx,24,30,40,44,34) +array2(p,m4inx,28,39,49,48,38) +array2(p,m4inx,37,47,55,54,46) +array2(p,m4inx,41,45,53,57,50) +array2(p,m4inx,51,52,56,59,58) + + # 20 hexagons +undefine(`m4x') +array2(h,m4inx,0,1,4,11,7,2) +array2(h,m4inx,0,2,6,14,9,3) +array2(h,m4inx,1,5,12,19,10,4) +array2(h,m4inx,3,9,17,26,16,8) +array2(h,m4inx,5,8,16,25,21,12) +array2(h,m4inx,6,13,22,33,23,14) +array2(h,m4inx,7,11,20,30,24,15) +array2(h,m4inx,10,19,29,39,28,18) +array2(h,m4inx,13,15,24,34,32,22) +array2(h,m4inx,17,27,37,46,36,26) +array2(h,m4inx,18,28,38,40,30,20) +array2(h,m4inx,21,25,35,45,41,31) +array2(h,m4inx,23,33,43,47,37,27) +array2(h,m4inx,29,31,41,50,49,39) +array2(h,m4inx,32,34,44,52,51,42) +array2(h,m4inx,35,36,46,54,53,45) +array2(h,m4inx,38,48,56,52,44,40) +array2(h,m4inx,42,51,58,55,47,43) +array2(h,m4inx,48,49,50,57,59,56) +array2(h,m4inx,53,54,55,58,59,57) + + viewazimuth = -10 # View angles in degrees + viewelevation = 40 + setview(viewazimuth,viewelevation,0) + + n = 0 # Find and draw the visible hexagons + for i=1 to 20 do { # The normal is the line to the center + for_(1,3,1,`a[m4x] = (v[h[i,1],m4x] + v[h[i,4],m4x])/2') + if dot3D(View3D,a[1],a[2],a[3]) >= 0 then { n +=1; ih[n] = i } + } + for i=1 to n do { + for j=1 to 6 do { x[j]=h[ih[i],j] } + line from project((v[x[1],1]),(v[x[1],2]),(v[x[1],3]))\ + for_(2,6,1,`to project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\ + to project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0.95) + } + m = 0 + for i=1 to 12 do { # Visible pentagons + for_(1,3,1,`a[m4x] = 0; for j=1 to 5 do { a[m4x] += v[p[i,j],m4x] }') + if dot3D(View3D,a[1]/5,a[2]/5,a[3]/5) >= 0 then { m +=1; ip[m] = i } + } + for i=1 to m do { + for j=1 to 5 do { x[j]=p[ip[i],j] } + line from project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) \ + for_(2,5,1,`to project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\ + to project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0) + } +] scaled 2.5 with .sw at last [].se+(1,0) +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Diodes.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Diodes.m4 new file mode 100644 index 00000000000..360d8e9d9e0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Diodes.m4 @@ -0,0 +1,48 @@ +.PS +# `Diodes.m4' +cct_init +movewid = 2pt__ +{ {diode ; move ; "`{\tt diode}'" ljust} + move down 0.2; right_ + {diode(,S) ; move ; "`{\tt diode(,S)}'" ljust} + move down 0.2; right_ + {diode(,V) ; move ; "`{\tt diode(,V)}'" ljust} + move down 0.2; right_ + {diode(,v) ; move ; "`{\tt diode(,v)}'" ljust} + move down 0.2; right_ + {diode(,w) ; move ; "`{\tt diode(,w)}'" ljust} + move down 0.2; right_ + {diode(,B) ; move ; "`{\tt diode(,B)}'" ljust} + move down 0.2; right_ + {diode(,G) ; move ; "`{\tt diode(,G)}'" ljust} + } + + move right_ 2.0 +{ {diode(,K) ; move ; "`{\tt diode(,K)}'" ljust} + move down 0.2; right_ + {diode(,ZK) ; move ; "`{\tt diode(,ZK)}'" ljust} + move down 0.2; right_ + {diode(,CR) ; move ; "`{\tt diode(,CR)}'" ljust} + move down 0.2; right_ + {diode(,L) ; move ; "`{\tt diode(,L)}'" ljust} + move down 0.2; right_ + {diode(,F) ; move ; "`{\tt diode(,F)}'" ljust} + move down 0.2; right_ + {diode(,Sh) ; move ; "`{\tt diode(,Sh)}'" ljust} + move down 0.2; right_ + {diode(,D) ; move ; "`{\tt diode(,D)}'" ljust} + } + + move right_ 2.0 +{ {diode(,Z,RE) ; move ; "`{\tt diode(,Z,RE)}'" ljust} + move down 0.25; right_ + {diode(,T) ; move ; "`{\tt diode(,T)}'" ljust} + move down 0.30; right_ + {diode(,P) ; move ; "`{\tt diode(,P)}'" ljust} + move down 0.30; right_ + {diode(,LE) ; move ; "`{\tt diode(,LE)}'" ljust} + move down 0.15; right_ + {diode(,LER) ; move ; "`{\tt diode(,LER)}'" ljust} + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Emarrows.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Emarrows.m4 new file mode 100644 index 00000000000..c4b21319023 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Emarrows.m4 @@ -0,0 +1,30 @@ +.PS +# `Emarrows.m4' +cct_init + hskip = 0.6 +[ + { em_arrows(N) + box dotted wid last [].wid ht last [].ht at last [].c + thinlines_ + arrow <- left 0.15 from last [].Head; "\sl Head" wid 0.31 rjust + arrow <- down 0.12 from last [].Tail; "\sl Tail" below + "\sl A1" rjust below at last [].A1.c + "\sl A2" ljust above at last [].A2.c + thicklines_ + move down 0.25 from last [].s + move up 0.2 from last [].n + "\tt em\_arrows(N)" at last [].s+(0,-0.20) below } + { em_arrows(ND,45) with .sw at last [].se+(hskip*1.5,0) + "\tt em\_arrows(ND,45)" at last [].s below } + { em_arrows(I) with .sw at last [].se+(hskip,0) + "\tt $\ldots$(I)" at last [].s below } + { em_arrows(ID) with .sw at last [].se+(hskip,0) + "\tt $\ldots$(ID)" at last [].s below } + { em_arrows(E) with .sw at last [].se+(hskip,0) + "\tt $\ldots$(E)" at last [].s below } + { em_arrows(ED) with .sw at last [].se+(hskip,0) + "\tt $\ldots$(ED)" at last [].s below } + ] +#showbox_ + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Fuses.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Fuses.m4 new file mode 100644 index 00000000000..b308e5aadbd --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Fuses.m4 @@ -0,0 +1,32 @@ +.PS +# `Fuses.m4' +cct_init + +movewid = 0.25 + + {fuse ; {"`{\tt fuse}'" at last line.c+(0,-0.2)} + move + fuse(,D) ; {"`{\tt fuse(,D)}'" at last line.c+(0,-0.2)} + move + fuse(,B) ; {"`{\tt fuse(,B)}'" at last line.c+(0,-0.2)} + move + fuse(,C) ; {"`{\tt fuse(,C)}'" at last line.c+(0,-0.2)} + move + fuse(,S) ; {"`{\tt fuse(,S)}'" at last line.c+(0,-0.2)} + move + fuse(,HB) ; {"`{\tt fuse(,HB)}'" at last line.c+(0,-0.2)} + } + move down; right_ + fuse(,HC,0.5,0.3) ; {"`{\tt (,HC,0.5,0.3)}'" at last line.c+(0,-0.25)} + move + cbreaker; {"`{\tt cbreaker}'" at last line.c+(0,-0.25)} + move + cbreaker(,R); {"`{\tt cbreaker(,R)}'" at last line.c+(0,-0.25)} + move + cbreaker(,{,}D); {"`{\tt $\ldots$(,{,}D)}'" at last line.c+(0,-0.25)} + move + cbreaker(,{,}T); {"`{\tt $\ldots$(,{,}T)}'" at last line.c+(0,-0.25)} + move + cbreaker(,{,}TS); {"`{\tt $\ldots$(,{,}TS)}'" at last line.c+(0,-0.25)} + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/GnuMakefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/GnuMakefile deleted file mode 100644 index 4b7d99c4538..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/GnuMakefile +++ /dev/null @@ -1,119 +0,0 @@ -# Makefile for Circuit macros (based on Version 8.5.1) -# Use GNU make. - -SRC = $(wildcard *.m4) -TARGET = $(SRC:%.m4=%.$(MODE)) - -CMLIBDIR = /usr/local/share/Circuit_macros -CMLIBDIR = $$(HOME)/lib -CMLIBS = liblog.m4 -CMLIBS = libgen.m4 - -DPIC = dpic -GPIC = pic -M4 = m4 -I $(CMLIBDIR) - -# select one of tex, eps, pdf, svg, mp or fig -MODE = tex - -# select one of pstricks, pgf, mfpic, latex or tpic -# (for .tex output) -TEXMODE = pgf -TEXMODE = pstricks - -# select one of raw or psfrag -# (for .eps output) -EPSMODE = raw - - - -# ---- DO NOT CHANGE THE FOLLOWING LINES ---- -PIC = $(DPIC) - -# for .tex -TPIC = $(PIC) -ifeq ($(TEXMODE),pstricks) - TPICOPT = -P - TCMDRIVER = $(TEXMODE).m4 -else ifeq ($(TEXMODE),pgf) - TPICOPT = -g - TCMDRIVER = $(TEXMODE).m4 -else ifeq ($(TEXMODE),mfpic) - TPICOPT = -m - TCMDRIVER = $(TEXMODE).m4 -else ifeq ($(TEXMODE),latex) - TPICOPT = -e - TCMDRIVER = -else ifeq ($(TEXMODE),tpic) - TPIC = $(GPIC) - TPICOPT = -t - TCMDRIVER = gpic.m4 -else - TERROR = TRUE -endif - -# for .eps -ifeq ($(EPSMODE),raw) - EPICOPT = -r - ECMDRIVER = postscript.m4 -else ifeq ($(EPSMODE),psfrag) - EPICOPT = -f - ECMDRIVER = $(EPSMODE).m4 -else - EERROR = TRUE -endif - - -.SUFFIXES: .m4 .tex .eps .pdf .svg .mp .fig - -.m4.tex: -ifeq ($(TERROR),TRUE) - @echo "Invalid TEXMODE:" $(TEXMODE) - @exit 1 \ -else - $(M4) $(CMLIBS) $(TCMDRIVER) $< > $*.pic - $(TPIC) $(TPICOPT) $*.pic > $*.tex -endif - -.m4.eps: -ifeq ($(EERROR),TRUE) - echo "Invalid EPSMODE:" $(EPSMODE) - @exit 1 \ -else - $(M4) $(CMLIBS) $(ECMDRIVER) $< > $*.pic - $(PIC) $(EPICOPT) $*.pic > $*.eps -endif - -.m4.pdf: - $(M4) $(CMLIBS) $< > $*.pic - $(PIC) -d $*.pic > $*.pdf -.m4.svg: - $(M4) $(CMLIBS) svg.m4 $< > $*.pic - $(PIC) -v $*.pic > $*.svg -.m4.mp: - $(M4) $(CMLIBS) mpost.m4 $< > $*.pic - $(PIC) -s $*.pic > $*.mp -.m4.fig: - $(M4) $(CMLIBS) xfig.m4 $< > $*.pic - $(PIC) -x $*.pic > $*.fig - --include GNUmakefile.local - -all: $(TARGET) - -clean: - rm -f *~ - rm -f $(SRC:%.m4=%.pic) - -distclean: clean - -# use carefully!!! -dodistclean: distclean - rm -f $(SRC:%.m4=%.tex) - rm -f $(SRC:%.m4=%.eps) - rm -f $(SRC:%.m4=%.pdf) - rm -f $(SRC:%.m4=%.svg) - rm -f $(SRC:%.m4=%.mp) - rm -f $(SRC:%.m4=%.fig) - --include GNUmakefile.localdep diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Grounds.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Grounds.m4 new file mode 100644 index 00000000000..13b4730b801 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Grounds.m4 @@ -0,0 +1,39 @@ +.PS +# `Grounds.m4' +cct_init + +sep = 0.65 +Ground: ground + move right sep +GT: ground(,T) + move right sep +GF: ground(,,F) + move right sep +GE: ground(,,E) + move right sep + +B: Here+(0,-0.5) ; { + "{\tt `ground'}" wid 32bp__ at (Ground,B) + "{\tt `ground'(,T)}" at (GT,B)+(0,7bp__) + "{\tt (,{,}F)}" at (GF,B) + "{\tt (,{,}E)}" at (GE,B)} + + +GS: ground(,,S) + move right sep +GS90: [ground(,,S,90) ] with .n at Here + move right sep from GS90.n +GQ: ground(,,Q) + move right sep +GL: ground(,,L) + move right sep +GP: ground(,,P) + +C: Here+(0,-0.5) + "{\tt (,{,}S)}" at (GS,C) + "{\tt (,{,}S,90)}" at (GS90,C) + "{\tt (,{,}Q)}" at (GQ,C) + "{\tt (,{,}L)}" at (GL,C) + "{\tt (,{,}P)}" at (GP,C) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Headers.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Headers.m4 new file mode 100644 index 00000000000..a4e1abce3b8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Headers.m4 @@ -0,0 +1,37 @@ +.PS +# Headers.m4 +log_init + + Header + {"\sl P1" at last [].P1 rjust + `"\tt Header"' at last [].s+(0,-10pt__) + "\sl P2" at last [].P2 rjust} + + Header(2,3,8mm__,10mm__) with .nw at last [].ne+(0.75,-0.05) + {"\sl P1" at last [].P1 rjust + `"\tt Header(2,3,8mm\_\_,10mm\_\_)"' at last [].s+(0,-10pt__) + "\sl P2" at last [].P2 ljust + "\sl P5" at last [].P5 rjust + "\sl P6" at last [].P6 ljust} + + left_ + Header(2,4,,,fill_(0.9)) with .sw at last [].se+(0.75,0) + {"\sl P1" at last [].P1 rjust_ + `"\tt left\_; Header(2,4,{,},fill\_(0.9))"' at last [].s+(0,-20pt__) + "\sl P8" at last [].P8 ljust_} + + down_ + Header(2,8) with .nw at last [].ne+(0.75,0) + {"\sl P1" at last [].P1 ljust + "\sl P2" at last [].P2 ljust + `"\tt down\_; Header(2,8)" ' at last [].s+(0,-10pt__) + "\sl P15" at last [].P15 rjust + "\sl P16" at last [].P16 rjust} + {thinlines_ + arrow <- right 0.15 from last [].PinP1.e + `"\sl PinP1"' ljust + arrow <- right 0.15 from last [].PinP2.e + `"\sl PinP2"' ljust + thicklines_ } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Heathkit.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Heathkit.m4 index 5cf7ca38d26..8d3ec5ad001 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Heathkit.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Heathkit.m4 @@ -67,7 +67,7 @@ define Pad { P`$1': box fill_(1) "$1" } GRN2: line from P3.e to L2.end "GRN" above spline <-> from GRN2.end+(-g,0) up 2.5*g right 0.5*g then up 5*g left g \ then up 2.5*g right 0.5*g - box invis fill_(1) wid 3*g ht g "\unit{6}{\hbox{VAC}}" at L2.c-(2*g,0) + box invis fill_(1) wid 3*g ht g "\SI{6}{VAC}" at L2.c-(2*g,0) Pad(4) at P3-(0,3*g) line right_ 3*g from P4.e "BRN" above arrow down_ 2*g ht arrowht*2/3 @@ -96,7 +96,7 @@ define(`socket',`[ line right_ g; PL: dot line from BLKYEL.end right g then to Here+(0,-g) fuse(down_ 3*g,D) - rlabel(,"\unit{3}{\ampere} FUSE" rjust "SLOW BLOW") + rlabel(,"\SI{3}{\ampere} FUSE" rjust "SLOW BLOW") line to (Here.x,int(Here.y/g)*g-g); dot Sckt1: socket at Here+(5*g,0) line from Sckt1.w to (PL,Sckt1); A: dot; "A" rjust @@ -117,7 +117,7 @@ define(`plug',`[ w = dimen_*2/3; q = 0.25*w line from T2 to (T2,F.c)-(0,2*g) ]') PP: plug with .F.c at Sckt3+(0,-8*g) - "\unit{120}{\hbox{VAC}}" ljust "\unit{50/60}{\hertz}" ljust at PP.e + "\SI{120}{VAC}" ljust "\SI{50/60}{\hertz}" ljust at PP.e define(`pwrswitch',`[ right; circlerad = 1.75*g/2 C1: circle "1" @@ -154,7 +154,7 @@ define(`pwrswitch',`[ right; circlerad = 1.75*g/2 Pad(22) at Board.sw+(0,3*g) R514: resistor(right_ 8*g from P22.e); llabel(,"R514") - rlabel(,"\unit{680}{\kilo}") + rlabel(,"\SI{680}{\kilo{}}") dot; { ground } line to (P23,Here) then to P23.n @@ -168,7 +168,7 @@ define(`pwrswitch',`[ right; circlerad = 1.75*g/2 diode(from BE left_ d1h down_ d1h); llabel(,,"D509") BS: dot diode(left_ d1h up_ d1h); llabel(D507) - capacitor(down_ from BN to BS,C); llabel("C507",,\unit{.22}{}) + capacitor(down_ from BN to BS,C); llabel("C507",,\num{.22}) line from BE to P24.n line from BN to P2.w line from BS to P1.w @@ -192,17 +192,17 @@ define(`hbi_tr',`[ linewid = linewid*4/4.16 # Interior circuits line from P6.w left 2*g; ground line from P5.w left 4*g; dot - { C504: capacitor(down_ 4*g,C); llabel("C504",,\unit{.22}{}); ground(,T) } + { C504: capacitor(down_ 4*g,C); llabel("C504",,\num{.22}); ground(,T) } D504: diode(left_ 5*g); rlabel(,"D504"); dot { C505: capacitor(down_ to (Here,C504.end),C+L) - rlabel("C505",\unit{100}{},\unit{75}{\volt}); ground(,T) } + rlabel("C505",\num{100},\SI{75}{\volt}); ground(,T) } line right_ to (Here,P7); dot { D503: reversed(`diode',to (D504.start,Here)); llabel(,"D503") line to P7.w } d3 = lin_leng(L3) spline <-> from C504.start+(g/2,0) \ up d3/4 right g/4 then up d3*2/4 left g/2 then up d3/4 right g/4 - box invis fill_(1) ht g wid 4*g "\unit{100}{\hbox{VAC}}" \ + box invis fill_(1) ht g wid 4*g "\SI{100}{VAC}" \ at last spline.c+(-g,0) down_ @@ -211,11 +211,11 @@ define(`hbi_tr',`[ linewid = linewid*4/4.16 line from Q503.B.s to (Q503.B.x,Q503.E.y-4*g) R513: resistor(down_ 5*g); llabel(,"R513" ljust "1500"); ground(,T) line from P19.e to (BW-(2*g,0),P19) then up Q503.E.y-P19.y+2*g - R511: resistor(right_ 5*g); llabel(,"R511"); rlabel(,\unit{470}{}); + R511: resistor(right_ 5*g); llabel(,"R511"); rlabel(,\num{470}); line to (Q503.E,Here) then to Q503.E.n line from P20.e to (BW,P20) then up R513.end.y-P20.y resistor(up_ lin_leng(R513)) - rlabel(,"R512" ljust "5600" ljust "\unit{1}{\watt}") + rlabel(,"R512" ljust "5600" ljust "\SI{1}{\watt}") line to (Here,Q503.B) then to Q503.B.w "Q503" "S2091 HI TEMP" "CONTROL" at Q503.E+(1.5*g,4*g) D505: reversed(`diode',right_ from Q503.E.e to (C504,Q503.E)); llabel(,"D505") @@ -226,23 +226,23 @@ define(`hbi_tr',`[ linewid = linewid*4/4.16 { Pad(8) at (Here,Board.n) } { line to P8.s } R505: resistor(down_ to (Here,P6)) - llabel(,"R505" ljust "\unit{12}{\kilo}"); dot + llabel(,"R505" ljust "\SI{12}{\kilo{}}"); dot { C503: capacitor(down_ to (Here,C505.end),C+L) - rlabel(,"C503" rjust "100" rjust "\unit{70}{\volt}") + rlabel(,"C503" rjust "100" rjust "\SI{70}{\volt}") ground(,T) } right_ Q502: hbi_tr(,R) with .B at (R511.start,Here) line from Q502.C.e to R505.start line from Q502.B.e to R505.end R504: resistor(down_ from Q502.B.s to (Q502.B,C505.end)) - rlabel(,"R504" rjust "\unit{51}{\kilo}"); ground(,T) + rlabel(,"R504" rjust "\SI{51}{\kilo{}}"); ground(,T) "Q502" "TA7311" "REGULATOR" "CONTROL" at Q502.C+(-1*g,3.5*g) Pad(9) at (Q502.E,Board.n) line from Q502.E.n to P9.s Pad(10) at (Q502.B-(9*g,0),Board.n) R502: resistor(left_ from Q502.E.w to (P10,Q502.E)) - rlabel(,"R502"); llabel(,\unit{150}{}); dot + rlabel(,"R502"); llabel(,\num{150}); dot Pad(11) at (Board.w,Q502.E) Pad(14) at P11+(0,2.5*g) @@ -275,41 +275,41 @@ define(`hbi_tr',`[ linewid = linewid*4/4.16 { line to P10.s } { resistor(down_ 5*g) llabel(, - "R510" ljust "225" ljust "\unit{10}{\watt}" ljust "\unit{5}{\hbox{\%}}") + "R510" ljust "225" ljust "\SI{10}{\watt}" ljust "\SI{5}{\hbox{\%}}") line to Q504.C.n } R503:resistor(left_ 10*g); rlabel(,"R503") - { "290" "\unit{10}{\watt} \unit{5}{\hbox{\%}}" at last [].s+(0,-1.3*g) } + { "290" "\SI{10}{\watt} \SI{5}{\hbox{\%}}" at last [].s+(0,-1.3*g) } dot line to (Here,Q504.B) - resistor(right_ to Q504.B.w); llabel(,"R507"); rlabel(,\unit{100}{}) + resistor(right_ to Q504.B.w); llabel(,"R507"); rlabel(,\num{100}) line from P15.e to R503.end # "Q504" "40409" "REGULATOR" at Q504.C+(3.5*g,3*g) "Q504" "40409" "REGULATOR" at Q504.n+(-2*g,3*g) resistor(left_ from R502.end to (R503.end,P11)); rlabel(,"R501") - {"390" "\unit{5}{\watt} \unit{5}{\hbox{\%}}" at last [].s+(0,-1.3*g)} + {"390" "\SI{5}{\watt} \SI{5}{\hbox{\%}}" at last [].s+(0,-1.3*g)} line to P11.e resistor(right_ from P16.e to (R514.end,P16)); llabel(,"R506") - rlabel(,\unit{82}{}) + rlabel(,\num{82}) line down P16.y-P17.y; dot dot(at (R514.end,P11)) C501: capacitor(down_ 6*g,C+); llabel("C501") - {"100" ljust "\unit{30}{\volt}" ljust at last [].s+(0,-g) below } + {"100" ljust "\SI{30}{\volt}" ljust at last [].s+(0,-g) below } ground(,T) dot(at (Here.x+4*g,P11.y)) ZD501: reversed(`diode',down_ lin_leng(C501),Z); llabel("ZD501"); ground(,T) dot(at (R514.end,P15)) C502: capacitor(down_ 6*g,C+); llabel("C502") - {"100" ljust "\unit{30}{\volt}" ljust at last [].s+(0,-g) below } + {"100" ljust "\SI{30}{\volt}" ljust at last [].s+(0,-g) below } ground(,T) dot(at (Here.x+4*g,P15.y)) ZD502: reversed(`diode',down_ lin_leng(C502),Z); llabel("ZD502"); ground(,T) line from (C502,P17) to (C502,R508.start+(0,g)) C506: capacitor(down_ to (Here,R508.end),C+); llabel("C506") - {"100" ljust "\unit{30}{\volt}" ljust at last [].s+(0,-g) below } + {"100" ljust "\SI{30}{\volt}" ljust at last [].s+(0,-g) below } ground(,T) # Left-side boxes @@ -326,27 +326,27 @@ define(`hbi_tr',`[ linewid = linewid*4/4.16 line left 3*g from P17.w "RED" above line left 3*g from P18.w "WHT-" "RED" above box with .e at (Here,0.5 between P17 and P18) \ - "\shortstack[l]{\unit{12.7}{\volt} SOURCE\\ TO MULTIPLEX}" + "\shortstack[l]{\SI{12.7}{\volt} SOURCE\\ TO MULTIPLEX}" line left 3*g from P16.w "WHT" above box with .se at Here+(0,-g) \ - "\shortstack[l]{\unit{12}{\volt} SOURCE\\ TO FM TUNER\\ SOURCE SWITCH}" + "\shortstack[l]{\SI{12}{\volt} SOURCE\\ TO FM TUNER\\ SOURCE SWITCH}" line left 3*g from P15.w "ORG" above box ht 3*g with .e at Here \ - "\shortstack[l]{\unit{15}{\volt} SOURCE\\ TO FM TUNER}" + "\shortstack[l]{\SI{15}{\volt} SOURCE\\ TO FM TUNER}" line left 3*g from P13.w "BLU" above line left 3*g from P12.w " WHT-" "RED" line left 3*g from P11.w "RED" above box ht 6*g with .e at (Here,P12) \ - "\shortstack[l]{\unit{27}{\volt} SOURCE\\ TO CONTROL\\ PREAMP AND\\ PWR\ + "\shortstack[l]{\SI{27}{\volt} SOURCE\\ TO CONTROL\\ PREAMP AND\\ PWR\ AMPLIFIER}" line left 3*g from P14.w { "WHT-" "GRY-" "GRN" at last line.c+(0,2*g) } box with .se at Here+(0,-g) \ - "\shortstack[l]{\unit{50}{\volt} SOURCE\\ TO PHONO\\ PREAMP}" + "\shortstack[l]{\SI{50}{\volt} SOURCE\\ TO PHONO\\ PREAMP}" iflatex(`ifpsfrag(,`latexcommand(})')') diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Jack.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Jack.m4 new file mode 100644 index 00000000000..b9a005d2794 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Jack.m4 @@ -0,0 +1,78 @@ +.PS +# `Jack.m4' +cct_init + +P: [ + P1: plug + "\sl A" wid 0.1 at P1.A rjust + "\sl B" at P1.B rjust + "\sl TB" at P1.TB ljust above + "\sl TA" at P1.TA ljust below + P2: plug(,R) with .B at P1.A+(0.85,0) + "\sl A" wid 0.1 at P2.A rjust + "\sl B" at P2.B rjust +# P3: plug(L) with .A at P2.A+(1,0) +# "\sl A" wid 0.1 at P3.A ljust +# "\sl B" at P3.B ljust + P4: plug(,3) with .A at P2.B+(0.85,0) + "\sl A" at P4.A rjust + "\sl B" at P4.B rjust + "\sl C" at P4.C rjust + P5: plug(L,3R) with .A at P4.A+(1,0) + "\sl A" wid 0.1 at P5.A ljust + "\sl B" at P5.B ljust + "\sl C" at P5.C ljust + `"\tt plug"' below at P1.s+(0,-0.1) + `"\tt plug(,R)"' below at P2.s+(0,-0.1) +# `"\tt plug(L)"' below at P3.s+(0,-0.1) + `"\tt plug(,3)"' below at P4.s+(-0.1,-0.1) + `"\tt plug(L,3R)"' below at P5.s+(0.1,-0.1) +] + +L: [ right_ + J1: jack + thinlines_ + "\sl L" wid 0.1 rjust at J1.L + arrow <- right 0.1 from J1.F; "\sl F" ljust + arrow <- down 0.1 from J1.G then left 0.1 ; "\sl G" rjust + thicklines_ + J2:[K2: jack(,LMBS) #with .F at J1.F+(1.2,0) + thinlines_ + "\sl L" rjust at K2.L + arrow <- from K2.LM left 0.25; "\sl LM" wid 0.18 rjust + arrow <- from K2.LB left 0.25; "\sl LB" rjust + "\sl S" rjust at K2.S + thicklines_ ] with .K2.F at J1.F+(1.2,0) + J3: jack(L,RLS) with .F at J2.K2.F+(0.4,0) + thinlines_ + "\sl L" ljust at J3.L + "\sl S" ljust at J3.S + thicklines_ + J4: jack(L,RLBLMLMS) with .F at J3.F+(1.1,0) + thinlines_ + "\sl L1" ljust at J4.L1 + arrow <- right 0.3 from J4.LM1; "\sl LM1" ljust + "\sl L2" ljust at J4.L2 + arrow <- right 0.3 from J4.LM2; "\sl LM2" wid 0.2 ht 11pt__ ljust + "\sl S" ljust at J4.S + "\sl L" ljust at J4.L + arrow <- right 0.2 from J4.LB ; "\sl LB" ljust + right_ + J5: jack(,RSBSMLB) with .F at J4.F+(1.95,0) + thinlines_ + "\sl L" rjust at J5.L + "\sl S" rjust at J5.S + "\sl S1" rjust at J5.S1 + arrow <- left 0.3 from J5.SM1; "\sl SM1" rjust + spline 0.5 <- left 0.25 then left 0.1 down 0.05 from J5.LB; "\sl LB" rjust + spline 0.5 <- left 0.25 then left 0.1 up 0.05 from J5.SB; "\sl SB" rjust + thicklines_ + + `"\tt jack"' ht 0.15 below at J1.s+(0,-0.15) + `"\tt jack(,LMBS)"' below at (J2,last "") + `"\tt ..(L,RLS)"' below at (J3,last "") + `"\tt ..(L,RLBLMLMS)"' below at (J4,last "") + `"\tt ..(,RSBSMLB)"' below at (J5,last "") +] with .nw at P.sw #+ (0,0.1) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Logic.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Logic.m4 new file mode 100644 index 00000000000..d42e02768eb --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Logic.m4 @@ -0,0 +1,62 @@ +.PS +# Logic.m4 +cct_init +ifdef(`AND_gate',,`include(liblog.m4)') +xgap = 0.6 +[ dmov = 0.4 +{ {AND_gate ; "{\tt AND\_gate}" ljust at last [].w + (xgap,0)} + move down dmov; right_ + {OR_gate ; "{\tt OR\_gate}" ljust at last [].w + (xgap,0)} + move down dmov; right_ + {BUFFER_gate ; "{\tt BUFFER\_gate}" ljust at last [].w + (xgap,0)} + move down dmov; right_ + {XOR_gate ; "{\tt XOR\_gate}" ljust at last [].w + (xgap,0)} + } + + move right_ 140pt__ +{ { NAND_gate; "{\tt NAND\_gate}" ljust at last [].w + (xgap,0) } + move down dmov; right_ + { Gate: NOR_gate(3) + "{\tt NOR\_gate(3)}" ljust at last [].w + (xgap,0) + thinlines_ + spline <- from Gate.Out right arrowht*2.0 \ + then up 0.15 then right 0.05 + "{\tt Out}" ljust + spline <- from Gate.N_Out down arrowht*2.0 \ + then right 0.1+arrowht*1.5+NOT_rad down 0.15-arrowht*2.0 + "{\tt N\_Out}" ljust + for_(1,3,1, + `arrow <- left 0.2 down 0.05 from Gate.In`'m4x + "{\tt In`'m4x\/}" rjust at Here+(0,(2-m4x)*0.02)') + } + thicklines_ + move down dmov; right_ + { NOT_gate ; "{\tt NOT\_gate}" ljust at last [].w + (xgap,0) } + move down dmov; right_ + {Gate: NXOR_gate(NPN); "{\tt NXOR\_gate(NPN)}" ljust at last [].w + (xgap,0) + for_(1,3,1, + `arrow <- left 0.2 up 0.05 from Gate.In`'m4x + "{\tt In`'m4x\/}" rjust at Here+(0,(2-m4x)*0.02)') + } +} + move right_ 140pt__ +{ {NAND_gate(,B) ; "{\tt NAND\_gate(,B)}" ljust at last [].w + (xgap,0)} + { line invis right 1.6 from last [].se then down 1} + move down dmov; right_ + move left N_diam*L_unit; right_ + {NOR_gate(3,NB) ; "{\tt NOR\_gate(3,NB)}" ljust at (last "",last []) } + move down dmov; right_ + {BOX_gate(PN,N,,,=1) + "{\tt BOX\_gate(PN,N,{,},=1)}" ljust at (last "",last []) + line left 0.15 from last [].In1 + line left 0.15-NOT_rad*2 from last [].In2 + line right 0.15 from last [].Out } + move down dmov; move right_ N_diam*L_unit + {BOX_gate(PP,N,,,=) + "{\tt BOX\_gate(PP,N,{,},=)}" ljust at (last "",last []) + line left 0.15 from last [].In1 + line left 0.15 from last [].In2 + line right 0.15 from last [].Out } +} +] +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4 index 8c8872b9c96..6e4eb88ea0d 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/MC.m4 @@ -11,7 +11,7 @@ cct_init source(right_ dimen_,AC); llabel(,,sprintf("$v_{\char%g}$",96+i)) resistor(right_ dimen_ from Here-(backup/2,0)); if i==1 then { llabel(,R_i)} inductor(right_ dimen_ from Here-(backup,0),W); if i==1 then { llabel(,L_i)} - line right_ i*dh; b_current(sprintf("$i_{\char%g}$",96+i)); dot + line right_ i*dh; b_current(sprintf("\strut$i_{\char%g}$",96+i)); dot { line down (3-i)*dv; capacitor(down_ dimen_) if i==1 then { rlabel(,C_i) } if i==2 then { dot(ifgpic(at last line.end)) } \ @@ -26,7 +26,7 @@ cct_init if i==2 then { dot } else { line down (2-i)*dv } }} line from E right dh then down E.y-Here.y - arrow right dimen_/2 ; { sprintf("$i_{\char%g}\quad$",64+i) above } + arrow right dimen_/2 ; { sprintf("\strut$i_{\char%g}\quad$",64+i) above } resistor(right_ dimen_ from Here-(arrowht/2,0)); if i==1 then {llabel(,R_o)} inductor(right_ dimen_ from Here-(backup,0),W); if i==1 then {llabel(,L_o)} source(right_ dimen_,AC); llabel(sprintf("$v_{\char%g}$",64+i)) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile index e0404f8aee9..92968df523a 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Makefile @@ -27,13 +27,14 @@ LIBDIR = .. # The dpic processor: PIC = dpic -p -PIC = dpic -p #PIC = $$HOME/dpic/bu*/p2c/ftp/dpic -p #PIC = /cygdrive/d/Dwight/dpic/p2c/Windows/dpic -p #PIC = dpic -1 -p #PIC = $$HOME/dpic/build/test/dpic -p +#PIC = $$HOME/dpic/dev/p2c/ftp/dpic -p #PIC = $$HOME/tmp/dpic -p #PIC = $$HOME/dpic/bison/dpic -p +#PIC = $$HOME/dpic/bdev/dpic -p CONFIGFILE = pstricks.m4 @@ -58,41 +59,33 @@ M4 = m4 DOC = examples PICS = \ - Adder.tex Alogix.tex ABlogix.tex AmpTable.tex Antennas.tex Audio.tex \ - Bip.tex Btree.tex Byte.tex Buttons.tex \ - CanLogic.tex CctTable.tex Conn.tex Counting.tex Crossbar.tex Crow.tex \ - Csource.tex \ - Decoder.tex Demultiplexer.tex Diodes.tex Drive.tex \ - Emarrows.tex Flow.tex Fuses.tex GrayCode.tex Grounds.tex \ - Headers.tex Heathkit.tex \ - I2L.tex Incleps.tex Jack.tex \ - Logic.tex Loglog.tex MC.tex Mixer.tex MotorControl.tex Multiplexer.tex \ - NLG.tex NPDT.tex Nport.tex \ - Opamp.tex Optoiso.tex Pconn.tex PushPull.tex \ - Quantum.tex Rectifiers.tex Relay.tex Rotbox.tex \ - Schottky.tex ShiftR.tex Sierpinski.tex Sixpole.tex Sources.tex SQUID.tex \ - Switches.tex \ - TTLnand.tex Tgate.tex Three.tex Timer.tex Ttree.tex Tubediags.tex \ - Variable.tex Windings.tex Xform.tex \ - control.tex csc.tex diamond.tex \ - ex00.tex ex01.tex ex02.tex ex03.tex ex04.tex ex05.tex ex06.tex \ - ex08.tex ex09.tex ex10.tex ex11.tex ex12.tex ex15.tex \ - ex16.tex ex17.tex ex18.tex ex21.tex exp.tex fet.tex \ - graysurf.tex lcct.tex pwrsupply.tex quick.tex \ - random.tex recycle.tex rose.tex \ - sfg.tex shapes.tex thyristor.tex ujt.tex worm.tex XOR.tex - -# From the doc directory: -MANFIGS = AmpTable Antennas Audio Bip CctTable Conn Demultiplexer Diodes \ - Emarrows Fuses \ - Grounds Headers Jack Logic Multiplexer NLG NPDT Nport Opamp Pconn \ - Relay ShiftR Sources Switches \ - Tgate Variable Windings Xform fet quick thyristor ujt + ABlogix.tex Adder.tex Alogix.tex AmpTable.tex Antennas.tex \ + AntiqueClock.tex Audio.tex Bip.tex Btree.tex Buttons.tex Byte.tex \ + CanLogic.tex CctTable.tex Conn.tex Contacts.tex Contact.tex control.tex \ + Counting.tex Crossbar.tex Crow.tex csc.tex Csource.tex Decoder.tex \ + Demultiplexer.tex diamond.tex Dini.tex Diodes.tex Drive.tex Emarrows.tex \ + ex00.tex ex01.tex ex02.tex ex03.tex ex04.tex ex05.tex ex06.tex ex08.tex \ + ex09.tex ex10.tex ex11.tex ex12.tex ex15.tex ex16.tex ex17.tex ex18.tex \ + ex21.tex exp.tex fet.tex Flow.tex Fuses.tex GrayCode.tex graysurf.tex \ + Grounds.tex Headers.tex Heathkit.tex I2L.tex Incleps.tex Jack.tex \ + lcct.tex Logic.tex Loglog.tex MC.tex Mixer.tex MotorControl.tex \ + Multiplexer.tex NLG.tex NPDT.tex Nport.tex Opamp.tex Optoiso.tex \ + Pconn.tex PushPull.tex pwrsupply.tex Quantum.tex quick.tex random.tex \ + Rectifiers.tex recycle.tex relaycoil.tex Relay.tex rose.tex Rotbox.tex \ + Schottky.tex sfg.tex shapes.tex ShiftR.tex Sierpinski.tex Sixpole.tex \ + Sources.tex SQUID.tex Switches.tex \ + Tgate.tex Three.tex thyristor.tex Timer.tex \ + TTLnand.tex Ttree.tex Tubediags.tex ujt.tex Variable.tex Windings.tex \ + worm.tex Xform.tex XOR.tex # Files that have to be processed twice: -BOXDIMS = ex09 Crow Incleps Loglog Opamp random Ttree Windings +BOXDIMS = ex09.tex Crow.tex Incleps.tex Loglog.tex Opamp.tex random.tex \ + Ttree.tex Windings.tex +BOXPICS = ex09.pic Crow.pic Incleps.pic Loglog.pic Opamp.pic random.pic \ + Ttree.pic Windings.pic DVIPSOPTS = -Ppdf -G0 -t letter +DVIPSOPTS = -G0 -t letter M4LIBS = $(CONFIGFILE) $(CUSTOM) DIMFILE = $(DOC).dim BS = tr '|' '\134' @@ -106,8 +99,10 @@ BS = tr '|' '\134' chmod 644 $*.ps .m4.tex: @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi ; touch F_$*.dim - $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' > $*.pic - $(PIC) $*.pic > $*.tex + $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' \ + | $(PIC) > $*.tex +# $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' > $*.pic +# $(PIC) $*.pic > $*.tex # grep Production dpic.log >> newp.txt .m4.pic: @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi @@ -132,7 +127,8 @@ BS = tr '|' '\134' latex F_$* .m4.eps: make $*.dvi - dvips -Ppdf F_$* -T128cm,28cm -o $*.ps + dvips F_$* -T128cm,28cm -o $*.ps +# dvips -Ppdf F_$* -T128cm,28cm -o $*.ps # Recent changes to PSTricks(?) have clashed with the use of TeXtoEPS # so use ps2epsi ps2epsi $*.ps $*.epsi @@ -177,16 +173,16 @@ BS = tr '|' '\134' $(DOC).pdf: clean pdfmode $(DOC).frp touch $(DOC).dim - for file in $(BOXDIMS) ; do \ - rm -f $$file.tex $$file.pic ; \ - make PIC="$(PIC) -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim $${file}.tex ; \ - done + rm -f $(BOXDIMS) $(BOXPICS) + make PIC="dpic -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics pdflatex $(DOC) - for file in $(BOXDIMS) ; do \ - rm -f $$file.tex $$file.pic ; \ - make PIC="$(PIC) -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim $${file}.tex ; \ - done + rm -f $(BOXDIMS) $(BOXPICS) + make PIC="dpic -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics pdflatex $(DOC) + optpdf $(DOC).pdf + +pics: $(PICS) + touch pics $(DOC).ps: psmode $(DOC).dvi @@ -196,30 +192,24 @@ psmode: pdfmode: printf "|usepackage{tikz}\n" | $(BS) > mode.tex -doclinks: - -for nm in $(MANFIGS) ; do cp $(LIBDIR)/doc/$$nm.m4 . ; done - touch doclinks - $(DOC).dvi: $(DOC).frs touch $(DOC).dim - for file in $(BOXDIMS) ; do \ - rm -f $$file.tex $$file.pic ; \ - make PIC="$(PIC)" DIMFILE=$(DOC).dim $${file}.tex ; done + for file in $(BOXDIMS) ; do rm -f $$file.tex $$file.pic ; done + make PIC="$(PIC)" CONFIGFILE=pstricks.m4 DIMFILE=$(DOC).dim pics latex $(DOC) - for file in $(BOXDIMS) ; do \ - rm -f $$file.tex $$file.pic ; \ - make PIC="$(PIC)" DIMFILE=$(DOC).dim $${file}.tex ; done + for file in $(BOXDIMS) ; do rm -f $$file.tex $$file.pic ; done + make PIC="$(PIC)" CONFIGFILE=pstricks.m4 DIMFILE=$(DOC).dim pics latex $(DOC) -$(DOC).frs: doclinks $(DOC).tex files.tex header.tex psmode - make $(PICS) +$(DOC).frs: $(DOC).tex files.tex header.tex psmode + make PIC="dpic -p" CONFIGFILE=pstricks.m4 DIMFILE=$(DOC).dim pics cp $(LIBDIR)/doc/Version.tex . latex $(DOC) - touch $(DOC).frs rm -f $(DOC).dvi + touch $(DOC).frs -$(DOC).frp: doclinks $(DOC).tex files.tex header.tex pdfmode - make CONFIGFILE=pgf.m4 PIC="$(PIC) -g" $(PICS) +$(DOC).frp: $(DOC).tex files.tex header.tex pdfmode + make PIC="dpic -g" CONFIGFILE=pgf.m4 DIMFILE=$(DOC).dim pics cp $(LIBDIR)/doc/Version.tex . pdflatex $(DOC) rm -f $(DOC).pdf @@ -247,7 +237,8 @@ clobber: clean rm -f *.ps -@for dir in mf mpost pdflatex xfig psfrag pgf svg dev test; \ do (if test -d $$dir ; then cd $$dir; make clobber; fi) ; done - rm -f *.warn quick.m4 + rm -f *.warn + rm -f examples.pdf rm -rf index.html html basenames *.png* dist zips htmlfiles svgfiles rm -rf $(TMP)/Cir* $(ECETMP)/Cir* $(ECEDIR) if test -f Incl.pdf ; then \ @@ -259,13 +250,12 @@ clobber: clean clean: @printf "\n examples clean:\n" - rm -f core examples.pdf boxdims.tar.gz + rm -f core boxdims.tar.gz pics rm -f *.dvi *.aux *.log *.toc *.blg *.eps *.tif *.epsi eps *-mfpic* rm -f fig*.tex $(PICS) *.roff *.int *.pic gpic.m4 test.tex xxx* *.fig rm -f *.dim *.bak *.frs *.frp $(RPICS) rotate.ps tst.ps *.bbl *-pics.ps rm -f *.tfm *[0-9]pk *.png *.1 *.gif - rm -f F_* Version.tex doclinks *stackdump *.ico quick.m4 - for nm in $(MANFIGS) ; do rm -f $$nm.* ; done + rm -f F_* Version.tex *stackdump *.ico rm -rf distfile distfile.tar.gz mode.tex @printf "\n" @if test -f distmakefile ; then make -f distmakefile clean ; fi diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Mixer.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Mixer.m4 index 32920a89cfe..13291261c88 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Mixer.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Mixer.m4 @@ -29,10 +29,10 @@ RF: dot(,,1); "sftxt(RF)" at RF.w rjust line from T1.L3.end left_ del; corner; ground(,,F) line down_ del/2 from T1.L1.start then right_ del - reversed(`capacitor',right_ dimen_,C); llabel(,\unit{0.1}{\micro\farad}) + reversed(`capacitor',right_ dimen_,C); llabel(,\SI{0.1}{\micro{}}\hbox{\sf F}) BT: dot(at Here) line up_ del/2 from T1.L2.end then right del - reversed(`capacitor',right_ dimen_,C); llabel(,\unit{0.1}{\micro\farad}) + reversed(`capacitor',right_ dimen_,C); llabel(,\SI{0.1}{\micro{}}\hbox{\sf F}) t = dimen_*7/8 line to (BT.x+4*t,Here.y) TT: dot @@ -55,46 +55,46 @@ Q2: mosfet(,,dMESDQuB,E) at (Q1,T2.s-(0,elen_-del)) line right_ del from T1.T then down_ T1.T.y-BT.y+del corner; left_ capacitor(to (T1.L3.end-(del,0),Here),C) - rlabel(,\unit{0.1}{\micro\farad}\hskip20pt) + rlabel(,\SI{0.1}{\micro{}}\hbox{\sf F}\hskip20pt) LOD: dot { line to (RF,Here); dot(,,1) move left_ 4bp__; "sftxt(local)" rjust "sftxt(oscillator)" rjust move left 40bp__ } line from T2.T left_ to (Q1.S,T2.T) T2T: dot - { capacitor(down_ to (Here,BT),C); rlabel(,\unit{0.1}{\micro\farad}) + { capacitor(down_ to (Here,BT),C); rlabel(,\SI{0.1}{\micro{}}\hbox{\sf F}) ground(,T,F) } { line from T2.L3.start right_ del; corner; ground(,,F) } Vt: dot(at (0.5 between BT and TT,Q1.Env.nw),,1) { "sftxt($+$V$_{\hbox{\scriptsize CC}}$)" at last [].e ljust } line to (Here,T2T) chop dotrad_ chop 0; dot { line to (Here,BT); Cv: capacitor(down_ 3/2*dimen_,C) - llabel(\unit{10}{\micro\farad}); G: dot; ground(,,F) } + llabel(\SI{10}{\micro{}}\hbox{\sf F}); G: dot; ground(,,F) } for s=-1 to 1 by 2 do {{ line right s*t; corner resistor(down_ to (Here,BT)) - if s<0 then { llabel(,\unit{5}{\kilo\ohm}) } \ - else { rlabel(,\unit{5}{\kilo\ohm}) + if s<0 then { llabel(,\SI{5}{\kilo\ohm}) } \ + else { rlabel(,\SI{5}{\kilo\ohm}) { dot(at last line.start); line to (TT,Here) resistor(right_ to (T2T,Here)) - llabel(,\unit{10}{\ohm}) } } + llabel(,\SI{10}{\ohm}) } } P: potentiometer(down_ Cv.len,,0.5,s*t ) with .Start at Here - if s<0 then { "sftxt(\unit{1}{\kilo\ohm})" at P. 1st [].ne ljust } \ - else { "sftxt(\unit{1}{\kilo\ohm})" at P. 1st [].sw rjust } + if s<0 then { "sftxt(1\`,'\si{\kilo\ohm})" at P. 1st [].ne ljust } \ + else { "sftxt(1\`,'\si{\kilo\ohm})" at P. 1st [].sw rjust } dot(at P.End) dot(at P.T1) { L: inductor(up_ to (Here,BT),L); - if s<0 then { "sftxt(\unit{100}{\micro\henry})" at last [].sw rjust } \ + if s<0 then { "sftxt(100\`,'\si{\micro{}}H)" at last [].sw rjust } \ else { line to TT - "sftxt(\unit{100}{\micro\henry})" \ + "sftxt(100\`,'\si{\micro{}}H)" \ at last [].ne ljust below } } capacitor(down_ to (Here,G),C) - if s<0 then { rlabel(,\unit{0.1}{\micro\farad}) } \ - else { llabel(,\unit{0.1}{\micro\farad}) } + if s<0 then { rlabel(,\SI{0.1}{\micro{}}\hbox{\sf F}) } \ + else { llabel(,\SI{0.1}{\micro{}}\hbox{\sf F}) } dot }} - resistor(down_ from LOD to (LOD,G)); llabel(,\unit{51}{\ohm}); corner + resistor(down_ from LOD to (LOD,G)); llabel(,\SI{51}{\ohm}); corner line to (Q2.S,Here) then to Q2.S ', diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/MosfetElements.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/MosfetElements.m4 deleted file mode 100644 index b8786e20e8b..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/MosfetElements.m4 +++ /dev/null @@ -1,78 +0,0 @@ -.PS -# MosfetElements.m4 -cct_init -s_init(MosfetElements) - - linewid = linewid*1.5 - linethick = 1.5 - -define(`mfgrid', - `tr_xy_init(,m4_U,m4R)define(`m4R',) - ltt = linethick; linethick = 0.4 - m4gdim = ifelse(`$1',,4,`($1)') - iflatex(`latexcommand(\color{lightgray})') - for x=-m4gdim to m4gdim do { - line color "lightgray" from tr_xy(x,0) to tr_xy(x,2*m4gdim) - if pmod(x,2)==0 then { sprintf("{\tiny %g}",x) at last line.start below }} - for y=0 to 2*m4gdim do { - line color "lightgray" from tr_xy(-m4gdim,y) to tr_xy(m4gdim,y) - if pmod(y,2)==0 then { sprintf("{\tiny %g}",y) at last line.start rjust }} - linethick = ltt - iflatex(`latexcommand(\color{black})') - Grid: box invis wid 2*m4gdim*m4_xyU ht 2*m4gdim*m4_xyU \ - with .sw at tr_xy(-m4gdim,0) -') -define(`gridnext',`with .Grid.w at last [].Grid.e + (m4_xyU*2,0)') -define(`gridbelow',`with .Grid.nw at `$1'.Grid.sw+(0,-linewid/2)') -define(`Gmosfet',`mfgrid; Q: mosfet(,,`$1') with .S at Grid.sw + (2*m4_xyU,0)') - -R1: [ Gmosfet(B); "B" at Q.Bl ljust ] - [ Gmosfet(D); "D" at Q.Dl ljust ] gridnext - [ Gmosfet(E); "E" at Q.Channel below ] gridnext - [ Gmosfet(F); "F" at Q.Channel below ] gridnext - [ Gmosfet(G); "G" at Q.Gl ljust ] gridnext - [ Gmosfet(H); "H" at Q.Hl ljust ] gridnext - [ Gmosfet(L); "L" at Q.Ll ] gridnext - [ Gmosfet(M); "M" at Q.Glh below ] gridnext - -R2:[ Gmosfet(uM); "uM" at Q.Gl ] gridbelow(R1) - [ Gmosfet(dM); "dM" at Q.Gl ] gridnext - [ Gmosfet(Pz); "Pz" at Grid.s ] gridnext - [ Gmosfet(Q); "Q" at Q.Ql above ] gridnext - [ Gmosfet(R); "R" at Q.Rl below ] gridnext - [ Gmosfet(S); "S" at Q.Sl ljust ] gridnext - [ Gmosfet(dT); "dT" at Q.Tl below ] gridnext - [ Gmosfet(X); "X" at Q.Xh above ] gridnext - -R3:[ Gmosfet(uM1) - "uM1" at Grid.s above - "G0" at Q.G0 above - "G1" at Q.G1 above ] gridbelow(R2) - [ Gmosfet(dM1) - "G0" at Q.G0 above - "G1" at Q.G1 above - "dM1" at Grid.s above ] gridnext - -# [ Q: mosfet -# {"S" at Q.S rjust} -# {"D" at Q.D ljust} -# {"G" at Q.G rjust} -# s_box(``mosfet'') at Q.s below] -# -# [ Q: mosfet(,,DSELuBQ) -# s_box(``mosfet(,,DSELuBQ)'') at Q.s below] with .n at last [].s + (0,-0.2) -# -# [ Q: mosfet(,,DSEMuBQ) -# s_box(``mosfet(,,DSEMuBQ)'') at Q.s below] with .n at last [].s + (0,-0.2) -# -# [ Q: mosfet(,,DSEdMuBQ) -# s_box(``mosfet(,,DSEdMuBQ)'') at Q.s below] with .n at last [].s + (0,-0.2) -# -# [ Q: mosfet(right dimen_,,DSELuBQN) -# {"S" at Q.S rjust} -# {"D" at Q.D ljust} -# {"G" at Q.G rjust} -# s_box(``mosfet(right dimen\_,,DSELuBQN)'') at Q.s below] \ -# with .n at last [].s + (0,-0.2) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Multiplexer.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Multiplexer.m4 new file mode 100644 index 00000000000..f4b72154a4d --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Multiplexer.m4 @@ -0,0 +1,43 @@ +.PS +# `Multiplexer.m4' +log_init + + ifmpost(`command "verbatimtex {\sf etex"', + `ifpostscript(, + `command "{\sf"')') + + right_ + + Mux(4,M1) + `"\tt Mux(4,M1)"' at last [].s below + `"\sl In0"' at last [].In0.end rjust wid 14bp__ + `"\sl In1"' at last [].In1.end rjust + `"\sl In2"' at last [].In2.end rjust + `"\sl In3"' at last [].In3.end rjust + `"\sl Out"' at last [].Out.end above + `"\sl Sel"' at last [].Sel.end ljust above + left_; Mux(4,,LNOE) with .c at last [].c+(0.9,0) + `"\tt left\_; Mux(4,{,}LNOE)"' at last [].s +(0,-20bp__) ht 10bp__ + `"\sl In0"' at last [].In0.end above + `"\sl NOE"' at last [].NOE.end +(4bp__,0) below + `"\sl Out"' at last [].Out.end below + `"\sl Sel"' at last [].Sel.end rjust below + right_; Mux(4,,OEBN2) with .c at last [].c+(1.4,0) + `"\tt Mux(4,{,}OEBN2)"' at last [].s below + `"\sl Sel0"' at last [].Sel0.end rjust + `"\sl Sel1"' at last [].Sel1.end ljust + `"\sl In0"' at last [].In0.end rjust + `"\sl In3"' at last [].In3.end rjust + `"\sl OE"' at last [].OE.end rjust + down_; Mux(8,,L3,,28*L_unit) with .c at last [].c+(1.7,0) + `"\tt down\_; Mux(8,{,}L3,{,}28*L\_unit)"' at last [].s below + `"\sl Sel0"' at last [].Sel0.end rjust + `"\sl Sel2"' at last [].Sel2.end rjust below + `"\sl In0"' at last [].In0.end rjust + `"\sl In7"' at last [].In7.end ljust wid 14bp__ + +ifmpost(`command "verbatimtex } etex"', +`ifpostscript(, +`command "}"')') + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/NLG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/NLG.m4 new file mode 100644 index 00000000000..2b9a39f86e4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/NLG.m4 @@ -0,0 +1,19 @@ +.PS +# NLG.m4 +cct_init + + define(`nullor',`nport(`$1' + {`"${}0$"' at Box.w ljust + `"$\infty$"' at Box.e rjust},shift($@))') + +N: nullor +`"\tt nullor"' at last [].s+(0,-3pt__) below +G: gyrator with .sw at N.se+(0.5,0) +`"\tt gyrator"' at G.s+(0,-3pt__) below +I: gyrator(invis,,0,N) with .w at G.e+(0.5,0) +`"\tt gyrator(invis,{,}0,N)"' at I.s +V: gyrator(invis wid boxht,,0,NV) with .w at I.e+(1,0) +`"\tt gyrator(invis wid boxht,{,}0,NV)"' at V.s+(0,-3pt__) below + + move right 0.9 +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/NPDT.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/NPDT.m4 new file mode 100644 index 00000000000..17f4ef26b15 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/NPDT.m4 @@ -0,0 +1,35 @@ +.PS +# `NPDT.m4' +cct_init + linewid = linewid*1.2 + movewid = 1.0 + + NPDT + { `"\sl R" at last [].R.s below + "\sl T" at last [].T.s below + "\sl L" at last [].L.s below' } + { `"\tt NPDT"' at last [].s +(0,-0.22) } + up_; NPDT with .L at last[].R+(0.75,0) + { `"\sl R"' wid 8pt__ at last [].R.e ljust + "\sl T" at last [].T.e ljust + "\sl L" at last [].L.e ljust } + { `"\tt up\_; NPDT\strut"' at last [].s +(0.1,-0.15) } + right_ + NPDT(2) with .L1 at last [].L+(0.75,0) + { for_(1,2,1, + `"\sl R`'m4x" at last [].R`'m4x.e ljust + "\sl L`'m4x" wid 11pt__ at last [].L`'m4x.w rjust') } + { `"\tt NPDT(2)\strut"' at last [].s +(0,-0.15) } + move + NPDT(3,R) with .L3 at last [].R1+(0.75,0) + { for_(1,3,1, + `"\sl R`'m4x" at last [].R`'m4x.e ljust + "\sl L`'m4x" wid 11pt__ at last [].L`'m4x.w rjust') } + { `"\tt NPDT(3,R)\strut"' at last [].s below } + left_; NPDT(2,R) with .R1 at last [].R3+(0.75,0) + { for_(1,2,1, + `"\sl R`'m4x" at last [].R`'m4x.w rjust + "\sl L`'m4x" wid 11pt__ at last [].L`'m4x.e ljust') } + { `"\tt left\_; NPDT(2,R)\strut"' at last [].s +(0,-0.15) } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Nport.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Nport.m4 new file mode 100644 index 00000000000..37dbffeaccf --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Nport.m4 @@ -0,0 +1,43 @@ +.PS +# `Nport.m4' +cct_init +textoffset = 5bp__ + +Twoport: nport + + "\sl W1a" above rjust at Twoport.W1a + "\sl W1b" below rjust at Twoport.W1b wid 0.25 + "\sl E1a" above ljust at Twoport.E1a + "\sl E1b" below ljust at Twoport.E1b + +Nport: nport(wid 2.0 ht 1 fill_(0.9) "n-port",1,2,3,4) \ + with .Box.w at Twoport.Box.e+(1.0,0) + + "\sl W1a" rjust at Nport.W1a + "\sl W1b" rjust at Nport.W1b + + "\sl E1a" ljust at Nport.E1a + "\sl E3b" ljust at Nport.E3b + + "\sl N1a" above at Nport.N1a + "\sl N1b$\;\;$" above at Nport.N1b + "\sl $\;\;$N2a" above at Nport.N2a + "\sl N2b" above at Nport.N2b + + "\sl S1a" below at Nport.S1a + "\sl S4b" below at Nport.S4b + + "$\cdots$" at 0.5<Nport.S1a,Nport.S4b>+(0,-0.10) + "$\vdots$" at 0.5<Nport.E1a,Nport.E3b>+(0.15,0.05) + +Nterm: nterm with .Box.w at Nport.Box.e+(1.0,0) + "\sl W1" rjust at Nterm.W1 + "\sl E1" ljust at Nterm.E1 + "\sl S1" below at Nterm.S1 + + `"\tt nport"' at Twoport.s+(0,-0.3) + `"\tt nport(wid 2.0 ht 1 fill\_(0.9) \"n-port\",1,2,3,4)"' \ + at Nport.s+(0,-0.25) + `"\tt nterm"' at Nterm.s+(0,-0.3) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Opamp.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Opamp.m4 new file mode 100644 index 00000000000..5bdb8ac2082 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Opamp.m4 @@ -0,0 +1,45 @@ +.PS +# Opamp.m4 +sinclude(FOpamp.dim) +sinclude(Circuit_macros.dim) +s_init(Opamp) +cct_init + + A: opamp + thinlines_ + s_box(`\tt opam{}p') at A.s-(0,0.35) + s_box(\tt Out) below at A.Out + spline <- from A.In1 left 0.1 then up 0.1 left 0.1 + s_box(\tt In1) rjust above + spline <- from A.In2 left 0.1 then down 0.1 left 0.1 + s_box(\tt In2) rjust below + arrow <- up 0.1 right 0.1 from A.N + s_box(\tt N) ljust above + arrow <- up 0.1 right 0.1 from A.E1 + s_box(\tt E1) ljust above + arrow <- up 0.1 right 0.1 from A.E + s_box(\tt E) ljust above + arrow <- down 0.1 right 0.1 from A.E2 + s_box(\tt E2) ljust below + arrow <- down 0.1 right 0.1 from A.S + s_box(\tt S) ljust below + arrow <- left 0.2 from A.W + s_box(\tt W) rjust + thicklines_ + Point_(15) + B: opamp(,,,,PR) with .sw at A.se+(0.65,0) + thinlines_ + s_box(`\tt Point\_(15); opam{}p(,{,},{,}PR)') at B.s-(0,0.20) + spline <- right arrowht up arrowht from B.V1 then right 0.1 + s_box(\tt V1) ljust + spline <- right arrowht down arrowht from B.V2 then right 0.1 + s_box(\tt V2) ljust + thicklines_ + Point_(90) + C: opamp with .sw at B.se+(1.05,0) + s_box(`\tt Point\_(90); opam{}p') at C.s-(0,0.35) + right_ + D: opamp(,,,,T) with .sw at C.se+(0.65,0) + s_box(`\tt opam{}p(,{,},{,}T)') at D.s-(0,0.20) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4 new file mode 100644 index 00000000000..fbda5cc2e7e --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Pconn.m4 @@ -0,0 +1,52 @@ +.PS +# `Pconn.m4' +cct_init + +P1: [ + C1: pconnex(,A) + thinlines_ + arrow <- left 0.2 from C1.H.w; `"\sl H"' rjust + thicklines_ + `"\tt pconnex(,A)"' at last [].s below + C2: pconnex(,AF) with .w at C1.e+(0.3,0) + thinlines_ + arrow <- right 0.2 up 0.1 from C2.H.e; `"\sl H"' ljust + N: box invis wid (C2.w.x-C1.e.x)/2 ht C1.N.ht \ + with .n at 0.5 between C1.ne and C2.nw "\sl N" + arrow from N.w to C1.N.e + arrow from N.e to C2.N.w + G: box invis wid N.wid ht N.ht with .n at (N,C1.N.s) "\sl G" + arrow from G.w to C1.G.e + arrow from G.e to C2.G.w + `"\tt (,AF)"' at last [].s below + C03: pconnex(,AC) with .w at C2.e+(0.2,0) + `"\tt (,AC)"' at last [].s below + C3: pconnex(,ACF) with .w at last [].e+(0.2,0) + `"\tt (,ACF)"' at last [].s below + + C5: pconnex(U,D) with .w at last [].e+(0.2,0) + `"\tt (U,D)"' at last [].s below + C6: pconnex(U,DF) with .w at last [].e+(0.2,0) + `"\tt (U,DF)"' at last [].s below + C7: pconnex(U,J) with .w at last [].e+(0.2,0) + `"\tt (U,J)"' at last [].s below + C8: pconnex(U,JF) with .w at last [].e+(0.2,0) + `"\tt (U,JF)"' at last [].s below + ] + +P2: [ + C4: pconnex(,P) + `"\tt (,P)"' at last [].s below + C11: pconnex(,PF) with .w at last [].e+(0.2,0) + `"\tt (,PF)"' at (C11,last "") below + C9: pconnex(,G) with .w at last [].e+(0.2,0) + `"\tt (,G)"' at last [].s below + C91: pconnex(,GF) with .w at last [].e+(0.2,0) + `"\tt (,GF)"' at last [].s below + C92: pconnex(L,GF) with .w at last [].e+(0.2,0) + `"\tt (L,GF)"' at last [].s below + C10: pconnex(,GC) with .w at last [].e + (0.2,0) + `"\tt (,GC)"' ht 11pt__ at last [].s below +] with .nw at P1.C1.sw + (0,-0.25) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/PushPull.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/PushPull.m4 index f0711033072..24669faf294 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/PushPull.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/PushPull.m4 @@ -30,38 +30,38 @@ define(`Xform21', { "3N200" at last [].n above } line from T1.L1.start to (T1.L1.start,Q2.G0) then to Q2.G0 - resistor(right_ dimen_ from T1.T); llabel(,\unit{330}{\ohm}); Tx:dot + resistor(right_ dimen_ from T1.T); llabel(,\SI{330}{\Omega}); Tx:dot { line right_ del*3/2; corner; ground(,,F) } dot(at (Tx,Q1.G0)) - capacitor(down_ to Tx,C); llabel(\unit{5.6}{\pico\farad}) + capacitor(down_ to Tx,C); llabel(\SI{5.6}{pF}) dot(at (Tx,Q2.G0)) - capacitor(up_ to Tx,C); rlabel(\unit{5.6}{\pico\farad}) + capacitor(up_ to Tx,C); rlabel(\SI{5.6}{pF}) for_(1,2,1, `dot(at Q`'m4x.S+(dimen_+del/2,0)) { resistor(down_ dimen_); G1:Here; { "$120$" at last [].nw rjust } - rlabel(,\ohm); dot; ground(,,F) } + rlabel(,\Omega\;); dot; ground(,,F) } line from Q`'m4x.S to (Here.x+dimen_*3/4,Q`'m4x.S.y); corner - capacitor(down_ to (Here,G1),C); rlabel(\raisebox{2pt}{1000},{\pico\farad}); + capacitor(down_ to (Here,G1),C); rlabel(\raisebox{2pt}{\num{1000}},\si{pF}); corner line left_ 2*dimen_*3/4; corner TG: dot(at (Here,Q`'m4x.S)) - capacitor(down_ to (Here,G1),C); rlabel(,,\unit{0.01}{\micro\farad}) + capacitor(down_ to (Here,G1),C); rlabel(,,\SI{0.01}{\micro F}) ') R: dot(at (Here.x+dimen_*2,(Q1.D.y+Q2.D.y)/2)) - dot(at (R,Q1.D)); capacitor(down_ to R,C); llabel(\unit{20}{\pico\farad}) - dot(at (R,Q2.D)); capacitor(up_ to R,C); llabel(\unit{20}{\pico\farad}) + dot(at (R,Q1.D)); capacitor(down_ to R,C); llabel(\SI{20}{pF}) + dot(at (R,Q2.D)); capacitor(up_ to R,C); llabel(\SI{20}{pF}) line right_ del*3/2 from R then down_ R.y-(Q1.S.y-dimen_); ground(,,F) Vc: dot(at (R+(dimen_,0),Q1.ne),,1); { "$+V_{\hbox{c}}$" rjust at Vc.w } dot(at (Vc,R)) - inductor(right_ dimen_,); llabel(,\unit{1}{\micro\henry}) + inductor(right_ dimen_,); llabel(,\SI{1}{\micro\henry}) down_ T2: Xform21 with .T at Here arrow from T2.L2 to T2.L3 chop -dimen_/4 line right_ del from T2.L3.start; corner - capacitor(down_ dimen_,C); llabel(\unit{1000}{\pico\farad}); ground(,T,F) + capacitor(down_ dimen_,C); llabel(\SI{1000}{pF}); ground(,T,F) line right_ 2*del from T2.L3.end Out: dot(,,1); { "IF" wid 12bp__ at Out.n above }; move right_ 0.3 @@ -70,38 +70,38 @@ define(`Xform21', line from Vc to (Vc,Q2.S) chop dotrad_/2 chop 0; dot { line right_ del*2; corner - capacitor(down_ dimen_,C); llabel(,,\unit{1000}{\pico\farad}); ground(,,F) } - reversed(`inductor',down_ dimen_,); rlabel(,\unit{1}{\micro\henry}) + capacitor(down_ dimen_,C); llabel(,,\SI{1000}{pF}); ground(,,F) } + reversed(`inductor',down_ dimen_,); rlabel(,\SI{1}{\micro\henry}) line down_ dimen_/2 TL: dot(at (Q1.G1.x-del/2,Here.y)) up_ Q3: bi_tr(,R,,E) with .C at (TG.x,TL.y-dimen_*2/3) - resistor(right_ from TL to (Q3.C,TL)); llabel(,\unit{82}{\kilo\ohm}) + resistor(right_ from TL to (Q3.C,TL)); llabel(,\SI{82}{\kilo\Omega}) line to (Vc,Here); dot - resistor(down_ to (Here,Q3.B)); rlabel(,\unit{8.2}{\kilo\ohm}); dot + resistor(down_ to (Here,Q3.B)); rlabel(,\SI{8.2}{\kilo\Omega}); dot dot(at Q3.B+(del,0)) line up_ (TL.y+Q3.C.y)/2 - Here.y+del/4 then left_ Here.x-TL.x - reversed(`capacitor',left_ dimen_,C); llabel(,\unit{1500}{\pico\farad}) + reversed(`capacitor',left_ dimen_,C); llabel(,\SI{1500}{pF}) Osc: dot(,,1); { "Osc" above at Osc.n } line from Q3.B to (Vc,Q3.B) line from Q3.C to (Q3.C,TL); dot dot(at Q3.C+(0,del/2)) - capacitor(left_ to (TL,Here),C); llabel(,\unit{1500}{\pico\farad}); dot + capacitor(left_ to (TL,Here),C); llabel(,\SI{1500}{pF}); dot line down_ del/2 from Q3.E; dot - { resistor(down_ dimen_*3/4); rlabel(,\unit{820}{\ohm}) + { resistor(down_ dimen_*3/4); rlabel(,\SI{820}{\Omega}) G: Here; ground(,T,F) } line right_ dimen_; corner - capacitor(down_ to (Here,G),C); llabel(,\unit{1000}{\pico\farad}) + capacitor(down_ to (Here,G),C); llabel(,\SI{1000}{pF}) ground(,T,F) ground(at (TL,G),T,F) - resistor(up_ dimen_); llabel(,\unit{12}{\kilo\ohm}) + resistor(up_ dimen_); llabel(,\SI{12}{\kilo\Omega}) line to (Here,Q1.G1) then to Q1.G1 line from Q2.G1 to (TL,Q2.G1); dot ground(at (Vc,G),T,F) - resistor(up_ dimen_); rlabel(,\unit{5.6}{\kilo\ohm}); line to (Here,Q3.B) + resistor(up_ dimen_); rlabel(,\SI{5.6}{\kilo\Omega}); line to (Here,Q3.B) iflatex(`ifpsfrag(,`latexcommand(})')') .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Relay.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Relay.m4 new file mode 100644 index 00000000000..20c51ebb6a2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Relay.m4 @@ -0,0 +1,44 @@ +.PS +# Relay +cct_init + +skip = 1.1 + +R1:relay + {"\sl V1" wid 0.16 rjust at last [].V1 + "\sl V2" ljust at last [].V2 + "\sl P1" rjust at last [].P1-(dotrad_,0) + "\sl O1" ljust at last [].O1 + "\sl C1" ljust at last [].C1 } + S: `"\tt relay"' at last [].s+(0,-0.2) + +R5:relay(2,CTh) with .sw at last [].sw+(skip,0) + { for_(1,2,1,` + "\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x ') } + `"\tt (2,CTh)"' at (last [],S) + +R4:relay(2,O) with .sw at last [].sw+(skip,0) + {for_(1,2,1,` + "\sl P1" rjust at last [].P1-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x ')} + `"\tt (2,O)"' at (last [],S) + +R3:relay(2,PIAX) with .sw at last [].sw+(skip,0) + {"\sl V1" rjust at last [].V1 + "\sl V2" rjust at last [].V2 + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x+(dotrad_,0) + "\sl C`'m4x" ljust at last [].C`'m4x+(dotrad_,-2pt__) ') } + `"\tt (2,PIAX)"' at (last [],S) + +R2:relay(2,R) with .sw at last [].sw+(skip,0) + {"\sl V1" rjust at last [].V1 + "\sl V2" ljust at last [].V2 + for_(1,2,1, + `"\sl P`'m4x" rjust at last [].P`'m4x-(dotrad_,0) + "\sl O`'m4x" ljust at last [].O`'m4x + "\sl C`'m4x" ljust at last [].C`'m4x ') } + `"\tt relay(2,R)"' at (last [],S) +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Schottky.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Schottky.m4 index 8cd98061e92..dea7da2b1a8 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Schottky.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Schottky.m4 @@ -8,7 +8,7 @@ E1: dot; line up_ tic Q1: bi_trans(,,dEBCBUS) with .E at Here; line left tic from Q1.B; B1: Here - resistor(up_ rlen from Q1.C); llabel(,\unit{3}{\kilo}) + resistor(up_ rlen from Q1.C); llabel(,\SI{3}{\kilo{}}) B2: dot; line right_ tic Q2: bi_trans(up_ dimen_,,dEBCBUS) with .B at Here line from Q2.E to (Q2.E,E1); dot @@ -16,7 +16,7 @@ Gnd: "GND" ljust at Here+(dimen_/2,0) dot(at Q2.C) { line to (Gnd,Here); "Y" ljust } line to (Q1.C,Here); dot - resistor(up_ rlen); llabel(,\unit{4}{\kilo}); B4: dot; line right_ tic; up_ + resistor(up_ rlen); llabel(,\SI{4}{\kilo{}}); B4: dot; line right_ tic; up_ Q4: bi_tr with .B at Here line from Q4.E to Q2.C line up_ tic from B4 @@ -26,17 +26,17 @@ Q5: bi_trans(,,dEBCBUS) with .E at Here; line left_ tic from Q5.B; B5: dot resistor(up_ rlen); llabel(,iflatex(120,"120")); dot Vcc: "Vcc" ljust at (Gnd,Here) dot(at (B5,Vcc)) - resistor(to (Here,Q5.C)); llabel(,\unit{8}{\kilo}) + resistor(to (Here,Q5.C)); llabel(,\SI{8}{\kilo{}}) diode(from (B4,Q2.C) to (B5,Q2.C),Z) line to (Here,Q5.C) diode(from B4 to (Here,B4),Z); dot line left_ tic; up_ Q3: bi_trans(,,dEBCBUS) with .C at Here; line left_ tic from Q3.B; B3: Here line from Q3.E to (Q3.E,B2); dot - dot(at (B1,Here)); resistor(down_ to (Here,Q1.C)); rlabel(,\unit{1.5}{\kilo}); line to B1 - resistor(down_ from B3 to (B3,B2)); rlabel(,\unit{12}{\kilo}); line to B2 + dot(at (B1,Here)); resistor(down_ to (Here,Q1.C)); rlabel(,\SI{1.5}{\kilo{}}); line to B1 + resistor(down_ from B3 to (B3,B2)); rlabel(,\SI{12}{\kilo{}}); line to B2 line from Vcc to (B3,Vcc); resistor(down_ to (Here,Q5.C)) - rlabel(,\unit{20}{\kilo}) + rlabel(,\SI{20}{\kilo{}}) line to B3 ground(at (Q3.C,Gnd),,F); dot diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ShiftR.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ShiftR.m4 new file mode 100644 index 00000000000..e7bf1f0c5c5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ShiftR.m4 @@ -0,0 +1,49 @@ +.PS +# ShiftR.m4 +log_init + + iflatex(`textoffset = 1bp__; ifpsfrag(,`latexcommand({\sf)') ') + +define(`lg_plen',3) + +define(`customFF',`FlipFlopX(wid 10*L_unit ht FF_ht*L_unit,, + :S;NE:CK;:R, N:PR, :Q;;ifelse(`$1',1,:lg_bartxt(Q)), N:CLR) ') + + F0: customFF(1) + + BUFFER_gate(,N) with .Out at F0.W1.end + line left 2*L_unit from last [].In1 + T: dot + reversed(`NOT_gate',left 10*L_unit) + Serial: "\scriptsize\shortstack[r]{SERIAL\\ INPUT}" rjust + line from T to (T,F0.W3) then to F0.W3.end + + NCLR: NOT_gate(right T.x-Serial.x from (Serial,F0.S1.end),N) + "$\overline{\hbox{\scriptsize CLEAR}}$" at NCLR.start rjust + + CLK: NOT_gate(right T.x-Serial.x from NCLR.start+(0,-BUF_ht*3/2*L_unit)) + "\scriptsize CLOCK" at CLK.start rjust + +for_(1,4,1,` + F`'m4x: customFF(eval(m4x!=4)) with .W3.end at F`'eval(m4x-1).E3.end + ') + + "\scriptsize OUTPUT" at F4.E1.end ljust + line from NCLR.end to F4.S1.end + + down_ +for_(0,4,1,` + line from F`'m4x.W2.end down F0.W2.y-CLK.y + ifelse(eval(m4x!=4),1,`dot',`line to CLK.end') + N`'m4x: NAND_gate with .Out at F`'m4x.N1.end + line up 2*L_unit from N`'m4x.In2 + { line up 6*L_unit from N`'m4x.In1 + "\scriptsize PR`'eval(4-m4x)" rjust } + ifelse(eval(m4x!=4),1, + `dot; dot(at F`'m4x.S1.end)', + `line to (Serial,Here) + "\scriptsize\shortstack[r]{PRESET\\ ENABLE}" wid 0.4 rjust ') + ') + + iflatex(ifpsfrag(,`latexcommand(})')) +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Sierpinski.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Sierpinski.m4 index 7fbf13bf15e..08d7fab1117 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Sierpinski.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Sierpinski.m4 @@ -13,7 +13,7 @@ gen_init } } - r = 4 + r = 3 linethick = 0.2 #linethick = 1/2 /(1pt__) lw = linethick pt__ /2 @@ -35,20 +35,20 @@ gen_init define CayleyGraph { if $3 > 0 then { { line to Here+(cosd($2),sind($2))*($1) - exec sprintf("CayleyGraph(%g,%g,%g);",0.5*($1),$2,$3-1); } + exec sprintf("CayleyGraph(%g,%g,%g);", ($1)/2, $2, $3-1); } { line to Here+(cosd($2+90),sind($2+90))*($1) - exec sprintf("CayleyGraph(%g,%g,%g);",0.5*($1),$2+90,$3-1); } + exec sprintf("CayleyGraph(%g,%g,%g);", ($1)/2, $2+90, $3-1); } { line to Here+(cosd($2-90),sind($2-90))*($1) - exec sprintf("CayleyGraph(%g,%g,%g);",0.5*($1),$2-90,$3-1); } + exec sprintf("CayleyGraph(%g,%g,%g);", ($1)/2, $2-90, $3-1); } } } size = 2 depth = 6 for t=0 to 270 by 90 do { - line from (0,0) to (cosd(t),sind(t)); + line from (0,0) to (cosd(t),sind(t))*size/2; { exec sprintf("CayleyGraph(%g,%g,%g);",size/4,t,depth); } } - ] with .sw at last [].se+(-0.25,0) + ] scaled 3/4 with .sw at last [].se+(-0.25,0) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m4 new file mode 100644 index 00000000000..a70cea11137 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Sources.m4 @@ -0,0 +1,56 @@ +.PS +# `Sources.m4' +cct_init +divert(-1) + +divert(0)dnl + +iflatex(`ifpsfrag(,`latexcommand({\sf)') ') + +movewid = 2pt__ +moveht = 0.275 +define(`NL',`; move down $1; right_') +{ + {source ; move ; "`source'" ljust} NL + {source(,I) ; move ; "`source(,I)'" ljust} NL + {source(,i) ; move ; "`source(,i)'" ljust} NL + {source(,V) ; move ; "`source(,V)'" ljust} NL + {source(,v) ; move ; "`source(,v)'" ljust} NL + {source(,SC) ; move ; "`source(,SC)'" ljust} NL + {source(,AC); move ; "`source(,AC)'" ljust} NL + {source(,X) ; move ; "`source(,X)'" ljust} NL + {source(,F) ; move ; "`source(,F)'" ljust} NL + {source(,G) ; move ; "`source(,G)'" ljust} NL + {source(,Q) ; move ; "`source(,Q)'" ljust} +} + move right_ 2.0 +{ + {source(,,0.4) ; move ; "`source(,{,}0.4)'" ljust} NL(0.35) + {source(,P) ; move ; "`source(,P)'" ljust} NL + {source(,U) ; move ; "`source(,U)'" ljust} NL + {source(,H) ; move ; "`source(,H)'" ljust} NL + {source(,R) ; move ; "`source(,R)'" ljust} NL + {source(,S) ; move ; "`source(,S)'" ljust} NL + {source(,SCr) ; move ; "`source(,SCr)'" ljust} NL + {source(,T) ; move ; "`source(,T)'" ljust} NL + {source(,L) ; move ; "`source(,L)'" ljust} NL + {source(,B) ; move ; "`source(,B)'" ljust} NL(moveht*0.8) + {nullator ; move ; "`nullator'" ljust} NL(moveht*0.6) + {norator ; move ; "`norator'" ljust} +} + move right_ 2.0 + {source(,N) ; move ; "`source(,N)'" ljust} NL + {source(,"\rm mA");move; "`source(,\"mA\")'" ljust} NL(0.31) +# {source(,"mA");move; "`source(,'" ljust \ +# "`\enskip \"mA\")'" ljust} NL(0.31) + {consource ; move ; "`consource'" ljust} NL(0.32) + {consource(,I) ; move ; "`consource(,I)'" ljust} NL(0.32) + {consource(,i) ; move ; "`consource(,i)'" ljust} NL(0.32) + {source(,SE) ; move ; "`source(,SE)'" ljust} NL + {consource(,V) ; move ; "`consource(,V)'" ljust} NL(0.32) + {consource(,v) ; move ; "`consource(,v)'" ljust} NL(0.3) + {battery ; move ; "`battery'" ljust} NL + {battery(,3,R) ; move ; "`battery(,3,R)'" ljust} + +iflatex(`ifpsfrag(,`latexcommand(})')') +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Switches.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Switches.m4 new file mode 100644 index 00000000000..d8262be92db --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Switches.m4 @@ -0,0 +1,117 @@ +.PS +# Switches.m4 +cct_init + +movewid = 0.25 +# Row 1 + right_; { + lswitch; {S:"\tt ls{}witch" at last [].s+(0,-10bp__)} + move right_ + lswitch(,,O); {"\tt (,,O)" at (last [],S)} + move right_ + lswitch(,,C); {"\tt (,,C)" at (last [],S)} + move right_ + lswitch(,,DA); {"\tt (,,DA)" at (last [],S)} + move right_ + lswitch(,,dDO); {"\tt (,,dDO)" at (last [],S)} + move right_ + lswitch(,,uDC); {"\tt (,,uDC)" at (last [],S)} + } +# Row 2 + move down; right_; { + lswitch(,,K); {S:"\tt (,,K)" at last [].s+(0,-10bp__)} + move right_ + lswitch(,,KD); {"\tt (,,KD)" at (last [],S)} + move right_ + lswitch(,,KOD); {"\tt (,,KOD)" at (last [],S)} + move right_ + lswitch(,,KCD); {"\tt (,,KCD)" at (last [],S)} + move right_ + bswitch; {"\tt `bswitch'" at (last [],S)} + move right_ + bswitch(,,C); {"\tt (,,C)" at (last [],S)} + } +# Row 3 + move down; right_; { + D: dswitch(,,); {S: "\tt ds{}witch(,{},)" at last [].s+(0,-10bp__)} + thinlines_ + { spline <- from 0.25 along_(D) up 0.1 then up 0.05 left 0.1 + {"\tt W" rjust} + spline <- from D.c+(0,m4sc*2) up 0.1 then up 0.05 left 0.1 + {"\tt B" rjust }} + thicklines_ + move right_ + D: dswitch(,,WdBK); {"\tt (,,WdBK)" at (last [],S)+(0,-4bp__)} + thinlines_ + { spline <- from tr_xy(0,-2) up 0.1 then up 0.10 left 0.1 + {"\tt dB" rjust} + spline <- from tr_xy(4,-2) right 0.1 then right 0.05 up 0.15 + {"\tt K" above }} + thicklines_ + move right_ + dswitch(,,WBmdDK); {"\tt (,,WBmdDK)" at (last [],S)} + move right_ + dswitch(,,WBKTr); {"\tt (,,WBKTr)" at (last [],S)} + move right_ + dswitch(,,WdBL); {"\tt (,,WdBL)" at (last [],S+(0,-4bp__))} + move right_ + dswitch(,,WBCo); {"\tt (,,WBCo)" at (last [],S)} + } +# Row 4 + move down; right_; { + dswitch(,,WBKCo); {S: "\tt (,,WBKCo)" at last [].s+(0,-10bp__)} + move right_ + dswitch(,,WBCb); {"\tt (,,WBCb)" at (last [],S)} + move right_ + dswitch(,,WBDI); {"\tt (,,WBDI)" at (last [],S)} + move right_ + dswitch(,,WBSd); {"\tt (,,WBSd)" at (last [],S)} + move right_ + dswitch(,,WBFDI); {"\tt (,,WBFDI)" at (last [],S)} + move right_ + dswitch(,,WBFSd); {"\tt (,,WBFSd)" at (last [],S)} + } +# Row 5 + move down moveht*5/4; right_; { + dswitch(,,WBTh); {S: "\tt (,,WBTh)" at last [].s+(0,-10bp__)} + move right_ + dswitch(,,WBKC); {"\tt (,,WBKC)" at (last [],S)} + move right_ + dswitch(,,WBM); {"\tt (,,WBM)" at (last [],S)} + move right_ + dswitch(,,WBCO); {"\tt (,,WBCO)" at (last [],S)} + move right_ + dswitch(,,WBMP); {"\tt (,,WBMP)" at (last [],S)} + move right_ + dswitch(,,WBoKCP); {"\tt (,,WBoKCP)" at (last [],S)} + } +# Row 6 + move down moveht*5/4; right_; { + dswitch(,,WBCY); {S: "\tt (,,WBCY)" at last [].s+(0,-10bp__)} + move right_ + dswitch(,,WBCZ); {"\tt (,,WBCZ)" at (last [],S)} + move right_ + dswitch(,,WBCE); {"\tt (,,WBCE)" at (last [],S)} + move right_ + dswitch(,,WBRH); {"\tt (,,WBRH)" at (last [],S)} + move right_ + dswitch(,,WBRdH); {"\tt (,,WBRdH)" at (last [],S)} + move right_ + dswitch(,,WBRHH); {"\tt (,,WBRHH)" at (last [],S)} + } +# Row 7 + move down; right_; { + dswitch(,,WBMMR); {S: "\tt (,,WBMMR)" at last [].s+(0,-10bp__)} + move right_ + dswitch(,,WBMM); {"\tt (,,WBMM)" at (last [],S)} + move right_ + dswitch(,,WBMR); {"\tt (,,WBMR)" at (last [],S)} + move right_ + dswitch(,,WBEL); {"\tt (,,WBEL)" at (last [],S)} + move right_ + dswitch(,,WBLE); {"\tt (,,WBLE)" at (last [],S)} + move right_ + dswitch(,,WBoKEL); {"\tt (,,WBoKEL)" at (last [],S)} + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Tgate.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Tgate.m4 new file mode 100644 index 00000000000..ff42cecb8de --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Tgate.m4 @@ -0,0 +1,50 @@ +.PS +# Tgate.m4 +cct_init +right_ + +[ { Q: tgate + "$A$" at Q.A rjust + "$B$" at Q.B ljust + "$G$" at Q.G ljust below + "$Gb$" at Q.Gb ljust above + `"\tt tgate"' at Q.A-(0.25,0) rjust + } + + move down_ linewid; right_ + { Q: tgate(,L) + "$A$" at Q.A rjust + "$B$" at Q.B ljust + "$G$" at Q.G ljust above + "$Gb$" at Q.Gb ljust below + `"\tt tgate(,L)"' wid 0.65 at Q.A-(0.25,0) rjust + } + ] + +[ { Q: tgate(,B) + "$A$" at Q.A rjust + "$B$" at Q.B ljust + "$G$" at Q.G ljust + `"\tt tgate(,B)"' at Q.G-(0,10bp__) below + } + ] with .Q.A at last [].Q.B+(0.5,linewid/2) + +[ { Q: ptrans + "$A$" at Q.A rjust + "$B$" at Q.B ljust + "$G$" at Q.G rjust below + "$Gb$" at Q.Gb rjust + `"\tt ptrans"' at Q.B+(0.25,0) ljust + } + + move down_ linewid; right_ + { Q: ptrans(,L) + "$A$" at Q.A rjust + "$B$" at Q.B ljust + "$G$" at Q.G ljust above + "$Gb$" at Q.Gb ljust below + `"\tt ptrans(,L)"' at Q.B+(0.25,0) ljust + } + ] with .Q.Gb at (last [].e.x+elen_/2+0.5,1st [].Q.Gb.y) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Timer.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Timer.m4 index 65fe8978471..a5db32c800b 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Timer.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Timer.m4 @@ -16,15 +16,15 @@ define(`ic555',`[Chip: box ht boxwid wid boxwid "555" define(`elen_',`linewid') Vs: dot down_ - variable(`resistor(,E); llabel(,1`\,'\hbox{M})') - resistor(,E); llabel(,100`\,'\hbox{k}) - capacitor(,E); llabel(220`\,'\mu) + variable(`resistor(,E); llabel(,\SI{1}{M})') + resistor(,E); llabel(,\SI{100}{\kilo{}}) + capacitor(,E); llabel(\SI{220}{\micro{}}) Zero: dot dot(at Vs+(elen_*4/3,0)) - resistor(,E); llabel(,33`\,'\hbox{k}) + resistor(,E); llabel(,\SI{33}{\kilo{}}) line to (Here,Zero) chop 0 chop elen_ -C2: capacitor; llabel(0.1`\,'\mu) +C2: capacitor; llabel(\SI{0.1}{\micro{}}) dot IC1: ic555 with .P7 at C2.start + (elen_,0) @@ -40,11 +40,11 @@ R: dot B: buzzer(,,C) with .In3 at Here line from B.In1 to (R,B.In1) reversed(`diode',to (Here,Vs),LE); "red" at last line.c+(elen_/2,0) - resistor(down_ elen_ from R,E); llabel(,470) + resistor(down_ elen_ from R,E); llabel(,\num{470}) diode(to (Here,Zero),LE); {"green" at last line.c+(elen_*2/3,0)} line to Zero chop 0 chop -elen_ line up_ (Vs.y-Here.y)/3 - battery(up_ (Vs.y-Here.y)/3); rlabel(,,9`\,'\hbox{V}) + battery(up_ (Vs.y-Here.y)/3); rlabel(,,\SI{9}{V}) switch(to (Here,Vs),,D) line to (R,Vs) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Tubediags.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Tubediags.m4 index f597ca1ae2d..e07336e4e36 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/Tubediags.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Tubediags.m4 @@ -24,7 +24,7 @@ Pot1: potentiometer(down_ dimen_*2,5) with .Start at Here line from Pot1.End left_ dimen_ battery(up_ to Ld,2) Tg: dot(at Pot1.T1) - source(right_ dimen_ from Pot1.T1,"\scriptsize $\mu$A") + source(right_ dimen_ from Pot1.T1,"\scriptsize \si{\mu A}") line right_ dimen_/3 Tr: triode with .G1.w at Here line from Tr.K1.sw to (Tr.K1.sw,Pot1.End); dot @@ -49,18 +49,6 @@ T: Here # Circuit of 25 W amplifier (adapted from F. Langford-Smith, "Radiotron # Designer's Handbook," fourth edition, Harrison, NJ, Radio Corporation # of America, 1952) -command " -\newcommand{\Amp}{\hbox{$\,$A}} -\newcommand{\Henry}{\hbox{$\,$H}} -\newcommand{\Volt}{\hbox{$\,$V}} -\newcommand{\Watt}{\hbox{$\,$W}} -\newcommand{\mA}{\hbox{$\,$mA}} -\renewcommand{\kilo}{\hbox{$\,$k}} -\renewcommand{\mega}{\hbox{$\,$M}} -\renewcommand{\micro}{\hbox{$\,\mu$}} -\renewcommand{\nano}{\hbox{$\,$n}} -\renewcommand{\pico}{\hbox{$\,$p}} -" define(`OutputXformer',`[ pushdef(`dimen_',dimen_*1.5) S1: inductor(up_ dimen_*.4,L,3,M) @@ -95,7 +83,7 @@ define(`PowerXformer',`[ pushdef(`dimen_',dimen_*1.5) [ Toprail: Here #{"Toprail"} - resistor(down_ dimen_); rlabel(,100\kilo) + resistor(down_ dimen_); rlabel(,\SI{100}{\kilo{}}) V1P: dot #{"V1P" rjust} line down_ dimen_*3/4 @@ -109,17 +97,17 @@ Rail1: dot RP: Here arrow <- right from (Here,Rail1) to Rail1 dot(at last arrow) - resistor(up_ 2nd last arrow.y-Here.y); llabel(,22\kilo); dot + resistor(up_ 2nd last arrow.y-Here.y); llabel(,\SI{22}{\kilo{}}); dot { move left_ dimen_ }; "Pickup" at RP below - capacitor(right_ dimen_ from V1P,C,R); llabel(,0.05\micro) - resistor(down_ dimen_); rlabel(,470\kilo) + capacitor(right_ dimen_ from V1P,C,R); llabel(,\SI{0.05}{\micro{}}) + resistor(down_ dimen_); rlabel(,\SI{470}{\kilo{}}) V1o: dot #{ "V1o" at V1o rjust } - resistor(down_ (Here.y-Rail1.y)/2); rlabel(,22\kilo) + resistor(down_ (Here.y-Rail1.y)/2); rlabel(,\SI{22}{\kilo{}}) dot - { capacitor(down_ Here.y-Rail1.y,C); rlabel(,0.01\micro); dot } + { capacitor(down_ Here.y-Rail1.y,C); rlabel(,\SI{0.01}{\micro{}}); dot } line right_ dimen_/2 -R47: resistor(down_ to (Here,Rail1)); llabel(,,4.7\mega) +R47: resistor(down_ to (Here,Rail1)); llabel(,,\SI{4.7}{\mega{}}) line to Rail1 Pot1: potentiometer(down_ dimen_,,0.5,dimen_*2/3) \ @@ -130,64 +118,64 @@ Pot1: potentiometer(down_ dimen_,,0.5,dimen_*2/3) \ Rail2: dot ground V2: triode(,E) with .G1.w at Pot1.T1; "6SL7" at V2.ne above - resistor(from Rail2 right_ V2.K1.e.x-Rail2.x); rlabel(,22\kilo); dot - { capacitor(right_ dimen_,C,R); rlabel(,2\nano) + resistor(from Rail2 right_ V2.K1.e.x-Rail2.x); rlabel(,\SI{22}{\kilo{}}); dot + { capacitor(right_ dimen_,C,R); rlabel(,\SI{2}{\nano{}}) V2k: dot } #{ "V2k" at V2k above } { line down_ to (Here,Rail1) - variable(`resistor(right_ dimen_); rlabel(,1\mega);') + variable(`resistor(right_ dimen_); rlabel(,\SI{1}{\mega{}});') line up_ to V2k } line to V2.K1.se line from Toprail to (R47,Toprail); dot - { capacitor(down_ dimen_,C); rlabel(10\micro); ground(,T) } - R51k: resistor(right_ dimen_); rlabel(,51\kilo); dot - { capacitor(down_ dimen_,C); llabel(10\micro); ground(,T) } + { capacitor(down_ dimen_,C); rlabel(\SI{10}{\micro{}}); ground(,T) } + R51k: resistor(right_ dimen_); rlabel(,\SI{51}{\kilo{}}); dot + { capacitor(down_ dimen_,C); llabel(\SI{10}{\micro{}}); ground(,T) } dot(at (V2.P1.c,Here)) - resistor(down_ dimen_); llabel(,100\kilo) + resistor(down_ dimen_); llabel(,\SI{100}{\kilo{}}) V2p: dot line to V2.P1 V3: triode(,W) with .G1.w at (V2k+(dimen_,0),V2.G1) "$\;$6SL7" at V3.n below ljust - resistor(from V3.K1.sw to (V3.K1.sw,Rail1)); llabel(,1.5\kilo); dot; ground + resistor(from V3.K1.sw to (V3.K1.sw,Rail1)); llabel(,\SI{1.5}{\kilo{}}); dot; ground line left_ dimen_/2 resistor(up_ to (Here,V3.G1)); llabel(2.2); rlabel(\hbox{M}); dot { line to V3.G1.w } - line to (Here,V2p); capacitor(left_ to V2p,C,R); rlabel(,3\nano) + line to (Here,V2p); capacitor(left_ to V2p,C,R); rlabel(,\SI{3}{\nano{}}) dot(at (V3.P1.c,Toprail)); { line to R51k.end } - resistor(down_ dimen_); llabel(,51\kilo) + resistor(down_ dimen_); llabel(,\SI{51}{\kilo{}}) V3p: dot #{"V3p"} line down_ (Here.y-V3.n.y)/2 V3q: dot; { line to V3.P1.c } - capacitor(left_ dimen_*2/3,C); rlabel(,0.1\micro) + capacitor(left_ dimen_*2/3,C); rlabel(,\SI{0.1}{\micro{}}) line to (V2k,Here) - resistor(down_ to V2k); rlabel(0.1); llabel(\mega) + resistor(down_ to V2k); rlabel(0.1); llabel(\si{\mega{}}) #{"V2k" at V2k} V4: triode(,E) with .G1.w at (V3.G1.e+(dimen_*2,0),V3.G1) "6SL7" at V4.n above rjust - resistor(from V4.K1.se to (V4.K1.se,Rail1)); rlabel(,,1.5\kilo) + resistor(from V4.K1.se to (V4.K1.se,Rail1)); rlabel(,,\SI{1.5}{\kilo{}}) V4k: dot #{"V4k"} line left dimen_*3/4 V4k1: dot - { resistor(up_ V4.G1.y-Here.y); llabel(,,2.2\mega) + { resistor(up_ V4.G1.y-Here.y); llabel(,,\SI{2.2}{\mega{}}) V4G: dot } line from V3p right_ dimen_ - variable(`resistor(down_ to (Here,V4.G1)); llabel(100\kilo)') + variable(`resistor(down_ to (Here,V4.G1)); llabel(\SI{100}{\kilo{}})') V3o: dot - capacitor(right_ to V4G,C); llabel(,3\nano) + capacitor(right_ to V4G,C); llabel(,\SI{3}{\nano{}}) line to V4.G1.w - resistor(left_ from V4k1 to (V3o,V4k)); rlabel(,51\kilo); dot + resistor(left_ from V4k1 to (V3o,V4k)); rlabel(,\SI{51}{\kilo{}}); dot ground - capacitor(down_ from V3o to Here,C); llabel(,,500\pico) + capacitor(down_ from V3o to Here,C); llabel(,,\SI{500}{\pico{}}) line from V4.P1.c to (V4.P1.c,V3p); - resistor(up_ dimen_); llabel(,51\kilo); dot - resistor(left_ to (V3p,Here)); llabel(,10\kilo) + resistor(up_ dimen_); llabel(,\SI{51}{\kilo{}}); dot + resistor(left_ to (V3p,Here)); llabel(,\SI{10}{\kilo{}}) V5: triode(,N) with .G1.w at V4.G1.e+(2.25*dimen_,0) "6SL7" at V5.n above rjust @@ -196,26 +184,26 @@ V6: triode(,SR) with .G1.w at V5.G1.w-(0,dimen_*2.5) V4p: dot(at (V4.P1.c,V3p)) #{"V4p"} - line right_ dimen_*2/3; capacitor(right_ dimen_,C); llabel(,3\pico) + line right_ dimen_*2/3; capacitor(right_ dimen_,C); llabel(,\SI{3}{\pico{}}) line down_ to (Here,V5.G1) V5G: dot; { line to V5.G1.w } #{"V5G"} - resistor(down_ dimen_); rlabel(,2.2); llabel(,\mega); dot - resistor(right_ to (V5.K1.sw,Here)); llabel(,1\kilo) + resistor(down_ dimen_); rlabel(,\num{2.2}); llabel(,\si{\mega{}}); dot + resistor(right_ to (V5.K1.sw,Here)); llabel(,\SI{1}{\kilo{}}) V5K: dot #{"V5K"} line to V5.K1.sw line from V4k down_ V4k.y-V6.G1.y then right_ V5G.x-V4k.x - dimen_ - capacitor(right_ dimen_,C); rlabel(,3\pico) + capacitor(right_ dimen_,C); rlabel(,\SI{3}{\pico{}}) V6G: dot; { line to V6.G1.w } #{"V6G"} - resistor(up_ dimen_); llabel(,2.2); rlabel(,\mega); dot - resistor(right_ to (V6.K1.nw,Here)); llabel(,1\kilo) + resistor(up_ dimen_); llabel(,2.2); rlabel(,\si{\mega{}}); dot + resistor(right_ to (V6.K1.nw,Here)); llabel(,\SI{1}{\kilo{}}) V6K: dot #{"V6K"} line to V6.K1.nw - resistor(left_ dimen_*2/3 from (V6G,V6K)); rlabel(,1\kilo) dot; ground - line to (Here,V5K); resistor(right_ dimen_*2/3); llabel(,1\kilo) + resistor(left_ dimen_*2/3 from (V6G,V6K));rlabel(,\SI{1}{\kilo{}}) dot; ground + line to (Here,V5K); resistor(right_ dimen_*2/3); llabel(,\SI{1}{\kilo{}}) PV: dot(at (V4.e.x+dimen_/5,Toprail.y)) #{"PV"} @@ -223,15 +211,15 @@ PV: dot(at (V4.e.x+dimen_/5,Toprail.y)) Rail2: dot #{"Rail2" below} line from PV to (PV,Rail2); corner - { resistor(right_ to Rail2); llabel(,220\kilo) } + { resistor(right_ to Rail2); llabel(,\SI{220}{\kilo{}}) } move up_ dimen_*2/3; dot; line left_ dimen_/2 V6sw: dot #{"V6sw"} - capacitor(down_ dimen_*2/3,C); rlabel(,10\micro); ground(,T) + capacitor(down_ dimen_*2/3,C); rlabel(,\SI{10}{\micro{}}); ground(,T) V5P: dot(at (V6.P1.c,V4p)); { line to V5.P1.c } #{"V5P"} - resistor(to (Here,Toprail)); rlabel(,220\kilo) + resistor(to (Here,Toprail)); rlabel(,\SI{220}{\kilo{}}) line to (V4p,Here) V7: V_6L6G at (V3,Rail2+(0,-2*dimen_)); "6L6G" at V7.n above ljust @@ -248,21 +236,22 @@ L910: line from V9G to (V9G,V10.G2); dot line left_ dimen_/2 from V7.G1.w V7G: dot #{"V7G"} - resistor(down_ to 0.5 between Here and (Here,V10.G1)); rlabel(,220\kilo) + resistor(down_ to 0.5 between Here and (Here,V10.G1)) + rlabel(,\SI{220}{\kilo{}}) V7T: dot #{"V7T"} { line left_ dimen_/3; corner; ground } line from V8.G1.w to (V7G,V8.G1); dot - resistor(up_ to V7T); llabel(,220\kilo) + resistor(up_ to V7T); llabel(,\SI{220}{\kilo{}}) line from V9.K1.sw to V10.K1.nw line from V7.K1.sw to V8.K1.nw V7K: dot(at last line.c+(0,dimen_/8)) #{"V7K"} line left_ dimen_*2; dot - { capacitor(down_ dimen_/2,C); llabel(,50\micro); ground(,T) } + { capacitor(down_ dimen_/2,C); llabel(,\SI{50}{\micro{}}); ground(,T) } PP: potentiometer(left_ dimen_,,0.5,dimen_/2) with .Start at Here - rlabel(,50\ 10\Watt) + rlabel(,50\ \SI{10}{W}) corner(,at PP.T1); line left_ dimen_ then up_ dimen_/4 round(,tubethick) line thick tubethick up tubeplatelen/3 left tubeplatelen*2/9 @@ -294,16 +283,16 @@ V10P: dot line from V7.P1.c up_ V9P.y-V7.P1.y then to V9P resistor(right_ to (V5.e+(dimen_/4,0),Here)) - rlabel(,\shortstack{100\kilo\\2\Watt}) + rlabel(,\shortstack{\SI{100}{\kilo{}}\\ \SI{2}{W}}) Rt1: Here line to (Here,V6.e)+(0,dimen_/6); resistor(up_ dimen_) - llabel(,\shortstack{100\kilo\\2\Watt}) + llabel(,\shortstack{\SI{100}{\kilo{}}\\ \SI{2}{W}}) line to (Here,V5K) then to V5K line from V8.P1.c down_ V8.P1.y-V10P.y then to V10P resistor(right_ to (V6.e+(dimen_/2,0),Here)) - llabel(,\shortstack{100\kilo\\2\Watt}) + llabel(,\shortstack{\SI{100}{\kilo{}}\\ \SI{2}{W}}) resistor(up_ dimen_*3/2) - llabel(,\shortstack{100\kilo\\2\Watt}) + llabel(,\shortstack{\SI{100}{\kilo{}}\\ \SI{2}{W}}) line to (Here,V6K) then to V6K line from V9T to (V9.e+(dimen_*3/4,0),V9T) @@ -313,27 +302,27 @@ Xout: OutputXformer with .PT at Here line from Xout.PT left_ dimen_/4 XT: dot - resistor(from V6sw left_ dimen_); rlabel(,10\kilo) + resistor(from V6sw left_ dimen_); rlabel(,\SI{10}{\kilo{}}) XP: dot { line down_ dimen_; continue to (XT,Here) then to XT } - capacitor(right_ dimen_*5/4 from V5P,C); llabel(,0.1\micro) + capacitor(right_ dimen_*5/4 from V5P,C); llabel(,\SI{0.1}{\micro{}}) corner; line to (Here,Rail2)-(0,dimen_/2) continue to (V7nw,Here) then to V7nw line from V8sw down_ dimen_*5/8 continue to (Rail2,Here) then to (Rail2,V9.n) - capacitor(up_ dimen_/2,C,R); rlabel(,0.1\micro) + capacitor(up_ dimen_/2,C,R); rlabel(,\SI{0.1}{\micro{}}) line to Rail2 line from XP left_ dimen_*2; dot { dot(at Here+(dimen_,0)) { "290 V" at last [].n above } R100: resistor(down_ dimen_*2/3) - llabel(,\shortstack{100\kilo\\2\Watt}); dot; ground } - { capacitor(down_ dimen_*2/3,C); llabel(,40\micro); dot } - reversed(`inductor',left_ dimen_,L,,M); rlabel(,4\Henry\; 300\mA) + llabel(,\shortstack{\SI{100}{\kilo{}}\\ \SI{2}{W}}); dot; ground } + { capacitor(down_ dimen_*2/3,C); llabel(,\SI{40}{\micro{}}); dot } + reversed(`inductor',left_ dimen_,L,,M); rlabel(,\SI{4}{H}\; \SI{300}{\mA}) Filt: dot - { capacitor(down_ dimen_*2/3,C); llabel(,40\micro) + { capacitor(down_ dimen_*2/3,C); llabel(,\SI{40}{\micro{}}) line to R100.end } Pwr: [ @@ -363,8 +352,8 @@ PO: dot line right_ dimen_/8 then up last [].y - Here.y then to last [].w arrow from PXform.S3.start right_ dimen_ arrow from PXform.S3.end right_ dimen_ - "5\Volt" at PXform.S2 + (dimen_*3/4,0) - "6.3\Volt" at 0.5 between last arrow.end and 2nd last arrow.end ljust + "\SI{5}{V}" at PXform.S2 + (dimen_*3/4,0) + "\SI{6.3}{V}" at 0.5 between last arrow.end and 2nd last arrow.end ljust ] with .nw at (RP,Filt)+(0,dimen_/4) line from Pwr.PXform.S2.start to Pwr.PO + (dimen_*3/4,0); corner resistor(up_ to (Here,Filt)); rlabel(,\shortstack{V\\\hbox{adj}}); corner diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Variable.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Variable.m4 new file mode 100644 index 00000000000..6fac01e1648 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Variable.m4 @@ -0,0 +1,28 @@ +.PS +# `Variable.m4' +cct_init + +define(`elen_',dimen_); down_ +[ { variable(`capacitor') }; move right + { variable(`resistor',uN) }; move right + { variable(`capacitor(,C)') }; move right + { variable(`inductor') }; move right + { variable(`inductor(,W)') } + ] +[ + skp = 0.4 + hskip = linewid*0.5 + cskip = hskip +Orig: Here + { move right cskip+elen_+hskip + line invis right_ elen_ "\tt C"; move right_ hskip + line invis right_ elen_ "\tt S" } + Loopover_(`char', + `move down skp ifelse(char,A,*0.5) + { line invis right_ cskip "\tt char" + variable(`capacitor(,C)',char); move right_ hskip + variable(`capacitor(,C)',char`'C); move right_ hskip + variable(`capacitor(,C)',char`'S) }', + A,P,L,N) + ] with .w at last [].e+(0.4,0) +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Windings.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Windings.m4 new file mode 100644 index 00000000000..0c1ff4b87b7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Windings.m4 @@ -0,0 +1,113 @@ +.PS +cct_init +# Windings.m4 + ifelse(xtract(m4postprocessor,pstricks,pgf,mpost,pdf,postscript,svg),, + `print " + `pstricks, pgf, mpost, pdf, postscript, or svg required for Windings.m4'" + "`pstricks, pgf, mpost, pdf, postscript, or svg required for Windings.m4'"', +` + s_init(Windings) + ifdef(`Windings_1',,`sinclude(FWindings.dim)') + sinclude(Circuit_macros.dim) + ifdef(`Windings_1',,`sinclude(tst.dim)') + +define(`vlight',`rgbstring(0.9,0.9,0.9)') +define(`lightgray',`rgbstring(0.7,0.7,0.7)') + +[ W: winding ] + s_box(\tt w{}inding) at last [].s below + +[ winding(R) ] with .n at last "".s+(0,-0.1) + s_box(\tt w{}inding(R)) at last [].s below + +[ sk = 0.75 + d = 1.5*sk + p = 0.4*sk + w = 1*sk + +W: winding(L,d,p,4,w,vlight) + +thinlines_ + dimension_(from W.nw+(p/4,0) right p,0.1,s_box(\tt pitch\strut) above,W) + dimension_(from W.sw to W.nw,0.2,s_box(\tt diam),H) + dimension_(from W.e+(-p/2,-w/2) up w,-0.3,,s_ht) + s_box(\tt\hfill core wid) at W.e ljust + arrow <- up d-w+0.1 left d/10 from W.ne+(-p/2,-(d-w)) + s_box(\tt core color) at Here+(-0.2,0) ljust above +thicklines_ +] with .sw at last [].se+(0.25,0) + "\tt T1" at last [].W.T1 below + "\tt T2" at last [].W.T2 below + +[ +#`winding(L|R, diam, pitch, nturns, core wid, core color )' +boxwid = 0.3 +boxht = 0.4 + down_ +B1: box + winding(,boxwid*1.3,boxht/5,3,boxwid) at B1 + "Left pins" "cw" at B1.s+(0,-0.15) + for_(1,2,1,`"\sl\small T`'m4x" at last [].T`'m4x rjust') +B2: box at B1.e + (0.5,0) + winding(R,boxwid*1.3,boxht/5,3,boxwid) at B2 + "Left pins" "ccw" at B2.s+(0,-0.15) + for_(1,2,1,`"\sl\small T`'m4x" at last [].T`'m4x rjust') + up_ +B3: box at B1.s + (0,-0.55) + winding(,boxwid*1.3,boxht/5,3,boxwid) at B3 + "Right pins" "cw" at B3.s+(0,-0.15) + for_(1,2,1,`"\sl\small T`'m4x" at last [].T`'m4x ljust') +B4: box at (B2,B3) + winding(R,boxwid*1.3,boxht/5,3,boxwid) at B4 + "Right pins" "ccw" at B4.s+(0,-0.15) + for_(1,2,1,`"\sl\small T`'m4x" at last [].T`'m4x ljust') +] with .sw at last [].se+(0.1,0) + +[ + Q: box invis ht 1 wid 5/4 + g = Q.wid/12 + ironwid = Q.wid/4.5 + + line thick ironwid/(1bp__)+linethick from Q.n+(g/2-linethick/2 bp__,0) \ + to Q.ne then to Q.se then to Q.sw then to Q.nw \ + then to Q.n+(-g/2+linethick/2 bp__,0) + ifmpost(`rgbdraw(0.7,0.7,0.7,') + line thick ironwid/(1bp__)-linethick outlined lightgray \ + from Q.n+(g/2+linethick/2 bp__,0) \ + to Q.ne then to Q.se then to Q.sw then to Q.nw \ + then to Q.n+(-g/2-linethick/2 bp__,0) + ifmpost(`)') + +thinlines_ + dimension_(from Q.n+(-g/2,-ironwid/2) right g,-ironwid/4, + "$g$" below,1,2pt__) +thicklines_ + + down_ + P: winding(R,ironwid*5/4,ironwid/2,4,ironwid,lightgray) at Q.w + line left ironwid*2/3 from P.T1 + arrow right to P.T1 "$i_1$" above + line left ironwid*2/3 from P.T2 + gap(up_ to 2nd last line.end) + llabel(-,s_box($v_1$),+) + "$N_1$" at P.e ljust + + up_ + S: winding(L,ironwid*5/4,ironwid/2,4,ironwid,lightgray) at Q.e + line right ironwid*2/3 from S.T2 + arrow left to S.T2 "$i_2$" above + line right ironwid*2/3 from S.T1 + gap(up_ to 2nd last line.end) + rlabel(-,s_box($v_2$),+) + "$N_2$" at S.w rjust + + box dashed rad ironwid/4 wid Q.wid ht Q.ht at Q + arrow right arrowht from 0.5 between Q.n and Q.ne + "$\phi$" ljust at Here+(0,5pt__) + + move up ironwid/2 from Q.n + move down ironwid/2 from Q.s +] with .sw at last [].se+(0.15,0) + +') +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/Xform.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/Xform.m4 new file mode 100644 index 00000000000..697d87fafa8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/Xform.m4 @@ -0,0 +1,39 @@ +.PS +# `Xform.m4' +cct_init + +divert(-1) +define(`trlabels', + `{ thinlines_ + ifelse(`$1',R, + `arrow from `$3'.P1 <- right 0.12 up 0.072 chop 1pt__ ; "\sl P1" ljust + arrow from `$3'.P2 <- right 0.12 down 0.072 chop 1pt__ ; "\sl P2" ljust + arrow from `$3'.TP <- right 0.12 chop 1pt__ ; "\sl TP" wid 0.2 ljust + arrow from `$3'.S1 <- left 0.12 up 0.072 chop 1pt__ ; "\sl S1" rjust + arrow from `$3'.S2 <- left 0.12 down 0.072 chop 1pt__ ; "\sl S2" rjust + arrow from `$3'.TS <- left 0.12 chop 1pt__ ; "\sl TS" rjust + ',` + arrow from `$3'.P1 <- left 0.12 up 0.072 chop 1pt__ ; "\sl P1" rjust + arrow from `$3'.P2 <- left 0.12 down 0.072 chop 1pt__ ; "\sl P2" rjust + arrow from `$3'.TP <- left 0.12 chop 1pt__ ; "\sl TP" wid 0.2 rjust + arrow from `$3'.S1 <- right 0.12 up 0.072 chop 1pt__ ; "\sl S1" ljust + arrow from `$3'.S2 <- right 0.12 down 0.072 chop 1pt__ ; "\sl S2" ljust + arrow from `$3'.TS <- right 0.12 chop 1pt__ ; "\sl TS" ljust + ') + `"'\tt `$2'`"' at `$3'.s+(0,-(`$4')) + thicklines_ } ') +divert(0)dnl + + down_ + T1: transformer + trlabels(,`transformer',T1,0.3) + T2: transformer(down_ 0.6,,2,P,8) with .w at T1.e+(1,0) + trlabels(,`...(down\_ 0.6,,2,P,8)',T2,0.3) + T3: transformer(,,8,WD12,4) with .w at T2.e+(1,0) + trlabels(,`...(,,8,WD12,4)',T3,0.21) + T4: transformer(,,9,AL) with .sw at T3.se+(1,0) + trlabels(,`...(,,9,AL)',T4,0.3) + T5: transformer(,R,8,AW) with .sw at T4.se+(1,0) + trlabels(R,`...(,R,8,AW)',T5,0.3) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/darrows.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/darrows.m4 deleted file mode 100644 index 07c5bfaf228..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/darrows.m4 +++ /dev/null @@ -1,61 +0,0 @@ -.PS -# darrows.m4 -darrow_init - -[ -line thick 0.4 outlined "lightgray" down_ 6 -line thick 0.4 outlined "lightgray" down_ 6 from last line.start+(1,0) -move to 1st line.start -right_ - -linethick = 5 -define(`dlthick',0.25) -linewid = 1 - - { darrow() } -move down 0.4; right_; { darrow(,t) } -move down 0.4; right_; { darrow(,,t) } -move down 0.4; right_; { darrow(,t,t) } -move down 0.4; right_; { darrow(,,,,,,|-) } -move down 0.4; right_; { darrow(,,,,,,!-) } -move down 0.4; right_; { darrow(,,,,,,<-) } -move down 0.4; right_; { darrow(,t,,,,,<-) } -move down 0.4; right_; { darrow(,,t,,,,<-) } -move down 0.4; right_; { darrow(,t,t,,,,<-) } -move down 0.4; right_; { darrow(,,,,,,<-|) } -move down 0.4; right_; { darrow(,,,,,,<-!) } -move down 0.4; right_; { darrow(,,,,,,<->) } -move down 0.4; right_; { darrow(,t,,,,,<->) } -move down 0.4; right_; { darrow(,,t,,,,<->) } -move down 0.4; right_; { darrow(,t,t,,,,<->) } -] - -[ -line thick 0.4 outlined "lightgray" down_ 6 -line thick 0.4 outlined "lightgray" down_ 6 from last line.start+(1,0) -move to 1st line.start -right_ - -linethick = 5 -define(`dlthick',0.25) -linewid = 1 - - { Darrow() } -move down 0.4; right_; { Darrow(,S) } -move down 0.4; right_; { Darrow(,E) } -move down 0.4; right_; { Darrow(,S;E) } -move down 0.4; right_; { Darrow(,ends=|-) } -move down 0.4; right_; { Darrow(,ends=!-) } -move down 0.4; right_; { Darrow(,ends=<-) } -move down 0.4; right_; { Darrow(,S;ends=<-) } -move down 0.4; right_; { Darrow(,E;ends=<-) } -move down 0.4; right_; { Darrow(,S;E;ends=<-) } -move down 0.4; right_; { Darrow(,ends=<-|) } -move down 0.4; right_; { Darrow(,ends=<-!) } -move down 0.4; right_; { Darrow(,ends=<->) } -move down 0.4; right_; { Darrow(,S;ends=<->) } -move down 0.4; right_; { Darrow(,E;ends=<->) } -move down 0.4; right_; { Darrow(,S;E;ends=<->) } -] with .nw at last [].ne+(0.5,0) - -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex01.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex01.m4 index c72185cb00b..a5bcef47abd 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex01.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex01.m4 @@ -11,7 +11,7 @@ cct_init resistor; llabel(,47\`,'\Omega,); b_current(i_R\strut,above rjust) line right_ elen_/2 then down_ del - parallel_(`inductor(,W); llabel(,L,); b_current(i_L)', + parallel_(`inductor(,W); llabel(,L,); b_current(\>`'i_L)', `capacitor(,C); rlabel(+,v_C,-); llabel(,,\;C)') line to (Here,Vin.start) then to Vin.start diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex02.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex02.m4 index 2e5c2a6cb55..2265c1e3170 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex02.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex02.m4 @@ -1,6 +1,7 @@ .PS # ex02.m4 cct_init +linewid = linewid*4/5 [ [ diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex07.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex07.m4 deleted file mode 100644 index 56dfa7c198f..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex07.m4 +++ /dev/null @@ -1,69 +0,0 @@ -.PS -# ex07.m4 -gen_init -Barrel: box invis ht 0.4 wid 1.5 - up -Face: arc rad 2.6 from Barrel.e+(2.4,-1.7/2) to Barrel.e+(2.4,1.7/2) - - eps = 0.03 - arc ccw rad 2.6 from Face.start-(eps,0) to Face.end-(eps,0) \ - with .c at Face.c-(eps,0) - line from Barrel.nw to Barrel.ne then to Face.end - line from Barrel.sw to Barrel.se then to Face.start - arc cw from Barrel.sw to Barrel.nw rad Barrel.ht*1.2 - -Cathode: Barrel.w+(0.3,0) -Term: Barrel.w+(-0.25,0) - dcath = 0.13 - dan = 0.12 - - line from Cathode up dcath/2 left dcath/2 then to Term.x,Cathode.y+dcath/2 - dot - line from Cathode down dcath/2 left dcath/2 then to Term.x,Cathode.y-dcath/2 - dot - - hole = 0.06 -Hole: line invis up hole from Cathode+(0.5,-hole/2) - line from Hole.end up dan-hole/2 then to Term.x,Cathode.y+dan; dot - line from Hole.start down dan-hole/2 then to Term.x,Cathode.y-dan; dot - - platewid = 0.25 - platesep = 0.15 -Plates: box invis wid platewid ht platesep at Barrel.e+(-platewid/2,0) - line right platewid from Plates.nw - line right platewid from Plates.sw - line up 0.3 from Plates.n - line down 0.3 from Plates.s - -linethick_(1.4) -psset_(linecolor=gray) - - move to Cathode+(0.03,0) -Spot: 0.9<Face.start,Face.end> - arcto(Plates.c,Spot,(Plates.c.x-Cathode.x)*0.90) - line to Spot chop 0 chop -0.02 - -psset_(linecolor=black) -thinlines_ - - arrow <- from Cathode+(0.2,0.06) up 0.5 left 0.3 - "{\sl electron}" above "{\sl gun}" above - - arrow <- from Plates.nw+(0,0.06) up 0.5 left 0.3 - "{\sl deflection}" above "{\sl plates}" above - - arrow <- from 0.5<Plates.e,Spot>+(0,0.06) up 0.5 left 0.3 - "{\sl electron beam}" at Here+(-0.3,0) above - - spline <- from 1.015<Plates.e,Spot> right 0.1 up 0.1 then up 0.1 \ - then up 0.1 left 0.1 - "{\sl spot of light}sp_" rjust - - "{\sl vacuum}sp_" at 0.5<Face.start,Face.end>+(-0.4,0) rjust - - arrow <- from Face.start+(0.1,0.5) left 0.6*1.4 down 0.3*1.4 - "{\sl phosphor coating}sp_" rjust - - arrow <- from 0.2<Barrel.se,Face.start> left 0.6 down 0.3 - "{\sl glass enclosure (tube)}sp_" rjust -.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex18.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex18.m4 index 201e8fee622..58fd24331a0 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/ex18.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ex18.m4 @@ -27,7 +27,7 @@ define(`dimen_',dimen_*1.25) B: battery(up_ dimen_*2/3); rlabel(,V^o) move down dimen_/4 resistor(up_ dimen_); rlabel(,R,) - inductor(right_ elen_); b_current(i); rlabel(,L) + inductor(right_ elen_); b_current(i\mathstrut); rlabel(,L) { capacitor(down_ to (Here,B.start)); rlabel(,C); llabel(+,v,-) } line right_ dimen_ diode(down_ to (Here,B.start),T); b_current(h(v)) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf Binary files differindex fc47a4f9f95..2f31b4f0309 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.pdf diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex index 6ab8d803150..0e483fa0944 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/examples.tex @@ -8,7 +8,7 @@ \usepackage{graphicx} \usepackage{boxdims} \usepackage{upgreek} -\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} +\usepackage{siunitx} \usepackage{amssymb} \input header @@ -25,10 +25,56 @@ using m4 circuit macros and others, and gpic or dpic. In some cases there are other or better m4 or pic constructs for producing the same drawings, but the source-file names are shown for reference. - Most of the examples can be processed using either dpic~-p or gpic~-t, - but the possibility of other postprocessing has meant that sometimes - the source is slightly more complicated than it would be if only - one workflow had been assumed. The most simplicity and elegance is - achieved by sticking to one pic interpreter and one postprocessor. + Most of the examples can be processed using either dpic~-p, dpic~-g, + or gpic~-t, but the possibility of other postprocessing has meant that + sometimes the source is slightly more complicated than it would be if + only one workflow had been assumed. The most simplicity and elegance + is achieved by sticking to one pic interpreter and one postprocessor. + + A few of these examples are also found in the manual + Circuit\_macros.pdf. There are other examples in the examples directory + that are not included in this document. To process {\sl file}.m4, type, for + example, "make {\sl file}.pdf." + +% The tables of elements attempt to illustrate each macro option +% at least once but the number of option combinations is huge so these +% examples are not exhaustive. + + A few of the examples following the circuits test some of the boundaries + of what macros and the pic language can do. \input files +\endinput + +Other examples currently: +Ball.m4 +birds.m4 +Blogix.m4 +brace.m4 +Ccurve.m4 +chaos.m4 +Chuck.m4 +clock.m4 +Cruller.m4 +debug2.m4 +Escher.m4 +Euro.m4 +Floor.m4 +IC10107.m4 +keyval.m4 +Koch.m4 +OpAmpFilter.m4 +Orbits.m4 +person.m4 +Planes.m4 +PPA.m4 +Resolver.m4 +rotatetext.m4 +rotellipse.m4 +Shaky.m4 +snake.m4 +SPM.m4 +squiggle.m4 +Wheat.m4 +Zcos.m4 + diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/fet.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/fet.m4 new file mode 100644 index 00000000000..08498ef83d8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/fet.m4 @@ -0,0 +1,170 @@ +.PS +# `fet.m4' +cct_init + +dwn = 0.9 +dwn = 1.0 +rgt = 0.9 +textht = 0.1 + +dnl `IRF4905(linespec,R)' +define(`IRF4905', + `[ ifelse(`$1',,,`eleminit_(`$1')') + Q: mosfet(,`$2',dMdPzEDSQdB,) ifelse(`$1',,` + S: Q.tr_xy(-4,-2); line from Q.tr_xy(-2,-2) to S + D: Q.tr_xy( 4,-2); line from Q.tr_xy(2,-2) to D', + `with .Diode.c at last line.c + S: last line.start; D: last line.end; line from S to D ') + G: Q.G + circle rad 5*dimen_/10 at Q.tr_xy(0,1) ]') + +define(`rmove',0.75) +define(`dir_',`right_') + +Orig: Here +dir_ + { move left 0.2 } + {J: j_fet(right_ dimen_,,,E) + "{\tt j\_fet(right\_ dimen\_,{,},E)}" wid 1.75 \ + with .nw at last [].sw+(0.0,-0.25) + "$G$" at last [].G rjust above + "$S$" at last [].S rjust + "$D$" at last [].D ljust + } + + move right_ 0.9; dir_ + {j_fet(,,P,) + "{\tt j\_fet(,{,}P,)}" at last [].s+(0,-0.05) below + "$G$" at last [].G rjust + "$S$" at last [].S rjust + "$D$" at last [].D ljust + } + + move right_ 0.9; dir_ + {e_fet(,R,,) + "{\tt e\_fet(,R,{,})}" at last [].s+(0,-0.05) below + "$G$" at last [].G rjust + "$S$" at last [].S rjust + "$D$" at last [].D ljust + } + + {move down_ dwn; dir_ + e_fet(,,P) + "{\tt e\_fet(,{,}P)}" at last [].s+(0.1,-0.2) below} + + move right_ 0.9; dir_ + {d_fet(,,,) + "{\tt d\_fet(,{,},)}" at last [].s+(0,-0.05) below} + + {move down_ dwn; dir_ + d_fet(,,P) + "{\tt d\_fet(,{,}P)}" at last [].s+(0,-0.05) below} + + move right_ 0.9; dir_ + {e_fet(,,,S) + "{\tt e\_fet(,{,},S)}" at last [].s+(0,-0.05) below} + + {move down_ dwn; dir_ + e_fet(,,P,S) + "{\tt e\_fet(,{,}P,S)}" at last [].s+(0,-0.2) below} + + move right_ 0.9; dir_ + {d_fet(,,,S) + "{\tt d\_fet(,{,},S)}" at last [].s+(0,-0.2) below} + + {move down_ dwn; dir_ + d_fet(,,P,S) + "{\tt d\_fet(,{,}P,S)}" at last [].s+(0,-0.05) below} + + move right_ 0.9; dir_ + {c_fet(,,,) + "{\tt `c\_fet'(,{,},)}" at last [].s+(0,-0.05) below} + + {move down_ dwn; dir_ + c_fet(,,P) + "{\tt `c\_fet'(,{,}P)}" at last [].s+(0,-0.2) below} + +move down 1; right_ + [ + linewid = linewid*1.2 + + Q1: mosfet(,,dGSDF,) + {"\tt `mosfet'(,{,}dGSDF,)" wid 1.25 \ + with .nw at last [].sw+(-0.2,-0.05) + thinlines_ + arrow <- down .05 left .15 from (Q1.G.x,Q1.G.y-0.05) + "\tt dG" rjust + arrow <- down .10 left .30 from Q1.Channel.start+(.15,0) + "\tt F" rjust + arrow <- down .05 left .15 from (Q1.S.x,Q1.S.y+0.05) + "\tt S" rjust + arrow <- down .05 right .15 from (Q1.D.x,Q1.D.y+0.05) + "\tt D" ljust + thicklines_ } + + move right_ rmove + Q2: mosfet(,,uHSDF,) + {"\tt `$\ldots$'(,{,}uHSDF,)" at last [].s+(0,-0.15) below + thinlines_ + arrow <- down .05 left .15 from (Q2.G.x,Q2.G.y-0.05) + "\tt uH" rjust + thicklines_ } + + move right_ rmove + Q3: mosfet(,,dMEDSQuB,) + {"\tt `$\ldots$'(,{,}dMEDSQuB,)" at last [].s+(0,-0.05) below + thinlines_ + arrow <- down .05 left .15 from (Q3.G.x,Q3.G.y-0.05) + "\tt dM" rjust + arrow <- down .13 left .30 from Q3.Channel.start+(.12,0) + "\tt E" rjust + arrow <- down .05 left .10 from Q3.S+(.06,0) + "\tt Q" rjust + arrow <- down .08 right .24 from (Q3.B.x,Q3.B.y+0.175) + "\tt uB" ljust + thicklines_ } + + move right_ rmove + Q4: mosfet(,,uMEDSuB) + {`"{\tt $\ldots$(,{,}uMEDSuB)}"' at last [].s+(0,-0.15) below + "$G$" at last [].G rjust + "$S$" at last [].S rjust + "$D$" at last [].D ljust + "$B$" at last [].B below + } + + move right_ rmove + Q5: mosfet(,,ZSDFdT,) + {"\tt `$\ldots$'(,{,}ZSDFdT,)" at last [].s+(0,-0.05) below + thinlines_ + arrow <- down .08 left .08 from (Q5.S.x,Q5.S.y+0.12) + "\tt Z" rjust + arrow from last arrow.end to Q5.Channel.c+(0.05,0) + arrow from last arrow.start to (Q5.D.x,Q5.D.y+.05) + arrow <- down .08 right .24 from (Q5.G.x,Q5.G.y-0.02) + "\tt dT" ljust + thicklines_ } + + move right_ rmove + up_ + Q6: IRF4905 with .c at Here + {`"\tt IRF4905"' at Q6.s+(0,-0.15) below + "$G$" at Q6.G rjust + "$D$" at Q6.D ljust above + "$S$" at Q6.S ljust below + } + ] with .nw at J.sw+(0,-1.35) #Orig+(-0.26,-1.2) + + right_ + M1: mosfet(,,dBSDFQM1,E) with .nw at J.nw+(0,-dwn) + "$G0$" at M1.G0 above rjust + "$G1$" at M1.G1 above ljust + {"\tt `mosfet'(,{,}dBSDFQM1,E)" wid 1.45 \ + with .nw at last [].sw+(0,-0.23) } + M2: mosfet(,,dBSDFQuM1) with .nw at M1.ne+(0.5,0) + "$G0$" at M2.G0 above ljust + "$G1$" at M2.G1 above rjust + {"\tt ...(,{,}dBSDFQuM1)" wid 1.25 \ + with .n at last [].s+(0,-0.05) } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex index 1912e9e2493..3f14c21bdb3 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/files.tex @@ -49,6 +49,12 @@ } \bfig{ + \centerline{\getpic{Grounds}} + \caption{Ground symbols + \src{Grounds.m4}.} + } + +\bfig{ \centerline{\getpic{Switches}} \caption{The switch macros; {\tt switch(,,,L|B|D)} is a wrapper for {\tt lswitch}, {\tt bswitch}, and {\tt dswitch} @@ -56,12 +62,6 @@ } \bfig{ - \centerline{\getpic{Grounds}} - \caption{Ground symbols - \src{Grounds.m4}.} - } - -\bfig{ \centerline{\getpic{Antennas}} \caption{Antenna symbols \src{Antennas.m4}.} @@ -92,8 +92,26 @@ } \bfig{ + \centerline{\getpic{Contact}} + \caption{A non-exhaustive sampling of {\tt contact} macro variations + \src{Contact.m4}.} + } + +\bfig{ + \centerline{\getpic{Contacts}} + \caption{The {\tt contacts} macro + \src{Contacts.m4}.} + } + +\bfig{ + \centerline{\getpic{relaycoil}} + \caption{The {\tt relaycoil} macro + \src{relaycoil.m4}.} + } + +\bfig{ \centerline{\getpic{Relay}} - \caption{The {\tt contact} and {\tt relay} macros + \caption{Some variants of the {\tt relay} macro \src{Relay.m4}.} } @@ -179,6 +197,12 @@ } \bfig{ + \centerline{\getpic{ex02}} + \caption{Elements at obtuse angles + \src{ex02.m4}.} + } + +\bfig{ {\small\centerline{\getpic{Optoiso}} } \caption{Optical isolator: a circuit with right or left orientation \src{Optoiso.m4}.} @@ -324,12 +348,6 @@ } \bfig{ - \centerline{\getpic{ex02}} - \caption{Elements at obtuse angles - \src{ex02.m4}.} - } - -\bfig{ \centerline{\getpic{Rectifiers}} \caption{Rectifier circuits and waveforms \src{Rectifiers.m4}.} @@ -461,6 +479,12 @@ } \bfig{ + \centerline{\getpic{control}} + \caption{Control-system block diagrams that do not require m4 + \src{control.m4}.} + } + +\bfig{ \centerline{\getpic{GrayCode}} \caption{Gray code 10-bit encoder disk pattern \src{GrayCode.m4}.} @@ -487,24 +511,9 @@ } \bfig{ - \centerline{\getpic{exp}} - \caption{Test of {\tt project} and other {\tt lib3D} - macros, showing the projection of a solid onto - the $y_1,z_1$ plane by sighting along the $x_1$ axis. - \src{exp.m4}.} - } - -\bfig{ - \centerline{\getpic{graysurf}} - \caption{Plotting surfaces using gray scales. A sort algorithm - determines plotting order - \src{graysurf.m4}.} - } - -\bfig{ - \centerline{\getpic{shapes}} - \caption{Basic shapes - \src{shapes.m4}.} + \centerline{\getpic{ex06}} + \caption{Crosshatching by {\tt for} loops + \src{ex06.m4}.} } \bfig{ @@ -532,18 +541,6 @@ } \bfig{ - \centerline{\getpic{control}} - \caption{Control-system block diagrams that do not require m4 - \src{control.m4}.} - } - -\bfig{ - \centerline{\getpic{ex06}} - \caption{Crosshatching by {\tt for} loops - \src{ex06.m4}.} - } - -\bfig{ \centerline{\getpic{Loglog}} \caption{A graph drawn using the pic language \src{Loglog.m4}.} @@ -556,6 +553,33 @@ } \bfig{ + \centerline{\getpic{exp}} + \caption{Test of {\tt project} and other {\tt lib3D} + macros, showing the projection of a solid onto + the $y_1,z_1$ plane by sighting along the $x_1$ axis. + \src{exp.m4}.} + } + +\bfig{ + \centerline{\getpic{graysurf}} + \caption{Plotting surfaces using gray scales. A sort algorithm + determines plotting order + \src{graysurf.m4}.} + } + +\bfig{ + \centerline{\getpic{shapes}} + \caption{Basic shapes + \src{shapes.m4}.} + } + +\bfig{ + \centerline{\getpic{AntiqueClock}} + \caption{An antique clock face + \src{AntiqueClock.m4}.} + } + +\bfig{ \centerline{\getpic{csc}} \caption{Conestoga Sailing Club (illustrating the filling of arbitrary shapes) @@ -594,6 +618,12 @@ } \bfig{ + \centerline{\getpic{Dini}} + \caption{Dini surface and an icosahedron + \src{Dini.m4}.} + } + +\bfig{ \centerline{\getpic{Sierpinski}} \caption{The Sierpinski triangle and a Cayley graph: tests of pic macro recursion diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf b/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf index c3b66a5133e..789ec556e10 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mf/cct.mf @@ -1,5 +1,5 @@ % cct.mf, generated by Mfpic, v1.10 2012/12/03, -% from TeX source "font" on 2019/10/15 at 16:40 +% from TeX source "font" on 2020/02/16 at 21:34 numeric mfpicversion; mfpicversion := 110; if unknown mode: mode := localfont; fi if unknown mag: mag := 1000/1000; fi diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mode.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/mode.tex deleted file mode 100644 index f9aeb853844..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mode.tex +++ /dev/null @@ -1 +0,0 @@ -\usepackage{tikz} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/Makefile index 441d1d3ce29..3373e88305f 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/mpost/Makefile @@ -20,15 +20,16 @@ MKDIM=printf '=boxdimfile{$(DIMFILE)}\n' DOC = examplesmpost FIGS = Adder.1 Alogix.1 ABlogix.1 Antennas.1 AmpTable.1 Audio.1 \ + AntiqueClock.1 \ Bip.1 Btree.1 Byte.1 Buttons.1 \ Counting.1 Crossbar.1 Crow.1 Csource.1 CanLogic.1 CctTable.1 Conn.1 \ - Decoder.1 Demultiplexer.1 Diodes.1 Drive.1 \ + Decoder.1 Demultiplexer.1 Dini.1 Diodes.1 Drive.1 \ Emarrows.1 Flow.1 Fuses.1 \ GrayCode.1 Grounds.1 Headers.1 Heathkit.1 I2L.1 Inclpdf.1 Jack.1 \ Logic.1 Loglog.1 MC.1 Mixer.1 MotorControl.1 Multiplexer.1 \ NLG.1 NPDT.1 Nport.1 \ Opamp.1 Optoiso.1 Pconn.1 PushPull.1 Quantum.1 \ - Rectifiers.1 Relay.1 Rotbox.1 \ + Rectifiers.1 Relay.1 relaycoil.1 Rotbox.1 \ Schottky.1 Sierpinski.1 ShiftR.1 Sixpole.1 Sources.1 SQUID.1 Switches.1 \ Tgate.1 Three.1 Timer.1 TTLnand.1 Ttree.1 Tubediags.1 \ Variable.1 Windings.1 Xform.1 \ diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/odistmakefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/odistmakefile new file mode 100644 index 00000000000..f6e26d9d37b --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/odistmakefile @@ -0,0 +1,548 @@ +# Examples distmakefile. +# +# CTAN dist files: make -f distmakefile dist zips +# The CTAN file is tmp/Circuit_macros/Circuit_macrosN.N.tar.gz +# or +# make -f distmakefile distece +# The ECE file is ~/tmp/CMdistfiles.tar.gz +# Change the version number in doc/Version.tex + +# Circuit_macro directory, change this if necessary: +LIBDIR = $$HOME/lib +LIBDIR=/cygdrive/D/Dwight/lib +# LIBDIR = .. + +# The dpic processor: +PIC = dpic -p + +CONFIGFILE = pstricks.m4 + +# Uncomment for gpic. Use gpic or pic as applicable on your machine: +# PIC = gpic -t +# PIC = pic -t +# CONFIGFILE = gpic.m4 + +######################################################################### + +# M4 = m4 -B32000 +# M4 = m4 -I $(LIBDIR) +# Environment variable M4PATH has been set to the installation directory: +M4 = m4 + +######################################################################### + +THISFILE = distmakefile + +DOC = examples +PICS = \ + Adder.tex Alogix.tex ABlogix.tex AmpTable.tex Antennas.tex Audio.tex \ + Bip.tex Btree.tex Byte.tex Buttons.tex \ + CanLogic.tex CctTable.tex Conn.tex Counting.tex Crossbar.tex Crow.tex \ + Csource.tex \ + Decoder.tex Demultiplexer.tex Dini.tex Diodes.tex Drive.tex \ + Emarrows.tex Flow.tex Fuses.tex Grounds.tex \ + Headers.tex Heathkit.tex \ + I2L.tex Incleps.tex Jack.tex \ + Logic.tex Loglog.tex MC.tex Mixer.tex MotorControl.tex Multiplexer.tex \ + NLG.tex NPDT.tex Nport.tex \ + Opamp.tex Optoiso.tex \ + Pconn.tex PushPull.tex Quantum.tex \ + Rectifiers.tex Relay.tex Rotbox.tex \ + Schottky.tex ShiftR.tex Sierpinski.tex Sixpole.tex Sources.tex SQUID.tex \ + Switches.tex \ + TTLnand.tex Tgate.tex Three.tex Timer.tex Ttree.tex Tubediags.tex \ + Variable.tex Windings.tex Xform.tex \ + control.tex csc.tex diamond.tex \ + ex00.tex ex01.tex ex02.tex ex03.tex ex04.tex ex05.tex ex06.tex \ + ex08.tex ex09.tex ex10.tex ex11.tex ex12.tex ex15.tex \ + ex16.tex ex17.tex ex18.tex ex21.tex exp.tex fet.tex \ + graysurf.tex lcct.tex pwrsupply.tex quick.tex recycle.tex rose.tex \ + sfg.tex shapes.tex thyristor.tex ujt.tex worm.tex XOR.tex + +PICS = `make -f Makefile echopics` + +MANFIGS = AmpTable Antennas Audio Bip CctTable Conn Contact Contacts \ + Demultiplexer Diodes \ + Emarrows Fuses Grounds Headers Jack Logic Multiplexer NLG NPDT Nport Opamp \ + Pconn Relay ShiftR Sources Switches Tgate Variable Windings Xform fet quick \ + thyristor ujt + +# Files that have to be processed twice: +BOXDIMS = ex09 Crow Incleps Loglog Opamp Windings + +M4LIBS = $(CONFIGFILE) + +# Convert options +EPSOPTS = -trim +TIFOPTS = -trim +SVGOPTS = -trim +GIFOPTS = -trim +PNGOPTS = -trim -density 400 -scale 25% -quality 92 -alpha Remove + +DVIPSOPTS = -Ppdf -G0 -t ledger + +DIMFILE = $(DOC).dim +LTX = latex --shell-escape --quiet +BS = tr '|' '\134' + +.SUFFIXES: .ps .dvi .tex .m4 .pic .eps .png .pdf .svg .tif .gif +.dvi.ps: + dvips $(DVIPSOPTS) $* -o $*.ps + chmod 644 $*.ps +.m4.tex: + @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi ; touch F_$*.dim + $(M4) $(M4LIBS) $(DIMFILE) F_$*.dim $*.m4 | sed -e '/^ *$$/d' > $*.pic + $(PIC) $*.pic > $*.tex +.m4.pic: + @if test -n "$(DIMFILE)" ; then touch $(DIMFILE) ; fi + $(M4) $(M4LIBS) $(DIMFILE) $*.m4 > $*.pic +.m4.dvi: + make -f $(THISFILE) $*.tex + printf "|documentclass[11pt]{article}\n\ +|usepackage{times,pstricks,boxdims,graphicx,pst-grad,pst-slpe}\n\ +|usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits}\n\ +|setlength{|textwidth}{28cm}|addtolength{|textheight}{28cm}\n\ +|setlength{|oddsidemargin}{0pt}|setlength{|evensidemargin}{0pt}\n\ +|setlength{|hoffset}{-1cm}\n\ +|newbox|graph\n\ +|pagestyle{empty}|thispagestyle{empty}\n\ +|begin{document}\n\ +|noindent|input{"$*".tex}\n\ +|end{document}\n" | $(BS) > F_$*.tex + latex --quiet F_$* + touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make -f $(THISFILE) $*.tex + latex --quiet F_$* + touch F_$*.dim $(DIMFILE) ; rm -f $*.tex $*.pic ; make -f $(THISFILE) $*.tex + latex --quiet F_$* +.m4.eps: + make -f $(THISFILE) $*.dvi + dvips -Ppdf F_$* -T128cm,28cm -o $*.ps +# Recent changes to PSTricks(?) have clashed with the use of TeXtoEPS +# so use ps2epsi + ps2epsi $*.ps $*.epsi + ( sed -e '/%%Pages:/d' -e '/BeginPreview/,$$d' -e '/%%HiResBoundingBox/d' \ + $*.epsi | tr '\015' '\012' ; sed -e '1,/EndPreview/d' $*.epsi ) | awk \ + '/^%%BoundingBox/{print $$1" "$$2" "$$3" "$$4+10" "$$5+15; next}; {print}' \ + >$*.eps +.m4.ps: + make -f $(THISFILE) $*.tex && mv $*.tex test.tex; latex --quiet tst + rm -f test.tex $*.pic + if test -f tst.dim ; then cp tst.dim F_$*.dim ; fi + make -f $(THISFILE) $*.tex && mv $*.tex test.tex; latex --quiet tst + dvips $(DVIPSOPTS) tst -o $*.ps + chmod 644 $*.ps +.m4.svg: + make -f $(THISFILE) $*.ps + convert $(SVGOPTS) $*.ps $*.svg +.m4.png: + make -f $(THISFILE) $*.ps +# make -f $(THISFILE) $*.eps +# convert $(PNGOPTS) $*.eps $*.png + convert $(PNGOPTS) $*.ps $*.png + @if test -f $*.png.0 ; then mv $*.png.0 $*.png ; fi +.m4.gif: + make -f $(THISFILE) $*.ps + convert $(GIFOPTS) $*.ps $*.gif +.m4.tif: + make -f $(THISFILE) $*.ps + convert $(TIFOPTS) $*.ps $*.tif + @if test -f $*.tif.0 ; then mv $*.tif.0 $*.tif ; fi +.m4.pdf: + touch F_$*.dim + $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic + dpic -g $*.pic > test.tex + sed -e '/^\\usepackage.*graphicx/s/^.*$$/\\usepackage{tikz}/' \ + -e '/pstricks/d' tst.tex > F_$*.tex + pdflatex --quiet F_$* + $(M4) pgf.m4 F_$*.dim $*.m4 > $*.pic + dpic -g $*.pic > test.tex + pdflatex --quiet F_$* + mv F_$*.pdf $*.pdf + +######################################################################### +default: + @printf "\n === making default\n" + @printf "\n\n\nUSAGE: make -f $(THISFILE) distece\n\n\n" + +$(DOC).ps: $(DOC).dvi + +doclinks: + @printf "\n === making doclinks\n" + -for nm in $(MANFIGS) ; do cp $(LIBDIR)/doc/$$nm.m4 . ; done + touch doclinks + +$(DOC).dvi: $(DOC).frs + @printf "\n === making $(DOC).dvi\n" + touch $(DOC).dim + for file in $(BOXDIMS) ; do \ + rm -f $$file.tex $$file.pic ; \ + make -f $(THISFILE) PIC="$(PIC)" DIMFILE=$(DOC).dim $${file}.tex ; done + latex --quiet $(DOC) + for file in $(BOXDIMS) ; do \ + rm -f $$file.tex $$file.pic ; \ + make -f $(THISFILE) PIC="$(PIC)" DIMFILE=$(DOC).dim $${file}.tex ; done + latex --quiet $(DOC) + +$(DOC).frs: $(DOC).tex files.tex header.tex + @printf "\n === making $(DOC).frs\n" + printf "|usepackage{pstricks,pst-grad}\n" | $(BS) > mode.tex + make -f $(THISFILE) $(PICS) + cp $(LIBDIR)/doc/Version.tex . + latex --quiet $(DOC) + touch $(DOC).frs + rm -f $(DOC).dvi + +tst: + make -f $(THISFILE) test.tex; latex --quiet tst; rm -f test.tex test.pic + make -f $(THISFILE) DIMFILE=tst.dim test.tex; latex --quiet tst + dvips $(DVIPSOPTS) tst -o tst.ps + +tst1: test.tex tst.tex + latex --quiet tst + dvips $(DVIPSOPTS) tst -o tst.ps + +gtst: + touch test.m4; make -f $(THISFILE) PIC="gpic -t" CONFIGFILE="" tst + +gtst1: + touch test.m4; make -f $(THISFILE) PIC="gpic -t" CONFIGFILE="" tst1 + +# Distribution files +NAME=Circuit_macros +TMP=/tmp + +# Makes test.m4, examples.pdf, Circuit_macros.pdf, +# Copying, examples/mf/cct.tfm examples/xfig +dist: + @printf "\n === making lib/examples/dist\n" + (cd .. ; make clobber ) + touch test.m4; cp test.m4 $(TMP)/test`date +%Y.%m.%d.%H:%M:%S` + find . -name test.m4 -exec rm -f {} \; + make -f $(THISFILE) test.m4 + (cd $(LIBDIR)/doc; make ) + make -f Makefile examples.pdf + ( cd $(LIBDIR); mv doc/Circuit_macros.pdf . ; \ + mv examples/examples.pdf . ; \ + make clobber; chmod 644 Circuit_macros.pdf examples.pdf; \ + cp -p Circuit_macros.pdf examples.pdf $(TMP) ; \ + mv Circuit_macros.pdf doc; mv examples.pdf examples ) +# touch reducedfiles +# make -f $(THISFILE) reducedfiles +# while test -f reducedfiles ; do sleep 1; done + make -f $(THISFILE) Copying + @printf "\n === making lib/examples/mf/cct.tfm\n" + (cd mf; make; chmod 644 cct.tfm; make clean) + @printf "\n === making lib/examples/xfig\n" + (cd xfig; make; make clean) + (cd $(LIBDIR)/doc; make clean ) + -dir=`pwd` ; if [ "`basename $$dir`" = "examples" ] ; then \ + rm -f $(LIBDIR)/examples.tar.gz ; fi + +EXCHANGE="`find C:/Program*\\(x86\\)/Adobe -name Acrobat.exe -print`" + +reducedfiles: + @printf "\n === making reducedfiles\n" + -( cd $(LIBDIR)/doc ; \ + printf "\n\n save Circuit_macros.pdf as reduced size pdf\n\n" ; \ + pwd | sed -e 's%/cygdrive/\(.\)%\1:%' -e 's%/%\\\\%g' \ + -e 's%^%$(EXCHANGE) %' -e 's%$$%\\\\Circuit_macros.pdf%' | sh ) && \ + ( printf "\n\n save examples.pdf as reduced size pdf\n\n" ; \ + pwd | sed -e 's%/cygdrive/\(.\)%\1:%' -e 's%/%\\\\%g' \ + -e 's%^%$(EXCHANGE) %' -e 's%$$%/examples.pdf%' | sh ) && \ + +$(TMP)/$(NAME): + if test -d $(TMP)/$(NAME); then rm -rf $(TMP)/$(NAME); \ + mkdir -p $(TMP)/$(NAME) ; fi + +COPIED = boxdims.sty CHANGES Copying darrow.m4 doc examples gpic.m4 \ + lib3D.m4 libcct.m4 libgen.m4 liblog.m4 Licence.txt \ + Makefile mfpic.m4 mpost.m4 pgf.m4 postscript.m4 psfrag.m4 pstricks.m4 \ + README svg.m4 xfig.m4 dpictools.pic + +REMOVED = examples/test examples/dev examples/pdflatex examples/xfig/info \ + examples/htmlsource examples/html examples/dist examples/zips \ + examples/SCP examples/distmakefile examples/boxdims \ + m4s \ + doc/expl-m4.pdf + +zipdir: $(TMP)/$(NAME) + @printf "\n === making lib/examples/zips\n" + Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ + PCVersion=`echo $$Version | sed -e 's/\./_/g'` ; \ + rm -rf $(TMP)/$(NAME)$$Version ; mkdir $(TMP)/$(NAME)$$Version; \ + (cd $(LIBDIR); cp -r $(COPIED) $(TMP)/$(NAME)$$Version ); \ + (cd $(TMP)/$(NAME)$$Version ; rm -rf $(REMOVED) ) ; \ + (cd $(TMP)/$(NAME)$$Version ; find . -type f -exec chmod 644 {} \; ) ; \ + (cd $(TMP)/$(NAME)$$Version ; find . -type f -empty -exec rm {} \; ) ; \ + (cd $(TMP)/$(NAME)$$Version ; find . -type d -exec chmod 755 {} \; ) ; \ + (cd $(TMP)/$(NAME)$$Version ; chmod +x examples/mf/mftest ) ; \ + (cd $(TMP)/$(NAME)$$Version ; chmod +x examples/mpost/mptest ) ; \ + (cd $(LIBDIR)/doc; make clobber ) + touch zipdir + +zips: zipdir + Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ + ( cd $(TMP); \ + tar cf - $(NAME)$$Version | gzip > $(NAME)$$Version.tar.gz ; \ + (cd $(NAME)$$Version; zip -r $(NAME) * ) ; \ + mv $(NAME)$$Version/$(NAME).zip $(NAME)$$PCVersion.zip ; \ + printf "\n$(TMP)/$(NAME)$$Version and\n" ; \ + printf "$(TMP)/$(NAME)$$Version.tar.gz created\n"; \ + printf "\n$(TMP)/$(NAME)$$PCVersion.zip created\n" ) +# touch zips + +test.m4: + @printf "\n === making test.m4\n" + printf \ +".PS\n\ +# Test.m4\n\ +cct_init\n\ +# Use this file to do a quick test of diagrams you are developing.\n\ +# Enter the drawing commands here and (if you have a \"make\" utility) type\n\ +# make tst\n\ +# Otherwise, to process a file called filename.m4, type one of\n\ +# make filename.ps\n\ +# make filename.eps\n\ +# make filename.pdf\n\ +# make filename.gif (requires ImageMagick convert)\n\ +# make filename.png (requires ImageMagick convert)\n\ +# make filename.tif (requires ImageMagick convert)\n\ +# To perform tests in a new folder, copy the Makefile, this file,\n\ +# and tst.tex (or your own equivalent) to that folder.\n\ +.PE\n" > test.m4 + +# For the git repository +GITDIR=$${HOME}/dpic/git/Circuit_macros +gitsync: dist zipdir + cd $(GITDIR) && rsync -a -v $(TMP)/Cir*[0-9]/* . + cp -p htmlsource/.gitignore $(GITDIR) + +distfile: + @printf "\n === making distfile\n" + rm -f dist zips htmlfiles + make -f $(THISFILE) dist zips htmlfiles + rm -rf distfile distfile.tar.gz; mkdir distfile + Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ + cp -p $(TMP)/$(NAME)$$Version.tar.gz \ + $(TMP)/$(NAME)$$Version/README $(TMP)/$(NAME)$$Version/CHANGES \ + distfile ;\ + PCVersion=`echo $$Version | sed -e 's/\./_/g'` ; \ + cp -p $(TMP)/$(NAME)$$PCVersion.zip distfile ;\ + mkdir distfile/html + cp -rp html/* distfile/html + (cd distfile/html; mv index.html .. ; rm -f access.log *.pl ) +# tarlib distfile + +EPSFILES=${PICS:%.tex=%.eps} +# Make an encapsulated Postscript file for each example (requires pstricks) +eps: + @printf "\n === making eps\n" + make -f $(THISFILE) ${PICS:%.tex=%.eps} + +Copying: $(LIBDIR)/doc/Version.tex + @printf "\n === making Copying\n" + sed -e \ + "s%Version *[0-9.]*,%`cat $(LIBDIR)/doc/Version.tex`,%" $(LIBDIR)/Copying \ + > xxx + sed -e "s%opyright (c) [^ ][^ ]* J%opyright (c) `date '+%Y'` J%" xxx \ + > $(LIBDIR)/Copying ; rm -f xxx +# for file in `find $(LIBDIR) -name Copying -print` ; do \ +# if test ! "$$file" = "$(LIBDIR)/Copying" ; then \ +# cp $(LIBDIR)/Copying $$file; fi ; done + (cd $(LIBDIR) ; for file in `grep -l 'Version [0-9][\.0-9]*,' *` ; do \ + if test ! \( "$$file" = "Copying" -o "$$file" = "CHANGES" \) ; then \ + ( sed -e '/opyright (c)/,$$d' $$file ; cat Copying ; echo "" ; \ + sed -e '1,/opyright (c)/d' $$file | sed -e '1,/^ *$$/d' ) > xxx ; \ + sed -e "s%Version *[0-9.]*:%`cat doc/Version.tex`:%" xxx \ + > $$file ; rm -f xxx ; fi ; done ; ) + (cd $(LIBDIR) ; \ + ( sed -e '/opyright (c)/,$$d' dpictools.pic ; \ + sed -e 's/^ *\*/\#/' -e 's/\* *$$/\#/' Copying ; echo "" ; \ + sed -e '1,/opyright (c)/d' dpictools.pic | sed -e '1,/^ *$$/d' ) > xxx ;\ + sed -e "s%Version *[0-9.]*:%`cat doc/Version.tex`:%" xxx \ + > dpictools.pic ; rm xxx ) + +htmlfiles: html svgfiles pngs html/examples.html html/index.html \ + Circuit_macros.ico html/Optosample.png + @printf "\n === making lib/examples/htmlfiles\n" + mv Circuit_macros.ico html + if test -f examples.pdf ; \ + then printf "\n\n examples.pdf found\n" ; \ + else printf "\n\n examples.pdf not found\n" ; fi + if test -f doc/Circuit_macros.pdf ; \ + then printf "\n\n doc/Circuit_macros.pdf found\n" ; \ + cp doc/Circuit_macros.pdf html ; \ + else printf "\n\n doc/Circuit_macros.pdf not found\n" ; \ + cp $(TMP)/Circuit_macros.pdf $(LIBDIR)/doc ; fi + cp examples.pdf html + (cd html; chmod 644 *.svg *.txt *.html *.pdf ) + touch htmlfiles + +html: + @printf "\n === making html\n" + if test ! -d html ; then mkdir html ; fi + ( cd htmlsource; cp -p $(PERLFILE).pl .htaccess ../html ) + +svgfiles: html + @printf "\n === making svgfiles\n" + ( cd svg; make ) + for file in `ls svg/*SVG.m4` ; \ + do cp $$file html/`basename $$file .m4`.txt ; done + cp -p svg/examplesSVG.html svg/*.svg svg/*.jpg html + touch svgfiles + +Circuit_macros.ico: html htmlsource/favicon.m4 + @printf "\n === making Circuit_macros.ico\n" + cp htmlsource/favicon.m4 . + make -f $(THISFILE) favicon.eps + convert -density 105 favicon.eps Circuit_macros.ico + rm -f favicon.* + +html/index.html: htmlsource/index.htmx html + @printf "\n === making index.html\n" + Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ + PCVersion=`echo $$Version | sed -e 's/\./_/g'` ; \ + sed -e 's/XXX/'$$Version'/' \ + -e 's/PCVersion/'$$PCVersion'/' \ + htmlsource/index.htmx > html/index.html + +html/Optosample.png: html htmlsource/Optosample.m4 + @printf "\n === making Optosample.png\n" + cp htmlsource/Optosample.m4 . + make -f $(THISFILE) Optosample.eps + convert Optosample.eps Optosample.png + mv Optosample.png html/Optosample.png + rm -f Optosample.* + +TR = tr '^@' '\012`' +html/examples.html: html htmlsource/examples.htmx files.tex + @printf "\n === making examples.html\n" + Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ + sed -e 's/Version XXX/Version '$$Version'/' htmlsource/examples.htmx \ + > html/examples.html + cat files.tex | sed -e '/bfig[\{]/d' -e '/^ *[\}][\}]* *$$/d' \ + -e '/src[\{]/d' -e '/\\if/d' -e '/\\fi/d' -e '/includegraphics/d' \ + -e '/\%ignore\%/d' -e '/^\%/d' -e '/\\end[\{]/d' -e '/^\%/d' \ + -e '/getpic/s/\\getpic[\{]\([^\}]*\)[\}][\}]*/ <\1> /g' \ + -e '/<[^-]/s/^[^<]*<//' -e '/<[^-]/s/>[^<]*</> /g' -e '/[^-]>/s/>.*$$/>/' \ + -e 's/\([^ -][^ -]*\)>/IS_"\1.png" A_"\1 diagram">B_"\1.txt" T_\1.m4Y/'\ + -e 's/IS_/<P><IMG SRC=/' -e 's/A_/ALT=/' -e 's/B_/<BR>^<A HREF=/' \ + -e 's/T_/TARGET="_blank"><P>/' -e 's/4Y/4<\/A>:/' \ + -e 's/^.*caption[\{]//' -e '/^ *$$/s/^ */<HR>/' \ + -e 's/\\hbox//g' \ + | sed \ + -e '/<P>/!s/{\\tt \([^}]*\)}/<tt>\1<\/tt>/g' \ + -e '/<P>/!s/{\\texttt \([^}]*\)}/<tt>\1<\/tt>/g' \ + -e '/<P>/!s/{\\bf \([^}]*\)}/<tt>\1<\/tt>/g' \ + -e '/<P>/!s/{\\em \([^}]*\)}/<em>\1<\/em>/g' \ + -e '/<P>/!s/{\\it \([^}]*\)}/<em>\1<\/em>/g' \ + -e '/<P>/!s/{\\sl \([^}]*\)}/<em>\1<\/em>/g' \ + -e '/<P>/!s%\([^\\]\)_\(.\)%\1<sub>\2</sub>%g' \ + -e '/<P>/!s%\([^\\]\)\^\(.\)%\1<sup>\2</sup>%g' \ + -e 's%``%"%g' -e "s%''%\"%g" -e 's/\~/ /g' \ + -e 's%\\%%g' -e 's/\$$//g' \ + | sed -e 's/HREF=Inclpdf.m4/HREF=Inclpdf.txt/' | $(TR) \ + >> html/examples.html + cat htmlsource/endexamples.htmx >> html/examples.html + +BACKGROUND = blight + +pngs: basenames + @printf "\n === making pngs\n" + cp htmlsource/$(BACKGROUND).m4 . + -for nm in `cat basenames` ; do \ + echo "make -f $(THISFILE) $$nm.png ; mv $$nm.png html/$$nm.png" ;\ + make -f $(THISFILE) $$nm.png ; mv $$nm.png html/$$nm.png ;\ + ls -l html/$$nm.png ; \ + done + make -f $(THISFILE) $(BACKGROUND).png + mv $(BACKGROUND).png html/$(BACKGROUND).png + rm -f $(BACKGROUND).tex + -for nm in `cat basenames` ; do\ + cp $$nm.m4 html/$$nm.txt ; done + cp Inclpdf.m4 html/Inclpdf.txt + echo "" > html/Inclpdf.m4 + cat Inclpdf.m4 >> html/Inclpdf.m4 + chmod 644 html/Inclpdf.m4 + +gifs: basenames + @printf "\n === making gifs\n" + -for nm in `cat basenames` ; do \ + make -f $(THISFILE) $$nm.gif ; mv $$nm.gif html/$$nm.gif ;\ + done + make -f $(THISFILE) $(BACKGROUND).gif + mv $(BACKGROUND).gif html/$(BACKGROUND).gif + rm -f $(BACKGROUND).tex + -for nm in `cat basenames` ; do\ + cp $$nm.m4 html/$$nm.txt ; done + cp Inclpdf.m4 html/Inclpdf.txt + echo "" > html/Inclpdf.m4 + cat Inclpdf.m4 >> html/Inclpdf.m4 + chmod 644 html/Inclpdf.m4 + +basenames: files.tex + @printf "\n === making basenames\n" + grep '\\getpic' files.tex | sed -e '/Inclpdf/d' \ + -e 's%\\getpic[\{]\([^\}]*\)[\}]% <\1> %g' \ + -e 's/^[^<]*<//' -e 's/>[^<]*</ /g' -e 's/>.*$$//' \ + | sort | uniq > basenames + +# To make but not distribute everything: make dist zips htmlfiles + +ECETMP = /cygdrive/d/Dwight/tmp +ECENAM = CMdistfiles +ECEDIR = $(ECETMP)/$(NAME) +PERLFILE = Circuit_macros_access_log + +# (cd lib/examples; make -f distmakefile distece 2>&1)2>&1 > typescript +distece: + @printf "\n === making lib/examples/distece\n" + (cd ..; find . -type f -exec chmod 644 {} \; ) + rm -f dist zips htmlfiles + make -f $(THISFILE) dist zips htmlfiles + rm -rf $(ECEDIR)* ; mkdir $(ECEDIR) + Version=`sed -e 's/Version //' $(LIBDIR)/doc/Version.tex` ; \ + PCVersion=`echo $$Version | sed -e 's/\./_/g'` ; \ + cp -p $(TMP)/$(NAME)$$Version.tar.gz \ + $(TMP)/$(NAME)$$PCVersion.zip \ + $(TMP)/$(NAME)$$Version/README $(TMP)/$(NAME)$$Version/CHANGES \ + $(TMP)/$(NAME)$$Version/doc/Circuit_macros.pdf \ + $(ECEDIR) + rm -rf $(ECEDIR)/html ; mkdir $(ECEDIR)/html + cp -rp html/* $(ECEDIR)/html + mv $(ECEDIR)/html/index.html $(ECEDIR)/index.html + (cd $(ECETMP); tarlib $(NAME); mv $(NAME).tar.gz $(ECENAM).tar.gz ) + echo ""; echo ""; ls -l $(ECETMP)/$(ECENAM).tar.gz + +testall: + (cd mf; make) + (cd mpost; make) +# (cd pgf; make) + (cd psfrag; make) + (cd svg; make) + (cd xfig; make) + +clobber: clean + rm -f *.ps + -@for dir in mf mpost pdflatex xfig psfrag pgf svg dev test; \ + do (if test -d $$dir ; then cd $$dir; make clobber; fi) ; done + rm -f *.warn + rm -rf index.html html basenames *.png* dist zips htmlfiles svgfiles + rm -rf $(TMP)/Cir* $(ECETMP)/Cir* $(ECEDIR) + if test -f Incl.pdf ; then \ + mv Incl.pdf Incl.pdx; rm -f *.pdf; mv Incl.pdx Incl.pdf ; fi + for file in `ls *.tex` ; do \ + nm=`echo $$file | sed -e "s/\(.*\)\.tex/\1/"` ; \ + if test -s $$nm.m4 ; then rm -f $$nm.pic $$nm.tex ; fi ; done + +clean: + @printf "\nclean:\n" + find .. -name \*stackdump -exec rm {} \; + rm -f core snapshots *.ico *favicon* $(BACKGROUND).* zipdir + rm -f *.dvi *.aux *.log *.toc *.blg *.eps *.epsi eps *-mfpic* + rm -f fig*.tex $(PICS) *.roff *.int *.pic gpic.m4 test.tex xxx* *.fig + rm -f *.dim *.bak *.frs $(RPICS) rotate.ps tst.ps *.bbl *-pics.ps *.gif + rm -f *.tfm *[0-9]pk *.png *.1 + rm -f F_*.tex Version.tex doclinks *stackdump *.ico + rm -rf distfile distfile.tar.gz + @printf "\n" diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/Makefile deleted file mode 100644 index 96a5e9face3..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/Makefile +++ /dev/null @@ -1,163 +0,0 @@ -# Makefile for the pgf subdirectory - -# Type "make" to produce the examplespgf.pdf file -# Type "make examplespgf.ps" for postscript output -# Type "make tst" to process the file test.m4 and produce tstpgf.ps -# Type "make tst.pdf" to process the file test.m4 and produce tstpgf.pdf - -# Where the .m4 libraries are installed. Change if necessary: -LIBDIR = $$HOME/lib - -#--------------------------------------------- - -# The .m4 circuit_macro libraries used for the examples: -M4MACROS = pgf.m4 -M4 = m4 -I $(LIBDIR) - -#--------------------------------------------- -DOC = examplespgf - -FIGS = Adder.tex Alogix.tex ABlogix.tex Antennas.tex Audio.tex AmpTable.tex \ - Bip.tex Btree.tex Byte.tex Buttons.tex \ - CanLogic.tex CctTable.tex Conn.tex Counting.tex Crossbar.tex Crow.tex \ - Csource.tex \ - Decoder.tex Demultiplexer.tex Diodes.tex Drive.tex \ - Emarrows.tex Flow.tex Fuses.tex \ - GrayCode.tex Grounds.tex Headers.tex Heathkit.tex Jack.tex \ - I2L.tex Incleps.tex \ - Logic.tex Loglog.tex MC.tex Mixer.tex MotorControl.tex Multiplexer.tex \ - NLG.tex NPDT.tex Nport.tex \ - Opamp.tex Optoiso.tex Pconn.tex PushPull.tex Quantum.tex \ - Rectifiers.tex Relay.tex Rotbox.tex \ - Schottky.tex Sierpinski.tex ShiftR.tex Sixpole.tex Sources.tex SQUID.tex \ - Switches.tex \ - Tgate.tex Three.tex Timer.tex TTLnand.tex Ttree.tex Tubediags.tex \ - Windings.tex Variable.tex Xform.tex \ - control.tex csc.tex diamond.tex \ - ex00.tex ex01.tex ex02.tex ex03.tex ex04.tex \ - ex05.tex ex06.tex ex08.tex ex09.tex ex10.tex ex11.tex ex12.tex \ - ex15.tex ex16.tex ex17.tex ex18.tex ex21.tex exp.tex \ - fet.tex graysurf.tex lcct.tex pwrsupply.tex quick.tex \ - random.tex recycle.tex rose.tex sfg.tex shapes.tex \ - thyristor.tex ujt.tex worm.tex XOR.tex - -# Files using boxdims macros: -BOXDIMS = ex09 Crow Incleps Loglog TTLnand Opamp Ttree Windings - -# It is advisable to do `make clean' between test examples. -#--------------------------------------------- - -DPIC = dpic -# DPIC = $$HOME/dpic/test/dpic - -LATEX = latex --quiet -PDFLATEX = pdflatex --quiet - -TR = | tr '=' '\134' - -.SUFFIXES: .tex .m4 .eps .ps .dim .pdf -.tex.ps: - $(LATEX) $* - dvips -Ppdf $* -.m4.tex: - $(M4) $(M4MACROS) $*.m4 | $(DPIC) -g > $*.tex -# $(M4) $(M4MACROS) $*.m4 > $*.pic -# $(DPIC) -g $*.pic > $*.tex -.m4.pdf: - $(M4) $(M4MACROS) $*.m4 | $(DPIC) -g > test.tex - $(PDFLATEX) tstpgf - mv tstpgf.pdf $*.pdf -.m4.dim: - printf '\\documentclass[11pt]{article}\n' > F$*.tex - printf '\usepackage{times,boxdims,tikz}\n' >> F$*.tex - printf '\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits}\n' >>F$*.tex - printf '\\begin{document}\\input '$* >> F$*.tex - printf '\n\\end{document}\n' >> F$*.tex - make $*.tex - touch F$*.dim - $(M4) $(M4MACROS) F$*.dim $*.m4 | $(DPIC) -g > $*.tex; $(LATEX) F$* - $(M4) $(M4MACROS) F$*.dim $*.m4 | $(DPIC) -g > $*.tex; $(LATEX) F$* - - -$(DOC).pdf: Incl.pdf $(DOC).tex - -if test "$(DOC)"="examplespgf" ; then make exlinks ; fi - -if test -n "$(BOXDIMS)" ; then \ - for box in $(BOXDIMS) ; do touch F$$box.dim; make $$box.dim ; done; fi - make $(FIGS) - $(PDFLATEX) $(DOC) - -EXL = exlinks -$(DOC).ps: $(DOC).dvi - dvips -Ppdf $(DOC) - -$(DOC).dvi: Incl.eps.gz $(DOC).tex - -if test "$(DOC)"="examplespgf" ; then make exlinks ; fi - make dims $(FIGS) - $(LATEX) $(DOC) - -dims: - -if test -n "$(BOXDIMS)" ; then \ - for box in $(BOXDIMS) ; do touch F$$box.dim; make $$box.dim ; done; fi - touch dims - -Incl.eps.gz: ../Incl.eps.gz ../Incl.eps.bb - cp ../Incl.eps.gz . - cp ../Incl.eps.bb . - -Incl.pdf: ../Incl.pdf - cp ../Incl.pdf . - -figs: $(EXL) $(FIGS) - -exlinks: Incl.eps.gz - @echo "" - @echo 'Ignore "cannot create ... exists" warnings.' - -@if test ! -f ex11.m4 ; then \ - ls ../*.m4 | sed -e 's/^/ln -s /' -e '/test.m4/d' -e '/quick.m4/d' | sh;\ - ls ../../doc/*.m4 ../*.gz | sed -e 's/^/ln -s /' | sh;\ - fi - touch $(EXL) - -clobber: clean - rm -f $(DOC).ps test.m4 *.pdf - -tstpgf.ps: tst -tst: test.m4 - touch tstpgf.dim - $(M4) pgf.m4 tstpgf.dim test.m4 \ - > test.pic - $(DPIC) -g test.pic > test.tex - $(LATEX) tstpgf - $(M4) pgf.m4 tstpgf.dim test.m4 \ - > test.pic - $(DPIC) -g test.pic > test.tex - $(LATEX) tstpgf - dvips tstpgf - -tst.pdf: test.m4 - touch tstpgf.dim - $(M4) pgf.m4 tstpgf.dim test.m4 \ - > test.pic - $(DPIC) -g test.pic > test.tex - $(PDFLATEX) tstpgf - $(M4) pgf.m4 tstpgf.dim test.m4 \ - > test.pic - $(DPIC) -g test.pic > test.tex - $(PDFLATEX) tstpgf - -test.tex: test.m4 - touch tstpgf.dim - $(M4) pgf.m4 tstpgf.dim test.m4 > test.pic - $(DPIC) -g test.pic > test.tex - -clean: - rm -f stamp-* $(FIGS) *.dvi *.bb *.gz tstpgf.ps tstpgf.pdf - rm -f *.out *.pfg Incl.* *.pic - -if /usr/bin/test -f exlinks ; then \ - ls -l *.m4 | grep '\->' | \ - sed -e 's/^.* \([^ ][^ ]*\) ->.*$$/rm -f \1/' | sh; fi - rm -f *.log *.ps *.aux *.mp *.[0-9] *.[0-9][0-9] *.mpx *.eps *.dim - rm -f core log mpxerr* *links figs.* *.dim dims Ftest.* setdim.tex - rm -f man[0-9]*.pic man[0-9]*.m4 figs.m4 test.1 test.mp test.pic test.tex - -if test -n "$(BOXDIMS)" ; then for box in $(BOXDIMS) ; do \ - rm -f F$$box.tex $$box.tex ; done; fi diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/README-pgf b/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/README-pgf deleted file mode 100644 index cddf8f2ef8d..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/README-pgf +++ /dev/null @@ -1,9 +0,0 @@ - -To test a single diagram, copy it into test.m4 -and type 'make tst'. The file is processed through -m4 and dpic -g to make test.tex which is then -included by tstpgf.tex. - -To produce examplespgf.pdf using tikz-pgf and pdflatex, type "make" -To produce examplespgf.ps using tikz-pgf, latex, and dvips, - type "make examplespgf.ps". diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/examplespgf.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/examplespgf.tex deleted file mode 100644 index 5ceb9cece2c..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/examplespgf.tex +++ /dev/null @@ -1,28 +0,0 @@ -% pgf examples.tex - -\documentclass[11pt]{article} -\usepackage{times,boxdims,tikz} -\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} -\usepackage{rotating} - -\input ../header - -\global\pgftrue -\addtolength{\textheight}{6ex} - -\begin{document} - \hfill - {\large\bf Examples: - \input{../../doc/Version.tex} - } - \hfill\break - - In this directory the source files are processed with m4, dpic -g, - and TikZ PGF. - This is a collection of diagrams the author has had occasion to - produce using m4 circuit macros and others, and gpic or dpic. The - source-file names are shown for reference. There may be other or - better m4 or pic constructs for producing the same drawings in some - cases. - -\input ../files.tex diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/tstpgf.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/tstpgf.tex deleted file mode 100644 index c5c560908c4..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/pgf/tstpgf.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass{article} -\usepackage{times,boxdims,tikz} -\usepackage{rotating} -\pagestyle{empty} -\begin{document} -\thispagestyle{empty} -%\centerline{\input test.tex} -\centerline{\boxdims{tpgf}{\input{test.tex}}} -\end{document} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/Makefile index 881a9a6d8bb..83eb573f8e0 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/psfrag/Makefile @@ -21,9 +21,10 @@ M4 = m4 DOC = examplespsfrag FIGS = Adder.eps Alogix.eps ABlogix.eps Antennas.eps Audio.eps AmpTable.eps \ + AntiqueClock.eps \ Bip.eps Btree.eps Byte.eps Buttons.eps \ CanLogic.eps CctTable.eps Conn.eps Counting.eps Crossbar.eps Crow.eps \ - Decoder.eps Demultiplexer.eps Diodes.eps Drive.eps \ + Decoder.eps Demultiplexer.eps Dini.eps Diodes.eps Drive.eps \ Csource.eps \ Emarrows.eps Flow.eps Fuses.eps \ GrayCode.eps Grounds.eps Headers.eps Heathkit.eps Jack.eps \ @@ -41,8 +42,8 @@ FIGS = Adder.eps Alogix.eps ABlogix.eps Antennas.eps Audio.eps AmpTable.eps \ ex05.eps ex06.eps ex08.eps ex09.eps ex10.eps ex11.eps ex12.eps \ ex15.eps ex16.eps ex17.eps ex18.eps ex21.eps exp.eps \ fet.eps graysurf.eps lcct.eps pwrsupply.eps quick.eps \ - random.eps recycle.eps rose.eps sfg.eps shapes.eps thyristor.eps \ - ujt.eps worm.eps + random.eps recycle.eps relaycoil.eps rose.eps sfg.eps shapes.eps \ + thyristor.eps ujt.eps worm.eps LOCALFIGS = ex21 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/quick.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/quick.m4 new file mode 100644 index 00000000000..7de2399601e --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/quick.m4 @@ -0,0 +1,16 @@ +.PS # Pic input begins with .PS +cct_init # Read in macro definitions and set defaults +elen = 0.75 # Variables are allowed; default units are inches +Origin: Here # Position names are capitalized + source(up_ elen); llabel(-,v_s,+) + resistor(right_ elen); rlabel(,R,) + dot + { # Save the current position and direction + capacitor(down_ to (Here,Origin)) #(Here,Origin) = (Here.x,Origin.y) + rlabel(+,v,-); llabel(,C,) + dot + } # Restore position and direction + line right_ elen*2/3 + inductor(down_ Here.y-Origin.y); rlabel(,L,); b_current(i) + line to Origin +.PE # Pic input ends diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/relaycoil.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/relaycoil.m4 new file mode 100644 index 00000000000..b3273794cd0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/relaycoil.m4 @@ -0,0 +1,40 @@ +.PS +# relaycoil.m4 +cct_init + + spc = dimen_/3 +{ relaycoil; S: "\tt re{}laycoil" at last [].s+(0,-20bp__) + { "\sl V1" wid 10bp__ at last [].V1 rjust + "\sl V2" at last [].V2 ljust } + K: relaycoil(NX) with .nw at last [].ne+(spc*4,0); "\tt (NX)" at (last [],S) + { thinlines_ + spline <- from K.A1 left 7bp__ then up 4bp__ left 4bp__; "\sl A1" rjust + arrow <- from K.A2 left 10bp__; "\sl A2" rjust + spline <- from K.A3 left 7bp__ then down 4bp__ left 4bp__; "\sl A3" rjust + spline <- from K.B1 right 7bp__ then up 4bp__ right 4bp__; "\sl B1" ljust + arrow <- from K.B2 right 10bp__; "\sl B2" ljust + spline <- from K.B3 right 7bp__ then down 4bp__ right 4bp__; "\sl B3" ljust + thicklines_ + } + relaycoil(AXSR) with .nw at last [].ne+(spc*5,0); "\tt (AXSR)" at (last [],S) + { "\sl V1" at last [].V1 rjust; "\sl V2" at last [].V2 rjust } + relaycoil(BXSR) with .nw at last [].ne+(spc*2,0); "\tt (BXSR)" at (last [],S) + { "\sl V1" at last [].V1 ljust; "\sl V2" at last [].V2 ljust } + relaycoil(SR) with .nw at last [].ne+(spc*4,0); "\tt (SR)" at (last [],S) + relaycoil(SO) with .nw at last [].ne+(spc,0); "\tt (SO)" at (last [],S) + relaycoil(SOR) with .nw at last [].ne+(spc,0); "\tt (SOR)" at (last [],S) + } +{ + move down_ 3/4; right_ + relaycoil(HS); S: "\tt (HS)" at last [].s+(0,-12bp__) + relaycoil(NAC) with .nw at last [].ne+(spc,0); "\tt (NAC)" at (last [],S) + relaycoil(AC) with .nw at last [].ne+(spc,0); "\tt (AC)" at (last [],S) + relaycoil(ML) with .nw at last [].ne+(spc,0); "\tt (ML)" at (last [],S) + relaycoil(PO) with .nw at last [].ne+(spc,0); "\tt (PO)" at (last [],S) + relaycoil(RM) with .nw at last [].ne+(spc,0); "\tt (RM)" at (last [],S) + relaycoil(RH) with .nw at last [].ne+(spc,0); "\tt (RH)" at (last [],S) + relaycoil(TH) with .nw at last [].ne+(spc,0); "\tt (TH)" at (last [],S) + relaycoil(EL) with .nw at last [].ne+(spc,0); "\tt (EL)" at (last [],S) + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/rotatetext.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/rotatetext.m4 index 2aec6abdf8d..9aa2dbea01b 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/rotatetext.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/rotatetext.m4 @@ -1,7 +1,7 @@ .PS # rotatetext.m4 -# This is a test of the \rput function to write a string around the -# periphery of a circle of radius r, accounting for inter-letter kerns +# This is a test of the pstricks \rput function to write a string around +# the periphery of a circle of radius r, accounting for inter-letter kerns {\Huge gen_init twopi = twopi_ diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4 new file mode 100644 index 00000000000..0848a53cbe3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/AntiqueClockSVG.m4 @@ -0,0 +1,158 @@ +.PS +# AntiqueClockSVG.m4 +gen_init(svg_font(font-family="sans-serif" font-stretch="condensed")) + +# https://tex.stackexchange.com/questions/236923/generate-analog-clock-with-numbered-face-add-seconds-roman-numerals + +# `Initialize rotated text. Any unrotated text must +# appear after the rotated text.' +svgrot_init(AntiqueClockSVG) + +# `hms2deg(hr,min,sec) hr:min:sec to degrees +# blank arg1: degrees for minute hand +# blank arg1 and arg2: degrees for second hand' +define(`hms2deg',`ifelse(`$1',, + `ifelse(`$2',, + `(90-pmod(ifelse(`$3',,0,`$3'),60)/60*360)', + `(90-(pmod(`$2',60)/60 + pmod(ifelse(`$3',,0,`$3'),60)/60/60)*360)')', + `(90-(pmod(`$1',12) + pmod(ifelse(`$2',,0,`$2'),60)/60 + dnl + pmod(ifelse(`$3',,0,`$3'),60)/3600)/12*360)')') + +# `SecondHand(length,hr,min,sec)' +define(`SecondHand',`[ shsf = (`$1')/3.2 + C: Here + { L: rpoint_(to (Rect_(`$1',hms2deg(,,`$4')))) } + line thick 8*shsf to rvec_(`$1',0) + ]') + +# `AntiqueMinuteHand(length,hr,min,sec)' +define(`AntiqueMinuteHand',`[ mhsf = (`$1')/2.84 + L: rpoint_(to (Rect_(`$1',hms2deg(,`$3',`$4')))) + C: circle fill_(0) diam 0.47*mhsf at L.start + move to C + spline from rvec_(0,0.047*mhsf) \ + to rvec_(1.65*mhsf,0.11*mhsf) \ + then to rvec_(`$1',0.018*mhsf) \ + then to rvec_(`$1',-0.018*mhsf) \ + then to rvec_(1.65*mhsf,-0.11*mhsf) \ + then to rvec_(0,-0.047*mhsf) \ + shaded rgbstring(0,0,0) + ]') + +# `AntiqueHourHand(length,hr,min,sec)' +define(`AntiqueHourHand',`[ hhsf = (`$1')/2.2 + L: rpoint_(to (Rect_(`$1',hms2deg(`$2',`$3',`$4')))) + C: circle fill_(0) diam 0.6*hhsf at L.start + move to C + v = 0.25*hhsf + { line to rvec_(1.1*hhsf,0) thick 0.15/(1bp__)*hhsf } + C1: rvec_(1.25*hhsf,0) + d = `$1'-1.25*hhsf + q = 1bp__*hhsf + r1 = (d^2 + q^2 - v^2)/(v-q)/2 + tang = atan2((r1+q),d) + for i=0 to 3 do { + X[i]: C1+vec_(rect_(v, pi_+i/3*( tang-pi_))) + Y[i]: C1+vec_(rect_(v,-pi_+i/3*(-tang+pi_))) + } + n = 3 + for i=1 to 4 do { aa = -pi_+tang + i/4*(pi_/2-tang) + XX: (d,r1+q)+(rect_(r1,aa)) + n+=1; + X[n]: C1+vec_(XX.x, XX.y) + Y[n]: C1+vec_(XX.x,-XX.y) + } + m = n + for i= 0 to m do { n+=1; X[n]: Y[m-i] } + fitcurve(X,n,shaded rgbstring(0,0,0)) + ]') + +define(`AntiqueClock',`[ # h,m,s,diam +# Clock size parameters: + hour = ifelse(`$1',,3,`$1') + minute = ifelse(`$2',,41,`$2') + second = ifelse(`$3',,51,`$3') + # outer radius + ifelse(`$4',,`skale=0.5; r1=2',`r1=(`$4')/2; skale=r1/4') + r2 = r1-0.5*skale + r3 = r2-0.14*skale + r4 = r3 - 0.35*skale + r5 = r4 - 0.17*skale + r6 = r5 - 0.63*skale + r7 = r6 - 0.17*skale + shadelinethick = 1.0 + +C: circle thick 0.2 rad r1 + +define shadeline { + s = 1-($`'1)*2 + v = r*s + h = sqrt(r^2-v^2) + t = 1-abs(s) + line from (vrot_(-h,v,cost,sint)) to (vrot_(h,v,cost,sint)) \ + thick shadelinethick outlined rgbstring(t,t,t) + } + + r = r1 # Bezel outer + nlines = int(2*r/(shadelinethick pt__)*1.1) + cost = cosd(10); sint = sind(10); + ShadeObject(shadeline,nlines, 0, 0,0,0, 0.5, 1,1,1, 1, 0,0,0 ) at C + + r = r2 # Bezel inner + nlines = int(2*r/(shadelinethick pt__)*1.1) + cost = cosd(-10); sint = sind(-10); + ShadeObject(shadeline,nlines, 0, 0,0,0, 0.25, 0.8,0.8,0.8, 0.5, 1,1,1, + 0.75, 0.8,0.8,0.8, 1, 0,0,0 ) at C + +# Clock face +Face: circle thick 0 fill_(1) rad r3 at C + circle rad r4 at C + circle rad r5 at C + circle rad r6 at C + circle rad r7 at C +# Ad hoc shift of rotated SVG text + define adj { (-cosd($`'1)*textht*0.5*sign(180-($`'1)),\ + (0.25+0.25*cosd(2*($`'1)))*textht) } +# Outer numbers + textht = (r3-r4)*0.6 + for mn = -15 to 15 by 5 do { t = 90-mn/60*360 + R:(Rect_((r3+r4)/2,t)) + svg_rot(mn/60*360,sprintf("%g",pmod(mn,60)) at C+R+adj(t)) + } + for mn = 20 to 40 by 5 do { t = 450-mn/60*360 + R: (Rect_((r3+r4)/2,t)) + svg_rot(-180+mn/60*360, sprintf("%g",pmod(mn,60)) at C+R+adj(t)) + } +# Outer tics + for mn = 1 to 60 do { t = 90-mn/60*360 + line from C+(Rect_(r5,t)) to C+(Rect_(r4,t)) } + +# Inner numbers + textht = (r5-r6)*0.6 + Loopover_(`mx',`tt = 90-(m4Lx-4)/12*360 + R: (Rect_((r5+r6)/2,tt)) + svg_rot(90-tt, "mx" at C+R+adj(tt)) ', + IX,X,XI,XII,I,II,III) + Loopover_(`mx',`tt = 360-m4Lx*30 + R: (Rect_((r5+r6)/2,tt)) + svg_rot(270-tt, "mx" at C+R+adj(tt)) ', + IV,V,VI,VII,VIII) + +# Inner tics + for mn = 5 to 60 by 5 do { t = 90-mn/60*360 + line from C+(Rect_(r7,t)) to C+(Rect_(r6,t)) } + +# Hands + AntiqueHourHand(r6,hour,minute,second) with .C at C + AntiqueMinuteHand(r5,hour,minute,second) with .C at C + SecondHand((r3+r4)/2,hour,minute,second) with .C at C + +# Center + dot(at C,0.1/4*r1,1) + ]') + + Clock1: AntiqueClock(,,,3.5) +# Clock2: AntiqueClock(4,48,07,2) at Clock1.e+(1.5,0) + + command "</g>" # end font +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/BtreeSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/BtreeSVG.m4 index df0a2726b22..312249605ee 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/BtreeSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/BtreeSVG.m4 @@ -2,7 +2,7 @@ # Btree.m4 # One way to draw a binary tree using pic macros gen_init(svg_font(sans-serif,11bp__)) -circlerad = 0.35 +circlerad = 0.30 define n { [C: circle fill_(0.9) $1 if "$2" != "" then { diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ContactSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ContactSVG.m4 new file mode 100644 index 00000000000..057f7027311 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ContactSVG.m4 @@ -0,0 +1,101 @@ +.PS +# ContactSVG +cct_init +svg_font(sans-serif,11bp__) + +movw = 0.45 +{ + contact + {S:"svg_tt(`contact')" at last [].s+(0,-0.15) + "svg_it(`P')" rjust at last [].P.w + "svg_it(`O')" ljust at last [].O + "svg_it(`C')" ljust at last [].C } + move right_ movw; contact(R) + {"svg_tt(`(R)')" at (last [].s,S) + "svg_it(`P')" rjust at last [].P.w + "svg_it(`O')" ljust at last [].O + "svg_it(`C')" ljust at last [].C } + move right_ movw; contact(O); {"svg_tt(`(O)')" at (last [],S)} + move right_ movw; contact(C); {"svg_tt(`(C)')" at (last [],S)} + + move right_ movw; contact(P) + {S: "svg_tt(`(P)')" at last [].s+(0,-0.15) + "svg_it(`P')" rjust at last [].P.w + "svg_it(`O')" ljust at last [].O + "svg_it(`C')" ljust at last [].C } + move right_ movw; contact(PR) + {S: "svg_tt(`(PR)')" at last [].s+(0,-0.15) + "svg_it(`P')" rjust at last [].P.w + "svg_it(`O')" ljust at last [].O + "svg_it(`C')" ljust at last [].C } + move right_ movw; contact(PO); {"svg_tt(`(PO)')" at (last [],S)} + {"svg_it(`O')" ljust at last [].O + "svg_it(`C')" ljust at last [].C } + move right_ movw; contact(PC); {"svg_tt(`(PC)')" at (last [],S)} +} + +move down 0.75; right_ ; { + contact(I); {S: "svg_tt(`(I)')" at last [].s+(0,-12bp__) + "svg_it(`P')" rjust at last [].P.w + "svg_it(`O')" ljust at last [].O.e + "svg_it(`C')" ljust at last [].C.e } + move right_ movw; contact(RI) + {"svg_tt(`(RI)')" at (last [],S) + "svg_it(`P')" rjust at last [].P.w + "svg_it(`O')" ljust at last [].O.e + "svg_it(`C')" ljust at last [].C.e } + move right_ movw; contact(OI); {"svg_tt(`(OI)')" at (last [],S)} + move right_ movw; contact(CI); {"svg_tt(`(CI)')" at (last [],S)} + + move right_ movw; contact(PI); {"svg_tt(`(PI)')" at (last [],S) } + {"svg_it(`O')" ljust at last [].O.e + "svg_it(`C')" ljust at last [].C.e } + move right_ movw; contact(PIO); {"svg_tt(`(PIO)')" at (last [],S) } + move right_ movw; contact(PIC); {"svg_tt(`(PIC)')" at (last [],S) } +} + +movewid = movw + move down 0.65; right_; { + K: contact(T) + {S: "svg_tt(`(T)')" at last [].s+(0,-0.15) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.C; "svg_it(`C')" + spline <- right 0.09 then down 0.05 right 0.05 from K.O; "svg_it(`O')" + thicklines_ } + move; K: contact(RT) + {"svg_tt(`(RT)')" at (last [],S) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.O; "svg_it(`O')" + spline <- right 0.09 then down 0.05 right 0.05 from K.C; "svg_it(`C')" + thicklines_ } + move; contact(OT); {S: "svg_tt(`(OT)')" at (last [],S) } + move; contact(CT); {S: "svg_tt(`(CT)')" at (last [],S) } + move; contact(PT); {S: "svg_tt(`(PT)')" at (last [],S) } + move; contact(PTO); {S: "svg_tt(`(PTO)')" at (last [],S) } + move; contact(PTC); {S: "svg_tt(`(PTC)')" at (last [],S) } +} + + move down 0.65; right_; { + K: contact(U) + {S: "svg_tt(`(U)')" at last [].s+(0,-0.15) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.C; "svg_it(`C')" + spline <- right 0.09 then down 0.05 right 0.05 from K.O; "svg_it(`O')" + thicklines_ } + move; K: contact(RU) + {"svg_tt(`(RU)')" at (last [],S) + thinlines_ + spline <- right 0.09 then up 0.05 right 0.05 from K.O; "svg_it(`O')" + spline <- right 0.09 then down 0.05 right 0.05 from K.C; "svg_it(`C')" + thicklines_ } + move; K: contact(OU); {S: "svg_tt(`(OU)')" at (last [],S) + "svg_it(`O')" ljust at K.O.e } + move; K: contact(CU); {S: "svg_tt(`(CU)')" at (last [],S) + "svg_it(`C')" ljust at K.C.e } + move; contact(PU); {S: "svg_tt(`(PU)')" at (last [],S) } + move; contact(PUO); {S: "svg_tt(`(PUO)')" at (last [],S) } + move; contact(PUC); {S: "svg_tt(`(PUC)')" at (last [],S) } +} + + command "</g>" # end font +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ContactsSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ContactsSVG.m4 new file mode 100644 index 00000000000..556ae04a616 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ContactsSVG.m4 @@ -0,0 +1,49 @@ +.PS +# ContactsSVG.m4 +cct_init +svg_font(sans-serif,10bp__) + + space = 0.75 + KS:contacts(2) + {"svg_tt(`contacts(2)')" wid 1 at KS.s +(0,-12bp__) + for_(1,2,1, + `"svg_it(P`'m4x)" rjust at last [].P`'m4x-(dotrad_,0) + "svg_it(O`'m4x)" ljust at last [].O`'m4x+(dotrad_,0) + "svg_it(C`'m4x)" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,I) with .sw at last [].se+(space,0) + {"svg_tt(`(2,I)')" at KS.s +(0,-12bp__) + for_(1,2,1, + `"svg_it(P`'m4x)" rjust at last [].P`'m4x-(dotrad_,0) + "svg_it(O`'m4x)" ljust at last [].O`'m4x+(dotrad_,0) + "svg_it(C`'m4x)" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,IO) with .sw at last [].se+(space,0) + {"svg_tt(`(2,IO)')" at KS.s +(0,-12bp__) + for_(1,2,1, + `"svg_it(P`'m4x)" rjust at last [].P`'m4x-(dotrad_,0) + "svg_it(O`'m4x)" ljust at last [].O`'m4x+(dotrad_,0) ') } + + KS:contacts(2,PICD) with .sw at last [].se+(space,0) + {"svg_tt(`(2,PICD)')" at KS.s +(0,-12bp__) + for_(1,2,1, + `"svg_it(P`'m4x)" rjust at last [].P`'m4x-(dotrad_,0) + "svg_it(O`'m4x)" ljust at last [].O`'m4x+(dotrad_,0) + "svg_it(C`'m4x)" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,PTCD) with .sw at last [].se+(space,0) + {"svg_tt(`(2,PTCD)')" at KS.s +(0,-12bp__) + for_(1,2,1, + `"svg_it(P`'m4x)" rjust at last [].P`'m4x-(dotrad_,0) + "svg_it(O`'m4x)" ljust at last [].O`'m4x+(dotrad_,0) + "svg_it(C`'m4x)" ljust at last [].C`'m4x+(dotrad_,0) ') } + + KS:contacts(2,PUCD) with .sw at last [].se+(space,0) + {"svg_tt(`(2,PUCD)')" at KS.s +(0,-12bp__) + for_(1,2,1, + `"svg_it(P`'m4x)" rjust at last [].P`'m4x-(dotrad_,0) + "svg_it(O`'m4x)" ljust at last [].O`'m4x+(dotrad_,0) + "svg_it(C`'m4x)" ljust at last [].C`'m4x+(dotrad_,0) ') } + + command "</g>" # end font +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrowSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrowSVG.m4 index 6be09389477..3fe2e8ff72c 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrowSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/CrowSVG.m4 @@ -33,22 +33,22 @@ define boxtext { boxwid = boxwid*1.15 boxsep = boxwid/2 - custombox(Class,ht boxht*2.2, + custombox(Class,ht boxht*1.7, `classkey, class_type, class_desc') custombox(Product,ht Class.ht with .nw at Class.ne+(boxsep,0), `classkey, prodkey, prod_name, pkg_type') - custombox(Sales,ht boxht*3.3 with .nw at Product.ne+(boxsep*2,15pt__), + custombox(Sales,ht boxht*2.75 with .nw at Product.ne+(boxsep*2,13pt__), `perkey, classkey, prodkey, storekey, promokey, quantity, dollars') custombox(Period,ht Sales.ht with .nw at Sales.ne+(boxsep*2,0), `perkey, date, day, week, month, qtr, year') - custombox(Market,ht Sales.ht with .nw at Class.sw+(0,-boxsep*2), + custombox(Market,ht Sales.ht with .nw at Class.sw+(0,-boxsep*3/2), `perkey, date, day, week, month, qtr, year') - custombox(Store,ht boxht*3.6 with .sw at (Product.w,Market.s), + custombox(Store,ht boxht*3.2 with .sw at (Product.w,Market.s), `storekey, mktkey, store_type, store_name, street, city, state, zip') custombox(Promotion,ht Market.ht with .sw at (Period.w,Market.s), @@ -61,7 +61,7 @@ define boxtext { T: last line.c+(0,-crow_wd*2.5) move to Period.nw+(0,-10pt__); crowline(to (Sales.e,Here),,1.75*crow_wd) -Q: (last line.c,0.4 between Sales.se and Sales.ne) +Q: (last line.c,0.35 between Sales.se and Sales.ne) move to Market.ne+(0,-10pt__); crowline(to (Store.w,Here)) move to Store.ne+(0,-10pt__); line to (T,Here) then to T diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/DiniSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/DiniSVG.m4 new file mode 100644 index 00000000000..5631a4822fb --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/DiniSVG.m4 @@ -0,0 +1,193 @@ +.PS +# Dini.m4 +# This diagram can be produced using, e.g. +# m4 pdf.m4 Dini.m4 | dpic -d > Dini.pdf + +threeD_init +NeedDpicTools +scale = 1.5 +[ + viewazimuth = 0 # View angles in degrees + viewelevation = 20 + setview(viewazimuth,viewelevation,0) + + a = 1.5 + b = 0.25 + +define(`Dini', +`a*cos(`$1')*sin(`$2'),dnl + a*sin(`$1')*sin(`$2'),dnl + (a*(cos(`$2')+loge(tan((`$2')/2))) + b*(`$1'))') + + umin = 0; umax = 4*pi_ + vmin = 0.2; vmax = 2.0 + ugrid = 80; vgrid = 20 + + ur = umax-umin + vr = vmax-vmin +`define cu {umin+($1)/ugrid*ur}' +`define cv {vmin+($1)/vgrid*vr}' + +# Generate points and sort + n = -1 + for iu=0 to ugrid do { + for iv=0 to vgrid do { + n +=1 + ciu[n] = cu(iu) + civ[n] = cv(iv) + d[n] = dot3D(View3D,Dini(ciu[n],civ[n])) + ix[n] = n + } + } + dpquicksort(d,0,n,ix) + +# Draw the facets + linethick = 0.4 + du = ur/ugrid/2 + dv = vr/vgrid/2 + for i=0 to n do { + NE: project(Dini(ciu[ix[i]]+du,civ[ix[i]]+dv)) + SE: project(Dini(ciu[ix[i]]+du,civ[ix[i]]-dv)) + SW: project(Dini(ciu[ix[i]]-du,civ[ix[i]]-dv)) + NW: project(Dini(ciu[ix[i]]-du,civ[ix[i]]+dv)) + f = (-cos(ciu[ix[i]])+1)/2 + g = ( sin(ciu[ix[i]])+1)/2 + line from NE to SE then to SW then to NW then to NE \ + outlined rgbstring(f,g,0) shaded rgbstring(f,g,0) +# outlined rgbstring(0,0.5,0) shaded rgbstring(f,g,0) + } +] +# Icosahedron.m4 +[ +#threeD_init +#NeedDpicTools + # Computing facets is complicated, so list them. + # 60 vertices: +define(`m4x',-1) + array2(v,m4inx,0, 0, 1.021) + array2(v,m4inx,0.4035482, 0, 0.9378643) + array2(v,m4inx,-0.2274644, 0.3333333, 0.9378643) + array2(v,m4inx,-0.1471226, -0.375774, 0.9378643) + array2(v,m4inx,0.579632, 0.3333333, 0.7715933) + array2(v,m4inx,0.5058321, -0.375774, 0.8033483) + array2(v,m4inx,-0.6020514, 0.2908927, 0.7715933) + array2(v,m4inx,-0.05138057, 0.6666667, 0.7715933) + array2(v,m4inx,0.1654988, -0.6080151, 0.8033483) + array2(v,m4inx,-0.5217096, -0.4182147, 0.7715933) + array2(v,m4inx,0.8579998, 0.2908927, 0.4708062) + array2(v,m4inx,0.3521676, 0.6666667, 0.6884578) + array2(v,m4inx,0.7841999, -0.4182147, 0.5025612) + array2(v,m4inx,-0.657475, 0.5979962, 0.5025612) + array2(v,m4inx,-0.749174, -0.08488134, 0.6884578) + array2(v,m4inx,-0.3171418, 0.8302373, 0.5025612) + array2(v,m4inx,0.1035333, -0.8826969, 0.5025612) + array2(v,m4inx,-0.5836751, -0.6928964, 0.4708062) + array2(v,m4inx,0.8025761, 0.5979962, 0.2017741) + array2(v,m4inx,0.9602837, -0.08488134, 0.3362902) + array2(v,m4inx,0.4899547, 0.8302373, 0.3362902) + array2(v,m4inx,0.7222343, -0.6928964, 0.2017741) + array2(v,m4inx,-0.8600213, 0.5293258, 0.1503935) + array2(v,m4inx,-0.9517203, -0.1535518, 0.3362902) + array2(v,m4inx,-0.1793548, 0.993808, 0.1503935) + array2(v,m4inx,0.381901, -0.9251375, 0.2017741) + array2(v,m4inx,-0.2710537, -0.9251375, 0.3362902) + array2(v,m4inx,-0.8494363, -0.5293258, 0.2017741) + array2(v,m4inx,0.8494363, 0.5293258, -0.2017741) + array2(v,m4inx,1.007144, -0.1535518, -0.06725804) + array2(v,m4inx,0.2241935, 0.993808, 0.06725804) + array2(v,m4inx,0.8600213, -0.5293258, -0.1503935) + array2(v,m4inx,-0.7222343, 0.6928964, -0.2017741) + array2(v,m4inx,-1.007144, 0.1535518, 0.06725804) + array2(v,m4inx,-0.381901, 0.9251375, -0.2017741) + array2(v,m4inx,0.1793548, -0.993808, -0.1503935) + array2(v,m4inx,-0.2241935, -0.993808, -0.06725804) + array2(v,m4inx,-0.8025761, -0.5979962, -0.2017741) + array2(v,m4inx,0.5836751, 0.6928964, -0.4708062) + array2(v,m4inx,0.9517203, 0.1535518, -0.3362902) + array2(v,m4inx,0.2710537, 0.9251375, -0.3362902) + array2(v,m4inx,0.657475, -0.5979962, -0.5025612) + array2(v,m4inx,-0.7841999, 0.4182147, -0.5025612) + array2(v,m4inx,-0.9602837, 0.08488134, -0.3362902) + array2(v,m4inx,-0.1035333, 0.8826969, -0.5025612) + array2(v,m4inx,0.3171418, -0.8302373, -0.5025612) + array2(v,m4inx,-0.4899547, -0.8302373, -0.3362902) + array2(v,m4inx,-0.8579998, -0.2908927, -0.4708062) + array2(v,m4inx,0.5217096, 0.4182147, -0.7715933) + array2(v,m4inx,0.749174, 0.08488134, -0.6884578) + array2(v,m4inx,0.6020514, -0.2908927, -0.7715933) + array2(v,m4inx,-0.5058321, 0.375774, -0.8033483) + array2(v,m4inx,-0.1654988, 0.6080151, -0.8033483) + array2(v,m4inx,0.05138057, -0.6666667, -0.7715933) + array2(v,m4inx,-0.3521676, -0.6666667, -0.6884578) + array2(v,m4inx,-0.579632, -0.3333333, -0.7715933) + array2(v,m4inx,0.1471226, 0.375774, -0.9378643) + array2(v,m4inx,0.2274644, -0.3333333, -0.9378643) + array2(v,m4inx,-0.4035482, 0, -0.9378643) + array2(v,m4inx,0, 0, -1.021) + + # 12 pentagons +undefine(`m4x') +array2(p,m4inx,0,3,8,5,1) +array2(p,m4inx,2,7,15,13,6) +array2(p,m4inx,4,10,18,20,11) +array2(p,m4inx,9,14,23,27,17) +array2(p,m4inx,12,21,31,29,19) +array2(p,m4inx,16,26,36,35,25) +array2(p,m4inx,22,32,42,43,33) +array2(p,m4inx,24,30,40,44,34) +array2(p,m4inx,28,39,49,48,38) +array2(p,m4inx,37,47,55,54,46) +array2(p,m4inx,41,45,53,57,50) +array2(p,m4inx,51,52,56,59,58) + + # 20 hexagons +undefine(`m4x') +array2(h,m4inx,0,1,4,11,7,2) +array2(h,m4inx,0,2,6,14,9,3) +array2(h,m4inx,1,5,12,19,10,4) +array2(h,m4inx,3,9,17,26,16,8) +array2(h,m4inx,5,8,16,25,21,12) +array2(h,m4inx,6,13,22,33,23,14) +array2(h,m4inx,7,11,20,30,24,15) +array2(h,m4inx,10,19,29,39,28,18) +array2(h,m4inx,13,15,24,34,32,22) +array2(h,m4inx,17,27,37,46,36,26) +array2(h,m4inx,18,28,38,40,30,20) +array2(h,m4inx,21,25,35,45,41,31) +array2(h,m4inx,23,33,43,47,37,27) +array2(h,m4inx,29,31,41,50,49,39) +array2(h,m4inx,32,34,44,52,51,42) +array2(h,m4inx,35,36,46,54,53,45) +array2(h,m4inx,38,48,56,52,44,40) +array2(h,m4inx,42,51,58,55,47,43) +array2(h,m4inx,48,49,50,57,59,56) +array2(h,m4inx,53,54,55,58,59,57) + + viewazimuth = -10 # View angles in degrees + viewelevation = 40 + setview(viewazimuth,viewelevation,0) + + n = 0 # Find and draw the visible hexagons + for i=1 to 20 do { # The normal is the line to the center + for_(1,3,1,`a[m4x] = (v[h[i,1],m4x] + v[h[i,4],m4x])/2') + if dot3D(View3D,a[1],a[2],a[3]) >= 0 then { n +=1; ih[n] = i } + } + for i=1 to n do { + for j=1 to 6 do { x[j]=h[ih[i],j] } + line from project((v[x[1],1]),(v[x[1],2]),(v[x[1],3]))\ + for_(2,6,1,`to project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\ + to project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0.95) + } + m = 0 + for i=1 to 12 do { # Visible pentagons + for_(1,3,1,`a[m4x] = 0; for j=1 to 5 do { a[m4x] += v[p[i,j],m4x] }') + if dot3D(View3D,a[1]/5,a[2]/5,a[3]/5) >= 0 then { m +=1; ip[m] = i } + } + for i=1 to m do { + for j=1 to 5 do { x[j]=p[ip[i],j] } + line from project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) \ + for_(2,5,1,`to project((v[x[m4x],1]),(v[x[m4x],2]),(v[x[m4x],3]))\')\ + to project((v[x[1],1]),(v[x[1],2]),(v[x[1],3])) thick 0.2 fill_(0) + } +] scaled 2.5 with .sw at last [].se+(1,0) +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile index 4d604dac409..5ee232a5ea9 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/Makefile @@ -7,6 +7,7 @@ M4LIBS = svg.m4 SVGconfig.m4 DPIC = dpic #DPIC = $$HOME/dpic/bu*/p2c/ftp/dpic #DPIC = $$HOME/dpic/bu*/test/dpic +#DPIC = $$HOME/dpic/dev/p2c/ftp/dpic #DPIC = ../../../dpic/bison/dpic .SUFFIXES: .pic .svg .m4 @@ -20,11 +21,11 @@ DPIC = dpic CCTSVG = \ AdderSVG.svg AlogixSVG.svg ABlogixSVG.svg AmpTableSVG.svg AntennasSVG.svg \ - AudioSVG.svg \ + AntiqueClockSVG.svg \ AudioSVG.svg \ BipSVG.svg BtreeSVG.svg ByteSVG.svg ButtonsSVG.svg \ - CanLogicSVG.svg CctTableSVG.svg ConnSVG.svg CountingSVG.svg CrossbarSVG.svg \ - CrowSVG.svg CrullerSVG.svg CsourceSVG.svg \ - DecoderSVG.svg DemultiplexerSVG.svg DiodesSVG.svg DriveSVG.svg \ + CanLogicSVG.svg CctTableSVG.svg ConnSVG.svg ContactSVG.svg ContactsSVG.svg \ + CountingSVG.svg CrossbarSVG.svg CrowSVG.svg CrullerSVG.svg CsourceSVG.svg \ + DecoderSVG.svg DemultiplexerSVG.svg DiniSVG.svg DiodesSVG.svg DriveSVG.svg \ EmarrowsSVG.svg \ FlowSVG.svg FontsSVG.svg FusesSVG.svg GrayCodeSVG.svg GroundsSVG.svg \ HeadersSVG.svg HeathkitSVG.svg InclepsSVG.svg I2LSVG.svg JackSVG.svg \ @@ -42,8 +43,8 @@ CCTSVG = \ ex08SVG.svg ex09SVG.svg ex10SVG.svg ex11SVG.svg ex12SVG.svg \ ex15SVG.svg ex16SVG.svg ex17SVG.svg ex18SVG.svg ex21SVG.svg \ expSVG.svg fetSVG.svg graysurfSVG.svg lcctSVG.svg \ - pwrsupplySVG.svg quickSVG.svg randomSVG.svg recycleSVG.svg roseSVG.svg \ - sfgSVG.svg shapesSVG.svg paletteSVG.svg \ + pwrsupplySVG.svg quickSVG.svg randomSVG.svg recycleSVG.svg relaycoilSVG.svg \ + roseSVG.svg sfgSVG.svg shapesSVG.svg paletteSVG.svg \ thyristorSVG.svg ujtSVG.svg wormSVG.svg XORSVG.svg Np.svg examplesSVG.html: examplesSVG.htmx @@ -54,7 +55,9 @@ examplesSVG.html: examplesSVG.htmx SED = sed -e '/^\%/d' TEST = test -tst: $(TEST).pic +tst: + if test -f test.pic; then printf "\n\nUsage: make clean tst\n\n"; exit 1; fi + m4 $(M4LIBS) test.m4 | $(SED) > test.pic $(DPIC) -v $(TEST).pic > $(TEST).svg m4 $(M4LIBS) $(TEST).m4 | $(SED) > $(TEST).pic $(DPIC) -v $(TEST).pic > $(TEST).svg @@ -63,6 +66,7 @@ tst: $(TEST).pic make tstSVG.html test.pic: + if test -f test.pic ; then echo "Usage: make clean tst" ; fi m4 $(M4LIBS) test.m4 | $(SED) > test.pic tstSVG.html: tstSVG.htmx $(TEST).svg @@ -74,6 +78,13 @@ tstSVG.html: tstSVG.htmx $(TEST).svg xst: Incleps.png +AntiqueClockSVG.svg: + m4 $(M4LIBS) AntiqueClockSVG.m4 | sed -e '/^\%/d' > AntiqueClockSVG.pic + $(DPIC) -v AntiqueClockSVG.pic > AntiqueClockSVG.svg + m4 $(M4LIBS) AntiqueClockSVG.m4 | sed -e '/^\%/d' > AntiqueClockSVG.pic + $(DPIC) -v AntiqueClockSVG.pic > AntiqueClockSVG.svg + grep '<\!-- width' AntiqueClockSVG.svg | sed -e 's%<\!-- *%%' -e 's% *-->%%' > AntiqueClockSVG.siz + InclepsSVG.svg: InclepsSVG.m4 m4 $(M4LIBS) $*.m4 | sed -e '/^\%/d' > $*.pic $(DPIC) -v $*.pic > $*.svg diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4 index 066d397ca25..348a6193171 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/PconnSVG.m4 @@ -24,8 +24,6 @@ P1: [ C3: pconnex(,ACF) with .w at last [].e+(0.2,0) `"(,ACF)"' at last [].s below - C4: pconnex(,P) with .w at last [].e+(0.2,0) - `"(,P)"' at (C4,last "") below C5: pconnex(U,D) with .w at last [].e+(0.2,0) `"(U,D)"' at last [].s below C6: pconnex(U,DF) with .w at last [].e+(0.2,0) @@ -37,7 +35,11 @@ P1: [ ] P2: [ - C9: pconnex(,G) + C4: pconnex(,P) + `"(,P)"' at last [].s below + C11: pconnex(,PF) with .w at last [].e+(0.2,0) + `"(,PF)"' at C11.s below + C9: pconnex(,G) with .w at C11.e+(0.2,0) `"(,G)"' at last [].s below C91: pconnex(,GF) with .w at last [].e+(0.2,0) `"(,GF)"' at last [].s below diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/RelaySVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/RelaySVG.m4 index df633176b01..f4b8152a50c 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/RelaySVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/RelaySVG.m4 @@ -1,80 +1,47 @@ .PS -# `Relay.m4' -cct_init(svg_font(sans-serif,11bp__)) - -{contact - {`"contact"' wid 0.8 at last [].s+(0,-0.2) - "svg_it(P)" rjust at last [].P.w - "svg_it(O)" ljust at last [].O - "svg_it(C)" ljust at last [].C } - move right_ 1.0; contact(R,) - {`"contact(,R)"' at last [].s+(0,-0.2) - "svg_it(P)" rjust at last [].P.w - "svg_it(O)" ljust at last [].O - "svg_it(C)" ljust at last [].C } - move right_ 1.0; contact(P) - {`"contact(P)"' at last [].s+(0,-0.2) - "svg_it(P)" rjust at last [].P.w - "svg_it(O)" ljust at last [].O - "svg_it(C)" ljust at last [].C } - move right_ 1.0; contact(O,); {`"contact(O,)"' at last [].s+(0,-0.2)} - move right_ 1.0; contact(C,); {`"contact(C,)"' at last [].s+(0,-0.2)} -} -move down 0.8 -right_ -{contact(I) - {`"contact(I)"' at last [].s+(0,-0.2) - "svg_it(P)" rjust at last [].P.w - "svg_it(O)" ljust at last [].O.e - "svg_it(C)" ljust at last [].C.e } - move right_ 1.0; contact(RI) - {`"contact(RI)"' at last [].s+(0,-0.2) - "svg_it(P)" rjust at last [].P.w - "svg_it(O)" ljust at last [].O.e - "svg_it(C)" ljust at last [].C.e } - move right_ 1.0; contact(PI) - {`"contact(PI)"' at last [].s+(0,-0.2) - "svg_it(P)" rjust at last [].P.w - "svg_it(O)" ljust at last [].O.e - "svg_it(C)" ljust at last [].C.e } - move right_ 1.0; contact(OI); {`"contact(OI)"' at last [].s+(0,-0.2)} - move right_ 1.0; contact(CI); {`"contact(CI)"' at last [].s+(0,-0.2) wid 1} -} -move down 1.3 -right_ -{ -relay - {"svg_it(V1)" rjust at last [].V1 +# RelaySVG +cct_init +svg_font(sans-serif,10bp__) + +skip = 1.1 + +R1:relay + {"svg_it(V1)" wid 0.16 rjust at last [].V1 "svg_it(V2)" ljust at last [].V2 - "svg_it(P1)" rjust at last [].P1.w + "svg_it(P1)" rjust at last [].P1-(dotrad_,0) "svg_it(O1)" ljust at last [].O1 "svg_it(C1)" ljust at last [].C1 } -`"relay"' at last [].s+(0,-0.2) -relay(2) with .sw at last [].sw+(1.2,0) + S: "svg_tt(`relay')" at last [].s+(0,-0.2) + +R5:relay(2,CTh) with .sw at last [].sw+(skip,0) + { for_(1,2,1,` + "svg_it(P`'m4x)" rjust at last [].P`'m4x-(dotrad_,0) + "svg_it(C`'m4x)" ljust at last [].C`'m4x ') } + "svg_tt((2,CTh))" at (last [],S) + +R4:relay(2,O) with .sw at last [].sw+(skip,0) + {for_(1,2,1,` + "svg_it(P1)" rjust at last [].P1-(dotrad_,0) + "svg_it(O`'m4x)" ljust at last [].O`'m4x ')} + "svg_tt((2,O))" at (last [],S) + +R3:relay(2,PIAX) with .sw at last [].sw+(skip,0) {"svg_it(V1)" rjust at last [].V1 - "svg_it(V2)" ljust at last [].V2 - "svg_it(P1)" rjust at last [].P1.w - "svg_it(O1)" ljust at last [].O1 - "svg_it(C1)" ljust below at last [].C1 - "svg_it(P2)" rjust at last [].P2.w - "svg_it(O2)" ljust at last [].O2 - "svg_it(C2)" ljust at last [].C2 } -`"relay(2)"' at last [].s+(0,-0.2) -relay(2,RPI) with .sw at last [].sw+(1.2,0) + "svg_it(V2)" rjust at last [].V2 + for_(1,2,1,` + "svg_it(P`'m4x)" rjust at last [].P`'m4x-(dotrad_,0) + "svg_it(O`'m4x)" ljust at last [].O`'m4x+(dotrad_,0) + "svg_it(C`'m4x)" ljust at last [].C`'m4x+(dotrad_,-2pt__) ') } + "svg_tt((2,PIAX))" at (last [],S) + +R2:relay(2,R) with .sw at last [].sw+(skip,0) {"svg_it(V1)" rjust at last [].V1 - "svg_it(V2)" ljust at last [].V2 - "svg_it(P1)" rjust at last [].P1.w - "svg_it(O1)" wid 0.2 ljust at last [].O1.e - "svg_it(C1)" wid 0.2 ljust at last [].C1.e+(0,2pt__) - "svg_it(P2)" rjust at last [].P2.w - "svg_it(O2)" wid 0.2 ljust at last [].O2.e+(0,-2pt__) - "svg_it(C2)" wid 0.2 ljust at last [].C2.e } -`"relay(2,RIP)"' at last [].s+(0,-0.2) -relay(2,O) with .sw at last [].sw+(1.2,0) -`"relay(2,O)"' at last [].s+(0,-0.2) -relay(2,CT) with .sw at last [].sw+(1.2,0) -`"relay(2,CT)"' at last [].s+(0,-0.2) -} + "svg_it(V2)" wid 0.2 ljust at last [].V2 + for_(1,2,1,` + "svg_it(P`'m4x)" rjust at last [].P`'m4x-(dotrad_,0) + "svg_it(O`'m4x)" ljust at last [].O`'m4x + "svg_it(C`'m4x)" ljust at last [].C`'m4x ') } + "svg_tt(`relay(2,R)')" at (last [],S) - command "</g>" # end font + command "</g>)" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4 index 9c8aa65a1c3..022f4ced9fa 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ShiftRSVG.m4 @@ -1,13 +1,14 @@ .PS # ShiftR.m4 log_init(svg_font(sans-serif,11*0.9bp__)) +textoffset = textht/6 define(`lg_plen',3) -define(`customFF', - `FlipFlopX(wid 10*L_unit ht FF_ht*L_unit,, - : S;NE:CK;: R, N:PR, :Q;;ifelse(`$1',1,:Q), N:CLR, - ifelse(`$1',1,line right 5bp__ at 2nd last ""+(-7bp__,4bp__)))') +define(`customFF',`FlipFlopX(wid 10*L_unit ht FF_ht*L_unit,, + :S;NE:CK;:R, N:PR, :Q;;ifelse(`$1',1,:Q), N:CLR,, + ifelse(`$1',1, + line right textht with .end at 2nd last ""+(-textoffset,0.4*textht)))') F0: customFF(1) @@ -21,7 +22,7 @@ define(`customFF', NCLR: NOT_gate(right T.x-Serial.x from (Serial,F0.S1.end),N) "CLEAR" at NCLR.start rjust - line left textht*2.3 from last ""+(-0.3,0.6)*textht + line left textht*5 from last ""+(-textoffset,0.8*textht) CLK: NOT_gate(right T.x-Serial.x from NCLR.start+(0,-BUF_ht*3/2*L_unit)) "CLOCK" at CLK.start rjust diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SierpinskiSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SierpinskiSVG.m4 index 7fbf13bf15e..08d7fab1117 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SierpinskiSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SierpinskiSVG.m4 @@ -13,7 +13,7 @@ gen_init } } - r = 4 + r = 3 linethick = 0.2 #linethick = 1/2 /(1pt__) lw = linethick pt__ /2 @@ -35,20 +35,20 @@ gen_init define CayleyGraph { if $3 > 0 then { { line to Here+(cosd($2),sind($2))*($1) - exec sprintf("CayleyGraph(%g,%g,%g);",0.5*($1),$2,$3-1); } + exec sprintf("CayleyGraph(%g,%g,%g);", ($1)/2, $2, $3-1); } { line to Here+(cosd($2+90),sind($2+90))*($1) - exec sprintf("CayleyGraph(%g,%g,%g);",0.5*($1),$2+90,$3-1); } + exec sprintf("CayleyGraph(%g,%g,%g);", ($1)/2, $2+90, $3-1); } { line to Here+(cosd($2-90),sind($2-90))*($1) - exec sprintf("CayleyGraph(%g,%g,%g);",0.5*($1),$2-90,$3-1); } + exec sprintf("CayleyGraph(%g,%g,%g);", ($1)/2, $2-90, $3-1); } } } size = 2 depth = 6 for t=0 to 270 by 90 do { - line from (0,0) to (cosd(t),sind(t)); + line from (0,0) to (cosd(t),sind(t))*size/2; { exec sprintf("CayleyGraph(%g,%g,%g);",size/4,t,depth); } } - ] with .sw at last [].se+(-0.25,0) + ] scaled 3/4 with .sw at last [].se+(-0.25,0) .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SwitchesSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SwitchesSVG.m4 index 8808e5be277..04fc2f52c56 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SwitchesSVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/SwitchesSVG.m4 @@ -4,100 +4,116 @@ cct_init(svg_font(sans-serif,11bp__,2bp__)) textoffset = 3bp__ movewid = 0.25 -moveht = moveht*1.25 +# Row 1 right_; { - lswitch; rlabel(,"``lswitch''") + lswitch; {S:"svg_tt(`lswitch')" at last [].s+(0,-10bp__)} move right_ - lswitch(,,O); rlabel(,"`(,,O)'") + lswitch(,,O); {"svg_tt(`(,,O)')" at (last [],S)} move right_ - lswitch(,,C); rlabel(,"`(,,C)'") + lswitch(,,C); {"svg_tt(`(,,C)')" at (last [],S)} move right_ - lswitch(,,DA); rlabel(,"`(,,DA)'") + lswitch(,,DA); {"svg_tt(`(,,DA)')" at (last [],S)} move right_ - lswitch(,,DO); rlabel(,"`(,,DO)'") + lswitch(,,dDO); {"svg_tt(`(,,dDO)')" at (last [],S)} move right_ - lswitch(,,DC); rlabel(,"`(,,DC)'") + lswitch(,,uDC); {"svg_tt(`(,,uDC)')" at (last [],S)} } +# Row 2 move down; right_; { - lswitch(,,K); rlabel(,"`(,,K)'") + lswitch(,,K); {S:"svg_tt(`(,,K)')" at last [].s+(0,-10bp__)} move right_ - lswitch(,,KD); rlabel(,"`(,,KD)'") + lswitch(,,KD); {"svg_tt(`(,,KD)')" at (last [],S)} move right_ - lswitch(,,KOD); rlabel(,"`(,,KOD)'") + lswitch(,,KOD); {"svg_tt(`(,,KOD)')" at (last [],S)} move right_ - lswitch(,,KCD); rlabel(,"`(,,KCD)'") + lswitch(,,KCD); {"svg_tt(`(,,KCD)')" at (last [],S)} move right_ - bswitch; rlabel(,"``bswitch''") + bswitch; {"svg_tt(``bswitch'')" at (last [],S)} move right_ - bswitch(,,C); rlabel(,"`(,,C)'") + bswitch(,,C); {"svg_tt(`(,,C)')" at (last [],S)} } +# Row 3 move down; right_; { - S: dswitch(,,) - ifgpic(`{[line invis] at S.c+(0,-0.2)}') - rlabel(,"``dswitch=''") - { "`switch(,,,D)'" at last [].s + (0,-0.23) } - thinlines_ - { spline <- from 0.25 along_(S) up 0.1 then up 0.05 left 0.1 - "W" wid 8bp__ at Here+(-5bp__,0) - spline <- from S.c+(0,m4sc*2) up 0.1 then up 0.05 left 0.1 - "B" wid 5bp__ at Here+(-5bp__,0) } - thicklines_ - move right_ - S: dswitch(,,WdBK); rlabel(,"`(,,WdBK)'") - thinlines_ - { spline <- from tr_xy(0,-2) up 0.1 then up 0.10 left 0.1 - "dB" rjust - spline <- from tr_xy(4,-2) right 0.1 then right 0.05 up 0.15 - "K" above } - thicklines_ - move right_ - dswitch(,,WBuD); rlabel(,"`(,,WBuD)'") - move right_ - dswitch(,,WdBKF); rlabel(,"`(,,WdBKF)'") - move right_ - dswitch(,,WBL); rlabel(,"`(,,WBL)'") - move right_ - dswitch(,,WdBKL); rlabel(,"`(,,WdBKL)'") + D: dswitch(,,); {S: "svg_tt(`dswitch(,,)')" at last [].s+(0,-10bp__)} + thinlines_ + { spline <- from 0.25 along_(D) up 0.1 then up 0.05 left 0.1 + {"svg_tt(`W')" rjust} + spline <- from D.c+(0,m4sc*2) up 0.1 then up 0.05 left 0.1 + {"svg_tt(`B')" rjust }} + thicklines_ + move right_ + D: dswitch(,,WdBK); {"svg_tt(`(,,WdBK)')" at (last [],S)+(0,-4bp__)} + thinlines_ + { spline <- from tr_xy(0,-2) up 0.1 then up 0.10 left 0.1 + {"svg_tt(`dB')" rjust} + spline <- from tr_xy(4,-2) right 0.1 then right 0.05 up 0.15 + {"svg_tt(`K')" above }} + thicklines_ + move right_ + dswitch(,,WBmdDK); {"svg_tt(`(,,WBmdDK)')" at (last [],S)} + move right_ + dswitch(,,WBKTr); {"svg_tt(`(,,WBKTr)')" at (last [],S)} + move right_ + dswitch(,,WdBL); {"svg_tt(`(,,WdBL)')" at (last [],S+(0,-4bp__))} + move right_ + dswitch(,,WBCo); {"svg_tt(`(,,WBCo)')" at (last [],S)} } +# Row 4 move down; right_; { - dswitch(,,WBT); rlabel(,"`(,,WBT)'") + dswitch(,,WBKCo); {S: "svg_tt(`(,,WBKCo)')" at last [].s+(0,-10bp__)} move right_ - dswitch(,,WdBKC); rlabel(,"`(,,WdBKC)'") + dswitch(,,WBCb); {"svg_tt(`(,,WBCb)')" at (last [],S)} move right_ - dswitch(,,WBM); rlabel(,"`(,,WBM)'") + dswitch(,,WBDI); {"svg_tt(`(,,WBDI)')" at (last [],S)} move right_ - dswitch(,,WBCO); rlabel(,"`(,,WBCO)'") + dswitch(,,WBSd); {"svg_tt(`(,,WBSd)')" at (last [],S)} move right_ - dswitch(,,WBMP); rlabel(,"`(,,WBMP)'") + dswitch(,,WBFDI); {"svg_tt(`(,,WBFDI)')" at (last [],S)} move right_ - dswitch(,,WBoKCP); rlabel(,"`(,,WBoKCP)'") + dswitch(,,WBFSd); {"svg_tt(`(,,WBFSd)')" at (last [],S)} } - move down; right_; { - dswitch(,,WBCY); rlabel(,"`(,,WBCY)'") +# Row 5 + move down moveht*5/4; right_; { + dswitch(,,WBTh); {S: "svg_tt(`(,,WBTh)')" at last [].s+(0,-10bp__)} + move right_ + dswitch(,,WBKC); {"svg_tt(`(,,WBKC)')" at (last [],S)} + move right_ + dswitch(,,WBM); {"svg_tt(`(,,WBM)')" at (last [],S)} + move right_ + dswitch(,,WBCO); {"svg_tt(`(,,WBCO)')" at (last [],S)} + move right_ + dswitch(,,WBMP); {"svg_tt(`(,,WBMP)')" at (last [],S)} + move right_ + dswitch(,,WBoKCP); {"svg_tt(`(,,WBoKCP)')" at (last [],S)} + } +# Row 6 + move down moveht*5/4; right_; { + dswitch(,,WBCY); {S: "svg_tt(`(,,WBCY)')" at last [].s+(0,-10bp__)} move right_ - dswitch(,,WBCZ); rlabel(,"`(,,WBCZ)'") + dswitch(,,WBCZ); {"svg_tt(`(,,WBCZ)')" at (last [],S)} move right_ - dswitch(,,WBCE); rlabel(,"`(,,WBCE)'") + dswitch(,,WBCE); {"svg_tt(`(,,WBCE)')" at (last [],S)} move right_ - dswitch(,,WBRH); rlabel(,"`(,,WBRH)'") + dswitch(,,WBRH); {"svg_tt(`(,,WBRH)')" at (last [],S)} move right_ - dswitch(,,WBRdH); rlabel(,"`(,,WBRdH)'") + dswitch(,,WBRdH); {"svg_tt(`(,,WBRdH)')" at (last [],S)} move right_ - dswitch(,,WBRHH); rlabel(,"`(,,WBRHH)'") + dswitch(,,WBRHH); {"svg_tt(`(,,WBRHH)')" at (last [],S)} } +# Row 7 move down; right_; { - dswitch(,,WBMMR); rlabel(,"`(,,WBMMR)'") + dswitch(,,WBMMR); {S: "svg_tt(`(,,WBMMR)')" at last [].s+(0,-10bp__)} move right_ - dswitch(,,WBMM); rlabel(,"`(,,WBMM)'") + dswitch(,,WBMM); {"svg_tt(`(,,WBMM)')" at (last [],S)} move right_ - dswitch(,,WBMR); rlabel(,"`(,,WBMR)'") + dswitch(,,WBMR); {"svg_tt(`(,,WBMR)')" at (last [],S)} move right_ - dswitch(,,WBEL); rlabel(,"`(,,WBEL)'") + dswitch(,,WBEL); {"svg_tt(`(,,WBEL)')" at (last [],S)} move right_ - dswitch(,,WBLE); rlabel(,"`(,,WBLE)'") + dswitch(,,WBLE); {"svg_tt(`(,,WBLE)')" at (last [],S)} move right_ - dswitch(,,WdBKEL); rlabel(,"`(,,WdBKEL)'") + dswitch(,,WBoKEL); {"svg_tt(`(,,WBoKEL)')" at (last [],S)} } - command "</g>" # end font + command "</g>')" # end font .PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex02SVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex02SVG.m4 index 9ec72d8e2ae..ad2f7324fb7 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex02SVG.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/ex02SVG.m4 @@ -1,6 +1,7 @@ .PS # ex02.m4 cct_init +linewid = linewid*4/5 [ [ for angle = 0 to 315 by 45 do { Point_(angle) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx index d4f45ecdef7..91bc93f48e9 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/examplesSVG.htmx @@ -84,9 +84,10 @@ There are a number of other issues: giving reasonable dimensions in pixels but this has to be insterted into the <embed or <object line. A makefile does it easily but otherwise this could be tedious. - <li> The font face is not specified by default in these diagrams but is - inherited from the enclosing document. The default appearance of labels can - differ according to the browser. + <li> The default font face is not specified in all of these diagrams but is + inherited from the enclosing document, so the appearance of labels can + differ depend on the browser. Some of these diagrams set the font at + the beginning of the diagram source. <li> The <svg tag may require modification from the default used for this test. Dpic might be modified to allow the generation of custom headers but that has not yet been done. @@ -116,8 +117,8 @@ There are a number of other issues: m4tt`'svg_font(font-family="Times")</g><br> m4tt`'svg_font(font-family="Times" font-style="italic")</g><br> m4tt`'svg_font(style="font-family:Times; font-style:italic")</g> - <li>m4tt svg_tspan(</g>text attributes`'m4tt)</g>; - e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%")</g> + <li>m4tt svg_tspan(</g>text attributes, text`'m4tt)</g>; + e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%",XYZ)</g> <li>m4tt svg_it(</g>text`'m4tt)</g>: for italics <li>m4tt svg_tt(</g>text`'m4tt)</g>: for monospace (courier) <li>m4tt svg_norm(</g>text`'m4tt)</g>: for normal text @@ -267,8 +268,11 @@ cfig(AntennasSVG) cfig(AudioSVG) cfig(OpampSVG) cfig(XformSVG) -cfig(RelaySVG) cfig(NPDTSVG) +cfig(ContactSVG) +cfig(ContactsSVG) +cfig(relaycoilSVG) +cfig(RelaySVG) cfig(JackSVG) cfig(ConnSVG) cfig(PconnSVG) @@ -281,7 +285,7 @@ cfig(TgateSVG) cfig(NportSVG) cfig(NLGSVG) cfig(WindingsSVG) -cfig(ex01SVG) +cfig(ex01.m4) cfig(TimerSVG) cfig(OptoisoSVG) cfig(MixerSVG) @@ -294,6 +298,7 @@ cfig(MCSVG) cfig(ex10SVG) cfig(ThreeSVG) cfig(ex17SVG) +cfig(ex02SVG) cfig(ex12SVG) cfig(pwrsupplySVG) cfig(TTLnandSVG) @@ -306,7 +311,6 @@ cfig(DriveSVG) cfig(ex16SVG) cfig(ex03SVG) cfig(MotorControlSVG) -cfig(ex02SVG) cfig(RectifiersSVG) cfig(HeathkitSVG) cfig(lcctSVG) @@ -324,27 +328,27 @@ cfig(CanLogicSVG) cfig(AlogixSVG) cfig(ABlogixSVG) cfig(XORSVG) -cfig(paletteSVG) cfig(ex00SVG) +cfig(controlSVG) cfig(GrayCodeSVG) cfig(CrossbarSVG) cfig(ByteSVG) cfig(RotboxSVG) +cfig(ex06SVG) +cfig(ex09SVG) +cfig(ex05SVG) +cfig(LoglogSVG) cfig(randomSVG) cfig(expSVG) cfig(graysurfSVG) -cfig(CrullerSVG) cfig(shapesSVG) -cfig(ex09SVG) -cfig(ex05SVG) -cfig(controlSVG) -cfig(ex06SVG) -cfig(LoglogSVG) +cfig(AntiqueClockSVG) cfig(cscSVG) cfig(roseSVG) cfig(diamondSVG) cfig(wormSVG) cfig(ButtonsSVG) +cfig(DiniSVG) cfig(SierpinskiSVG) cfig(recycleSVG) cfig(ex15SVG) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/relaycoilSVG.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/relaycoilSVG.m4 new file mode 100644 index 00000000000..fc2bc2738f7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/relaycoilSVG.m4 @@ -0,0 +1,47 @@ +.PS +# relaycoil.m4 +cct_init + + spc = dimen_/3 +{ relaycoil; S: "svg_tt(`relaycoil')" at last [].s+(0,-20bp__) + { "svg_it(V1)" wid 15bp__ at last [].V1 rjust + "svg_it(V2)" at last [].V2 ljust } + K: relaycoil(NX) with .nw at last [].ne+(spc*4,0); "svg_tt((NX))" \ + at (last [],S) + { thinlines_ + spline <- from K.A1 left 7bp__ then up 4bp__ left 4bp__ + "svg_it(A1)" rjust + arrow <- from K.A2 left 10bp__; "svg_it(A2)" rjust + spline <- from K.A3 left 7bp__ then down 4bp__ left 4bp__ + "svg_it(A3)" rjust + spline <- from K.B1 right 7bp__ then up 4bp__ right 4bp__ + "svg_it(B1)" ljust + arrow <- from K.B2 right 10bp__; "svg_it(B2)" ljust + spline <- from K.B3 right 7bp__ then down 4bp__ right 4bp__ + "svg_it(B3)" ljust + thicklines_ + } + relaycoil(AXSR) with .nw at last [].ne+(spc*5,0); "svg_tt((AXSR))" \ + at (last [],S) + { "svg_it(V1)" at last [].V1 rjust; "svg_it(V2)" at last [].V2 rjust } + relaycoil(BXSR) with .nw at last [].ne+(spc*2,0); "svg_tt((BXSR))" \ + at (last [],S) + { "svg_it(V1)" at last [].V1 ljust; "svg_it(V2)" at last [].V2 ljust } + relaycoil(SR) with .nw at last [].ne+(spc*4,0); "svg_tt((SR))" at (last [],S) + relaycoil(SO) with .nw at last [].ne+(spc,0); "svg_tt((SO))" at (last [],S) + relaycoil(SOR) with .nw at last [].ne+(spc,0); "svg_tt((SOR))" at (last [],S) + } +{ + move down_ 3/4; right_ + relaycoil(HS); S: "svg_tt((HS))" at last [].s+(0,-12bp__) + relaycoil(NAC) with .nw at last [].ne+(spc,0); "svg_tt((NAC))" at (last [],S) + relaycoil(AC) with .nw at last [].ne+(spc,0); "svg_tt((AC))" at (last [],S) + relaycoil(ML) with .nw at last [].ne+(spc,0); "svg_tt((ML))" at (last [],S) + relaycoil(PO) with .nw at last [].ne+(spc,0); "svg_tt((PO))" at (last [],S) + relaycoil(RM) with .nw at last [].ne+(spc,0); "svg_tt((RM))" at (last [],S) + relaycoil(RH) with .nw at last [].ne+(spc,0); "svg_tt((RH))" at (last [],S) + relaycoil(TH) with .nw at last [].ne+(spc,0); "svg_tt((TH))" at (last [],S) + relaycoil(EL) with .nw at last [].ne+(spc,0); "svg_tt((EL))" at (last [],S) + } + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx index 1dd990c82a5..f15d09b7c71 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/tstSVG.htmx @@ -70,8 +70,8 @@ more basic. m4tt`'svg_font(font-family="Times")</g><br> m4tt`'svg_font(font-family="Times" font-style="italic")</g><br> m4tt`'svg_font(style="font-family:Times; font-style:italic")</g> - <li>m4tt svg_tspan(</g>text attributes`'m4tt)</g>; - e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%")</g> + <li>m4tt svg_tspan(</g>text attributes, text`'m4tt)</g>; + e.g. m4tt`'svg_tspan(font-style="italic" font-size="75%",XYZ)</g> <li>m4tt svg_it(</g>text`'m4tt)</g>: for italics <li>m4tt svg_tt(</g>text`'m4tt)</g>: for monospace (courier) <li>m4tt svg_norm(</g>text`'m4tt)</g>: for normal text diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/xx.html b/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/xx.html deleted file mode 100644 index 6b4881d450f..00000000000 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/svg/xx.html +++ /dev/null @@ -1,11 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> -<g> - <text x = "10" y = "25" font-size = "20"> - <tspan x = "10" y = "60"> - T<tspan dy="10">i+2</tspan> - <tspan dy="-10">= T</tspan><tspan dy="10">i</tspan> - <tspan dy="-10">+ T</tspan><tspan dy="10">i+1</tspan> - </tspan> - </text> - </g> -</svg> diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/testpdf.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/testpdf.tex index 823b297b343..7ff3664707f 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/testpdf.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/testpdf.tex @@ -6,7 +6,7 @@ % \documentclass[11pt]{article} \usepackage{ps4pdf} -\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} +\usepackage{siunitx} \PSforPDF{ \usepackage{pstricks} } \pagestyle{empty} \thispagestyle{empty} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/thyristor.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/thyristor.m4 new file mode 100644 index 00000000000..ecc6448bf39 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/thyristor.m4 @@ -0,0 +1,118 @@ +.PS +# `thyristor.m4' +cct_init + +define labels { { + "\sl $1" ht 11 pt__ $2 at last[].$1 + "\sl $3" $4 at last[].$3 + "\sl $5" $6 at last[].$5 + "\tt $7" ht 11 pt__ $9 at (last[].s+(0,$8)) } } + +down_ +Row1: [ + {thyristor + labels(A,above,K,below,G,ljust,`thyristor',-0.25,wid 0.75) } + + move right 0.50 ; down_ + {thyristor(,B) + labels(T1,above,T2,below,G,below ljust,`...(,B)',-0.35) } + + move right 0.50 ; down_ + {thyristor(down_ dimen_*0.8,BRK) + labels(T1,above,T2,below,G,below rjust,`...(,BRK)',-0.22) } + + move right 0.60 ; down_ + {thyristor(,BE) + labels(T1,above,T2,below,G,below ljust,`...(,BE)',-0.35) } + + move right 0.50 ; down_ + {thyristor(,A) at (Here,last []) + labels(A,above,K,below,G,ljust,`...(,A)',-0.35) } + + move right 0.50 ; down_ + {thyristor(,F) at (Here,last []) + labels(A,above,K,below,G,ljust,`...(,F)',-0.22) } + + move right 0.65 ; down_ + {thyristor(,BRE) + labels(T1,above,T2,below,G,below rjust,`...(,BRE)',-0.35) } + + move right 0.75 ; down_ + {thyristor(,UARE) at (Here,last []) + labels(A,above,K,below,G,rjust below,`...(,UARE)',-0.22) } + + move right 0.50 ; down_ + {thyristor(,AV,G: G+(0.1,0.1)) at (Here,last []) + thinlines_ + spline -> from last[].G left 0.05 then left 0.05 down 0.1 + thicklines_ + labels(A,above,K,below,G,ljust,`...(,AV)',-0.35) } + + move right 0.50 ; down_ + {thyristor(,IEC) + labels(A,above ljust,K,below ljust,G,ljust,`...(,IEC)',-0.22) } + ] +Row2: [ + down_ + {thyristor(,UAH) + labels(A,rjust above,K,rjust below,G,ljust,`...(,UAH)',-0.35,wid 0.65) } + + move right 0.55 ; down_ + {thyristor(,N) at (Here,last []) + labels(A,above,K,below,Ga,rjust,`...(,N)',-0.22) } + + move right 0.55 ; down_ + {thyristor(,UANRE) at (Here,last []) + labels(A,above,K,below,Ga,ljust above,`...(,UANRE)',-0.35) } + move right 0.55 ; down_ + {thyristor(,SCR) at (Here,last []) + labels(A,above,K,below rjust,G,below ljust,`...(,SCR)',-0.22) } + + move right 0.55 ; down_ + {thyristor(,SCRE) at (Here,last []) + labels(A,above,K,below,G,ljust below,`...(SCRE)',-0.35) } + + move right 0.65 ; down_ + {thyristor(,SCRRE) at (Here,last []) + labels(A,above,K,below,G,rjust below,`...(SCRRE)',-0.22) } + + move right 0.55 ; down_ + {thyristor(,SCS) at (Here,last []) + labels(A,above,K,below,G,ljust,`...(SCS)',-0.35) } + { "\sl Ga" rjust above at last[].Ga } + + move right 0.55 ; down_ + {thyristor(,SCSE) at (Here,last []) + labels(A,above,K,below,G,ljust below,`...(SCSE)',-0.22) } + { "\sl Ga" rjust above at last[].Ga } + + move right 0.65 ; down_ + {thyristor(,SUSE) at (Here,last []) + labels(A,above,K,below,G,rjust,`...(SUSE)',-0.35) } + + move right 0.65 ; down_ + {thyristor(,SBSE) at (Here,last []) + labels(T1,above,T2,below,G,rjust,`...(SBSE)',-0.22) } + + ] with .nw at Row1.sw + (0,-0.20) + +Twoterms: [ right_ + { scr(,,Q) ; `"\tt scr(,{,}Q)"' at last [].e ljust} + { "\sl Q.G" at Q.G above } + + move down 0.4; right_ + { scs(,,Q2) ; `"\tt scs(,{,}Q2)"' at last [].e ljust } + { "\sl Q2.G" at Q2.G above } + { "\sl Q2.Ga" at Q2.Ga below } + ] with .nw at Row2.sw+(0,-0.2) + + [ right_ + { sus(,RE,Q3) ; `"\tt sus(,RE,Q3)"' at last [].e ljust} + { "\sl Q3.G" at Q3.G above } + + move right_ 1.2 from last line.end + { sbs(,E,Q4) ; `"\tt sbs(,E,Q4)"' at last [].e ljust} + { "\sl Q4.G" at Q4.G below } + ] with .w at last [].e+(1.0,0) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/tikz.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/tikz.tex index df8ae91f82d..fc3f4c17dc2 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/tikz.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/tikz.tex @@ -1,6 +1,6 @@ \documentclass[11pt]{article} \usepackage{tikz} -\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} +\usepackage{siunitx} \usepackage[T1]{fontenc} \usepackage{boxdims} \addtolength{\textwidth}{2cm} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/tst.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/tst.tex index 46992a001f5..c4549a16314 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/tst.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/tst.tex @@ -4,7 +4,7 @@ \usepackage{pstricks,pst-slpe,pst-grad} \usepackage{boxdims} \usepackage{upgreek} -\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} +\usepackage{siunitx} \usepackage{amssymb} % %\addtolength{\textwidth}{2cm} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/tst1.tex b/Master/texmf-dist/doc/latex/circuit-macros/examples/tst1.tex index 95363d1d9cb..393c6751496 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/tst1.tex +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/tst1.tex @@ -1,7 +1,7 @@ %\documentclass{article} \documentclass[11pt]{article} \usepackage{graphicx} -\usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits} +\usepackage{siunitx} \usepackage{boxdims} \pagestyle{empty} diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/ujt.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/ujt.m4 new file mode 100644 index 00000000000..aa4e7084628 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/ujt.m4 @@ -0,0 +1,28 @@ +.PS +# `ujt.m4' +cct_init +dwn = 1.0 +dsep = 0.15 + +define(`demo_ujt',`Q: ujt(`$1',`$2',`$3',`$4') + "\sl B1" ifelse(`$5',,below,ljust) at last [].B1 + "{\sl E}sp_" at 1.5 between last [].Bulk.c and last [].E + "\sl B2" ifelse(`$5',,above,ljust) at last [].B2 + ') + +[demo_ujt(up_ dimen_,,,E,A) +`"{\tt ujt(up\_ dimen\_,{,},E)}"' wid 1.45 ht 0.1 at Q.s+(0,-0.15) ] + +[demo_ujt(,,P,) +`"{\tt ujt(,{,}P,)}"' at Q.s+(0.1,-dsep) below ] \ +with .Q.w at last [].Q.e+(0.85,0) + +[demo_ujt(,R,,) +`"{\tt ujt(,R,{,})}"' at Q.s+(0,-dsep) below] \ +with .Q.w at last [].Q.e+(0.8,0) + +[demo_ujt(,R,P,) +`"{\tt ujt(,R,P,)}"' at Q.s+(0,-dsep) below] \ +with .Q.w at last [].Q.e+(0.8,0) + +.PE diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/windows.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/windows.m4 index da6b9e0e512..1b2a904af06 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/windows.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/windows.m4 @@ -1,6 +1,7 @@ divert(-1) +# This file is used if the CUSTOM= function is turned on in Makefile -# Change the absolute Windwos path to your installation directory: +# Change the absolute Windows path to your installation directory: define(`NeedDpicTools',`if "dpictools" != "1" then { copy "D:\Dwight\lib\dpictools.pic" } define(`dfitcurve__') ') diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig b/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig index d567d99933c..386844bc5c7 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/xfig/xfiglib.fig @@ -6,7 +6,7 @@ Letter 100.00 Single -2 -# dpic version 2019.12.31 option -x for Fig 3.2 +# dpic version 2020.03.01 option -x for Fig 3.2 1200 2 6 0 0 3975 5025 6 0 0 3975 5025 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 b/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 index 3b8a60e40e8..9a5c596dce6 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/gpic.m4 @@ -1,12 +1,12 @@ divert(-1) gpic.m4 Initialization for gpic. -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`m4picprocessor',gpic) define(`m4postprocessor',tpic) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4 b/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4 index 90bb05d2d10..53d2004b43c 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/lib3D.m4 @@ -3,12 +3,12 @@ lib3D.m4 Macros for rotation, projection, and other operations on argument triples representing 3D vectors. -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`lib3D_') ifdef(`libgen_',,`include(libgen.m4)divert(-1)') diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 index f8a98a84c08..b213af9e91f 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 @@ -1,12 +1,12 @@ divert(-1) libcct.m4 -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`libcct_') ifdef(`libgen_',,`include(libgen.m4)divert(-1)') @@ -826,6 +826,16 @@ define(`memristor',`eleminit_(`$1') line to rvec_(max(0,rp_len/2-m4wd/2),0) } line invis to rvec_(rp_len,0)') + `pvcell( linespec, wid, ht )' +define(`pvcell',`eleminit_(`$1') + define(`m4wd',ifelse(`$2',,`dimen_/2',`($2)'))dnl + define(`m4ht',ifelse(`$3',,`dimen_/5',`($3)'))dnl + { line to rvec_(max(0,rp_len/2-m4wd/2),0) + {[lbox(m4wd,m4ht)] at rvec_(m4wd/2,0)} + {line from rvec_(0,-m4ht/2) to rvec_(m4wd/3,0) then to rvec_(0,m4ht/2)} + move to rvec_(m4wd,0); line to rvec_(max(0,rp_len/2-m4wd/2),0) } + line invis to rvec_(rp_len,0)') + `heater( linespec, nparts, wid, ht )' define(`heater',`eleminit_(`$1') define(`m4hn',ifelse(`$2',,4,`$2'))dnl @@ -874,9 +884,9 @@ eleminit_(`$1') { [ circle rad dimen_/5 ] at rvec_(rp_len/2,m4ng`'dimen_/3.2) } line invis to rvec_(rp_len,0) ') - `cbreaker( linespec, L|R, D|T|TS ) + `cbreaker( linespec, L|R, D|Th|TS ) circuit breaker to left or right of linespec, - D=with dots; T=thermal; TS=squared thermal' + D=with dots; Th=thermal; TS=squared thermal' define(`cbreaker',`ifinstr(`$3',T, `tbreaker($@)', `mbreaker($@)')') @@ -934,6 +944,7 @@ define(`gap',`eleminit_(`$1') line with midpoint arrowhead e.g. arrowline(up 1 dotted); llabel(,I_2)' define(`arrowline',`line ifelse(`$1',,`to rvec_(elen_,0)',`$1') + { eleminit_(from last line.start to last line.end) } { arrow from last line.start to last line.end \ chop lin_leng(last line)/2-arrowht/2 [box invis ht_ arrowwid wid_ arrowht] at last line.c }') @@ -1055,8 +1066,11 @@ define(`antenna',`[ T: Here `switch( linespec,L|R,[O|C][D],L|B|D ) Wrapper for bswitch, lswitch, dswitch R=right orientation (default L=left) - if arg4=blank or L: arg3 = [O|C][D][K][A] - D=dotted points; K=closed switch; + if arg4=blank or L: + arg3 = [O|C][D][K][A] + D = circle at contact and hinge (dD = hinge + only, uD = contact only) + K=closed switch; A=arrowhead on switch blade; O=opening arrow; C=closing arrow if arg4=B (button switch): arg3 = O|C @@ -1096,8 +1110,10 @@ define(`bswitch',`eleminit_(`$1') dnl `lswitch( linespec,L|R,chars ) knife switch R=right orientation (default L=left) - chars=[O|C][D][K][A] - D=dotted points; K=closed switch; + chars=[O|C][[ud]D][K][A] + D = circle at contact and hinge (dD = hinge + only, uD = contact only) + K=closed switch; A=arrowhead on switch blade; O=opening arrow; C=closing arrow' define(`lswitch',`eleminit_(`$1') dnl @@ -1112,7 +1128,6 @@ define(`lswitch',`eleminit_(`$1') dnl line from rvec_(dimen_/3,0) to rvec_(dimen_/3,ifelse(`$2',R,-)dotrad_)}', `{ifinstr(`$3',A,arrow m4c_l,line) \ to rvec_(dimen_/4,ifelse(`$2',R,-)dimen_/4)}') - sc_draw(`dna_',D,`dot(,,1) define(`m4d',1)') sc_draw(`dna_',C,`{ arc <- m4c_l ifelse(`$2',R,,`c')cw \ from rvec_(Rect_(dimen_/4,ifelse(`$2',R,,-)m4k))\ to rvec_(Rect_(dimen_/4,ifelse(`$2',R,-)60)) \ @@ -1121,14 +1136,17 @@ define(`lswitch',`eleminit_(`$1') dnl from rvec_(Rect_(dimen_/4,ifelse(`$2',R,,-)10))\ to rvec_(Rect_(dimen_/4,ifelse(`$2',R,-)75)) \ with .c at rvec_(Rect_(-dimen_/4,ifelse(`$2',R,-)(75-10)/2)) }') } - { line from rvec_(rp_len/2+dimen_/6,0) \ - to rvec_(rp_len,0) - ifelse(m4d,-1,,`dot(at last line.start,,1)') } + {{line from rvec_(rp_len/2+dimen_/6,0) \ + to rvec_(rp_len,0) } + sc_draw(`dna_',D, + `ifelse(m4a,u,,`dot(at rvec_(rp_len/2-dimen_/6,0),,1)') + ifelse(m4a,d,,`dot(at last line.start,,1)')') } { [box invis ht_ dimen_/4+m4cs wid_ dimen_/3] \ with .c at rvec_(rp_len/2,ifelse(`$2',R,-)(m4v-(m4cs))/2)} arrowht = m4t1 ; arrowwid = m4t2; ifelse(`$4',,,`{`$4'}') line to rvec_(rp_len,0) invis ') + `dswitch(linespec,R,W[ud]B[K] chars) Comprehensive IEEE-IEC single-pole switch: arg2=R: orient to the right of drawing dir @@ -1136,14 +1154,17 @@ define(`lswitch',`eleminit_(`$1') dnl blank means WB by default W=baseline B=contact blade + Bm= mirror blade Bo=contact blade more widely open dB=contact blade to the right of direction K=vertical closing contact line use WdBK for a normally-closed switch - + Cb = circuit breaker function (IEC S00219) + Co = contactor function (IEC S00218) C = external operating mechanism D = circle at contact and hinge (dD = hinge only, uD = contact only) + DI = Disconnector; isolator (IEC S00288) E = emergency button EL = early close (or late open) LE = late close (or early open) @@ -1160,7 +1181,9 @@ define(`lswitch',`eleminit_(`$1') dnl O = hand operation button P = pushbutton R = time-delay operating arm - T = thermal control linkage + Sd = Switch-disconnector + Th = thermal control linkage + Tr = tripping Y = pull switch Z = turn switch' define(`dswitch',`eleminit_(`$1') @@ -1171,6 +1194,13 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl { line to tr_xy(-4,0) line from tr_xy(4,0) \ to 2nd last line.end + sc_draw(`dna_',Bm, + `define(`m4c',ifelse(m4a,d,-))dnl + M4B: line from tr_xy(-4,0) \ + to tr_xy(5.0,m4c`'4.5) + line invis from M4B.start to M4B.end chop 0 chop -m4_xyU*5/4 + m4fshade(0,circle rad m4_xyU*5/4 at last line .end) + M4Q: 2 between M4_xyO and M4B.c') sc_draw(`dna_',Bo, `define(`m4c',ifelse(m4a,d,-))dnl M4B: line from tr_xy(-4,0) \ @@ -1179,8 +1209,17 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl sc_draw(`dna_',B, `define(`m4c',ifelse(m4a,d,-))dnl M4B: line from tr_xy(-4,0) \ - to tr_xy(5.5,m4c`'4) + to tr_xy(5.0,m4c`'4.5) M4Q: 2 between M4_xyO and M4B.c') + sc_draw(`dna_',Cb, + `line from tr_xy(2,-2) to tr_xy(6, 2) + line from tr_xy(2, 2) to tr_xy(6,-2) + M4Q: tr_xy(0,-2) ') + sc_draw(`dna_',Co,`ifelse(m4R,-, + `M4Arc: arc ifelse(m4c,-,,c)cw from tr_xy(4,0) \ + to tr_xy(8,0) with .c at tr_xy(6,0)', + `M4Arc: arc ifelse(m4c,-,c)cw from tr_xy(4,0) \ + to tr_xy(8,0) with .c at tr_xy(6,0)') ') sc_draw(`dna_',MMR, `line from tr_xy(6,1.16) \ to tr_xy(4,0) \ @@ -1193,6 +1232,9 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl `line from tr_xy(5,0) \ to tr_xy(4,0) \ then to tr_xy(6,-1.16)') + sc_draw(`dna_',DI, + `line from tr_xy(4,2) to tr_xy(4,-2) + M4Q: tr_xy(0,-2) ') sc_draw(`dna_',D, `ifelse(m4a,u,,`dot(at tr_xy(-4,0),,1)') ifelse(m4a,d,,`dot(at tr_xy(4,0),,1)')') @@ -1208,7 +1250,7 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl `line from tr_xy(4,0) \ to tr_xy(4,m4c`'5)') sc_draw(`dna_',F, - `M4dT: 3/16 along_(M4B); M4dQ: 11/16 along_(M4B) + `M4dT: 1/8 along_(M4B); M4dQ: 5/8 along_(M4B) line from M4dT to M4dT + ta_xy(neg_(m4c)1/2,1) \ then to M4dQ + ta_xy(neg_(m4c)1/2,1) \ then to M4dQ + ta_xy(m4c`'1/2,-1) \ @@ -1219,7 +1261,12 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl line from 5/16 along_(M4B) \ to M4dT + ta_xy(neg_(m4e)1,ifelse(m4c,m4e,,-)2) \ then to M4dT') - sc_draw(`dna_',T, + sc_draw(`dna_',Sd, + `dot(at tr_xy(4,0),m4_xyU*3/2,1) + line from tr_xy(4,2)+vec_(m4_xyU*3/2,0) \ + to tr_xy(4,-2)+vec_(m4_xyU*3/2,0) + M4Q: tr_xy(0,-2) ') + sc_draw(`dna_',Th, `define(`m4t',ifelse(m4a,d,-))dnl M4T: M4B.c+ta_xy(0,m4t`'12) line from M4B.c to M4B.c+ta_xy(0,m4t`'4.5) \ @@ -1227,6 +1274,13 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl then to M4B.c+ta_xy(3,m4t`'7.5) \ then to M4B.c+ta_xy(0,m4t`'7.5) \ then to M4T ') + sc_draw(`dna_',Tr, + `m4angtmp = rp_ang; point_(lin_ang(M4B)) + M4dT1: 0.4 along_(M4B); M4dT2: 0.65 along_(M4B) + m4dTr = distance(M4dT1,M4dT2) + move to M4dT1+vec_(0,m4c`'m4dTr/2) + m4fshade(0,lbox(m4dTr,m4dTr)) + point_(m4angtmp) ') sc_draw(`dna_',M, `define(`m4t',ifelse(m4a,d,-))dnl M4T: M4B.c+ta_xy(0,m4t`'12) @@ -2238,29 +2292,31 @@ define(`m4label',`dnl `{m4lstring(`$3',"sp_`'iflatex(`$ `$3'$',`$3')`'sp_") \ at last [].e_ $5 ljust_ $6};')dnl ') - `Labels for oblique or aligned elements - dlabel(long,lateral,label,label,label,chars) - long, lateral: dispacement with respect to - drawing direction + `dlabel(long,lateral,label,label,label,chars) + Labels for oblique or aligned elements + long, lateral: dispacement from center + with respect to drawing direction chars: X displacement is from the centre of the last line rather than the centre of the last [] L,R,A,B align labels ljust, rjust, above, or below (absolute) respectively' define(`dlabel',`ifsvg(`changecom(,)')dnl + define(`m4long_',`ifelse(`$1',,`dimen_',`($1)')')dnl + define(`m4lat_',`ifelse(`$2',,`10bp__',`($2)')')dnl ifelse(`$3',,, `{m4lstring(`$3',"iflatex(`$ `$3'$',` $3')") \ - at last ifinstr(`$6',X,line,[]).c+vec_(-(`$1'),`$2') \ + at last ifinstr(`$6',X,line,[]).c+vec_(-m4long_,m4lat_) \ ifinstr(`$6',L,ljust,`$6',R,rjust) dnl ifinstr(`$6',A,above,`$6',B,below) };') dnl ifelse(`$4',,, `{m4lstring(`$4',"iflatex(`$ `$4'$',` $4')") \ - at last ifinstr(`$6',X,line,[]).c+vec_(0,`$2') \ + at last ifinstr(`$6',X,line,[]).c+vec_(0,m4lat_) \ ifinstr(`$6',L,ljust,`$6',R,rjust) dnl ifinstr(`$6',A,above,`$6',B,below) };') dnl ifelse(`$5',,, `{m4lstring(`$5',"iflatex(`$ `$5'$',` $5')") \ - at last ifinstr(`$6',X,line,[]).c+vec_(`$1',`$2') \ + at last ifinstr(`$6',X,line,[]).c+vec_(m4long_,m4lat_) \ ifinstr(`$6',L,ljust,`$6',R,rjust) dnl ifinstr(`$6',A,above,`$6',B,below) };') ifsvg(`changecom(`#',)')') @@ -2462,48 +2518,264 @@ define(`m4xR',ifinstr(`$2',R,R))define(`m4SR',ifelse(m4xR,R,-))dnl DL: line dashed to rvec_(0,m4SR`'(m4np-3/4)*dimen_/2)') `$3']') - `relay(npoles,chars,[L|R]) + + `relay(npoles,chars) arg1: Number of poles (max 10) chars: + any of the relaycoil options and: O = normally open C = normally closed - P = three position - neither = double-throw (default) - L = drawn left (default) - R = drawn right - T = thermal - arg3: deprecated, kept for compatibility + P = three-position + none of above = double-throw (default) L = drawn left (default) - R = drawn right ' -define(`relay',`[ define(`m4n',`ifinstr(`$2',R,-,`$3',R,-,0+)') -V1: Here - L1: line to rvec_(dimen_/5,0) - Box: lbox(dimen_/5,dimen_/2) - ifinstr(`$2',T,`{move to rvec_(-dimen_/10,0) - line from rvec_(-dimen_/20,dimen_/6) \ - to rvec_(-dimen_/20,dimen_/20) \ + R = drawn to right of drawing direction + Th = thermal ' +define(`relay',`[ define(`m4pm',`ifinstr(`$2',R,-)')dnl + Coil: relaycoil(`$2') define(`m4rel',rcdna_) + V1: Coil.V1 + V2: Coil.V2 + sc_draw(m4rel,Th, + `{move to Coil #rvec_(-dimen_/8,0) + line from rvec_(-dimen_/20,dimen_/6) \ + to rvec_(-dimen_/20,dimen_/20) \ then to rvec_(dimen_/20,dimen_/20) \ - then to rvec_(dimen_/20,-dimen_/20) \ + then to rvec_(dimen_/20,-dimen_/20) \ then to rvec_(-dimen_/20,-dimen_/20) \ - then to rvec_(-dimen_/20,-dimen_/6)}') - L2: line to rvec_(ifinstr(`$2',P,,2*)dimen_/5,0) -V2: Here - move to V2+vec_(0,m4n (dimen_/4+dimen_/5)) - m4_contacts(1,ifelse(`$1',,1,`$1'), - ifinstr(`$2',O,O,`$2',C,C)`'ifinstr(`$2',P,P)`'ifinstr(`$2',I,I), - ifinstr(`$3',R,R,`$2',R,R)) - ifelse(`$1',,,`ifelse(eval(`$1'>1),1,`DL: line dashed \ - from P1+vec_(dimen_*0.261,-(m4n dimen_/10)) \ - to P`'ifelse(`$1',,1,`$1')+vec_(dimen_*0.261,m4n dimen_/10)')') - `$4'] ') -define(`m4_contacts',`contact(`$3',`$4') with .O at Here - define(`m4v',`ifelse(`$1',,1,`$1')')dnl - P`$1': circle invis rad dotrad_ at last [].P - ifelse(`$3',O,,C`$1': last [].C) - ifelse(`$3',C,,O`$1': last [].O) - ifelse(m4v,`$2',, - `move to last[].C+(0,m4n dimen_/5) - ifelse(eval(m4v<11),1,`m4_contacts(incr(m4v),`$2',`$3',`$4')')')') + then to rvec_(-dimen_/20,-dimen_/6)}') + Cs: contacts(ifelse(`$1',,1,`$1'),D`'m4rel) with .O1 at Coil.B2 + \ + vec_(ifinstr(m4rel,P,-dimen_/5,0)+dimen_/4,m4pm`'(dimen_/4+dimen_/5)) + for_(1,ifelse(`$1',,1,`$1'),1, + `P`'m4x: Cs.P`'m4x + C`'m4x: Cs.C`'m4x + O`'m4x: Cs.O`'m4x') + `$3'] ') + + `contacts(npoles,chars) + chars: + P= three position + O|C= normally open, normally closed (default) + R= right orientation (default left) + I= open circles for contacts + T= T contacts + U= U contacts + D= dashed line across armatures' + `e.g. contacts(1,5,O)' +define(`contacts',`[ + define(`m4np',`ifelse(`$1',,1,`$1')')dnl + ifelse(eval(m4np>10),1,`define(`m4np',10)')dnl + for_(1,m4np,1, + `K`'m4x: contact(`$2') with .O at Here + P`'m4x: circle invis rad dotrad_ at last [].P + C`'m4x: last [].C + O`'m4x: last [].O + ifelse(m4x,m4np,,`move to last[].C+vec_(0,m4pm dimen_/4)')') + ifelse(eval(m4np>1),1,`ifinstr(`$2',D, + `DL: line dashed from K1.A.c to K`'m4np.A.c chop -dimen_/10')') + `$3'] ') + + `contact(chars [,R]) Relay contact switch + Arg 2 deprecated, kept for compatibility + chars: + O|C= normally open, normally closed (default) + I= open circles for contacts + P= three position + R= right orientation (default left) + T= T contacts + U = line contact' +define(`contact',`[ dnl + define(`m4pm',`ifelse(ifinstr(`$1',R,R,`$2',R,R),R,-)')dnl + define(`m4dr',`dotrad_')define(`m4TL',dimen_/12)dnl + P: dot(,m4dr,1) + T: P+vec_(dimen_/2-dimen_/12,0) + ifinstr(`$1',P,`ifinstr( + `$1',I, + `{C: dot(at T+vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,1)} + {O: dot(at T-vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,1)} + A: line from P to ifinstr( + `$1',O,`(LCtangent(P,O,dotrad_+lthick/2)) chop m4dr chop -m4dr', + `$1',C,`(LCtangent(P,C,dotrad_+lthick/2,R)) chop m4dr chop -m4dr', + `P+vec_(dimen_/2,0) chop m4dr chop 0')', + `$1',U, + `{C: T+vec_(m4TL*2,m4pm`'(dimen_/6)) + line from C to C-vec_(2*m4TL,0)} + {O: T+vec_(m4TL*2,m4pm`'(-dimen_/6)) + line from O to O-vec_(2*m4TL,0)} + A: line from P to ifinstr( + `$1',O,`O-vec_(2*m4TL-dimen_/27,0) chop m4dr chop -m4dr', + `$1',C,`C-vec_(2*m4TL-dimen_/27,0) chop m4dr chop -m4dr', + `P+vec_(dimen_/2,0) chop m4dr chop 0')', + `$1',T, + `{CC: T+vec_(0,m4pm`'(dimen_/8+m4TL*2/3)) + C: line from CC+vec_(0,-m4TL) to CC+vec_(0,m4TL) } + {OO: T-vec_(0,m4pm`'(dimen_/8+m4TL*2/3)) + O: line from OO+vec_(0,-m4TL) to OO+vec_(0,m4TL) } + A: line from P to ifinstr( + `$1',O,`1/6 between O.end and O.start chop m4dr chop -m4dr', + `$1',C,`1/6 between C.start and C.end chop m4dr chop -m4dr', + `P+vec_(dimen_/2,0) chop m4dr chop 0')', + `{AC: arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ + from T+vec_(0,m4pm`'dimen_/8) to T+vec_(0,m4pm`'dimen_*3/8) \ + then to T+vec_(dimen_/5,m4pm`'dimen_*3/8) + C: Here} + {AO: arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ + from T-vec_(0,m4pm`'dimen_/8) to T+vec_(0,-(m4pm`'dimen_*3/8)) \ + then to T+vec_(dimen_/5,-(m4pm`'dimen_*3/8)) + O: Here} + A: line from P to ifinstr( + `$1',O,`AO.start chop m4dr chop -m4dr', + `$1',C,`AC.start chop m4dr chop -m4dr', + `P+vec_(dimen_/2,0) chop m4dr chop 0')') ', # end of P + `A: line from P to P+vec_(dimen_/2,0) chop m4dr chop 0 + define(`m4CO', + `ifinstr(`$1',C,`ifinstr(`$1',O,O)C',`ifinstr(`$1',O,O,OC)')')dnl + ifinstr(m4CO,C, + `move to T + ifinstr( + `$1',I, + `{ C: dot(at rvec_(0,m4pm`'(m4dr+lthick/2)),m4dr,1) } + ifinstr(m4CO,O,,`O: Here')', + `$1',U, + `{C: T+vec_(m4TL*2,m4pm`'(dimen_/6)) + line from C to C-vec_(2*m4TL,0)} + ifinstr(m4CO,O,,`O: Here')', + `$1',T, + `CC: rvec_(0,m4pm`'(m4TL*2/3)) + { C: line from CC+vec_(0,-m4TL) to CC+(0,m4TL) } + ifinstr(m4CO,O,,`O: T') ', + `{AC: arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ + to rvec_(0,m4pm`'dimen_/4) \ + then to rvec_(dimen_/5,m4pm`'dimen_/4) + C: Here } + O:rvec_(dimen_/5,0)') ') + ifinstr(m4CO,O, + `move to T+vec_(0,-(m4pm`'dimen_/8)) + ifinstr( + `$1',I, + `{O: dot(at rvec_(0,m4pm`'(-m4dr*2)),m4dr,1) } + ifinstr(m4CO,C,,`C: T ')', + `$1',U, + `{O: T+vec_(m4TL*2,m4pm`'(-dimen_/6)) + line from O to O-vec_(2*m4TL,0)} + ifinstr(m4CO,C,,`C: T ')', + `$1',T, + `{ OO: (rvec_(0,m4pm`'(-m4TL*2/3))) + O: line from OO+vec_(0,-m4TL) to OO+vec_(0,m4TL)} + ifinstr(m4CO,C,,`C: T ')', + `{AO: arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ + to rvec_(0,-(m4pm`'dimen_/4)) \ + then to rvec_(dimen_/5,-(m4pm`'dimen_/4)) + O: Here } + ifinstr(m4CO,C,,`C: T+vec_(dimen_/5,0)') ') ') + ') + `$3'] ') + + + `relaycoil( chars, wid, ht, U|D|L|R|degrees ) + chars: + X or default: external lines from A2 and B2 + AX external lines at positions A1,A3 + BX external lines at positions B1,B3 + NX no lines at positions A1,A2,A3,B1,B2,B3 + SO slow operating + SOR slow operating and release + SR slow release + HS hight speed + HS hight speed + NAC unaffected by AC current + AC AC current + ML mechanically latched + PO polarized + RM remanent + RH remanent + TH thermal + EL electronic' +define(`relaycoil',`[ ifelse(`$4',,,`setdir_(`$4')') + define(`m4wd',ifelse(`$2',,`dimen_/4',`($2)'))dnl + define(`m4ht',ifelse(`$3',,`dimen_/2',`($3)'))dnl + define(`m4LL',`ifinstr(`$4',NX,0,dimen_/3)')dnl + define(`rcdna_',ifinstr(`$1',AX,,`$1',BX,,`$1',X,,X)`$1')dnl + { lbox( m4wd, m4ht ) } + { A1: rvec_(0,m4ht/4) + A2: Here; V1: A2 + A3: rvec_(0,-m4ht/4) } + { B1: rvec_(m4wd,m4ht/4) + B2: rvec_(m4wd,0); V2: B2 + B3: rvec_(m4wd,-m4ht/4) } + sc_draw(`rcdna_',AX, + `{ line from A1 to A1+vec_(-dimen_/3,0); V1: Here + line from A3 to A3+vec_(-dimen_/3,0); V2: Here }') + sc_draw(`rcdna_',BX, + `{ line from B1 to B1+vec_( dimen_/3,0); V1: Here + line from B3 to B3+vec_( dimen_/3,0); V2: Here }') + sc_draw(`rcdna_',NX) + sc_draw(`rcdna_',X, + `{ line to rvec_(-dimen_/3,0); V1: Here + move to B2; line to rvec_(dimen_/3,0); V2: Here }') + sc_draw(`rcdna_',SOR, + `{ move to rvec_(0,-(m4ht*5/8)); {lbox(m4wd,m4ht/4)} + {line from rvec_(0,-m4ht/8) to rvec_(m4wd, m4ht/8)} + {line from rvec_(0, m4ht/8) to rvec_(m4wd,-m4ht/8)} + {move to rvec_(0,-(m4ht)*3/8); m4fshade(0,lbox(m4wd,m4ht/4))} + {move to rvec_(0,-(m4ht)/8) + {line to rvec_(0,-m4ht/8)} + {line from rvec_(m4wd,0) to rvec_(m4wd,-m4ht/8)}} }') + sc_draw(`rcdna_',SO, + `{ move to rvec_(0,-(m4ht*5/8)); m4fshade(0,lbox(m4wd,m4ht/4)) }') + sc_draw(`rcdna_',SR, + `{ move to rvec_(0,-(m4ht*5/8)); {lbox(m4wd,m4ht/4)} + {line from rvec_(0,-m4ht/8) to rvec_(m4wd, m4ht/8)} + {line from rvec_(0, m4ht/8) to rvec_(m4wd,-m4ht/8)} }') + sc_draw(`rcdna_',HS, + `{ move to rvec_(0,-(m4ht*5/8)); lbox(m4wd,m4ht/4) } + { move to rvec_(m4wd/2,-(m4ht/2)); line to rvec_(0,-m4ht/4)} ') + sc_draw(`rcdna_',NAC, + `{ m4fshade(0,lbox(m4wd/4,m4ht)) } + { move to rvec_(m4wd*3/4,0); m4fshade(0,lbox(m4wd/4,m4ht)) } ') + sc_draw(`rcdna_',AC, + `{ move to rvec_(0,-(m4ht*3/4)); { lbox(m4wd,m4ht/2) } + move to rvec_(m4wd/2,0) + ifgpic( + `arc rad m4wd/3 cw from Here-(m4wd*2/3,0) \ + to Here with .c at Here-(m4wd/3,0) + arc rad m4wd/3 ccw from Here to Here+(m4wd*2/3,0) with .c \ + at Here+(m4wd/3,0)', + ` sinusoid(m4wd/3,twopi_/(m4wd*2/3),pi_/2,-m4wd/3,m4wd/3) \ + with .Origin at Here ') }') + sc_draw(`rcdna_',ML, + `{ move to rvec_(0,-(m4ht*11/16)); { lbox(m4wd,m4ht*3/8) } + line from rvec_(0,m4ht*3/16) to rvec_(m4wd/2,-m4ht*3/16) \ + then to rvec_(m4wd,m4ht*3/16) } ') + sc_draw(`rcdna_',PO, + `{ move to rvec_(0,-(m4ht*5/8)); { lbox(m4wd,m4ht/4) } + m4fshade(0, line to rvec_(0,m4ht/8) \ + then to rvec_(m4wd,m4ht/8) \ + then to rvec_(m4wd,-m4ht/8) \ + then to rvec_(m4wd*3/4,-m4ht/8) \ + then to rvec_(m4wd*3/4,0) \ + then to rvec_(m4wd/4,0) \ + then to rvec_(m4wd/4,-m4ht/8) \ + then to rvec_(0,-m4ht/8) \ + then to Here) } ') + sc_draw(`rcdna_',RM, + `{ move to rvec_(0,-(m4ht*5/8)); { lbox(m4wd,m4ht/4) } + line from rvec_(0,m4ht/8) to rvec_(m4wd,-m4ht/8) }') + sc_draw(`rcdna_',RH, + `{ move to rvec_(0,-(m4ht*11/16)); { lbox(m4wd,m4ht*3/8) } + line from rvec_(m4wd/4,m4ht/8) \ + to rvec_(m4wd/4,m4ht/32) \ + to rvec_(m4wd*3/4,-m4ht/32) \ + to rvec_(m4wd*3/4,-m4ht/8) }') + sc_draw(`rcdna_',TH, + `{ line to rvec_(m4wd/4,0) then to rvec_(m4wd/4,m4ht/4) \ + then to rvec_(m4wd*3/4,m4ht/4) \ + then to rvec_(m4wd*3/4,0) \ + then to rvec_(m4wd,0) }') + sc_draw(`rcdna_',EL, + `{ { line from rvec_(m4wd/4,0) to rvec_(m4wd*3/4,0) } + { line from rvec_(m4wd*3/8,0) to rvec_(m4wd*3/16,m4ht*3/16) } + { line from rvec_(m4wd*5/8,0) to rvec_(m4wd*13/16,m4ht*3/16) } + { line from rvec_(m4wd/2,0) to rvec_(m4wd/2,-m4ht/4) } }') + `$5'] ') `reed(linespec,wid,ht,box attributes,[R][C]) Enclosed two-terminal reed contact; @@ -2523,35 +2795,6 @@ define(`reed',`eleminit_(`$1') {[box invis ht_ m4ht wid_ m4wd] at rvec_(rp_len/2,0)} line to rvec_(rp_len,0) invis ') - `contact(chars [,R]) Relay contact switch - Arg 2 deprecated, kept for compatibility - chars: - P|O|C= three position, normally open, - normally closed - R= right orientation (default left) - I= open circles for contacts' -define(`contact',`[define(`m4n',`ifelse(ifinstr(`$1',R,R,`$2',R,R),R,-,0+)')dnl - define(`m4dr',`dotrad_')dnl - P: dot(,m4dr,1); line to rvec_(dimen_/2,0) chop m4dr chop 0 - T: P+vec_(dimen_/2-dimen_/12,0) - O: circle invis rad dotrad_ at T+vec_(dimen_/5,-(m4n dotrad_)) - C: circle invis rad dotrad_ at T+vec_(dimen_/5,m4n dotrad_) - ifinstr(`$1',O,,`move to T ifinstr(`$1',P,`+vec_(0,m4n`'dimen_/8)') - ifinstr(`$1',I, - `C: dot(at rvec_(0,m4n`'(m4dr`'ifinstr(`$1',P,*2)+lthick/2)),m4dr,1)', - `arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ - to rvec_(0,m4n`'dimen_/4) \ - then to rvec_(dimen_/5,m4n`'dimen_/4) - C: Here')') - ifinstr(`$1',C,,`move to T+vec_(0,-(m4n`'dimen_/8)) - ifinstr(`$1',I, - `O: dot(at rvec_(0,m4n`'(-m4dr*2)),m4dr,1)', - `arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ - to rvec_(0,-(m4n`'dimen_/4)) \ - then to rvec_(dimen_/5,-(m4n`'dimen_/4)) - O: Here')'); `$3'] ') - - `ccoax(at location,M|F,diameter)' define(`ccoax',`[define(`m4cd',ifelse(`$3',,`dimen_*0.4',`$3'))dnl S: circle diam m4cd diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4 index f65fc2f74f2..29a7e0811ef 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/libgen.m4 @@ -2,12 +2,12 @@ divert(-1) libgen.m4 Base macros for dpic and gpic diagrams -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * ========================================================================== @@ -181,7 +181,7 @@ define(`SIdefaults', define(`latexcommand',`command "ifmpost(verbatimtex) `$1' ifmpost(etex)"') define(`m4announceprocessor',`dnl Do not change the format of the next line: -`#' `$1' Version 9.1: ifelse(m4picprocessor,gpic,`Gpic', +`#' `$1' Version 9.2: ifelse(m4picprocessor,gpic,`Gpic', m4postprocessor,pstricks,`PSTricks', m4postprocessor,pgf,`TikZ PGF', m4postprocessor,mfpic,`Mfpic', @@ -981,6 +981,7 @@ define(`ellipsearc',`[ C: (0,0) fitcurve(P,n,`$7') ]') Small space for string justification +#efine(`sp_',`ifgpic(`\hbox{$\:$}')iflatex(`\hbox{$\;$}')') define(`sp_',`ifgpic(`\hbox{$\:$}')') `Select arg 1 if it begins with " or sprintf, diff --git a/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4 b/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4 index 0e8d4a50226..495ab2ad2b5 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/liblog.m4 @@ -1,12 +1,12 @@ divert(-1) liblog.m4 Logic gates -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`liblog_') @@ -29,7 +29,7 @@ ifdef(`libcct_',,`include(libcct.m4)divert(-1)') inserted into a macro will display the macro name and current arguments =========================================================================' - `Size parameter for logic and grid mesh' + `Nonzero parameter for logic size and grid mesh' define(`L_unit',`(linewid/10)') `Dimensions in L_units, also for external use:' @@ -993,26 +993,29 @@ ifdef(`m4LI', ############################ - `FlipFlop( D|T|RS|JK, label, boxspec )' + `FlipFlop( D|T|RS|JK, label, boxspec, pinlength )' define(`FlipFlop',`ifelse( `$1',D, `FlipFlopX(`$3',`$2', - : D:PinD;E:CK:PinCK, , :Q:PinQ;:lg_bartxt(Q):PinNQ,, `$4')', + : D:PinD;E:CK:PinCK, , :Q:PinQ;:lg_bartxt(Q):PinNQ,,`$4',`$5')', `$1',T, `FlipFlopX(`$3',`$2', - : T:PinT;E:CK:PinCK, , :Q:PinQ;:lg_bartxt(Q):PinNQ,, `$4')', + : T:PinT;E:CK:PinCK, , :Q:PinQ;:lg_bartxt(Q):PinNQ,,`$4',`$5')', `$1',RS, `FlipFlopX(`$3',`$2', - : R:PinR;: S:PinS, , :Q:PinQ;:lg_bartxt(Q):PinNQ,, `$4')', + : R:PinR;: S:PinS, , :Q:PinQ;:lg_bartxt(Q):PinNQ,,`$4',`$5')', `$1',SR, `FlipFlopX(`$3',`$2', - : S:PinS;: R:PinR, , :Q:PinQ;:lg_bartxt(Q):PinNQ,, `$4')', + : S:PinS;: R:PinR, , :Q:PinQ;:lg_bartxt(Q):PinNQ,,`$4',`$5')', `$1',JK, `FlipFlopX(`$3',`$2', : J:PinJ;NE:CK:PinCK;: K:PinK, N:CLR:PinCLR, - :Q:PinQ;:lg_bartxt(Q):PinNQ, N:PR:PinPR, `$4')', -`FlipFlopX(`$3',`$2', ::Pin;, , :Q:PinQ;:lg_bartxt(Q):PinNQ, ,`$4')')') + :Q:PinQ;:lg_bartxt(Q):PinNQ, N:PR:PinPR,`$4',`$5')', +`FlipFlopX(`$3',`$2', ::Pin;, , :Q:PinQ;:lg_bartxt(Q):PinNQ,,`$4',`$5')')') `FlipFlopX( boxspec, center label, - leftpins, toppins, rightpins, bottompins) - General flipflop. Each of args 3 to 6 is null or - a string of pinspecs separated by semicolons (;). - Pinspecs are either empty (null) or of the form + leftpins, toppins, rightpins, bottompins, + pinlength) + General flipflop. Arg1 modifies the + box (labelled Chip) default specification. + Each of args 3 to 6 is null or a string of + pinspecs separated by semicolons (;). + A pinspec is either empty (null) or of the form [pinopts]:[label[:Picname]]. The first colon (:) draws the pin. Pins are placed top to bottom or left to right along the box edges with null @@ -1022,16 +1025,18 @@ define(`FlipFlop',`ifelse( :Picname is present in a pinspec then Picname replaces the default name. A pinspec label is text placed at the pin base. Semicolons are not - allowed in labels; use eg \char59{} instead, - and to put a bar over a label, use - lg_bartxt(label). The pinopts are [L|M|I|O][N][E] - L=active low out; M=active low in; - I=inward arrow; O=outward arrow; - N=pin with not circle; E=edge trigger' + allowed in labels; use eg \char59{} instead. + To put a bar over a label, use lg_bartxt(label). + The pinopts are [L|M|I|O][N][E] + L=active low out; M=active low in; + I=inward arrow; O=outward arrow; + N=pin with not circle; E=edge trigger + Optional arg7 is the length of pins' define(`FlipFlopX',`[ - Chip: box ifelse(`$1',,`wid_ FF_wid*L_unit ht_ FF_ht*L_unit',`$1') + Chip: box wid_ FF_wid*L_unit ht_ FF_ht*L_unit `$1' dnl Center label ifelse(`$2',,,"ifsvg(`svg_small($2,75)',`\scriptsize $2')" at Chip.c) + ifelse(`$7',,,`pushdef(`lg_plen',(`$7')/L_unit)')dnl ifelse(`$3',,, `m4_ffside(`(m4x-0.5)/m4_pc between Chip.nw_ and Chip.sw_',`$3',W,w)') ifelse(`$4',,, @@ -1040,7 +1045,8 @@ dnl Center label `m4_ffside(`(m4x-0.5)/m4_pc between Chip.ne_ and Chip.se_',`$5',E,e)') ifelse(`$6',,, `m4_ffside(`(m4x-0.5)/m4_pc between Chip.sw_ and Chip.se_',`$6',S,s)') - `$7' ]') + ifelse(`$7',,,`popdef(`lg_plen')')dnl + `$8' ]') dnl `Stack, count, and draw the pins on the given side' define(`m4_ffside', `stacksplit_(`m4pr',`$2',;)define(`m4_pc',0)dnl diff --git a/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4 b/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4 index c5138996281..2b38512d439 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/mfpic.m4 @@ -1,12 +1,12 @@ divert(-1) mfpic.m4 Initialization for mfpic. -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`m4picprocessor',dpic) define(`m4postprocessor',mfpic) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4 b/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4 index 1377038ea7e..b2ce3110498 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/mpost.m4 @@ -1,12 +1,12 @@ divert(-1) mpost.m4 Initialization for metapost. -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`m4picprocessor',dpic) define(`m4postprocessor',mpost) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4 b/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4 index 0d3d83db0fd..9117f8f5378 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/pgf.m4 @@ -1,12 +1,12 @@ divert(-1) pgf.m4 Initialization for Tikz-pgf. -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`m4picprocessor',dpic) define(`m4postprocessor',pgf) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4 b/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4 index 912170bb9a6..a59d78e177d 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/postscript.m4 @@ -1,12 +1,12 @@ divert(-1) postscript.m4 Initialization for Postscript output. -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`m4picprocessor',dpic) define(`m4postprocessor',postscript) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4 b/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4 index c1e6dace508..999723386d3 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/psfrag.m4 @@ -2,12 +2,12 @@ divert(-1) psfrag.m4 Initialization for dpic -f processing: Postscript with psfrag strings -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`psfrag_') ifelse(m4postprocessor,postscript,,`include(postscript.m4)divert(-1)') diff --git a/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4 b/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4 index d2fdebcbe08..8d20667140c 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/pstricks.m4 @@ -1,12 +1,12 @@ divert(-1) pstricks.m4 Initialization for PSTricks. -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`m4picprocessor',dpic) define(`m4postprocessor',pstricks) diff --git a/Master/texmf-dist/doc/latex/circuit-macros/svg.m4 b/Master/texmf-dist/doc/latex/circuit-macros/svg.m4 index cd04defbf64..e270060393e 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/svg.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/svg.m4 @@ -1,12 +1,12 @@ divert(-1) svg.m4 Initialization for SVG output. -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`m4picprocessor',dpic) define(`m4postprocessor',svg) @@ -155,6 +155,38 @@ define(`svgLinkString',`"<a xlink:href=\"`$1'\"dnl stroke=\"rgb(0,0,255)\">dnl `$2' dnl </a>"') + +# svgrot_init(filename) +# filename is the basename of the output +# produced by dpic -v filename.pic > filename.svg +define(`svgrot_init',`NeedDpicTools + define(`_file_',ifelse(`$1',,patsubst(__file__,.m4),`$1')) + syscmd(touch _file_.svg _file_.cor; cp _file_.svg _file_.tmp) + sh "grep \"^ x=.*\/text>\" _file_.tmp | sed -e dnl + \"s/x=\\"\([0-9.]*\)\\" y=\\"\([0-9.]*\)\\".*/\1 \2/\" > _file_.cor" + svgrot_k = 0; svg_rotz = 0 + define svg_rotcoords { svgrot_k += 1 + if "$`'1" != "" then { x[svgrot_k] = $`'1; y[svgrot_k] = $`'2; svg_rotz = 1 } + } + copythru(svg_rotcoords, _file_.cor) + sh "rm -f _file_.tmp _file_.cor" + svg_rotk = 0 + + ifdef(`svg_rot_',,` +# `svg_rot(deg clockwise rotation,text or object) +# Requires svgrot_init(filename) +# Rotation of svg text is a can of worms because +# the final coordinates of the text are required; +# this forward reference has to be extracted from +# the output file and the source processed twice.' + define svg_rot { if svg_rotz then { svg_rotk += 1; command \ + sprintf("<g transform=\"rotate(%g %g %g)\">",$`'1,x[svg_rotk],y[svg_rotk]) }\ + else { command sprintf("<g transform=\"rotate(%g)\">",$`'1) } +$`'2 + command "</g>" } + define(`svg_rot_') ') + ') + # ---------------------------------------------------------------------------# define(`thinlines_',`linethick = 0.4 diff --git a/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 b/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 index f8757b5e189..5cc6df17280 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/xfig.m4 @@ -1,12 +1,12 @@ divert(-1) xfig.m4 Initialization for xfig. -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`m4picprocessor',dpic) define(`m4postprocessor',xfig) |