2

The following command is just a shortcut to avoid me to write two very long words I use often. I would like to capitalize the first letter of the first word at the beginning of a sentence.

\newcommand{\es}{\autocap{e}dslqk dlqsmd}

However \es text. (i.e. the command at the beginning of a sentence) does not print Edslqk dlqsmd but edslqk dlqsmd.

How can I capitalize this letter automatically?

ppr
  • 8,994
  • Can you expand your code to a compilable minimal example, so we all have the same basis of knowledge? – Johannes_B Feb 27 '14 at 09:09
  • \MakeUpperCase? – Claudio Fiandrino Feb 27 '14 at 09:09
  • 2
    \autocap is a biblatex command and as such only works if it is within the scope of biblatex's punctuation tracker (that tracker is only working within citations and the bibliography). Automatically capitalising words depending on their position in the text is quite a difficult job (there have been questions about that here before, I think, with - if at all - quite complicated solutions). – moewe Feb 27 '14 at 09:19
  • See also http://tex.stackexchange.com/q/4834/35864 and http://stackoverflow.com/q/2818119. – moewe Feb 27 '14 at 09:21
  • @HarishKumar: not really :) It is more likely a suggestion: if it works the OP itself can post an answer that I will be happy to upvote. – Claudio Fiandrino Feb 27 '14 at 09:43
  • 2
    TeX can't read English or any other language. It has no notion of beginning of sentence that could be exploited. biblatex has \autocap, but this command is used in a very controlled environment, where everything has been split up into small pieces. – egreg Feb 27 '14 at 09:48

0 Answers0