在LaTeX中自动将新单词中第一个单词的第一个字母大写 [英] Automatically capitalize first letter of first word in a new sentence in LaTeX

查看:425
本文介绍了在LaTeX中自动将新单词中第一个单词的第一个字母大写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道LaTeX的自夸点之一是它没有这种Microsoftish行为.尽管如此,它有时还是有用的.

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 3次,然后调用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