Re: [NTG-context] shorthands for hyphens with \penalty, \allowbreak, breaking up ligatures etc.

2009-11-14 Thread Taco Hoekwater

Oliver Heins wrote:


Is there any context way to define these kind of shorthands?  (Babel
has the \decl...@shorthand internal command.)


None are predefined, but you can install your own operations into
context's || discretionary command.

Try this, I think it is ok:

\definetextmodediscretionary {-)}
  {\prewordbreak \discretionary{-)}{}{-)}\prewordbreak}

\definetextmodediscretionary {!-}
  {\hbox{-}}

\definetextmodediscretionary {ff}
  {f\discretionary{-}{}{}\kern.03em\prewordbreak f}

\starttext

(Kinder-)Armut -rat Auffassung

(Kinder|-)|Armut |!-|rat Au|ff|assung

\hsize 0pt

(Kinder-)Armut -rat Auffassung

(Kinder|-)|Armut |!-|rat Au|ff|assung

\stoptext

___
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] shorthands for hyphens with \penalty, \allowbreak, breaking up ligatures etc.

2009-11-14 Thread Wolfgang Schuster

Am 14.11.2009 um 11:45 schrieb Taco Hoekwater:

 (Kinder|-)|Armut |!-|rat Au|ff|assung

Auf|*|fassung

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
___


[NTG-context] |-| broken? (was: shorthands for hyphens with \penalty, \allowbreak, breaking up ligatures etc.)

2009-11-14 Thread Oliver Heins
Taco Hoekwater t...@elvenkind.com writes:

 Oliver Heins wrote:

 Is there any context way to define these kind of shorthands?  (Babel
 has the \decl...@shorthand internal command.)

 None are predefined, but you can install your own operations into
 context's || discretionary command.

 Try this, I think it is ok:

Thank you, Taco, it works.

I changed the definition of

 \definetextmodediscretionary {ff}
   {f\discretionary{-}{}{}\kern.03em\prewordbreak f}

to 

\definetextmodediscretionary {!!}
  {\discretionary{-}{}{}\kern.03em\prewordbreak}

because the other ligatures (fl, fi, ft, fj etc.) might have to be
broken up, too.


However, I noticed that the |-| discretionary command produces wrong
results:

Ein|-|Euro|-|Job

Ein
-Euro
-Job

regardless of your definitions.


\starttext

\hsize 1em

Ein|-|Euro|-|Job

\stoptext

-- 
Oliver Heins he...@sopos.orghttp://oliverheins.net/
http://blog.overheins.net/ F27A BA8C 1CFB B905 65A8
http://scriptorium-adp.de/ 2544 0F07 B675 9A00 D827
1024D/9A00D827 2004-09-24 -- gpg --recv-keys 0x9A00D827
Please avoid sending me Word or PowerPoint attachments:
http://www.gnu.org/philosophy/no-word-attachments.html
___
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] Drawing rectangles

2009-11-14 Thread luigi scarso

 Still another question. I have to write:
    
 \noindent\action[bottomframe=off,rightframe=off]{}\action[bottomframe=off]{}
 because the following does not work:
    \noindent\action[bottomframe=off,rightframe=off]{}
    \action[bottomframe=off]{}
 But the second I find more readable. Is there a way to make it more
 readable?
Tex is space-sensitive.
Use comment sign '%' as Aditya says , is a robust way to make code readable.
When I'm writing some small macro, I use them just from the beginning,
to avoid surprise after (like in this situation).

Anyway your example shows some strange things about overlap of rules
that I like to investigate.

-- 
luigi
___
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
___


[NTG-context] local footnote (Tables) problem

2009-11-14 Thread Bowen Alan C .
After further experimentation, I am still stumped; so I am resending this.

The attached file will compile only if I comment out

(a) header=2pc in \setuplayout
or
(b)  \setupbodyfont[lmodern,rm,10.5pt]
or
(c) \placelegend
or
(d) \dorecurse{3}{\input knuth}

I am running MK2 using the penultimate beta in the ConTeXt Minimals. There is 
no improvement when I run the file on the ConteXt wiki (latest beta).

Any help will be greatly appreciated.

Alan



LocalNotes.tex
Description: Binary data
___
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] mkiv math delimiters and |

2009-11-14 Thread Aditya Mahajan
On Fri, Nov 13, 2009 at 4:03 AM, Mojca Miklavec 
mojca.miklavec.li...@gmail.com wrote:

 Hello,

 I have tried to compile an old document (written in mkii times). Among
 other problems that I yet need to isolate, the following minimal
 example doesn't want to compile: $\bigl| x \bigr$ since | aren't
 recognized as candidates for delimiters. There is a workaround of
 course (using \langle, \rangle, ... instead of ), but the three
 characters are just way too handy to use.


| works fine here.  and  don't. I did not know that \left is equivalent
to \left\langle even in plain tex.

I suppose that the behaviour in mkii comes from these lines:

 \definemathcharacter []   [nothing] [sy] [68] [ex] [0A]
 \definemathcharacter []   [nothing] [sy] [69] [ex] [0B]


I guess mkii is imitating plain tex here. (Though, I could not find how this
is happening in plain tex)


 But I'm not sure where mkiv could be changed.


I don't know how to do this.  should behave like a rel without a \left, and
like a delimited with \left.


 I have tried to use
  adobename=greater,
  ...
  mathspec={
   { class=binary, name=gt },
   { class=close, name=rbrace },
  },
 but without any success.


rbrace!!. Probabably you want rangle. You can change the order of the two,
and then  will map to rangle, but you will have to use \gt to get the
relation symbol.

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
___


[NTG-context] texexec for latex?

2009-11-14 Thread Adam Megacz

Hello folks,

Does anybody know if there is something like texexec for latex
users?  Specifically, I'm hoping for a single command that runs the
pdflatex/bibtex combination as many times as is required to reach a
fixed point.

Thanks,

  - a

___
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] texexec for latex?

2009-11-14 Thread Aditya Mahajan

On Sat, 14 Nov 2009, Adam Megacz wrote:


Does anybody know if there is something like texexec for latex
users?  Specifically, I'm hoping for a single command that runs the
pdflatex/bibtex combination as many times as is required to reach a
fixed point.


There are many such scripts; the two that I remember immediately are

latexmk: http://www.ctan.org/tex-archive/support/latexmk/
rubber: http://www.pps.jussieu.fr/~beffara/soft/rubber/

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] mkiv math delimiters and |

2009-11-14 Thread Taco Hoekwater

Aditya Mahajan wrote:

On Fri, Nov 13, 2009 at 4:03 AM, Mojca Miklavec 
mojca.miklavec.li...@gmail.com wrote:


Hello,

I have tried to compile an old document (written in mkii times). Among
other problems that I yet need to isolate, the following minimal
example doesn't want to compile: $\bigl| x \bigr$ since | aren't
recognized as candidates for delimiters. There is a workaround of
course (using \langle, \rangle, ... instead of ), but the three
characters are just way too handy to use.



| works fine here.  and  don't. I did not know that \left is equivalent
to \left\langle even in plain tex.

I suppose that the behaviour in mkii comes from these lines:

\definemathcharacter []   [nothing] [sy] [68] [ex] [0A]
\definemathcharacter []   [nothing] [sy] [69] [ex] [0B]



I guess mkii is imitating plain tex here. (Though, I could not find how this
is happening in plain tex)


From plain.tex:

  \mathcode`\=313C
  \delcode`\=26830A

The first (\mathcode) controls standalone use, the second (\delcode)
use as a delimiter. Both can be set at the same time, and that second
one got lost in the conversion, probably because it has a dedicated
slot in Unicode (U+0x27E8, MATHEMATICAL LEFT ANGLE BRACKET).

Perhaps this can be done with the mathspec field in char-def.lua, but
I do not know how?

Best wishes,
Taco





___
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] mkiv math delimiters and |

2009-11-14 Thread Aditya Mahajan

On Sun, 15 Nov 2009, Taco Hoekwater wrote:


Aditya Mahajan wrote:

On Fri, Nov 13, 2009 at 4:03 AM, Mojca Miklavec 
mojca.miklavec.li...@gmail.com wrote:


Hello,

I have tried to compile an old document (written in mkii times). Among
other problems that I yet need to isolate, the following minimal
example doesn't want to compile: $\bigl| x \bigr$ since | aren't
recognized as candidates for delimiters. There is a workaround of
course (using \langle, \rangle, ... instead of ), but the three
characters are just way too handy to use.



| works fine here.  and  don't. I did not know that \left is equivalent
to \left\langle even in plain tex.

