Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

latex capilization at the start of sentences and acronym package

1,238 views
Skip to first unread message

DG

unread,
Oct 25, 2004, 1:30:05 AM10/25/04
to
I have some acronyms set using the acronym package. If the long
expanded form occurs at the beginning of a sentence, then it won't be
capitalized like I want it to. Take this example:

\acro{a-Si}[a-Si:H]{hydrogenated amorphous silicon}

If I put \acl{a-Si} at the beginning of a sentence, I get hydrogenated
amorphous silicon.

Is there any way to make latex capitalize something dynamically (ie. if
it is at the start of a sentence?)

--
David J. Grant
http://www.davidgrant.ca:81

Michiel Kreutzer

unread,
Oct 25, 2004, 3:50:19 AM10/25/04
to
DG wrote:

I think natbib.sty might be the right place to start looking. natbib
defines \Cite (note the capital C) commands for the start of a
sentence, where "da Vinci stated that..." should become "Da Vinci
stated that...".

So see if you can copy the natbib method of capitalising the first
letter.

Not a full solution, only a hint,sorry.

Hope this helps,
Michiel

Robin Fairbairns

unread,
Oct 26, 2004, 3:01:15 AM10/26/04
to
Michiel Kreutzer <kreutz...@netscape.net> writes:
>DG wrote:
>> I have some acronyms set using the acronym package. If the long
>> expanded form occurs at the beginning of a sentence, then it won't be
>> capitalized like I want it to. Take this example:
>>
>> \acro{a-Si}[a-Si:H]{hydrogenated amorphous silicon}
>>
>> If I put \acl{a-Si} at the beginning of a sentence, I get hydrogenated
>> amorphous silicon.
>>
>> Is there any way to make latex capitalize something dynamically (ie. if
>> it is at the start of a sentence?)
>
>I think natbib.sty might be the right place to start looking. natbib
>defines \Cite (note the capital C) commands for the start of a
>sentence, where "da Vinci stated that..." should become "Da Vinci
>stated that...".

this is probably a sensible way forward.

>Not a full solution, only a hint,sorry.

here's another hint: don't try and automate it. if you look into
google groups, you'll find a long (and ultimately inconclusive)
discussion about "detecting the start of the sentence". my
recollection is that _every_ proposed method was shown to be fallible.
given that _you_ know where the starts of your sentences are, i would
suggest that you pursue the natbib style for solving the problem.
--
Robin (http://www.tex.ac.uk/faq) Fairbairns, Cambridge

Danie Els

unread,
Oct 26, 2004, 6:34:19 AM10/26/04
to
r...@cl.cam.ac.uk (Robin Fairbairns) wrote in message news:<clksnr$ppp$1...@gemini.csx.cam.ac.uk>...

> Michiel Kreutzer <kreutz...@netscape.net> writes:
> >DG wrote:
> >> I have some acronyms set using the acronym package. If the long
> >> expanded form occurs at the beginning of a sentence, then it won't be
> >> capitalized like I want it to. Take this example:
> >>
> >> \acro{a-Si}[a-Si:H]{hydrogenated amorphous silicon}
> >>
> >> If I put \acl{a-Si} at the beginning of a sentence, I get hydrogenated
> >> amorphous silicon.
> >>
> >> Is there any way to make latex capitalize something dynamically (ie. if
> >> it is at the start of a sentence?)
> >
> >I think natbib.sty might be the right place to start looking. natbib
> >defines \Cite (note the capital C) commands for the start of a
> >sentence, where "da Vinci stated that..." should become "Da Vinci
> >stated that...".
>
> this is probably a sensible way forward.
>

In English yes, but in other languages it may not work because the
first character of a sentence is not always capitalised. For example
in Afrikaans (and I think Dutch) you find:

English: A big cat.
Afrikaans : 'n Groot kat.

Yes I know acronyms usualy do not contain A, AN, etc., but still a
total foolproof system would require input for both cases.

Danie Els : dnjels at sun dot ac dot za

Pieter Rautenbach

unread,
Oct 26, 2004, 3:53:55 PM10/26/04
to
I encountered an interesting "problem" when using the acronym package.
It has a command \acp{} to specify the use of a plural. I defined the
acronym "DOF" (degree of freedom) and my first use of it happened to
be the plural. This caused the uncorrect output "degree of freedoms
(DOFs)", which actually should be "degrees of freedom (DOFs)".
Naturally, LaTeX has no idea about the meaning of what it typesets. I
just thought I'd mention it. I guess this problem falls under the same
category as the one about "when's the start of a new sentence?". My
solution was to type it out, defying the use of the package.

Pieter Rautenbach

dnj...@netscape.net (Danie Els) wrote in message news:<86bdf4ac.04102...@posting.google.com>...

Robin Fairbairns

unread,
Oct 27, 2004, 10:14:09 AM10/27/04
to
dnj...@netscape.net (Danie Els) writes:
>r...@cl.cam.ac.uk (Robin Fairbairns) wrote...

>> Michiel Kreutzer <kreutz...@netscape.net> writes:
>> >I think natbib.sty might be the right place to start looking. natbib
>> >defines \Cite (note the capital C) commands for the start of a
>> >sentence, where "da Vinci stated that..." should become "Da Vinci
>> >stated that...".
>>
>> this is probably a sensible way forward.
>
>In English yes, but in other languages it may not work because the
>first character of a sentence is not always capitalised. For example
>in Afrikaans (and I think Dutch) you find:
>
> English: A big cat.
> Afrikaans : 'n Groot kat.
>
>Yes I know acronyms usualy do not contain A, AN, etc., but still a
>total foolproof system would require input for both cases.

i asserted that it was probably not rational to seek a foolproof
system, and that the manual approach (use \cite or \Cite according to
context as _you_ know it) was likely the way to go.

no, i didn't know about this feature of afrikaans/dutch, but i don't
_think_ it invalidates my assertion.

0 new messages