Re: [NTG-context] Reg. fonts and math

2006-01-14 Thread Aditya Mahajan

--- On Jan 13, Aditya Mahajan wrote ---


--- On Jan 13, Hans Hagen wrote ---


Aditya Mahajan wrote:


No, I mean the complicated math is much harder in context. Consider

\begin{align}
 a = b \\
 c = d \notag \\
   = f \notag \\
   = g
\end{align}

which will typeset as

 a = b(1)
 c = d
   = f
   = g(2)

\begin{subequations}
\begin{align}
 a = b \\
 c = d
\end{align}
\end{subequations}

Compare this from how to do this in context (see the wiki). You have to 
*manually* set the number of the subequation. Actually, for equation 
numbering and refering, the context way is rather limited. Consider 
something like an align environment


a = b\\
c = d\\
e = f

Suppose, I want to refer to the second equation.  In latex, I can simply 
add \label{eq:2} and the end of c= d and then \ref{eq:2}. For context, 
the reference label goes at the top, with \placeformula[eqs]. But I am not 
sure, how to give individual labels to each equations.


this 'loose label' is one of the ugliest concept i can think of -)


If you come up with any other way, I will be glad to use it. Frankly, I do 
not think that the latex syntax is the best, but plain tex looks too 
indimidating and context does not have anything yet.


btw, defaulting to numbers and then using \notag is messy; i prefer 
readable code, even if it takes more  bytes;  inventing a formula takes 
more time than keying it in.  Also, more structure,  means more hooks for 
configurability


Fine by me. Your method is perfectly acceptable.

much if this 'complicated' math is not that complicated to support,see 
attached file


Wonderful. I did not know that something like this can be done so easily in 
context.


i'm willing to implement anything reasonable but since i  hardly use such 
math i only act on 'i want to achieve this' kind of specs (i have no time 
to read tons of tex documents)


Here are features that I would want context math to have. I do not care about 
the input syntax (whether it is same as latex or not) as long as the features 
are there.


[snipped]


One more request. Allow these align, gather environments to break 
across a page. Allow the user some kind of customization, whether the 
break can occur at a particular location or not.


--
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Reg. fonts and math

2006-01-14 Thread Tobias Burnus

Hello,


%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \NC \eq  b \NR[+]
%D \NC  c \NC \neq d \NR
%D \NC\NC \neq f \NR[for:hans]
%D \NC\NC \geq g \NR[for:whoelse][a]
%D \NC\NC \leq h \NR[for:whomore][b]
%D \NC\NC \neq i \NR
%D \stopalign \stopformula
%D \stopbuffer

Can this be enhanced to allow more than one alignment points?
For instance
f(x)   = x²+b²  = g(x)  (1)
h(x,y) = x²-5y² = g_2(x,y)  (2)
should be aligned at the each =, currently - using \equalign(no) or 
\startalign - one can only align at one.


Tobias

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] linenumbering

2006-01-14 Thread Thomas A. Schmitz

All,

I have a document with several sections and would like to have lines  
numbered consecutively across all sections. However, when the  
\startlinenumbering ... stoplinenumbering spans a \section command,  
it doesn't work any longer; lines are not numbered. Is there a  
solution or a workaround?


Thanks, and best

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Keep framed on the baseline

2006-01-14 Thread Johan Sandblom
Outside math I think the solution is  \inframed, but I don't know if
that works here.

Johan

2006/1/14, David Arnold [EMAIL PROTECTED]:
 All,

 I have:

 \placeformula[-]
 \startformula
\eqalign{
\text{Divisors of 12}: \framed{1},\ \framed{2},\ \framed{3},\ 4,\
 \framed{6},\ 12\cr
\text{Divisors of 18}: \framed{1},\ \framed{2},\ \framed{3},\
 \framed{6},\ 9,\ 18}
 \stopformula

 But I'd like to keep the numbers on the same baseline and let the
 frame dip below the baseline.
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context



--
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
- Bertrand Russell
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] mode dependend character handling

2006-01-14 Thread Henning Hraban Ramm

Sorry for answering that late.


