Re: [NTG-context] Let's Polish the math!

2009-03-17 Thread Mojca Miklavec
On Sat, Mar 14, 2009 at 08:52, Aditya Mahajan wrote:

 Also, we put periods after section numbers, so no 1.2
 Section, but rather 1.2. Section.

 \setuplabeltext [pl] [section={{},{.}}]

Hello Aditya,

Interesting trick, thanks. But the problem is that references then
ignore the dot. So \in[ref] gives me only 1 instead of 1.. Also,
it's non-recursive (but that is not so problematic). Redefining the
numbercommand seems to work a tiny bit better for me, but I would
prefer to have a better  automatic solution based on the chosen
language (so that 1.1.. will start appearing in my old documents :)
:) :) :)

Mojca
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Let's Polish the math!

2009-03-17 Thread Wolfgang Schuster


Am 17.03.2009 um 20:12 schrieb Mojca Miklavec:


On Sat, Mar 14, 2009 at 08:52, Aditya Mahajan wrote:



Also, we put periods after section numbers, so no 1.2
Section, but rather 1.2. Section.


\setuplabeltext [pl] [section={{},{.}}]


Hello Aditya,

Interesting trick, thanks. But the problem is that references then
ignore the dot. So \in[ref] gives me only 1 instead of 1.. Also,
it's non-recursive (but that is not so problematic). Redefining the
numbercommand seems to work a tiny bit better for me, but I would
prefer to have a better  automatic solution based on the chosen
language (so that 1.1.. will start appearing in my old documents :)
:) :) :)



Let's hope the stopper key for \setuphead will work in MkIV.

Language depends settings are possible with start/stoplanguagespecifics
but it's broken :-(

\startlanguagespecifics[sl]

\setuphead
  [chapter,section,subsection]
  [numbercommand=\groupedcommand{}{.}]

\stoplanguagespecifics

\starttext

\section{Knuth}

\input knuth

\page

\mainlanguage[sl]

\section{Tufte}

\input tufte

\stoptext

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Let's Polish the math!

2009-03-17 Thread Mojca Miklavec
On Tue, Mar 17, 2009 at 20:56, Wolfgang Schuster wrote:

 Am 17.03.2009 um 20:12 schrieb Mojca Miklavec:

 On Sat, Mar 14, 2009 at 08:52, Aditya Mahajan wrote:

 Also, we put periods after section numbers, so no 1.2
 Section, but rather 1.2. Section.

 \setuplabeltext [pl] [section={{},{.}}]

 Hello Aditya,

 Interesting trick, thanks. But the problem is that references then
 ignore the dot. So \in[ref] gives me only 1 instead of 1.. Also,
 it's non-recursive (but that is not so problematic). Redefining the
 numbercommand seems to work a tiny bit better for me, but I would
 prefer to have a better  automatic solution based on the chosen
 language (so that 1.1.. will start appearing in my old documents :)
 :) :) :)


 Let's hope the stopper key for \setuphead will work in MkIV.

 Language depends settings are possible with start/stoplanguagespecifics
 but it's broken :-(

 \startlanguagespecifics[sl]

 \setuphead
  [chapter,section,subsection]
  [numbercommand=\groupedcommand{}{.}]

 \stoplanguagespecifics

Hello Wolfgang,

I was often tempted to do that (in some less fancy way than with
groupedcommand :) by default ... but maybe some user wants
\setuphead[section][numbercommand=\xxx] \def\xxx#1{\framed{#1}}
or whatever else and that would interfere with the existing
numbercommand= that's specific to one language. Proper support for
stopper would be much better.

Mojca
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Let's Polish the math!

2009-03-17 Thread Hans Hagen

Mojca Miklavec wrote:

On Tue, Mar 17, 2009 at 20:56, Wolfgang Schuster wrote:

Am 17.03.2009 um 20:12 schrieb Mojca Miklavec:


On Sat, Mar 14, 2009 at 08:52, Aditya Mahajan wrote:

