diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e4c28ea --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.ttf filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md index 25d5f1d..4cef494 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,8 @@ make ``` That will compile the example document and view it. + +## Repo structure note + +> [!IMPORTANT] +> This repo uses git lfs to pull fonts. Please set it up (or download a packed build from releases). diff --git a/example.typ b/example.typ index 6409e44..1ba75e3 100644 --- a/example.typ +++ b/example.typ @@ -1,9 +1,9 @@ #import "template/template.typ": * #show: tultemplate2.with( - "latex", "fm", "cs", title: "Návod na použití Typst TUL šablony", - author: "Ondřej Mekina", + author: "Ondřej Mekina, Matěj Žucha", + supervisor: "Ondřej Mekina", ) = Lehký úvod do Typstu a této šablony diff --git a/template/fonts/cabin/Cabin-Bold.ttf b/template/fonts/cabin/Cabin-Bold.ttf index 212cbf0..9cc2c4d 100644 Binary files a/template/fonts/cabin/Cabin-Bold.ttf and b/template/fonts/cabin/Cabin-Bold.ttf differ diff --git a/template/fonts/cabin/Cabin-Italic.ttf b/template/fonts/cabin/Cabin-Italic.ttf index 1c4223f..25f34b5 100644 Binary files a/template/fonts/cabin/Cabin-Italic.ttf and b/template/fonts/cabin/Cabin-Italic.ttf differ diff --git a/template/fonts/cabin/Cabin-Regular.ttf b/template/fonts/cabin/Cabin-Regular.ttf index b56dba9..e4eb0d1 100644 Binary files a/template/fonts/cabin/Cabin-Regular.ttf and b/template/fonts/cabin/Cabin-Regular.ttf differ diff --git a/template/fonts/cabin_license.txt b/template/fonts/cabin/OFL.txt similarity index 100% rename from template/fonts/cabin_license.txt rename to template/fonts/cabin/OFL.txt diff --git a/template/fonts/inter/Inter-Black.otf b/template/fonts/inter/Inter-Black.otf new file mode 100644 index 0000000..8e18e36 Binary files /dev/null and b/template/fonts/inter/Inter-Black.otf differ diff --git a/template/fonts/inter/Inter-BlackItalic.otf b/template/fonts/inter/Inter-BlackItalic.otf new file mode 100644 index 0000000..e2144c2 Binary files /dev/null and b/template/fonts/inter/Inter-BlackItalic.otf differ diff --git a/template/fonts/inter/Inter-Bold.otf b/template/fonts/inter/Inter-Bold.otf new file mode 100644 index 0000000..c74cc0c Binary files /dev/null and b/template/fonts/inter/Inter-Bold.otf differ diff --git a/template/fonts/inter/Inter-BoldItalic.otf b/template/fonts/inter/Inter-BoldItalic.otf new file mode 100644 index 0000000..20d20c1 Binary files /dev/null and b/template/fonts/inter/Inter-BoldItalic.otf differ diff --git a/template/fonts/inter/Inter-ExtraBold.otf b/template/fonts/inter/Inter-ExtraBold.otf new file mode 100644 index 0000000..3633fe8 Binary files /dev/null and b/template/fonts/inter/Inter-ExtraBold.otf differ diff --git a/template/fonts/inter/Inter-ExtraBoldItalic.otf b/template/fonts/inter/Inter-ExtraBoldItalic.otf new file mode 100644 index 0000000..1b54cfa Binary files /dev/null and b/template/fonts/inter/Inter-ExtraBoldItalic.otf differ diff --git a/template/fonts/inter/Inter-ExtraLight.otf b/template/fonts/inter/Inter-ExtraLight.otf new file mode 100644 index 0000000..6dc068d Binary files /dev/null and b/template/fonts/inter/Inter-ExtraLight.otf differ diff --git a/template/fonts/inter/Inter-ExtraLightItalic.otf b/template/fonts/inter/Inter-ExtraLightItalic.otf new file mode 100644 index 0000000..b68e731 Binary files /dev/null and b/template/fonts/inter/Inter-ExtraLightItalic.otf differ diff --git a/template/fonts/inter/Inter-Italic.otf b/template/fonts/inter/Inter-Italic.otf new file mode 100644 index 0000000..39d6016 Binary files /dev/null and b/template/fonts/inter/Inter-Italic.otf differ diff --git a/template/fonts/inter/Inter-Light.otf b/template/fonts/inter/Inter-Light.otf new file mode 100644 index 0000000..2a83ae1 Binary files /dev/null and b/template/fonts/inter/Inter-Light.otf differ diff --git a/template/fonts/inter/Inter-LightItalic.otf b/template/fonts/inter/Inter-LightItalic.otf new file mode 100644 index 0000000..ca9fb12 Binary files /dev/null and b/template/fonts/inter/Inter-LightItalic.otf differ diff --git a/template/fonts/inter/Inter-Medium.otf b/template/fonts/inter/Inter-Medium.otf new file mode 100644 index 0000000..ca7bfcd Binary files /dev/null and b/template/fonts/inter/Inter-Medium.otf differ diff --git a/template/fonts/inter/Inter-MediumItalic.otf b/template/fonts/inter/Inter-MediumItalic.otf new file mode 100644 index 0000000..2df62bc Binary files /dev/null and b/template/fonts/inter/Inter-MediumItalic.otf differ diff --git a/template/fonts/inter/Inter-Regular.otf b/template/fonts/inter/Inter-Regular.otf new file mode 100644 index 0000000..84e6a61 Binary files /dev/null and b/template/fonts/inter/Inter-Regular.otf differ diff --git a/template/fonts/inter/Inter-SemiBold.otf b/template/fonts/inter/Inter-SemiBold.otf new file mode 100644 index 0000000..daf4c44 Binary files /dev/null and b/template/fonts/inter/Inter-SemiBold.otf differ diff --git a/template/fonts/inter/Inter-SemiBoldItalic.otf b/template/fonts/inter/Inter-SemiBoldItalic.otf new file mode 100644 index 0000000..bc58b80 Binary files /dev/null and b/template/fonts/inter/Inter-SemiBoldItalic.otf differ diff --git a/template/fonts/inter/Inter-Thin.otf b/template/fonts/inter/Inter-Thin.otf new file mode 100644 index 0000000..22592e0 Binary files /dev/null and b/template/fonts/inter/Inter-Thin.otf differ diff --git a/template/fonts/inter/Inter-ThinItalic.otf b/template/fonts/inter/Inter-ThinItalic.otf new file mode 100644 index 0000000..c5ea2ec Binary files /dev/null and b/template/fonts/inter/Inter-ThinItalic.otf differ diff --git a/template/fonts/inter/OFL.txt b/template/fonts/inter/OFL.txt new file mode 100644 index 0000000..d05ec4b --- /dev/null +++ b/template/fonts/inter/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/template/fonts/noto_sans_mono/NotoSansMono-Black.ttf b/template/fonts/noto_sans_mono/NotoSansMono-Black.ttf new file mode 100644 index 0000000..a353ace --- /dev/null +++ b/template/fonts/noto_sans_mono/NotoSansMono-Black.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfa0df71de4798ad285129b7a552c809b2f0fd52defbed75dddc53694b2b50c4 +size 405388 diff --git a/template/fonts/noto_sans_mono/NotoSansMono-Bold.ttf b/template/fonts/noto_sans_mono/NotoSansMono-Bold.ttf new file mode 100644 index 0000000..f5d05bf --- /dev/null +++ b/template/fonts/noto_sans_mono/NotoSansMono-Bold.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c13b63c28f97181761213a0ba8fdb5d887c6d3855098937907c76b3b6efc1566 +size 405596 diff --git a/template/fonts/noto_sans_mono/NotoSansMono-ExtraBold.ttf b/template/fonts/noto_sans_mono/NotoSansMono-ExtraBold.ttf new file mode 100644 index 0000000..26c1fe3 --- /dev/null +++ b/template/fonts/noto_sans_mono/NotoSansMono-ExtraBold.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3335e6983ba9b9ea09fe9c3c89cd2600e81ace7a990ee4252e469d5ce8232077 +size 405872 diff --git a/template/fonts/noto_sans_mono/NotoSansMono-ExtraLight.ttf b/template/fonts/noto_sans_mono/NotoSansMono-ExtraLight.ttf new file mode 100644 index 0000000..3b93c43 --- /dev/null +++ b/template/fonts/noto_sans_mono/NotoSansMono-ExtraLight.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b74c640cd71560f2f4a5e85e8dcbd152a9f8836df090ecc7436250d7f926ff5 +size 406856 diff --git a/template/fonts/noto_sans_mono/NotoSansMono-Light.ttf b/template/fonts/noto_sans_mono/NotoSansMono-Light.ttf new file mode 100644 index 0000000..0cf578f --- /dev/null +++ b/template/fonts/noto_sans_mono/NotoSansMono-Light.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30c06c5547b5c7001915cf3b7335edcf107191d85daf8957c51be96091ce23fd +size 406728 diff --git a/template/fonts/noto_sans_mono/NotoSansMono-Medium.ttf b/template/fonts/noto_sans_mono/NotoSansMono-Medium.ttf new file mode 100644 index 0000000..34a597c --- /dev/null +++ b/template/fonts/noto_sans_mono/NotoSansMono-Medium.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:340794b9ffa781e8b93eac07c939c9ae963c24b6e80c779551f740f2ad5bcb94 +size 406276 diff --git a/template/fonts/noto_sans_mono/NotoSansMono-Regular.ttf b/template/fonts/noto_sans_mono/NotoSansMono-Regular.ttf new file mode 100644 index 0000000..a6e9e28 --- /dev/null +++ b/template/fonts/noto_sans_mono/NotoSansMono-Regular.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11b5d661e57865bce89d3f103a654cfa4faf9347abebac252e30742be1e657b2 +size 405892 diff --git a/template/fonts/noto_sans_mono/NotoSansMono-SemiBold.ttf b/template/fonts/noto_sans_mono/NotoSansMono-SemiBold.ttf new file mode 100644 index 0000000..81984a5 --- /dev/null +++ b/template/fonts/noto_sans_mono/NotoSansMono-SemiBold.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec768167911dc99680a3b8e9792f5a43122a7b1d422c5b581534f2bc5695908f +size 406188 diff --git a/template/fonts/noto_sans_mono/NotoSansMono-Thin.ttf b/template/fonts/noto_sans_mono/NotoSansMono-Thin.ttf new file mode 100644 index 0000000..4f13600 --- /dev/null +++ b/template/fonts/noto_sans_mono/NotoSansMono-Thin.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9de2b726fd27b0f6a9bda521afa8cb95b30531f6c106e545cbb048f9fd8230af +size 406244 diff --git a/template/fonts/noto_sans_mono/OFL.txt b/template/fonts/noto_sans_mono/OFL.txt new file mode 100644 index 0000000..09f020b --- /dev/null +++ b/template/fonts/noto_sans_mono/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/template/fonts/tul_mono_remastered.ttf b/template/fonts/tul_mono_remastered.ttf index 6b285a8..58754d7 100644 Binary files a/template/fonts/tul_mono_remastered.ttf and b/template/fonts/tul_mono_remastered.ttf differ diff --git a/template/template.typ b/template/template.typ index ebd56f4..39d7062 100644 --- a/template/template.typ +++ b/template/template.typ @@ -32,18 +32,18 @@ // //-> none #let tultemplate2( - style, - faculty, - lang, + style: "latex", + faculty: "tul", + lang: "cs", document: none, title: none, author: none, supervisor: none, programme: none, citations: "citations.bib", content, ) = { - import "template_classic.typ": template_classic + import "template_latex.typ": template_latex import "utils.typ": assert_in_dict let templates = ( - latex: template_classic, + latex: template_latex, ); assert_in_dict(style, templates, "template name"); diff --git a/template/template_classic.typ b/template/template_latex.typ similarity index 95% rename from template/template_classic.typ rename to template/template_latex.typ index 47b3a52..3bb2083 100644 --- a/template/template_classic.typ +++ b/template/template_latex.typ @@ -2,13 +2,14 @@ #import "lang.typ": lang_id #import "utils.typ": assert_in_dict -#let base_font = "Cabin"; +#let base_font = "Inter"; +#let mono_font = "Noto Sans Mono"; #let classic_header(faculty_id, language) = { let logotype = faculty_logotype(faculty_id, language); grid( - logotype, - block(align(right, block(tul_logomark(faculty_id), height: 5em)), width: 100%), + block(logotype, width: 100%), + block(align(right, block(tul_logomark(faculty_id), height: 5em))), columns: 2 ); } @@ -89,7 +90,7 @@ } } -#let template_classic( +#let template_latex( faculty_id, language, document_type, @@ -129,9 +130,10 @@ v(2cm); it }; + show raw: set text(font: mono_font); show raw.where(block: true): it => { block(it, fill: rgb("#eee"), inset: 1em) - } + }; set image(width: 80%); let language = lang_id(language); diff --git a/template/theme.typ b/template/theme.typ index a286a94..0ee1804 100644 --- a/template/theme.typ +++ b/template/theme.typ @@ -3,11 +3,19 @@ #let faculty_themes = ( + tul: ( + cmyk(80%, 81%, 0%, 0%), + ( + "TECHNICKÁ UNIVERZITA V LIBERCI&", + "TECHNICAL UNIVERSITY OF LIBEREC&", + ), + ), + fs: ( cmyk(45%, 35%, 30%, 10%), ( "FAKULTA STROJNÍ TUL&", - "FACULTY OF MECHANICAL ENGINEERING TUL&" + "FACULTY OF MECHANICAL ENGINEERING TUL&", ), ),