diff options
Diffstat (limited to 'macros/latex/contrib/abspos/demo.tex')
-rw-r--r-- | macros/latex/contrib/abspos/demo.tex | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/macros/latex/contrib/abspos/demo.tex b/macros/latex/contrib/abspos/demo.tex new file mode 100644 index 0000000000..ba2b7ab867 --- /dev/null +++ b/macros/latex/contrib/abspos/demo.tex @@ -0,0 +1,67 @@ +\documentclass{beamer} +\usefonttheme{serif} +\beamertemplatenavigationsymbolsempty + +\usepackage{xcoffins} +\usepackage{abspos} +\usepackage{ragged2e} +\usepackage{lipsum} +\usepackage{tikz} +\usepackage{newfile} + +\newoutputstream{io} + +\ExplSyntaxOn + +\cs_generate_variant:Nn \tl_replace_all:Nnn { Nxx } + +\NewDocumentCommand \ExampleFrame { m +v } { + + \tl_set:Nn \l_tmpa_tl {#2} + \tl_replace_all:Nxx \l_tmpa_tl { \iow_char:N \^^M } { \iow_char:N \^^J } + \regex_replace_once:nnN { ^\v* } { } \l_tmpa_tl + + \openoutputfile{demo#1.tex}{io} + \addtostream{io}{\l_tmpa_tl} + \closeoutputstream{io} + + \frame{\input{demo#1}} + +} + +\ExplSyntaxOff + +\begin{document} + +\ExampleFrame{1}{ +% In preamble: +% \usepackage{tikz} +\absput{\tikz{ + \draw[line width=8pt, lightgray] circle[radius=3.25]; +}} +\absput[angle=10, scale=5]{Hello!} +\absput[pg-b, y=.5cm]{\thepage} +} + +\ExampleFrame{2}{ +% In preamble: +% \usepackage{ragged2e} +% \usepackage{lipsum} +\absput[width=8cm]{ + \justifying + \lipsum[1][1-5] % Example text +} +} + +\ExampleFrame{3}{ +\absposset{scale=5} +\absput{Scaled!} +} + +\begin{frame} +\NewCoffin \MyCoffin +\SetHorizontalCoffin \MyCoffin {My Coffin} +\absputcoffin[scale=2] \MyCoffin +\end{frame} + +\end{document} |