[NTG-context] unicode integral sign

2010-05-29 Thread Yury G. Kudryashov
Hi!

I try the following:

\starttext
$∫_a^b \int_a^b$
\stoptext

In the first case, the integral sign is below the text. Should I use another 
font, or is it possible to fix with the default one?

___
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] LuaTeX error ... object in use

2010-05-29 Thread Michael Saunders
 This problem we have seen before, and I think it was a luatex bug then.
 Which luatex is this ? 0.60.1 ?

It was .50, so I updated to .60.  I'm still getting errors with the
same behavior, e.g.:

% block of text
block of text

and

block of text
% block of text

work, but

block of text
block of text

doesn't.  The difference is that now they are reporting differently:

 ! Undefined control sequence.
argument \@@bklocation
\processaction ...- \expandaction \!!stringa{#1

  } \ifx \!!stringa \empty \l...


In addition, everything involving inferiors, superiors, numerators and
denominators is now broken.  For example:

\definefontfeature[in][body][sinf=yes]%inferior
Cs{\setff{in}133}

has no effect.

 Also, debugging this really needs a complete test input file.

I don't know how to make one.
___
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] unicode integral sign

2010-05-29 Thread Taco Hoekwater

Yury G. Kudryashov wrote:

Hi!

I try the following:

\starttext
$∫_a^b \int_a^b$
\stoptext

In the first case, the integral sign is below the text. Should I use another 
font, or is it possible to fix with the default one?


It is possible to fix this. The reason for the odd placement is that the
'math code' of ∫ is not set up properly (and it probably isn't either
for some other bare Unicode characters). To fix the hard way, add this
at the top of your input file:

\Umathcode `∫ = 1 0 `∫ % 1 == \mathop, 0=fam0, ∫=glyph

Eventually, this definition will be added to char-def.lua and then
everything will work out of the box.

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
___


[NTG-context] Strange expansion behavior in XML/luatex

2010-05-29 Thread Martin Kolařík

Hello,

I had a problem with some my documents; I extracted it to as small code 
as possible. What is happening -- if any of xml flushing function (I 
tried xmlflush, xmlfilter and xmlall) is expanded to a macro (so the 
content of xml becomes a text of the macro), and the xml contains other 
hooked xml tags, the \edef (and its counterparts \xdef or 
\expandedaction) inside the inner tag is skipped by the log. Then 
macros relying on the expansion fail (I detected it in \doif and 
\processaction). Macros are normally expanded, only \edef fails (maybe 
some other TeX commands fail too, but I did not test it).


In my example below, content of il is flushed to a macro, inline is 
the inner tag and \processaction is the example of macro using 
\edef. Do not look for sense, it is an example.


XML:
?xml version=1.0 encoding=utf-8?
il
  Text inline what=something / text.
/il

TeX:
\startxmlsetups doc:inline
  \processaction
[\xmlatt{#1}{what}]
[something=A thing,
   nothing=Hic sunt leones]
\stopxmlsetups

\startxmlsetups doc:il
  \edef\content{\xmlflush{#1}}%
\stopxmlsetups

\xmlregistersetup{xml:doc}

\startxmlsetups xml:doc
  \xmlsetsetup{\xmldocument}{inline|il}{doc:*}
\stopxmlsetups

I do not know, if it is a bug or a feature :-); but notwithstanding the 
fact, similar code I used in MkII worked very well.


Thanks for hints,

Martin

--
Martin Kolařík

martin.kola...@email.cz
martin.kola...@jabber.cz
+420603535593

___
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] 64-bit kfreebsd

2010-05-29 Thread Alan BRASLAU
On Saturday 29 May 2010 10:09:07 you wrote:
 On Fri, 28 May 2010 18:09:17 +0200 Mojca Miklavec wrote:
   (I do not know why, for freebsd x86_64 maps to freebsd and not
   freebsd- amd64)
 
 I am not sure what this discussion is about, I just got this part
 forwarded by Mojca. But if you talk about the case statement in
 first-setup.sh I don't know why there is a x86_64 branch for FreeBSD at
 all. On FreeBSD AMD64 you get:
 
 [mickr...@gandalf ~]\$ uname -s
 FreeBSD
 [mickr...@gandalf ~]\$ uname -m
 amd64
 
 This is on an E6300 Intel processor.

Yes, it can get confusing:

uname -suname -muname -p

Intel Q9400 (Core2 Quad):
FreeBSD amd64   amd64
GNU/kFreeBSDx86_64  amd64
Linux   x86_64  unknown
32bit os (same processor):
FreeBSD ? (untested)?
GNU/kFreeBSDi686i386
GNU/Linux   i686unknown

Intel pentium 4:
FreeBSD ? (untested)?
GNU/kFreeBSDi686i386
GNU/Linux   i686unknown



   As far as I know, 64 bit linux/freebsd/kfreebsd use the same
   distributions (amd64) for both Intel and AMD processors.
 
 Same for official FreeBSD AMD64. There is no special version of FreeBSD
 for 64bit x86 CPU from Intel. There is a IA64 version of FreeBSD that
 is often mistaken as built for those Intel AMD64 clones. But this
 version is actually build for the Itanium Architecture, descendant of
 PA-RISC. Summary: FreeBSD AMD64 is used for all 64bit x86 CPUs.

The official 64bit OS name is amd64 for FreeBSD, GNU/kFreeBSD and Linux.
However, uname -m gives differing results and depends on the version of the 
running OS, not the real underlying processor; A 64bit processor can run a 
32bit OS.

Alan
___
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] referenceformat MkIV

2010-05-29 Thread Yury G. Kudryashov
Hi!

I try the following:

\definereferenceformat[ineq][left=(,right=),text=Equation]
\starttext
\placeformula[first]
\startformula
2=2
\stopformula
In \in[first] ineq \ineq[first] in \in[first].
\stoptext

The result is:
2 = 2 (1)
In 1 ineq (1) in (1).

It seems that \ineq doesn't clear some variables, and the next \in uses the 
previous format.

___
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] LuaTeX error ... object in use

2010-05-29 Thread Taco Hoekwater

Michael Saunders wrote:


In addition, everything involving inferiors, superiors, numerators and
denominators is now broken.  For example:

\definefontfeature[in][body][sinf=yes]%inferior
Cs{\setff{in}133}

has no effect.


This depends on whether the font supports the sinf feature. The
default fonts do not.


Also, debugging this really needs a complete test input file.


I don't know how to make one.


Well, if I literally run

\starttext
block of text
block of text
\stoptext

It works just fine, so I need a test file to debug your bug report.

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] unicode integral sign

2010-05-29 Thread Yury G. Kudryashov
Taco Hoekwater wrote:

 Yury G. Kudryashov wrote:
 Hi!
 
 I try the following:
 
 \starttext
 $∫_a^b \int_a^b$
 \stoptext
 
 In the first case, the integral sign is below the text. Should I use
 another font, or is it possible to fix with the default one?
 
 It is possible to fix this. The reason for the odd placement is that the
 'math code' of ∫ is not set up properly (and it probably isn't either
 for some other bare Unicode characters). To fix the hard way, add this
 at the top of your input file:
 
 \Umathcode `∫ = 1 0 `∫ % 1 == \mathop, 0=fam0, ∫=glyph
Is there any documentation on char-def.lua file format? If I'll understand 
it, I'll send a patch for the symbols I use.

Currently I have no idea why the following strings in char-def don't work.

[0x222B]={
  adobename=integral,
  category=sm,
  cjkwd=a,
  description=INTEGRAL,
  direction=on,
  linebreak=ai,
  mathspec={
{ class=nothing, name=intop },
{ class=limop  , name=int   },
  },
  unicodeslot=0x222B,
 },

Replacing mathspec=... with mathclass=limop, mathname=int seems to work 
(copied from n-ary summation).

BTW, in both solution ∫_a acts like \int\limits_a, not \int_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] LuaTeX error ... object in use

2010-05-29 Thread Michael Saunders
  In addition, everything involving inferiors, superiors, numerators and
  denominators is now broken.  For example:
 
  \definefontfeature[in][body][sinf=yes]%inferior
  Cs{\setff{in}133}
 
   has no effect.

 This depends on whether the font supports the sinf feature. The
 default fonts do not.

Mine does.  It worked in 0.50.   Maybe the name of the feature sinf changed?

 Well, if I literally run

 \starttext
 block of text
 block of text
 \stoptext

 It works just fine, so I need a test file to debug your bug report.

