commit cd3d92547e61517f633ec55bb784735ae57cf731 Author: MrEidam Date: Sun Dec 14 22:38:32 2025 +0100 Yeaaaa diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a073060 --- /dev/null +++ b/.gitignore @@ -0,0 +1,279 @@ +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs +*.lzo +*.lzs + +# uncomment this for glossaries-extra (will ignore makeindex's style files!) +# *.ist + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Comment the next line if you want to keep your tikz graphics files +*.tikz +*-tikzDictionary + +# listings +*.lol + +# luatexja-ruby +*.ltjruby + +# makeidx +*.idx +*.ilg +*.ind + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices and outlines +*.xyc +*.xyd + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# gummi +.*.swp + +# KBibTeX +*~[0-9]* + +# TeXnicCenter +*.tps + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# Makeindex log files +*.lpz + +text.pdf +text.lolistedequation diff --git a/czplain.bst b/czplain.bst new file mode 100644 index 0000000..72ce788 --- /dev/null +++ b/czplain.bst @@ -0,0 +1,2916 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Projekt: IBP - Bakalarska prace +% Nazev prace: BibTeX styl pro CSN ISO 690 a CSN ISO 690-2 +% Autor: Radek Pysny, xpysny00 +% +% Soubor: czplain.bst (vznikl upravou plain.bst) +% Datum: Vytvoren 15. unora 2009. +% Posledni uprava 10. kveten 2009, 16:55. +% Popis: Cesky bibliograficky styl. +% Pouziti: +% Kodovani: ISO-8859-2 -> zmeneno na UTF-8 + +% Upravy: vypnuto razeni (radek 2849), zmena kodovani (radek 11), oprava formatu url (radek 1777), zmena formatu jmena (radek 812) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%% VOLBY PRO NASTAVENI BIBLIOGRAFICKEHO STYLU %%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% -- Maximalni pocet zpracovanych autoru. +% Pokud obsahuje polozka author seznam o vice nez opt.aa autoru, objevi se +% v bibliograficke citaci prave opt.aa autoru. Tento vycet autoru bude zakoncen +% retezcem urcenym volbou opt.etal. +%FUNCTION {opt.aa} { #3 } + FUNCTION {opt.aa} { #4 } + +% -- Maximalni pocet zpracovanych editoru. +% Analogie k volbe opt.aa. +% FUNCTION {opt.ae} { #2 } +FUNCTION {opt.ae} { #3 } +% FUNCTION {opt.ae} { #4 } + +% -- Oddelovac mezi jednotlivymi jmeny ve vyctu. +% Pouziva se pro spojeni jmen ve vyctu. Vyjimkou jsou posledni dve jmena, ktera +% jsou spojena pomoci retezce urceneho volbou opt.sep.ln. +FUNCTION {opt.sep.bn} { ", " } +% FUNCTION {opt.sep.bn} { " -- " } + +% -- Oddelovac mezi poslednimi dvema jmeny ve vyctu. +FUNCTION {opt.sep.ln} { " a~" } +% FUNCTION {opt.sep.ln} { " -- " } + +% -- Naznak nedokonceneho vyctu jmen. +% Pokud byl presazen pocet jmen danych limitujicimi volbami opt.aa nebo opt.ae. +% Dale se pouzije tehdy, kdyz je misto posledniho jmena pouzito klicove slovo +% "others". +FUNCTION {opt.etal} { "et~al." } +% FUNCTION {opt.etal} { "aj." } +% FUNCTION {opt.etal} { "a kol." } + +% -- Oznaceni editora (redaktora). +% Jmena editoru jsou od autoru odlisena retezcem danym touto volbou. +FUNCTION {opt.ed} { "(ed.)" } +% FUNCTION {opt.ed} { "(red.)" } +% FUNCTION {opt.ed} { "" } + +% -- Pouzivat oznaceni editora (redaktora) za kazdym jmenem. +% Urcuje, kde se pouzije oznaceni opt.ed. Bud lze pouzit oznaceni za kazdym +% jmenem nebo jen na konci prvku. +FUNCTION {opt.ed.all} { #0 } % pouze na konci prvku +% FUNCTION {opt.ed.all} { #1 } % za kazdym jmenem + +% -- Oddelovac mezi prvky primarni odpovednost a titul. +FUNCTION {opt.sep.a} { "." } +% FUNCTION {opt.sep.a} { ":" } + +% -- Oddelovac mezi mistem a vydavatelem (popr. skolou nebo instituci). +FUNCTION {opt.sep.p} { ": " } +% FUNCTION {opt.sep.p} { " : " } +% FUNCTION {opt.sep.p} { ", " } + +% -- Oddelovac mezi titulem a podtitulem. +% Je-li zadan titul i podtitul, je tento retezec pouzit jako oddelovac mezi +% temito prvky. +FUNCTION {opt.sep.t} { ": " } +% FUNCTION {opt.sep.t} { " : " } + +% -- Oznaceni rozsahu u akademickych praci. +% U akademickych praci mate pomoci teto volby moznost urcit, zda-li bude rozsah +% techto praci udavan ve stranach nebo v listech. +FUNCTION {opt.pages} { "s." } % pocet stran +% FUNCTION {opt.pages} { "l." } % pocet listu + +% -- Vyber z dvou pouzivanych tvaru bibliografickych citaci akademickych praci. +% #0 -- zakladni tvar pouziva rozmisteni prvku odpovidajici monografii +% #1 -- tvor, ktery pouziva napr. csplainnat.bst +FUNCTION {opt.thesis} { #0 } % zakladni verze +% FUNCTION {opt.thesis} { #1 } % alternativni verze + +% -- Zacatek prvku dostupnost. +% Tento prepinac ovlivnuje text, ktery bude zobrazen pred URL adresou. +FUNCTION {opt.url} { "Dostupn{\'{e}} na: " } +% FUNCTION {opt.url} { "Dostupn{\'{e}} z: " } +% FUNCTION {opt.url} { "Dostupn{\'{e}} na WWW: " } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%% DEKLARACE POLOZEK A PROMENNYCH %%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Polozky, ktere jsou stylem akceptovany a zpracovany. +ENTRY + { address + author + booktitle + booksubtitle % podtitul knihy (napr u sborniku) + cited % datum citace + contrybutory % podrizena odpovednost + edition + editor + howpublished % druh nosice + chapter + institution + inserts % pocet stran priloh + isbn % standardni cislo + issn % standardni cislo + journal + key + month + note + number + organization + pages + publisher + revised % datum revize/aktualizace + school + series + subtitle % podtitul + title + type + url % dostupnost + version % verze u el.dok. + volume + year + } + { } + { label } + +% Celocislene promenne. U kazde (krome konstant, ktere jsou pouze inicializovany +% ve funkci init.state.consts -- before.all, mid.sentence, after.sentence, +% after.block) jsou vyjmenovany funkce, kde dochazi ke zmenam dane promenne. +% +% output.state -- output.nonnull, output.bibitem, new.block, new.sentance +% +% ord -- is.ord +% +% ptr, i, x -- str.to.int +% +% numnames, namesleft, nameptr -- format.names, format.names.ed, +% sort.format.names +INTEGERS { output.state before.all mid.sentence after.sentence after.block + ord ptr i x numnames namesleft nameptr } + +% Retezcove promenne. U kazde jsou vyjmenovany funkce, kde je promenna menena. +% +% s -- output.nonnull, format.names, format.names.ed, format.journal.issue, +% format.thesis.info, format.thesis.range, chop.word, sort.format.names +% +% t -- output.check, dashify, str.to.int, format.names, format.names.ed, +% format.full.date, sort.format.names, sort.format.title +% +% u -- is.ord, tie.or.connnect, comma.connect +STRINGS { s t u } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%% DEFINICE ZKRATEK -- CESKE NAZVY MESICU %%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +MACRO {jan} {"leden"} + +MACRO {feb} {"únor"} + +MACRO {mar} {"březen"} + +MACRO {apr} {"duben"} + +MACRO {may} {"květen"} + +MACRO {jun} {"červen"} + +MACRO {jul} {"červenec"} + +MACRO {aug} {"srpen"} + +MACRO {sep} {"září"} + +MACRO {oct} {"říjen"} + +MACRO {nov} {"listopad"} + +MACRO {dec} {"prosinec"} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%% MIRNE UPRAVENE FUNKCE PREVZATE Z plain.bst %%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Inicializace konstant nutnych pro spravnou funkci samotneho stylu. +% +% void init.state.consts () +% { +% int before.all = 0; +% int mid.sentence = 1; +% int adter.sentence = 2; +% int after.block = 3; +% } +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +% Vystup jiz formatovaneho pole, ktere je urcite neprazdne. Format vystupu je +% ovlivnen vystupnim stavem (tj. stavovou promennou output.state). Samotny +% vystup je zpozdeny (k vytisteni aktualni hodnoty dojde az pri pristim volani +% teto funkce) kvuli rozhodovani o pouzitem oddelovaci (carka nebo tecka). +% +% void output.nonnull () +% { +% s = pop(); +% if (output.state == mid.sentence) +% { +% write(pop() * " "); // zde byla carka!!! +% } else +% { +% if (output.state == after.block) +% { +% write(add.period(pop())); +% flush(); +% write("\newblock "); +% } else +% { +% if (output.state == before.all) +% { +% write(pop()); +% } else +% { +% write(add.period(pop()) * " "); +% } +% } +% } +% push(s); +% } +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { " " * write$ } %% Uprava: Nahrada ", " za " "! + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + { write$ } + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +% Pri vyskytu neprazdne hodnoty na vrcholu zasobniku provede jeji vystup pomoci +% funkce output.nonnull. V opacnem pripade ji jen odstrani ze zasobniku. +% +% /** prepis do pseudokodu bez vyuziti zasobniku **/ +% void output (string string.to.write) +% { +% if (empty$(string.to.write)) +% { } else +% { +% output.nonnull(string.to.write); +% } +% } +FUNCTION {output} +{ duplicate$ empty$ + { pop$ } + { output.nonnull } + if$ +} + +% Pri vyskytu neprazdne hodnoty na vrcholu zasobniku provede jeji vystup pomoci +% funkce output.nonnull. V opacnem pripade ji jen odstrani ze zasobniku +% a vypise na chybovy vystup varovani o chybejici hodnote. Pouziva se pro +% informovani uzivatele o chybejici hodnote, ktera je dle ceske normy povinna. +% +% /** prepis do pseudokodu bez vyuziti zasobniku **/ +% void output.check (string type.of.field string string.to.write) +% { +% t = type.of.field; +% if (empty$(string.to.write)) +% { +% warning$("empty" * t * " in " * cite$()) +% } else +% { +% output.nonnull(string.to.write); +% } +% } +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + { output.nonnull } + if$ +} + +% Vypise zacatek bibliograficke citace. +% +% void output.bibitem () +% { +% newline$(); +% write$("\bibitem{"); +% write$(cite$); +% write$("}"); +% newline$(); +% push(""); +% int output.state = before.all; +% } +FUNCTION {output.bibitem} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +% Zakonceni polozky (teckou). +% +% void fin.entry () +% { +% write(add.period$(pop())); +% newline$(); +% } +FUNCTION {fin.entry} +{ add.period$ write$ + newline$ +} + +% Zmena stavu: {mid.sentence; after.sentence} => after.block. +% +% void new.block () +% { +% if (output.state == before.all) +% { } else +% { +% output.state = after.block; +% } +% } +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +% Zmena stavu: mid.sentence => after.sentence. +% +% void new.sentence () +% { +% if (output.state == after.block) +% { } else +% { +% if (output.state == before.all) +% { } else +% { +% output.state = after.sentence; +% } +% } +% } +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +% Negace vyhodnocene podminky. +% +% int not (int bool) +% { +% if (bool) +% { +% return 0; // false +% } else +% { +% return 1; // true +% } +% } +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +% Logicky soucin dvou podminek. +% +% int and (int bool1, int bool2) +% { +% if (bool2) +% { +% return bool1; +% } else +% { +% return 0; +% } +% } +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +% Logicky soucet dvou podminek. +% +% int or (int bool1, int bool2) +% { +% if (bool2) +% { +% return 1; +% } else +% { +% return bool1; +% } +% } +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +% Zacatek noveho bloku pri neprazne hodnote na vrcholu zasobniku. +% +% void new.block.checka (int.or.string anything.from.the.top) +% { +% if (empty$(anything.from.the.top)) +% { } else +% { +% new.block(); +% } +% } +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + { new.block } + if$ +} + +% Zacatek noveho bloku pri 2 neprazdnych hodnotach z vrcholu zasobniku. +% +% void new.block.checkb (int.or.string anything.under.the.top, +% int.or.string anything.from.the.top) +% { +% if ( (empty$(anything.from.the.top)) && (empty$(anything.under.the.top)) ) +% { } else +% { +% new.block(); +% } +% } +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + { new.block } + if$ +} + +% Zacatek nove vety pri neprazne hodnote na vrcholu zasobniku. +% +% void new.sentence.checka (int.or.string anything.from.the.top) +% { +% if (empty$(anything.from.the.top)) +% { } else +% { +% new.sentence(); +% } +% } +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + { new.sentence } + if$ +} + +% Zacatek nove vety pri 2 neprazdnych hodnotach z vrcholu zasobniku. +% +% void new.sentence.checkb (int.or.string anything.under.the.top, +% int.or.string anything.from.the.top) +% { +% if ( (empty$(anything.from.the.top)) && (empty$(anything.under.the.top)) ) +% { } else +% { +% new.sentence(); +% } +% } +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ and + 'skip$ + { new.sentence } + if$ +} + +% Vrati hodnoty polozky (ulozene na vrcholu zasobniku) nebo prazdny retezec. +% +% int.or.string field.or.null (int.or.string anything.from.the.top) +% { +% if (empty$(anything.from.the.top)) +% { +% return ""; +% } else +% { +% return anything.from.the.top; +% } +% } +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +% Vypis chybove hlasky pro pripady, kdyz jsou vyplnene dve polozky, jejichz +% pouziti se vzajemne vylucuje. Vola se s dvema argumenty -- prvni z nich je +% retezec s nazvy obou poli (kvuli vypisu chybove hlasky) a druhy je obsah +% jednoho z poli (kontrola druheho musi probehnout pred volanim teto funkce). +% +% void either.or.check (string field.names, int.or.string one.of.fields) +% { +% if (empty$(one.of.fields)) +% { } else +% { +% warning$(field.names * "can't use both " * " fields in " * cite$()); +% } +% } +FUNCTION {either.or.check} +{ empty$ + { pop$ } + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +% Provede zvyrazneni hodnoty na vrcholu zasobniku (uzavre ji mezi "{\em" +% a "}"). Nepouziva kurzivni korekci. +% +% string emphasize (string x) +% { +% if (empty$(x)) +% { +% return ""; +% } else +% { +% return "{\em " * x * "}"; +% } +% } +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +% Nahradi kazdy vyskyt znaku '-' za dvojznak "--". +% +% string dashify (string to.dashify) +% { +% t = to.dashify; +% push(""); +% while (!empty$(t)) +% { +% if (substring$(t, 1, 1) == "-") +% { +% if (substring$(t, 1, 2) == "--") +% { +% while (substring$(t, 1, 1) == "-") +% { +% push(pop() * "-"); +% t = substring$(t, 2, global.max$()); +% } +% } else +% { +% push(pop() * "--"); +% t = substring$(t, 2, global.max$()); +% } +% } else +% { +% push(pop() * substring$(t, 1, 1)); +% t = substring$(t, 2, global.max$()); +% } +% } +% } +FUNCTION {dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + { "--" * + t #2 global.max$ substring$ 't := + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%% VLASTNI KOD -- POMOCNE FUNKCE %%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Prevod retezce na cislo. Ocekava se, ze se zavola az po testu pomoci funkce +% 'is.ord'. Na vstupu ocekava neprazdny retezec tvoreny jen cislicemi. +% +% int str.to.int (string to.convert) +% { +% t = to.convert; +% int x = 0; +% int ptr = 0; +% while (ptr text.length$(t) < ) +% { +% push(x); +% i = 9; +% while (i > 0) +% { +% push(pop() + x); +% i--; +% } +% ptr++; +% x = chr.to.int$(substring$(t, ptr, 1)) - 48 + pop(); +% } +% return x; +% } +FUNCTION {str.to.int} +{ 't := + #0 'x := + #0 'ptr := + { ptr t text.length$ < } + { x + #9 'i := + { i #0 > } + { x + + i #1 - 'i := + } + while$ + ptr #1 + 'ptr := + t ptr #1 substring$ chr.to.int$ #48 - + 'x := + } + while$ + x +} + +% Prvni pismeno retezce na vrcholu zasobniku prevede na verzalku. +% +% string capitalize (string to.capitalize) +% { +% if (empty$(to.capitalize)) +% { } else +% { +% return change.case$(substring$(to.capitalize, 1, 1), "u") * +% substring$(to.capitalize, 2, global.max$()); +% } +% } +FUNCTION {capitalize} +{ duplicate$ empty$ + 'skip$ + { duplicate$ #1 #1 substring$ "u" change.case$ + swap$ #2 global.max$ substring$ * + } + if$ +} + +% Spojuje dva retezce z vrcholu zasobniku. Tyto dva retezce jsou oddeleny +% mezerou ci nezlomitelnou mezerou. Retezec na vrcholu zasobniku je pripojen +% za druhy retezec. +% +% Pokud je jeden z retezcu prazdny, je vracen jen druhy z nich bez jakychkoliv +% uprav. Jsou-li prazdne oba retezce, je vracen taktez prazdny retezec. +% +% string tie.or.connect (string under.the.top, string from.the.top) +% { +% string u = from.the.top; +% if (empty$(under.the.top)) +% { +% return u; +% } else +% { +% if (empty$(u)) +% { } else +% { +% if (text.length$(u) < 3) +% { +% return under.the.top * "~" * u; +% } else +% { +% return under.the.top * " " * u; +% } +% } +% } +% } +FUNCTION {tie.or.connect} +{ 'u := + duplicate$ empty$ + { pop$ u } + { u empty$ + 'skip$ + { u text.length$ #3 < + { "~" * u * } + { " " * u * } + if$ + } + if$ + } + if$ +} + +% Spojuje dva retezce z vrcholu zasobniku. Tyto dva retezce jsou oddeleny +% carkou. Retezec na vrcholu zasobniku je pripojen za druhy retezec. +% +% Pokud je jeden z retezcu prazdny, je vracen jen druhy z nich bez jakychkoliv +% uprav. Jsou-li prazdne oba retezce, je vracen taktez prazdny retezec. +% +% string comma.connect (string under.the.top, string from.the.top) +% { +% string u = from.the.top; +% if (empty$(under.the.top)) +% { +% return u; +% } else +% { +% if (empty$(u)) +% { } else +% { +% return under.the.top * ", " * u; +% } +% } +% } +FUNCTION {comma.connect} +{ 'u := + duplicate$ empty$ + { pop$ u } + { u empty$ + 'skip$ + { ", " * u * } + if$ + } + if$ +} + +% Otestuje, zda je hodnota na vrcholu zasobniku tvorena pouze cislicemi. +% +% int is.ord (string x) +% { +% string u = x; +% int ord = 1; +% while ( (ord) && (!empty(u)) ) +% { +% if ( (chr.to.int$(substring$(u, 1, 1)) < 48) || +% (chr.to.int$(substring$(u, 1, 1)) > 57) ) +% { +% ord = 0; +% } else +% { +% u = substring(s, 2, global.max$()); +% } +% } +% return ord; +% } +FUNCTION {is.ord} +{ 'u := + #1 'ord := + { ord + u empty$ not + and + } + { u #1 #1 substring$ + duplicate$ chr.to.int$ #48 < % < '0' + swap$ chr.to.int$ #57 > % > '9' + or + { #0 'ord := } + { u #2 global.max$ substring$ 'u := } + if$ + } + while$ + ord +} + +% Formatovaci retezec pro vkladani jmen dle ceske konvence pomoci funkce +% 'format.name$'. +% +% string cz.name.format () +% { +% return "{{\scshape\bgroup}ll{ }{\egroup}}{, f.}{ vv}"; +% } +FUNCTION {cz.name.format} +{ "{{\sc\bgroup}ll{ }{\egroup}}{, ff}{ vv}" } % puvodni: { "{{\sc\bgroup}ll{ }{\egroup}}{, f.}{ vv}" } % popis funkce na strane 37 bakalarske prace autora tohoto stylu + +% Vraci nominativ mesice. +% +% /** prepis pseudokodu do funkce pracujici s polem **/ +% string get.month.n (int n) +% { +% int month = { 1 => "leden", "únor", "bøezen", "duben", "kvìten", "èerven", +% "èervenec", "srpen", "záøí", "øíjen", "listopad", "prosinec" }; +% if ( (n > 0) && (n < 13) ) +% { +% return month[n]; +% } else +% { +% warning$("Month must be between 1 and 12!"); +% return ""; +% } +% } +FUNCTION {get.month.n} +{ duplicate$ #1 = + { "leden" swap$ pop$ } + { duplicate$ #2 = + { "únor" swap$ pop$ } + { duplicate$ #3 = + { "březen" swap$ pop$ } + { duplicate$ #4 = + { "duben" swap$ pop$ } + { duplicate$ #5 = + { "květen" swap$ pop$ } + { duplicate$ #6 = + { "červen" swap$ pop$ } + { duplicate$ #7 = + { "červenec" swap$ pop$ } + { duplicate$ #8 = + { "srpen" swap$ pop$ } + { duplicate$ #9 = + { "září" swap$ pop$ } + { duplicate$ #10 = + { "říjen" swap$ pop$ } + { duplicate$ #11 = + { "listopad" swap$ pop$ } + { duplicate$ #12 = + { "prosinec" swap$ pop$ } + { "" "Month must be between 1 and 12!" warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +% Vraci genitiv mesice. +% +% /** prepis pseudokodu do funkce pracujici s polem **/ +% string get.month.n (int n) +% { +% int month = { 1 => "ledna", "února", "března", "dubna", "května", "června", +% "července", "srpna", "září", "října", "listopadu", "prosince"}; +% if ( (n > 0) && (n < 13) ) +% { +% return month[n]; +% } else +% { +% warning$("Month must be between 1 and 12!"); +% return ""; +% } +% } +FUNCTION {get.month.g} +{ duplicate$ #1 = + { "ledna" swap$ pop$ } + { duplicate$ #2 = + { "února" swap$ pop$ } + { duplicate$ #3 = + { "března" swap$ pop$ } + { duplicate$ #4 = + { "dubna" swap$ pop$ } + { duplicate$ #5 = + { "května" swap$ pop$ } + { duplicate$ #6 = + { "června" swap$ pop$ } + { duplicate$ #7 = + { "července" swap$ pop$ } + { duplicate$ #8 = + { "srpna" swap$ pop$ } + { duplicate$ #9 = + { "září" swap$ pop$ } + { duplicate$ #10 = + { "října" swap$ pop$ } + { duplicate$ #11 = + { "listopadu" swap$ pop$ } + { duplicate$ #12 = + { "prosince" swap$ pop$ } + { "" "Month must be between 1 and 12!" warning$ } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ +} + +% Provede vystup. Je urcen jen pro vypsani primarni odpovednosti. Umoznuje +% pouziti volby 'opt.sep.a', ktera dovoluje pouzit jiny oddelovac mezi poli +% primarni odpovednosti a nazvu titulu. Dle zazitych zvyklosti v CR je jim ':'. +% +% Pouzivat pouze na zacatku bibliograficke citace! Jinde muze zpusobit prohozeni +% prvku. +% +% void output.authors (string formatted.authors) +% { +% if (substring$(formatted.authors, #-1, #1) == opt.sep.a()) +% { +% write$(formatted.authors); +% newline$(); +% write("\newblock "); +% } else +% { +% write$(formatted.authors * opt.sep.a()); +% newline$(); +% write("\newblock "); +% } +% } +FUNCTION {output.authors} +{ + duplicate$ #-1 #1 substring$ opt.sep.a = + { write$ newline$ "\newblock " write$ } + { opt.sep.a * + write$ newline$ "\newblock " write$ + } + if$ +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%% VLASTNI KOD -- FORMATOVACI FUNKCE %%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Formatovani jmen (pro primarni odpovednost). +% +% string format.names (string names) +% { +% string s = names; +% int numnames = num.names$(s); +% int namesleft = numnames; +% int nameptr = 1; +% while ( (namesleft > 0) && (nameptr <= opt.aa()) ) +% { +% t = format.name$(s, nameptr, cz.name.format()); +% if (nameptr == 1) +% { +% push(t); +% } else +% { +% if (namesleft > 1) +% { +% push(pop() * opt.sep.bn() * t); +% } else +% { +% if (purify$(t) == "others") +% { +% push(tie.or.connect(pop(), opt.etal())); +% } else +% { +% push(pop() * opt.sep.ln() * t); +% } +% } +% } +% nameptr++; +% namesleft--; +% } +% if (nameledt > 0) +% { +% push(tie.or.connect(pop(), opt.etal())); +% } +% return pop(); +% } +FUNCTION {format.names} +{ 's := % s <= polozka se jmeny + s num.names$ 'numnames := % numnames <= pocet jmen v polozce + numnames 'namesleft := % poznamena si pocet zbyvajicich jmen + #1 'nameptr := % nameptr <= ukazatel na prvni ze jmen + { namesleft #0 > + nameptr opt.aa > not + and + } + { % cyklus zpracovani jednotlivych jmen + s nameptr cz.name.format format.name$ 't := + nameptr #1 = + { t } % prvni jmeno + { namesleft #1 > % dalsi jmena + { opt.sep.bn t * * } + { t purify$ + "others" = % kdyz po ocisteni zbyde klic. sl. "others" + { opt.etal tie.or.connect } % vytiskne et al. + { opt.sep.ln * t * } % jinak posledni inicialy po spojce "a" + if$ + } + if$ + } + if$ + nameptr #1 + 'nameptr := % posun ukazatele na dalsi jmeno + namesleft #1 - 'namesleft := % snizeni poctu zbyvajicich jmen + } + while$ + namesleft #0 > % mozne pridani opt.etal + { opt.etal tie.or.connect } + 'skip$ + if$ +} + +% Formatovani jmen editoru. +% +% string format.names.ed (string names) +% { +% string s = names; +% int numnames = num.names$(s); +% int namesleft = numnames; +% int nameptr = 1; +% while ( (namesleft > 0) && (nameptr <= opt.aa()) ) +% { +% t = format.name$(s, nameptr, cz.name.format()); +% if (nameptr == 1) +% { +% if (opt.ed.all()) +% { +% push(tie.or.connect(t, opt.ed()); +% } else +% { +% push(t); +% } +% } else +% { +% if (namesleft > 1) +% { +% if (opt.ed.all()) +% { +% push(tie.or.connect(pop() * opt.sep.bn() * t, opt.ed()); +% } else +% { +% push(pop() * opt.sep.bn() * t); +% } +% } else +% { +% if (purify$(t) == "others") +% { +% push(tie.or.connect(pop(), opt.etal())); +% } else +% { +% if (opt.ed.all()) +% { +% push(tie.or.connect(pop() * opt.sep.ln() * t, opt.ed()); +% } else +% { +% push(pop() * opt.sep.ln() * t); +% } +% } +% } +% } +% nameptr++; +% namesleft--; +% } +% if (nameledt > 0) +% { +% push(tie.or.connect(pop(), opt.etal())); +% } +% if (opt.ed.all()) +% { +% return pop(); +% } else +% { +% return tie.or.connect(pop(), opt.ed()); +% } +% } +FUNCTION {format.names.ed} +{ 's := % s <= polozka se jmeny + s num.names$ 'numnames := % numnames <= pocet jmen v polozce + numnames 'namesleft := % poznamena si pocet zbyvajicich jmen + #1 'nameptr := % nameptr <= ukazatel na prvni ze jmen + { namesleft #0 > + nameptr opt.ae > not + and + } + { % cyklus zpracovani jednotlivych jmen + s nameptr cz.name.format format.name$ 't := + nameptr #1 = % prvni jmeno + { t + opt.ed.all + { opt.ed tie.or.connect } + 'skip$ + if$ + } + { namesleft #1 > % dalsi jmena + { opt.sep.bn t * * + opt.ed.all + { opt.ed tie.or.connect } + 'skip$ + if$ + } + { t purify$ + "others" = % kdyz po ocisteni zbyde klic. sl. "others" + { opt.etal tie.or.connect } % vytiskne et al. + { opt.sep.ln t * * % jinak posledni inicialy po spojce "a" + opt.ed.all + { opt.ed tie.or.connect } + 'skip$ + if$ + } + if$ + } + if$ + } + if$ + nameptr #1 + 'nameptr := % posun ukazatele na dalsi jmeno + namesleft #1 - 'namesleft := % snizeni poctu zbyvajicich jmen + } + while$ + namesleft #0 > % mozne pripojeni opt.etal + { opt.etal tie.or.connect } + 'skip$ + if$ + opt.ed.all % mozne pridani opt.ed na konec prvku + 'skip$ + { opt.ed tie.or.connect } + if$ +} + +% Formatovani jmen autoru. +% Pokud je neprazdna polozka 'author', provede formatovani jmen pomoci funkce +% 'format.names'. +% +% string format.authors () +% { +% if (empty$(author)) +% { +% return ""; +% } else +% { +% return format.names(author); +% } +% } +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names } + if$ +} + +% Formatovani jmen editoru. +% Pokud je neprazdna polozka 'editor', provede formatovani jmen pomoci funkce +% 'format.names.ed'. +% +% string format.editors () +% { +% if (empty$(editor)) +% { +% return ""; +% } else +% { +% return format.names.ed(editor); +% } +% } +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names.ed } + if$ +} + +% Formatovani polozky primarni odpovednosti. +% Je-li zadana polozka 'author', provede jeji formatovani pomoci funkce +% 'format.authors'. Pokud je polozka 'author' prazdna, provede formatovani +% pomoci funkce 'format.editors'. +% +% void author.or.editor () +% { +% if (empty$(author)) +% { +% if (empty$(format.editors())) +% { +% warning$("empty author and editor in " * cite$()); +% } else +% { +% output.authors(format.editors()); +% } +% } else +% { +% output.authors(format.authors()); +% } +% } +FUNCTION {author.or.editor} +{ author empty$ + { format.editors + duplicate$ empty$ + { pop$ + "empty author and editor in " cite$ * warning$ + } + { output.authors } + if$ + } + { format.authors + output.authors + } + if$ +} + +% Formatovani nazvu (napr. casopisu, zurnalu atp.). +% Pri zadane polozce 'subtitle' provede ji pripoji k obsahu polozky 'title' +% pomoci ": ". V nazvu je pak provedena zmena velikosti pismen. +% +% string format.title () +% { +% if (empty$(subtitle)) +% { +% return capitalize(title); +% } else +% { +% return capitalize(title) * opt.sep.t() * subtitle; +% } +% } +FUNCTION {format.title} +{ subtitle empty$ + { title capitalize } + { title capitalize + opt.sep.t * subtitle * + } + if$ +} + +% Formatovani nazvu monograficke publikace. +% Pri zadane polozce 'subtitle' provede ji pripoji k obsahu polozky 'title' +% pomoci ": ". Pricemz na obe casti se provede zmena velikosti pismen +% a zvyrazneni. Pokud je polozka 'subtitle' prazdna, je provedena jen zmena +% velikosti pismen a jeji zvyrazneni. +% +% string format.btitle () +% { +% return emphasize(format.title()); +% } +FUNCTION {format.btitle} +{ format.title emphasize +} + +% Formatovani nazvu (napr. sbornik). +% Pri zadane polozce 'booksubtitle' provede ji pripoji k obsahu polozky +% 'booktitle' pomoci ": ". V nazvu je pak provedena zmena velikosti pismen +% a zvyrazneni kurzivou. +% +% string format.from.btitle () +% { +% if (empty$(booktitle)) +% { +% warning$(empty booktitle in " * cite$()); +% push(""); +% } else +% { +% push(capitalize(booktitle)); +% if (empty$(booksubtitle)) +% { } else +% { +% push(pop() * opt.sep.t * booksubtitle); +% } +% } +% return emphasize(pop()); +% } +FUNCTION {format.from.btitle} +{ booktitle empty$ + { "empty booktitle in " cite$ * warning$ + "" + } + { booktitle capitalize + booksubtitle empty$ + 'skip$ + { opt.sep.t * booksubtitle * } + if$ + } + if$ + emphasize +} + +% Formatovani druhu nosice. +% +% string format.howpublished () +% { +% if (empty$(howpublished)) +% { +% return ""; +% } else +% { +% if (change.case(howpublished, "l") == "cd") +% { +% push("CD-ROM"); +% } else +% { +% if (change.case(howpublished, "l") == "online") +% { +% push("online"); +% } else +% { +% push(howpublished); +% } +% } +% return "[" * pop() * "]"; +% } +% } +FUNCTION {format.howpublished} +{ howpublished empty$ + { "" } + { howpublished "l" change.case$ "cd" = + { "CD-ROM" } + { howpublished "l" change.case$ "online" = + { "online" } + { howpublished } + if$ + } + if$ + "[" swap$ * "]" * + } + if$ +} + +% Formatovani vydani +% +% string format.edition () +% { +% if (empty$(edition)) +% { +% push(""); +% } else +% { +% if (is.ord(edition)) +% { +% push(edition * ". vyd."); +% } else +% { +% push(edition); +% } +% } +% if (!empty$(version)) +% { +% push(comma.connect(pop(), version)); +% } +% return pop(); +% } +FUNCTION {format.edition} +{ edition empty$ + { "" } + { edition is.ord + { edition ". vyd." * } + { edition } + if$ + } + if$ + howpublished empty$ + 'skip$ + { version empty$ + 'skip$ + { version comma.connect } + if$ + } + if$ +} + +% Formatovani mesice a roku +% +% string format.date () +% { +% if (empty$(month)) +% { +% if (empty$(year)) +% { +% warning$("empty year in " * cite$()); +% return ""; +% } else +% { +% return year; +% } +% } else +% { +% if (empty$(year)) +% { +% warning$("just month (empty year) in " * cite$()); +% return ""; +% } else +% { +% if (is.ord(month)) +% { +% return get.month.n(str.to.int(month)) * " " * year; +% } else +% { +% return month * " " * year; +% } +% } +% } +% } +FUNCTION {format.date} +{ month empty$ + { year empty$ + { "" "empty year in " cite$ * warning$ } + { year } + if$ + } + { year empty$ + { "" "just month (empty year) in " cite$ * warning$ } + { month duplicate$ is.ord + { str.to.int get.month.n " " * year * } + { " " * year * } + if$ + } + if$ + } + if$ +} + +% Rozpoznani a prevod data z formatu '!yyyy-mm-dd'. +% +% string format.full.date (string date) +% { +% string t = date; +% if (text.length$(t) == 10) +% { +% if ( (is.ord(substring$(t, 1, 4))) && (substring$(t, 5, 1) == "-") && +% (is.ord(substring$(t, 6, 2))) && (substring$(t, 8, 1) == "-") && +% (is.ord(substring$(t, 9, 2))) ) +% { +% if (substring$(t, 9, 1) == "0") +% { +% if (substring$(t, 10, 1) == "0") +% { +% warning$("day must be between 1 and 31 in " * cite$()); +% } else { } +% push(substring$(t, 10, 1) * ".~"); +% } else +% { +% if ( ((chr.to.int$(substring$(t, 9, 1)) - 48) > 3) || +% ((substring$(t, 9, 1) == "3") && +% ((chr.to.int$(substring$(t, 10, 1)) - 48) > 1)) ) +% { +% pop(); +% push(t); +% warning$("day must be between 1 and 31 in " * cite$()); +% } else { } +% push(substring$(t, 9, 2) * ".~"); +% } +% if (substring$(t, 6, 1) == "0") +% { +% if (substring$(t, 7, 1) == "0") +% { +% pop(); +% push(t); +% warning$("month must be between 1 and 12 in " * cite$()); +% } else +% { +% return pop() * get.month.g(chr.to.int$(substring$(t, 7, 1)) - 48) * +% " " * substring$(t, 1, 4)); +% } +% } else +% { +% if ( (substring$(t, 6, 1) == "1") && +% ((chr.to.int$(substring$(t, 7, 1)) - 48) < 3) ) +% { +% return pop() * get.month.g(chr.to.int$(substring$(t, 7, 1)) +% - 48 + 10) * " " * substring$(t, 1, 4)); +% } else +% { +% pop(); +% push(t); +% warning$("month must be between 1 and 12 in " * cite$()); +% } +% } +% } else +% { +% return t; +% } +% } else +% { +% return t; +% } +% } +FUNCTION {format.full.date} +{ 't := + t text.length$ #11 = + { t #1 #1 substring$ "!" = + t #2 #4 substring$ is.ord + t #6 #1 substring$ "-" = + t #7 #2 substring$ is.ord + t #9 #1 substring$ "-" = + t #10 #2 substring$ is.ord + and and and and and + { t #10 #1 substring$ "0" = + { t #11 #1 substring$ "0" = + { "day must be between 1 and 31 in " cite$ * warning$ } + 'skip$ + if$ + t #11 #1 substring$ ".~" * + } + { t #10 #1 substring$ chr.to.int$ #48 - #3 > + t #10 #1 substring$ "3" = + t #11 #1 substring$ chr.to.int$ #48 - #1 > + and or + { pop$ t "day must be between 1 and 31 in " cite$ * warning$ } + 'skip$ + if$ + t #10 #2 substring$ ".~" * + } + if$ + t #7 #1 substring$ "0" = + { t #8 #1 substring$ "0" = + { pop$ t "month must be between 1 and 12 in " cite$ * warning$ } + { t #8 #1 substring$ chr.to.int$ #48 - get.month.g * + " " * t #2 #4 substring$ * + } + if$ + } + { t #7 #1 substring$ "1" = + t #8 #1 substring$ chr.to.int$ #48 - #3 < + and + { t #8 #1 substring$ chr.to.int$ #48 - #10 + get.month.g * + " " * t #2 #4 substring$ * + } + { pop$ t "month must be between 1 and 12 in " cite$ * warning$ } + if$ + } + if$ + } + { t } + if$ + } + { t } + if$ +} + +% Predani udaju z data revize elektronickeho dokumentu. +% +% string format.revised () +% { +% if (empty$(howpublished)) +% { +% return ""; +% } else +% { +% if (empty$(revised)) +% { +% return ""; +% } else +% { +% return revised; +% } +% } +% } +FUNCTION {format.revised} +{ howpublished empty$ + { "" } + { revised empty$ + { "" } + { revised } + if$ + } + if$ +} + +% Formatovani udaju z data citace elektronickeho dokumentu. +% +% string format.cited () +% { +% if (empty$(howpublished)) +% { +% return ""; +% } else +% { +% if (empty$(cited)) +% { +% warning$("empty cited in " * cite$()); +% return ""; +% } else +% { +% return "[cit. " * format.full.date(cited) * "]"; +% } +% } +% } +FUNCTION {format.cited} +{ howpublished empty$ + { "" } + { cited empty$ + { "empty cited in " cite$ * warning$ + "" + } + { cited format.full.date + "[cit. " swap$ * "]" * + } + if$ + } + if$ +} + +% Formatovani nakladatelskych udaju. +% +% string format.publish.info () +% { +% if ( (empty$(address)) && (empty$(publisher)) ) +% { +% string s = ""; +% } else +% { +% if (empty$(address)) +% { +% s = "[b.m.]: "; +% } else +% { +% s = address * ": "; +% } +% if (empty$(publisher)) +% { +% s = s * "[b.n.]"; +% } else +% { +% s = s * publisher; +% } +% } +% return s; +% } +FUNCTION {format.publish.info} +{ address empty$ + publisher empty$ + and + { "" } + { address empty$ + { "[b.m.]" } + { address } + if$ + opt.sep.p * + publisher empty$ + { "[b.n.]" * } + { publisher * } + if$ + } + if$ +} + +% Formatuje rozsah stran publikace. +% +% string format.range () +% { +% if (empty$(pages)) +% { +% return ""; +% } else +% { +% return tie.or.connect(pages, "s."); +% } +% } +FUNCTION {format.range} +{ pages empty$ + { "" } + { pages "s." tie.or.connect } + if$ +} + +% Formatovani edice a svazku monograficke publikace. +% +% string format.bvolume () +% { +% if (empty$(series)) +% { +% return ""; +% } else +% { +% push(capitalize(series)); +% if (empty$(volume)) +% { +% if (empty$(number)) +% { } else +% { +% if (is.ord(number)) +% { +% return comma.connect(pop(), "è. " * number); +% } else +% { +% return comma.connect(pop(), number); +% } +% } +% } else +% { +% if (is.ord(volume)) +% { +% return comma.connect(pop(), "è. " * volume); +% } else +% { +% return comma.connect(pop(), volume); +% } +% } +% } +% } +FUNCTION {format.bvolume} +{ series empty$ + { "" } + { series capitalize + volume empty$ + { number empty$ + 'skip$ + { number is.ord + { "è. " number * comma.connect } + { number comma.connect } + if$ + } + if$ + } + { volume is.ord + { "sv. " volume * comma.connect } + { volume comma.connect } + if$ + } + if$ + } + if$ +} + +% Format dostupnosti. +% +% string format.url () +% { +% if (empty$(url)) +% { +% return ""; +% } else +% { +% return tie.or.connect(opt.url(), "\url{"Dostupné na: <" * url * ">.}"); +% } +% } +FUNCTION {format.url} +{ url empty$ + { "" } + { opt.url "\url{" url * "}" * tie.or.connect } + if$ +} +% { opt.url "$<${\tt " url * "}$>$" * tie.or.connect } %puvodni verze +% Format ISBN. +% +% string format.isbn () +% { +% if (empty$(isbn)) +% { +% return ""; +% } else +% { +% return "ISBN " * isbn; +% } +% } +FUNCTION {format.isbn} +{ isbn empty$ + { "" } + { "ISBN " isbn * } + if$ +} + +% Format nazvu serialove publikace. +% +% string format.journal () +% { +% if (empty$(journal)) +% { +% return ""; +% } else +% { +% return emphasize(journal); +% } +% } +FUNCTION {format.journal} +{ journal empty$ + { "" } + { journal capitalize emphasize } + if$ +} + +% Format nazvu lokace ve zdrojovem dokumentu. +% +% string format.pages () +% { +% if (empty$(pages)) +% { +% return ""; +% } else +% { +% return "s.~" * dashify(pages); +% } +% } +FUNCTION {format.pages} +{ pages empty$ + { "" } + { "s.~" pages dashify * } + if$ +} + +% Formatovani data vydani, rocniku a cisla publikace + datum revize/aktualizace +% + darum citace + lokace ve zdrojovem dokumentu (rozsah stran). +% +% string format.journal.issue () +% { +% string s; +% if (empty$(format.date())) +% { +% s = ""; +% } else +% { +% s = format.date(); +% } +% if (!empty$(volume)) +% { +% if (is.ord(volume)) +% { +% s = comma.connect(s, "roè.~" * volume); +% } else +% { +% s = comma.connect(s, volume); +% } +% } +% if (empty$(number)) +% { +% warning$("empty number in " * cite$); +% } else +% { +% if (is.ord(number)) +% { +% s = comma.connect(s, "è.~" * number); +% } else +% { +% s = comma.connect(s, number); +% } +% } +% if (s == "") +% { +% warning$("empty journal issue info in " * cite$); +% return ""; +% } else +% { +% return s; +% } +% } +FUNCTION {format.journal.issue} +{ format.date duplicate$ empty$ + { pop$ "" 's := } + { 's := } + if$ + volume empty$ + 'skip$ + { volume is.ord + { "roè.~" volume * + s swap$ comma.connect 's := + } + { s volume comma.connect 's := } + if$ + } + if$ + number empty$ + { "empty number in " cite$ * warning$ } + { number is.ord + { "è.~" number * + s swap$ comma.connect 's := + } + { s number comma.connect 's := } + if$ + } + if$ + s empty$ + { "empty journal issue info in " cite$ * warning$ + "" + } + { s } + if$ +} + +% Format ISSN. +% +% string format.issn () +% { +% if (empty$(issn)) +% { +% return ""; +% } else +% { +% return "ISBN " * issn; +% } +% } +FUNCTION {format.issn} +{ issn empty$ + { "" } + { "ISSN " issn * } + if$ +} + +% Formatuje cislo svazku -- presne urceni casti pro @InBook. +% +% string format.vol () +% { +% if (empty$(volume)) +% { +% push(""); +% } else +% { +% if (is.ord(volume)) +% { +% push("sv.~" * volume); +% } else +% { +% push(volume); +% } +% } +% return capitalize(pop()); +% } +FUNCTION {format.vol} +{ volume empty$ + { "" } + { volume is.ord + { "sv.~" volume * } + { volume } + if$ + } + if$ + capitalize +} + +% Formatuje zakladni informace (primarni odpovednost a titul) o sborniku pro +% bibliograficke citaci clanku ve sborniku. +% +% In opt.sep.a() . +% +% Pokud je prazdny, netiskne se nic. +% +% void conference.basics () +% { +% if (empty$(editor)) +% { +% if (empty$(organization)) +% { +% warning$("empty editor and organization in " * cite$()); +% push(""); +% } else +% { +% if ((substring$(organization, -1, 1) == opt.sep.a()) +% { +% push(capitalize(organization)); +% } else +% { +% push(capitalize(organization * opt.sep.a())); +% } +% } +% } else +% { +% if ((substring$(format.editors(), -1, 1) == opt.sep.a()) +% { +% push(format.editors()); +% } else +% { +% push(capitalize(format.editors() * opt.sep.a())); +% } +% } +% push(tie.or.connect("In", pop())); +% if (empty$(format.from.btitle())) +% { +% pop(); +% push(""); +% } else +% { +% push(pop() * format.from.btitle()); +% } +% return pop(); +% } +FUNCTION {conference.basics} +{ editor empty$ + { organization empty$ + { "empty editor and organization in " cite$ * warning$ + "" + } + { organization capitalize + duplicate$ #-1 #1 substring$ opt.sep.a = + 'skip$ + { opt.sep.a * } + if$ + } + if$ + } + { format.editors + duplicate$ #-1 #1 substring$ opt.sep.a = + 'skip$ + { opt.sep.a * } + if$ + } + if$ + "In" swap$ tie.or.connect + format.from.btitle + duplicate$ empty$ + { pop$ } + { tie.or.connect } + if$ +} + +% Formatuje informace o akademicke (diplomova, dizertacni atp.) praci. +% Odlisuje se od beznych nakladatelskych informaci pouzitymi polozkami. +% +% string format.thesis.info () +% { +% string s = ""; +% if ( (empty$(address)) && (empty$(school)) ) +% { +% warning$("empty address and school in " * cite$()); +% } else +% { +% if (empty$(address)) +% { +% warning$("empty address in " * cite$()); +% } else +% { +% s = address; +% } +% if (empty$(school)) +% { +% warning$("empty school in " * cite$()); +% } else +% { +% if (empty$(s)) +% { +% s = school; +% } else +% { +% s = s * opt.sep.p() * school; +% } +% } +% } +% if (empty$(year)) +% { +% warning$("empty year in " * cite$()); +% } else +% { +% if (empty$(s)) +% { +% s = year; +% } else +% { +% s = comma.connect(s, year); +% } +% } +% return s; +% } +FUNCTION {format.thesis.info} +{ "" 's := + address empty$ + school empty$ + and + { "empty address and school in " cite$ * warning$ } + { address empty$ + { "empty address in " cite$ * warning$ } + { address 's := } + if$ + school empty$ + { "empty school in " cite$ * warning$ } + { s empty$ + { school 's := } + { s opt.sep.p * school * 's := } + if$ + } + if$ + } + if$ + year empty$ + { "empty year in " cite$ * warning$ } + { s empty$ + { year 's := } + { s year comma.connect 's := } + if$ + } + if$ + s +} + +% Formatuje pocet stran a priloh u akademickych praci. +% +% string format.thesis.range () +% { +% if ( (empty$(format.range())) && (!empty$(inserts)) ) +% { +% return format.range(); +% } else +% { +% if (is.ord(inserts)) +% { +% return comma.connect(format.range(), inserts * " pøíl."); +% } else +% { +% return comma.connect(format.range(), inserts); +% } +% } +% } +FUNCTION {format.thesis.range} +{ pages empty$ + { "" 's := } + { pages opt.pages tie.or.connect 's := } + if$ + s empty$ + { "" } + { inserts empty$ + { s } + { s inserts opt.pages tie.or.connect " pøíl." * comma.connect } + if$ + } + if$ +} + +% Formatuje typ akademicke prace. +% +% string format.thesis.type (string basic.thesis.type) +% { +% if (empty$(type)) +% { +% return basic.thesis.type; +% } else +% { +% return capitalize(type); +% } +% } +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ type capitalize } + if$ +} + +% Fromatuje typ a cislo technicke zpravy +% +% string format.report.type () +% { +% if (empty$(type)) +% { +% push(""); +% warning$("type empty in "* cite$()); +% } else +% { +% push(type); +% } +% if (empty$(number)) +% { +% warning$("number empty in "* cite$()); +% } else +% { +% comma.connect(pop(), number); +% } +% } +FUNCTION {format.report.type} +{ type empty$ + { "" + "type empty in " cite$ * warning$ + } + { type } + if$ + number empty$ + { "number empty in " cite$ * warning$ } + { number comma.connect } + if$ +} + +% Kontrola prazdnosti vsech policek pouzitych pro @MISC zaznam. +% +% int empty.misc.check () +% { +% if ( (empty$(author)) && (empty$(title)) && (empty$()) && +% (empty$(howpublished)) && (empty$(month)) && (empty$(year)) && +% (empty$(note)) && (!empty$(key)) ) +% { +% warning$("all misc relevant fields are empty in " * cite$()); +% return 1; +% } else +% { +% return 0; +% } +% } +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all misc relevant fields are empty in " cite$ * warning$ + #1 + } + { #0 } + if$ +} + +% Formatuje misto a instituci technicke zpravy. +% +% string format.report.details () +% { +% if ( empty$(address) && empty$(institution) ) +% { +% return ""; +% } else +% { +% if (empty$(address)) +% { +% push("[b.m.]"); +% } else +% { +% push(address); +% } +% if (empty$(institution)) +% { +% warning$("institution is empty in " * cite$()); +% } else +% { +% return pop() * opt.sep.p() * institution; +% } +% } +% } +FUNCTION {format.report.details} +{ address empty$ + institution empty$ + and + { "" } + { address empty$ + { "[b.m.]" } + { address } + if$ + institution empty$ + { "empty institution in " cite$ * warning$ } + { opt.sep.p * institution * } + if$ + } + if$ +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%% VLASTNI KOD -- FUNKCE PRO ZPRACOVANI ZAZNAMU %%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Zpracuje zaznamy typu @Article. +% Bibliograficke citace clanku v serialovych publikaci (casopiseckych clanku). +% +% Povinne polozky: author, title, journal, edition, year, number, pages +% Volitelne polozky: subtitle, contrybutory, url*, month, volume, note, issn +% Polozky el. dok.: howpublished*, revised*, cited*, version +% +% * Povinna polozka pro el. dok. +FUNCTION {article} +{ output.bibitem + format.authors + duplicate$ empty$ + { pop$ + "empty author in " cite$ * warning$ + } + { output.authors } + if$ + new.block %% primarni odpovednost (povinna) + format.title "title" output.check + new.block %% titul (povinny) + contrybutory capitalize output + new.block %% podrizena odpovednost (volitelna) + format.journal "journal" output.check + format.howpublished output + new.block %% nazev serial. pub. (povinny) a druh nosice (povinny u el. dok.) + format.edition "edition" output.check + new.block %% vydani (povinne) + format.journal.issue + format.revised comma.connect + format.cited tie.or.connect capitalize output + new.block %% datum vydani (povinne), oznaceni cisla (povinne), + %% datum revize/aktualizace a citace (povinne u el. dok.) + format.pages capitalize "pages" output.check + new.block %% lokace ve zdrojovem dokumentu (povinna) + note output + new.block %% poznamky (volitelne) + howpublished empty$ + { format.url output } + { format.url "url" output.check + year empty$ + revised empty$ + and + { "empty year and revised in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + new.block %% dostupnost (povinna u el. dok.) + format.issn output + fin.entry %% standardni cislo ISSN (volitelne) +}% @Article + +% Zpracuje zaznamy typu @Book. +% Bibliograficke citace monografickych publikaci (knih). +% +% Povinne polozky: author nebo editor, title, edition, year, isbn +% Volitelne polozky: subtitle, contrybutory, address, publisher, month, +% pages, series, number nebo volume, note, url* +% Polozky el. dok.: howpublished*, revised*, cited*, version +% +% * Povinna polozka pro el. dok. +FUNCTION {book} +{ output.bibitem + author.or.editor + new.block %% primarni odpovednost (povinna) + format.btitle "book title" output.check + format.howpublished output + new.block %% nazev (povinny) a druh nosice (povinny u el. dok.) + contrybutory capitalize output + new.block %% podrizena odpovednost (volitelna) + format.edition capitalize "edition" output.check + new.block %% vydani (povinne) + format.publish.info + format.date comma.connect + format.revised comma.connect + format.cited tie.or.connect + capitalize output + new.block %% nakladatelske udaje (volitelne), datum vydani (povinne), + %% datum revize/aktualizace a citace (povinne u el. dok.) + format.range output + new.block %% rozsah (volitelny) + format.bvolume output + new.block %% edice (volitelna) + note capitalize output + new.block %% poznamky (volitelne) + howpublished empty$ + { format.url output } + { format.url "url" output.check + year empty$ + revised empty$ + and + { "empty year and revised in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + new.block %% dostupnost (povinna u el. dok.) + format.isbn "isbn" output.check + fin.entry %% standardni cislo ISBN (povinne) +}% @Book + +% Zpracuje zaznamy typu @Conference a @InProceedings. +% Bibliograficke citace monografickych publikaci (knih). +% +% Povinne polozky: author, title, editor nebo organization, booktitle, +% edition, year, pages, isbn or issn. +% Volitelne polozky: subtitle, booksubtitle, address, publisher, month, series, +% number nebo volume, note, url*. +% Polozky el. dok.: howpublished*, revised*, cited*, version. +% +% * Povinna polozka pro el. dok. +FUNCTION {conference} +{ output.bibitem + format.authors + duplicate$ empty$ + { pop$ + "empty author in " cite$ * warning$ + } + { output.authors } + if$ + new.block %% primarni odpovednost (povinna) + format.title "title" output.check + new.block %% titul prispevku + conference.basics + format.howpublished tie.or.connect output + new.block %% primarni odpovednost a titul sborniku + format.edition "edition" output.check + new.block %% vydani + format.publish.info + format.date comma.connect + format.revised comma.connect + format.cited tie.or.connect + capitalize output + new.block %% nakladatelske udaje, datum vydani, revize/aktualizace a citace + format.pages capitalize "pages" output.check + new.block %% rozsah stran + format.bvolume output + new.block %% edice (pokud je cislovana, tak i jeji cislo nebo svazek) + note capitalize output + new.block %% poznamky + howpublished empty$ + { format.url output } + { format.url "url" output.check + year empty$ + revised empty$ + and + { "empty year and revised in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + new.block %% dostupnost (povinna u el. dok.) + isbn empty$ + { issn empty$ + { "empty isbn or issn in " cite$ * warning$ } + { format.issn output } + if$ + } + { format.isbn output } + if$ + fin.entry %% standardni cislo ISBN nebo ISSN (povinne) +}%@Conference a @InProceedings + +% @InProceedings je pouhy odkaz na @Conference. +FUNCTION {inproceedings} { conference } + +% Zpracuje zaznamy typu @Misc. +% Vhodne pouziti napr. pro bibliograficke citace online dokumentu a webovych +% stranek. +% +% Povinne polozky: Alespon jedna z volitelnych! +% Volitelne polozky: author, title, subtitle, howpublished, edition, month, +% year, revised*, cited, note, url, version +% +% Pozn.: Protestuje, pokud neni vyplneny rok. Nemel by tedy volat format.date... +FUNCTION {misc} +{ empty.misc.check + 'skip$ + { output.bibitem + format.authors + duplicate$ empty$ + { pop$ + "empty author in " cite$ * warning$ + } + { output.authors } + if$ + new.block + format.btitle "title" output.check + format.howpublished output + new.block + format.edition output + new.block + format.date + format.revised comma.connect + format.cited tie.or.connect output + new.block + note capitalize output + new.block + howpublished empty$ + { format.url output } + { format.url "url" output.check + year empty$ + revised empty$ + and + { "empty year and revised in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + fin.entry + } + if$ +}%@Misc + +% Zpracuje zaznamy typu @InBook. +% Bibliograficke citace kapitoly ci rozsahu stran v monografii. +% +% Povinne polozky: author nebo editor, title, edition, volume, year, +% pages a/nebo chapter +% Volitelne polozky: subtitle, contrybutory, address, publisher, month, +% note, url*, isbn +% Polozky el. dok.: howpublished*, revised*, cited*, version +% +% * Povinna polozka pro el. dok. +FUNCTION {inbook} +{ output.bibitem + author.or.editor + new.block %% primarni odpovednost (povinna) + format.btitle "book title" output.check + format.howpublished output + new.block %% nazev (povinny) a druh nosice (povinny u el. dok.) + format.edition capitalize "edition" output.check + new.block %% vydani (povinne) + format.vol "volume" output.check + new.block %% urceni casti dila (povinne -- predevsim u vicesvazkovych pub.) + contrybutory capitalize output + new.block %% podrizena odpovednost (volitelna) + format.publish.info + format.date comma.connect + format.revised comma.connect + format.cited tie.or.connect + capitalize output + new.block %% nakladatelske udaje (volitelne), datum vydani (povinne), + %% datum revize/aktualizace a citace (povinne u el. dok.) + chapter + format.pages comma.connect + capitalize "chapter and/or pages" output.check + new.block %% Lokace casti + chapter empty$ + pages empty$ + and + { "empty chapter and pages in " cite$ * warning$ } + 'skip$ + if$ + note capitalize output + new.block %% poznamky (volitelne) + howpublished empty$ + { format.url output } + { format.url "url" output.check + year empty$ + revised empty$ + and + { "empty year and revised in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + new.block %% dostupnost (povinna u el. dok.) + format.isbn output + fin.entry %% standardni cislo (volitelne) +}%@InBook + +% Zpracuje zaznamy typu @TechReport. +% +% Povinne polozky: author, title, institution, year, type, number +% Volitelne polozky: subtitle, contrybutory, address, month, pages, note, url* +% Polozky el. dok.: howpublished*, revised*, cited* +FUNCTION {techreport} +{ output.bibitem + format.authors + duplicate$ empty$ + { pop$ + "empty author in " cite$ * warning$ + } + { output.authors } + if$ + new.block %% primarni odpovednost (povinna) + format.btitle "title" output.check + format.howpublished output + new.block + contrybutory capitalize output + new.block %% podrizena odpovednost (volitelna) + format.report.details + format.date comma.connect + format.revised comma.connect + format.cited tie.or.connect + capitalize output + new.block %% udeja o vydavajici instituci (volitelne) a datum vydani (povinne) + format.range output + new.block %% rozsah (volitelny) + format.report.type capitalize output + new.block %% typ a cislo zpravy (povinne polozky) + note capitalize output + new.block %% poznamka (volitelna) + format.url output + new.block %% dostupnost (volitelna) + fin.entry +}%@TechReport + +% Zpracuje zaznamy typu @BachelorThesis, @MasterThesis a @PhdThesis. +% Bibliograficke citace akademickych praci (bakalarske, diplomove a dizertacni). +% +% Zakladni verze -- v choose.thesis ma hodnotu #0. +% +% Povinne polozky: author, title, address, school, year +% Volitelne polozky: subtitle, pages, inserts, type, note, url, isbn +FUNCTION {thesis} +{ output.bibitem + format.authors + duplicate$ empty$ + { pop$ + "empty author in " cite$ * warning$ + } + { output.authors } + if$ + new.block %% primarni odpovednost (povinna) + format.btitle "title" output.check + new.block %% titul (povinny) + format.thesis.info capitalize output + new.block %% misto, skola a rok {povinne) + format.thesis.range output + new.block %% rozsah akademicke prace a jejich priloh (volitelne) + type$ "l" change.case$ + duplicate$ "bachelorthesis" = + { pop$ "Bakaláøská práce" } + { "masterthesis" = + { "Diplomová práce" } + { "Disertaèní práce" } + if$ + } + if$ + format.thesis.type output + new.block %% typ akademicke prace (volitelny -- pouzije se implicitni) + note capitalize output + new.block %% poznamky (povinne) + format.url output + new.block %% pristup na WWW (volitelny) + format.isbn output + fin.entry %% standardni cislo ISBN (volitelne) +}%@BachelorThesis, @MasterThesis a @PhdThesis + +% Dalsi funkce pro vytvoreni bibliografickych citaci akademickych praci. +% +% Jina verze -- v choose.thesis ma hodnotu #1. +FUNCTION {another.thesis} +{ output.bibitem + format.authors + duplicate$ empty$ + { pop$ + "empty author in " cite$ * warning$ + } + { output.authors } + if$ + new.block %% primarni odpovednost (povinna) + format.btitle "title" output.check + new.block %% titul (povinny) + type$ "l" change.case$ + duplicate$ "bachelorthesis" = + { pop$ "Bakaláøská práce" } + { "masterthesis" = + { "Diplomová práce" } + { "Disertaèní práce" } + if$ + } + if$ + format.thesis.type + school empty$ + { "empty school in " cite$ * warning$ } + { school comma.connect } + if$ + address empty$ + { "empty address in " cite$ * warning$ } + { address comma.connect } + if$ + year empty$ + { "empty year in " cite$ * warning$ } + { year comma.connect } + if$ + capitalize output + new.block %% typ akademicke prace, skola, adresa, datum vydani prace. + format.thesis.range output + new.block %% rozsah akademicke prace + note capitalize output + new.block %% poznamky (povinne) + format.url output + new.block %% pristup na WWW (volitelny) + format.isbn output + fin.entry %% standardni cislo ISBN (volitelne) +}%@BachelorThesis, @MasterThesis a @PhdThesis + +% Podle hodnoty volby opt.thesis vybere, ktery tvar bibliografickych citaci +% pro akademicke prace bude vyuzit. +FUNCTION {chosen.thesis} +{ opt.thesis #0 = + { thesis } + { another.thesis } + if$ +} + +% Zaznamy typu @BachelorThesis jsou zpracovany funkci thesis. +FUNCTION {bachelorthesis}{ chosen.thesis } + +% Zaznamy typu @MasterThesis jsou zpracovany funkci thesis. +FUNCTION {masterthesis} { chosen.thesis } + +% Zaznamy typu @PhdThesis jsou zpracovany funkci thesis. +FUNCTION {phdthesis} { chosen.thesis } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%% MIRNE UPRAVENE FUNKCE PREVZATE Z plain.bst %%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% nacteni bibliograficke databaze +READ + +% Pripravi hodnotu pro razeni -- aplikuje vestavenou funkci purify$ a prevede +% na minusky. +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +% Deklarace dalsi celociselne promenne. +INTEGERS { len } + +% Vrati pouze cast predane hodnoty. +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +% Piprava jmen na razeni. +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ +% s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := + s nameptr "{ll{ }}{ ff{ }}{ vv{ }}" format.name$ 't := %% Zamena! + nameptr numnames = t "others" = and + { "et al" * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +% Priprava titulu na serazeni. +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +% Serazeni dle autora. +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +% Serazeni dle editora. +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +% Serazeni dle autora, editora nebo organizace. Jedna se o nevyuzitou funkci. +FUNCTION {author.organization.sort} +{ author empty$ + { organization empty$ + { key empty$ + { "to sort, need author, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { author sort.format.names } + if$ +} + +% Serazeni dle editora ci organizace. Jedna se o nevyuzitou funkci. +FUNCTION {editor.organization.sort} +{ editor empty$ + { organization empty$ + { key empty$ + { "to sort, need editor, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { editor sort.format.names } + if$ +} + +% Priprava na razeni. +% +% Funkce je zmenena oproti puvodnimu zneni v plain.bst. +FUNCTION {presort} +{ type$ "book" = + type$ "inbook" = + or + { author.editor.sort } + { author.sort } + if$ + " " * + year field.or.null sortify * + " " * + title field.or.null + sort.format.title * + #1 entry.max$ substring$ + 'sort.key$ := +} + +% Provede pripravu pred razenim. +%ITERATE {presort} + +% Provede serazeni. +% SORT + +% Deklarace retezcove promenne pro urceni nejdelsiho navesti do soupisu bib.cit. +STRINGS { longest.label } + +% Deklarace pomocnych ciselnych promennych. +INTEGERS { number.label longest.label.width } + +% Inicializace pomocnych promennych. +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +% Predani nejdelsiho navesti. +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +% Provede inicializaci pomocnych promennych. +EXECUTE {initialize.longest.label} + +% Vybere nejdelsi navesti. +ITERATE {longest.label.pass} + +% Tato funkce se stara o prvni radky, ktere se objevi ve vystupnim souboru. +% +% Tato funkce je rozsirena o podminenou definici prikazu \url{}. +FUNCTION {begin.bib} +{ % "\makeatletter" write$ newline$ % -> vyrazen zakladni format url ve prospech formatu z baliku hyperref + %"\@ifundefined{url}" + % "{\def\url#1{{\tt $<$#1$>$}}}" * + % "{\DeclareUrlCommand\url{\def\UrlLeft{<} \def\UrlRight{>} \urlstyle{tt}}}" * + % write$ newline$ + % "\makeatother" write$ newline$ + preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" longest.label * "}" * write$ newline$ +} + +% Funkce zapise posledni radky do vystupniho souboru -- uzavre prostredi +% thebibliography. +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +% Vlozi do vystupniho souboru zacatek prostredi thebibliography. +EXECUTE {begin.bib} + +% Provede inicilizaci potrebnych konstant. +EXECUTE {init.state.consts} + +% Zpracovani vsech citovanych zaznamu. +ITERATE {call.type$} + +% Uzavre prostredi thebibliography. +EXECUTE {end.bib} diff --git a/img/3dtank3.jpg b/img/3dtank3.jpg new file mode 100644 index 0000000..7125aaa Binary files /dev/null and b/img/3dtank3.jpg differ diff --git a/img/jezero1.jpg b/img/jezero1.jpg new file mode 100644 index 0000000..4d817a5 Binary files /dev/null and b/img/jezero1.jpg differ diff --git a/img/logo_ zelene.jpg b/img/logo_ zelene.jpg new file mode 100644 index 0000000..ce40342 Binary files /dev/null and b/img/logo_ zelene.jpg differ diff --git a/img/stromy.jpg b/img/stromy.jpg new file mode 100644 index 0000000..b9b0f4f Binary files /dev/null and b/img/stromy.jpg differ diff --git a/literatura.bib b/literatura.bib new file mode 100644 index 0000000..3100c1a --- /dev/null +++ b/literatura.bib @@ -0,0 +1,57 @@ +Pro jednotlivé položky citací lze použít uvozovky nebo složené závorky dohromady. Pokud použijte oboje, BibTex hlásí varování. +Položky u jednotlivých knih a zdrojů mohou být v libovolném pořadí, BibTex si je přeskládá, jak patří. + +U autorů a dat citací si vybberte jednu verzi a té se držte. + +Styl pro citování knih. +Styl umístí příjmení před jméno a vysází ho kapitálkami. +@book{rybitex, + address = "Brno", + author = "Jiří Rybička", + isbn = "80-7302-049-1", + pages = "238", + publisher = "Konvoj", + title = "\LaTeX \ pro začátečníky", + year = "2003", + edition = {3}, +} + +Styl pro citování knih a textů z webu. +Složené závorky zajistí sazbu jmen ve tvaru a pořadí, v jakém jsou zapsaná. +@book{cit-jed, + author = "{Martin, Karolína Krbcová a Jakub Horák} Krčál", + title = {Citujme jednoduše: instrukce pro vyučující středních škol }, + howpublished = "online", + cited = "3. 2. 2023", + address = "Brno", + publisher = "Ucimcitace.cz", + pages = "14", + year = "2015", + url = "https://www.citace.com/download/Citujte-jednoduse.pdf" +} + +Styl pro citování jiných zdrojů než knih z webu i odjinud. +@misc{lm2567, + author = "{Texas Instruments}", + title = "LM2567", + howpublished = "online", + address = "{Dallas, USA}", + year = "1999", + revised = "Aktualizováno květen 2021", + cited = "!2009-03-29", + url = "https://www.ti.com/lit/ds/symlink/lm2576hv.pdf", +} + +Bakalářská, diplomová nebo disertační práce +@MasterThesis{bibtex:pysny, + author = "Radek Pyšný", + title = {BiBTeX styl pro ČSN ISO 690 a ČSN ISO 690-2}, + type = "bakalářská práce", + school = "VUT Brno", + howpublished = "online", + cited = "3. 2. 2023", + address = "Brno", + publisher = "Ucimcitace.cz", + year = "2009", + url = "https://www.fit.vut.cz/study/thesis/7848/.cs" +} \ No newline at end of file diff --git a/sablona_dmp.pdf b/sablona_dmp.pdf new file mode 100644 index 0000000..228e300 Binary files /dev/null and b/sablona_dmp.pdf differ diff --git a/sablona_dmp.tex b/sablona_dmp.tex new file mode 100644 index 0000000..8f5377d --- /dev/null +++ b/sablona_dmp.tex @@ -0,0 +1,506 @@ +% verze 1.0 3.2.2023 + +\documentclass[12pt, a4paper, oneside]{article} +% velikost písma, stránky, typ dokumentu - detaily viz literatura + +\usepackage[utf8]{inputenc} +\usepackage[czech]{babel} +\usepackage{wrapfig} % nastavení obtékání textu +\usepackage{graphicx,amsmath} % nastavení grafiky, matematiky +%\usepackage{subfig} % více obrázků vedle sebe + +\usepackage{color} % balíček pro obarvování textů +% \color{blue} % přepne barvu textu na modrou +\usepackage{xcolor} % zapne možnost používání barev, mj. pro \definecolor +\definecolor{mygreen}{RGB}{0,150,0} % nastavení barev odkazů +\definecolor{myblue}{RGB}{0,0,200} +\definecolor{commentgreen}{RGB}{0,100,0} % nastavení barev pro příklady z C++ +\definecolor{deepblue}{rgb}{0,0,0.7} +\definecolor{deepred}{rgb}{0.6,0,0} +\definecolor{deepgreen}{rgb}{0,0.5,0} + +\usepackage{hyperref} % balíček pro hypertextové odkazy +% \url{www.odkaz.cz} +% \href{http://www.odkaz.cz}{Text který bude jako odkaz} +%\hyperlink{label}{proklikávací_text} - odkaz na text +% \hypertarget{label}{cíl_odkazu} - cíl odkazu + +\hypersetup{colorlinks=true, linkcolor=myblue, urlcolor=mygreen, citecolor=blue, anchorcolor = magenta, + linktocpage = true, frenchlinks } % nastavení barvy odkazů +% bookmarksopen=true, bookmarksnumbered=true, bookmarksopenlevel=1 - nastavuje rozbalování levého menu + + +%\addtolength{\textwidth}{-2mm} +%\addtolength{\hoffset}{4mm} % posun textu kvůli kroužkové vazbě + +\setlength{\intextsep}{5mm} % nastavení mezery okolo obrázků + +% nastavení příkazu >\figcaption pro popis čehokoli, jako by to byly obrázky +\makeatletter +\newcommand\figcaption{\def\@captype{figure}\caption} +\makeatother + +%\def\refname{Literatura a další zdroje} +% přejmenuje anglický název Reference na české Literatura ... + +%% VLNA KkSsVvZzOoUuAaIi +% Defaultni  koncovka pro je ".tex" + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% V PROSTŘEDÍ ROVNIC SE NESMÍ VYSKYTOVAT PRÁZDNÝ ŘÁDEK +% +% PROGRAM VLNA SE MUSÍ SPUSTIT SAMOSTATNĚ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% definice příkazů +%\newcommand{\D}{\medskip \noindent} % nový odstavec v "americkém" formátování + +\usepackage{indentfirst} %odsadí první řádek prvního odstavce v každé kapitole - české formátování + +\newcommand{\A}{\mathbf} %tučné písmo v matematickém režimu +\newcommand{\TO}{\ensuremath{\boldsymbol\Omega}} % tučný znak velké omega - pro ohmy + +\newcommand{\F}{\footnotesize} % zmenšená velikost písma +\newcommand{\N}{\normalsize} % normální velikost písma +\newcommand{\U}{\underline} % podtržené písmo +\newcommand{\e}{\ensuremath} +% další příkaz se aplikuje, pouze, když jste v matematickém režimu + +\linespread{1.3} +% řádkování 1,5x + +\unitlength=1mm % nastavení volby jednotek + +% konec hlavičky +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{document} % začátek textové části + +% titulní strana +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\pagestyle{empty} % vynechá číslování +~ + +\voffset = -23mm % posun začátku textu výš +\enlargethispage{60mm} % zvětší oblast tisku pro tuto stránku + +%\the\leftskip %vypíše hodnotu proměnné \leftskip +%\rightskip + +\vspace{-15mm} +\begin{figure} +\leftskip=-63mm plus 1.0fil % posun levého okraje odstavce + \begin{minipage}{.35\textwidth} +% \centering + \includegraphics[width=0.95\linewidth]{img/logo_ zelene.jpg} + \end{minipage} + \begin{minipage}{.5\textwidth} + \rightskip =-200pt plus 1.0fil + \textbf{Střední průmyslová škola a Vyšší~odborná škola~Brno,~Sokolská,} + + %\leftskip=0mm plus 1.0fil + \vspace{-2mm} + \textbf{příspěvková organizace} + \end{minipage} +\end{figure} + + + +\vspace{68mm} +\begin{center} +\Huge +\textbf{MATURITNÍ PRÁCE} \\ + + + +\vspace{7mm} + +\huge %\LARGE +\textbf{Emulátor konzole GameBoy} +\end{center} + +\vspace{78mm} + + +\large +\newcommand{\radkovani}{1mm} +%\leftskip = 3mm +\begin{tabbing} +\hspace{-16mm} \= \hspace{45mm} \= \kill % nastavení zarážek +\>Studijní obor: \> Technické lyceum 78 -- 42 -- M/01\\[\radkovani ] +\>Třída: \> L4A \\[\radkovani] +\>Školní rok: \> 2025/2026 \\[\radkovani] +\>Jméno: \> \textbf{Adam} \\[\radkovani] +\>Příjmení: \> \textbf{Břicháček} \\ +\end{tabbing} +\leftskip = 0mm +\normalsize + +%\addtolength{\textheight}{30mm} % zvětší oblast textu na stránce +% musí být o stránku dřív, než má začít fungovat + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newpage % Prohlášení o autorství +\voffset = 0mm % posun začátku textu zpět +\enlargethispage{60mm} % zvětší oblast tisku pro tuto stránku + +~ % musí to tu být, aby fungovala svislá mezera + +\vspace{185mm} + +\leftskip=-14.5mm +\rightskip=-17mm +\noindent +\textbf{Prohlašuji, že jsem tuto práci vypracoval samostatně a použil jsem literárních pramenů a informací, které cituji a uvádím v seznamu použité literatury a zdrojů informací.} + +\vspace{7mm} + +\noindent V Brně dne: ............... \hspace{85mm} .............................\\ + \hspace*{128mm} Adam Břicháček + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newpage % Poděkování - nepovinné + +\section{Úvod} +%\begin{itemize} +%\item proč jsem si zvolil dané téma +%\item výchozí situace a předpoklady +%\item cíle práce, čeho chci dosáhnout +%\item jak asi toho chci dosáhnout (zhruba, stručně) +%\end{itemize} +Pico GameBoy (zkráceně Pico-GB) Emulátor jsem si vybral jako maturitní práci, protože mě přišla zajímavá emulace starých herních konzolí a celková emulace konzolí a dalších věcí, také mě přišlo zajímavé si vytvořit vlastní konzoli k tomu jako takový menší bonus. + +K tomu abych docílil pravého pocitu hraní na originálním GameBoyi, které se dneska nedají jednoduše sehnat, jsem se snažil držet originálnímu designu, s tím že jsem ho chtěl vylepšit o svojí vlastní baterií, místo 4 AA baterek nahradit baterií a nabíjením přes USB-C. Předpokládám, že Baterie by mohla mít lepší životnost než v originálu, neboť to není pořád zapnuté a komponenty co jsem vybral by neměli tolik čerpat energii z Baterie a pokud baterie bude dostatečně veliká tak nebude potřeba nabíjet tak často. Další předpoklad je se zbavit originálních kazet, na které se vlezla max 1 - 2 hry (pokud to byla nějaká malá hra se speciálními edicemi tak klidně i 3, ale to jen velice vzácně) a nahradit ji SD kartou kam se vejde celá knihovna VŠECH her vydaných pro originálního GameBoye. + +Tohle celé bych chtěl dosáhnout pomocí mikrokontroléru Raspberry Pi Pico, LCD displejem ILI9225, SD kartou a pár tlačítek, to by nám stačilo na původní rozjezd a pak jen přidat zbytek komponentů. + +\section{Text} +\subsection{Program v Pi Pico} % https://github.com/deltabeard/RP2040-GB +\subsubsection{Originální program} +Program, který je nahrán na mikrokontrolér Raspberry Pi Pico, je fork (neboli modifikace) RP2040-GB od deltabeard. Tento program je založen na originálním kódu, který konvertuje soubory .gb (Game Boy) do čitelného jazyka C. Tento proces umožňuje spustit Game Boy hry na Raspberry Pi Pico po přidání pár řádků kódů. +Díky této knihovně je možné psát na Game Boy dokonce i naše vlastní hry. Při vývoji vlastních her je však nutné vzít v potaz výkon samotného mikrokontroléru Raspberry Pi Pico. Je důležité, abychom neudělali hru příliš náročnou, aby mohla být spuštěna hladce na tomto zařízení. +RP2040-GB je open-source projekt, který umožňuje vývojářům vytvářet vlastní hry a aplikace pro Game Boy. Tento projekt je velmi aktivní a má velké množství přispěvatelů, kteří neustále vylepšují a rozšiřují jeho možnosti. +Díky použití tohoto programu můžeme na Raspberry Pi Pico spustit širokou škálu her, od klasických Game Boy titulů až po vlastní tvorby. Je to skvělá možnost pro vývojáře, kteří chtějí vytvářet vlastní hry a aplikace pro Game Boy, a pro hráče, kteří chtějí hrát své oblíbené hry na novém zařízení. +Vývoj vlastních her pro Game Boy na Raspberry Pi Pico vyžaduje určité znalosti programování v jazyce C a znalosti o fungování mikrokontrolérů. Nicméně, díky dostupnosti zdrojového kódu a dokumentace, je možné se do tohoto světa snadno zapojit a začít vytvářet své vlastní hry a aplikace. + +% https://github.com/YouMakeTech/Pico-GB +\subsubsection{Modifikovaný program} +Pico-GB od YouMakeTech, přidává několik významných vylepšení oproti původnímu kódu. Tato vylepšení zahrnují: + +\begin{itemize} + \item Podpora klasických tlačítek: Program nyní podporuje klasické tlačítka Game Boy, což umožňuje hráčům ovládat hry pomocí známých tlačítek A, B, Start, Select, Up, Down, Left a Right. + \item Přetaktování mikrokontroléru na 266MHz: Program umožňuje přetaktování mikrokontroléru Raspberry Pi Pico na 266MHz, což zvyšuje výkon zařízení a umožňuje hladší běh her s vyšším počtem snímků za sekundu (~60 FPS). To zajišťuje, že hry běží plynuleji a bez zpoždění. + \item I2S zvuková podpora: Program přidává podporu pro I2S zvuk, který umožňuje přehrávání 44.1kHz 16-bitového stereo audia. To znamená, že hry budou mít kvalitní zvuk, který odpovídá původnímu Game Boy zvuku. + \item Podpora SD karet: Program umožňuje použití SD karet jako úložiště pro hry a jejich uložená data. SD karty musí být naformátované na FAT 32 a mít název uložiště PICO-GB. To umožňuje hráčům snadno ukládat a načítat své hry a uložená data. +\end{itemize} + +Díky těmto vylepšením nabízí Pico-GB od YouMakeTech mnohem lepší herní zážitek než původní kód. Hry běží plynuleji, mají kvalitní zvuk a lze je snadno ukládat a načítat pomocí SD karet. To vše činí Pico-GB velmi atraktivní volbou pro hráče, kteří chtějí hrát své oblíbené Game Boy hry na novém zařízení. + +\subsection{Součástky} +Samotná Pico-GB se skládá z následujících součástek: +\begin{itemize} + \item Mikrokontrolér Raspberry Pi Pico, který je srdcem celého zařízení a poskytuje potřebný výkon pro emulaci her. + \item 2,2 palcový ILI9225 LCD displej s rozlišením 176x220 pixelů, který poskytuje kvalitní obraz pro hraní her. Displej může být vybaven slotem pro microSD kartu, což umožňuje snadné načítání her a dalších souborů. + \item Pokud displej není vybaven slotem pro microSD kartu, je nutné použít externí čtečku, která musí být připájena nebo připojena k zařízení. + \item MAX98357 I2S mono zesilovač, který zajišťuje kvalitní zvukový výstup pro hraní her. + \item 2W 8Ω reproduktor, který poskytuje hlasitý a kvalitní zvuk pro hraní her. + \item 8 mikro 5x5x5mm tlačítek, která slouží jako ovládací prvky pro hraní her. Tlačítka jsou rozmístěna podobně originálnímu designu původního GameBoye, aby bylo možné snadno ovládat hry i z paměti. + \item Pájecí pole, které umožňuje pájení a propojení všech součástek. + \item Drátky, které slouží jako propojovací vodiče pro součástky. + \item LiPol baterie 3000mAh 3.7V, která poskytuje dostatečnou kapacitu pro dlouhodobé hraní her. + \item Nabíječka Li-ion článku TP4056 s ochranou USB-C, která umožňuje snadné nabíjení baterie bez poníčení. + \item Plast na 3D tisk pro krabičku, který slouží jako ochranné pouzdro pro zařízení. +\end{itemize} + +% \subsubsection{Co se očekává v textu} % často dělení na kapitoly a články úplně stačí +% +% Všechny texty a nadpisy si samozřejmě upravíte podle svého \dots +% +% Text by měl obsahovat vše co slibujete v úvodu, včetně dostatečně podrobného popisu použitých metod řešení, všech získaných výsledků, i zápor\-ných -- když zjistím, že je něco úplně jinak, je to taky výsledek. +% Je možné zmínit i důležitější slepé uličky, kterými jste museli projít. +% Z výsledků samozřejmě vyvodíte podrobné závěry, které se potom stručně shrnou na konci práce. + + + +% je 3D vytisknutá ruční hrní konzole emulující GameBoy mikrokontrolérem Raspberry Pi Pico, která vzhledově připomíná původní herní konzoli Nintendo Game Boy z roku 1989, akorát bez herních karet s hry, audio jackem pro sluchátka a 4 AA baterií. + +% \section{Popis} +% Tato podomácku vytvořená verze velice historicky úspěšné herní konzole je jedna z mála cest jak opět zažít jaké to bylo hrát staré Nintendo hry z GameBoye v 90tých letech. Oproti originálu bylo použito velice málo komponentů, když se to zkombinuje s programováním a experimentováním, tak jsme potom schopni si zahrát původní tituly GB. + +% Hlavní součástky Pico-GB jsou Raspberry Pi Pico, LCD displej ILI9225, SD karta a pár tlačítek, aby jsme mohli začít, s tím že můj GameBoy má ješte funkčnost dobíjecí LiPol 3000mAh baterií přes USB-C, potom za pár hodin skládání všeho dohromady + +% \section{Velký nadpis} +% \subsection{Menší nadpis} +% \subsubsection{Ještě menší} + +% 50\% textu +% soubor\_nazev + +% \begin{itemize} +% \item První položka +% \item Druhá položka +% \end{itemize} + +% \textbf{Toto je tučné} + +% \textit{Kurzíva} + +% \underline{Podtržené} + + +~ % musí to tu být, aby fungovala svislá mezera + +\vspace{160mm} + +\section*{Poděkování} + +\noindent \textit{Například:} + +\noindent Děkuji ................ za ...................... a za obětavou pomoc a podnětné připomínky, které mi během práce poskytoval/a. % nebo cokoli dle Vašeho uvážení + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newpage +~ % musí to tu být, aby fungovala svislá mezera +\vspace{10mm} + +\section*{Zadání} + +\noindent Dostanete od vyučujícího. + +\leftskip=0mm +\rightskip=0mm + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newpage +\pagestyle{plain} % znovu zapne číslování +\tableofcontents % vysází obsah + +%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newpage + + + +\section{Úvod} + +\noindent Do úvodu patří: +\begin{itemize} +\item proč jsem si zvolil dané téma +\item výchozí situace a předpoklady +\item cíle práce, čeho chci dosáhnout +\item jak asi toho chci dosáhnout (zhruba, stručně) +\end{itemize} + +Obvyklá délka úvodu je cca 1/2 -- 3/4 stránky, ale může mít i více. Neměl by mít podstatně méně. Píšete jej až poté, co je hotový text práce. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\vspace{20mm} + +\addcontentsline{toc}{section}{Seznam použitých značek a symbolů} % přidá položku do obsahu +\section*{Seznam použitých značek a symbolů} + +\noindent Pokud pro něj máte použití. + +\newpage % Hlavní text by měl začínat na nové stránce. + +\section{Název první kapitoly} + +\subsection{První článek} + +\subsubsection{Co se očekává v textu} % často dělení na kapitoly a články úplně stačí + +Všechny texty a nadpisy si samozřejmě upravíte podle svého \dots + +Text by měl obsahovat vše co slibujete v úvodu, včetně dostatečně podrobného popisu použitých metod řešení, všech získaných výsledků, i zápor\-ných -- když zjistím, že je něco úplně jinak, je to taky výsledek. +Je možné zmínit i důležitější slepé uličky, kterými jste museli projít. +Z výsledků samozřejmě vyvodíte podrobné závěry, které se potom stručně shrnou na konci práce. + +\subsection{Zálohování textu} + + Když budete cokoli psát, ukládejte starší verze vždy odděleně, abyste se + k nim mohli kdykoli vrátit. Kusy textu, které jste se rozhodli nepoužít, taky ukládejte do zvláštního souboru (např: \textit{odkladiste.tex}). Smazat se to dá vždycky, ale psát to znova je zbytečné. + + \textbf{A POŘÁD ZÁLOHUJTE. POŘÁD !!!} + + Ideální pro zálohy větších projektů typu ročníková práce nebo třeba návrh webu je verzovací systém git + (např. \href{https://www.itnetwork.cz/programovani/git/git-tutorial-historie-a-principy/}{zde} a \href{https://git-scm.com/book/cs/v2/%C3%9Avod-Z%C3%A1klady-syst%C3%A9mu-Git}{zde}) + a server \href{https://github.com/}{github} nebo \href{https://bitbucket.org/}{bitbucket}. + +\subsubsection{Lorem ipsum} + +Někdy potřebujeme vědět, jak bude text vypadat zformátovaný, ale onen text ještě třeba nemáme. V takovém případě se může hodit generátor pseudolatinského textu +\textit{Lorem ipsum}. Výsledek jeho práce si zde můžete prohlédnout zde: + +Lorem ipsum dolor sit amet consectetuer ligula ultrices nibh at ut. Congue venenatis dapibus nibh Quisque pharetra tellus lorem lorem suscipit Curabitur. Nulla id netus tincidunt In turpis Donec dui Nam Duis libero. Phasellus urna Integer Nam vel In nec ipsum lacus diam lacus. Vitae Lorem sed lobortis congue metus tincidunt dui nisl cursus Ut. Justo. + +Neque et feugiat nonummy adipiscing mollis justo tellus felis justo id. Ac Pellentesque tristique Aenean metus Sed vitae In lacus vel metus. Quis turpis malesuada Fusce vel cursus fermentum justo ut Quisque eget. Tellus dui id et ac tincidunt laoreet Sed dui malesuada ac. Molestie hendrerit ut enim lacus ultrices Nam massa Cum Phasellus volutpat. Pretium tincidunt interdum commodo elit Fusce lacinia. + +In metus Pellentesque laoreet justo ut ut suscipit vel penatibus ac. Curabitur Maecenas id neque massa est feugiat tristique leo ipsum Nullam. Accumsan Phasellus orci Praesent ut felis convallis eget Aenean justo elit. Sem nibh Ut cursus tempus orci Fusce orci auctor fames eu. Eget pellentesque convallis tortor hendrerit nunc lorem lacus libero et Nulla. Massa condimentum orci Curabitur cursus quam Sed. + +Suspendisse Sed Ut iaculis nibh wisi faucibus id montes nascetur condimentum. Non Lorem Pellentesque cursus orci Nullam et id vel malesuada pede. Suscipit libero Nam condimentum justo magna condimentum ac et condimentum tempor. Eget sed libero non nibh ridiculus elit molestie Vivamus ultrices eu. Aenean et tempus elit id Phasellus nibh hac sed Curabitur pede. Justo augue eget Curabitur. + + +\subsection{Počítadlo znaků a řádků} +% na následující stránce je pouze hladký text pro kontrolu počtu znaků na řádek a řádků na stránku + +Lorem ipsum dolor sit amet consectetuer eget Nullam felis nibh turpis. Tempor feugiat Curabitur interdum id pharetra nunc Maecenas id eleifend wisi. Tempor adipiscing vitae feugiat et quis turpis felis vestibulum In commodo. Dolor justo Sed nec id Vestibulum condimentum urna nisl diam nec. Sapien congue nibh Suspendisse ut quis ac quis massa mattis consectetuer. Nunc orci Lorem semper ut leo Ut tincidunt Phasellus Nulla laoreet. Ante. + +Metus dolor nulla vitae Sed orci Sed penatibus ut condimentum elit. Velit feugiat tortor pretium eget velit sagittis porttitor sagittis elit in. Non sed id libero vitae ligula tellus interdum aliquam sed pede. Elit dapibus hendrerit a metus tincidunt vel nibh quis ipsum justo. Ac elit volutpat auctor Fusce condimentum vitae congue. + +Lacinia convallis tellus tempor est Suspendisse orci convallis sociis lacinia Maecenas. Sagittis orci laoreet Vestibulum hac Duis dis elit justo consectetuer Vivamus. Suspendisse adipiscing nibh vitae ut auctor laoreet eleifend lacus ac nulla. Aliquam volutpat nisl vel laoreet lacinia et tempor pede penatibus gravida. Ligula ut lorem feugiat justo sit nulla lacus eros est in. Enim Nulla lorem id risus tempus Donec tincidunt In ac lorem. + +Volutpat ac consectetuer Vestibulum urna eu Nulla semper Nunc tortor gravida. Integer at Aenean Vivamus venenatis euismod a Curabitur laore et Curabitur nascetur. Cras semper metus ultrices In urna sit mauris mauris vitae nisl. Arcu pede nulla lacus pellentesque urna tincidunt enim ante Curabitur orci. Tellus Pellentesque commodo Phasellus Curabitur neque netus ultrices pede venenatis id. Sed orci sed justo non tincidunt elit. + +Lorem ipsum dolor sit amet consectetuer eget Nullam felis nibh turpis. Tempor feugiat Curabitur interdum id pharetra nunc Maecenas id eleifend wisi. Tempor adipiscing vitae feugiat et quis turpis felis vestibulum In commodo. Dolor justo Sed nec id Vestibulum condimentum urna nisl diam nec. Sapien congue nibh Suspendisse ut quis ac quis massa mattis consectetuer. Nunc orci Lorem semper ut leo Ut tincidunt Phasellus Nulla laoreet. Ante. + +Metus dolor nulla vitae Sed orci Sed penatibus ut condimentum elit. Velit feugiat tortor pretium eget velit sagittis porttitor sagittis elit in. Non sed id libero vitae ligula tellus interdum aliquam sed pede. Elit dapibus hendrerit a metus tincidunt vel nibh quis ipsum justo. Ac elit volutpat auctor Fusce condimentum vitae congue. + +Lacinia convallis tellus tempor est Suspendisse orci convallis sociis lacinia Maecenas. Sagittis orci laoreet Vestibulum hac Duis dis elit justo consectetuer Vivamus. Suspendisse adipiscing nibh vitae ut auctor laoreet eleifend lacus ac nulla. Aliquam volutpat nisl vel laoreet lacinia et tempor pede penatibus gravida. Ligula ut lorem feugiat justo sit nulla lacus eros est in. Enim Nulla lorem id risus tempus Donec tincidunt In ac lorem. + +\subsection{Příkazy pro umístění obrázků} + +Na úvod jedna dost podstatná informace: \textbf{velké obrázky} \textbf{patří do příloh} (1/2 polovina strany a více), pouze menší obrázky mohou být v textu. + +Další také podstatná informace: \textbf{obrázky do textu vkládejte zkomprimované}. Na běžný obrázek do textu s rezervou stačí velikost cca 600x400 bodů, což odpovídá velikosti v desítkách kB. Komprimací obrázků se masivně zmenšuje velikost výsledného pdf souboru (a v případě použití gitu velikost repozitáře). + +\textbf{Obrázek \ref{fig:3Dmodel} bude umístěn přesně tam, kde ho máte v textu:} + +\vspace{-5mm} +\hfill\\[\intextsep] +\begin{minipage}{\textwidth} + \begin{center} + \includegraphics[scale=0.6]{img/3dtank3.jpg} + \figcaption{3D model -- přesné umístění obrázku} \label{fig:3Dmodel} + \end{center} +\end{minipage} +\vspace{1mm} + +Metus dolor nulla vitae Sed orci Sed penatibus ut condimentum elit. Velit feugiat tortor pretium eget velit sagittis porttitor sagittis elit in. Non sed id libero vitae ligula tellus interdum aliquam sed pede. Elit dapibus hendrerit a metus tincidunt vel nibh quis ipsum justo. Ac elit volutpat auctor Fusce condimentum vitae congue. + +Metus dolor nulla vitae Sed orci Sed penatibus ut condimentum elit. Velit feugiat tortor pretium eget velit sagittis porttitor sagittis elit in. Non sed id libero vitae ligula tellus interdum aliquam sed pede. Elit dapibus hendrerit a metus tincidunt vel nibh quis ipsum justo. Ac elit volutpat auctor Fusce condimentum vitae congue. + +\textbf{Obrázek \ref{fig:krajina} bude umístěn tam, kde \LaTeX{} uzná za vhodné. Takže třeba o kus výš nebo níž, než je ve zdrojovém textu. } + +Přesnějšího umístění dosáhnete parametry \texttt{t} (top), +\texttt{b} (bottom) nebo \texttt{h}~(here), například \verb|\begin{figure}[h!]|. Vykřičník znamená zesílení vašeho požadavku (ale konečné rozhodnutí je pořád na \LaTeX{}u). + + \begin{figure} + \begin{center} + \includegraphics[scale=0.5]{img/jezero1.jpg} + \caption{Krajina -- \uv{obyčejný} obrázek} + \label{fig:krajina} + \end{center} + \vspace{-7mm} + \end{figure} + + + Lacinia convallis tellus tempor est Suspendisse orci convallis sociis lacinia Maecenas. Sagittis orci laoreet Vestibulum hac Duis dis elit justo consectetuer Vivamus. Suspendisse adipiscing nibh vitae ut auctor laoreet eleifend lacus ac nulla. Aliquam volutpat nisl vel laoreet lacinia et tempor pede penatibus gravida. Ligula ut lorem feugiat justo sit nulla lacus eros est in. Enim Nulla lorem id risus tempus Donec tincidunt In ac lorem. + + Metus dolor nulla vitae Sed orci Sed penatibus ut condimentum elit. Velit feugiat tortor pretium eget velit sagittis porttitor sagittis elit in. Non sed id libero vitae ligula tellus interdum aliquam sed pede. Elit dapibus hendrerit a metus tincidunt vel nibh quis ipsum justo. Ac elit volutpat auctor Fusce condimentum vitae congue. + + Lacinia convallis tellus tempor est Suspendisse orci convallis sociis lacinia Maecenas. Sagittis orci laoreet Vestibulum hac Duis dis elit justo consectetuer Vivamus. Suspendisse adipiscing nibh vitae ut auctor laoreet eleifend lacus ac nulla. Aliquam volutpat nisl vel laoreet lacinia et tempor pede penatibus gravida. Ligula ut lorem feugiat justo sit nulla lacus eros est in. Enim Nulla lorem id risus tempus Donec tincidunt In ac lorem. + + \textbf{A tady je ve zdrojovém textu obtékaný obrázek \ref{fig:stromy}.} + + \begin{wrapfigure}{l}{0.4\textwidth} + \vspace{-20pt} + \begin{center} + \includegraphics[width=0.4\textwidth]{img/stromy.jpg} + \vspace{-30pt} + \caption{\centering Stromy -- obtékání obrázku.} + \label{fig:stromy} + \end{center} + \vspace{-20pt} + \end{wrapfigure} + + Lacinia convallis tellus tempor est Suspendisse orci convallis sociis lacinia Maecenas. Sagittis orci laoreet Vestibulum hac Duis dis elit justo consectetuer Vivamus. Suspendisse adipiscing nibh vitae ut auctor laoreet eleifend lacus ac nulla. Aliquam volutpat nisl vel laoreet lacinia et tempor pede penatibus gravida. Ligula ut lorem feugiat justo sit nulla lacus eros est in. Enim Nulla lorem id risus tempus Donec tincidunt In ac lorem. + + Metus dolor nulla vitae Sed orci Sed penatibus ut condimentum elit. Velit feugiat tortor pretium eget velit sagittis porttitor sagittis elit in. Non sed id libero vitae ligula tellus interdum aliquam sed pede. Elit dapibus hendrerit a metus tincidunt vel nibh quis ipsum justo. Ac elit volutpat auctor Fusce condimentum vitae congue. + + Lacinia convallis tellus tempor est Suspendisse orci convallis sociis lacinia Maecenas. Sagittis orci laoreet Vestibulum hac Duis dis elit justo consectetuer Vivamus. Suspendisse adipiscing nibh vitae ut auctor laoreet eleifend lacus ac nulla. Aliquam volutpat nisl vel laoreet lacinia et tempor pede penatibus gravida. Ligula ut lorem feugiat justo sit nulla lacus eros est in. Enim Nulla lorem id risus tempus Donec tincidunt In ac lorem. + + \subsection{Ukázky citací} + + + Parametry měniče napětí LM2567 zjistíte v jeho datasheetu \cite{lm2567}. Jak správ\-ně tento datasheet ocitovat, si přečtete v \cite{cit-jed} na straně 7. Další podrobnosti o~citační normě a vysvětlení použitého citačního stylu \texttt{czplain} najdete v \cite{bibtex:pysny}. Hodně informací o stylu \texttt{czplain} najdete také přímo ve zdrojovém soubouru stylu \textit{czplain.bst} přímo v adresáři této šablony. Další příkazy a informace o~systému \LaTeX{} najdete v knize \cite{rybitex}. + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \newpage % I závěr by měl podle možností začínat na nové stránce. + + + \section{Závěr} + + I pro závěr platí, že obvyklá délka je cca 1/2 -- 3/4 stránky, ale může mít i více. Neměl by mít podstatně méně. Píšete jej také až poté, co je hotový text práce. + + V závěru byste měli uvést: + \begin{itemize} + \item znovu cíle práce, ale na rozdíl od úvodu v minulém čase + \item jak bylo nebo nebylo těchto cílů dosaženo + \item důležité výsledky, ke kterým jste dospěli + \end{itemize} + + \url{https://www.seznam.cz} + + Nezapomeňte, že každý čte napřed anotaci, obsah, úvod a závěr. + Teprve když toto čtenáře zaujme, bude (možná) číst i vlastní text. + Toto platí i pro všechny Vaše budoucí práce. + (Samozřejmě se to netýká hodnotitelů.) + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + \newpage + \addcontentsline{toc}{section}{Literatura a další zdroje} + + \renewcommand{\refname}{Literatura a další zdroje} + %\printbibliography[type=book,title={Books only}] + %[type=book] + + \bibliographystyle{czplain} + %\bibliographystyle{unsrtcz} % viz text Přehled LaTeXu unsrt + \bibliography{literatura} + + \newpage % někdy je potřeba, aby správně vyšlo číslování stránky se seznamem obrázků v obsahu + + \addcontentsline{toc}{section}{Seznam obrázků} % přidá seznam obrázků do obsahu + + \listoffigures % seznam obrázků + + \newpage % někdy je potřeba, aby správně vyšlo číslování stránky se seznamem obrázků v obsahu + + \addcontentsline{toc}{section}{Seznam tabulek} % přidá seznam tabulek do obsahu + + \listoftables % seznam tabulek + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \newpage + + \section*{Další přílohy} + + \addcontentsline{toc}{section}{Další přílohy} % přidá tuto položku do obsahu + % zde budou další přílohy + + Například grafy, schémata a nebo obrázky na celou stránku. + + + +\end{document} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% tady si pište, co chcete, ve výsledku se to neobjeví + +%****************************************************** +1 pt = 0,35 mm + + + + + + + + + +