The correct way would be to define swiss as a language, because
then you can put a suitable redefinition inside the language
specifics, but the following hack will work as well and is a lot
faster to implement (please don't tell anyone I proposed this):

  \enableregime[il1]
  \let\normalssharp\ssharp
  \def\ssharp{\doifmodeelse{swiss}{ss}{\normalssharp}}


Thank you, that works and is just the right solution for my problem.

Mojca's proposal:


\startmode[swiss]
\definecharacter ssharp {ss}
\stopmode


unfortunately doesn't work, at least not with utf regime and ec  
encoding.





Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
http://www.cacert.org (I'm an assurer)

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] columns issues

2006-01-14 Thread Henning Hraban Ramm

Hello wizards!

The \startcolumns ... \column ... \stopcolumns block handling seems  
somewhat broken.
Maybe these old columns are deprecated, but I guess they should  
work. (And I would like to document them.)

Consider this:

\starttext

\input ward

\startcolumns
\input ward

\column

\input knuth
\stopcolumns

\input tufte

\stoptext

In this case \column works (it doesn't seem to work always), so that  
the left column is much shorter than the right one.
But the following paragraph (tufte) is typeset just after the last  
line of the left column, so that some lines overprint.


And with [rule=on] the rule is only as short as the left column.  
[option=background] also only considers the leftmost (or first in  
[direction=left]) column.


Maybe this behaviour is sometimes useful, but I don't think it should  
be default.


[balance=no] doesn't affect the balancing of columns, but flushes the  
page (i.e. the tufte paragraph moves to the next page). With [n=3]  
you see that it doesn't use the whole remaining page.


The whole problem seems to be \column, because without that, everthing 
(?) works.


I didn't find out what the options ntop, blank, height and align are  
for; I tried several values and nothing seemed to change.


[The source is http://source.contextgarden.net/page-mul.tex
but I don't understand too much of it.]

After looking in the manual, I guess I should consider using  
paragraphs or columns sets for most of my use cases, but anyway...


Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
http://www.cacert.org (I'm an assurer)

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] indenting in XML environment

2006-01-14 Thread Christopher G D Tipper
Ok, after taking deep breath I'll try this issue again. I got  
indenting to work after putting \noindenting inside its own environment.


However, the following code block stopped working recently and I  
don't know why:


\defineXMLenvironment[body]
  {\bgroup
   \rm\setupwhitespace[none]
   \setupindenting[small,yes]
   \startcolumns[rule=on,n=2,tolerance=strict]
   {\noindenting} }
  {\stopcolumns
   \egroup}

It just doesn't indent anything, even after removing the  
{\noindenting} environment.


Christopher
o00o
  “Since light travels faster than sound, isn’t that why
   some people appear bright until you hear them speak”
  — Steve Wright


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Reg. fonts and math

2006-01-14 Thread Adam Duck
Just to give you some hints what's already there...

Aditya Mahajan [EMAIL PROTECTED] writes:

 63 lines deleted by Adam Duck 
 1. Have align support with variable number of columns.
  a = b
= c + d
+ e

 should be typeset as

  a = b
= c + d
+ e

At least this should be possible with \wall and \return (using the
nath module), like this:

#v+
a \wall = b \\
= c \wall + d \\
+ e
\return\return
#v-

 20 lines deleted by Adam Duck 
 5. have a splitformula environment that allows

  a = b
  + c \\
  + d

 to come out as

   a = b
   + c
   + e(1)

 with only one formula number. The formula number should be at the last
 line or the center of the whole formula, configurable by an option.
 142 lines deleted by Adam Duck 

Again, this is a \wall-\return thingy, but \placeformula places the
number vertically centered...

#v+
\usemodule[nath]
\starttext

\placeformula
\startformula
a \wall = b \\
+c \\
+e \return
\stopformula

\startformula
a \wall = b \\
= c \wall + d \\
+e \return\return
\stopformula

\stoptext
#v-

cu, Adam.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Reg. fonts and math

2006-01-14 Thread Aditya Mahajan

--- On Jan 14, Adam Duck wrote ---


Just to give you some hints what's already there...

Aditya Mahajan [EMAIL PROTECTED] writes:

 63 lines deleted by Adam Duck 

1. Have align support with variable number of columns.
 a = b
   = c + d
   + e

should be typeset as

 a = b
   = c + d
   + e


At least this should be possible with \wall and \return (using the
nath module), like this:

#v+
a \wall = b \\
= c \wall + d \\
+ e
\return\return
#v-



Unfortunately, if I use nath, I can not use underbrace inside 
\startstop align of nath. See a previous post of mine with the subject 
'Nath bug?'. It will be nice if I can use both solutions.




 20 lines deleted by Adam Duck 

5. have a splitformula environment that allows

 a = b
 + c \\
 + d

to come out as

  a = b
  + c
  + e(1)

with only one formula number. The formula number should be at the last
line or the center of the whole formula, configurable by an option.

 142 lines deleted by Adam Duck 

Again, this is a \wall-\return thingy, but \placeformula places the
number vertically centered...


Is there someway in which the formula numbering can be forced to be at 
the bottom. Maybe by adding an option to setupformulae. Latex has a 
class option ctags/tbtags which controls this.




[ useful example snipped]


Thanks,
Aditya

--
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] mode dependend character handling

