diff options
Diffstat (limited to 'macros/latex/contrib/clicks/clicks.sty')
-rw-r--r-- | macros/latex/contrib/clicks/clicks.sty | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/macros/latex/contrib/clicks/clicks.sty b/macros/latex/contrib/clicks/clicks.sty index 68bf2b77ed..b2aa13ff69 100644 --- a/macros/latex/contrib/clicks/clicks.sty +++ b/macros/latex/contrib/clicks/clicks.sty @@ -1,6 +1,6 @@ % (The MIT License) % -% Copyright (c) 2021 Yegor Bugayenko +% Copyright (c) 2021-2022 Yegor Bugayenko % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the 'Software'), to deal @@ -21,7 +21,7 @@ % SOFTWARE. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{clicks}[2021/09/18 0.2.0 Clicks] +\ProvidesPackage{clicks}[2022/09/13 0.3.1 Clicks] \RequirePackage{xkeyval} \RequirePackage{etoolbox} @@ -37,20 +37,24 @@ \newcounter{minutes} -% Print the content as is +% Print the content as is. \makeatletter\newcommand\print[1]{% \gappto\clicks@body{{#1\par}}% }\makeatother +% Flush the page: print the entire content. \makeatletter\newcommand\flush[1][1]{% - \clicks@flush% - \renewcommand*\clicks@body{}% + \ifx\clicks@body\empty\else% + \clicks@flush% + \renewcommand*\clicks@body{}% + \fi% \ifclicks@static\else% \addtocounter{minutes}{#1}% \fi% } -\makeatletter\newcommand\click[1][1]{% +% Print the content and wait for more. +\makeatletter\newcommand\click[1][0]{% \ifclicks@static\else% \addtocounter{minutes}{#1}% \fi% |