6

How can I have a an environment similar to Strunk's The Elements of Style:

enter image description here

  • 1
    Please be a bit more precise about your needs. Do you want to replicate each and every stylistic aspect (including font family, and font shape and weight) of the screenshot you posted? If not, which stylistic elements are the ones you care about? What have you tried so far? – Mico Nov 13 '14 at 12:10
6

Here's the environment, actually three:

\documentclass[twocolumn]{article}
\usepackage{mathpazo}
\usepackage{xcolor}

\newsavebox{\strunkbox}
\newenvironment{strunk}
  {\begin{lrbox}{\strunkbox}
   \begin{minipage}{.8\columnwidth}}
  {\end{minipage}\end{lrbox}\begin{center}
   \setlength{\fboxrule}{1pt}
   \leavevmode\color{red}
   \fbox{\usebox{\strunkbox}}
   \end{center}}
\newenvironment{swrong}
  {\addvspace{2ex}\begin{minipage}[t]{.45\textwidth}\footnotesize}
  {\end{minipage}\ignorespacesafterend}
\newenvironment{sright}
  {\hfill\begin{minipage}[t]{.45\textwidth}\footnotesize}
  {\end{minipage}\par}


\begin{document}
Words that intervene between subject and verb do not affect the number of the verb.
\begin{strunk}
\begin{swrong}
The bittersweet flavor of youth---its trials, its joys, 
its youth---are not soon forgotten
\end{swrong}
\begin{sright}
The bittersweet flavor of youth---its trials, its joys,
its youth---is not soon forgotten
\end{sright}
\end{strunk}
A common blunder is the use of a singular verb form in a relative clause 
following ``one of\ldots'' or a similar expression when the relative is the 
subject.
\begin{strunk}
\begin{swrong}
One of the ablest scientists who has attacked this problem
\end{swrong}
\begin{sright}
One of the ablest scientists who have attacked this problem
\end{sright}

\begin{swrong}
One of those people who is never ready on time
\end{swrong}
\begin{sright}
One of those people who are never ready on time
\end{sright}
\end{strunk}
Use a singular verb form after \emph{each, either, everyone, everybody,
 neither, nobody, someone}.
\end{document}

Don't leave blank lines between \end{swrong} and \begin{sright}.

enter image description here

  • Why did you choose swrong and sright instead of sleft and sright? – wchargin Nov 13 '14 at 19:35
  • 1
    @WChargin At the left there is the wrong usage. – egreg Nov 13 '14 at 20:23
  • @WChargin More semantic. Maybe Strunk decided to put on the right the correct construct on purpose. ;-) Or maybe I should name the subenvironment scorrect. Actually I wanted to name them wrong and right, but the latter can't be used. – egreg Nov 13 '14 at 20:53
  • egreg: How can I enable hyphenation? – blackened Nov 14 '14 at 20:48
  • 1
    @blackened Another reason for suggesting my friends not to use LyX, thanks. ;-) – egreg Nov 19 '14 at 21:40
5

Rather than as an environment, I create \strunk{}{} for the task. It will not break across page breaks. I have limited \textwidth here, instead of using columns. The \strunk macro will occupy 85% of \textwidth, plus the red border.

\documentclass{article}
\usepackage{xcolor}
\parskip 1ex
\textwidth 3in
\parindent 0in
\fboxrule 3pt
\newcommand\strunk[2]{%
\par{\centering
\color{red}{\fbox{\color{black}\scriptsize
\begin{minipage}[t]{.4\textwidth}
\parskip 1em
\raggedright#1
\end{minipage}
\hspace{.05\textwidth}
\begin{minipage}[t]{.4\textwidth}
\parskip 1em
\raggedright#2
\end{minipage}
}}
\par}
}
\begin{document}
Words that intervene between subject and verb do not affect the number of the verb.
\strunk
{The bittersweet flavor of youth---its trials, its joys, its youth---are not soon 
forgotten}
{The bittersweet flavor of youth---its trials, its joys, its youth---is not soon 
forgotten}
A common blunder is the use of a singular verb form in a relative clause 
following ``one of\ldots'' or a similar expression when the relative is the 
subject.
\strunk
{One of the ablest scientists who has attacked this problem

One of those people who is never ready on time}
{One of the ablest scientists who have attacked this problem

One of those people who are never ready on time}
Use a singular verb form after \textit{each, either, everyone, everybody,
 neither, nobody, someone}.
\end{document}

enter image description here

  • Thank you very much, Steven. In my question I forgot to mention that the red border was just for emphasis. I am working in LyX, and the first part of your example (first box) works fine when I insert your code as “Tex Code”, but the second one does not work. (I am guessing that a problem with inserting Tex code in LyX.) – blackened Nov 13 '14 at 14:44
3

Another solution for those (like me) who doesn't manage low level commands like egreg and Steven. It uses tcolorbox and its possibility of arranging two texts side by side. strunk is an environment instead of a command but I hope it doesn't matter.

