diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.tex | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.tex new file mode 100644 index 00000000000..e13b8653f4c --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-369636.tex @@ -0,0 +1,46 @@ +% https://tex.stackexchange.com/q/369686/ +\documentclass[a4paper,11pt]{article} +\usepackage[top=2cm, bottom=3cm, left=4cm, right=4cm]{geometry} + +\usepackage[T1]{fontenc} +\usepackage{fourier} +\usepackage{tgpagella} +\usepackage[utf8]{inputenc} + +\usepackage{xsim,needspace,adjustbox,scrextend} + +\xsimsetup{ + exercise/the-counter = \arabic{exercise}. , + exercise/template = square +} + +\DeclareExerciseEnvironmentTemplate{square} + {% + \Needspace*{2\baselineskip}% + \addmargin[0pt]{.15\textwidth}% + \par\noindent + \adjustbox{ + fbox = 1pt 0pt, + lap = {\textwidth}, + valign = t, + set vsize = {0pt}{0pt} + }{\rule{0pt}{20pt}\hspace{20pt}}% + \textbf{\GetExerciseProperty{counter}} % + } + {\endaddmargin\vspace{\baselineskip}} + +\usepackage{lipsum} + +\begin{document} + +\noindent\hrulefill + +\begin{exercise} + \lipsum[1] +\end{exercise} + +\begin{exercise} + \lipsum[2] +\end{exercise} + +\end{document} |