I suppose that the behaviour in mkii comes from these lines:

\definemathcharacter []   [nothing] [sy] [68] [ex] [0A]
\definemathcharacter []   [nothing] [sy] [69] [ex] [0B]



I guess mkii is imitating plain tex here. (Though, I could not find how 
this

is happening in plain tex)


From plain.tex:

 \mathcode`\=313C
 \delcode`\=26830A

The first (\mathcode) controls standalone use, the second (\delcode)
use as a delimiter. Both can be set at the same time, and that second
one got lost in the conversion, probably because it has a dedicated
slot in Unicode (U+0x27E8, MATHEMATICAL LEFT ANGLE BRACKET).

Perhaps this can be done with the mathspec field in char-def.lua, but
I do not know how?


The attached patch gives a working solution for lmmath but does not work 
with cambria. I don't know if the latter is a fault of context mkiv or 
luatex.


In any case,  this is a kludge as we have to define a dummy name. It will 
be better if we could just say name=false. Currently, if I use name=false, 
\left gives an error.


Aditya
diff --git a/char-def.lua b/char-def.lua
index 3aec401..990bfd2 100644
--- a/char-def.lua
+++ b/char-def.lua
@@ -544,8 +544,10 @@ characters.data={
   description=LESS-THAN SIGN,
   direction=on,
   linebreak=al,
-  mathclass=binary,
-  mathname=lt,
+  mathspec={
+{ name=lt, class=binary } ,
+{ name=ltdelim, class=delimiter },
+  },
   mirror=0x003E,
   unicodeslot=0x003C,
  },
@@ -568,8 +570,10 @@ characters.data={
   description=GREATER-THAN SIGN,
   direction=on,
   linebreak=al,
-  mathclass=binary,
-  mathname=gt,
+  mathspec={
+{ name=gt, class=binary } ,
+{ name=gtdelim, class=delimiter },
+  },
   mirror=0x003C,
   unicodeslot=0x003E,
  },
diff --git a/math-vfu.lua b/math-vfu.lua
index 0300bb0..1543833 100644
--- a/math-vfu.lua
+++ b/math-vfu.lua
@@ -566,6 +566,8 @@ fonts.enc.math[large-to-small] = {
 [0x02309] = 0x07, -- rceil
 [0x0007B] = 0x08, -- {
 [0x0007D] = 0x09, -- }
+[0x0003C] = 0x0A, -- 
+[0x0003E] = 0x0B, -- 
 [0x027E8] = 0x0A, -- 
 [0x027E9] = 0x0B, -- 
 [0x0007C] = 0x0C, -- |
___
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] mkiv math delimiters and |

2009-11-14 Thread Taco Hoekwater

Aditya Mahajan wrote:


The attached patch gives a working solution for lmmath but does not work 
with cambria. I don't know if the latter is a fault of context mkiv or 
luatex.


Does not work as in: no error, but no delimiter either? That would
be a side-effect of Cambria not having defined successors for LESS THAN.

Best wishes,
Taco

___
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] mkiv math delimiters and |

2009-11-14 Thread Aditya Mahajan

On Sun, 15 Nov 2009, Taco Hoekwater wrote:


Aditya Mahajan wrote:


The attached patch gives a working solution for lmmath but does not work 
with cambria. I don't know if the latter is a fault of context mkiv or 
luatex.


Does not work as in: no error, but no delimiter either?


No scaled delimiter. There is no difference between \left and .


That would
be a side-effect of Cambria not having defined successors for LESS THAN.


I personally do not like this behavior of plain tex, with \left being 
same as \left\langle. In the long run, all such delimiters should be 
defined similar to mathml fences,


\definemathfence[average][left=\langle, right=\rangle, scale=auto|none]

etc. Should we be really supporting this in MKIV?

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] mkiv math delimiters and |

2009-11-14 Thread Taco Hoekwater

Aditya Mahajan wrote:
I personally do not like this behavior of plain tex, with \left being 
same as \left\langle. In the long run, all such delimiters should be 
defined similar to mathml fences,


\definemathfence[average][left=\langle, right=\rangle, scale=auto|none]

etc. Should we be really supporting this in MKIV?


That is a question for Mojca and Hans, I think. FWIW, I do not like it
that much either, as there *is* a proper character for this nowadays.

Best wishes,
Taco
___
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
___