diff options
author | Karl Berry <karl@freefriends.org> | 2023-04-19 20:11:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-04-19 20:11:20 +0000 |
commit | de17f76b81d0ca8f2e18bca124397307ac2b5353 (patch) | |
tree | 3c812552b727264e529d910458beeef876c0187b /Master/texmf-dist | |
parent | 7906a77ebda2adc7930af8ba8844c3745b3e389c (diff) |
oststud (19apr23)
git-svn-id: svn://tug.org/texlive/trunk@66894 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/oststud/LICENSE.txt | 428 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/oststud/README.md | 53 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/oststud/hsrstud-classes.pdf | bin | 0 -> 127717 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/oststud/hsrstud.pdf | bin | 0 -> 143177 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/oststud/oststud.pdf | bin | 0 -> 145415 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/oststud/Makefile | 64 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oststud/hsrstud-classes.dtx | 594 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oststud/hsrstud.dtx | 619 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oststud/hsrstud.ins | 56 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oststud/oststud.dtx | 664 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oststud/oststud.ins | 54 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/oststud/hsrbericht.cls | 389 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/oststud/hsrstud.sty | 286 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/oststud/hsrzf.cls | 298 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/oststud/oststud.sty | 232 |
15 files changed, 3737 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/oststud/LICENSE.txt b/Master/texmf-dist/doc/latex/oststud/LICENSE.txt new file mode 100644 index 00000000000..a73481c4be1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oststud/LICENSE.txt @@ -0,0 +1,428 @@ +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. + diff --git a/Master/texmf-dist/doc/latex/oststud/README.md b/Master/texmf-dist/doc/latex/oststud/README.md new file mode 100644 index 00000000000..aaac61e79b6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oststud/README.md @@ -0,0 +1,53 @@ +# OST-Stud LaTeX Style & Macros + +## Built it + +### Automagically with `make` + +It is as simple as it gets. +``` +$ make +``` +The output will be generated in a directory called `build`. + +### Manually + +This will generate many files including `oststud.sty` that can be placed in the +folder of any other LaTeX project, which can access the library with +`\usepackage{oststud}` +``` +$ xelatex oststud.ins # generate oststud.sty +``` + +To get the documentation (in PDF) you can compile the respective `dtx` file +``` +$ xelatex oststud.dtx # generate documentation oststud.pdf +``` + +## The older `hsrstud` package + +The previous version of thie package for the Hochschule für Technik Rapperswil, +i.e. `hsrstud`, is still available for backwards compatibility. To get +`hsrstud.sty` and its documentation run `make` or manually: +``` +$ xelatex hsrstud.ins # generate hsrstud.sty +$ xelatex hsrstud.dtx # generate documentation hsrstud.pdf +``` + +The `hsrstud` package has documentclasses which are not (yet) available in the +newer version. To get `hsrbericht.cls` or `hsrzf.cls` without using `make` run +``` +$ xelatex hsrstud-classes.ins # generate .cls files +$ xelatex hsrstud-classes.dtx # generate documentation hsrstud-classes.pdf +``` + + +## License +``` +OSTStud (c) by Naoki Pross + +OSTStud is licensed under a Creative Commons Attribution-ShareAlike 4.0 Unported License. +You should have received a copy of the license along with this work. If not, see + +http://creativecommons.org/licenses/by-sa/4.0/ +``` diff --git a/Master/texmf-dist/doc/latex/oststud/hsrstud-classes.pdf b/Master/texmf-dist/doc/latex/oststud/hsrstud-classes.pdf Binary files differnew file mode 100644 index 00000000000..29590a39a73 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oststud/hsrstud-classes.pdf diff --git a/Master/texmf-dist/doc/latex/oststud/hsrstud.pdf b/Master/texmf-dist/doc/latex/oststud/hsrstud.pdf Binary files differnew file mode 100644 index 00000000000..cf1ad1e27fb --- /dev/null +++ b/Master/texmf-dist/doc/latex/oststud/hsrstud.pdf diff --git a/Master/texmf-dist/doc/latex/oststud/oststud.pdf b/Master/texmf-dist/doc/latex/oststud/oststud.pdf Binary files differnew file mode 100644 index 00000000000..74abd99be06 --- /dev/null +++ b/Master/texmf-dist/doc/latex/oststud/oststud.pdf diff --git a/Master/texmf-dist/source/latex/oststud/Makefile b/Master/texmf-dist/source/latex/oststud/Makefile new file mode 100644 index 00000000000..a6035b941dc --- /dev/null +++ b/Master/texmf-dist/source/latex/oststud/Makefile @@ -0,0 +1,64 @@ +TEX := xelatex +TEXARGS := --synctex=1 --interaction=nonstopmode \ + --shell-escape + +.PHONY: ins doc tests dist +all: build ins doc tests + +build: + mkdir -p build + +dist: oststud.tar.gz + + +# ZIP to distribute to CTAN +oststud.tar.gz: Makefile README.md LICENSE.txt \ + oststud.ins oststud.dtx build/oststud.pdf \ + hsrstud.ins hsrstud.dtx build/hsrstud.pdf \ + hsrstud-classes.dtx build/hsrstud-classes.pdf + tar cvzf $@ --transform 's,build/,,' --transform 's,^,oststud/,' $^ + +# Installer file +ins: build/oststud.sty build/hsrzf.cls build/hsrbericht.cls build/hsrstud.sty + +build/oststud.sty: oststud.ins oststud.dtx build + $(TEX) $(TEXARGS) --output-directory=build $< + +build/hsrzf.cls build/hsrbericht.cls build/hsrstud.sty: hsrstud.ins hsrstud-classes.dtx hsrstud.dtx build + $(TEX) $(TEXARGS) --output-directory=build $< + + +# Documentation for packages +doc: build/oststud.pdf build/hsrstud.pdf build/hsrstud-classes.pdf + +build/oststud.pdf: oststud.dtx ins build + $(TEX) $(TEXARGS) --output-directory=build $< + cd build && \ + makeindex -s gind.ist -o oststud.ind oststud.idx && \ + makeindex -s gglo.ist -o oststud.gls oststud.glo + $(TEX) $(TEXARGS) --output-directory=build $< + $(TEX) $(TEXARGS) --output-directory=build $< + +build/hsrstud.pdf: hsrstud.dtx ins build + $(TEX) $(TEXARGS) --output-directory=build $< + cd build && \ + makeindex -s gind.ist -o hsrstud.ind hsrstud.idx && \ + makeindex -s gglo.ist -o hsrstud.gls hsrstud.glo + $(TEX) $(TEXARGS) --output-directory=build $< + $(TEX) $(TEXARGS) --output-directory=build $< + +build/hsrstud-classes.pdf: hsrstud-classes.dtx ins build + $(TEX) $(TEXARGS) --output-directory=build $< + cd build && \ + makeindex -s gind.ist -o hsrstud-classes.ind hsrstud-classes.idx && \ + makeindex -s gglo.ist -o hsrstud-classes.gls hsrstud-classes.glo + $(TEX) $(TEXARGS) --output-directory=build $< + $(TEX) $(TEXARGS) --output-directory=build $< + + +# Test files +tests: build/test/bericht.pdf build/test/zf.pdf + +build/test/%.pdf: test/%.tex + mkdir -p build/test + $(TEX) $(TEXARGS) --output-directory=build/test $< diff --git a/Master/texmf-dist/source/latex/oststud/hsrstud-classes.dtx b/Master/texmf-dist/source/latex/oststud/hsrstud-classes.dtx new file mode 100644 index 00000000000..d5ea6500c21 --- /dev/null +++ b/Master/texmf-dist/source/latex/oststud/hsrstud-classes.dtx @@ -0,0 +1,594 @@ +% \iffalse +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Documentation Builder +%<*doc> +\documentclass[a4paper]{ltxdoc} + +\usepackage{hsrstud} +\usepackage[ + type={CC}, + modifier={by-sa}, + version={4.0}, +]{doclicense} +\usepackage[ + margin=3.5cm, + left=4cm +]{geometry} + +\usepackage{booktabs} +\usepackage{enumitem} + +\CodelineIndex +\EnableCrossrefs +\RecordChanges + +%% Metadata +\title{\textcolor{hsr-blue}{HSR}--Stud Document Classes} +\author{Naoki Pross \texttt{<naoki.pross@ost.ch>}} +\date{\today} + +\begin{document} +\DocInput{\jobname.dtx} + +\end{document} +%</doc> +% \fi + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Classes Documentation +% +% \maketitle +% \tableofcontents +% +% \section{Purpose of these document classes} +% The following document classes were made by and for the HSR-Stud organization. +% These classes are intended to be used to create beautiful summaries and cheat +% sheets. Available classes are: +% \begin{description}[align=right] +% \item[|hsrzf|] For summaries (Zusammenfassung) +% \item[|hsrbericht|] For reports (Bericht) +% \end{description} +% +% +% \section{Class Options} +% \begin{description}[align=right] +% \item[\tt sans] Use Sans-Serif fonts (|cmbright| and |hfbright|). +% \item[\tt slab] Use Slab-Serif fonts (|bitter| and |eulervm|). +% \item[\tt margin=<size>] Sets up margins to reasonable size. +% \item[\tt *] Any other given option is passed to the underlying class (article). +% \end{description} +% +% \begin{table}\centering +% \begin{tabular}{l r r l r r} +% \toprule +% Size & H & V & Size & H & V \\ +% \midrule +% huge & 45 & 40 & small & 20 & 20 \\ +% large & 35 & 35 & tiny & 10 & 20 \\ +% big & 30 & 30 & minimal & 5 & 20 \\ +% normal & 25 & 30 \\ +% \bottomrule +% \end{tabular} +% \caption{Sizes for the {\tt margin} option. All sizes are in millimeters} +% \end{table} +% +% +% \section{Extra Metadata} +% Thanks to the {\tt titling} package, normal metadata informations are available +% throug the following commands: \cs{theauthor}, \cs{thedate}, \cs{thetitle}. +% Additionally, more metadata variables have been created for this class, to +% conserve informations related to the university course. +% \begin{description}[align=right] +% \item[\cs{course}] The degree programme of the discussed subject. +% Example: |Elektrotechnik| +% \item[\cs{module}] Short name of the module according to the class +% schedule. Example: |ComEng1| +% \item[\cs{semester}] Semester during which the summarized subject was +% taught. Example: |FS20| +% \item[\cs{institute}] Internal institute in which the module was taught. +% This field is optional. +% \item[\cs{authoremail}] Email of the author. This field is optional. +% \item[\cs{maintainer}] Name of the person maintaining the work. This +% field is optional. +% \item[\cs{contributors}] List of names of those who have contributed to +% the document. This field is optional. +% \end{description} +% Like \cs{date}, \cs{title}, etc. these fields have too an accessor macro +% \cs{the<metadata>}. For example: \cs{thecourse}, \cs{themodule}, and so on. +% +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Zusammenfassung Class Documentation +% \section{Zusammenfassung \texttt{hsrzf} class} +% This class is intended to be used to write short summaries. +% +% \subsection{Class options} +% \begin{description}[align=right] +% \item[\tt header] Use the HSR--Stud standard header. The option +% {\tt noheader} disables the header. +% \end{description} +% +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Bericht Class Documentation +% \section{Bericht \texttt{hsrbericht} class} +% This class tries to conform to the indications given by the communication +% department of the HSR. The specifications are found in the ``Werkzeugkastens +% Technische Berichte''. +% +% \subsection{Metadata} +% In addition to the metadata described in the previous section. This class +% requires: +% \begin{description}[align=right] +% \item[\cs{subtitle}] Pretty self explanatory. +% \item[\cs{category}] Category assigned to the project. +% This field is optional. +% \item[\cs{project}] Name or reference to your project. +% \item[\cs{topic}] You chosen topic in the category. +% \item[\cs{instructor}] Name of the instructor / academic that is +% following or has assigned your work. +% \item[\cs{startdate}] Date when you started the project. +% \item[\cs{finishdate}] Date when you finished the project (can be set to +% \cs{today} to keep automatically updated. +% \item[\cs{address}] Address or place where your work is produced. +% This field is optional. +% \item[\cs{matriculationnr}] Your matriculation number. +% \item[\cs{logo}] Code to insert your logo. +% \item[\cs{clientlogo}] Code to insert the logo of the client / research +% department / \dots . +% \end{description} +% +% \section{Minimal working examples} +% +% ^^A TODO: fix this with `%' +% \begin{lstlisting} +% \documentclass[margin=normal]{hsrzf} +% +% % Packages +% %% the HSRStud package +% \usepackage{hsrstud} +% +% % Metadata +% \course{Elektrotechnik} +% \module{ModAbk} +% \semester{Herbstsemester 2020} +% +% \authoremail{vname@hsr.ch} +% \author{\textsl{Vorname Name} -- \texttt{\theauthoremail}} +% +% \title{\texttt{\themodule} Zusammenfassung} +% \date{\thesemester} +% +% % document +% \begin{document} +% \maketitle +% \tableofcontents +% \section{Introduction} +% \[ +% i\hbar \partial_t \left| \psi(t) \right\rangle +% = \hat{H} \left| \psi(t) \right\rangle +% \] +% +% \end{document}\end{lstlisting} +% +% \section{License} +% \doclicenseThis +% +% \PrintChanges +% \PrintIndex +% +% \section{Implementation} +% \begin{macrocode} +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Class Headers + +%<*hsrzf> +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{hsrzf}[2020/04/05 v0.1 HSRStud Summary class] +%</hsrzf> + +%<*hsrbericht> +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{hsrbericht}[2020/05/05 v0.1 HSRStud Report class] +%</hsrbericht> + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Implementation +% +%<*hsrzf|hsrbericht> + +%% Coding Packages (Dependencies) +\RequirePackage{iftex} +\RequirePackage{kvoptions} +\RequirePackage{etoolbox} + +%% Default font +\RequirePackage{lmodern} + +%% Class options +\SetupKeyvalOptions{ + family=hsr, + prefix=hsr@ +} + +%% Use header and footer +\DeclareBoolOption[false]{header} +\DeclareComplementaryOption{noheader}{header} + +%% Use a sans-serif slab-serif or concrete font +\DeclareBoolOption[false]{sans} +\DeclareBoolOption[false]{slab} +\DeclareBoolOption[false]{concrete} + +%% Configures the geometry package +%% +%% Possible values: +%% - huge (45mm, 40mm) +%% - large (35mm, 35mm) +%% - big (30mm, 30mm) +%% - normal (25mm, 30mm) +%% - small (20mm, 20mm) +%% - tiny (10mm, 20mm) +%% - minimal ( 5mm, 20mm) +\DeclareStringOption{margin}[huge] + +%% Configures the polyglossia package +% \DeclareStringOption[]{lang}[german] + + +%% Pass other options to the class +\DeclareDefaultOption{% + \ifx\CurrentOptionValue\relax + \PackageWarningNoLine{\@currname}{% + Unknown option ``\CurrentOption''\MessageBreak + is passed to class ``article''% + }% + % Pass the option to package color. + % Again it is better to expand \CurrentOption. + \expandafter\PassOptionsToClass + \expandafter{\CurrentOption}{article} + \else + % Package color does not take options with values. + % We provide the standard LaTeX error. + \@unknownoptionerror + \fi +} + +\ProcessKeyvalOptions{hsr} + + +%% Create new metadata fields + +%% Required fields +\newcommand\course[1]{\gdef\hsr@course{#1}} +\newcommand\hsr@course{\ClassError{hsrzf}{no \noexpand\course given}{}} +\newcommand\thecourse{\hsr@course} + +\newcommand\module[1]{\gdef\hsr@module{#1}} +\newcommand\hsr@module{\ClassError{hsrzf}{no \noexpand\module given}{}} +\newcommand\themodule{\hsr@module} + +\newcommand\semester[1]{\gdef\hsr@semester{#1}} +\newcommand\hsr@semester{\ClassError{hsrzf}{no \noexpand\semester given}{}} +\newcommand\thesemester{\hsr@semester} + +%% Optional fields +\newcommand\institute[1]{\gdef\hsr@institute{#1}} +\newcommand\hsr@institute{\ClassWarning{hsrzf}{no \noexpand\institute given}{}} +\newcommand\theinstitute{\hsr@institute} + +\newcommand\authoremail[1]{\gdef\hsr@authoremail{#1}} +\newcommand\hsr@authoremail{\ClassWarning{hsrzf}{no \noexpand\authoremail given}{}} +\newcommand\theauthoremail{\hsr@authoremail} + +\newcommand\maintainer[1]{\gdef\hsr@maintainer{#1}} +\newcommand\hsr@maintainer{\ClassWarning{hsrzf}{no \noexpand\maintainer given}{}} +\newcommand\themaintainer{\hsr@maintainer} + +\newcommand\contributors[1]{\gdef\hsr@contributors{#1}} +\newcommand\hsr@contributors{\ClassWarning{hsrzf}{no \noexpand\contributors given}{}} +\newcommand\thecontributors{\hsr@contributors} +%</hsrzf|hsrbericht> +%<*hsrbericht> +%% The report class has some extra metadata + +%% Extra title informations +\newcommand\subtitle[1]{\gdef\hsr@subtitle{#1}} +\newcommand\hsr@subtitle{\ClassError{hsrbericht}{no \noexpand\subtitle given}{}} +\newcommand\thesubtitle{\hsr@subtitle} + +%% Project informations +\newcommand\category[1]{\gdef\hsr@category{#1}} +\newcommand\hsr@category{\ClassWarning{hsrbericht}{no \noexpand\category given}{}} +\newcommand\thecategory{\hsr@category} + +\newcommand\project[1]{\gdef\hsr@project{#1}} +\newcommand\hsr@project{\ClassError{hsrbericht}{no \noexpand\project given}{}} +\newcommand\theproject{\hsr@project} + +\newcommand\topic[1]{\gdef\hsr@topic{#1}} +\newcommand\hsr@topic{\ClassError{hsrbericht}{no \noexpand\topic given}{}} +\newcommand\thetopic{\hsr@topic} + +\newcommand\version[1]{\gdef\hsr@version{#1}} +\newcommand\hsr@version{\ClassError{hsrbericht}{no \noexpand\version given}{}} +\newcommand\theversion{\hsr@version} + +\newcommand\instructor[1]{\gdef\hsr@instructor{#1}} +\newcommand\hsr@instructor{\ClassError{hsrbericht}{no \noexpand\instructor given}{}} +\newcommand\theinstructor{\hsr@instructor} + +\newcommand\startdate[1]{\gdef\hsr@startdate{#1}} +\newcommand\hsr@startdate{\ClassError{hsrbericht}{no \noexpand\startdate given}{}} +\newcommand\thestartdate{\hsr@startdate} + +\newcommand\finishdate[1]{\gdef\hsr@finishdate{#1}} +\newcommand\hsr@finishdate{\ClassError{hsrbericht}{no \noexpand\finishdate given}{}} +\newcommand\thefinishdate{\hsr@finishdate} + +%% Author informations +\newcommand\address[1]{\gdef\hsr@address{#1}} +\newcommand\hsr@address{\ClassWarning{hsrbericht}{no \noexpand\address given}{}} +\newcommand\theaddress{\hsr@address} + +\newcommand\matriculationnr[1]{\gdef\hsr@matriculationnr{#1}} +\newcommand\hsr@matriculationnr{\ClassError{hsrbericht}{no \noexpand\matriculationnr given}{}} +\newcommand\thematriculationnr{\hsr@matriculationnr} + +%% Logos informations +\newcommand\logo[1]{\gdef\hsr@logo{#1}} +\newcommand\hsr@logo{\ClassWarning{hsrbericht}{no \noexpand\logo given}{}} +\newcommand\thelogo{\hsr@logo} + +\newcommand\clientlogo[1]{\gdef\hsr@clientlogo{#1}} +\newcommand\hsr@clientlogo{\ClassWarning{hsrbericht}{no \noexpand\clientlogo given}{}} +\newcommand\theclientlogo{\hsr@clientlogo} +%</hsrbericht> +%<*hsrzf|hsrbericht> + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Setup base class +\LoadClass[a4paper]{article} + +%% Style deps +\RequirePackage{geometry} +\RequirePackage{fancyhdr} +\RequirePackage{titling} +\RequirePackage{totpages} +\RequirePackage{array} + +%% Insert metadata in the pdf +\PassOptionsToPackage{plainpages=false, pdfpagelabels, pdfusetitle}{hyperref} +\RequirePackage{hyperref} + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Setup Style +% + + +%% Configure Sans-Serif font +\ifhsr@sans + \ifhsr@slab + \PackageError{hsrzf}{% + sans ans slab options cannot be used at the same time + } + \fi + \ifhsr@concrete{hsrzf}{% + sans and concrete options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} + \RequirePackage{cmbright} + \RequirePackage{sfmath} +\fi + +%% Configure Slab-Serif font +\ifhsr@slab + \ifhsr@sans + \PackageError{hsrzf}{% + slab and sans options cannot be used at the same time + } + \fi + \ifhsr@concrete{hsrzf}{% + slab and concrete options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} + \PassOptionsToPackage{rm,light}{roboto} + \RequirePackage{roboto} +\fi + +%% Configure (secret) concrete font +\ifhsr@concrete + \ifhsr@sans{hsrzf}{% + concrete and sans options cannot be used at the same time + } + \fi + \ifhsr@slab + \PackageError{hsrzf}{% + concrete ans slab options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{boldsans,amssymb}{concmath} + \RequirePackage{concmath} + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} +\fi + +%% configure geometry +%% defaults to big +\newlength{\hsr@hmarginwidth} +\newlength{\hsr@vmarginheight} + +\ifx\hsr@margin\@empty + \setlength\hsr@hmarginwidth{30mm} + \setlength\hsr@vmarginheight{30mm} +\else + \expandafter\ifstrequal\expandafter{\hsr@margin}{huge}{ + \setlength\hsr@hmarginwidth{45mm} + \setlength\hsr@vmarginheight{40mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{large}{ + \setlength\hsr@hmarginwidth{35mm} + \setlength\hsr@vmarginheight{35mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{big}{ + \setlength\hsr@hmarginwidth{30mm} + \setlength\hsr@vmarginheight{30mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{normal}{ + \setlength\hsr@hmarginwidth{25mm} + \setlength\hsr@vmarginheight{30mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{small}{ + \setlength\hsr@hmarginwidth{20mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{tiny}{ + \setlength\hsr@hmarginwidth{10mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{minimal}{ + \setlength\hsr@hmarginwidth{ 5mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + % TODO: fix this + % \ClassError{hsrzf}{Invalid margin size} + % \setlength\hsr@hmarginwidth{30mm} + % \setlength\hsr@vmarginheight{30mm} +\fi + +%</hsrzf|hsrbericht> + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A HSR ZF specific +%<*hsrzf> +%% TODO: change vmarginheight if header is on +\newgeometry{ + hmargin=\hsr@hmarginwidth, + vmargin=\hsr@vmarginheight, + marginparsep=0pt, + marginpar=0pt, +} + +\fancypagestyle{hsrzf}{% + \fancyhf{} % clear + \fancyhead[L]{\leftmark} + \fancyhead[C]{\themodule} + \fancyhead[R]{\@date} + + \fancyfoot[L]{\href{https://github.com/HSR-Stud/}{\texttt{HSR-Stud}}} + \fancyfoot[C]{\texttt{CC BY-NC-SA}} + \fancyfoot[R]{\thepage ~/ \pageref{TotPages}} + + \renewcommand{\headrulewidth}{.5pt} + \renewcommand{\footrulewidth}{.5pt} +} + +\fancypagestyle{hsrzf-norulers}{% + \fancyhf{} % clear + \fancyhead[L]{\leftmark} + \fancyhead[C]{\themodule} + \fancyhead[R]{\@date} + + \fancyfoot[L]{\href{https://github.com/HSR-Stud/}{\texttt{HSR-Stud}}} + \fancyfoot[C]{\texttt{CC BY-NC-SA}} + \fancyfoot[R]{\thepage ~/ \pageref{TotPages}} + + \renewcommand{\headrulewidth}{0pt} + \renewcommand{\footrulewidth}{0pt} +} + +\ifhsr@header +\pagestyle{hsrzf} +\fi +%</hsrzf> + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A HSR Bericht specific +%<*hsrbericht> + +%% Redefine title and abstract +\renewcommand\maketitle{% +\begin{titlepage} + \thispagestyle{hsrbericht} + \begin{center} + \vspace*{6cm} + \textbf{\fontsize{48}{60}\selectfont \@title} + \vspace{1.5cm} \\ + \textbf{\fontsize{24}{48}\selectfont \hsr@subtitle} + \vspace{1cm} \\ + \textbf{\fontsize{22}{48}\selectfont \hsr@category} + \vspace{0.5cm} \\ + \begin{tabular}{rl} + \textbf{Version:} & \hsr@version \\ + \end{tabular} + \vspace{4cm} \\ + \begin{tabular}{rl p{1.5cm} rl} + \textbf{Autor:} & \textbf{\@author} && Dozent: & \hsr@instructor \\ + E-Mail: & \texttt{\hsr@authoremail} && Themengebiet: & \hsr@topic \\ + Matrikelnummer: & \hsr@matriculationnr && Studiengang: & \hsr@course \\ + Adresse: & \hsr@address && & \\ + \end{tabular}{} + \vspace{2cm} \\ + \begin{tabular}{rl} + \textbf{Erstellt am:} & \textbf{\hsr@startdate} \\ + \textbf{Letze Änderung am:} & \textbf{\hsr@finishdate} \\ + \end{tabular} + \end{center} +\end{titlepage}} + +\renewenvironment{abstract}{% + \section*{Abstract}% + \newcommand\problem{\paragraph{Problem}} + \newcommand\goal{\paragraph{Ziel}} + \newcommand\method{\paragraph{Method / Vorgehen}} + \newcommand\results{\paragraph{Wesentliche Ergebnisse}} + \newcommand\suggestions{\paragraph{Empfehlungen}} + \newcommand\keywords{\paragraph{Schl\"usselw\"orter}} +}{} + +%% TODO: twoside / book support +%% Debug: +%% \RequirePackage{showframe} + +\newgeometry{ + hmargin=\hsr@hmarginwidth, + vmargin=\hsr@vmarginheight, + marginparsep=0pt, + marginpar=0pt, +} + +%% Configure headers +\fancypagestyle{hsrbericht}{% + \fancyhf{} % clear + \fancyhead[C]{\@title} + \fancyhead[R]{\hsr@clientlogo} + \fancyhead[L]{\hsr@logo} + \fancyfoot[R]{\thepage / \pageref{TotPages} } + \fancyfoot[L]{Dockument: \jobname \\ Druck: \finishdate} + \renewcommand{\headrulewidth}{.5pt} + \renewcommand{\footrulewidth}{.5pt} +} + +\fancypagestyle{plain}{% + \fancyhf{} % clear + \fancyhead[C]{\@title} + \fancyhead[R]{\hsr@clientlogo} + \fancyhead[L]{\hsr@logo} + \fancyfoot[R]{\thepage / \pageref{TotPages} } + \fancyfoot[L]{Dockument: \jobname \\ Druck: \finishdate} + \renewcommand{\headrulewidth}{.5pt} + \renewcommand{\footrulewidth}{.5pt} +} + +\pagestyle{hsrbericht} + +%</hsrbericht> +% \end{macrocode} +% +% \Finale +%^^A vim:set tw=80 sw=2 ts=2 et: diff --git a/Master/texmf-dist/source/latex/oststud/hsrstud.dtx b/Master/texmf-dist/source/latex/oststud/hsrstud.dtx new file mode 100644 index 00000000000..c82dbe2fe07 --- /dev/null +++ b/Master/texmf-dist/source/latex/oststud/hsrstud.dtx @@ -0,0 +1,619 @@ +% \iffalse meta-comment +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Headers + +%<*package> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{hsrstud}[2021/08/04 v0.2 HSR-Stud Macros] +%</package> + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Documentation +%<*doc> +\documentclass[a4paper]{ltxdoc} + +\usepackage{hypdoc} + +%% https://tex.stackexchange.com/questions/95882/avoid-multicol-error-error-saving-partial-page +%% \setlength\IndexMin{100pt} + +\usepackage[left=4cm, right=4cm, top=3cm, bottom=3cm]{geometry} + +\usepackage{\jobname} + +\usepackage{fancyvrb} +\usepackage{enumitem} +\usepackage{framed} +\usepackage{booktabs} +\usepackage{tikz} +\usepackage{xargs} +\usepackage{bookmark} + +\usepackage[ + type={CC}, + modifier={by-sa}, + version={4.0}, +]{doclicense} + +\CodelineIndex +\EnableCrossrefs +\RecordChanges + +\makeatletter +\newlength\excodewidth +\newenvironment{example}{% + \leftbar\VerbatimEnvironment% + \global\excodewidth=.5\linewidth% + \begin{VerbatimOut}{\jobname.vrb}% +}{% + \end{VerbatimOut}% + \noindent% + \minipage[c]{\excodewidth}% + \vspace{0pt}\input{\jobname.vrb}% + \endminipage% + \minipage[c]{\dimexpr\linewidth-\excodewidth-2\fboxsep-2\fboxrule-\FrameSep\relax}% + \vspace{0pt}\lstinputlisting{\jobname.vrb}% + \endminipage% + \endleftbar% +} + +\newenvironment{hexample}{% + \leftbar\VerbatimEnvironment% + \begin{VerbatimOut}{\jobname.vrb}% +}{% + \end{VerbatimOut}% + \noindent% + \begingroup\centering% + \hspace{5pt}% + \minipage[t]{\linewidth}% + \vspace{0pt}\input{\jobname.vrb}% + \endminipage\\ + \hspace{5pt}% + \minipage[t]{\linewidth}% + \vspace{0pt}\lstinputlisting{\jobname.vrb}% + \endminipage% + \endgroup% + \endleftbar% +} + + +\makeatother + +\begin{document} +\GetFileInfo{\jobname.sty} +\title{^^A + \texttt{\textcolor{hsr-blue}{hsr}stud} --- HSR-Stud Style and Macros\thanks{^^A + This file describes version \fileversion, last revised \filedate.^^A + }^^A +} +\author{Naoki Pross \texttt{<naoki.pross@ost.ch>}} +\date{Released \filedate} +\maketitle +\tableofcontents + +\changes{v0.2}{2021/08/05}{Remove legacy code and update notation} +\changes{v0.1}{2020/02/16}{Initial draft} + +\section{Purpose of this package} +This package is made for the HSR Studenten organization to provide an easy to +use interface to give a more consistent look and feel for the works produced by +its the members. A secondary objective of this package is to eliminate the +\emph{many} dispersed duplicate .tex files that fill the repositories of the +HSR-Stud org. + + +\section{Package Options} \label{sec:options} +\begin{description}[align=right] + \item[|dontrenew|] Do not renew existing \LaTeX{} commands and + environments. This is useful when the package is loaded on a document + that is already partially written. + + \item[|arrowvec|] Tells the package to use a vector notation with a small + arrow over the variables, as it were handwritten. + + \item[|textvecdiff|] Disables the ``Nabla'' or ``Del'' notation for vector + derivatives. Instead the symbols \(\vec{\nabla}, \vec{\nabla}\dotp, + \vec{\nabla}\crossp, \nabla^2, \vec{\nabla}^2\) are be replaced with + grad, div, curl and div grad. +\end{description} + +\section{Summary notation} + +\section{Default Theming} +\subsection{Links with \texttt{hyperref}} + +\begin{example} +Colors from +\cite{bib:hsrcolors} see \\ +\url{https://intranet.hsr.ch} +\end{example} + +\subsection{Source Code with \texttt{listings}} + +\begin{hexample} +\begin{lstlisting}[language=C++] +int main(int argc, char *argv[], char *envp[]) { + std::cout << "hello world" << std::endl; +} +\end{lstlisting} +\end{hexample} + +\section{Mathematics} +\subsection{Vectors} + +\begin{macro}{\vec} + +Vectors notation. Aliases: \cs{v}, \cs{vc}. If the option \texttt{arrowvec} +described in \S \ref{sec:options} is enabled, the notation with a small +arrow over the varible will be used \(\hsrvecarrow{x}\), otherwise the +vector is bold \(\hsrvecbold{x}\). Takes one option \marg{letter}. \cs{v} +is renamed to \cs{vaccent} and \cs{vec} to \cs{oldvec}. + +\begin{example} +\[ \vec{F} = m\vec{a} \] +\end{example} +\end{macro} + +\begin{macro}{\uvec} +Unit vector notation. Alias \cs{uv}. Takes \marg{letter}. It is implemented +in terms of \cmd{\vec}, which means that the style is inherited. +\begin{example} +\[ \uvec{x} = \vec{x}/x \] +\end{example} +\end{macro} + +\subsubsection{Products} +\begin{macro}{\dotp} +Dot product between vectors. +\begin{example} +\[ \vec{u}\dotp\vec{v} \] +\end{example} +\end{macro} + +\begin{macro}{\crossp} +Cross product between vectors. +\begin{example} +\[ \vec{u}\crossp\vec{v} \] +\end{example} +\end{macro} + + +\subsection{Matrices} + +\begin{macro}{\mx} +Matrix notation. Takes \marg{letter}. + +\begin{example} +\[ + \mx{J} = \begin{pmatrix} + 0 & 1 \\ + 1 & 0 + \end{pmatrix} +\] +\end{example} +\end{macro} + +\subsection{Equalities} + +\begin{macro}{\heq} + L'H\^opital limit equality symbol. +\begin{hexample} +\[ + \lim_{x\to\infty} \frac{x}{x^2 - 1} + \heq \lim_{x\to\infty} \frac{1}{2x} + = 0 +\] +\end{hexample} +\end{macro} + +\subsection{Derivatives} +\subsubsection{Differentials} + +\begin{macro}{\dd} +The differential element. It needs a \marg{var} and has the optional +argument \oarg{order}. +\begin{example} +\[ \dd{x} \qquad \dd[4]{x} \] +\end{example} +\end{macro} + +\begin{macro}{\di} +This is the same as \cs{dd} but with a small space in front, it is +intended to be used in integrals for a nicer typesetting. +\begin{hexample} +\begin{align*} + I &= \int \vec{J}\dotp\dd{\vec{s}} \\ + &= \iint \vec{J}\dotp\uvec{n}\di{x}\di{y} +\end{align*} +\end{hexample} +\end{macro} + +\subsubsection{Scalar functions} + +\begin{macro}{\deriv} +The derivative has arguments \marg{function}, \marg{var} and the optional +argument \oarg{order}. +\begin{example} +\[ + \deriv{y}{x} \qquad + \deriv[3]{y}{x} +\] +\end{example} +\end{macro} + +%% TODO: add mixed partial derivatives (probably using xparse) +\begin{macro}{\pderiv} +The partial derivative has arguments \marg{function}, \marg{var} and the +optional argument \oarg{order}. +\begin{example} +\[ + \pderiv{y}{x} \qquad + \pderiv[3]{y}{x} +\] +\end{example} +\end{macro} + +\subsubsection{Vector functions} + +\begin{macro}{\grad} +The gradient vector operator. +\begin{example} +\[ \grad f \] +\end{example} +\end{macro} + +\begin{macro}{\div} +The divergence operator, \cs{div} is renamed to \cs{divsymb}. If the option +|donotrenew| is used \cs{divg} is also available. +\begin{example} +\[ \div \vec{f} \] +\end{example} +\end{macro} + +\begin{macro}{\curl} +The curl operator. +\begin{example} +\[ \curl \vec{f} \] +\end{example} +\end{macro} + +\begin{macro}{\laplacian} +The laplacian operator. +\begin{example} +\[ + \laplacian f +\] +\end{example} +\end{macro} + +\begin{macro}{\vlaplacian} +The vector laplacian operator operator. +\begin{example} +\[ + \vlaplacian \vec{F} +\] +\end{example} +\end{macro} + + +\section{Colors} +\begin{center} +\begin{tikzpicture} + \foreach \color/\y in {% + hsr-blue/7, + hsr-mauve/6, + hsr-lakegreen/5, + hsr-reed/4, + hsr-petrol/3, + hsr-basswood/2, + hsr-lightgrey/1, + hsr-black/0}{ + \foreach \x/\a in {0/,1/80,2/60,3/40,4/20}{ + \node[anchor=east] at (-.5,\y) {\texttt{\color}}; + \fill[color=\color\a] (\x,\y-.25) rectangle ++(1,.5); + \node[anchor=west] at (\x,\y) {\texttt{\a}}; + } + } +\end{tikzpicture} +\end{center} + +\section{License} +\doclicenseThis + +\begin{thebibliography}{3} + \bibitem{bib:hsrcolors} + HSR Intern: Corporate Design / Farben, + \textit{Hochschule f\"ur Technik Rapperswil}, + \url{https://intranet.hsr.ch/Farben.7715.0.html} +\end{thebibliography} + +\PrintChanges +\PrintIndex + +\DocInput{\jobname.dtx} + +\end{document} + +%</doc> +%\fi + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \appendix +% \section{Implementation} +% |hsrstud| package implementation with inline documentation + +%\iffalse +%<*package> +%\fi + +% \subsection{Dependencies} +% \begin{macrocode} +%% Dependencies (( +\RequirePackage{amsmath} +\RequirePackage{amssymb} +\RequirePackage{bm} + +\RequirePackage{esint} +\PassOptionsToPackage{b}{esvect} +\RequirePackage{esvect} + +\RequirePackage{xcolor} +\RequirePackage{hyperref} +\RequirePackage{listings} + +\RequirePackage{iftex} +\RequirePackage{kvoptions} +%% )) +% \end{macrocode} + +% \subsection{Package options} +% \begin{macrocode} +\SetupKeyvalOptions{ + family=hsr, + prefix=hsr@ +} + +%% Do not renew LaTeX Macros +\DeclareBoolOption[false]{dontrenew} + +%% Vector style +\DeclareBoolOption[false]{arrowvec} +\DeclareComplementaryOption{boldvec}{arrowvec} + +%% Vector derivative style +\DeclareBoolOption[false]{textvecdiff} +\DeclareComplementaryOption{delvecdiff}{textvecdiff} + + +%% Process options +\ProcessLocalKeyvalOptions* +% \end{macrocode} + + +% \subsection{Summary notation} +% \begin{macrocode} +%% TODO: change letters in german +\newcommand{\bookref}[1]{\texttt{\textcolor{hsr-mauve}{P.#1}}} +\newcommand{\notesref}[1]{\texttt{\textcolor{hsr-blue}{S.#1}}} +\newcommand{\lectureref}[1]{\texttt{\textcolor{hsr-lakegreen}{L.#1}}} +% \end{macrocode} + +% \subsection{Default theming} +% \begin{macrocode} +%% Theming for hyperref and listings (( +\hypersetup{ + colorlinks=true, + linkcolor=hsr-black, + citecolor=hsr-mauve, + filecolor=hsr-black, + urlcolor=hsr-blue, +} + +%% Common listings settings +\lstdefinestyle{hsr-base}{ + belowcaptionskip=\baselineskip, + breaklines=true, + frame=none, + inputencoding=utf8, + % margin + xleftmargin=\parindent, + % numbers + numbers=left, + numbersep=5pt, + numberstyle=\ttfamily\footnotesize\color{hsr-black40}, + % background + backgroundcolor=\color{white}, + showstringspaces=false, + % default language + language=[LaTeX]TeX, + % break long lines, and show an arrow where the line was broken + breaklines=true, + postbreak=\mbox{\textcolor{hsr-blue}{$\hookrightarrow$}\space}, + % font + basicstyle=\ttfamily\small, + identifierstyle=\color{hsr-black}, + keywordstyle=\color{hsr-blue}, + commentstyle=\color{hsr-black40}, + stringstyle=\color{hsr-mauve80}, +} + +%% Define missing languages / aliases +\lstdefinelanguage{LaTeX}{ + language=[LaTeX]Tex +} + +%% Set style +\lstset{style=hsr-base, escapechar=`} +%%)) +% \end{macrocode} + +% \subsection{Mathematics} +% \subsubsection{Vectors} +% \begin{macrocode} +%% Vector (( +\newcommand{\hsrvecbold}[1]{\mathbf{\bm{#1}}} +\newcommand{\hsrvecarrow}[1]{\vv{\mathrm{#1}}} % from esvect + +\newcommand{\@hsrvecf}[1]{\hsrvecbold{#1}} +\ifhsr@arrowvec + \renewcommand{\@hsrvecf}[1]{\hsrvecarrow{#1}} +\fi + +\newcommand{\vc}{\@hsrvecf} +\ifhsr@dontrenew\else + % save previous command + \newcommand{\vaccent}{\v} + \newcommand{\oldvec}{\vec} + % redefine + \renewcommand{\v}[1]{\@hsrvecf{#1}} + \renewcommand{\vec}[1]{\@hsrvecf{#1}} +\fi +%%)) + +%% Unit vector (( +\newcommand{\hsruvecbold}[1]{\vec{\hat{#1}}} +\newcommand{\hsruvecarrow}[1]{\hat{\mathrm{#1}}} +\newcommand{\@hsruvecf}[1]{\hsruvecbold{#1}} +\ifhsr@arrowvec + \renewcommand{\@hsruvecf}[1]{\hsruvecarrow{#1}} +\fi + +\newcommand{\uv}[1]{\@hsruvecf{#1}} +\newcommand{\uvec}[1]{\@hsruvecf{#1}} +%%)) + +%% Products (( +\newcommand{\dotp}{\boldsymbol\cdot} +\newcommand{\crossp}{\boldsymbol\times} +%%)) +% \end{macrocode} + +% \subsubsection{Matrices and Tensors} +% \begin{macrocode} +\newcommand{\mx}[1]{\bm{\mathrm{#1}}} +% \end{macrocode} + +% \subsubsection{Equalities} +% \begin{macrocode} +\newcommand{\heq}{\stackrel{\hat{\texttt{H}}}{=}} +% \end{macrocode} + +% \subsection{Derivatives} +% \subsubsection{Differentials} +% \begin{macrocode} +\newcommand{\dd}[2][]{\mathrm{d}^{#1} #2} +\newcommand{\di}[2][]{\,\dd[#1]{#2}} +% \end{macrocode} + +% \subsubsection{Derivatives} +% \begin{macrocode} +\newcommand{\deriv}[3][]{\frac{\dd[#1]{#2}}{\dd[]{#3^{#1}}}} +\newcommand{\pderiv}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} +% \end{macrocode} + +% \subsubsection{Vector derivatives} +% \begin{macrocode} +%% Gradient (( +\ifhsr@textvecdiff + \DeclareMathOperator{\grad}{grad} +\else + \newcommand{\grad}{\vec{\nabla}} +\fi +%% )) + +%% Divergence (( +\ifhsr@textvecdiff + \newcommand{\@hsrdivf}{div} +\else + \newcommand{\@hsrdivf}{\vec{\nabla}\dotp} +\fi + +\DeclareMathOperator{\divg}{\@hsrdivf} +\ifhsr@dontrenew\else + \let\divsymb=\div + \renewcommand{\div}{\operatorname{\@hsrdivf}} +\fi +%% )) + +%% Curl (( +\ifhsr@textvecdiff + \DeclareMathOperator{\curl}{curl} +\else + \DeclareMathOperator{\curl}{\vec{\nabla}\crossp} +\fi +%% )) + +%% laplacian (( +\ifhsr@textvecdiff + \DeclareMathOperator{\laplacian}{div grad} +\else + \DeclareMathOperator{\laplacian}{\nabla^2} +\fi + +\ifhsr@textvecdiff + \DeclareMathOperator{\vlaplacian}{div grad} +\else + \DeclareMathOperator{\vlaplacian}{\vec{\nabla}^2} +\fi +%% )) +% \end{macrocode} + +% \subsection{Colors} +% \begin{macrocode} +\definecolor{hsr-blue}{HTML}{0065A3} +\definecolor{hsr-blue80}{HTML}{3384B5} +\definecolor{hsr-blue60}{HTML}{66A3C8} +\definecolor{hsr-blue40}{HTML}{99C1DA} +\definecolor{hsr-blue20}{HTML}{CCE0ED} + +\definecolor{hsr-mauve}{HTML}{6E1C50} +\definecolor{hsr-mauve80}{HTML}{8B4973} +\definecolor{hsr-mauve60}{HTML}{A87796} +\definecolor{hsr-mauve40}{HTML}{C5A4B9} +\definecolor{hsr-mauve20}{HTML}{E2D2DC} + +\definecolor{hsr-lakegreen}{HTML}{548C86} +\definecolor{hsr-lakegreen80}{HTML}{76A39E} +\definecolor{hsr-lakegreen60}{HTML}{98BAB6} +\definecolor{hsr-lakegreen40}{HTML}{BBD1CF} +\definecolor{hsr-lakegreen20}{HTML}{DDE8E7} + +\definecolor{hsr-reed}{HTML}{7B6951} +\definecolor{hsr-reed80}{HTML}{958774} +\definecolor{hsr-reed60}{HTML}{B0A597} +\definecolor{hsr-reed40}{HTML}{CAC3B9} +\definecolor{hsr-reed20}{HTML}{E5E1DC} + +\definecolor{hsr-petrol}{HTML}{00738D} +\definecolor{hsr-petrol80}{HTML}{338FA4} +\definecolor{hsr-petrol60}{HTML}{66ABBB} +\definecolor{hsr-petrol40}{HTML}{99C7D1} +\definecolor{hsr-petrol20}{HTML}{CCE3E8} + +\definecolor{hsr-basswood}{HTML}{BABD5D} +\definecolor{hsr-basswood80}{HTML}{C8CA7D} +\definecolor{hsr-basswood60}{HTML}{D6D79E} +\definecolor{hsr-basswood40}{HTML}{E3E5BE} +\definecolor{hsr-basswood20}{HTML}{F1F2DF} + +\definecolor{hsr-lightgrey}{HTML}{C6C7C8} +\definecolor{hsr-lightgrey80}{HTML}{D1D2D3} +\definecolor{hsr-lightgrey60}{HTML}{DDDDDE} +\definecolor{hsr-lightgrey40}{HTML}{E8E8E9} +\definecolor{hsr-lightgrey20}{HTML}{F4F4F4} + +\definecolor{hsr-black}{HTML}{1A171B} +\definecolor{hsr-black80}{HTML}{484549} +\definecolor{hsr-black60}{HTML}{767476} +\definecolor{hsr-black40}{HTML}{A4A2A4} +\definecolor{hsr-black20}{HTML}{D1D1D1} +% \end{macrocode} + +% \iffalse +% \begin{macrocode} +%</package> +% \end{macrocode} +% \fi +% +%\Finale diff --git a/Master/texmf-dist/source/latex/oststud/hsrstud.ins b/Master/texmf-dist/source/latex/oststud/hsrstud.ins new file mode 100644 index 00000000000..ec7b2324948 --- /dev/null +++ b/Master/texmf-dist/source/latex/oststud/hsrstud.ins @@ -0,0 +1,56 @@ +\input docstrip.tex +\preamble +This document is part of the HSRStud LaTeX Package + +THE FOLLOWING WORK IS UNDER THE CC BY-SA 4.0 LICENSE + +You are free to +--------------- + * Share -- Copy and redistribute the material in any medium or format + * Adapt -- Remix, transform, and build upon the material for any + purpose, even commercially + +The licensor cannot revoke these freedoms as long as you follow the +license terms. + +Under the following terms +------------------------- + * Attribution + You must give appropriate credit, provide a link to the license, and + indicate if changes were made. You may do so in any reasonable + manner, but not in any way that suggests the licensor endorses you + or your use. + + * ShareAlike + If you remix, transform, or build upon the material you must + distribute your contributions under the same license as the + original. + + * No additional restrictions + You may not apply legal terms or technological measures that + legally restrict others from doing anything the license permits. + +Notice +------ +You do not have to comply with the license for elements of the material +in the public domain or where your use is permitted by an applicable +exception or limitation. + +No warranties are given. The license may not give you all of the +permissions necessary for your intended use. For example, other rights +such as publicity, privacy, or moral rights may limit how you use the +material. +\endpreamble + +\keepsilent +\askforoverwritefalse +\usedir{tex/latex/hsrstud} + +\generate{ + \file{hsrstud.sty}{\from{hsrstud.dtx}{package}} + \file{hsrzf.cls}{\from{hsrstud-classes.dtx}{hsrzf}} + \file{hsrbericht.cls}{\from{hsrstud-classes.dtx}{hsrbericht}} +} +\endbatchfile + +\endinput diff --git a/Master/texmf-dist/source/latex/oststud/oststud.dtx b/Master/texmf-dist/source/latex/oststud/oststud.dtx new file mode 100644 index 00000000000..35539e7b19f --- /dev/null +++ b/Master/texmf-dist/source/latex/oststud/oststud.dtx @@ -0,0 +1,664 @@ +% \iffalse meta-comment +% +% Copyright (C) 2023 by Naoki Pross <np@0hm.ch> +% ------------------------------------------------------- +% +% OSTStud.dtx is licensed under a Creative Commons +% Attribution-ShareAlike 4.0 International License. +% +% You should have received a copy of the license along +% with this work. If not, see +% <http://creativecommons.org/licenses/by-sa/4.0/>. +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{oststud.dtx} +%</driver> +%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] +%<package>\ProvidesPackage{oststud} +%<*package> + [2023/04/18 v0.3 OST Student's package] +%</package> +% +%<*driver> +\documentclass{ltxdoc} + +\usepackage{oststud} +\usepackage{enumitem} +\usepackage{tikz} +\usepackage{framed} +\usepackage[ + type={CC}, + modifier={by-sa}, + version={4.0}, +]{doclicense} + + +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{oststud.dtx} + \PrintChanges + \PrintIndex +\end{document} +%</driver> +% \fi +% +% \changes{v0.1}{2022/11/18}{Initial version} +% \changes{v0.2}{2022/11/22}{Port features of \texttt{hsrstud}} +% \changes{v0.3}{2023/04/18}{Cleanup for CTAN upload} +% +% \GetFileInfo{oststud.dtx} +% +% \DoNotIndex{\newcommand,\newenvironment,\fi,\else} +% +% \title{ +% \texttt{\textcolor{OSTBlackberry}{ost}stud} --- +% OST-Stud Style and Macros\thanks{ +% This document corresponds to \textsf{oststud}~\fileversion, last +% revised \filedate. +% } +% } +% \author{Naoki Sean Pross \texttt{<np@0hm.ch>}} +% \date{Released \filedate} +% +% \maketitle +% \tableofcontents +% +% \section*{License} +% \doclicenseThis +% +% \section{Purpose of this Package} +% +% This package is made for the OST Studenten organization to provide an easy to +% use interface that gives a more consistent look and feel to the works +% produced by its members. This package is the successor after the fusion of +% the old |hsrstud| package. +% +% \section{Package Options} +% \begin{description}[align=right] +% \item[|dontrenew|] Do not renew existing \LaTeX{} commands and +% environments. This is useful when the package is loaded on a document +% that is already partially written. +% \item[|textvecdiff|] Disables the ``Nabla'' or ``Del'' notation for vector +% derivatives. Instead the symbols \(\vec{\nabla}, \vec{\nabla}\dotp, +% \vec{\nabla}\crossp, \nabla^2, \vec{\nabla}^2\) are be replaced with +% grad, div, curl and div grad. +% \item[|bfemph|] \textit{Work in progress.} +% \item[|bbprobability|] \textit{Work in progress.} +% \item[|scrtransforms|] \textit{Work in progress.} +% \end{description} +% +% \section{Usage} +% +% \subsection{Vectors and Vector Calculus} +% +% \DescribeMacro{\vec} +% \DescribeMacro{\uvec} +% In the physics used by electrical engineers it is common to use lowercase +% bold letters for vectors (with the exception of electromagnetic fields +% $\vec{E},\vec{B},\vec{A},\ldots$). If the |dontrenew| option is set a new +% macro |\bvec| (bold |\vec|) that takes a \marg{symbol} defines the bold +% vector notation. Otherwise the default vector notation with the tiny ugly +% arrow ($\oldvec{u}$) is replaced by bold and the arrow notation saved in +% |\oldvec|. In vector calculus it is common to denote unit vectors by putting +% a hat, so there is a macro |\uvec| that does just that: +% \[ +% \uvec{u} = \vec{u}/u. +% \] +% +% \DescribeMacro{\dotp} +% \DescribeMacro{\crossp} +% To differentiate the dot and cross products (between vectors) from normal +% product between scalars ($a \cdot b$ and $a \times b$), the macros |\dotp| +% and |\crossp| provide a bold variant: +% \[ +% \vec{u} \dotp \vec{v}, \qquad +% \vec{u} \crossp \vec{v}. +% \] +% +% \DescribeMacro{\grad} +% \DescribeMacro{\div} +% \DescribeMacro{\curl} +% The macros |\grad|, |\div| and |\curl| provide symbols for the gradient, +% divergence and curl operators used in vector calculus. If the option +% |textvecdiff| is set, they symbols are written as words, otherwise they will +% he written (ab)using the Nabla symbol, i.e. by pretending that the symbol +% $\vec{\nabla}$ is a ``vector'' (sometime referred to as ``del'') of partial +% derivates: $\vec{\nabla} = (\partial_x, \partial_y, \partial_z)^\mathsf{T}$. +% Unless the option |dontrenew| is set, the division symbol is replaced by the +% divergence and the symbol $\divsymb$ is saved in |\divsymb|. For a scalar +% field $\phi$ or a vector field $\vec{F}$ the notation (in order) of the +% gradient, divergence and curl appear as follows: +% \[ +% \grad \phi, \quad +% \div \vec{F}, \quad +% \curl \vec{F}. +% \] +% +% \DescribeMacro{\laplacian} +% \DescribeMacro{\vlaplacian} +% Continuing with the (ab)use of the ``Nabla'' or ``Del'' notation, the +% there is a macro |\laplacian| for the Laplacian operator +% \[ +% \laplacian \equiv \div \grad \equiv \sum_i \partial^2_i. +% \] +% Notice that the Nabla symbol is not bold, that is because the Laplacian +% operator results in a scalar value. Though, sometimes in electrodynamics the +% vector Laplacian is used (which applies the Laplacian operator to each +% component). To differentiate the two there is a macro |\vlaplacian| which +% uses the bold nabla symbol: $\vlaplacian$. If the option |dontrenew| is set +% both symbols are replaced by div grad. +% +% \subsection{Linear Algebra} +% +% \DescribeMacro{\mx} +% Similarly to vectors it is common to write matrices as uppercase bold +% letters, thus the |\mx| macro takes a \marg{symbol} and typesets it as +% upright bold. +% +% \DescribeMacro{\mt} +% \DescribeMacro{\mh} +% The ``normal'' and Hermitian (complex conjugate) transpose of a matrix +% $\mx{F}$ are denoted by a superscript sans-serif T or H respectively +% ($\mt{\mx{F}}$ resp. $\mh{\mx{F}}$). The |\mt| and |\mh| macros (matrix +% transpose and Hermitian transpose) provide this notation; They both take a +% \marg{symbol}. In abstract vector spaces the Hermitian transpose becomes the +% adjoint, for which it is common to use a superscript dagger (adjoint of +% $\mathcal{Q}$ is $\mathcal{Q}^\dagger$), but since it does not come up very +% often this package does \emph{not} provide a macro for the adjoint. +% +% \DescribeMacro{\minv} +% Another common matrix operation that is annoying to write is the matrix +% inverse, which is usually written as a superscript -1. The |\minv| command +% takes a \marg{matrix} and adds the -1 superscript. +% +% Using all of the above we can typeset the matrix form of the linear least +% squares approximation by writing +% \begin{leftbar} +% |\vec{a} = \minv{(\mt{\mx{Q}} \mx{Q})} \mt{\mx{Q}}\vec{y}| +% \end{leftbar} +% \noindent which results in the following: +% \[ +% \vec{a} = \minv{(\mt{\mx{Q}} \mx{Q})} \mt{\mx{Q}}\vec{y} +% \iff +% \argmin_{(a_1,a_2)} \left(\sum_{i=0}^n y_i - a_1 x_i + a_2\right). +% \] +% +% \DescribeMacro{\tr} +% This package also provides a macro for the trace of a matrix. +% +% \subsection{Complex Numbers} +% +% ^^A TODO: write section +% \DescribeMacro{\Re} +% \DescribeMacro{\Im} +% AMS maths's default notation for the real and imaginary parts of a complex +% number use the Fraktur font capital letters $\mathfrak{R}$ and +% $\mathfrak{I}$. However, in engineering it is more common to see the notation +% $\Re{z}$ and $\Im{z}$, thus, unless the |dontrenew| option is set this +% package replaces the notation with the former symbols. Both of the macros +% were also modified to take an argument \marg{expression}, to surround the +% expression with opening and closing curly brackets. +% +% \subsection{Probability Operators} +% +% ^^A TODO: write section +% \textit{Work in progress.} +% +% \subsection{Transformation Operators} +% +% ^^A TODO: write section +% \textit{Work in progress.} +% \[ +% \laplace\{f(t)\} = F(s) \corresponds f(t) \rcorresponds F(s) +% \] +% +% \subsection{References} +% +% ^^A TODO: write section +% \textit{Work in progress.} +% +% ^^A \DescribeMacro{\skriptum} +% ^^A \DescribeMacro{\sref} +% +% ^^A \DescribeMacro{\textbook} +% ^^A \DescribeMacro{\bref} +% +% \subsection{OST Colors} +% +% The official OST color palette provides the following ``primary'' or +% ``accent'' colors. +% \begin{center} +% \begin{tikzpicture} +% \begin{scope} +% \foreach [count=\i] \c in {Black,Gray,Blackberry,Raspberry} { +% \node[ +% thick, draw=white, fill={OST\c}, +% minimum width=3cm, minimum height=1cm, +% ] (\c) at ({3.2cm*\i},0) {\texttt{OST\c}}; +% } +% ^^A Because you can't see black on black +% \node[text=white] at (Black) {\texttt{OSTBlack}}; +% \end{scope} +% \end{tikzpicture} +% \end{center} +% And then there are the other ``design colors''. +% \begin{center} +% \begin{tikzpicture} +% \begin{scope}[yshift=-2cm] +% \foreach [count=\i] \c in {Orange,Red,Purple,Blue,Green} { +% \foreach [count=\j] \s in {Dark,{},Light}{ +% \node[ +% thick, draw=white, fill={OST\s\c}, +% minimum width=3cm, minimum height=1cm, +% ] (\c\s) at ({3.2cm*\j},{-1.2cm*\i}) {\texttt{OST\s\c}}; +% } +% } +% \end{scope} +% \end{tikzpicture} +% \end{center} +% +% \subsection{Sane Defaults} +% +% ^^A TODO: write section +% \textit{Work in progress.} +% +% ^^A This macros separates the documentation from the implementation +% \StopEventually{} +% +% \section{Implementation} +% +% \subsection{Dependencies and Parse Options} +% +% First, we have the dependencies necessary for typesetting. +% \begin{macrocode} +\RequirePackage{xcolor} +\RequirePackage{amsmath} +\RequirePackage{amssymb} +\RequirePackage{bm} +% \end{macrocode} +% This package also sets sane defaults to the following packages. +% \begin{macrocode} +\RequirePackage{hyperref} +\RequirePackage{listings} +% \end{macrocode} +% Then we create the options for the package. +% \begin{macrocode} +\SetupKeyvalOptions{ + family=ost, + prefix=ost@ +} +\DeclareBoolOption[false]{dontrenew} +\DeclareBoolOption[false]{textvecdiff} +\DeclareBoolOption[false]{bfemph} +\DeclareBoolOption[false]{bbprobability} +% \DeclareBoolOption[false]{scrtransforms} +\ProcessLocalKeyvalOptions* +% \end{macrocode} +% +% \subsection{Bold emphasis} +% +% \begin{macro}{\emph} +% Change the behaviour of |\emph|. +% \begin{macrocode} +\ifost@bfemph + \ifost@dontrenew + \PackageError{The options \noexpand\dontrenew and \noexpand\bfemph cannot be used at the same time!} + \fi + \long\expandafter\def\csname em \endcsname{% + \@nomath\em + \if b\expandafter\@car\f@series\@nil + \itshape\else\bfseries\fi + } +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{Vectors and Vector Calculus} +% +% \begin{macro}{\vec} +% Set up bold notation for vectors. +% \begin{macrocode} +\newcommand{\ost@vec}[1]{\mathbf{\bm{#1}}} +\ifost@dontrenew + \newcommand{\bvec}[1]{\ost@vec{#1}} +\else + \let\oldvec\vec + \renewcommand{\vec}[1]{\ost@vec{#1}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\uvec} +% In vector calculus unit vectors are usually denoted by a hat. +% \begin{macrocode} +\newcommand{\uvec}[1]{\vec{\hat{#1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dotp,\crossp} +% To differentiate them from |\cdot| and |\times| which are for scalars. +% \begin{macrocode} +\DeclareMathOperator{\dotp}{\boldsymbol\cdot} +\DeclareMathOperator{\crossp}{\boldsymbol\times} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\grad} +% Gradient of a vector valued scalar functon. +% \begin{macrocode} +\ifost@textvecdiff + \DeclareMathOperator{\grad}{grad} +\else + \DeclareMathOperator{\grad}{\vec{\nabla}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\div} +% Divergence operator. If the option |dontrenew| is a new macro |\divg| is +% defined. Otherwise |\div| is renamed to |\divsymb|. +% \begin{macrocode} +\ifost@textvecdiff + \DeclareMathOperator{\ost@div}{div} +\else + \DeclareMathOperator{\ost@div}{\vec{\nabla}\dotp} +\fi +\ifost@dontrenew + \DeclareMathOperator{\divg}{\ost@div} +\else + \let\divsymb\div + \renewcommand{\div}{\ost@div} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\curl} +% Curl of a vector field. +% \begin{macrocode} +\ifost@textvecdiff + \DeclareMathOperator{\curl}{curl} +\else + \DeclareMathOperator{\curl}{\vec{\nabla}\crossp} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\laplacian,\vlaplacian} +% Laplacian of a scalar and vector field. +% \begin{macrocode} +\ifost@textvecdiff + \DeclareMathOperator{\laplacian}{\div\grad} + \DeclareMathOperator{\vlaplacian}{\div\grad} +\else + \DeclareMathOperator{\laplacian}{\nabla^2} + \DeclareMathOperator{\vlaplacian}{\vec{\nabla}^2} +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{Linear Algebra} +% +% \begin{macro}{\mx} +% Notation for matrices as bold (uppercase) letters. +% \begin{macrocode} +\newcommand{\mx}[1]{\mathbf{\bm{#1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mt,\mh} +% Normal and Hermitian (conjugate) transpose of a matrix. +% \begin{macrocode} +\newcommand{\mt}[1]{{#1}^\mathsf{T}} +\newcommand{\mh}[1]{{#1}^\mathsf{H}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\minv} +% Matrix inverse. +% \begin{macrocode} +\newcommand{\minv}[1]{{#1}^{-1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tr} +% Trace of a matrix. +% \begin{macrocode} +\DeclareMathOperator{\tr}{tr} +% \end{macrocode} +% \end{macro} +% +% \subsection{Mathematical Programming} +% \begin{macro}{\argmin,\argmax} +% \begin{macrocode} +\DeclareMathOperator*{\argmax}{arg\,max} +\DeclareMathOperator*{\argmin}{arg\,min} +% \end{macrocode} +% \end{macro} +% +% \subsection{Complex Numbers} +% +% \begin{macro}{\Re,\Im} +% Replace the real and imaginary operators to look ``normal'', that is not +% using the Fraktur fonts. +% \begin{macrocode} +\ifost@dontrenew\else + \let\oldRe\Re \let\oldIm\Im + \renewcommand{\Re}[1]{\mathrm{Re} \left\{#1\right\}} + \renewcommand{\Im}[1]{\mathrm{Im} \left\{#1\right\}} +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{Probability Operators} +% +% \begin{macro}{\E} +% Expectation of a random variable. +% \begin{macrocode} +\ifost@bbprobability + \DeclareMathOperator{\ost@expectation}{\mathbb{E}} +\else + \DeclareMathOperator{\ost@expectation}{E} +\fi +\newcommand{\E}[1]{\ost@expectation\left\{#1\right\}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Var} +% Variance of a random variable. +% \begin{macrocode} +\ifost@bbprobability + \DeclareMathOperator{\ost@variance}{\mathbb{V}} +\else + \DeclareMathOperator{\ost@variance}{Var} +\fi +\newcommand{\Var}[1]{\ost@variance\left\{#1\right\}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Pr} +% Probability operator. +% \begin{macrocode} +\ifost@bbprobability + \DeclareMathOperator{\ost@probability}{\mathbb{P}} +\else + \DeclareMathOperator{\ost@probability}{Pr} +\fi +\ifost@dontrenew + \newcommand{\P}[1]{\ost@probability\left\{#1\right\}} +\else + \renewcommand{\Pr}[1]{\ost@probability\left\{#1\right\}} +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{Transformation Operators} +% +% \begin{macro}{\fourier,\ifourier} +% Fourier transform and its inverse. +% \begin{macrocode} +\DeclareMathOperator{\fourier}{\mathcal{F}} +\DeclareMathOperator{\ifourier}{\mathcal{F}^{-1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\laplace,\ilaplace} +% Laplace transform and its inverse. +% \begin{macrocode} +\DeclareMathOperator{\laplace}{\mathcal{L}} +\DeclareMathOperator{\ilaplace}{\mathcal{L}^{-1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ztransf,\iztransf} +% Z-transform and its inverse. +% \begin{macrocode} +\DeclareMathOperator{\ztransf}{\mathcal{Z}} +\DeclareMathOperator{\iztransf}{\mathcal{Z}^{-1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hilbert} +% Hilbert transform. +% \begin{macrocode} +\DeclareMathOperator{\hilbert}{\mathcal{H}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\corresponds,\rcorresponds} +% Correspondence symbols. +% \begin{macrocode} +\newcommand{\corresponds}{% + \mbox{\setlength{\unitlength}{0.1em}% + \begin{picture}(20,10)% + \put(5,3){\circle{4}}% + \put(7,3){\line(1,0){7}}% + \put(16,3){\circle*{4}}% + \end{picture}}} +\newcommand{\rcorresponds}{% + \mbox{\setlength{\unitlength}{0.1em}% + \begin{picture}(20,10)% + \put(5,3){\circle*{4}}% + \put(7,3){\line(1,0){7}}% + \put(16,3){\circle{4}}% + \end{picture}}} +% \end{macrocode} +% \end{macro} +% +% \subsection{References} +% +% \begin{macro}{\skriptum,\sref} +% Reference material in the skriptum (lecture notes) of the course. +% \begin{macrocode} +\newcommand{\ost@skriptum}{\PackageWarning{No \noexpand\skriptum given}} +\newcommand{\skriptum}[1]{\gdef\ost@skriptum{#1}} +\newcommand{\sref}[1]{% + \texttt{\textcolor{OSTBlackberry}{#1}}\nocite{\ost@skriptum}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textbook,\bref} +% Reference material in the textbook of the course. +% \begin{macrocode} +\newcommand{\ost@textbook}{\PackageWarning{No \noexpand\textbook given}} +\newcommand{\textbook}[1]{\gdef\ost@textbook{#1}} +\newcommand{\bref}[1]{% + \texttt{\textcolor{OSTRaspberry}{#1}}\nocite{\ost@textbook}} +% \end{macrocode} +% \end{macro} +% +% \subsection{OST Colors} +% +% Define the colors according to the OST corporate design. The code was kindly +% stolen from H. Badertscher's \texttt{OSTColors.sty} +% \cite{hbadertscher-ostcolors}. First there are the ``primary colors''. +% \begin{macrocode} +\definecolor{OSTBlack}{RGB}{25,25,25} +\definecolor{OSTGray}{RGB}{198,198,198} +\definecolor{OSTBlackberry}{RGB}{140,25,95} +\definecolor{OSTRaspberry}{RGB}{215,40,100} +% \end{macrocode} +% Then the ``design colors''. +% \begin{macrocode} +\definecolor{OSTPurple}{RGB}{149,96,164} +\definecolor{OSTDarkPurple}{RGB}{107,56,129} +\definecolor{OSTLightPurple}{RGB}{208,169,208} +% \end{macrocode} +% \begin{macrocode} +\definecolor{OSTGreen}{RGB}{29,175,142} +\definecolor{OSTDarkGreen}{RGB}{0,126,107} +\definecolor{OSTLightGreen}{RGB}{167,213,194} +% \end{macrocode} +% \begin{macrocode} +\definecolor{OSTRed}{RGB}{232,78,15} +\definecolor{OSTDarkRed}{RGB}{195,46,21} +\definecolor{OSTLightRed}{RGB}{243,154,139} +% \end{macrocode} +% \begin{macrocode} +\definecolor{OSTBlue}{RGB}{0,134,205} +\definecolor{OSTDarkBlue}{RGB}{0,115,176} +\definecolor{OSTLightBlue}{RGB}{95,191,237} +% \end{macrocode} +% \begin{macrocode} +\definecolor{OSTOrange}{RGB}{251,186,0} +\definecolor{OSTDarkOrange}{RGB}{209,143,0} +\definecolor{OSTLightOrange}{RGB}{253,214,175} +% \end{macrocode} +% +% \subsection{Sane Defaults} +% +% First, set up |hyperref| to not look hideous. +% \begin{macrocode} +\hypersetup{ + colorlinks=true, + linkcolor=OSTBlack, + citecolor=OSTBlackberry, + filecolor=OSTBlack, + urlcolor=OSTDarkBlue, +} +% \end{macrocode} +% Then create a listings style. +% \begin{macrocode} +\lstdefinestyle{ost-base}{ + belowcaptionskip=\baselineskip, + breaklines=true, + frame=none, + inputencoding=utf8, + % margin + xleftmargin=\parindent, + % numbers + numbers=left, + numbersep=5pt, + numberstyle=\ttfamily\footnotesize\color{OSTGray}, + % background + backgroundcolor=\color{white}, + showstringspaces=false, + % default language + language=TeX, + % break long lines, and show an arrow where the line was broken + breaklines=true, + postbreak=\mbox{\textcolor{OSTDarkBlue}{$\hookrightarrow$}\space}, + % font + basicstyle=\ttfamily\small, + identifierstyle=\color{OSTBlack}, + keywordstyle=\color{OSTBlue}, + commentstyle=\color{OSTGray}, + stringstyle=\color{OSTBlackberry}, +} +% \end{macrocode} +% Then we set this style to be default. +% \begin{macrocode} +\lstset{style=ost-base, escapechar=`} +% \end{macrocode} +% +% ^^A\begin{thebibliography}{1} +% ^^A\bibitem[hbadertscher-ostcolors] OST Colorscheme. +% ^^A\url{https://github.com/HBadertscher/OSTReport/blob/master/header/OSTColors.sty} +% ^^A\end{thebibliography} +% \Finale +\endinput +% vim:ts=4 sw=4 et spell spelllang=en ft=tex: diff --git a/Master/texmf-dist/source/latex/oststud/oststud.ins b/Master/texmf-dist/source/latex/oststud/oststud.ins new file mode 100644 index 00000000000..de74922e329 --- /dev/null +++ b/Master/texmf-dist/source/latex/oststud/oststud.ins @@ -0,0 +1,54 @@ +\input docstrip.tex +\preamble +This document is part of the HSRStud LaTeX Package + +THE FOLLOWING WORK IS UNDER THE CC BY-SA 4.0 LICENSE + +You are free to +--------------- + * Share -- Copy and redistribute the material in any medium or format + * Adapt -- Remix, transform, and build upon the material for any + purpose, even commercially + +The licensor cannot revoke these freedoms as long as you follow the +license terms. + +Under the following terms +------------------------- + * Attribution + You must give appropriate credit, provide a link to the license, and + indicate if changes were made. You may do so in any reasonable + manner, but not in any way that suggests the licensor endorses you + or your use. + + * ShareAlike + If you remix, transform, or build upon the material you must + distribute your contributions under the same license as the + original. + + * No additional restrictions + You may not apply legal terms or technological measures that + legally restrict others from doing anything the license permits. + +Notice +------ +You do not have to comply with the license for elements of the material +in the public domain or where your use is permitted by an applicable +exception or limitation. + +No warranties are given. The license may not give you all of the +permissions necessary for your intended use. For example, other rights +such as publicity, privacy, or moral rights may limit how you use the +material. +\endpreamble + +\keepsilent +\askforoverwritefalse +\usedir{tex/latex/oststud} + +\generate{ + \file{oststud.sty}{\from{oststud.dtx}{package}} +} +\endbatchfile + +\endinput diff --git a/Master/texmf-dist/tex/latex/oststud/hsrbericht.cls b/Master/texmf-dist/tex/latex/oststud/hsrbericht.cls new file mode 100644 index 00000000000..376383a39ee --- /dev/null +++ b/Master/texmf-dist/tex/latex/oststud/hsrbericht.cls @@ -0,0 +1,389 @@ +%% +%% This is file `hsrbericht.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hsrstud-classes.dtx (with options: `hsrbericht') +%% This document is part of the HSRStud LaTeX Package +%% +%% THE FOLLOWING WORK IS UNDER THE CC BY-SA 4.0 LICENSE +%% +%% You are free to +%% --------------- +%% * Share -- Copy and redistribute the material in any medium or format +%% * Adapt -- Remix, transform, and build upon the material for any +%% purpose, even commercially +%% +%% The licensor cannot revoke these freedoms as long as you follow the +%% license terms. +%% +%% Under the following terms +%% ------------------------- +%% * Attribution +%% You must give appropriate credit, provide a link to the license, and +%% indicate if changes were made. You may do so in any reasonable +%% manner, but not in any way that suggests the licensor endorses you +%% or your use. +%% +%% * ShareAlike +%% If you remix, transform, or build upon the material you must +%% distribute your contributions under the same license as the +%% original. +%% +%% * No additional restrictions +%% You may not apply legal terms or technological measures that +%% legally restrict others from doing anything the license permits. +%% +%% Notice +%% ------ +%% You do not have to comply with the license for elements of the material +%% in the public domain or where your use is permitted by an applicable +%% exception or limitation. +%% +%% No warranties are given. The license may not give you all of the +%% permissions necessary for your intended use. For example, other rights +%% such as publicity, privacy, or moral rights may limit how you use the +%% material. + + + +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{hsrbericht}[2020/05/05 v0.1 HSRStud Report class] + + +%% Coding Packages (Dependencies) +\RequirePackage{iftex} +\RequirePackage{kvoptions} +\RequirePackage{etoolbox} + +%% Default font +\RequirePackage{lmodern} + +%% Class options +\SetupKeyvalOptions{ + family=hsr, + prefix=hsr@ +} + +%% Use header and footer +\DeclareBoolOption[false]{header} +\DeclareComplementaryOption{noheader}{header} + +%% Use a sans-serif slab-serif or concrete font +\DeclareBoolOption[false]{sans} +\DeclareBoolOption[false]{slab} +\DeclareBoolOption[false]{concrete} + +%% Configures the geometry package +%% +%% Possible values: +%% - huge (45mm, 40mm) +%% - large (35mm, 35mm) +%% - big (30mm, 30mm) +%% - normal (25mm, 30mm) +%% - small (20mm, 20mm) +%% - tiny (10mm, 20mm) +%% - minimal ( 5mm, 20mm) +\DeclareStringOption{margin}[huge] + +%% Configures the polyglossia package + +%% Pass other options to the class +\DeclareDefaultOption{% + \ifx\CurrentOptionValue\relax + \PackageWarningNoLine{\@currname}{% + Unknown option ``\CurrentOption''\MessageBreak + is passed to class ``article''% + }% + % Pass the option to package color. + % Again it is better to expand \CurrentOption. + \expandafter\PassOptionsToClass + \expandafter{\CurrentOption}{article} + \else + % Package color does not take options with values. + % We provide the standard LaTeX error. + \@unknownoptionerror + \fi +} + +\ProcessKeyvalOptions{hsr} + +%% Create new metadata fields + +%% Required fields +\newcommand\course[1]{\gdef\hsr@course{#1}} +\newcommand\hsr@course{\ClassError{hsrzf}{no \noexpand\course given}{}} +\newcommand\thecourse{\hsr@course} + +\newcommand\module[1]{\gdef\hsr@module{#1}} +\newcommand\hsr@module{\ClassError{hsrzf}{no \noexpand\module given}{}} +\newcommand\themodule{\hsr@module} + +\newcommand\semester[1]{\gdef\hsr@semester{#1}} +\newcommand\hsr@semester{\ClassError{hsrzf}{no \noexpand\semester given}{}} +\newcommand\thesemester{\hsr@semester} + +%% Optional fields +\newcommand\institute[1]{\gdef\hsr@institute{#1}} +\newcommand\hsr@institute{\ClassWarning{hsrzf}{no \noexpand\institute given}{}} +\newcommand\theinstitute{\hsr@institute} + +\newcommand\authoremail[1]{\gdef\hsr@authoremail{#1}} +\newcommand\hsr@authoremail{\ClassWarning{hsrzf}{no \noexpand\authoremail given}{}} +\newcommand\theauthoremail{\hsr@authoremail} + +\newcommand\maintainer[1]{\gdef\hsr@maintainer{#1}} +\newcommand\hsr@maintainer{\ClassWarning{hsrzf}{no \noexpand\maintainer given}{}} +\newcommand\themaintainer{\hsr@maintainer} + +\newcommand\contributors[1]{\gdef\hsr@contributors{#1}} +\newcommand\hsr@contributors{\ClassWarning{hsrzf}{no \noexpand\contributors given}{}} +\newcommand\thecontributors{\hsr@contributors} +%% The report class has some extra metadata + +%% Extra title informations +\newcommand\subtitle[1]{\gdef\hsr@subtitle{#1}} +\newcommand\hsr@subtitle{\ClassError{hsrbericht}{no \noexpand\subtitle given}{}} +\newcommand\thesubtitle{\hsr@subtitle} + +%% Project informations +\newcommand\category[1]{\gdef\hsr@category{#1}} +\newcommand\hsr@category{\ClassWarning{hsrbericht}{no \noexpand\category given}{}} +\newcommand\thecategory{\hsr@category} + +\newcommand\project[1]{\gdef\hsr@project{#1}} +\newcommand\hsr@project{\ClassError{hsrbericht}{no \noexpand\project given}{}} +\newcommand\theproject{\hsr@project} + +\newcommand\topic[1]{\gdef\hsr@topic{#1}} +\newcommand\hsr@topic{\ClassError{hsrbericht}{no \noexpand\topic given}{}} +\newcommand\thetopic{\hsr@topic} + +\newcommand\version[1]{\gdef\hsr@version{#1}} +\newcommand\hsr@version{\ClassError{hsrbericht}{no \noexpand\version given}{}} +\newcommand\theversion{\hsr@version} + +\newcommand\instructor[1]{\gdef\hsr@instructor{#1}} +\newcommand\hsr@instructor{\ClassError{hsrbericht}{no \noexpand\instructor given}{}} +\newcommand\theinstructor{\hsr@instructor} + +\newcommand\startdate[1]{\gdef\hsr@startdate{#1}} +\newcommand\hsr@startdate{\ClassError{hsrbericht}{no \noexpand\startdate given}{}} +\newcommand\thestartdate{\hsr@startdate} + +\newcommand\finishdate[1]{\gdef\hsr@finishdate{#1}} +\newcommand\hsr@finishdate{\ClassError{hsrbericht}{no \noexpand\finishdate given}{}} +\newcommand\thefinishdate{\hsr@finishdate} + +%% Author informations +\newcommand\address[1]{\gdef\hsr@address{#1}} +\newcommand\hsr@address{\ClassWarning{hsrbericht}{no \noexpand\address given}{}} +\newcommand\theaddress{\hsr@address} + +\newcommand\matriculationnr[1]{\gdef\hsr@matriculationnr{#1}} +\newcommand\hsr@matriculationnr{\ClassError{hsrbericht}{no \noexpand\matriculationnr given}{}} +\newcommand\thematriculationnr{\hsr@matriculationnr} + +%% Logos informations +\newcommand\logo[1]{\gdef\hsr@logo{#1}} +\newcommand\hsr@logo{\ClassWarning{hsrbericht}{no \noexpand\logo given}{}} +\newcommand\thelogo{\hsr@logo} + +\newcommand\clientlogo[1]{\gdef\hsr@clientlogo{#1}} +\newcommand\hsr@clientlogo{\ClassWarning{hsrbericht}{no \noexpand\clientlogo given}{}} +\newcommand\theclientlogo{\hsr@clientlogo} + +\LoadClass[a4paper]{article} + +%% Style deps +\RequirePackage{geometry} +\RequirePackage{fancyhdr} +\RequirePackage{titling} +\RequirePackage{totpages} +\RequirePackage{array} + +%% Insert metadata in the pdf +\PassOptionsToPackage{plainpages=false, pdfpagelabels, pdfusetitle}{hyperref} +\RequirePackage{hyperref} + + +%% Configure Sans-Serif font +\ifhsr@sans + \ifhsr@slab + \PackageError{hsrzf}{% + sans ans slab options cannot be used at the same time + } + \fi + \ifhsr@concrete{hsrzf}{% + sans and concrete options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} + \RequirePackage{cmbright} + \RequirePackage{sfmath} +\fi + +%% Configure Slab-Serif font +\ifhsr@slab + \ifhsr@sans + \PackageError{hsrzf}{% + slab and sans options cannot be used at the same time + } + \fi + \ifhsr@concrete{hsrzf}{% + slab and concrete options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} + \PassOptionsToPackage{rm,light}{roboto} + \RequirePackage{roboto} +\fi + +%% Configure (secret) concrete font +\ifhsr@concrete + \ifhsr@sans{hsrzf}{% + concrete and sans options cannot be used at the same time + } + \fi + \ifhsr@slab + \PackageError{hsrzf}{% + concrete ans slab options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{boldsans,amssymb}{concmath} + \RequirePackage{concmath} + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} +\fi + +%% configure geometry +%% defaults to big +\newlength{\hsr@hmarginwidth} +\newlength{\hsr@vmarginheight} + +\ifx\hsr@margin\@empty + \setlength\hsr@hmarginwidth{30mm} + \setlength\hsr@vmarginheight{30mm} +\else + \expandafter\ifstrequal\expandafter{\hsr@margin}{huge}{ + \setlength\hsr@hmarginwidth{45mm} + \setlength\hsr@vmarginheight{40mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{large}{ + \setlength\hsr@hmarginwidth{35mm} + \setlength\hsr@vmarginheight{35mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{big}{ + \setlength\hsr@hmarginwidth{30mm} + \setlength\hsr@vmarginheight{30mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{normal}{ + \setlength\hsr@hmarginwidth{25mm} + \setlength\hsr@vmarginheight{30mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{small}{ + \setlength\hsr@hmarginwidth{20mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{tiny}{ + \setlength\hsr@hmarginwidth{10mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{minimal}{ + \setlength\hsr@hmarginwidth{ 5mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + % TODO: fix this + % \ClassError{hsrzf}{Invalid margin size} + % \setlength\hsr@hmarginwidth{30mm} + % \setlength\hsr@vmarginheight{30mm} +\fi + + + + +%% Redefine title and abstract +\renewcommand\maketitle{% +\begin{titlepage} + \thispagestyle{hsrbericht} + \begin{center} + \vspace*{6cm} + \textbf{\fontsize{48}{60}\selectfont \@title} + \vspace{1.5cm} \\ + \textbf{\fontsize{24}{48}\selectfont \hsr@subtitle} + \vspace{1cm} \\ + \textbf{\fontsize{22}{48}\selectfont \hsr@category} + \vspace{0.5cm} \\ + \begin{tabular}{rl} + \textbf{Version:} & \hsr@version \\ + \end{tabular} + \vspace{4cm} \\ + \begin{tabular}{rl p{1.5cm} rl} + \textbf{Autor:} & \textbf{\@author} && Dozent: & \hsr@instructor \\ + E-Mail: & \texttt{\hsr@authoremail} && Themengebiet: & \hsr@topic \\ + Matrikelnummer: & \hsr@matriculationnr && Studiengang: & \hsr@course \\ + Adresse: & \hsr@address && & \\ + \end{tabular}{} + \vspace{2cm} \\ + \begin{tabular}{rl} + \textbf{Erstellt am:} & \textbf{\hsr@startdate} \\ + \textbf{Letze Änderung am:} & \textbf{\hsr@finishdate} \\ + \end{tabular} + \end{center} +\end{titlepage}} + +\renewenvironment{abstract}{% + \section*{Abstract}% + \newcommand\problem{\paragraph{Problem}} + \newcommand\goal{\paragraph{Ziel}} + \newcommand\method{\paragraph{Method / Vorgehen}} + \newcommand\results{\paragraph{Wesentliche Ergebnisse}} + \newcommand\suggestions{\paragraph{Empfehlungen}} + \newcommand\keywords{\paragraph{Schl\"usselw\"orter}} +}{} + +%% TODO: twoside / book support +%% Debug: +%% \RequirePackage{showframe} + +\newgeometry{ + hmargin=\hsr@hmarginwidth, + vmargin=\hsr@vmarginheight, + marginparsep=0pt, + marginpar=0pt, +} + +%% Configure headers +\fancypagestyle{hsrbericht}{% + \fancyhf{} % clear + \fancyhead[C]{\@title} + \fancyhead[R]{\hsr@clientlogo} + \fancyhead[L]{\hsr@logo} + \fancyfoot[R]{\thepage / \pageref{TotPages} } + \fancyfoot[L]{Dockument: \jobname \\ Druck: \finishdate} + \renewcommand{\headrulewidth}{.5pt} + \renewcommand{\footrulewidth}{.5pt} +} + +\fancypagestyle{plain}{% + \fancyhf{} % clear + \fancyhead[C]{\@title} + \fancyhead[R]{\hsr@clientlogo} + \fancyhead[L]{\hsr@logo} + \fancyfoot[R]{\thepage / \pageref{TotPages} } + \fancyfoot[L]{Dockument: \jobname \\ Druck: \finishdate} + \renewcommand{\headrulewidth}{.5pt} + \renewcommand{\footrulewidth}{.5pt} +} + +\pagestyle{hsrbericht} + +\endinput +%% +%% End of file `hsrbericht.cls'. diff --git a/Master/texmf-dist/tex/latex/oststud/hsrstud.sty b/Master/texmf-dist/tex/latex/oststud/hsrstud.sty new file mode 100644 index 00000000000..8beac5309a9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oststud/hsrstud.sty @@ -0,0 +1,286 @@ +%% +%% This is file `hsrstud.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hsrstud.dtx (with options: `package') +%% This document is part of the HSRStud LaTeX Package +%% +%% THE FOLLOWING WORK IS UNDER THE CC BY-SA 4.0 LICENSE +%% +%% You are free to +%% --------------- +%% * Share -- Copy and redistribute the material in any medium or format +%% * Adapt -- Remix, transform, and build upon the material for any +%% purpose, even commercially +%% +%% The licensor cannot revoke these freedoms as long as you follow the +%% license terms. +%% +%% Under the following terms +%% ------------------------- +%% * Attribution +%% You must give appropriate credit, provide a link to the license, and +%% indicate if changes were made. You may do so in any reasonable +%% manner, but not in any way that suggests the licensor endorses you +%% or your use. +%% +%% * ShareAlike +%% If you remix, transform, or build upon the material you must +%% distribute your contributions under the same license as the +%% original. +%% +%% * No additional restrictions +%% You may not apply legal terms or technological measures that +%% legally restrict others from doing anything the license permits. +%% +%% Notice +%% ------ +%% You do not have to comply with the license for elements of the material +%% in the public domain or where your use is permitted by an applicable +%% exception or limitation. +%% +%% No warranties are given. The license may not give you all of the +%% permissions necessary for your intended use. For example, other rights +%% such as publicity, privacy, or moral rights may limit how you use the +%% material. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{hsrstud}[2021/08/04 v0.2 HSR-Stud Macros] + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%% Dependencies (( +\RequirePackage{amsmath} +\RequirePackage{amssymb} +\RequirePackage{bm} + +\RequirePackage{esint} +\PassOptionsToPackage{b}{esvect} +\RequirePackage{esvect} + +\RequirePackage{xcolor} +\RequirePackage{hyperref} +\RequirePackage{listings} + +\RequirePackage{iftex} +\RequirePackage{kvoptions} +%% )) + +\SetupKeyvalOptions{ + family=hsr, + prefix=hsr@ +} + +%% Do not renew LaTeX Macros +\DeclareBoolOption[false]{dontrenew} + +%% Vector style +\DeclareBoolOption[false]{arrowvec} +\DeclareComplementaryOption{boldvec}{arrowvec} + +%% Vector derivative style +\DeclareBoolOption[false]{textvecdiff} +\DeclareComplementaryOption{delvecdiff}{textvecdiff} + +%% Process options +\ProcessLocalKeyvalOptions* + +%% TODO: change letters in german +\newcommand{\bookref}[1]{\texttt{\textcolor{hsr-mauve}{P.#1}}} +\newcommand{\notesref}[1]{\texttt{\textcolor{hsr-blue}{S.#1}}} +\newcommand{\lectureref}[1]{\texttt{\textcolor{hsr-lakegreen}{L.#1}}} + +%% Theming for hyperref and listings (( +\hypersetup{ + colorlinks=true, + linkcolor=hsr-black, + citecolor=hsr-mauve, + filecolor=hsr-black, + urlcolor=hsr-blue, +} + +%% Common listings settings +\lstdefinestyle{hsr-base}{ + belowcaptionskip=\baselineskip, + breaklines=true, + frame=none, + inputencoding=utf8, + % margin + xleftmargin=\parindent, + % numbers + numbers=left, + numbersep=5pt, + numberstyle=\ttfamily\footnotesize\color{hsr-black40}, + % background + backgroundcolor=\color{white}, + showstringspaces=false, + % default language + language=[LaTeX]TeX, + % break long lines, and show an arrow where the line was broken + breaklines=true, + postbreak=\mbox{\textcolor{hsr-blue}{$\hookrightarrow$}\space}, + % font + basicstyle=\ttfamily\small, + identifierstyle=\color{hsr-black}, + keywordstyle=\color{hsr-blue}, + commentstyle=\color{hsr-black40}, + stringstyle=\color{hsr-mauve80}, +} + +%% Define missing languages / aliases +\lstdefinelanguage{LaTeX}{ + language=[LaTeX]Tex +} + +%% Set style +\lstset{style=hsr-base, escapechar=`} +%%)) + +%% Vector (( +\newcommand{\hsrvecbold}[1]{\mathbf{\bm{#1}}} +\newcommand{\hsrvecarrow}[1]{\vv{\mathrm{#1}}} % from esvect + +\newcommand{\@hsrvecf}[1]{\hsrvecbold{#1}} +\ifhsr@arrowvec + \renewcommand{\@hsrvecf}[1]{\hsrvecarrow{#1}} +\fi + +\newcommand{\vc}{\@hsrvecf} +\ifhsr@dontrenew\else + % save previous command + \newcommand{\vaccent}{\v} + \newcommand{\oldvec}{\vec} + % redefine + \renewcommand{\v}[1]{\@hsrvecf{#1}} + \renewcommand{\vec}[1]{\@hsrvecf{#1}} +\fi +%%)) + +%% Unit vector (( +\newcommand{\hsruvecbold}[1]{\vec{\hat{#1}}} +\newcommand{\hsruvecarrow}[1]{\hat{\mathrm{#1}}} +\newcommand{\@hsruvecf}[1]{\hsruvecbold{#1}} +\ifhsr@arrowvec + \renewcommand{\@hsruvecf}[1]{\hsruvecarrow{#1}} +\fi + +\newcommand{\uv}[1]{\@hsruvecf{#1}} +\newcommand{\uvec}[1]{\@hsruvecf{#1}} +%%)) + +%% Products (( +\newcommand{\dotp}{\boldsymbol\cdot} +\newcommand{\crossp}{\boldsymbol\times} +%%)) + +\newcommand{\mx}[1]{\bm{\mathrm{#1}}} + +\newcommand{\heq}{\stackrel{\hat{\texttt{H}}}{=}} + +\newcommand{\dd}[2][]{\mathrm{d}^{#1} #2} +\newcommand{\di}[2][]{\,\dd[#1]{#2}} + +\newcommand{\deriv}[3][]{\frac{\dd[#1]{#2}}{\dd[]{#3^{#1}}}} +\newcommand{\pderiv}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} + +%% Gradient (( +\ifhsr@textvecdiff + \DeclareMathOperator{\grad}{grad} +\else + \newcommand{\grad}{\vec{\nabla}} +\fi +%% )) + +%% Divergence (( +\ifhsr@textvecdiff + \newcommand{\@hsrdivf}{div} +\else + \newcommand{\@hsrdivf}{\vec{\nabla}\dotp} +\fi + +\DeclareMathOperator{\divg}{\@hsrdivf} +\ifhsr@dontrenew\else + \let\divsymb=\div + \renewcommand{\div}{\operatorname{\@hsrdivf}} +\fi +%% )) + +%% Curl (( +\ifhsr@textvecdiff + \DeclareMathOperator{\curl}{curl} +\else + \DeclareMathOperator{\curl}{\vec{\nabla}\crossp} +\fi +%% )) + +%% laplacian (( +\ifhsr@textvecdiff + \DeclareMathOperator{\laplacian}{div grad} +\else + \DeclareMathOperator{\laplacian}{\nabla^2} +\fi + +\ifhsr@textvecdiff + \DeclareMathOperator{\vlaplacian}{div grad} +\else + \DeclareMathOperator{\vlaplacian}{\vec{\nabla}^2} +\fi +%% )) + +\definecolor{hsr-blue}{HTML}{0065A3} +\definecolor{hsr-blue80}{HTML}{3384B5} +\definecolor{hsr-blue60}{HTML}{66A3C8} +\definecolor{hsr-blue40}{HTML}{99C1DA} +\definecolor{hsr-blue20}{HTML}{CCE0ED} + +\definecolor{hsr-mauve}{HTML}{6E1C50} +\definecolor{hsr-mauve80}{HTML}{8B4973} +\definecolor{hsr-mauve60}{HTML}{A87796} +\definecolor{hsr-mauve40}{HTML}{C5A4B9} +\definecolor{hsr-mauve20}{HTML}{E2D2DC} + +\definecolor{hsr-lakegreen}{HTML}{548C86} +\definecolor{hsr-lakegreen80}{HTML}{76A39E} +\definecolor{hsr-lakegreen60}{HTML}{98BAB6} +\definecolor{hsr-lakegreen40}{HTML}{BBD1CF} +\definecolor{hsr-lakegreen20}{HTML}{DDE8E7} + +\definecolor{hsr-reed}{HTML}{7B6951} +\definecolor{hsr-reed80}{HTML}{958774} +\definecolor{hsr-reed60}{HTML}{B0A597} +\definecolor{hsr-reed40}{HTML}{CAC3B9} +\definecolor{hsr-reed20}{HTML}{E5E1DC} + +\definecolor{hsr-petrol}{HTML}{00738D} +\definecolor{hsr-petrol80}{HTML}{338FA4} +\definecolor{hsr-petrol60}{HTML}{66ABBB} +\definecolor{hsr-petrol40}{HTML}{99C7D1} +\definecolor{hsr-petrol20}{HTML}{CCE3E8} + +\definecolor{hsr-basswood}{HTML}{BABD5D} +\definecolor{hsr-basswood80}{HTML}{C8CA7D} +\definecolor{hsr-basswood60}{HTML}{D6D79E} +\definecolor{hsr-basswood40}{HTML}{E3E5BE} +\definecolor{hsr-basswood20}{HTML}{F1F2DF} + +\definecolor{hsr-lightgrey}{HTML}{C6C7C8} +\definecolor{hsr-lightgrey80}{HTML}{D1D2D3} +\definecolor{hsr-lightgrey60}{HTML}{DDDDDE} +\definecolor{hsr-lightgrey40}{HTML}{E8E8E9} +\definecolor{hsr-lightgrey20}{HTML}{F4F4F4} + +\definecolor{hsr-black}{HTML}{1A171B} +\definecolor{hsr-black80}{HTML}{484549} +\definecolor{hsr-black60}{HTML}{767476} +\definecolor{hsr-black40}{HTML}{A4A2A4} +\definecolor{hsr-black20}{HTML}{D1D1D1} + +\endinput +%% +%% End of file `hsrstud.sty'. diff --git a/Master/texmf-dist/tex/latex/oststud/hsrzf.cls b/Master/texmf-dist/tex/latex/oststud/hsrzf.cls new file mode 100644 index 00000000000..3717e270b83 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oststud/hsrzf.cls @@ -0,0 +1,298 @@ +%% +%% This is file `hsrzf.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hsrstud-classes.dtx (with options: `hsrzf') +%% This document is part of the HSRStud LaTeX Package +%% +%% THE FOLLOWING WORK IS UNDER THE CC BY-SA 4.0 LICENSE +%% +%% You are free to +%% --------------- +%% * Share -- Copy and redistribute the material in any medium or format +%% * Adapt -- Remix, transform, and build upon the material for any +%% purpose, even commercially +%% +%% The licensor cannot revoke these freedoms as long as you follow the +%% license terms. +%% +%% Under the following terms +%% ------------------------- +%% * Attribution +%% You must give appropriate credit, provide a link to the license, and +%% indicate if changes were made. You may do so in any reasonable +%% manner, but not in any way that suggests the licensor endorses you +%% or your use. +%% +%% * ShareAlike +%% If you remix, transform, or build upon the material you must +%% distribute your contributions under the same license as the +%% original. +%% +%% * No additional restrictions +%% You may not apply legal terms or technological measures that +%% legally restrict others from doing anything the license permits. +%% +%% Notice +%% ------ +%% You do not have to comply with the license for elements of the material +%% in the public domain or where your use is permitted by an applicable +%% exception or limitation. +%% +%% No warranties are given. The license may not give you all of the +%% permissions necessary for your intended use. For example, other rights +%% such as publicity, privacy, or moral rights may limit how you use the +%% material. + + +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{hsrzf}[2020/04/05 v0.1 HSRStud Summary class] + + + +%% Coding Packages (Dependencies) +\RequirePackage{iftex} +\RequirePackage{kvoptions} +\RequirePackage{etoolbox} + +%% Default font +\RequirePackage{lmodern} + +%% Class options +\SetupKeyvalOptions{ + family=hsr, + prefix=hsr@ +} + +%% Use header and footer +\DeclareBoolOption[false]{header} +\DeclareComplementaryOption{noheader}{header} + +%% Use a sans-serif slab-serif or concrete font +\DeclareBoolOption[false]{sans} +\DeclareBoolOption[false]{slab} +\DeclareBoolOption[false]{concrete} + +%% Configures the geometry package +%% +%% Possible values: +%% - huge (45mm, 40mm) +%% - large (35mm, 35mm) +%% - big (30mm, 30mm) +%% - normal (25mm, 30mm) +%% - small (20mm, 20mm) +%% - tiny (10mm, 20mm) +%% - minimal ( 5mm, 20mm) +\DeclareStringOption{margin}[huge] + +%% Configures the polyglossia package + +%% Pass other options to the class +\DeclareDefaultOption{% + \ifx\CurrentOptionValue\relax + \PackageWarningNoLine{\@currname}{% + Unknown option ``\CurrentOption''\MessageBreak + is passed to class ``article''% + }% + % Pass the option to package color. + % Again it is better to expand \CurrentOption. + \expandafter\PassOptionsToClass + \expandafter{\CurrentOption}{article} + \else + % Package color does not take options with values. + % We provide the standard LaTeX error. + \@unknownoptionerror + \fi +} + +\ProcessKeyvalOptions{hsr} + +%% Create new metadata fields + +%% Required fields +\newcommand\course[1]{\gdef\hsr@course{#1}} +\newcommand\hsr@course{\ClassError{hsrzf}{no \noexpand\course given}{}} +\newcommand\thecourse{\hsr@course} + +\newcommand\module[1]{\gdef\hsr@module{#1}} +\newcommand\hsr@module{\ClassError{hsrzf}{no \noexpand\module given}{}} +\newcommand\themodule{\hsr@module} + +\newcommand\semester[1]{\gdef\hsr@semester{#1}} +\newcommand\hsr@semester{\ClassError{hsrzf}{no \noexpand\semester given}{}} +\newcommand\thesemester{\hsr@semester} + +%% Optional fields +\newcommand\institute[1]{\gdef\hsr@institute{#1}} +\newcommand\hsr@institute{\ClassWarning{hsrzf}{no \noexpand\institute given}{}} +\newcommand\theinstitute{\hsr@institute} + +\newcommand\authoremail[1]{\gdef\hsr@authoremail{#1}} +\newcommand\hsr@authoremail{\ClassWarning{hsrzf}{no \noexpand\authoremail given}{}} +\newcommand\theauthoremail{\hsr@authoremail} + +\newcommand\maintainer[1]{\gdef\hsr@maintainer{#1}} +\newcommand\hsr@maintainer{\ClassWarning{hsrzf}{no \noexpand\maintainer given}{}} +\newcommand\themaintainer{\hsr@maintainer} + +\newcommand\contributors[1]{\gdef\hsr@contributors{#1}} +\newcommand\hsr@contributors{\ClassWarning{hsrzf}{no \noexpand\contributors given}{}} +\newcommand\thecontributors{\hsr@contributors} + +\LoadClass[a4paper]{article} + +%% Style deps +\RequirePackage{geometry} +\RequirePackage{fancyhdr} +\RequirePackage{titling} +\RequirePackage{totpages} +\RequirePackage{array} + +%% Insert metadata in the pdf +\PassOptionsToPackage{plainpages=false, pdfpagelabels, pdfusetitle}{hyperref} +\RequirePackage{hyperref} + + +%% Configure Sans-Serif font +\ifhsr@sans + \ifhsr@slab + \PackageError{hsrzf}{% + sans ans slab options cannot be used at the same time + } + \fi + \ifhsr@concrete{hsrzf}{% + sans and concrete options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} + \RequirePackage{cmbright} + \RequirePackage{sfmath} +\fi + +%% Configure Slab-Serif font +\ifhsr@slab + \ifhsr@sans + \PackageError{hsrzf}{% + slab and sans options cannot be used at the same time + } + \fi + \ifhsr@concrete{hsrzf}{% + slab and concrete options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} + \PassOptionsToPackage{rm,light}{roboto} + \RequirePackage{roboto} +\fi + +%% Configure (secret) concrete font +\ifhsr@concrete + \ifhsr@sans{hsrzf}{% + concrete and sans options cannot be used at the same time + } + \fi + \ifhsr@slab + \PackageError{hsrzf}{% + concrete ans slab options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{boldsans,amssymb}{concmath} + \RequirePackage{concmath} + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} +\fi + +%% configure geometry +%% defaults to big +\newlength{\hsr@hmarginwidth} +\newlength{\hsr@vmarginheight} + +\ifx\hsr@margin\@empty + \setlength\hsr@hmarginwidth{30mm} + \setlength\hsr@vmarginheight{30mm} +\else + \expandafter\ifstrequal\expandafter{\hsr@margin}{huge}{ + \setlength\hsr@hmarginwidth{45mm} + \setlength\hsr@vmarginheight{40mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{large}{ + \setlength\hsr@hmarginwidth{35mm} + \setlength\hsr@vmarginheight{35mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{big}{ + \setlength\hsr@hmarginwidth{30mm} + \setlength\hsr@vmarginheight{30mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{normal}{ + \setlength\hsr@hmarginwidth{25mm} + \setlength\hsr@vmarginheight{30mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{small}{ + \setlength\hsr@hmarginwidth{20mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{tiny}{ + \setlength\hsr@hmarginwidth{10mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{minimal}{ + \setlength\hsr@hmarginwidth{ 5mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + % TODO: fix this + % \ClassError{hsrzf}{Invalid margin size} + % \setlength\hsr@hmarginwidth{30mm} + % \setlength\hsr@vmarginheight{30mm} +\fi + + +%% TODO: change vmarginheight if header is on +\newgeometry{ + hmargin=\hsr@hmarginwidth, + vmargin=\hsr@vmarginheight, + marginparsep=0pt, + marginpar=0pt, +} + +\fancypagestyle{hsrzf}{% + \fancyhf{} % clear + \fancyhead[L]{\leftmark} + \fancyhead[C]{\themodule} + \fancyhead[R]{\@date} + + \fancyfoot[L]{\href{https://github.com/HSR-Stud/}{\texttt{HSR-Stud}}} + \fancyfoot[C]{\texttt{CC BY-NC-SA}} + \fancyfoot[R]{\thepage ~/ \pageref{TotPages}} + + \renewcommand{\headrulewidth}{.5pt} + \renewcommand{\footrulewidth}{.5pt} +} + +\fancypagestyle{hsrzf-norulers}{% + \fancyhf{} % clear + \fancyhead[L]{\leftmark} + \fancyhead[C]{\themodule} + \fancyhead[R]{\@date} + + \fancyfoot[L]{\href{https://github.com/HSR-Stud/}{\texttt{HSR-Stud}}} + \fancyfoot[C]{\texttt{CC BY-NC-SA}} + \fancyfoot[R]{\thepage ~/ \pageref{TotPages}} + + \renewcommand{\headrulewidth}{0pt} + \renewcommand{\footrulewidth}{0pt} +} + +\ifhsr@header +\pagestyle{hsrzf} +\fi + +\endinput +%% +%% End of file `hsrzf.cls'. diff --git a/Master/texmf-dist/tex/latex/oststud/oststud.sty b/Master/texmf-dist/tex/latex/oststud/oststud.sty new file mode 100644 index 00000000000..ab9cd441f90 --- /dev/null +++ b/Master/texmf-dist/tex/latex/oststud/oststud.sty @@ -0,0 +1,232 @@ +%% +%% This is file `oststud.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% oststud.dtx (with options: `package') +%% This document is part of the HSRStud LaTeX Package +%% +%% THE FOLLOWING WORK IS UNDER THE CC BY-SA 4.0 LICENSE +%% +%% You are free to +%% --------------- +%% * Share -- Copy and redistribute the material in any medium or format +%% * Adapt -- Remix, transform, and build upon the material for any +%% purpose, even commercially +%% +%% The licensor cannot revoke these freedoms as long as you follow the +%% license terms. +%% +%% Under the following terms +%% ------------------------- +%% * Attribution +%% You must give appropriate credit, provide a link to the license, and +%% indicate if changes were made. You may do so in any reasonable +%% manner, but not in any way that suggests the licensor endorses you +%% or your use. +%% +%% * ShareAlike +%% If you remix, transform, or build upon the material you must +%% distribute your contributions under the same license as the +%% original. +%% +%% * No additional restrictions +%% You may not apply legal terms or technological measures that +%% legally restrict others from doing anything the license permits. +%% +%% Notice +%% ------ +%% You do not have to comply with the license for elements of the material +%% in the public domain or where your use is permitted by an applicable +%% exception or limitation. +%% +%% No warranties are given. The license may not give you all of the +%% permissions necessary for your intended use. For example, other rights +%% such as publicity, privacy, or moral rights may limit how you use the +%% material. +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{oststud} + [2023/04/18 v0.3 OST Student's package] +\RequirePackage{xcolor} +\RequirePackage{amsmath} +\RequirePackage{amssymb} +\RequirePackage{bm} +\RequirePackage{hyperref} +\RequirePackage{listings} +\SetupKeyvalOptions{ + family=ost, + prefix=ost@ +} +\DeclareBoolOption[false]{dontrenew} +\DeclareBoolOption[false]{textvecdiff} +\DeclareBoolOption[false]{bfemph} +\DeclareBoolOption[false]{bbprobability} +\ProcessLocalKeyvalOptions* +\ifost@bfemph + \ifost@dontrenew + \PackageError{The options \noexpand\dontrenew and \noexpand\bfemph cannot be used at the same time!} + \fi + \long\expandafter\def\csname em \endcsname{% + \@nomath\em + \if b\expandafter\@car\f@series\@nil + \itshape\else\bfseries\fi + } +\fi +\newcommand{\ost@vec}[1]{\mathbf{\bm{#1}}} +\ifost@dontrenew + \newcommand{\bvec}[1]{\ost@vec{#1}} +\else + \let\oldvec\vec + \renewcommand{\vec}[1]{\ost@vec{#1}} +\fi +\newcommand{\uvec}[1]{\vec{\hat{#1}}} +\DeclareMathOperator{\dotp}{\boldsymbol\cdot} +\DeclareMathOperator{\crossp}{\boldsymbol\times} +\ifost@textvecdiff + \DeclareMathOperator{\grad}{grad} +\else + \DeclareMathOperator{\grad}{\vec{\nabla}} +\fi +\ifost@textvecdiff + \DeclareMathOperator{\ost@div}{div} +\else + \DeclareMathOperator{\ost@div}{\vec{\nabla}\dotp} +\fi +\ifost@dontrenew + \DeclareMathOperator{\divg}{\ost@div} +\else + \let\divsymb\div + \renewcommand{\div}{\ost@div} +\fi +\ifost@textvecdiff + \DeclareMathOperator{\curl}{curl} +\else + \DeclareMathOperator{\curl}{\vec{\nabla}\crossp} +\fi +\ifost@textvecdiff + \DeclareMathOperator{\laplacian}{\div\grad} + \DeclareMathOperator{\vlaplacian}{\div\grad} +\else + \DeclareMathOperator{\laplacian}{\nabla^2} + \DeclareMathOperator{\vlaplacian}{\vec{\nabla}^2} +\fi +\newcommand{\mx}[1]{\mathbf{\bm{#1}}} +\newcommand{\mt}[1]{{#1}^\mathsf{T}} +\newcommand{\mh}[1]{{#1}^\mathsf{H}} +\newcommand{\minv}[1]{{#1}^{-1}} +\DeclareMathOperator{\tr}{tr} +\DeclareMathOperator*{\argmax}{arg\,max} +\DeclareMathOperator*{\argmin}{arg\,min} +\ifost@dontrenew\else + \let\oldRe\Re \let\oldIm\Im + \renewcommand{\Re}[1]{\mathrm{Re} \left\{#1\right\}} + \renewcommand{\Im}[1]{\mathrm{Im} \left\{#1\right\}} +\fi +\ifost@bbprobability + \DeclareMathOperator{\ost@expectation}{\mathbb{E}} +\else + \DeclareMathOperator{\ost@expectation}{E} +\fi +\newcommand{\E}[1]{\ost@expectation\left\{#1\right\}} +\ifost@bbprobability + \DeclareMathOperator{\ost@variance}{\mathbb{V}} +\else + \DeclareMathOperator{\ost@variance}{Var} +\fi +\newcommand{\Var}[1]{\ost@variance\left\{#1\right\}} +\ifost@bbprobability + \DeclareMathOperator{\ost@probability}{\mathbb{P}} +\else + \DeclareMathOperator{\ost@probability}{Pr} +\fi +\ifost@dontrenew + \newcommand{\P}[1]{\ost@probability\left\{#1\right\}} +\else + \renewcommand{\Pr}[1]{\ost@probability\left\{#1\right\}} +\fi +\DeclareMathOperator{\fourier}{\mathcal{F}} +\DeclareMathOperator{\ifourier}{\mathcal{F}^{-1}} +\DeclareMathOperator{\laplace}{\mathcal{L}} +\DeclareMathOperator{\ilaplace}{\mathcal{L}^{-1}} +\DeclareMathOperator{\ztransf}{\mathcal{Z}} +\DeclareMathOperator{\iztransf}{\mathcal{Z}^{-1}} +\DeclareMathOperator{\hilbert}{\mathcal{H}} +\newcommand{\corresponds}{% + \mbox{\setlength{\unitlength}{0.1em}% + \begin{picture}(20,10)% + \put(5,3){\circle{4}}% + \put(7,3){\line(1,0){7}}% + \put(16,3){\circle*{4}}% + \end{picture}}} +\newcommand{\rcorresponds}{% + \mbox{\setlength{\unitlength}{0.1em}% + \begin{picture}(20,10)% + \put(5,3){\circle*{4}}% + \put(7,3){\line(1,0){7}}% + \put(16,3){\circle{4}}% + \end{picture}}} +\newcommand{\ost@skriptum}{\PackageWarning{No \noexpand\skriptum given}} +\newcommand{\skriptum}[1]{\gdef\ost@skriptum{#1}} +\newcommand{\sref}[1]{% + \texttt{\textcolor{OSTBlackberry}{#1}}\nocite{\ost@skriptum}} +\newcommand{\ost@textbook}{\PackageWarning{No \noexpand\textbook given}} +\newcommand{\textbook}[1]{\gdef\ost@textbook{#1}} +\newcommand{\bref}[1]{% + \texttt{\textcolor{OSTRaspberry}{#1}}\nocite{\ost@textbook}} +\definecolor{OSTBlack}{RGB}{25,25,25} +\definecolor{OSTGray}{RGB}{198,198,198} +\definecolor{OSTBlackberry}{RGB}{140,25,95} +\definecolor{OSTRaspberry}{RGB}{215,40,100} +\definecolor{OSTPurple}{RGB}{149,96,164} +\definecolor{OSTDarkPurple}{RGB}{107,56,129} +\definecolor{OSTLightPurple}{RGB}{208,169,208} +\definecolor{OSTGreen}{RGB}{29,175,142} +\definecolor{OSTDarkGreen}{RGB}{0,126,107} +\definecolor{OSTLightGreen}{RGB}{167,213,194} +\definecolor{OSTRed}{RGB}{232,78,15} +\definecolor{OSTDarkRed}{RGB}{195,46,21} +\definecolor{OSTLightRed}{RGB}{243,154,139} +\definecolor{OSTBlue}{RGB}{0,134,205} +\definecolor{OSTDarkBlue}{RGB}{0,115,176} +\definecolor{OSTLightBlue}{RGB}{95,191,237} +\definecolor{OSTOrange}{RGB}{251,186,0} +\definecolor{OSTDarkOrange}{RGB}{209,143,0} +\definecolor{OSTLightOrange}{RGB}{253,214,175} +\hypersetup{ + colorlinks=true, + linkcolor=OSTBlack, + citecolor=OSTBlackberry, + filecolor=OSTBlack, + urlcolor=OSTDarkBlue, +} +\lstdefinestyle{ost-base}{ + belowcaptionskip=\baselineskip, + breaklines=true, + frame=none, + inputencoding=utf8, + % margin + xleftmargin=\parindent, + % numbers + numbers=left, + numbersep=5pt, + numberstyle=\ttfamily\footnotesize\color{OSTGray}, + % background + backgroundcolor=\color{white}, + showstringspaces=false, + % default language + language=TeX, + % break long lines, and show an arrow where the line was broken + breaklines=true, + postbreak=\mbox{\textcolor{OSTDarkBlue}{$\hookrightarrow$}\space}, + % font + basicstyle=\ttfamily\small, + identifierstyle=\color{OSTBlack}, + keywordstyle=\color{OSTBlue}, + commentstyle=\color{OSTGray}, + stringstyle=\color{OSTBlackberry}, +} +\lstset{style=ost-base, escapechar=`} +\endinput +%% +%% End of file `oststud.sty'. |