Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"It's not just a computer -- it's your ass." -- Cal Keegan


computers / comp.text.tex / Adding colon to appendix section, but not to references

SubjectAuthor
* Adding colon to appendix section, but not to referencesHolger Schieferdecker
+- Re: Adding colon to appendix section, but not to referencesHolger Schieferdecker
`* Re: Adding colon to appendix section, but not to referencesvincent.belaiche
 `* Re: Adding colon to appendix section, but not to referencesvincent.belaiche
  `- Re: Adding colon to appendix section, but not to referencesHolger Schieferdecker

1
Adding colon to appendix section, but not to references

<tb8klsUlc4gL1@news.in-ulm.de>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=5054&group=comp.text.tex#5054

  copy link   Newsgroups: comp.text.tex
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.bawue.net!newsfeed.in-ulm.de!not-for-mail
From: spamless@gmx.de (Holger Schieferdecker)
Newsgroups: comp.text.tex
Subject: Adding colon to appendix section, but not to references
Date: Wed, 20 Jul 2022 12:16:29 +0200
Organization: [ posted via ] IN-Ulm
Lines: 63
Message-ID: <tb8klsUlc4gL1@news.in-ulm.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.in-ulm.de B8BE03FC0B2762077E70D0AC8F89DD24
X-Mozilla-News-Host: news://news.in-ulm.de:119
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Thunderbird/52.9.1
 by: Holger Schieferdecke - Wed, 20 Jul 2022 10:16 UTC

Hello,

A colleague of mine writes an article for a journal. The style guide for
sections and subsections in the appendix is like

APPENDIX A: Title
1. Subtitle for A

He managed to get the uppercase APPENDIX and the colon and final dot.
But now the references look bad (like see B: or see 1.. at the end of a
sentence). I found some approaches, but couldn't make them work.

https://tex.stackexchange.com/a/413816
https://tex.stackexchange.com/q/22435 (first two answers)

The document with the bad references is below. It would look better if
the colon and the dot would not appear in the references. Any help is
appreciated.

Holger

%%%%%%%%%%%%%%%%%%%%%%
\documentclass[showpacs,preprintnumbers,amsmath,reprint,aps,prx,superscriptaddress]{revtex4-2}

\usepackage[colorlinks]{hyperref}
\usepackage[T1]{fontenc}
\usepackage[title]{appendix}

\begin{document}
\title{Best paper ever}
\author{My Name}
\affiliation{Institute}
\date{\today}
\maketitle

\section{Introduction}
\label{sec:intro}
This is a short introduction to the topic.

\begin{appendices}
\renewcommand*{\appendixname}{APPENDIX}
\renewcommand*{\thesection}{\Alph{section}:}
\renewcommand*{\thesubsection}{\arabic{subsection}.}

\section{Boosting the signals}
\label{sec:boost}
This is an appendix section.

More details are given in section \ref{sec:REMPI} and \ref{sec:REMPI1}.

\section{The next appendix}
\label{sec:REMPI}
Here are more details.

\subsection{Subsection in second appendix}
\label{sec:REMPI1}
Even more stuff.

\end{appendices}

\end{document}
%%%%%%%%%%%%%%%%%%%%%%

Re: Adding colon to appendix section, but not to references

<tbqrmbUnogaL1@news.in-ulm.de>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=5074&group=comp.text.tex#5074

  copy link   Newsgroups: comp.text.tex
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.bawue.net!newsfeed.in-ulm.de!not-for-mail
From: spamless@gmx.de (Holger Schieferdecker)
Newsgroups: comp.text.tex
Subject: Re: Adding colon to appendix section, but not to references
Date: Wed, 27 Jul 2022 10:06:36 +0200
Organization: [ posted via ] IN-Ulm
Lines: 55
Message-ID: <tbqrmbUnogaL1@news.in-ulm.de>
References: <tb8klsUlc4gL1@news.in-ulm.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.in-ulm.de 9F0C575C15DC14A08D411CB118500EDD
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Thunderbird/52.9.1
In-Reply-To: <tb8klsUlc4gL1@news.in-ulm.de>
 by: Holger Schieferdecke - Wed, 27 Jul 2022 08:06 UTC

Am 20.07.2022 um 12:16 schrieb Holger Schieferdecker:
> A colleague of mine writes an article for a journal. The style guide for
> sections and subsections in the appendix is like
>
> APPENDIX A: Title
> 1. Subtitle for A
>
> He managed to get the uppercase APPENDIX and the colon and final dot.
> But now the references look bad (like see B: or see 1.. at the end of a
> sentence).

For reference: Sometimes the solution is making it more simple. :-)
Removing the package appendix and just using \appendix and changing
\appendixname solves the problem (see changes in the example below).

Holger

> %%%%%%%%%%%%%%%%%%%%%%
> \documentclass[showpacs,preprintnumbers,amsmath,reprint,aps,prx,superscriptaddress]{revtex4-2}
>
>
> \usepackage[colorlinks]{hyperref}
> \usepackage[T1]{fontenc}
> \renewcommand*{\appendixname}{APPENDIX}
>
> \begin{document}
> \title{Best paper ever}
> \author{My Name}
> \affiliation{Institute}
> \date{\today}
> \maketitle
>
> \section{Introduction}
> \label{sec:intro}
> This is a short introduction to the topic.
>
> \appendix
>
> \section{Boosting the signals}
> \label{sec:boost}
> This is an appendix section.
>
> More details are given in section \ref{sec:REMPI} and \ref{sec:REMPI1}.
>
> \section{The next appendix}
> \label{sec:REMPI}
> Here are more details.
>
> \subsection{Subsection in second appendix}
> \label{sec:REMPI1}
> Even more stuff.
>
> \end{document}
> %%%%%%%%%%%%%%%%%%%%%%

Re: Adding colon to appendix section, but not to references

<m2v8qy2xy5.fsf@biosency.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=5125&group=comp.text.tex#5125

  copy link   Newsgroups: comp.text.tex
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!.POSTED.127.78.9.109.rev.sfr.net!not-for-mail
From: vincent.belaiche@gmail.com
Newsgroups: comp.text.tex
Subject: Re: Adding colon to appendix section, but not to references
Date: Fri, 12 Aug 2022 00:54:26 +0200
Organization: Gegeweb News Server
Message-ID: <m2v8qy2xy5.fsf@biosency.com>
References: <tb8klsUlc4gL1@news.in-ulm.de>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: news.gegeweb.eu; posting-account="vbelaiche@orange.local"; posting-host="127.78.9.109.rev.sfr.net:109.9.78.127";
logging-data="73323"; mail-complaints-to="abuse@gegeweb.eu"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)
Cancel-Lock: sha1:XE7mCeqWcQtT0oM5sHRZ5vqquPc= sha256:Aj9/Iwn0BVWE2AnkzydUj0lYCkn2E517C66gzZeO/tk=
 by: vincent.belaiche@gmail.com - Thu, 11 Aug 2022 22:54 UTC

Holger Schieferdecker <spamless@gmx.de> writes:

> Hello,
>
> A colleague of mine writes an article for a journal. The style guide for
> sections and subsections in the appendix is like
>

[...]

>

Each section command writes to the .aux file a \newlabel command to
create the reference. Maybe you could redefine this command to remove
the trailing colon. Something like that (not tested!!) :

\makeatletter
\newcommand*\org@newlabel{}
\let\org@newlabel\newlabel
\renewcommand*\newlabel[2]{{\def\@tempa##1##2##3##4##5{\count0=#2
\def\@tempb{{##3}{##4}{##5}}%
}%
\@tempa#2%
\edef\@tempa{\noexpand\org@newlabel{#1}{{APPENDIX \@Alph\count0}{\the\count0}\@tempb}}%
\expandafter}\@tempa
} \makeatother

Vincent

Re: Adding colon to appendix section, but not to references

<m2pmh62gh2.fsf@biosency.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=5126&group=comp.text.tex#5126

  copy link   Newsgroups: comp.text.tex
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!.POSTED.127.78.9.109.rev.sfr.net!not-for-mail
From: vincent.belaiche@gmail.com
Newsgroups: comp.text.tex
Subject: Re: Adding colon to appendix section, but not to references
Date: Fri, 12 Aug 2022 07:11:53 +0200
Organization: Gegeweb News Server
Message-ID: <m2pmh62gh2.fsf@biosency.com>
References: <tb8klsUlc4gL1@news.in-ulm.de> <m2v8qy2xy5.fsf@biosency.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: news.gegeweb.eu; posting-account="vbelaiche@orange.local"; posting-host="127.78.9.109.rev.sfr.net:109.9.78.127";
logging-data="93723"; mail-complaints-to="abuse@gegeweb.eu"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)
Cancel-Lock: sha1:STyeRri51IkZuN5v2fxEk+9hLR8= sha256:2f3TXokXXakjyE7HXNJaFyTl8DLBQ3dqm9Bt5l49TNQ=
 by: vincent.belaiche@gmail.com - Fri, 12 Aug 2022 05:11 UTC

vincent.belaiche@gmail.com writes:

> Holger Schieferdecker <spamless@gmx.de> writes:
>
>> Hello,
>>
>> A colleague of mine writes an article for a journal. The style guide for
>> sections and subsections in the appendix is like
>>
>
> [...]
>
>>
>
> Each section command writes to the .aux file a \newlabel command to
> create the reference. Maybe you could redefine this command to remove
> the trailing colon.

[...]

> Vincent

This way seems to work:

--------8<-----------8<-----------8<-----------8<-----------8<-------
% In preamble
\DeclareRobustCommand*\annexesecnumformatter[1]{ANNEXE #1:}% with colon
\makeatletter
\newcommand*\org@newlabel{}
\let\org@newlabel\newlabel
\renewcommand*\newlabel[2]{{%
\def\annexesecnumformatter##1{ANNEXE ##1}% w/o colon
\edef\@tempa{\noexpand\org@newlabel{#1}{#2}}%
\expandafter}\@tempa
} \makeatother

....
% In APPENDIX
\renewcommand*\thesection{\annexesecnumformatter{\Alph{section}}}
--------8<-----------8<-----------8<-----------8<-----------8<-------

Vincent

Re: Adding colon to appendix section, but not to references

<tdd380UniauL1@news.in-ulm.de>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=5139&group=comp.text.tex#5139

  copy link   Newsgroups: comp.text.tex
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!news.bawue.net!newsfeed.in-ulm.de!not-for-mail
From: spamless@gmx.de (Holger Schieferdecker)
Newsgroups: comp.text.tex
Subject: Re: Adding colon to appendix section, but not to references
Date: Mon, 15 Aug 2022 11:22:08 +0200
Organization: [ posted via ] IN-Ulm
Lines: 67
Message-ID: <tdd380UniauL1@news.in-ulm.de>
References: <tb8klsUlc4gL1@news.in-ulm.de> <m2v8qy2xy5.fsf@biosency.com>
<m2pmh62gh2.fsf@biosency.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.in-ulm.de 11F384D5AF301C1C83803CC2C77FC472
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Thunderbird/52.9.1
In-Reply-To: <m2pmh62gh2.fsf@biosency.com>
 by: Holger Schieferdecke - Mon, 15 Aug 2022 09:22 UTC

Hello Vincent,

Thank you very much for the idea. This gives the desired result when
using the package appendix.

Am 12.08.2022 um 07:11 schrieb vincent.belaiche@gmail.com:
>> Each section command writes to the .aux file a \newlabel command to
>> create the reference. Maybe you could redefine this command to remove
>> the trailing colon.

Full working example (with slight changes) is below.

Thanks again,
Holger

%%%%%%%%%%%%%%%%%%%%%
\documentclass[showpacs,preprintnumbers,amsmath,reprint,aps,prx,superscriptaddress]{revtex4-2}

\usepackage[colorlinks]{hyperref}
\usepackage[T1]{fontenc}
\usepackage[title]{appendix}

\DeclareRobustCommand*\annexesecnumformatter[1]{#1:}% with colon
\makeatletter
\newcommand*\org@newlabel{}
\let\org@newlabel\newlabel
\renewcommand*\newlabel[2]{{%
\def\annexesecnumformatter##1{##1}% w/o colon
\edef\@tempa{\noexpand\org@newlabel{#1}{#2}}%
\expandafter}\@tempa
} \makeatother

\begin{document}
\title{Best paper ever}
\author{My Name}
\affiliation{Institute}
\date{\today}
\maketitle

\section{Introduction}
\label{sec:intro}
This is a short introduction to the topic.

\begin{appendices}
\renewcommand*{\appendixname}{APPENDIX}
\renewcommand*\thesection{\annexesecnumformatter{\Alph{section}}}
\renewcommand*{\thesubsection}{\arabic{subsection}}

\section{Boosting the signals}
\label{sec:boost}
This is an appendix section.

More details are given in section \ref{sec:REMPI} and \ref{sec:REMPI1}.

\section{The next appendix}
\label{sec:REMPI}
Here are more details.

\subsection{Subsection in second appendix}
\label{sec:REMPI1}
Even more stuff.

\end{appendices}

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor