classic template fixes
This commit is contained in:
@@ -7,6 +7,11 @@
|
|||||||
#let serif_font = "Merriweather";
|
#let serif_font = "Merriweather";
|
||||||
#let tul_logomark_size = 6.5em;
|
#let tul_logomark_size = 6.5em;
|
||||||
|
|
||||||
|
// COUNTERS
|
||||||
|
|
||||||
|
#let image_count = counter("image_count");
|
||||||
|
#let table_count = counter("table_count");
|
||||||
|
|
||||||
// TYPST ELEMENT STYLING
|
// TYPST ELEMENT STYLING
|
||||||
|
|
||||||
#let default_styling(flip_bonding, faculty_color, content) = {
|
#let default_styling(flip_bonding, faculty_color, content) = {
|
||||||
@@ -33,11 +38,12 @@
|
|||||||
set par(justify: true);
|
set par(justify: true);
|
||||||
|
|
||||||
// figures
|
// figures
|
||||||
let figure_numbering(c) = {
|
let figure_numbering(realcount, c) = {
|
||||||
|
context realcount.step();
|
||||||
context numbering("1. 1", counter(heading).get().at(0), c)
|
context numbering("1. 1", counter(heading).get().at(0), c)
|
||||||
};
|
};
|
||||||
show figure.where(kind: image): set figure(numbering: figure_numbering);
|
show figure.where(kind: image): set figure(numbering: figure_numbering.with(image_count));
|
||||||
show figure.where(kind: table): set figure(numbering: figure_numbering);
|
show figure.where(kind: table): set figure(numbering: figure_numbering.with(table_count));
|
||||||
show figure.where(kind: table): set figure.caption(position: top);
|
show figure.where(kind: table): set figure.caption(position: top);
|
||||||
show figure: it => {
|
show figure: it => {
|
||||||
block(it, above: 2em, below: 2em);
|
block(it, above: 2em, below: 2em);
|
||||||
@@ -265,9 +271,9 @@
|
|||||||
|
|
||||||
// _ FIGURE OUTLINE
|
// _ FIGURE OUTLINE
|
||||||
|
|
||||||
#let _figure_outline(target, title) = {
|
#let _figure_outline(realcount, target, title) = {
|
||||||
context {
|
context {
|
||||||
if counter(figure.where(kind: target)).final() == 0 {
|
if realcount.final().at(0) == 0 {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_outline_figure_inner(figure.where(kind: target), title, (it) => it.element.caption.body);
|
_outline_figure_inner(figure.where(kind: target), title, (it) => it.element.caption.body);
|
||||||
@@ -277,13 +283,13 @@
|
|||||||
// IMAGE LIST
|
// IMAGE LIST
|
||||||
|
|
||||||
#let imagelist(language) = {
|
#let imagelist(language) = {
|
||||||
_figure_outline(image, get_lang_item(language, "image_list"));
|
_figure_outline(image_count, image, get_lang_item(language, "image_list"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TABLE LIST
|
// TABLE LIST
|
||||||
|
|
||||||
#let tablelist(language) = {
|
#let tablelist(language) = {
|
||||||
_figure_outline(table, get_lang_item(language, "table_list"));
|
_figure_outline(table_count, table, get_lang_item(language, "table_list"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ABBREVIATION LIST
|
// ABBREVIATION LIST
|
||||||
|
@@ -1,5 +1,15 @@
|
|||||||
#import "../lang.typ": get_lang_item
|
#import "../lang.typ": get_lang_item
|
||||||
#import "common.typ": mainpage, default_styling, assignment, disclaimer, abstract, toc, abbrlist
|
#import "common.typ": (
|
||||||
|
mainpage,
|
||||||
|
default_styling,
|
||||||
|
assignment,
|
||||||
|
disclaimer,
|
||||||
|
abstract,
|
||||||
|
toc,
|
||||||
|
abbrlist,
|
||||||
|
imagelist,
|
||||||
|
tablelist,
|
||||||
|
)
|
||||||
#import "../utils.typ": is_none, assert_not_none, assert_dict_has, assert_in_arr
|
#import "../utils.typ": is_none, assert_not_none, assert_dict_has, assert_in_arr
|
||||||
|
|
||||||
#let other(
|
#let other(
|
||||||
@@ -18,7 +28,8 @@
|
|||||||
default_styling(true, faculty_color, {
|
default_styling(true, faculty_color, {
|
||||||
toc(language);
|
toc(language);
|
||||||
abbrlist(language);
|
abbrlist(language);
|
||||||
|
imagelist(language);
|
||||||
|
tablelist(language);
|
||||||
pagebreak(to: "even", weak: true);
|
pagebreak(to: "even", weak: true);
|
||||||
content
|
content
|
||||||
|
|
||||||
|
@@ -7,8 +7,6 @@
|
|||||||
"study_branch": "Studijní obor",
|
"study_branch": "Studijní obor",
|
||||||
|
|
||||||
"bp": "Bakalářská práce",
|
"bp": "Bakalářská práce",
|
||||||
"dp": "Diplomová práce",
|
|
||||||
"dis": "Disertační práce",
|
|
||||||
|
|
||||||
"city": "Liberec",
|
"city": "Liberec",
|
||||||
|
|
||||||
@@ -53,8 +51,6 @@
|
|||||||
"study_branch": "Study branch",
|
"study_branch": "Study branch",
|
||||||
|
|
||||||
"bp": "Bachelor thesis",
|
"bp": "Bachelor thesis",
|
||||||
"dp": "Diploma thesis",
|
|
||||||
"dis": "Dissertation thesis",
|
|
||||||
|
|
||||||
"city": "Liberec",
|
"city": "Liberec",
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user