2006-01-14 Thread Mojca Miklavec
Henning Hraban Ramm wrote:

 Mojca's proposal:

  \startmode[swiss]
  \definecharacter ssharp {ss}
  \stopmode

 unfortunately doesn't work, at least not with utf regime and ec
 encoding.

Since Taco's proposal is OK, you don't need this, but I'll reply
anyway. The problem is caused by wrong order of commands. If you
load ec encoding AFTER this command, your new definition of ssharp
will be overridden by the encoding definition again.

Compare:

\enableregime[utf] % may be whatever, no influence

\startmode[swiss]
\definecharacter ssharp {ss}
\stopmode
\usetypescript[modern][ec] % or texnansi
\setupbodyfont[modern]
\starttext
Maß Bier! % fails (prints ß)
\stoptext

with:

\usetypescript[modern][ec] % or texnansi
\setupbodyfont[modern]
\startmode[swiss]
\definecharacter ssharp {ss}
\stopmode
\starttext
Maß Bier! % prints ss
\stoptext

(Since ec encoding is the default one on my system, I had to use
texnansi in order to make the example fail.)

If you use a slightly longer variant

\startencoding[ec]
\startmode[swiss]
\definecharacter ssharp {ss}
\stopmode
\stopencoding

than the order of commands doesn't matter any more (but then the
automatic conversion will only work for the ec encoding).

But now my question for Taco: why does your example work in both
cases? Does \def have a higher priority than \definecharacter?

Thanks,
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Keep framed on the baseline

2006-01-14 Thread Mojca Miklavec
David Arnold wrote:
 All,

 I have:

 \placeformula[-]
 \startformula
\eqalign{
\text{Divisors of 12}: \framed{1},\ \framed{2},\ \framed{3},\ 4,\
 \framed{6},\ 12\cr
\text{Divisors of 18}: \framed{1},\ \framed{2},\ \framed{3},\
 \framed{6},\ 9,\ 18}
 \stopformula

 But I'd like to keep the numbers on the same baseline and let the
 frame dip below the baseline.

What about \mframed? (Probably already evident from the other mail.)

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] mode dependend character handling

2006-01-14 Thread Henning Hraban Ramm

Am 2006-01-14 um 20:35 schrieb Mojca Miklavec:

Since Taco's proposal is OK, you don't need this, but I'll reply
anyway. The problem is caused by wrong order of commands. If you
load ec encoding AFTER this command, your new definition of ssharp
will be overridden by the encoding definition again.
...
(Since ec encoding is the default one on my system, I had to use
texnansi in order to make the example fail.)


ec is my default encoding, too, so I didn't use any changing commands.


\startencoding[ec]
\startmode[swiss]
\definecharacter ssharp {ss}
\stopmode
\stopencoding
than the order of commands doesn't matter any more (but then the
automatic conversion will only work for the ec encoding).


No, it doesn't.
And I don't find any errors in the log.


Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
http://www.cacert.org (I'm an assurer)

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] layer question

2006-01-14 Thread Henning Hraban Ramm

Consider this example:

\definelayer[extras]
[width=\paperwidth,
height=\paperheight]

\setlayer [extras] [x=2cm, y=5cm] {something}