\documentclass[twocolumn]{article}
\usepackage[most]{tcolorbox}
\usepackage{mathpazo}

\newtcolorbox{strunk}{notitle, colback=white, colframe=red, width=.9\linewidth,
              arc=0pt, outer arc=0pt, 
              sidebyside, lower separated=false, sidebyside align=top, sidebyside gap=4mm,
              before={\par\smallskip\pagebreak[0]\parindent=0pt\centering},
              after={\par\smallskip},
              fontupper=\small, fontlower=\small,
              boxsep=0mm,
              left=2mm, right=2mm, top=2mm, bottom=2mm,
              }

\begin{document}
Words that intervene between subject and verb do not affect the number of the verb.
%
\begin{strunk}
{The bittersweet flavor of youth---its trials, its joys, its youth---are not soon 
forgotten}\tcblower
{The bittersweet flavor of youth---its trials, its joys, its youth---is not soon 
forgotten}
\end{strunk}

A common blunder is the use of a singular verb form in a relative clause 
following ``one of\ldots'' or a similar expression when the relative is the 
subject.


\begin{strunk}
{One of the ablest scientists who has attacked this problem\\

One of those people who is never ready on time}\tcblower
{One of the ablest scientists who have attacked this problem\\

One of those people who are never ready on time}
 \end{strunk}

  Use a singular verb form after \textit{each, either, everyone, everybody,
 neither, nobody, someone}.

\end{document}

enter image description here

  • With tcolorbox it's a pain not indenting what comes after it. – egreg Nov 19 '14 at 21:41
  • Ups! you're right. I didn't notice the indentation. But I neither don't know how to do it. – Ignasi Nov 20 '14 at 7:49
  • @egreg: parskip packages does it, but it also suppresses first paragraph indentation. – Ignasi Nov 21 '14 at 20:11
  • Just use after= instead of after=\par\smallskip if there should be no new paragraph (i.e. no indention) after tcolorbox ... – Thomas F. Sturm Dec 5 '14 at 14:23
  • @ThomasF.Sturm But without after=\par, initial centering doesn't work and begin{center}...\end{center} introduces undesired vertical space before and after the box. – Ignasi Dec 5 '14 at 18:09
2

Here's another tcolorbox alternative in two variants.

The first one builds upon the answer of @Ignasi. I polished it at some spots, especially to answer the indention questions which came up in the comments:

\documentclass[twocolumn]{article}
\usepackage[skins]{tcolorbox}
\usepackage{mathpazo}

\newtcolorbox{strunk}{colback=white,colframe=red,
  width=.9\linewidth,
  size=fbox,boxrule=2pt,
  sharp corners,lower separated=false,
  sidebyside,sidebyside align=top,
  sidebyside gap=4mm,
  before={\begin{center}},
  after={\end{center}},
  fontupper=\small, fontlower=\small,
}

\begin{document}
Words that intervene between subject and verb do not affect the number of the verb.
%
\begin{strunk}
  The bittersweet flavor of youth---its trials, its joys, its youth---are not soon
  forgotten.
\tcblower
  The bittersweet flavor of youth---its trials, its joys, its youth---is not soon
  forgotten.
\end{strunk}
A common blunder is the use of a singular verb form in a relative clause
following ``one of\ldots'' or a similar expression when the relative is the
subject.
\begin{strunk}
  One of the ablest scientists who has attacked this problem\bigskip

  One of those people who is never ready on time
\tcblower
  One of the ablest scientists who have attacked this problem\bigskip

  One of those people who are never ready on time
\end{strunk}
Use a singular verb form after \textit{each, either, everyone, everybody,
neither, nobody, someone}.

\end{document}

enter image description here

Since the OP mentioned that the red borders are not really intended to appear in the document, here is a second variant without borders:

\documentclass[twocolumn]{article}
\usepackage[skins]{tcolorbox}
\usepackage{mathpazo}

\newtcolorbox{strunk}{blanker,
  width=.9\linewidth,
  sharp corners,lower separated=false,
  sidebyside,sidebyside align=top,
  sidebyside gap=4mm,
  before={\begin{center}},
  after={\end{center}},
  fontupper=\small, fontlower=\small,
}

\begin{document}
Words that intervene between subject and verb do not affect the number of the verb.
%
\begin{strunk}
  The bittersweet flavor of youth---its trials, its joys, its youth---are not soon
  forgotten.
\tcblower
  The bittersweet flavor of youth---its trials, its joys, its youth---is not soon
  forgotten.
\end{strunk}
A common blunder is the use of a singular verb form in a relative clause
following ``one of\ldots'' or a similar expression when the relative is the
subject.
\begin{strunk}
  One of the ablest scientists who has attacked this problem
\tcblower
  One of the ablest scientists who have attacked this problem
\end{strunk}
\begin{strunk}
  One of those people who is never ready on time
\tcblower
  One of those people who are never ready on time
\end{strunk}
Use a singular verb form after \textit{each, either, everyone, everybody,
neither, nobody, someone}.

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.