It appears to depend on having a big enough, complicated enough text,
not a specific combination of commands, so it's hard to come up with
one, but I'll try.  Thanks.
___
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] unicode subscripts

2010-05-29 Thread Yury G. Kudryashov
Hi!

Unicode subscripts do not work (at least, in math):

\starttext
$a₀₁₂₃₄₅₆₇₈₉₋₌₊$
\stoptext

prints only a. The file char-def.lua contains block like this:
 [0x2080]={
  category=no,
  description=SUBSCRIPT ZERO,
  direction=en,
  linebreak=al,
  specials={ sub, 0x0030 },
  unicodeslot=0x2080,
 },

Which file should handle this specials={ sub, 0x0030 }?

P.S.: Superscript digits work. Probably, the font contains ¹ but not ₁.

___
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] unicode integral sign

2010-05-29 Thread Aditya Mahajan

On Sat, 29 May 2010, Yury G. Kudryashov wrote:


Taco Hoekwater wrote:


Yury G. Kudryashov wrote:

Hi!

I try the following:

\starttext
$∫_a^b \int_a^b$
\stoptext

In the first case, the integral sign is below the text. Should I use
another font, or is it possible to fix with the default one?


It is possible to fix this. The reason for the odd placement is that the
'math code' of ∫ is not set up properly (and it probably isn't either
for some other bare Unicode characters). To fix the hard way, add this
at the top of your input file:

\Umathcode `∫ = 1 0 `∫ % 1 == \mathop, 0=fam0, ∫=glyph
Is there any documentation on char-def.lua file format? If I'll understand 
it, I'll send a patch for the symbols I use.


Not a complete documentation, but some explanation is here

https://www.tug.org/members/TUGboat/tb30-2/tb95mahajan-cmath.pdf


Currently I have no idea why the following strings in char-def don't work.

[0x222B]={
 adobename=integral,
 category=sm,
 cjkwd=a,
 description=INTEGRAL,
 direction=on,
 linebreak=ai,
 mathspec={
   { class=nothing, name=intop },
   { class=limop  , name=int   },
 },
 unicodeslot=0x222B,
},

Replacing mathspec=... with mathclass=limop, mathname=int seems to work 
(copied from n-ary summation).


BTW, in both solution ∫_a acts like \int\limits_a, not \int_a.


In plain TeX, this is taken care by

\mathchardef\intop=1352 \def\int{\intop\nolimits}

Can I do the same in luatex without active characters?

\Umathchardef\INTOP=1 0 `∫
\def\INT{\INTOP\intlimits}

\catcode`∫=\active
\let ∫=\INT

\starttext
$∫_a^b$

$\displaystyle ∫_a^b$
\stoptext

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] unicode integral sign

2010-05-29 Thread Taco Hoekwater

Aditya Mahajan wrote:

On Sat, 29 May 2010, Yury G. Kudryashov wrote:


Taco Hoekwater wrote:


Yury G. Kudryashov wrote:

Hi!

I try the following:

\starttext
$∫_a^b \int_a^b$
\stoptext

In the first case, the integral sign is below the text. Should I use
another font, or is it possible to fix with the default one?


It is possible to fix this. The reason for the odd placement is that the
'math code' of ∫ is not set up properly (and it probably isn't either
for some other bare Unicode characters). To fix the hard way, add this
at the top of your input file:

\Umathcode `∫ = 1 0 `∫ % 1 == \mathop, 0=fam0, ∫=glyph
Is there any documentation on char-def.lua file format? If I'll 
understand it, I'll send a patch for the symbols I use.


Not a complete documentation, but some explanation is here

https://www.tug.org/members/TUGboat/tb30-2/tb95mahajan-cmath.pdf

Currently I have no idea why the following strings in char-def don't 
work.


[0x222B]={
 adobename=integral,
 category=sm,
 cjkwd=a,
 description=INTEGRAL,
 direction=on,
 linebreak=ai,
 mathspec={
   { class=nothing, name=intop },
   { class=limop  , name=int   },
 },
 unicodeslot=0x222B,
},

Replacing mathspec=... with mathclass=limop, mathname=int seems to 
work (copied from n-ary summation).


BTW, in both solution ∫_a acts like \int\limits_a, not \int_a.


In plain TeX, this is taken care by

\mathchardef\intop=1352 \def\int{\intop\nolimits}

Can I do the same in luatex without active characters?


No, but it is a useful extension to consider. There are internally
three types of large operators, for 'limits', 'nolimits' and
'displaylimits' and this bothers me a bit. We can't reasonably
extend the old primitives, but \Umathcharcode c.s. could be made
to accept extra values '9' .. '11' for those three types without
any compatibility problems.  I'll add to the tracker.

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] unicode integral sign

2010-05-29 Thread Aditya Mahajan

On Sat, 29 May 2010, Taco Hoekwater wrote:


Aditya Mahajan wrote:

 On Sat, 29 May 2010, Yury G. Kudryashov wrote:

  Taco Hoekwater wrote:
 
   Yury G. Kudryashov wrote:

Hi!
   
I try the following:
   
\starttext

$∫_a^b \int_a^b$
\stoptext
   
In the first case, the integral sign is below the text. Should I use

another font, or is it possible to fix with the default one?
  
   It is possible to fix this. The reason for the odd placement is that 
   the

   'math code' of ∫ is not set up properly (and it probably isn't either
   for some other bare Unicode characters). To fix the hard way, add this
   at the top of your input file:
  
   \Umathcode `∫ = 1 0 `∫ % 1 == \mathop, 0=fam0, ∫=glyph
  Is there any documentation on char-def.lua file format? If I'll 
  understand it, I'll send a patch for the symbols I use.


 Not a complete documentation, but some explanation is here

 https://www.tug.org/members/TUGboat/tb30-2/tb95mahajan-cmath.pdf

  Currently I have no idea why the following strings in char-def don't 
  work.
 
  [0x222B]={

   adobename=integral,
   category=sm,
   cjkwd=a,
   description=INTEGRAL,
   direction=on,
   linebreak=ai,
   mathspec={
 { class=nothing, name=intop },
 { class=limop  , name=int   },
   },
   unicodeslot=0x222B,
  },
 
  Replacing mathspec=... with mathclass=limop, mathname=int seems to 
  work (copied from n-ary summation).
 
  BTW, in both solution ∫_a acts like \int\limits_a, not \int_a.


 In plain TeX, this is taken care by

 \mathchardef\intop=1352 \def\int{\intop\nolimits}

 Can I do the same in luatex without active characters?


No, but it is a useful extension to consider. There are internally
three types of large operators, for 'limits', 'nolimits' and
'displaylimits' and this bothers me a bit. We can't reasonably
extend the old primitives, but \Umathcharcode c.s. could be made
to accept extra values '9' .. '11' for those three types without
any compatibility problems.  I'll add to the tracker.


Thanks. That will make all the int (and sum) setup much simpler.

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] 64-bit kfreebsd

2010-05-29 Thread Martin Schröder
2010/5/29 Alan BRASLAU alan.bras...@cea.fr:
 The official 64bit OS name is amd64 for FreeBSD, GNU/kFreeBSD and Linux.

The is no OS named Linux.

http://en.wikipedia.org/wiki/Amd64#Industry_naming_conventions

Best
   Martin
___
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] urls longer than 57 characters fail in the bibliography

2010-05-29 Thread Martin Schröder
2010/5/27 taco t...@elvenkind.com:
 this is a bibtex bug (just look at the generated bbl file and you will see

Which may be fixed in BibTeX 0.99d (included in TL2010).

Best
Martin
___
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] is this valid usage of \def?

2010-05-29 Thread Rogutės Sparnuotos
Hello,

Could someone please confirm that it is ok to use \def like this:

  \def\ru{\switchtobodyfont[cyr]\language[ru]}
  \starttext
  \item {\ru Эйхенбаум, Борис. {\it Теория «формального метода»}.} 
Some other text in the main language.
  \stoptext

This is MkII with XeTeX, cyr is defined as

  \definetypeface[cyr][rm][Xserif][CMU Serif]
  \definetypeface[cyr][ss][Xsans][CMU Sans Serif]
  \definetypeface[cyr][tt][Xmono][CMU Typewriter Text]

because 'Latin Modern' lacks cyrillic glyphs and 'Computer Modern Unicode'
lacks some Lithuanian glyphs (and looks slightly different).

-- 
--  Rogutės Sparnuotos
___
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
___