Search code examples
latexletteruppercasecapitalize

Automatically capitalize first letter of first word in a new sentence in LaTeX


I know one of LaTeX's bragging points is that it doesn't have this Microsoftish behavior. Nevertheless, it's sometimes useful.

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.

Is there an obvious way to write a macro that does this, or is there a LaTeX package that does it already?


Solution

  • I decided to solve it in the following way:

    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.

    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.