\setupbackgrounds[page][background=extras]

This is ok, the placement is relative to the upper left edge of the  
paper.


But following the Details manual, I should be able to use
\placelayer[extras]
instead of the background stuff.
But then the placement is relative to the upper left edge of the text  
area.


Is this intended?

Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
http://www.cacert.org (I'm an assurer)

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] mode dependend character handling

2006-01-14 Thread Taco Hoekwater

Henning Hraban Ramm wrote:

\startencoding[ec]
\startmode[swiss]
\definecharacter ssharp {ss}
\stopmode
\stopencoding
than the order of commands doesn't matter any more (but then the
automatic conversion will only work for the ec encoding).


mode processing is based on modes that are in effect
at the execution time of the \startmode macro, not
the typeset time. This would work:

  \enablemode[swiss]
  \startencoding[ec]
 \startmode[swiss]
 \definecharacter ssharp {ss}
 \stopmode
  \stopencoding

but then it would be on always, since it effectively becomes

  \startencoding[ec]
 \definecharacter ssharp {ss}
  \stopencoding

whereas without the \enablemode it becomes only:

  \startencoding[ec]
  \stopencoding

which does nothing.

HTH,

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] mode dependend character handling

2006-01-14 Thread Mojca Miklavec
Taco Hoekwater wrote:
 Henning Hraban Ramm wrote:
  \startencoding[ec]
  \startmode[swiss]
  \definecharacter ssharp {ss}
  \stopmode
  \stopencoding
  than the order of commands doesn't matter any more (but then the
  automatic conversion will only work for the ec encoding).

 mode processing is based on modes that are in effect
 at the execution time of the \startmode macro, not
 the typeset time. This would work:

\enablemode[swiss]
\startencoding[ec]
   \startmode[swiss]
   \definecharacter ssharp {ss}
   \stopmode
\stopencoding

 but then it would be on always, since it effectively becomes

\startencoding[ec]
   \definecharacter ssharp {ss}
\stopencoding

 whereas without the \enablemode it becomes only:

\startencoding[ec]
\stopencoding

 which does nothing.

OK, thanks Taco. Now I understand the problem. I always compiled with or without
texexec --mode=swiss
which worked fine. If mixing modes within the same document is
required (\enablemode/\disablemode[swiss]), it fails of course (I
didn't think about it).

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] indenting in XML environment

2006-01-14 Thread Taco Hoekwater

Christopher G D Tipper wrote:
Ok, after taking deep breath I'll try this issue again. I got  indenting 
to work after putting \noindenting inside its own environment.


However, the following code block stopped working recently and I  don't 
know why:


\defineXMLenvironment[body]
  {\bgroup
   \rm\setupwhitespace[none]
   \setupindenting[small,yes]
   \startcolumns[rule=on,n=2,tolerance=strict]
   {\noindenting} }
  {\stopcolumns
   \egroup}

It just doesn't indent anything, 


That's odd, because it looks fine to me.

I've created a test file with this appended to your definition:

\defineXMLenvironment[p]{}{\par}
\starttext
\startXMLdata
body
ptext/p
ptext/p
ptext/p
/body
\stopXMLdata
\stoptext

And it nicely indents the second and third paragraph.

I would use
\noindentation }
instead of
{\noindening} }
but both possibilities work out fine here.

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] multiple backgrounds

2006-01-14 Thread Henning Hraban Ramm
I'm playing around with layers and try to rewrite the letter style in  
a cleaner way.


How can I use several layers as page backgrounds and switch them on  
and off independently from each other?


With
\setupbackgrounds[rightpage][page][state=start, background=logolayer]
\setupbackgrounds[rightpage][page][state=start, background=senderlayer]
the second background overwrites the first, but I can't define them  
together, because there could be several combinations of 5-7 layers.


Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
http://www.cacert.org (I'm an assurer)

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] texexec and missing file

2006-01-14 Thread David Arnold

All,

If the file doesn't exist, here is what happens:

figures $ texexec --pdf --use=fig-make --mode=letter figlibSection3.xml

TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

fixing engine variable : pdfetex

total run time : 1 seconds
figures $

Would it not be better if texexec reported $filename not found or  
some such thing?



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context