Last active
October 4, 2016 12:34
-
-
Save khardix/cad7975fc98d44a2b4ba6c350875dad7 to your computer and use it in GitHub Desktop.
Template for TIN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Configuration file for latexmk, automation script for LaTeX builds | |
# Use xelatex by default | |
$pdf_mode = 1; $postscript_mode = $dvi_mode = 0; | |
$pdflatex = "lualatex %O %S"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: all clean | |
all: tin.pdf | |
%.pdf: %.tex | |
latexmk $< | |
clean: | |
latexmk -C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%!TeX program = LuaLaTeX | |
%!TeX encoding = UTF-8 | |
\documentclass[paper=A4,fontsize=11pt,pagesize=auto,DIV=12]{scrartcl} | |
\usepackage{polyglossia,fontspec,unicode-math,enumerate,exsheets,tikz} | |
\setdefaultlanguage{czech} | |
\defaultfontfeatures{Ligatures=TeX} | |
\setromanfont{Libertinus Serif} | |
\setsansfont{Libertinus Sans} | |
\setmonofont[Scale=MatchLowercase]{Inconsolata} | |
\setmathfont{Libertinus Math} | |
\setkomafont{disposition}{\rmfamily\scshape\bfseries} | |
% %%% Exsheet styling %%% | |
\DeclareInstance{exsheets-heading}{tin-question}{default}{ | |
indent-first = false, | |
vscale = 1.5, | |
pre-code = \rule{\linewidth}{0.5pt}, | |
post-code = \rule{\linewidth}{0.5pt}, | |
title-format = \large\scshape , | |
number-format = \large\bfseries , | |
join = { number[r,B]title[l,B](.3em,0pt) }, | |
attach = { main[hc,vc]number[hc,vc](0pt,0pt) }, | |
} | |
\DeclareInstance{exsheets-heading}{tin-solution}{default}{ | |
runin = true, | |
title-post-code = :\space, | |
title-format = \itshape, | |
join = { main[r,vc]title[r,vc](0pt,0pt) }, | |
} | |
\SetupExSheets[question]{headings=tin-question,name=Úkol} | |
\SetupExSheets[solution]{headings=tin-solution,print=true,name=Řešení} | |
\usetikzlibrary{arrows.meta,automata,positioning} | |
\title{TIN Specimen} | |
\author{Bc.\,Jan Staněk -- \texttt{[email protected]}} | |
\date{\today} | |
\begin{document} | |
\maketitle | |
\begin{question} | |
První TIN otázka, přepsaná. | |
\end{question} | |
\begin{solution} | |
Řešení první otázky, verbatim. | |
\begin{center} | |
\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto,>=stealth] | |
\node[state,initial] (q0) {$q_0$}; | |
\node[state] (q1) [above right=of q0] {$q_1$}; | |
\node[state] (q2) [below right=of q0] {$q_2$}; | |
\node[state,accepting] (q3) [below right=of q1] {$q_3$}; | |
\path[->] (q0) edge node {0} (q1) | |
edge node [swap] {1} (q2) | |
(q1) edge node {1} (q3) | |
edge [loop above] node {0} () | |
(q2) edge node [swap] {0} (q3) | |
edge [loop below] node {1} (); | |
\end{tikzpicture} | |
\end{center} | |
\end{solution} | |
\hrule | |
\end{document} | |
% vim:set spelllang=cs:set spell: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment