[NTG-context] Strange bug with \ in footnotes

2012-08-05 Thread Aditya Mahajan
Hi,

I usually use \ after abbreviations to avoid bad interword spaces. For 
example, Prof.\ ABC. However, when using this in footnotes, if there is a 
linebreak after the \, I get an error:

! Undefined control sequence.

1   \starttext
2 Someone\footnote{Prof.\
3 ABC}
4 \stoptext
5

l.1 Prof.\

   ABC
\ctxcommand ...\directlua \zerocount {commands.#1}

\handlenoteitself ...text \strc_notes_inject_text
  \endstrut 
\strc_constructi...
\handlenoteinsert ... {\handlenoteitself {#1}{#2}}
  \egroup \the 
\everyafterno...
\195notation:note ...rentnote \currentnotenumber
  \fi \fi \endgroup \fi 
\fi ...
\strc_notations_command_nop ...handler \endcsname

\strc_constructions_finali...
l.3 ABC}

Minimal example (There should be a linebreak after \)

\starttext
Someone\footnote{Prof.\
ABC}
\stoptext

What's going on here?

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange bug with \ in footnotes

2012-08-05 Thread Otared Kavian
Hi Aditya,

On 4 août 2012, at 20:59, Aditya Mahajan aditya.maha...@mcgill.ca wrote:

 […]
 Minimal example (There should be a linebreak after \)

Is it not « \\ » that should give a line break? Indeed this gives a line break:
\starttext
Someone\footnote{Prof.\\ ABC}
\stoptext

However, you are right to observe that 

Someone\footnote{Prof.\
ABC}

results in an error with the latest beta, while 

Someone\footnote{Prof.\ ABC}

does not (and of course there is no line break neither, the « .\ » gives only a 
normal space after the dot).

Best regards: OK

 
 \starttext
 Someone\footnote{Prof.\
 ABC}
 \stoptext
 
 What's going on here?
 
 Aditya
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange bug with \ in footnotes

2012-08-05 Thread Wolfgang Schuster

Am 05.08.2012 um 09:28 schrieb Otared Kavian ota...@gmail.com:

 Hi Aditya,
 
 On 4 août 2012, at 20:59, Aditya Mahajan aditya.maha...@mcgill.ca wrote:
 
 […]
 Minimal example (There should be a linebreak after \)
 
 Is it not « \\ » that should give a line break? Indeed this gives a line 
 break:
 \starttext
 Someone\footnote{Prof.\\ ABC}
 \stoptext
 
 However, you are right to observe that 
 
 Someone\footnote{Prof.\
 ABC}
 
 results in an error with the latest beta, while 
 
 Someone\footnote{Prof.\ ABC}
 
 does not (and of course there is no line break neither, the « .\ » gives only 
 a normal space after the dot).

The “\ ” command gives a control space which is necessary when you use 
\nonfrenchspacing
(which is normally set with \setuplanguage[…][spacing=broad]). What \\ produce 
depends
on the environment and can be a line break, a space or something different.

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange bug with \ in footnotes

2012-08-05 Thread Hans Hagen

On 4-8-2012 20:59, Aditya Mahajan wrote:

Hi,

I usually use \ after abbreviations to avoid bad interword spaces. For
example, Prof.\ ABC. However, when using this in footnotes, if there is a
linebreak after the \, I get an error:

! Undefined control sequence.

1   \starttext
2 Someone\footnote{Prof.\
3 ABC}
4 \stoptext
5

l.1 Prof.\

ABC


interesting ... it only surfaces now because notes have been redone, but

\section{Prof.\
 ABC}

has the same issue (something in the tex-lua-tex cycle)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange bug with \ in footnotes

2012-08-05 Thread Hans Hagen

On 4-8-2012 20:59, Aditya Mahajan wrote:
Hi Aditya,


I usually use \ after abbreviations to avoid bad interword spaces. For
example, Prof.\ ABC. However, when using this in footnotes, if there is a
linebreak after the \, I get an error:

! Undefined control sequence.

1   \starttext
2 Someone\footnote{Prof.\
3 ABC}
4 \stoptext
5


Ok, the next is only for those who want to spend some time on the 
internals ...


\starttext

\def\TestA#1%
  {\writestatus{Test A}{#1}%
   \ctxlua{str = #1 print(str) context(str) io.savedata(temp.tmp,str)}}

\def\TestB#1%
  {\writestatus{Test B}{#1}%
   \ctxlua{str = \detokenize{#1} print(str) context(str) 
io.savedata(temp.tmp,str)}}


\def\TestC#1%
  {\writestatus{Test C}{#1}%
   \edef\temp{#1}%
   \ctxlua{str = \detokenize\expandafter{\temp} print(str) 
context(str) io.savedata(temp.tmp,str)}%

   \typefile{temp.tmp}}

\TestA{Test\
A}

\TestB{Test\
B}

\TestC{Test\
C}

Test\
D

\section{Test\
E}

Test F\footnote{Note\
F}

\stoptext

I patched the helpers.title macro to deal with it but it's still 
something to look into as one might wonder why the newline end up there 
(Taco might know).


(The 'context' function takes care of newlines so this is why it don't 
get noticed in other cases. Here a more low level sprint (catcodeid, 
str) was used.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___