Compare commits
9 Commits
5e65284c5d
...
v0.1
Author | SHA1 | Date | |
---|---|---|---|
f956b862c5
|
|||
3d183b8673
|
|||
a446bce8e6
|
|||
86cdf2bbc7
|
|||
5ce21d8a87
|
|||
02dea43d4a
|
|||
![]() |
a32308caae | ||
![]() |
63583d2a35 | ||
![]() |
b3f6dee886 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
/*.pdf
|
||||
/pack
|
||||
|
19
LICENSE
Normal file
19
LICENSE
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2025 Ondřej Mekina, Matěj Žucha
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
27
Makefile
27
Makefile
@@ -5,6 +5,33 @@ view_example: example.pdf
|
||||
.PHONY: example
|
||||
example: example.pdf
|
||||
|
||||
TO_PACK := $(shell find template -type f) template/LICENSE
|
||||
PACK_TARGETS := $(TO_PACK:%=pack/tultemplate2/%) pack/tultemplate2/example.typ
|
||||
|
||||
.PHONY: pack
|
||||
pack: pack/tultemplate2.zip
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf pack
|
||||
rm -f example.pdf
|
||||
|
||||
pack/tultemplate2.zip: $(PACK_TARGETS)
|
||||
@mkdir -p $(@D)
|
||||
rm -f $@
|
||||
cd pack && zip -r tultemplate2.zip tultemplate2
|
||||
|
||||
pack/tultemplate2/example.typ: example.typ
|
||||
ln -f $< $@
|
||||
|
||||
pack/tultemplate2/template/LICENSE: LICENSE
|
||||
@mkdir -p $(@D)
|
||||
ln -f $< $@
|
||||
|
||||
pack/tultemplate2/template/%: template/%
|
||||
@mkdir -p $(@D)
|
||||
ln -f $< $@
|
||||
|
||||
TEMPLATE_SRCS := $(shell find template -type f)
|
||||
|
||||
%.pdf: %.typ $(TEMPLATE_SRCS)
|
||||
|
17
README.md
Normal file
17
README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# tultemplate2
|
||||
|
||||
Easy Typst template for TUL documents. Begin by compiling `example.typ` and reading it.
|
||||
|
||||
## How to compile
|
||||
|
||||
It is recommended to use either:
|
||||
- The on-line Typst editor (https://typst.app/play/) - use some zip build from releases
|
||||
- The `typst` CLI tool (available in Arch repos and Snap)
|
||||
|
||||
On Linux, with the `typst` command available, you can just run:
|
||||
|
||||
```sh
|
||||
make
|
||||
```
|
||||
|
||||
That will compile the example document and view it.
|
15
citations.bib
Normal file
15
citations.bib
Normal file
@@ -0,0 +1,15 @@
|
||||
@misc{ typst,
|
||||
author = "Wikidata",
|
||||
title = "Q117858460 --- Wikidata{,} ",
|
||||
year = "2025",
|
||||
url = "https://www.wikidata.org/w/index.php?title=Q117858460&oldid=2404700455",
|
||||
note = "[Online; cit. 24-Zář-2025]"
|
||||
}
|
||||
|
||||
@misc{ bibtex,
|
||||
author = "{Wikipedia contributors}",
|
||||
title = "BibTeX --- {Wikipedia}{,} The Free Encyclopedia",
|
||||
year = "2025",
|
||||
url = "https://en.wikipedia.org/w/index.php?title=BibTeX&oldid=1309039867",
|
||||
note = "[Online; cit 24-Zář-2025]"
|
||||
}
|
91
example.typ
91
example.typ
@@ -1,7 +1,7 @@
|
||||
#import "template/template.typ": *
|
||||
|
||||
#show: tultemplate.with(
|
||||
"classic", "fm", "cs",
|
||||
#show: tultemplate2.with(
|
||||
"latex", "fm", "cs",
|
||||
title: "Návod na použití Typst TUL šablony",
|
||||
author: "Ondřej Mekina",
|
||||
)
|
||||
@@ -192,6 +192,26 @@ Tady je praktická ukázka jednoduchého vložení obrázku s popiskem:
|
||||
Logo *TUL*
|
||||
])
|
||||
|
||||
== Citace
|
||||
|
||||
Šablona podporuje správu citací pomocí standardního BibTeX @bibtex souboru, stejně jako
|
||||
například LaTeX. Citace ve vhodném formátu stačí přidat do souboru _citations.bib_, poté je možné se
|
||||
na ně odkazovat pomocí `@jmeno_citace`, nebo `#cite(<jmeno_citace>)`. Můžu se tak třeba odkázat na
|
||||
citaci Typstu #cite(<typst>).
|
||||
|
||||
Formát souboru _citations.bib_ je naprosto stejný jako pro LaTeX. Tyto citace lze přímo vložit
|
||||
třeba z webu https://www.citace.com ve formátu BibTeX -- Typst tento formát také umí přečíst.
|
||||
|
||||
Soubor, ze kterého se načtou citace lze změnit pomocí argumentu šablony:
|
||||
|
||||
```typst
|
||||
#show: tultemplate2.with(
|
||||
...
|
||||
citations: "jinysoubor.bib",
|
||||
...
|
||||
)
|
||||
```
|
||||
|
||||
== Vnitřní odkazy a kotvy
|
||||
|
||||
Trochu navážeme na Odkazy (@links).
|
||||
@@ -217,10 +237,6 @@ Kotvu dáte někam do souboru a můžete na ní odkazovat stejně jako na citace
|
||||
@nazev_kotvy
|
||||
```
|
||||
|
||||
== Citace
|
||||
|
||||
#todo("přidat ukázky citací")
|
||||
|
||||
== Pro pokročilé
|
||||
|
||||
Typst má spoustu dalších způsobů stylování (a i skriptování). Podívejte se třeba na zdrojový kód
|
||||
@@ -229,3 +245,66 @@ pro nadpis @chained_subheading.
|
||||
Tyto pokročilejší funkce v drtivé většině dokumentů vůbec není potřeba použít. Nicméně pro
|
||||
ty, kteří to chtějí vyzkoušet, nebo to opravdu potřebují: podívejte se buď do zdrojového kódu
|
||||
této šablony nebo na dokumentaci Typstu https://typst.app/docs/.
|
||||
|
||||
= Workflow a jak si zjednoduššit práci
|
||||
|
||||
Tyhle věci používat _nemusíte_, aby vám šablona fungovala. Nicméně často jsou poměrně fajn.
|
||||
|
||||
== Protypování
|
||||
|
||||
=== Profily
|
||||
|
||||
Šablona disponuje funkcí `profile`. Funkce na prototypování šablony jsou nastaveny tak, aby
|
||||
při zapnutí profilu pro finální verzi buď vrátily čistou verzi dokumentu, nebo vyhodily error.
|
||||
|
||||
K dispozici jsou profily:
|
||||
- `debug` - Prototypování je povoleno, výstupem bude verze dokumentu s poznámkami
|
||||
- `release` - Výstupem bude čistý výsledný dokument
|
||||
|
||||
Při generování výstupu je doporučeno hned za volání šablony na začátku souboru přidat:
|
||||
|
||||
```typst
|
||||
#profile("release")
|
||||
```
|
||||
|
||||
To vám pojistí, aby ve výstupu nebyly poznámky a todo.
|
||||
|
||||
Pokud funkci `profile` nezavoláte, pak šablone použije profil "debug".
|
||||
|
||||
=== Todo
|
||||
|
||||
Pomocí todo svému budoucímu já můžete připomenout, že je něco potřeba dodělat. Funkce todo obsah
|
||||
zvýrazní, a v případě, že je zvolený profil "release", při kompilaci vyhodí error. To vám
|
||||
vlastně zabrání použít funkci todo v profilu "release".
|
||||
|
||||
Zvýraznění také můžete vypnout (ale pak se vám todo bude hůř hledat - budete muset hledat v kódu).
|
||||
|
||||
Zde je ukázkové použití:
|
||||
#block([
|
||||
```typst
|
||||
#todo(
|
||||
"koupit vajíčka",
|
||||
accent: false // vypnout zvýraznění (pokud chcete)
|
||||
)
|
||||
```
|
||||
], breakable: false)
|
||||
|
||||
=== Lorem
|
||||
|
||||
Typst má funkci, která vám vygeneruje text Lorem Ipsum -- ten může sloužit na otestování délky
|
||||
paragrafů, počtu písmen, atd...
|
||||
|
||||
```typst
|
||||
#lorem(10)
|
||||
```
|
||||
|
||||
Výše volaná funkce vygeneruje deset slov Lorem Ipsum. Doporučuji `lorem` kombinovat s `todo`.
|
||||
|
||||
```typst
|
||||
#todo(lorem(10), accent: false)
|
||||
```
|
||||
|
||||
Takhle si můžete předpřipravit délku odstavců a vyzkoušet si, jestli se rozsahem práce trefíte
|
||||
do požadavků. Pak můžete postupně přepisovat/vyplňovat.
|
||||
|
||||
Funkce `todo` vám zároveň zabrání v tom, aby se text Lorem Ipsum vyskytl ve výsledném dokumentu.
|
||||
|
@@ -1,6 +1,13 @@
|
||||
#let todos = state("todos", "0");
|
||||
#let is_prod = state("is_prod", "false");
|
||||
|
||||
// Set a build profile.
|
||||
//
|
||||
// This can be:
|
||||
// - debug (debug comments and todos are displayed)
|
||||
// - release (document will be ready for release)
|
||||
//
|
||||
// - profile (str): The target profile
|
||||
#let profile(profile) = {
|
||||
let profiles = ("debug", "release");
|
||||
if profile not in profiles {
|
||||
@@ -10,7 +17,12 @@
|
||||
)
|
||||
}
|
||||
context {
|
||||
is_prod.update(is_prod => "true");
|
||||
is_prod.update(is_prod => {
|
||||
if eval(is_prod) and profile == "debug" {
|
||||
panic("refusing to unset release profile - this is a safety measure");
|
||||
}
|
||||
if profile == "release" { "true" } else { "false" };
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,13 +40,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
#let todo(content, do_highlight: true) = {
|
||||
// Sets an item that should be done later.
|
||||
//
|
||||
// This will cause an error when compiling with a release profile.
|
||||
//
|
||||
// - content (str): What should you do?
|
||||
// - accent (bool): Whether to highlight the todo
|
||||
#let todo(content, accent: true) = {
|
||||
context {
|
||||
todos.update(todos => {
|
||||
str(eval(todos) + 1)
|
||||
});
|
||||
}
|
||||
if do_highlight {
|
||||
if accent {
|
||||
highlight(text(content, fill: white), fill: red, radius: .25em, extent: .25em);
|
||||
} else {
|
||||
text(content);
|
||||
|
@@ -1,27 +1,60 @@
|
||||
// +---------------+
|
||||
// | TULTemplate 2 |
|
||||
// +---------------+
|
||||
//
|
||||
// Unofficial TUL template for all kinds of documents.
|
||||
//
|
||||
// Git: https://git.zumepro.cz/tul/tultemplate2
|
||||
|
||||
#import "prototyping.typ": todo, profile
|
||||
|
||||
#let tultemplate(
|
||||
template_id,
|
||||
faculty_abbreviation,
|
||||
language,
|
||||
document_type: none,
|
||||
title: none, author: none, supervisor: none, study_programme: none,
|
||||
// TUL Template 2
|
||||
//
|
||||
// Use this at the beginning of a Typst file:
|
||||
// ```typst
|
||||
// #import "template/template.typ": *
|
||||
//
|
||||
// #show: tultemplate2.with(
|
||||
// "classic", "fm", "cs", ...
|
||||
// )
|
||||
// ```
|
||||
//
|
||||
// - style (str): Visual style to use. This can be "latex".
|
||||
// - faculty (str): Factulty abbreviation. One of "fs", "ft", "fp", "ef", "fua", "fm", "fzs", "cxi".
|
||||
// - lang (str): Language code. This can be "cs" or "en".
|
||||
// - document (str): Type of document. This can be "bp", "dp", "ds".
|
||||
// - title (str): The title of the document.
|
||||
// - author (str): The name of the document's author.
|
||||
// - supervisor (str): The name of the document's supervisor.
|
||||
// - programme (str): Study programme.
|
||||
// - citations (str): The location of the citation file.
|
||||
// - content (content): The content of the document
|
||||
//
|
||||
//-> none
|
||||
#let tultemplate2(
|
||||
style,
|
||||
faculty,
|
||||
lang,
|
||||
document: none,
|
||||
title: none, author: none, supervisor: none, programme: none,
|
||||
citations: "citations.bib",
|
||||
content,
|
||||
) = {
|
||||
import "template_classic.typ": template_classic
|
||||
import "utils.typ": assert_in_dict
|
||||
let templates = (
|
||||
classic: template_classic,
|
||||
latex: template_classic,
|
||||
);
|
||||
assert_in_dict(template_id, templates, "template name");
|
||||
assert_in_dict(style, templates, "template name");
|
||||
|
||||
// global set-up
|
||||
import "lang.typ": lang_ids
|
||||
assert_in_dict(language, lang_ids, "language abbreviation");
|
||||
set text(lang: language);
|
||||
templates.at(template_id)(
|
||||
faculty_abbreviation, language, document_type,
|
||||
title, author, supervisor, study_programme,
|
||||
assert_in_dict(lang, lang_ids, "language abbreviation");
|
||||
set text(lang: lang);
|
||||
templates.at(style)(
|
||||
faculty, lang, document,
|
||||
title, author, supervisor, programme,
|
||||
"../" + citations,
|
||||
content
|
||||
);
|
||||
|
||||
@@ -29,6 +62,10 @@
|
||||
assert_release_ready();
|
||||
}
|
||||
|
||||
// Make a new abbreviation
|
||||
//
|
||||
// - abbreviation (str): The abbreviation
|
||||
// - text (str): Optionally, the text - the meaning of the abbreviation.
|
||||
#let abbr(abbreviation, ..text) = {
|
||||
import "abbreviations.typ": abbr
|
||||
return abbr(abbreviation, if text.pos().len() == 0 { none } else { text.pos().at(0) });
|
||||
|
@@ -94,6 +94,7 @@
|
||||
language,
|
||||
document_type,
|
||||
title, author, supervisor, study_programme,
|
||||
citation_file,
|
||||
content,
|
||||
) = {
|
||||
// intro page
|
||||
@@ -148,4 +149,7 @@
|
||||
// content
|
||||
pagebreak(to: "even", weak: true);
|
||||
content
|
||||
|
||||
// bibliography
|
||||
bibliography(citation_file, style: "./tul_citace.csl")
|
||||
}
|
||||
|
497
template/tul_citace.csl
Normal file
497
template/tul_citace.csl
Normal file
@@ -0,0 +1,497 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="en-US">
|
||||
<info>
|
||||
<title>ISO-690 (numeric, Czech)</title>
|
||||
<id>-----</id>
|
||||
<link href="" rel="self"/>
|
||||
<link href="" rel="documentation"/>
|
||||
<author>
|
||||
<name>-----</name>
|
||||
<email>-----</email>
|
||||
</author>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="generic-base"/>
|
||||
<summary>Style based on ISO 690:2010(E), V1.1</summary>
|
||||
<updated>2025-03-30T14:14:00+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale>
|
||||
<terms>
|
||||
<term name="no date">[žádné datum]</term>
|
||||
<term name="in">v</term>
|
||||
<term name="online">online</term>
|
||||
<term name="accessed">citováno</term>
|
||||
<term name="retrieved">Dostupné</term>
|
||||
<term name="from">z</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never">
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="editor">
|
||||
<names variable="editor">
|
||||
<name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never">
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
<label prefix=" (" form="short" suffix=".)"/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="translator">
|
||||
<names variable="translator">
|
||||
<name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never">
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
<label prefix=" (" form="short" suffix=".)"/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="responsability">
|
||||
<choose>
|
||||
<if variable="author editor translator" match="any">
|
||||
<choose>
|
||||
<if variable="author">
|
||||
<text macro="author"/>
|
||||
</if>
|
||||
<else-if variable="editor">
|
||||
<text macro="editor"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text macro="translator"/>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="container-author">
|
||||
<names variable="container-author">
|
||||
<name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never">
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="container-responsability">
|
||||
<choose>
|
||||
<if variable="container-author editor translator" match="any">
|
||||
<choose>
|
||||
<if variable="container-author">
|
||||
<text macro="container-author"/>
|
||||
</if>
|
||||
<else-if variable="editor">
|
||||
<text macro="editor"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text macro="translator"/>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="year-date">
|
||||
<choose>
|
||||
<if variable="issued">
|
||||
<date variable="issued">
|
||||
<date-part name="year" form="long"/>
|
||||
</date>
|
||||
</if>
|
||||
<else>
|
||||
<text term="no date"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="book thesis map motion_picture song manuscript" match="any">
|
||||
<text variable="title" font-style="italic" suffix=". "/>
|
||||
</if>
|
||||
<else-if type="paper-conference speech chapter article-journal article-magazine article-newspaper entry entry-dictionary entry-encyclopedia post-weblog post webpage broadcast" match="any">
|
||||
<text variable="title" suffix=". "/>
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="any">
|
||||
<text term="in" text-case="capitalize-first" suffix=" : "/>
|
||||
</if>
|
||||
</choose>
|
||||
<choose>
|
||||
<if variable="container-author editor translator" match="any">
|
||||
<text macro="container-responsability"/>
|
||||
<choose>
|
||||
<if variable="container-title event" match="any">
|
||||
<text value=", "/>
|
||||
</if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
<choose>
|
||||
<if variable="container-title">
|
||||
<text variable="container-title" font-style="italic" suffix="."/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="event" font-style="italic" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
</else-if>
|
||||
<else-if type="report">
|
||||
<text variable="number" suffix=": "/>
|
||||
<text variable="title" font-style="italic"/>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<text variable="title" suffix="."/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text variable="title" font-style="italic" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<text term="online" text-case="capitalize-first" prefix=" "/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="number">
|
||||
<text variable="number"/>
|
||||
</macro>
|
||||
<macro name="medium">
|
||||
<text variable="medium" prefix=" [" suffix="]"/>
|
||||
</macro>
|
||||
<macro name="version">
|
||||
<text variable="version"/>
|
||||
</macro>
|
||||
<macro name="genre">
|
||||
<choose>
|
||||
<if type="map">
|
||||
<choose>
|
||||
<if variable="genre">
|
||||
<text variable="genre" prefix="[" suffix="]"/>
|
||||
</if>
|
||||
<else>
|
||||
<text value="map" prefix="[" suffix="]"/>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="genre"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="date">
|
||||
<choose>
|
||||
<if variable="issued">
|
||||
<date variable="issued">
|
||||
<date-part name="day" suffix=" "/>
|
||||
<date-part name="month" suffix=" "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<text variable="edition" form="long"/>
|
||||
</macro>
|
||||
<macro name="publisher-group">
|
||||
<group delimiter=" : ">
|
||||
<text variable="publisher-place"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="issue">
|
||||
<group delimiter=", ">
|
||||
<text variable="volume" prefix="Vol. "/>
|
||||
<choose>
|
||||
<if variable="volume">
|
||||
<text variable="issue" prefix="no. "/>
|
||||
<text variable="page" prefix="p. "/>
|
||||
</if>
|
||||
<else-if variable="issue">
|
||||
<text variable="issue" prefix="No. "/>
|
||||
<text variable="page" prefix="p. "/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text variable="page" prefix="P. "/>
|
||||
</else>
|
||||
</choose>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="accessed">
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<group prefix=" [" suffix="]">
|
||||
<text term="accessed" suffix=" "/>
|
||||
<date variable="accessed">
|
||||
<date-part name="year"/>
|
||||
<date-part name="month" form="numeric-leading-zeros" prefix="-"/>
|
||||
<date-part name="day" form="numeric-leading-zeros" prefix="-"/>
|
||||
</date>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="collection">
|
||||
<group delimiter=", ">
|
||||
<text variable="collection-title"/>
|
||||
<text variable="collection-number"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="page">
|
||||
<choose>
|
||||
<if type="book thesis manuscript" match="any">
|
||||
<text variable="number-of-pages" suffix=" p"/>
|
||||
</if>
|
||||
<else-if type="chapter paper-conference article-newspaper" match="any">
|
||||
<text variable="page" prefix="p. "/>
|
||||
</else-if>
|
||||
<else-if type="report patent" match="any">
|
||||
<text variable="page" suffix=" p"/>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="isbn">
|
||||
<text variable="ISBN" prefix="ISBN "/>
|
||||
</macro>
|
||||
<macro name="doi">
|
||||
<text variable="DOI" prefix="DOI "/>
|
||||
</macro>
|
||||
<macro name="url">
|
||||
<choose>
|
||||
<if variable="DOI" match="none">
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<group>
|
||||
<text term="retrieved" suffix=" " text-case="capitalize-first"/>
|
||||
<text term="from" suffix=": "/>
|
||||
<text variable="URL"/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="archive">
|
||||
<group delimiter=": ">
|
||||
<text variable="archive"/>
|
||||
<text macro="archive_location"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="archive_location">
|
||||
<choose>
|
||||
<if variable="archive_location">
|
||||
<text variable="archive_location"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="call-number"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="abstract">
|
||||
<text variable="abstract"/>
|
||||
</macro>
|
||||
<macro name="note">
|
||||
<text variable="note"/>
|
||||
</macro>
|
||||
<citation collapse="citation-number" after-collapse-delimiter="; ">
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout prefix="(" suffix=")" delimiter=", ">
|
||||
<group delimiter=", ">
|
||||
<text variable="citation-number"/>
|
||||
<group>
|
||||
<label variable="locator" suffix=". " form="short" strip-periods="true"/>
|
||||
<text variable="locator"/>
|
||||
</group>
|
||||
</group>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography>
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout>
|
||||
<text variable="citation-number" display="left-margin" suffix=". "/>
|
||||
<choose>
|
||||
<if type="book map" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="year-date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="isbn" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="article-journal article-magazine" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="issue" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="doi" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="article-newspaper">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="page" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="chapter entry entry-dictionary entry-encyclopedia" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" font-style="normal" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="year-date" suffix=". "/>
|
||||
<text macro="page" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="isbn" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="speech">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=". "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="page" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="paper-conference">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="page" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="isbn" suffix=". "/>
|
||||
<text macro="doi" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="thesis">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="year-date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="post-weblog post webpage" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="broadcast motion_picture song" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="medium" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="isbn" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="report" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="year-date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="manuscript" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="year-date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="number" suffix=". "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="version" suffix=". "/>
|
||||
<text macro="medium" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=". "/>
|
||||
<text macro="number" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="page" suffix=". "/>
|
||||
<text macro="isbn" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
<group display="right-inline">
|
||||
<text macro="archive"/>
|
||||
</group>
|
||||
<group display="right-inline">
|
||||
<text macro="abstract"/>
|
||||
</group>
|
||||
<group display="right-inline">
|
||||
<text macro="note"/>
|
||||
</group>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
Reference in New Issue
Block a user