Also, we put periods after section numbers, so no 1.2
Section, but rather 1.2. Section.

\setuplabeltext [pl] [section={{},{.}}]

Hello Aditya,

Interesting trick, thanks. But the problem is that references then
ignore the dot. So \in[ref] gives me only 1 instead of 1.. Also,
it's non-recursive (but that is not so problematic). Redefining the
numbercommand seems to work a tiny bit better for me, but I would
prefer to have a better  automatic solution based on the chosen
language (so that 1.1.. will start appearing in my old documents :)
:) :) :)


Let's hope the stopper key for \setuphead will work in MkIV.

Language depends settings are possible with start/stoplanguagespecifics
but it's broken :-(

\startlanguagespecifics[sl]

\setuphead
 [chapter,section,subsection]
 [numbercommand=\groupedcommand{}{.}]

\stoplanguagespecifics


Hello Wolfgang,

I was often tempted to do that (in some less fancy way than with
groupedcommand :) by default ... but maybe some user wants
\setuphead[section][numbercommand=\xxx] \def\xxx#1{\framed{#1}}
or whatever else and that would interfere with the existing
numbercommand= that's specific to one language. Proper support for
stopper would be much better.


mkiv (xp) has much more control over conversion, separators, stoppers as 
well as control over each of them with respect to typesetting; also, it 
can be different for all places where numbers are used; of course this 
comes at a price ... the more one can tune, the more complex things get


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Let's Polish the math!

2009-03-14 Thread Mojca Miklavec
On Sat, Mar 14, 2009 at 01:26, Marcin Borkowski wrote:
 Hi,

 how to do this: here in Poland we have some conventions as for
 typesetting math; for example, we don't use  \leq, but \leqslant; we
 don't write tan for tangent, but tg;

That one is trivial. In math-tex there are dozens of definitions like:
\definemathcommand [tan] [nolop] {\mfunction{tan}}
In my opinion adding
\definemathcommand [tg] [nolop] {\mfunction{tg}}
to the list sounds reasonable, so then you can simply use \tg.

 we don't write arcsin, but
 arc\,sin; etc.

\definemathcommand [arcsin]  [limop] {\mfunction{arc\,sin}}

But I don't know how to make it language-dependant (you can definitely
put it to some place that only gets loaded when you load Polish, but
then you'll have problems switching back and forth).

 Would it be possible to have such typographic
 conventions (I could provide a more comprehensive list, of course)
 enabled by \mainlanguage[pl]?  A related problem is dashes; where the
 English use an em-dash without any spaces, the Polish use an en-dash
 with spaces of around 0.2em (the left one unbreakable, i.e., with
 \penalty1).

I put a normal or unbreakable space around it :) :) :) But maybe
that's not the right solution, I just didn't care too much.

 Also, we put periods after section numbers, so no 1.2
 Section, but rather 1.2. Section.  What is the ConTeXt way to have
 such things for different languages?

We do that too. The code below is a dirty hack that achives the
desired result (in any mark), but cannot be hardcoded into the
language since it has some side effects:

\def\mynumberwithdot#1{#1.}
\setuphead
  [section] % gets inherited for subsections as well
  [numbercommand=\mynumberwithdot]

Hans has rewritten sectioning for mkiv I think, but I didn't explore
the new possibilities yet. So if you figure it out ... I would like to
have it for Slovenian as well.

Mojca
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Let's Polish the math!

2009-03-14 Thread Aditya Mahajan

Hi Marcin,

On Sat, 14 Mar 2009, Marcin Borkowski wrote:


Hi,

how to do this: here in Poland we have some conventions as for
typesetting math; for example, we don't use  \leq, but \leqslant;


The easy way is to type ⩽ (0x2A7D) instead of ≤ (0x2264) :). You can do
something like

\setuplabeltext [en] [lessthanequal={\leq}]
\setuplabeltext [pl] [lessthanequal={\leqslant}]

\def\le{\labeltext{lessthanequal}}

and then use \le, but I am not sure if this is a good thing to do.


we don't write tan for tangent, but tg;


Do you want \tan to produce tg? Again you can do

\setuplabeltext [en] [tangent={tan}]
\setuplabeltext [pl] [tangent={tg}]

\definemathcommand [tan] [nolop] {\mfunction{\labeltext{tangent}}}


we don't write arcsin, but
arc\,sin; etc.


Same as above.


Would it be possible to have such typographic
conventions (I could provide a more comprehensive list, of course)
enabled by \mainlanguage[pl]?


It is relatively easy to do this. I am in favour of implementing the
trignometric functions, etc; but I do not think that changing the meanings of
mathematical symbols is a good thing. It is really hard to remember the names of
symbols as is, changing meaning according to language will make it extremely
difficult.


A related problem is dashes; where the
English use an em-dash without any spaces, the Polish use an en-dash
with spaces of around 0.2em (the left one unbreakable, i.e., with
\penalty1).


Don't know.


Also, we put periods after section numbers, so no 1.2
Section, but rather 1.2. Section.


\setuplabeltext [pl] [section={{},{.}}]


What is the ConTeXt way to have
such things for different languages?


\setuplabeltext

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Let's Polish the math!

2009-03-14 Thread Wolfgang Schuster


Am 14.03.2009 um 01:26 schrieb Marcin Borkowski:


Would it be possible to have such typographic
conventions (I could provide a more comprehensive list, of course)
enabled by \mainlanguage[pl]?


\startlanguagespecifics[pl]

... % what Mojca and Aditya told you

\stoplanguagespecifics

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Let's Polish the math!

2009-03-14 Thread Xan

En/na Aditya Mahajan ha escrit:

Hi Marcin,

On Sat, 14 Mar 2009, Marcin Borkowski wrote:


Hi,

how to do this: here in Poland we have some conventions as for
typesetting math; for example, we don't use  \leq, but \leqslant;
In catalan and spanish languages we have too some conventions: $\max$ 
should type màx (with grave accent), and $\min$ should type mín 
(with accute accent).


Is it a way for doing this by default?
Xan.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Let's Polish the math!

2009-03-14 Thread Hans Hagen

Xan wrote:

En/na Aditya Mahajan ha escrit:

Hi Marcin,

On Sat, 14 Mar 2009, Marcin Borkowski wrote:


Hi,

how to do this: here in Poland we have some conventions as for
typesetting math; for example, we don't use  \leq, but \leqslant;
In catalan and spanish languages we have too some conventions: $\max$ 
should type màx (with grave accent), and $\min$ should type mín 
(with accute accent).


Is it a way for doing this by default?


we could make them labels per language ... probably with some prefix 
like math:max or so



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Let's Polish the math!

2009-03-14 Thread Xan

En/na Hans Hagen ha escrit:

Xan wrote:

En/na Aditya Mahajan ha escrit:

Hi Marcin,

On Sat, 14 Mar 2009, Marcin Borkowski wrote:


Hi,

how to do this: here in Poland we have some conventions as for
typesetting math; for example, we don't use  \leq, but \leqslant;
In catalan and spanish languages we have too some conventions: $\max$ 
should type màx (with grave accent), and $\min$ should type mín 
(with accute accent).


Is it a way for doing this by default?


we could make them labels per language ... probably with some prefix 
like math:max or so



Thanks, Hans.

A punctualization:
- \max -- màx for catalan, máx for spanish
- \min -- mín for both languages.

Sorry for the error.

Xan.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Let's Polish the math!

2009-03-14 Thread Hans Hagen

Aditya Mahajan wrote:


It is relatively easy to do this. I am in favour of implementing the
trignometric functions, etc; but I do not think that changing the 
meanings of
mathematical symbols is a good thing. It is really hard to remember the 
names of
symbols as is, changing meaning according to language will make it 
extremely

difficult.


indeed, so ... who is going to collect those labels? aditya and i can 
take care of the usage


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___