[OS X TeX] Improper alphabetic constant

Herbert Schulz herbs at wideopenwest.com
Fri Dec 18 13:45:12 EST 2020


> On Dec 18, 2020, at 12:04 PM, Alain Schremmer <schremmer.alain at freemathtexts.org> wrote:
> 
> 
> 
>> On Dec 18, 2020, at 8:08 AM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>> 
>>> On Dec 18, 2020, at 1:48 AM, Alain Schremmer <schremmer.alain at freemathtexts.org> wrote:
> 
>>> $\xrightarrow{5}$ and \boldsymbol{$5$} both compile but \boldsymbol{$\xrightarrow{5}$} does not.
>>> 
>>> The error is:
>>> 
>>> 2.tex:1309: Improper alphabetic constant.
>>> <to be read again> 
>>>                   \reserved at d 
>>> l.1309 \boldsymbol{$\xrightarrow{5}$}
>>> 
>>> Any way around it?
> 
>> Howdy,
> 
>> Are you sure \boldsymbol{$5$} compiles? I believe the \boldsymbol needs to be in math mode so $\boldsymbol{5}$ and $\boldsymbol{\xrightarrow{5}}$ work fine.
> 
> 	Both $\boldsymbol{5}$ and \boldsymbol{$\rightarrow$} compile which is one more thing I don’t get---but which does not make me lose any sleep. 
> 	
> 	But $\boldsymbol{\xrightarrow{5}}$ definitely produces the error I mentioned. At least for me.
> 
> 	On the other hand, I just found out that $\pmb{\xrightarrow{5}}$ does work. So, I am ok.

Howdy,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tex
Type: application/octet-stream
Size: 172 bytes
Desc: not available
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20201218/f5767ad1/attachment.obj>
-------------- next part --------------


 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pdf
Type: application/pdf
Size: 15517 bytes
Desc: not available
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20201218/f5767ad1/attachment.pdf>
-------------- next part --------------


seems to work fine.

> 
> 
>> As a side note you should get used to \(...\) instead of $...$ for inline math (and \[...\] instead of $$...$$ if you use that for display math).
> 
> When I was writing some of my stuff on the web, I did but didn’t like it so stopped using them as soon as I stopped writing web pages. 
> 
> But, I am curious, are there other reasons?
> 
> Best
> —s 

They are macros that default to $...$ and $$...$$ but packages like amsmath can change things like spacing.

Good Luck,

Herb Schulz
herbs at wideopenwest.com




More information about the MacOSX-TeX mailing list