I'm trying to get a numbering of the paragraph on my book in a similar fashion as this example. The manual approach works fine, but now I'm considering two extension cases.
1) Automated numbering
Ideally, I was wondering if the automated numbering could be simple to put in place. In the simplest form, I'd assume that each new paragraph get this command, a bit like (I assume) "parindenting works" for the indent in the paragraphs.
Ideally, this mechanism should also be "temporarily" disabled, if needed. This would be similar as the
\noindent command for paragraph indenting. From my searches here or here, the use of \everypar is discouraged. But these posts are relatively old (resp. 2012 and 2015) and I was hoping for a better solution.
So is there any new "hook" to do that ?
2) Two-side version of the code
Secondly, I may have to work with document which are of the "book type" and hence are two-sided. I found one example here. In that case, I'd get that the numbering on the left side if the page is on the left and numbering on the right for the right page.
This is important, especially for the margin, which may not be exactly the same, but symmetric. Moreover, if the book has a binding, then there is a risk that the paragraph number may disappear under the binding.
Is there a good mechanism to do it automatically too, especially if with a conditional toogle retrieving the "twoside" options of the document class? The examples I found seems to be either/or version. Ideally, I'd like to be able to change the style without having to renew the command.