在 LaTeX 的新句子中自动大写第一个单词的第一个字母 [英] Automatically capitalize first letter of first word in a new sentence in LaTeX
问题描述
我知道 LaTeX 的吹牛点之一是它没有这种微软式的行为.不过,它有时还是有用的.
I know one of LaTeX's bragging points is that it doesn't have this Microsoftish behavior. Nevertheless, it's sometimes useful.
LaTeX 在您键入(非反斜杠)句点后已经添加了一个额外的空格,因此应该可以使其自动大写以下字母.
LaTeX already adds an extra space after you type a (non-backslashed) period, so it should be possible to make it automatically capitalize the following letter as well.
是否有一种明显的方法可以编写一个可以执行此操作的宏,或者是否已经有一个 LaTeX 包可以执行此操作?
Is there an obvious way to write a macro that does this, or is there a LaTeX package that does it already?
推荐答案
我决定通过以下方式解决:
I decided to solve it in the following way:
由于我总是在获得结果之前编译 LaTeX 代码 3 次(以获得正确的分页和引用),因此我决定在该过程中构建句子的大写.
Since I always compile the LaTeX code three times before i okular the result (to get pagination and references right), I decided to build the capitalization of sentences into that process.
因此,我现在有一个 shell 脚本,它首先调用我的大写脚本(用 CRM114 编写),然后是 pdflatex 三次,然后是 okular.这样一来,所有的事情都会作为一个命令的结果发生.
Thus, I now have a shell script that calls my capitalization script (written in CRM114) first, then pdflatex three times, and then okular. This way, all the stuff happens as the result of a single command.
这篇关于在 LaTeX 的新句子中自动大写第一个单词的第一个字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!