diff --git a/collects/scribble/base.rkt b/collects/scribble/base.rkt index 0aed83450c..f81dc1cd29 100644 --- a/collects/scribble/base.rkt +++ b/collects/scribble/base.rkt @@ -262,6 +262,13 @@ ;; ---------------------------------------- +(provide ._ .__) + +(define ._ (make-element (make-style "Sendabbrev" null) ".")) +(define .__ (make-element (make-style "Sendsentence" null) ".")) + +;; ---------------------------------------- + (define elem-like-contract (->* () () #:rest (listof pre-content?) element?)) diff --git a/collects/scribble/scribble.tex b/collects/scribble/scribble.tex index 8eca64f1c8..4734c70dc3 100644 --- a/collects/scribble/scribble.tex +++ b/collects/scribble/scribble.tex @@ -83,6 +83,10 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Etc. +% ._ and .__ +\newcommand{\Sendabbrev}[1]{#1\@} +\newcommand{\Sendsentence}[1]{\@#1} + % Default style for a nested flow: \newenvironment{Subflow}{\begin{list}{}{\topsep=0pt\partopsep=0pt% \listparindent=0pt\itemindent=0pt\labelwidth=0pt\leftmargin=0pt\rightmargin=0pt% diff --git a/collects/scribblings/scribble/base.scrbl b/collects/scribblings/scribble/base.scrbl index db7f935c93..829e32f30d 100644 --- a/collects/scribblings/scribble/base.scrbl +++ b/collects/scribblings/scribble/base.scrbl @@ -348,6 +348,33 @@ See also @racket[verbatim].} } +@defthing[._ element?]{ + +Generates a period that ends an abbreviation in the middle of a +sentence, as opposed to a period that ends a sentence (since the +latter may be typeset with extra space). Use @litchar|{@._}| in a +document instead of just @litchar{.} for an abbreviation-ending period +that is preceded by a lowercase letter and followed by a space. + +See @racket[.__] for an example.} + + +@defthing[.__ element?]{ + +Generates a period that ends a sentence (which may be typeset with +extra space), as opposed to a period that ends an abbreviation in the +middle of a sentence. Use @litchar|{@.__}| in a document instead of just +@litchar{.} for a sentence-ending period that is preceded by an +uppercase letter. + +The following example illustrates both @racket[._] and @racket[.__]: + +@codeblock|{ + #lang scribble/base + My name is Mr@._ T@.__ I pity the fool who can't typeset punctuation. +}|} + + @; ------------------------------------------------------------------------ @section[#:tag "base-links"]{Links}