Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{exam}
- \usepackage{blindtext,xparse,listings,xcolor }
- \ExplSyntaxOn
- \keys_define:nn { diaa / answers }
- {
- d .dim_set:N = \l__diaa_answers_distance_dim,
- t .dim_set:N = \l__diaa_answers_thickness_dim,
- c .tl_set:N = \l__diaa_answers_color_tl,
- d .initial:n = 5mm,
- t .initial:n = 0.2pt,
- c .initial:n = .,
- }
- \NewDocumentCommand{\FillAnswerRules}{O{}}
- {
- \group_begin:
- \par
- \keys_set:nn { diaa / answers } { #1 }
- \leaders \hbox:n
- {
- \makebox[\textwidth][s]{
- \color{\l__diaa_answers_color_tl}
- \vrule width 0pt height \l__diaa_answers_distance_dim % the distance
- \leaders\hrule width \l__diaa_answers_thickness_dim\hfill
- }
- }\vfill
- \clearpage
- \group_end:
- }
- \ExplSyntaxOff
- \begin{document}
- \begin{questions}
- \question short question
- \FillAnswerRules
- \question \blindtext[3]
- \FillAnswerRules
- \end{questions}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement