Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[std] Replace \rSec with plain \Sec #3352

Open
jensmaurer opened this issue Oct 29, 2019 · 4 comments
Open

[std] Replace \rSec with plain \Sec #3352

jensmaurer opened this issue Oct 29, 2019 · 4 comments

Comments

@jensmaurer
Copy link
Member

Quote from macros.tex:

% A convenience feature (mostly for the convenience of the Project
% Editor, to make it easy to move around large blocks of text):
% the \rSec macro is just like the \Sec macro, except that depths
% relative to a global variable, SectionDepthBase.

We're never using that "convenience", and it would actually be harmful, because surrounding \rSec headings would be confusing as to their actual nesting level. Let's remove this globally.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Oct 29, 2019
@cpplearner
Copy link
Contributor

See #1604 . (IIUC that PR was closed because SectionDepth got used in "Terms and definitions".)

@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Nov 4, 2019
@jensmaurer
Copy link
Member Author

Editorial meeting: Lowercase \sec. But that is already used by LaTeX math mode. Use \subclause. Consensus.

@JohelEGP
Copy link
Contributor

An implementation from #4920 (comment):

Patch macros.tex:

diff --git a/source/macros.tex b/source/macros.tex
index ca967458..650db4c3 100644
--- a/source/macros.tex
+++ b/source/macros.tex
@@ -102,6 +102,8 @@
 \s[#3]{#3\hfill[#2]}\l{#2}\addxref{#2}%
 }
 
+\def\subclause#1[#2]#3{\Sec#1[#2]{#3}}
+
 % A convenience feature (mostly for the convenience of the Project
 % Editor, to make it easy to move around large blocks of text):
 % the \rSec macro is just like the \Sec macro, except that depths

Then run

sed -i 's/^\\rSec/\\subclause/' source/*.tex
sed -i 's/rSec/subclause/g' tools/* .ctags

@hinell
Copy link

hinell commented Jan 3, 2022

When converting to the HTML by using the following command it fails both with \rSec and \subclause:

htlatex intro.tex "xhtml,html5,mathml,charset=utf-8" " -cunihtf -utf8"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants