Created
April 2, 2023 14:53
-
-
Save jonaprieto/6f282e7279e24dd5fd9641b64b28b3e0 to your computer and use it in GitHub Desktop.
Numbering paragraph
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
% ------------------------------------------------------------------- | |
% Paragraph numbering | |
% ------------------------------------------------------------------- | |
\usepackage{parano}% http://www.sci.usq.edu.au/staff/braithwa/parano.sty | |
%\usepackage{hyperref} | |
%Fixes to parano.sty. One must uses the command \parano. | |
\makeatletter | |
\newcommand{\paranospace}{\hfill}% Introduced for more flexible customisation | |
\renewcommand{\@parano}{% | |
\everypar{\setbox0\lastbox% Fixes first paragraph indent problem | |
\refstepcounter{parano}% | |
\hbox to \paranoboxwidth{\prepara{\footnotesize\color{darkgray}(\theparano)}\paranospace}\postpara}} | |
\def\@@parano[#1]{\setcounter{parano}{#1}\addtocounter{parano}{-1}% | |
\@parano}% To avoid code duplication | |
\makeatother | |
%Customizations for this example | |
\renewcommand{\prepara}{\hss} | |
\renewcommand{\postpara}{\hspace{\parindent}\ignorespaces} | |
\renewcommand{\paranospace}{\quad\hfill} | |
\setlength{\paranoboxwidth}{0pt} | |
\let\par\relax | |
\endlinechar=-32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment