This commit is contained in:
Wojtek 2020-01-26 19:01:08 +00:00
commit c9f1f3fc19
25 changed files with 4353 additions and 0 deletions

7
.cookiecutter.yml Normal file
View File

@ -0,0 +1,7 @@
default_context:
thesis_type: 'msc'
thesis_surname: 'smolak'
thesis_author: 'Wojciech Smolak'
thesis_title: 'Wyszukiwanie pełnotekstowe w archiwalnych nagraniach audiowizualnych'
thesis_locale: 'pl_PL'
amu_id: 's333949'

154
.gitignore vendored Normal file
View File

@ -0,0 +1,154 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# pycharm configs
.idea
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
#Intellij
vcs.xml
# data generated by parser
/data
# autogenerated
/docs/source/reference/
# docs output
/docs/build/
# Caches
/.cache
# Emacs
\#*\#
.\#*
# JetBrains
.idea
# Temporary
*~
*.aux
*.nav
*.toc
*.log
*.out
*.blg
*.bbl
*.synctex.gz
*.fdb_latexmk
*.fls
*.prv
*.idx
*.lof
*.lot
*.brf
/auto
smolak.pdf
smolak.zip
autozoil.xml
stats.txt
abstract.txt

64
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,64 @@
pipeline {
agent { label 'tau2013z' }
stages {
stage ('get-autozoil') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'autozoil']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://gitlab.com/filipg/autozoil.git']]])
}
}
stage ('build-pdf') {
steps {
sh """
bash build.sh
"""
}
post {
always {
archiveArtifacts artifacts: 'smolak.pdf', fingerprint: true
archiveArtifacts artifacts: 'stats.txt', fingerprint: true
plot csvFileName: 'stats.txt',
csvSeries: [[
file: 'stats.txt',
exclusionValues: '',
displayTableFlag: false,
inclusionFlag: 'OFF',
url: '']],
group: 'Plot Group',
title: 'Plot Title',
style: 'line',
exclZero: false,
keepRecords: false,
logarithmic: false,
numBuilds: '',
useDescr: false,
yaxis: '',
yaxisMaximum: '',
yaxisMinimum: ''
}
}
}
stage ('autozoil') {
steps {
sh """
AUTOZOIL_DIR=autozoil bash check.sh
"""
}
post {
always {
archiveArtifacts artifacts: 'autozoil.xml', fingerprint: true
junit 'autozoil.xml'
}
}
}
}
}

43
Makefile Normal file
View File

@ -0,0 +1,43 @@
SHELL=/bin/bash
THESIS_ID=smolak
all: $(THESIS_ID).pdf stats.txt
source-pack: $(THESIS_ID).zip
CONTENT_TEX_SOURCES=$(filter-out $(THESIS_ID).tex metadata.tex preamble.tex, $(wildcard *.tex))
CURRENT_DIR=$(shell pwd)
AUTOZOIL_DIR?=/opt/autozoil
AUTOZOIL_LOCALE=pl_PL
CONTENT_TEX_SOURCES_WITH_DIR := $(addprefix $(CURRENT_DIR)/, $(CONTENT_TEX_SOURCES))
SCOREFILES=$(shell perl extract-score-files.pl $(CONTENT_TEX_SOURCES))
clean_latex_stuff=rm -rf *.aux *.nav *.toc *.log *.out *.blg *.bbl autozoil.xml $(THESIS_ID).pdf $(THESIS_ID).zip
stats.txt: $(THESIS_ID).pdf helpers/stats.sh
bash helpers/stats.sh $< > $@
cat $@
$(THESIS_ID).pdf: $(THESIS_ID).tex preamble.tex metadata.tex $(CONTENT_TEX_SOURCES) bibliography.bib $(SCOREFILES)
pdflatex -halt-on-error $<
bibtex $(THESIS_ID)
pdflatex -halt-on-error $<
pdflatex -halt-on-error $<
scores/%.txt:
mkdir -p scores
curl "https://gonito.net/api/txt/score/"$* -o $@
autozoil.xml: $(CONTENT_TEX_SOURCES)
cd $(AUTOZOIL_DIR) && set -o pipefail && ./autozoil --locale $(AUTOZOIL_LOCALE) $(CONTENT_TEX_SOURCES_WITH_DIR) --format xml --alt-log-file $(CURRENT_DIR)/$(THESIS_ID).log > $(CURRENT_DIR)/autozoil.xml
$(THESIS_ID).zip:
$(clean_latex_stuff)
rm -rf *~
zip -r $@ . -x '*.git*' '*.zip'
clean:
$(clean_latex_stuff)

