首页 > 代码库 > LaTeX技巧010:LaTtex中如何给每个句子加序号?

LaTeX技巧010:LaTtex中如何给每个句子加序号?

效果图:

代码:

\documentclass{article}

\newcounter{sentence}

\renewcommand\thesentence{\textsuperscript{\arabic{sentence}}}

\catcode`\"=13

\newcommand"{\stepcounter{sentence}\thesentence}

\begin{document}

"hello."This is a test.

\end{document}