slatex / LaTeXML-Plugin-sTeX

A LaTeXML Plugin for Semantic LaTeX (sTeX)
LaTeX Project Public License v1.3c
2 stars 3 forks source link

implement capitalized \defi* and \trefi #117

Closed kohlhase closed 4 years ago

kohlhase commented 6 years ago

I have introduced

They need to be implemented in LaTeXML as well.

kohlhase commented 6 years ago

@tkw1536 if you show me how to capitalize in Perl, I can do that myself.

tkw1536 commented 6 years ago

@kohlhase Note that I am not a perl expert, but a quick google search reveals multiple ways of doing it.

To capitalize a single word, you can use ucfirst:

print(ucfirst 'word'); # prints 'Word'

To capitalize all words in a sentence, you can use:

my $sentence = 'this is a sentence. ';
$sentence =~ s/(\w+)/\u$1/g;
print($sentence); # prints 'This Is A Sentence'
kohlhase commented 4 years ago

fixed on simplify branch