1
README.md Normal file
View File

@ -0,0 +1 @@
Master's thesis

17
appendix.tex Normal file
View File

@ -0,0 +1,17 @@
%
% Załączniki (opcjonalnie):
\appendix
\chapter{Tytuł załącznika jeden}
Treść załącznika jeden. Treść załącznika jeden. Treść załącznika jeden
Treść załącznika jeden. Treść załącznika jeden.
Treść załącznika
jeden\index{żółw}\index{źdźbło}\index{zebra}.
\chapter{Tytuł załącznika dwa}
Treść załącznika dwa. Treść załącznika dwa. Treść załącznika dwa
Treść załącznika dwa. Treść załącznika dwa.
Treść załącznika dwa\index{system XML}.

3
autozoil-via-docker.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker run -v $(pwd):/link -it loxygen/autozoil /opt/autozoil/autozoil --locale en_US /link/main.tex --alt-log-file /link/smolak.log

1153
bibliography.bib Normal file

File diff suppressed because it is too large Load Diff

3
build.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash -xe
make

3
check.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash -xe
make autozoil.xml

20
extract-score-files.pl Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/perl
use strict;
my %found = ();
for my $filepath (@ARGV) {
open(my $ih, '<', $filepath);
binmode($ih, ':utf8');
while (my $line=<$ih>) {
while ($line =~ m<\\gonito(?:barescore|score|entry)\{([^\}]+)\}>g) {
$found{$1} = 1;
}
}
close($ih);
}
print join(" ", map { "scores/${_}.txt" } sort keys %found);

48
helpers/fixidx.sed Normal file
View File

@ -0,0 +1,48 @@
#
# Autor: Rafał Nowak (www.rafalnowak.pl)
# Data : 22.03.2009
#
# Poniższy plik zawiera skrypt dla programu sed.
# Służy on do zamiany pewnych instrukcji wygenerowanych
# przez program LaTeX'a na polskie znaki krytyczne
# kodowane zgodnie ze standarderm ISO-8859-2, tzw. Latin2.
#
# Skrypt ten ma zastosowanie przy tworzeniu polskiego
# skorowidza dla dokumentów składanych przez LaTeX'a,
# gdzie pliki źródłowe (*.tex) są kodowane w standardzie
# unicode UTF-8.
#
# Przykładowe użycie:
# > latex dokument.tex
# > sed -f skrypt.sed dokument.idx | ./plmindex -L PL-latin2 | iconv --from-code=ISO-8859-2 --to-code=UTF-8 > dokument.ind
# > latex dokument.tex
#
# W powyższym przykładzie:
# skrypt.sed - jest nazwą tego pliku (skryptu dla sed'a)
# plmindex - to program przygotowany przez Włodzimierza
# Macewicza to prawidłowego sortowania
# słów w celu utworzenia skorowidza
# iconv - to program który konwertuje otrzymany
# indeks z powrotem do kodowania UTF-8
# W wyniku otrzymujemy plik dokument.ind zgodny z UTF-8
# i prawidłowo posortowanymi słowami.
#
s/\\IeC\ {\\k\ a}/ą/g
s/\\IeC\ {\\k\ A}/Ą/g
s/\\IeC\ {\\k\ e}/ę/g
s/\\IeC\ {\\k\ E}/Ę/g
s/\\IeC\ {\\'c}/ć/g
s/\\IeC\ {\\'C}/Ć/g
s/\\IeC\ {\\l\ }/ł/g
s/\\IeC\ {\\L\ }/Ł/g
s/\\IeC\ {\\'n}/ń/g
s/\\IeC\ {\\'N}/Ń/g
s/\\IeC\ {\\'o}/ó/g
s/\\IeC\ {\\'O}/Ó/g
s/\\IeC\ {\\'s}/ś/g
s/\\IeC\ {\\'S}/Ś/g
s/\\IeC\ {\\'z}/ź/g
s/\\IeC\ {\\'Z}/Ź/g
s/\\IeC\ {\\\.z}/ż/g
s/\\IeC\ {\\\.Z}/Ż/g
s/\\nobreakspace\ \ {}/~/g

3
helpers/pdf-to-plain-text.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
pdftotext "$1" - | grep '[^[:space:]]' | egrep '[a-zA-Z]{2}' | perl -pne 's/\f//g;'

17
helpers/stats.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
here_dir=$(dirname "$0")
pdf_file="$1"
if [[ "$pdf_file" == "" ]]
then
>&2 echo "no file given"
exit 1
fi
perl -e 'print "PHYSICAL PAGES\tCHARACTERS WITH SPACES\tSTANDARD PAGES\n"'
pages=$(pdfinfo "$1" | perl -ne 'print "$1\n" if /Pages:\s+(\d+)/')
chars=$(bash $here_dir/pdf-to-plain-text.sh "$1" | wc -m)
spages=$(echo "scale=1; $chars / 1800.0" | bc)
echo "$pages $chars $spages"

24
helpers/synchro.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash -xe
. helpers/vars
if [[ "$OVERLEAF_GIT_URL" == "" ]]
then
>&2 echo "Please set OVERLEAF_GIT_URL in `helpers/vars`"
exit 1
fi
if [[ -e .git && ! -z "$(git status --untracked-files=no --porcelain)" ]]; then
>&2 echo "Uncommited changes, commit your changes first"
exit 1
fi
git remote add overleaf "$OVERLEAF_GIT_URL" || git remote set-url overleaf "$OVERLEAF_GIT_URL"
git config credential.helper "cache --timeout=10000000"
git pull origin master
git pull overleaf master
git push overleaf master
git push origin master

2
helpers/vars Normal file
View File

@ -0,0 +1,2 @@
# to be included with .
OVERLEAF_GIT_URL=

4
install-hooks.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash -xe
cp hooks/pre-push .git/hooks/pre-push
chmod 700 .git/hooks/pre-push

59
main.tex Normal file
View File

@ -0,0 +1,59 @@
%
% Wstęp
\introduction
Aczkolwiek w~ciągu ostatnich lat skład tekstu wspomagany
komputerowo całkowicie wyeliminował stosowanie tradycyjnych technik
drukarskich, to podobny \code{Gimmel\dbr ::Parser\dbr::ElementSpecification}, proces w~przypadku publikacji elektronicznych
czyli publikacji, które w~ogóle nie wykorzystują papieru, a~nośnikem
informacji staje się ekran komputera nie jest obserwowany.
Formatowanie wizualne, powstało z~myślą o~przygotowaniu publikacji do
druku i~dlatego nie może sprostać nowym potrzebom, które stwarza
postęp techniki. Coraz większą rolę odgrywają dziś elektroniczne
repozytoria, bazy danych, publikacje na CD-Romach oraz WWW. Wypływa
też stąd ważny wniosek, że tworzenie dokumentów według paradygmatu
WYSIWYG nie jest efektywne i~stopniowo należy oczekiwać powstawania,
wdrażania i~rozpowszechniania się systemów opartych na paradygmacie
\emph{formatowania strukturalnego}.
W~dokumencie formatowanym strukturalnie oznaczana jest struktura
dokumentu a~nie określany jego wygląd. Zwróćmy uwagę, że układ
graficzny jest pochodną struktury, tj. nadajemy jednolity wygląd
tytułom rozdziałów, śródtytułów, przypisów, jednakowo wyróżniamy
wyliczenia itp. Układ graficzny jak już wspominano może ulegać zmianie
(np. wraz z~rozpowszechnianiem się nowych technologii wydawniczych)
ale treść i~struktura raczej nie, np. Biblia Gutenberga widziana z~tej
perspektywy nie zmieniła się wcale.
% Na końcu tytułów, śródtytułów, tytułów rysunków i tabel
% _nie_ umieszcza się kropki
\chapter{Wprowadzenie do standardów SGML/XML}
\code{<student id="10">}
\\\\
\code{//BBB[normalize-space(text()) = "czwarty"]}
SGML~\cite{Goldfarb} jest to \emph{metajęzyk} służący do opisywania
struktury i~zawartości dokumentów (standard ISO 8879). Do
podstawowych zalet takiego podejścia należy:
\begin{itemize}
\item
jest to międzynarodowy
standard dostępny na wielu platformach sprzętowo{\dywiz}systemowych;
\item
jest to
język opisu \emph{każdego\/} dokumentu, o~praktycznie nieograniczonych
możliwościach (\emph{rozszerzalność\/})
\item
umożliwia powtórne
wykorzystywanie dokumentów, także w sposób inny od poprzedniego
(np. tradycyjna książka i~dokument multimedialny utworzony z~tego
samego dokumentu SGML-owego).
\end{itemize}
\lstset{emph={square},emphstyle=\color{red}}
\begin{lstlisting}
square
\end{lstlisting}

27
metadata.tex Normal file
View File

@ -0,0 +1,27 @@
% Opcjonalnie identyfikator dokumentu (drukowany tylko z włączoną opcją `brudnopis'):
\nrwersji {0.1}
% Dane autora(ów):
\author {Walenty Szczęsny}
\nralbumu {rr000000001}
\email {walenty@szczesny.com.pl}
\author {Monika A.~Szczęsna-Woś}
\nralbumu {rr000000002}
% Tytuł pracy:
\title {Dokumenty strukturalne: teoria i~zastosowania}
% Kierunek, tj. katedra/instytut promotora:
\kierunek {Informatyka Ekonomiczna}
% Rok obrony:
\date {2001}
% Jeżeli nie podano miejsca zostanie wpisany `Sopot'
\miejsce {Wejherowo}
% Tytuł naukowy, imię i nazwisko promotora:
\opiekun {dra hab. Jan Kowalski}

1106
papalike.bst Normal file

File diff suppressed because it is too large Load Diff

1099
plain-pl.bst Normal file

File diff suppressed because it is too large Load Diff

5
preamble.tex Normal file
View File

@ -0,0 +1,5 @@
%
% Miejsce na deklaracje własnych poleceń:
\newcommand{\filename}[1]{\texttt{#1}}

64
smolak.tex Normal file
View File

@ -0,0 +1,64 @@
\documentclass[skorowidz,autorrok,backref,xodstep]{wmimgr}
\usepackage{listings}
\usepackage{color}
\usepackage{alltt}
\usepackage{floatrow}
\usepackage{hyphenat}
\usepackage{url}
\newcommand\dbr{\discretionary{}{}{}}
\input{preamble}
\input{metadata}
% Cytowanie przez numer (standard):
%\bibliographystyle{plain}
%
% Jeżeli cytowanie autor-rok to np.:
\bibliographystyle{papalike}
%
% Inne sposoby
%\bibliographystyle{abbrv} %% standard
%\bibliographystyle{acm} %% ACM transactions...
%\bibliographystyle{elsart-harv} %% dziwaczny %%
%%% zakomentuj \iffalse ... \fi (ostatnie, zaznaczone //pdfscreen) jeżeli chcesz włączyć pakiet pdfscreen:
\def\SITI{SI/TI} %%%
\def\ISTI{SI/TI} %%%
\def\UTAUT{UTAUT} %%%
\begin{document}
%%
\nocite{beebe,p.perl} %% dołącza niecytowane
%%\nocite{*} %% ** dołącza wszystko **
% Tytuł/spis treści
\maketitle
\input{main}
\input{appendix}
%\include bib.tex
\bibliography{bibliography}
%
% Spis tabel (jeżeli jest potrzebny):
\listoftables
%
% Spis rysunków (jeżeli jest potrzebny):
\listoffigures
%
% Skorowidz (opcjonalnie)
\printindex
\end{document}

BIN
uam.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

427
wmimgr.cls Normal file
View File

@ -0,0 +1,427 @@
% Klasa dokument\'ow do sk{\l}adu prac magisterskich/licencjackich
% na wydziale Matematyki i Informatyki UAM
% Klasę oparto na analogicznej klasie stworzonej Wydziale
% Zarz\k{a}dzania Uniwersytetu Gda\'nskiego (wersja 1.10):
% http://gnu.univ.gda.pl/~tomasz/prog/tex/wzmgr/wzmgr.html
% Ta klasa była z kolei oparta na klasie opracowanej
% przez Marcina Woli\'nskiego.
\def\ThisClassVersionId{v1.0}
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{wmimgr}[2009/06/19 \ThisClassVersionId, Praca magisterska]
\def\@baseclass{report}
\def\@rodzajpracy{magisterska}
\def\@BInterlinia{\relax}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\@baseclass}}
\PassOptionsToClass{a4paper,openany,11pt}{\@baseclass}
%
\newif\if@wmimgrauthoryear
\DeclareOption{autorrok}{\@wmimgrauthoryeartrue}
\newif\if@wmimgrbackref \DeclareOption{backref}{\@wmimgrbackreftrue}
\newif\if@oswiadczenie \DeclareOption{oswiadczenie}{\@oswiadczenietrue}
\DeclareOption{licencjacka}{\def\@rodzajpracy{licencjacka}}
\DeclareOption{skorowidz}{\input{makeidx.sty}\makeindex}
\DeclareOption{palatino}{\input{tgpagella.sty}}
\DeclareOption{tgpagella}{\input{tgpagella.sty}}
\DeclareOption{twoside}{\PassOptionsToClass{twoside}{\@baseclass}}
% opcja `brudnopis' jest poprawiona -- teraz wykorzystuje pakiet `prelim2e'
\DeclareOption{brudnopis}{\AtEndOfClass{\input{prelim2e.sty}%
\renewcommand{\PrelimWords}{\ThisDocVersionId}\linespread{1.0}}}
\DeclareOption{xodstep}{\AtEndOfClass{\linespread{1.3}}}
\ProcessOptions
%
\LoadClass{\@baseclass}
%
\usepackage{graphicx}
\usepackage{polski}
\usepackage[utf8]{inputenc}
%%
\if@wmimgrbackref
\usepackage[breaklinks,pagebackref]{hyperref}\else
\usepackage[breaklinks]{hyperref} \fi
\if@wmimgrauthoryear
\typeout{*** Cytowanie autor-rok ***}\RequirePackage[numbers]{natbib}\fi
%
%
\textwidth\paperwidth
\advance\textwidth -55mm
\oddsidemargin-1in
\advance\oddsidemargin 30mm
\evensidemargin-1in
\advance\evensidemargin 25mm
\topmargin -1in
\advance\topmargin 25mm
\setlength\textheight{48\baselineskip}
\addtolength\textheight{\topskip}
\marginparwidth15mm
%
\widowpenalty999999
\tolerance450
\pretolerance250
\hfuzz=1.5pt
\hbadness1450
%
\def\AndNextAuthor{\ifnum\language=0\& \else i \fi}
\newcount\authornumber
\authornumber=0
%
\def\author#1{%
\global\advance\authornumber\@ne
\expandafter\def\csname theauthor\number\authornumber\endcsname
{\ignorespaces#1\unskip}%
\expandafter\def\csname theauthorid\number\authornumber
\endcsname{???\ClassError{wmimgr}{Brak numeru albumu}\@ehc}%
\expandafter\let\csname thenetaddress\number\authornumber\endcsname\relax }
%
\def\nralbumu#1{%
\expandafter\def\csname theauthorid\number\authornumber\endcsname
{\ignorespaces#1\unskip}}
\def\email#1{% -- opcjonalny --
\expandafter\def\csname thenetaddress\number\authornumber\endcsname
{\ignorespaces#1\unskip}}
%%\def\authorlist#1{\def\@author{#1}}
\def\@author{\@defaultauthorlist}
\def\@subtitle{}
\def\@logo{}
\newcount\count@@
\def\@defaultauthorlist{%
\count@=\authornumber
\count@@=0
\loop
\ifnum\count@>0
\advance\count@@ by 1
\begingroup \Large\bf
\ignorespaces\csname theauthor\number\count@@\endcsname\par
\normalsize \rm nr~albumu:
\ignorespaces\csname theauthorid\number\count@@\endcsname\par
% adres email nie jest drukowany -- ale si{\e} przyda
%%\ignorespaces\csname thenetaddress\number\count@@\endcsname
\par
\medskip \endgroup
\advance\count@ by -1
\repeat
}
% <<
\def\UniversityName#1{\def\Univ@Name{#1}}
\def\Univ@Name{UNIWERSYTET IM. ADAMA MICKIEWICZA \\ WYDZIA\L{}
MATEMATYKI I INFORMATYKI}%
% <<
\renewcommand\maketitle{%
\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
\let \footnote \thanks
\begin{center}%
{\large \textbf{\Univ@Name}\par}
\par
\@logo
\end{center}%
\vspace{1cm plus 1fill}
\begin{flushleft}%
{\@author\par}
\end{flushleft}%
\vspace{8mm plus 1mm minus 2mm}
\begin{center}%
{\huge\textbf{\@title}\par}
\vspace{0.5cm}
{\LARGE\textit{\@subtitle}\par}
\vspace{2cm plus 1.5fill}
\begin{flushright}\large
\begin{tabular}{l}
Praca \@rodzajpracy{} na kierunku:\\[3pt]
\MakeUppercase{\@kierunek}\\[3pt]
Promotor: \\[3pt]
\bfseries \@opiekun
\end{tabular}
\end{flushright}
\vspace{15mm plus .1fill}
{\large \@miejsce\space \@date\par}
\end{center}
\@thanks
\end{titlepage}%
%
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\title\relax
\global\let\@subtitle\@empty
\global\let\subtitle\relax
\global\let\logo\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
%
% Jezeli podano slowa kluczowe wydrukuj
\clearpage
\if@oswiadczenie\oswiadczenie\fi
\thispagestyle{empty}
\ifvoid\abspagebox \@latex@warning{*** Nie podano streszczenia ***}%
\else \InsertAbstractHere \fi
\ifx\@keywords\EmptyKwsList \@latex@warning{*** Nie podano slow kluczowych ***}%
\else \section*{S{\l}owa kluczowe}
\@keywords
\fi
\cleardoublepage %%
\tableofcontents
%\listoftables
%\listoffigures
} %% --renewcommand: maketitle --
%%\def\nralbumu#1{\gdef\@nralbumu{#1}}
%%\def\@nralbumu{???\ClassError{wmimgr}{Brak numeru albumu}\@ehc}
\def\title#1{\gdef\@title{#1}\gdef\thetitle{#1}}
\def\subtitle#1{\gdef\@subtitle{#1}}
\def\logo#1{\gdef\@logo{#1}}
\def\kierunek#1{\gdef\@kierunek{#1}}
\def\@kierunek{???\ClassError{wmimgr}{Nie podano kierunku studiow}\@ehc}
\def\opiekun#1{\gdef\@opiekun{#1}}
\def\@opiekun{???\ClassError{wmimgr}{Brak danych opiekuna pracy}\@ehc}
\def\miejsce#1{\gdef\@miejsce{#1}}
\def\@miejsce{Sopot}
%
\def\keywords#1{\gdef\@keywords{#1}}
% slowa kluczowe sa opcjonalne:
%%\def\@keywords{???\ClassError{wmimgr}{Brak slow kluczowych}\@ehc}
\def\@keywords{????}
\def\EmptyKwsList{????}
%%
\def\klasyfikacja#1{\gdef\@klasyfikacja{#1}}
\def\@klasyfikacja{???\ClassError{wmimgr}{Brak klasyfikacji
tematycznej}\@ehc}
%
\newbox \abspagebox %% *tp **
\def\InsertAbstractHere{\unvbox \abspagebox}
%
\renewenvironment{abstract}{\global
\setbox \abspagebox \vbox \bgroup
\section*{Streszczenie} }
{\egroup}
%
\renewcommand*\@seccntformat[1]{\csname the#1\endcsname.\enspace}
\def\numberline#1{\hb@xt@\@tempdima{#1.\hfil}}
\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1.0em \@plus\p@
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode \bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
#1\nobreak\mdseries
\leaders\hbox{$\m@th
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
mu$}\hfill
\nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\fi}
%
\def\@makechapterhead#1{%
%\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\normalsize \bfseries \MakeUppercase{\@chapapp}\space \thechapter
\par\nobreak
\vskip\baselineskip
\fi
\interlinepenalty\@M
\LARGE \bfseries #1\par\nobreak
\vskip 40\p@
}}
%
\def\@makeschapterhead#1{%
%\vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\LARGE \bfseries #1\par\nobreak
\vskip 40\p@
}}
%
\renewcommand{\section}{\@startsection{section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\reset@font\Large\bfseries\raggedright}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\reset@font\large\bfseries\raggedright}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\reset@font\normalsize\bfseries\raggedright}}
\renewcommand{\paragraph}{???\ClassError{wmimgr}{Zbyt duzo srodtytulow}\@ehc}%
%
% Skorowidz: dodanie kresek w pozycjach skorowidza stopnia drugiego
\renewenvironment{theindex}{%
\clearpage \refstepcounter{chapter}% potrzebne do prawid{\l}owego
% dzia{\l}ania zak{\l}adek w dokumencie PDF
\columnseprule \z@ \columnsep 35\p@
\twocolumn[\@makeschapterhead{\indexname}]%
\@mkboth{\indexname}{\indexname}%
\addcontentsline{toc}{chapter}{\indexname}%
\thispagestyle{plain}\parindent\z@
\parskip\z@ \@plus .3\p@\relax
\let\item\@idxitem }
{\clearpage }
\def\indexemdashes{%
\def\@idxitem{\par\hangindent 0pt}
\def\subitem{\par\hangindent 0pt --- }
\def\subsubitem{\par\hangindent 0pt --- --- }
\def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax}}
\indexemdashes
%
% Wprowadzenie/zako\'nczenie
\newcommand{\introduction}{%\doublepage
\chapter*{\IntroName\@mkboth{\IntroName}{\IntroName}}%
\addcontentsline{toc}{chapter}{\IntroName}}
%
\newcommand{\summary}{%\doublepage
\chapter*{\SummaryName\@mkboth{\SummaryName}{\SummaryName}}%
\addcontentsline{toc}{chapter}{\SummaryName}}
% O\'swiadczenie (dodane 7.4.2005)
\def\oswiadczenieText{%
\par
Ja, ni\.zej podpisany {\csname theauthor1\endcsname}, student
Wydzia{\l}u Matematyki i~Informatyki Uniwersytetu im.~Adama Mickiewicza
w~Poznaniu, o\'swiadczam, \.ze przedk{\l}adan\k{a} prac\k{e} dyplomow\k{a}~
pt.~{\emph{\let\\=\relax\thetitle}\/} napisa{\l}em samodzielnie. Oznacza to,
\.ze przy pisaniu pracy, poza niezb\k{e}dnymi konsultacjami, nie korzysta{\l}em
z~pomocy innych os\'ob, a~w~szczeg\'olno\'sci nie zleca{\l}em opracowania
rozprawy lub jej cz\k{e}\'sci innym osobom ani nie odpisywa{\l}em tej rozprawy
lub jej cz\k{e}\'sci od innych os\'ob.\par
O\'swiadczam r\'ownie\.z, \.ze egzemplarz pracy dyplomowej w~formie wydruku
komputerowego jest zgodny z~egzemplarzem pracy dyplomowej w~formie
elektronicznej.\par
Jednocze\'snie przyjmuj\k{e} do wiadomo\'sci, \.ze gdyby powy\.zsze
o\'swiadczenie okaza{\l}o si\k{e} nieprawdziwe, decyzja o~wydaniu mi dyplomu
zostanie cofni\k{e}ta.\endgraf }
%
\long\def\oswiadczenie{%%\newpage
\if@twocolumn \onecolumn \fi
%%\centerline{\large\textbf{O\'swiadczenie}}
%%\vspace*{50mm}
\chapter*{O\'swiadczenie}%
\addcontentsline{toc}{chapter}{O\'swiadczenie}%
%\hbox to.8\textwidth{\hbox to45mm{\dotfill}\hss
\thispagestyle{empty}
\vskip6mm
\begin{flushright}\large
Pozna\'n, dnia \hbox to40mm{\dotfill}
\end{flushright}
\par
\vskip12mm
\noindent
\oswiadczenieText
\par\vskip20mm
\centerline{\vbox{%
\hbox to.8\textwidth{\hbox to50mm{}\hss
\hbox to50mm{\dotfill}}
\hbox to.83\textwidth{\hbox to60mm{}\hss
\hbox to60mm{\hss podpis\hss}}%
}}\par
\newpage }
%
% Polecenia listoffigures/listoftables uproszczono oraz
% dodano \addcontentsline, tak aby tytu{\l} spisu pojawi{\l}
% si\k{e} w spisie tre\'sci i zak\ladkach w pliku PDF:
\renewcommand\listoffigures{%
\chapter*{\listfigurename
\@mkboth{\MakeUppercase\listfigurename}%
{\MakeUppercase\listfigurename}}%
\addcontentsline{toc}{chapter}{\listfigurename}
\@starttoc{lof}}
%
\renewcommand\listoftables{%
\chapter*{\listtablename
\@mkboth{%
\MakeUppercase\listtablename}{\MakeUppercase\listtablename}}%
\@starttoc{lot}%
\addcontentsline{toc}{chapter}{\listtablename}}
%
\renewenvironment{thebibliography}[1]
{\chapter*{\bibname}%
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
\addcontentsline{toc}{chapter}{\bibname}%<--
\list{%%
\@biblabel{\@arabic\c@enumiv}}%\fi}%
{%%
\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
% Uproszczono polecenie \@makecaption, tak \.ze podpisy s\k{a}
% teraz sk{\l}adane od lewego marginesu.
% Dodano polecenie \source do sk{\l}adania \'xr\'od{\l}a
\long\def\@makecaption#1#2{\par
\vskip\abovecaptionskip
\begin{flushleft}\small\textbf{#1}. #2\end{flushleft}
%\vskip\belowcaptionskip % niepotrzebne bo po caption
%winno by\'c \'xr\'od{\l}o
\par
}
\def\source#1{\par \begin{flushleft}\small
\SourceName:~#1\end{flushleft}}
%
% Oznakowanie wersji dokumentu na ka\.zdej stronie w postaci
% adresu e-mail pierwszego autora (je\.zeli jest zdefiniowany) lub imienia
% i nazwiska pierwszego autora + tego co autor wpisa{\l} jako
% argument polecenia \nrwersji + bie{\.z}\k{a}ca data.
\def\nrwersji#1{\def\ThisDocVersion{#1}}\nrwersji{????}%
\def\ThisDocVersionId{%
\expandafter \ifx \csname theauthor1 \endcsname \undefined
\else \csname theauthor1\endcsname \fi
%% adres moze zawierac nie-litery (np `_' powoduje blad), pomijam
%\expandafter \ifx \csname thenetaddress1\endcsname \undefined
%\else \csname thenetaddress1\endcsname \fi
\space --\space wersja \ThisDocVersion\space z\space
\number\day/\number\month/\number\year~r. }
%
\def\IntroName{Wprowadzenie}
\def\SummaryName{Zako\'nczenie}
\def\SourceName{\'Zr\'od{\l}o}
\newcommand{\eng}[1]{(ang.~\emph{#1})}
\newcommand{\english}[1]{\textit{#1}}
\newcommand{\turkish}[1]{\textit{#1}}
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\noqa}[1]{}
\usepackage{hyperref}
\usepackage{xstring}
% Format a reference to a Gonito submission
\newcommand{\gonitoref}[1]{\{\href{https://gonito.net/q/#1}{\StrMid{#1}{1}{6}}\}}
% A bare score from Gonito
\newcommand{\gonitobarescore}[1]{\minput{scores/#1.txt}}
% A score from Gonito along with a reference
\newcommand{\gonitoscore}[1]{\gonitobarescore{#1} \gonitoref{#1}}
% A reference and a score as two cells in a table
\newcommand{\gonitoentry}[1]{\gonitoref{#1} & \minput{scores/#1.txt}}
%
\endinput