Compare commits
3 Commits
v0.9.4
...
bfa2fedefb
Author | SHA1 | Date | |
---|---|---|---|
bfa2fedefb
|
|||
8666604e8c
|
|||
a0eb5f4ed0
|
10
Makefile
10
Makefile
@@ -21,8 +21,8 @@ PACKDIR := pack/tultemplate2
|
||||
BUNDLEDIR := pack/bundle
|
||||
|
||||
TO_PACK := $(shell find template -type f) template/LICENSE
|
||||
BUNDLE_TARGETS := $(TO_PACK:%=$(BUNDLEDIR)/%) $(BUNDLEDIR)/citations.bib $(BUNDLEDIR)/bp.typ \
|
||||
$(BUNDLEDIR)/dp.typ $(BUNDLEDIR)/Makefile
|
||||
BUNDLE_TARGETS := $(TO_PACK:%=$(BUNDLEDIR)/%) $(BUNDLEDIR)/citations.bib $(BUNDLEDIR)/bp_cs.typ \
|
||||
$(BUNDLEDIR)/bp_en.typ $(BUNDLEDIR)/dp_cs.typ $(BUNDLEDIR)/Makefile
|
||||
PACK_TARGETS := $(TO_PACK:%=$(PACKDIR)/%) $(PACKDIR)/documentation.typ \
|
||||
$(PACKDIR)/documentation.pdf $(PACKDIR)/citations.bib
|
||||
|
||||
@@ -51,11 +51,7 @@ $(BUNDLEDIR)/citations.bib: citations.bib
|
||||
@mkdir -p $(@D)
|
||||
ln -f $< $@
|
||||
|
||||
$(BUNDLEDIR)/bp.typ: theses/bp.typ
|
||||
@mkdir -p $(@D)
|
||||
awk 'BEGIN{RS=""; ORS="\n\n"} NR>2{print}' $< | sed 's/\.\.\/template\//template\//' > $@
|
||||
|
||||
$(BUNDLEDIR)/dp.typ: theses/dp.typ
|
||||
$(BUNDLEDIR)/%.typ: theses/%.typ
|
||||
@mkdir -p $(@D)
|
||||
awk 'BEGIN{RS=""; ORS="\n\n"} NR>2{print}' $< | sed 's/\.\.\/template\//template\//' > $@
|
||||
|
||||
|
@@ -70,5 +70,5 @@
|
||||
content;
|
||||
bibliogr(language, citation_file);
|
||||
attachment_list(language);
|
||||
});
|
||||
}, language);
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#import "../theme.typ": faculty_logotype, tul_logomark, faculty_color
|
||||
#import "../lang.typ": get_lang_item
|
||||
#import "../lang.typ": get_lang_item, set_czech_nonbreakable_terms
|
||||
#import "../utils.typ": is_none, assert_dict_has, map_none
|
||||
|
||||
#let base_font = "Inter";
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
// TYPST ELEMENT STYLING
|
||||
|
||||
#let default_styling(flip_bonding, faculty_color, content) = {
|
||||
#let default_styling(flip_bonding, faculty_color, content, language) = {
|
||||
// page
|
||||
set page(
|
||||
margin: if flip_bonding {
|
||||
@@ -37,6 +37,9 @@
|
||||
// text
|
||||
set text(font: serif_font);
|
||||
set par(justify: true, first-line-indent: 0.63cm);
|
||||
if language == "cs" {
|
||||
content = set_czech_nonbreakable_terms(content);
|
||||
}
|
||||
|
||||
// figures
|
||||
let figure_numbering(realcount, c) = {
|
||||
|
@@ -40,5 +40,5 @@
|
||||
content;
|
||||
bibliogr(language, citation_file);
|
||||
attachment_list(language);
|
||||
});
|
||||
}, language);
|
||||
}
|
||||
|
@@ -45,6 +45,34 @@
|
||||
});
|
||||
}
|
||||
|
||||
#let set_czech_nonbreakable_terms(content) = {
|
||||
let space_after = (
|
||||
"[kosuvzai]",
|
||||
"(tj|tzv|tzn)\.",
|
||||
);
|
||||
show regex("\b((?i)(" + space_after.join("|") + ") )+\w+\b"): match => {
|
||||
box(match);
|
||||
}
|
||||
|
||||
let nonbreaking_abbreviations = (
|
||||
"a. s",
|
||||
"s. r. o",
|
||||
"v. o. s",
|
||||
"k. s",
|
||||
"n. p",
|
||||
"p. o",
|
||||
"č. ([pe]|ev)",
|
||||
"ev?. č",
|
||||
);
|
||||
show regex(
|
||||
"(?i)\b(" + nonbreaking_abbreviations.map((v) => { v.replace(".", "\\.") }).join("|") + ")\."
|
||||
): match => {
|
||||
box(match);
|
||||
}
|
||||
|
||||
content
|
||||
}
|
||||
|
||||
#let disclaimer(language, document_type, author_pronouns) = {
|
||||
let disclaimer = get_lang_item(language, "disclaimer_content");
|
||||
let replacements = get_lang_item(language, "disclaimer_replace").at(document_type);
|
||||
|
@@ -297,7 +297,7 @@
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout prefix="(" suffix=")" delimiter=", ">
|
||||
<layout prefix="[" suffix="]" delimiter=", ">
|
||||
<group delimiter=", ">
|
||||
<text variable="citation-number"/>
|
||||
<group>
|
||||
@@ -312,7 +312,7 @@
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout>
|
||||
<text variable="citation-number" display="left-margin" suffix=". "/>
|
||||
<text variable="citation-number" display="left-margin" prefix="[" suffix="] "/>
|
||||
<choose>
|
||||
<if type="book map" match="any">
|
||||
<group display="right-inline">
|
||||
|
Reference in New Issue
Block a user