I need to number the sentences in a text in a way that makes it clear that the numbers are not part of the text. The best I've been able to come up with looks pretty horrible:
I'd be grateful for anything more attractive!
FWIW, The code that generated that is here:
\documentclass{article}
\usepackage{calc}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\usepackage{environ,varwidth}
\mdfdefinestyle{tight}{roundcorner=1.5pt,innerleftmargin=0.7pt,innerrightmargin=0.7pt,innertopmargin=1pt,innerbottommargin=1pt,backgroundcolor=gray!20}
\newsavebox\MyTempBox
\NewEnviron{tight}{%
\savebox\MyTempBox{%
\begin{varwidth}{\linewidth}
\BODY
\end{varwidth}}%
\begin{minipage}{\dimexpr\wd\MyTempBox+2.5pt\relax}
\begin{mdframed}[style=tight,userdefinedwidth=\dimexpr\wd\MyTempBox+2.5pt\relax]
\BODY
\end{mdframed}%
\end{minipage}
}%
\newcommand\sno[1]{\begin{tight}\scriptsize\bf #1\end{tight}}
\begin{document}
\sno{21}Lorem Ipsum is simply dummy text of the printing and typesetting industry. \sno{22}Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \sno{23}It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \sno{24}It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
\end{document}
One minor point worth noting is that having a line break immediately after the number (like 24 in my example above) is not great.