7

I have made the following small command to insert visible section breaks in a manuscript:

\makeatletter
\newcommand{\subsectionbreak}{
    \vspace{1\baselineskip}
    \centerline{\char"E030}
    \vspace{1\baselineskip}
    \@afterindentfalse\@afterheading
}
\makeatother

But I would also like to make the first three words of the following paragraph automatically rendered in small-caps without having to manually add an explicit command (such as \testsc{first three words}) to do so.

I've read the responses to the question First few words of a chapter/section in small-caps?, and the highest rated response suggests configuring a manual command such as:

\def\scwords #1 #2 #3 {\textsc{#1} \textsc{#2} \textsc{#3} }
...
\scwords Lorem ipsum delorem fugit however this goes

How might I go about adding the function of the latter command into the former so that \subsectionbreak causes the first three words of the following paragraph to render in small-caps?

1 Answers1

5

You can simply say

\makeatletter
\newcommand{\subsectionbreak}{\par %%% <- important addition
  \vspace{1\baselineskip}
  \centerline{\char"E030}
  \vspace{1\baselineskip}
  \@afterindentfalse\@afterheading
  \scwords
}
\makeatother

where \scwords is the proposed one; then write

\subsectionbreak
Lorem ipsum dolor sit amet ...

However I don't think this is the better way to do it: I'd surely prefer

\makeatletter
\newcommand{\subsectionbreak}[1]{\par %%% <- important addition
  \vspace{1\baselineskip}
  \centerline{\char"E030}
  \vspace{1\baselineskip}
  \@afterindentfalse\@afterheading
  \textsc{#1 }\ignorespaces
}
\makeatother

and then

\subsectionbreak{Lorem ipsum dolor} sit amet ...
egreg
  • 1,121,712