Compare commits
2 Commits
master
...
okenkove_o
Author | SHA1 | Date |
---|---|---|
Pavel "LEdoian" Turinsky | 51145ce08f | 2 years ago |
Pavel "LEdoian" Turinsky | 41f08161d3 | 2 years ago |
2 changed files with 126 additions and 1 deletions
@ -0,0 +1,125 @@ |
|||
{% autoescape off %} |
|||
{% load static %} |
|||
{% load tex %} |
|||
\documentclass[11pt,a5paper,landscape]{article} |
|||
\usepackage[top=0cm,left=0cm]{geometry} |
|||
\usepackage[T1]{fontenc} |
|||
\usepackage[utf8]{inputenc} |
|||
\usepackage[czech]{babel} |
|||
\usepackage{graphicx} |
|||
\begin{document} |
|||
|
|||
% Nechceme číslování stránek |
|||
\pagenumbering{gobble} |
|||
|
|||
% Různé fonty na obálce |
|||
\def\adrfonta#1{% |
|||
\fontsize{14pt}{14.5pt}\selectfont \textbf{\textsf{#1}}%Časopis M&M |
|||
} |
|||
\def\adrfontb#1{% |
|||
\fontsize{12pt}{13pt}\selectfont \textbf{\textsf{#1}}%OPMK UK MFF |
|||
} |
|||
\def\adrfontc#1{% |
|||
\fontsize{12pt}{13pt}\selectfont \textsf{#1}%Adresa, telefon, e-mail |
|||
} |
|||
\def\tofont#1{% |
|||
\fontsize{16pt}{18pt}\selectfont #1%Adresa řešitele |
|||
} |
|||
|
|||
%Podtržítko je znak |
|||
\catcode`_=13 |
|||
\def_{$\_$} |
|||
|
|||
% Odsazení různých adres |
|||
\parindent=0pt |
|||
%\newdimen\fromskip |
|||
\newdimen\toskip |
|||
%\fromskip=4.35cm |
|||
\toskip=12cm |
|||
|
|||
% Předsunutí -- na PSČ |
|||
\def\predsunout#1{% |
|||
\setbox0=\hbox{#1\,}% |
|||
\hskip -\wd0\relax% |
|||
\box0 |
|||
} |
|||
|
|||
% Makro na TeXáni naší adresy |
|||
\def\adresaMaM{% |
|||
\hbox{\adrfonta{Časopis M\&M,}} |
|||
\vskip 3 pt |
|||
\hbox{\adrfontb{OPMK UK MFF}} |
|||
\vskip 3 pt |
|||
\hbox{\adrfontc{Ke Karlovu 3, 121 16 Praha 2}} |
|||
\hbox{\adrfontc{Tel.: +420 221 911 235}} |
|||
\hbox{\adrfontc{mam@matfyz.cz}} |
|||
} |
|||
|
|||
% Makro na TeXání adresátovy adresy |
|||
\def\adresat#1#2#3#4#5#6#7{% |
|||
\def\jmeno{#1}% |
|||
\def\prijm{#2}% |
|||
\def\skola{#3}% |
|||
%\def\popis{} |
|||
%\def\first{} |
|||
\def\ulice{#4}% |
|||
\def\PSC{#5}% |
|||
\def\mesto{#6}% |
|||
\def\stat{#7}% |
|||
|
|||
\hbox{\tofont{\jmeno\ \prijm}} |
|||
\vskip .2 em |
|||
\ifx \skola \empty |
|||
{} |
|||
\else |
|||
\hbox{\tofont{\skola}} |
|||
\fi |
|||
\vskip .2 em |
|||
\hbox{\tofont{\ulice}} |
|||
\vskip .2 em |
|||
\vskip .2 em |
|||
\hbox to 18pt{\tofont{\PSC\ \mesto}} |
|||
\vskip 5 pt |
|||
\tofont{\stat} |
|||
} |
|||
|
|||
% Tohle makro vysází samotnou obálku |
|||
\def\obalka#1#2#3#4#5#6#7{ |
|||
\hbox{} |
|||
% Horní a pravý okraj je zároveň okraj stránky, resetujeme odsazení |
|||
%\includegraphics[height=2cm]{lisak.pdf} |
|||
%\vbox{% |
|||
%\adresaMaM} |
|||
\vskip 5.5 cm % Od oka |
|||
\hskip\toskip minus \toskip% |
|||
\vbox{\adresat{#1}{#2}{#3}{#4}{#5}{#6}{#7}} |
|||
\vfill\eject |
|||
} |
|||
|
|||
|
|||
{% for r in resitele %} |
|||
{% with o=r.osoba %} |
|||
{% with s=r.skola %} |
|||
{% spaceless %} |
|||
{% if r.zasilat == "do_skoly" %} |
|||
{% if o.stat == "CZ" %} |
|||
\obalka{{o.jmeno|sloz}}{{o.prijmeni|sloz}}{{s.nazev|sloz}}{{s.ulice|sloz}}{{s.psc|sloz}}{{s.mesto|sloz}}{{''|sloz}} |
|||
{% else %} |
|||
\obalka{{o.jmeno|sloz}}{{o.prijmeni|sloz}}{{s.nazev|sloz}}{{s.ulice|sloz}}{{s.psc|sloz}}{{s.mesto|sloz}}{{o.stat.name|sloz}} |
|||
{% endif %} |
|||
|
|||
{% elif r.zasilat == "domu" %} |
|||
{% if o.stat == "CZ" %} |
|||
\obalka{{o.jmeno|sloz}}{{o.prijmeni|sloz}}{{''|sloz}}{{o.ulice|sloz}}{{o.psc|sloz}}{{o.mesto|sloz}}{{''|sloz}} |
|||
{% else %} |
|||
\obalka{{o.jmeno|sloz}}{{o.prijmeni|sloz}}{{''|sloz}}{{o.ulice|sloz}}{{o.psc|sloz}}{{o.mesto|sloz}}{{o.stat.name|sloz}} |
|||
{% endif %} |
|||
{% else %} |
|||
{% endif %} |
|||
{% endspaceless %} |
|||
{% endwith %} |
|||
{% endwith %} |
|||
{% endfor %} |
|||
\end{document} |
|||
|
|||
{% endautoescape %} |
Loading…
Reference in new issue