Re: [NTG-context] tikz

2019-11-27 Thread Martin Althoff
In addition Hrabans note

When using tikz, don't use filenames with spaces.

not: picture test.tex, better: picture-test.tex

Building may work, so possibly not your error, but some text about pgf may 
appear in
the PDF and empty files (here eg pictures) maybe created. 

bye, Martin

On Wed, 2019-11-27 at 15:42 +, Ursula Hermann wrote:
> Then after compiling I have the following mistake:
>  
> Command Line:   context.exe --synctex=-1 "picture test.tex"
> Startup Folder: 
> C:\Users\Hermann\Downloads\context-mswin\tex\texmf-context\doc\context\sources\general\manuals\nodes
>  

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] maths simplifying fractions

2019-11-15 Thread Martin Althoff
sorry for the slow reply, a cold knocked me out.

Thanks Henri for pointing to a solution you already offered on stackexchange! I 
will save
it as a good universal solution.

Thanks to Kitz, for the very specific solution. This is what I am using at the 
moment.

This might help.
> https://tex.stackexchange.com/questions/501056/equivalent-of-cancelto-in-context
> 
> > 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] maths simplifying fractions

2019-11-13 Thread Martin Althoff
Hi all, I am writing some maths exercises that include simplifying fractions. 
For that
reason I would like to cross out some numbers. Unfortunately overstrike doesn't 
do the
trick, eg with a 4 the overstrike is practically invisible.

Is there any way to get a diagonal stroke like the latex module "cancel" can do?

Thanks for any suggestions,
Martin

\starttext
\startformula
\frac{\overstrike{2}}{\overstrike{4}} = \frac{1}{2}
\stopformula
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] circuitikz meters

2019-10-01 Thread Martin Althoff
Thanks for that Henri. I didn't expect a simple thing like that. As I had some 
similar
"glitches" before, I'll have a look through the module.

All the best, Martin

On Tue, 2019-10-01 at 14:03 +1300, Henri Menke wrote:
> Circuitikz uses \textbf inside, which is a LaTeX macro.  Unfortunately, this 
> is
> hardcoded within the ammeter and voltmeter nodes, so you can't easily change
> it.  Instead you can simply provide a macro that does the correct thing.
> 
> \usemodule[circuitikz]
> \let\textbf\bold % <---
> \starttext
> \starttikzpicture
> \draw (0,0)to[ammeter, t=A, i=$i$] ++(3,0);
> \draw (0,4) to[rmeter, t=V, v>=$v$] ++(3,0) ;
> \draw (0,2) to[voltmeter, l=$U$] (++3,2);
> \stoptikzpicture
> \stoptext
> 
> Cheers, Henri
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] circuitikz meters

2019-09-30 Thread Martin Althoff
Hello ...

I am drawing some simple circuits for an electro-physics class I am teaching 
using
circuitikz. Using meters gives some effects I don't quite understand.

The MWE works as shown. The commented lines fail with "Undefined control 
sequence". If I
put the same 3 lines into Latex (via Texstudio on Linux), just the opposite 
happens. The
line with rmeter fails, the other two work. 

Why the difference? Some version issue? The "circuitikz manual version 
0.9.4.pdf" shows
all 3 types of meters as choice. 

Actually I would prefer to use the "ammeter" and "voltmeter" within Context.

Thanks for any pointers.

Greetings, Martin

\usemodule[circuitikz]
\starttext
\starttikzpicture
%\draw (0,0)to[ammeter, t=A, i=$i$] ++(3,0);
\draw (0,4) to[rmeter, t=V, v>=$v$] ++(3,0) ;
%\draw (0,2) to[voltmeter, l=$U$] (++3,2);
\stoptikzpicture
\stoptext


Latex MWE, works as shown

\documentclass{article}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) to[ammeter, t=A, i=$i$] ++(3,0);
%\draw (0,4) to[rmeter, t=V, v>=$v$] ++(3,0) ;
\draw (0,2) to[voltmeter, l=$U$] (++3,2);
\end{circuitikz}
\end{document}


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] defs, variables and dimensions (was: passing variables/data between context and lua)

2019-09-29 Thread Martin Althoff
Hi Hraban,

I can't answer your question counter or \define. 

However in my specific situation I would not use the number as a counter but 
just as a value. Actually my situation is an exam in which the total points are 
44. From these I want to calculate percentages. And, as I find it easier to 
write calculations (electro physics and maths) in Lua, I then want to pass the 
results out to Context.

Greetings, Martin


> > > \define\question{44}
> > \defineexpandable\question{44}
> 
> Would it make sense to use a counter or some other TeX construct?
> 
> Is it better to use \setvariable(s) for simple values than any \def?
> 
> Should I use a \newdimen for every custom measure that I want to use with 
> \dimexpr, e.g.
> 
> \def\MyWidth{10mm}
> or better
> \newdimen\MyWidth
> \MyWidth=10mm
> ?
> 
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] passing variables/data between context and lua

2019-09-29 Thread Martin Althoff
Thanks for the quick answers. Both suggestions work for me. 

@Massi Thanks for the pointer into the cld-mkiv.pdf 

@Wolfgang: I have to admit that I don't completely comprehend your solution, 
though it
works. Searching around for the commands you use, I came across an older 
posting you
answered too:

https://mailman.ntg.nl/pipermail/ntg-context/2012/064326.html

That helps too. However I can find little documentation on the \setvariable/s 
commands.
I'll play around with the solution to understand it better. 




> \defineexpandable\question{44}

> A solution which uses only existing commands in the document.
> 
> \startsetups [martin]
>  \startlua
>  local points = tonumber(\getvariable{martin}{question}) or 0 ;
>points = points * 92 ;
>  local answer = 42 ;
>  context.setvariable("martin","points",points) ;
>  context.setvariable("martin","answer",answer) ;
>  \stoplua
> \stopsetups
> 
> \setvariable{martin}{set}{\directsetup{martin}}
> 
> \starttext
> 
> \setvariables [martin] [question=44]
> 
> Points: \getvariable{martin}{points}
> 
> The answer is \getvariable{martin}{answer}.
> 
> \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] passing variables/data between context and lua

2019-09-26 Thread Martin Althoff
Hi, I am trying to pass variables/data between context and lua. Lua would be 
used for
calculations on data coming from context.

Unfortunately I can't figure out what to do. The code below doesn't work, but 
is there to
illustrate my idea. 

Any help would be much appreciated. Thanks, Martin 


\define\question{44}

\starttext

\startluacode
local points = \question * 92
-- do some calculations with points and return to to context
answer=42
\stopluacode

% lots of Text in between 
The answer is \answer

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] comma as decimal separator in maths mode

2019-09-14 Thread Martin Althoff
Hi ... I am outputting some numbers in maths mode that have a comma as decimal 
separator.

I get a big space after the comma, which I can prevent by writing $1{,}5$ 

Is there a less awkward way of getting the comma as a "real" decimal separator?

Thanks, Martin

\starttext
$1,5$

\math{1,5}

$1{,}5$
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \date is calculated wrong

2019-09-11 Thread Martin Althoff
On Wed, 2019-09-11 at 08:42 +0200, Hans Hagen wrote:
> On 9/11/2019 4:15 AM, Martin Althoff wrote:
> > Hi all,
> > 
> > the \date is output wrong. Whatever value is given for d= I get the 11th. 
> > That is todays
> > date. Not sure what would happen tomorrow
> > 
> > Thanks for any fix suggestions.
> > 
> > \starttext
> > \date[d=16,m=9,y=2019][weekday, day,{. }, month, year]
> > \stoptext
> also in the latest beta?
> 
> Hans
> 

All fixed after updating to current version: 2019.09.10 20:03

Sorry for the noise, 

Thanks, 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \date is calculated wrong

2019-09-10 Thread Martin Althoff
Hi all,

the \date is output wrong. Whatever value is given for d= I get the 11th. That 
is todays
date. Not sure what would happen tomorrow

Thanks for any fix suggestions.

\starttext
\date[d=16,m=9,y=2019][weekday, day,{. }, month, year]
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tikz problem with fontsize

2019-09-01 Thread Martin Althoff
Thanks for all the replies.

@Ulrike: You are right, this example you give works for me too. Me experiencing 
it not
working must have come out of some strange constellation.

@Aditya: Yes, it does. But {} are needed: 

\tikzstyle{label}=[font={\switchtobodyfont[20pt] \red}]


@Hagen: Yes, most examples do use Latex commands. 

What confused me, was/is which commands are from the macro package i.e. Latex 
or Context
and which are actually Tikz. Integrating font handling makes sense. That is why 
the idea
of using Context font commands did not occur to me. 

With this in mind, I'll go back to some slightly different syntax used in Tikz 
3.1.4
manual and see what happens.

Thanks, Martin

On Sun, 2019-09-01 at 16:25 +0200, Ulrike Fischer wrote:
> Am Sun, 1 Sep 2019 13:05:10 +0200 schrieb Hans Hagen:
> 
> > what is \coordinate supposed to do:
> 
> it stores a coordinate under a name. And it works fine for me (I
> would have been quite surprised if not):
> 
> \usemodule[tikz]
> \starttext
> 
> \starttikzpicture
> \coordinate (a) at (1,1);
> \coordinate (b) at (2,2);
> \draw[red,<->](a)--(b);
> \stoptikzpicture
> \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tikz problem with fontsize

2019-09-01 Thread Martin Althoff
Hi Hans, thanks for this. Yes, that works. 

Am I right to assume that Context does not have a full tikz engine in the 
background due
to the module implementation? For example, the \coordinate command is unknown 
as well.

Is there any way to integrate a standalone tikz into context documents? Sort of 
like svg
is handled through inkscape.

Martin


> just use context font commands, like
> 
> \tikzstyle{label}=[minimum size=30mm,line 
> width=2mm,draw=blue!50,align=center,
> font=\bfx]
> 
> but i think you can also do more, like
> 
> \tikzstyle{label}=[minimum size=30mm,line 
> width=2mm,draw=blue!50,align=center,
> font=\bfx\red\setstrut]
> 
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] tikz problem with fontsize

2019-08-31 Thread Martin Althoff
Hello all, I am trying to set the fontsize in a tikz image and that is failing. 
Strangely
at the \node line with : ! Undefined control sequence.

As the MWE stands now, it will fail. The now commented line works.

main context file: 
/usr/local/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
current version: 2019.08.24 22:42

The fontsize statement work in kTikz.

What to do? Are there other ways to change font size in the Context TikZ?

Thanks for any input!

Martin


\usemodule[tikz]
\starttext

\starttikzpicture

\tikzstyle{label}=[minimum size=30mm,line
width=2mm,draw=blue!50,align=center,font=\fontsize{60}{60}\selectfont]
%\tikzstyle{label}=[minimum size=30mm,line width=2mm,draw=blue!50,align=center]

\node[label]  at  (1,1)  {88} ;
\stoptikzpicture
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] CrossWords Puzzles with context

2019-06-23 Thread Martin Althoff
Thanks for sharing this! Great help for me as a teacher :)

On Sun, 2019-06-23 at 19:06 +0100, Jorge Manuel wrote:
> After some attempts to build crosswords puzzles with context, I found this 
> approach:
> 
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] aligning rotated text in a natural table

2019-06-12 Thread Martin Althoff
Thanks for that Wolfgang. It doesn't seem to work though. The text stays at the 
left.

Meantime I have tried two other approaches. Only an approach using a \framed 
handles
longer lines.


My problem with the 3. \framed approach is: how do I get the size of the 
current table
cell? In the MWE I used fixed values, in the actual document that would not be 
good - too
many different cells.

I am trying a further approach using MetaPost and OverlayBox. Seems possible 
(line
wrapping also an issue), but quite involved...

Thanks, Martin

New MWS:


\setupTABLE[c][1][width=20mm]
\setupTABLE[c][2,3][width=30mm]
\setupTABLE[r][1][height= 50mm,align={lohi}]

\bTABLE
\bTR
\bTD \dontleavehmode{\rotate{1. a bit more text again, entering the age of long
sentences}} \eTD
\bTD \hbox to \dimexpr(.5\lineheight+.5\hsize){\hss{\rotate{2. a bit more text 
again, and
see if linebreaking works}}} \eTD
\bTD
\rotate[rotation=90,location=depth]{\framed[frame=on,align={lohi,middle},width=\dimexpr(\o
verlaywidth-05pt),width=48mm,height=29mm]{3. even more huge text, wondering 
where the
rabbit runs)}} \eTD
\eTR

\eTABLE


On Wed, 2019-06-12 at 22:23 +0200, Wolfgang Schuster wrote:
> Martin Althoff schrieb am 12.06.2019 um 13:11:
> > I am trying to align rotated text horizontally and vertically in a table 
> > cell. Vertically
> > is no problem, horizontally it fails. Non-rotated text is, of course, fine.
> > 
> > What can I do to fix the problem? Thanks for suggestions.
> > 
> > Martin
> > 
> > using: mtx-context | current version: 2019.05.18 10:42
> > PDF of my output is attached.
> > 
> > MWE:
> > 
> > \starttext
> > \setupTABLE[c][1][width=7mm]
> > \setupTABLE[c][2][width=30mm]
> > \setupTABLE[r][each][align={lohi,middle},height= 50mm]
> > 
> > \bTABLE
> > \bTR
> > \bTD \rotate[270]{\switchtobodyfont[8pt]a bit more text} \eTD
> 
> \bTD \dontleavehmode\rotate[...]{...} \eTD
> 
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] aligning rotated text in a natural table

2019-06-12 Thread Martin Althoff
Hi Willi,

thanks for the quick reply. I have the [align=lohi] as part of the setupTABLE 
statement.
Now I tried adding it into the particular cell -- again no effect even if I add 
"middle".

\bTD[align=lohi] \rotate[270]{\switchtobodyfont[8pt]a bit more text} \eTD

I suspect the rotate mechanism places the object independent of the align= 
statement. For
that reason some other handling might be needed. I just don't know which :)

Martin


On Wed, 2019-06-12 at 14:31 +0200, Willi Egger wrote:
> Martin, did you try to add [align=lohi]?
> 
> Willi
> 
> > On 12 Jun 2019, at 13:11, Martin Althoff  wrote:
> > 
> > I am trying to align rotated text horizontally and vertically in a table 
> > cell. Vertically
> > is no problem, horizontally it fails. Non-rotated text is, of course, fine.
> > 
> > What can I do to fix the problem? Thanks for suggestions.
> > 
> > Martin
> > 
> > using: mtx-context | current version: 2019.05.18 10:42
> > PDF of my output is attached.
> > 
> > MWE:
> > 
> > \starttext
> > \setupTABLE[c][1][width=7mm]
> > \setupTABLE[c][2][width=30mm]
> > \setupTABLE[r][each][align={lohi,middle},height= 50mm]
> > 
> > \bTABLE
> > \bTR
> > \bTD \rotate[270]{\switchtobodyfont[8pt]a bit more text} \eTD
> > \bTD blah \eTD
> > \eTR
> > 
> > \eTABLE
> > \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] aligning rotated text in a natural table

2019-06-12 Thread Martin Althoff
I am trying to align rotated text horizontally and vertically in a table cell. 
Vertically
is no problem, horizontally it fails. Non-rotated text is, of course, fine.

What can I do to fix the problem? Thanks for suggestions.

Martin

using: mtx-context | current version: 2019.05.18 10:42
PDF of my output is attached.

MWE:

\starttext
\setupTABLE[c][1][width=7mm]
\setupTABLE[c][2][width=30mm]
\setupTABLE[r][each][align={lohi,middle},height= 50mm]

\bTABLE
\bTR
\bTD \rotate[270]{\switchtobodyfont[8pt]a bit more text} \eTD
\bTD blah \eTD
\eTR

\eTABLE
\stoptext


rotate-test.pdf
Description: Adobe PDF document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] placing an MPGraphic/Lines over multiple table cells

2019-01-05 Thread Martin Althoff
I am trying to place some lines in "Z" shape over several cells of a 
table. This single "Z" has the intention of blocking manual alterations 
to the table in empty cells. The cells to blocked are always a coherent 
rectangle. I hope that makes sense.


In the example below, the table with 4 rows, 3 columns has content in 
column one only, the other 2 columns should have the "Z". Placing the 
blocking "Z" into every cell is not an option due to formal 
requirements.


What I attempted below a) seems very cumbersome b) doesn't work (the 
small "Z" doesn't fill the frame).


While I can easily place a "Z" into a single cell (in the example), I 
can't figure out how to cover multiple cells. Furthermore, I would need 
to do a lot of calculations to figure out the multiple layer placements, 
column positions, etc. With multiple tables on a page, several pages, 
that seems error prone.


Any suggestions, corrections, hints are most welcome!

Kindly, Martin


Working example with some comments:

% Graphic that draws the "Z", that works fine in a single table cell as 
seen in the example

\startuseMPgraphic{ZRule}
rulethickness:= \frameddimension{rulethickness}*3;

drawoptions(
withpen pencircle scaled rulethickness
withcolor \MPcolor{\framedparameter{framecolor}});

pair topleftcorner, toprightcorner;
topleftcorner := (rulethickness, \overlayheight-rulethickness-1.5mm);
toprightcorner:= (\overlaywidth-rulethickness, 
\overlayheight-rulethickness-1.5mm);


pair lowerleftcorner, lowerrightcorner;
lowerleftcorner := (rulethickness, rulethickness+1.5mm);
lowerrightcorner:= (\overlaywidth-rulethickness, rulethickness+1.5mm);


draw topleftcorner -- toprightcorner;
draw lowerleftcorner -- lowerrightcorner;
draw toprightcorner -- lowerleftcorner;
\stopuseMPgraphic

\defineoverlay[ZRule][\useMPgraphic{ZRule}]

\starttext

\setupTABLE[c][each][width=30mm]
\setupTABLE[r][each][width=6mm]

% in an attempt to place the table at known positions, I put it into a 
layer. Though it is not really "background".

\definelayer[datatable][x=0mm, y=0mm,width=\textwidth, height=25mm]
\setlayer[datatable][hoffset=0mm, voffset=0mm]{

\bTABLE
\bTR
\bTD content1  \eTD \bTD  \eTD \bTD  \eTD
\eTR
\bTR
\bTD content  \eTD \bTD  \eTD \bTD  \eTD
\eTR
\bTR
\bTD content  \eTD \bTD \eTD \bTD  \eTD
\eTR
\bTR
\bTD content  \eTD \bTD[background=ZRule]  \eTD \bTD  \eTD
\eTR
\eTABLE

}

% Now trying to create another layer covering the table area where the 
"Z" should go.

\definelayer[ZStrike][x=32mm, y=0mm,width=60mm, height=24mm]
% The "Z" fails to reach full size of the frame
\setlayer[ZStrike][hoffset=0mm, 
voffset=0mm]{\framed[frame=on,width=60mm,height=24mm]{\useMPgraphic{ZRule}}}


% arrange the "background" layers
\setupbackgrounds[text][background={datatable,foreground,ZStrike}]

\blank[force, 28mm]


further content

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] vertical alignment of images in Natural Table

2017-10-18 Thread Martin Althoff
Apologies if this is a double posting. But my first mail never appeared on the 
list.

Hello, I am trying to vertically align images within a bTABLE/Natural Table 
cell.

The result should be 4 cards on an A4 page with a simple maths exercise and a 
small image that illustrates the exercise. The image should be horizontally and 
vertically centered within the space after the text. Exercise text and image 
size vary somewhat, so a fixed placement is not possible.

I have tried \vfill, but it seems to have no effect in a Natural Table. 
Similarly, \placefigure has not worked for me.

As basic layout I am using a Natural Table (4 x 4 cells per page, 12 pages), 
maybe not the best solution. Alternative suggestions are most welcome. 

Suggestions would be much appreciated. 

Martin


\starttext
\setupTABLE[frame=on,offset=2mm]
\setupTABLE[c][1,2][width=.5\textwidth]
\setupTABLE[r][1,2][height=.5\textheight]

\bTABLE
\bTR
\bTD
7·3 apples are on a tree. Anne picks 4·3 apples.
\blank[.5em]
How many apples remain on the tree?

\framed[align={low,middle},location=lohi,width=local]{\externalfigure[apple]}
\eTD
\eTABLE
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] vertical alignment of images in Natural Table

2017-10-18 Thread Martin Althoff
Hello, I am trying to vertically align images within a bTABLE/Natural Table 
cell.

The result should be 4 cards on an A4 page with a simple maths exercise and a 
small image that illustrates the exercise. The image should be horizontally and 
vertically centered within the space after the text. Exercise text and image 
size vary somewhat, so a fixed placement is not possible.

I have tried \vfill, but it seems to have no effect in a Natural Table. 
Similarly, \placefigure has not worked for me.

As basic layout I am using a Natural Table (4 x 4 cells per page, 12 pages), 
maybe not the best solution. Alternative suggestions are most welcome. 

Suggestions would be much appreciated. 

Martin


\starttext
\setupTABLE[frame=on,offset=2mm]
\setupTABLE[c][1,2][width=.5\textwidth]
\setupTABLE[r][1,2][height=.5\textheight]

\bTABLE
\bTR
\bTD
7·3 apples are on a tree. Anne picks 4·3 apples.
\blank[.5em]
How many apples remain on the tree?

\framed[align={low,middle},location=lohi,width=local]{\externalfigure[apple]}
\eTD
\eTABLE
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] footnote numbers turn red

2012-07-31 Thread Martin Althoff
Hi Marco,
Thanks for that. Though it seems that is only part of the situation. With the 
definition, as you give it, the footnote numbers at the bottom of the page turn 
green, but the ones in the text remain black. I deleted all generated files 
just to be sure.

Martin

  The footnote numbers turn red(ish) as soon as \setupinteraction is 

 present.
 
  Is that intended?
 
 Yes, it is. There is a special setting, when the link appears on the
 same page, it's contrastcolor.
 
 \setupinteraction
   [state=start,
    color=darkblue,
    contrastcolor=green]
___
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] WG: Problem with simplefonts, placing of period

2012-07-31 Thread Martin Althoff
I just realized my mail was marked as spam..., not sure what impact that has.

Might be worth mentioning the Context version:
ConTeXt  ver: 2012.07.21 16:50 MKIV  fmt: 2012.7.21


Looking through the generated PDF the placement of other interpunctuation is 
also off and the text is running rather tight when \setscript[hanzi] is used. 

Thanks for any replies!
Martin


 I am experiencing a problem with the placement of the period . after 
 a sentence. In the example below it's the one after (Englisch). 
 Once the line \setscript[hanzi] is uncommented, the period sits under, 
 before or far after the closing bracket depending on borders or text 
 before/after.
 
 The question is: Is that a bug or feature? The key impact of setscript I see 
 is 
 on spacing/flow of text. A small amount of Chinese text in the complete 
 document 
 appears the same.
 
 Thanks,
 Martin
 
 
 \usemodule[simplefonts]
 
 \mainlanguage[de]
 
 \setupsimplefonts[size=11pt]
 \setmainfont[TeX Gyre Pagella]
 \setcjkmainfont[AdobeSongStd][regular={* Light},italic={AdobeKaitiStd 
 Regular},bold={AdobeHeitiStd Regular},bolditalic={AdobeHeitiStd Regular}]
 \setcjksansfont[AdobeKaitiStd][bold={AdobeHeitiStd 
 Regular},bolditalic={AdobeHeitiStd Regular}]
 \setcjkmonofont[AdobeFangsongStd][bold={AdobeHeitiStd 
 Regular},bolditalic={AdobeHeitiStd Regular}]
 
 
 %\setscript[hanzi]
 
 
 \setuppapersize[A4][A4]
 
 \setuplayout
 [
 backspace=45mm,
 height=fit,
 width=fit,
 rightmargin=10mm,
 leftmargin=30mm,
 ]
 
 \starttext
 
 auf der Stufe von A1-C1 (Deutsch) bzw. \quotation{Beginner} bis 
 \quotation{Upper Intermediate} (Englisch). \input{lorem}
 
 \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] footnote numbers turn red

2012-07-31 Thread Martin Althoff
OK, was using: 2012.07.21 16:50 MKIV.

Ran an update (now 2012.07.27 16:41 MKIV). Problem was in another place though 
(working on several docs at the moment).

A module had the line:

\setupfootnotes[textcolor=black]

Then adding this what you gave at a later point:

\setupinteraction
  [state=start,
  color=darkblue,
  contrastcolor=green]

only changed the footnote at the bottom of the page to green, not in the text 
body. That remained black. This cross dependence had confused me. 

Is that the intent contrastcolor as given on?

http://wiki.contextgarden.net/Command/setupinteraction

Martin


 Not here with 2012.07.27 16:41. Which context version are you

 running?
 
___
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] \bf disturbs flowing of text around image

2010-08-28 Thread Martin Althoff
In the example below (just updated minimals too) the \bf in the second 
paragraph prevents the text flowing around the picture, the text runs over the 
picture. Take \bf out and all is fine. If I use an \input statement instead of 
the lorem text the effect does not show. The image name is deliberate -- it 
does not exist on my system. 

What's going on? How to cause the text to flow around again?

Thanks,
Martin

\starttext
\input aesop-de

\placefigure[right]{bild}{\externalfigure[blah.jpg][width=.3\textwidth]}

\input aesop-de

\placefigure[right]{bild}{\externalfigure[blah.jpg][width=.3\textwidth]}

{\bf some stuff} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed 
do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim 
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\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] \bf disturbs flowing of text around image

2010-08-28 Thread Martin Althoff

 \dontleavehmode{\bf ...} ...
 
 or
 
 \bold{...} ...

Thanks Wolfgang,

\bold{...} ... doesn't work, \dontleavehmode{\bf ...} does work. 

Could you, or someone, give me an idea what is going on? Is something broken in 
the background? Am I using outdated (not current MKIV) syntax by just using \bf 
? It seems \dontleavehmode is just a glitch-fix.

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] table row span question

2010-08-26 Thread Martin Althoff
 As far as I know, this should be written as
 
 \DC \DL[3] \DR 

OK, maybe syntactically better -- actually changes the appearance too. Now the 
the columns that I do not want with lines have them and vice versa. Kind of the 
negative of what I need. 

The use of DC DL DR kind of eludes me. 

How to get better control? Somehow the commands seem to have their own life...

Thanks again
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] table row span question

2010-08-26 Thread Martin Althoff

 Use natural tables, they provide better control about the
 cell size and 
 layout.

Wolfgang, thanks! I wasn't aware of them. They don't seem to have found their 
way into contextref.pdf

I could do what I want and more! Below is the solution for my situation. 
Gleened from http://wiki.contextgarden.net/TABLE and the docs referenced on 
that page.

Martin

\setupTABLE[column][width=4cm]
\setupTABLE[column][1][width=1cm]
\setupTABLE[row][align={middle,lohi},height=6ex]
\bTABLE
\bTR \bTD Std \eTD \bTD Montag \eTD \bTD Dienstag \eTD \bTD Mittwoch \eTD \bTD 
Donnerstag \eTD \bTD Freitag \eTD\eTR
\bTR \bTD 1 \eTD \bTD[nr=2] mo \eTD \bTD[nr=2] di \eTD \bTD[nr=2] mi \eTD \bTD 
frei \eTD \bTD frei \eTD \eTR
\bTR \bTD 2 \eTD \bTD do \eTD \bTD fr \eTD \eTR
\bTR \bTD 3 \eTD \bTD mo \eTD \bTD di \eTD \bTD mi \eTD \bTD do \eTD \bTD fr 
\eTD \eTR
\eTABLE



___
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] table row span question

2010-08-25 Thread Martin Althoff
I am having trouble working out a solution for spanning some rows of tables. 
The instructions at http://wiki.contextgarden.net/Table got me so far as the 
example shows. 

The example is a timetable excerpt. So I want horizontal lines everywhere, 
except on Mo, Di, Mi (Monday Tuesday Wednesday) where there are double periods. 
Adding any more \DLs or \VLs results in not being able to translate the file or 
other errors. Currently the horizontal lines are not where they should be (now 
on Mo, Mi, Fr) but kind of evenly spread. 

Lastly: How do I control row height? 

thanks!
Martin

\setuppapersize[A4,landscape][A4]

\def\TagBreite{4cm}

\starttext

\placetable{Stundenplan} 
\starttable[|r w(1cm) |p(\TagBreite) c|p(\TagBreite) c|p(\TagBreite) 
c|p(\TagBreite) c|p(\TagBreite) c|] 
\HL
\VL Std \VL Montag \VL Dienstag \VL Mittwoch \VL Donnerstag \VL Freitag \VL\FR
\HL
% Row Span
\VL 1.  \VL \LOW{mo}\VL \LOW{di}\VL \LOW{mi}\VL do leer \VL fr leer 
\VL\MR
\DC \DL \DL \DL 
\DR
\VL 2.  \VL \VL \VL \VL do leer \VL fr leer \VL\MR
\HL 
\VL 3.  \VL  class  \VL  class  \VL class   \VL do class \VL fr 
class \VL\MR
\HL 
\stoptable

\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] xits font in ~/.fonts

2010-08-18 Thread Martin Althoff
Khaled,

a while ago I was getting strange results: wanted to use roman font got bold 
italic, etc. Font listing roman name and italic filename, all with several 
fonts.

I just deleted the font cache folder Did the trick for the time being.

./tex/texmf-cache/luatex-cache/context/hexnumber

 Dunno then, it is very confusing, some fonts are found by
 file name and
 some are not. Putting them in TEXMF tree makes them found.
 
 Regards,
  Khaled




___
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] (Open) Solaris minimals

2010-08-17 Thread Martin Althoff
I've been been OpenSolaris user, but mainly as a big data pot. Attempts with 
Minimals were cut short, because my OpenSolaris install had issues with 
updates. Seeing the news... No so sure if my need will be there.

Mac serves me fine for the time being.

Martin

 ... is there still any interest for OpenSolaris support in
 minimals?
 
 (At the moment OpenSolaris binaries are supposed to work,
 even though
 most probably nobody uses them.)
 
 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Numbering in Table of Content

2010-08-15 Thread Martin Althoff
 and it doesn't work. The title and subject parts never get
 into the generated TOC. Any idea why? Thanks very much! 

Not sure, seems to work for me. Though I do get two TOCs, one for front matter, 
one for body matter -- the limit of my knowledge is reached here.

Are you all current and updated?

Martin



toc entries.pdf
Description: video/flv
___
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] lettrine and setupalign cause Overfull \hbox errors

2010-08-12 Thread Martin Althoff

 For the moment, at least. Lettrine could be made smarter in
 mkiv, 

Good to know

 but I have no time.

I know that feeling! Not a big problem for me, I mean the errors. Good thing 
needs good time (Gut Ding braucht gut Weile.)

Take care, 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] Numbering in Table of Content

2010-08-11 Thread Martin Althoff
 Basically I need a few
 unnumbered entries at the top of the table (like abstract,
 acknowledgements, etc) 

Rio,

I handle this through using the unnumbered sectioning (\title, \subject..) and 
then a 

\definecombinedlist [content][title,chapter]

Essentially you add title to the already predefined list or combindedlist 
content. Read contextref for details. This then generates a TOC with 
\completecontent which includes the unnumbered sections/headers.

Regarding the numbering, you might gleen that from the sample document here:

http://wiki.contextgarden.net/Biochemistry_textbook


It all kind of goes like this:

\starttext

\startfrontmatter
\setuppagenumbering[conversion=romannumerals]
\completecontent
\stopfrontmatter

\startbodymatter
\setuppagenumbering[conversion=]
\setuppagenumber[number=1]
\title {Introduction}
\dorecurse{5}{\input tufte\par}
\chapter{Some Stuff}
\dorecurse{5}{\input tufte\par}
\stopbodymatter
\stoptext


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] Interaction and TOC/content problmes

2010-08-11 Thread Martin Althoff
I am having a couple of small problems with the interaction. In principle it's 
working, but...

1. The TOC is added to the bookmarks, which is fine, but with a lower-case c, 
ie. content

2. From http://wiki.contextgarden.net/PDF_Bookmarks_and_Headers I figured out 
how to get rid of the \crlf in the header. Actually, I'd be happy to just pass 
the word Introduction to the bookmarks and leave out the rest. Any way of 
doing that?

3. Strangely enough, placing \bookmark{Intro} after the \title {Introduction -- 
\crlf Welcome} replaces the content entry and points to the content, but 
putting a \bookmark after \completecontent leads to no output at all.

Thanks for any pointers !
Martin

\setupinteraction[
state=start,
color=,
contrastcolor=]

\setupcombinedlist[content][interaction=all]
\placebookmarks[chapter,title][force=yes]

\setuphead[chapter][interaction=list]

\setuplabeltext[chapter=Chapter~]

\definecombinedlist [content][title,chapter]

%strip the \crlf
\appendtoks \let\crlf\space \to \simplifiedcommands


\starttext

\startfrontmatter
\startstandardmakeup
\input tufte
\stopstandardmakeup
\completecontent
\stopfrontmatter


\startbodymatter

\title {Introduction -- \crlf Welcome}
%\bookmark{Intro}

\dorecurse{5}{\input tufte\par}

\chapter{Some Stuff}
\dorecurse{5}{\input tufte\par}

\chapter{An Addition}
\dorecurse{5}{\input tufte\par}

\stopbodymatter

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


[NTG-context] lettrine and setupalign cause Overfull \hbox errors

2010-08-11 Thread Martin Althoff
There appears to be some kind of clash between the lettrine module and setting 
up \setupalign[right] when used together: on a 200 page text every line has 
Overfull \hbox errors. 

As a (stupid?) side question: why is text, that aligns on the left edge of an 
odd-numbered page called right aligned?

Thanks, Martin

Demo:

\usemodule[lettrine]

\setupalign[right]

\starttext
\dorecurse{5}{\lettrine {T}{here} {\input tufte\par}}
\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] lettrine and setupalign cause Overfull \hbox errors

2010-08-11 Thread Martin Althoff
 Both are attempting to do something special with the
 paragraph
 shape, and the interaction is causing trouble.

Taco, thanks. Does that mean I have either live with it or forget about left 
alignment?

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] 2 sets of footnotes?

2010-08-09 Thread Martin Althoff
Does the job, thanks to Hans an Hraban!
Now, I'll have a look at putting that into the wiki.
Martin

 there you go

 \definenote [onenote] [location=page,way=bychapter]
 \definenote [twonote] [location=text,way=bychapter]

 \starttext

 \chapter{First}

 \section {Alpha} test \onenote{alpha one} \twonote {alpha
 two}
 \section {Beta}  test \onenote{beta  one}
 \twonote {beta  two}

 \subject {Notes} \placenotes[twonote]

 \chapter{Second}

 \section {Alpha} test \onenote{alpha one} \twonote {alpha
 two}
 \section {Beta}  test \onenote{beta  one}
 \twonote {beta  two}

 \subject {Notes} \placenotes[twonote]

 \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] 2 sets of footnotes?

2010-08-06 Thread Martin Althoff
Hraban, Thanks.

I will have a play with that -- I am always getting lost in the various sets of 
syntax rules (mk's, etc)...

You are right, the new MKIV syntax hints at possibilities. Is any documentation 
other than the footnote page on the wiki and a few recent posts? Do I really 
have to dig through the sources in base for switches, options, etc?



 In ConTeXt MkIV \setupfootnotes is gone, it's
 \setupnote[footnote] now (and the conversion parameter was
 renamed to numberconversion); you can deduct that there
 are several kinds of notes should be simply possible via
 \note[mynote]{} etc. (Since \note collides with MkII's
 \note, I don't know and I can't test at the moment.)


 Perhaps add your findings to http://wiki.contextgarden.net/Footnotes

Happy to do so. I have never written on contextgarden. Just go ahead and modify 
and expand? Or go through the discussion page first? I'm a bit on the cautious 
side here ..

Thanks,
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] Blank lines and \noindent

2010-08-06 Thread Martin Althoff
Marcus,


 After \blank I always need an
 \indenting[no].
 
 How do I set up this general behaviour?

Not sure if I read your question correctly. 

a. to disable indenting completely (which is default)

\setupindenting[no]

b. disabling in front of particular paragraphs seems to be a bit sensitive. I 
currently place an \noindentation in front of every paragraph where it needs to 
prevented. \noindentation tolerates blank lines between it an the text, however 
clashes with \inmargin. If they appear together indentation still takes place. 
My workaround: keep one word between the two. 

Not sure if this helps, and even answers your questions.

take care, 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] 2 sets of footnotes?

2010-08-05 Thread Martin Althoff
Hi all, I'm trying to do a (re-)layout for an older book which holds a few 
challenges for me. Hopefully I can find some help here.

In this book I need to track 2 kinds of footnotes, sidenotes and the original 
page numbering (I don't replicate the old text flow but put comments where 
pages originally change). My footnotes follow the current layout/flow, not the 
original layout.


My prime issue are having 2 sets of footnotes. One set of numbering (numbered 
1,2,3...) is reset every section, which I figured out(\setupfootnotes 
[way=section]). A second set results out of comments the original Author placed 
into the margins. They are counted a, b, c... and are reset every page. Both 
are placed at the bottom of the relevant page. A set of sidenotes in the form 
R nnn is used from 1 to the end of the book to indicate the pages and 
positions where these sidenotes where placed. Currently I am not linking the 
second set of footnotes i.e. the author notes and the sidenote counter. Though 
it might be a nice luxury to generate a list of all author notes.

I looked at lists and I suppose footnotes use the list mechanism in the 
background. But I don't get anywhere with that. Trying to keep track of the 
author notes, the placing with \placelist[AuthorComment] doesn't seem to work 
in the example below. Besides, I don't see how they would appear or be placed 
as footnotes.

In short: How do I get 2 sets of footnotes: one per section, one per page?

Extensive (sorry) example below.

Thanks Martin



\mainlanguage [de]

\setuppapersize[A5][A5]

\usetypescript[palatino]
\setupbodyfont[pagella,12pt]

\setupinmargin[style=\rmx]

\setupindenting[yes,small]
\indenting[next]

\setupfootnotes [way=section]

\definelist[SideNote]
\setuplist[SideNote][width=2em]

\definelist[AuthorComment]
\setuplist[AuthorComment][width=2em,alternative=d]

\starttext
\startfrontmatter
\completecontent[label=yes,alternative=c]
\placelist[SideNote]
\stopfrontmatter

% Seite 85


\chapter {Ein Kapitel}

Die Welt

\section {§ 14. Die Idee}

Das blah balh \inmargin[+][R63]{R. 63} \writetolist[SideNote]{1 }{Rand 63} Duis 
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
fugiat\writetolist[AuthorComment]{a}{YYY ZZZ} nulla pariatur. \footnote{Lorem 
ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor 
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis 
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in 
culpa qui officia deserunt mollit anim id est laborum.} Excepteur sint occaecat 
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est 
laborum.

\subsection{Header Header}

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
fugiat nulla Excepteur sint occaecat cupidatat non proident, sunt in culpa qui 
officia deserunt mollit anim id est laborum.

\placelist[AuthorComment]

\textrule[top]{Old page break}
\noindent
\inmargin[+][S4]{S. 4}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor 
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis 
nostrud \footnote{Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed 
do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim 
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 
proident, sunt in culpa qui officia deserunt mollit anim id est 
laborum.}exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
Duis aute irure dolor in reprehenderit 

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia 
deserunt mollit anim id est laborum.\inmargin[+][R64]{R. 64} 
\writetolist[SideNote]{2}{Rand 64} Duis aute irure dolor in reprehenderit in 
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint 
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim 
id est laborum.

\section {§ 99. Überhaupt}

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in 
culpa qui officia deserunt mollit anim id est \inmargin[+][R70]{R. 70} Duis 
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in 
culpa qui officia deserunt mollit anim id est laborum.


\stoptext





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

maillist : 

[NTG-context] Blank lines and \noindent

2010-08-05 Thread Martin Althoff
Just curious about the intented behaviour of \noindent. 

If I place it as shown in the example, the next paragraph will still be 
indented. However, if the blank line between \noindent and the following text 
is deleted or contains a comment, the following text will not be indented. Is 
this placement dependency intended? I thought I could use blank lines at 
liberty to style the sources. 

Secondly, is there any way of integrating the \noindent into the \textrule. 
Means: the paragraph following a textrule should not be indented. Not crucial, 
but would reduce the clutter in the sources. There are about 600 textrules... 
Not pretty, I know, but currently they are my indicator, that a page in the 
original book, from which the text comes, has changed. 

Thanks again, Martin


\setupindenting[yes,small]
\indenting[next]

\starttext
\input{davis}

% page 86 Old page header
\textrule[top]{Change of Page}
\noindent

\input{davis}

\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] Blank lines and \noindent

2010-08-05 Thread Martin Althoff
Wolfgang, thanks for the input. Got me a bit further.


 You should also use ConTeXt’s own commands \indentation
 and \noindentation.

OK, had taken them to be equivalent reading the manual. But I see the context 
commands do what I want...

 \input{...} is LaTeX style, to read files with spaces in
 ConTeXt you can use \input ... or \ReadFile{...}

I know (almost) nothing about Latex. It just seemed to conform to general 
context syntax and worked. Ah, well. 

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] CharisSIL doesn't load

2010-08-03 Thread Martin Althoff
Thanks Luigi, I note that down. But it didn't do the trick to solve the 
problem. Guess it is as Aditya said: there is a problem in principle at this 
point in time. 

Best, Martin


 luatools --generate
 mtxrun --script fonts --reload
 context --make
 




___
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] CharisSIL doesn't load

2010-08-03 Thread Martin Althoff
  \usetypescriptfile has changed. Earlier it used to
 load file.tex, but now it loads file.mkiv and therefore,
 none of the typescripts from the typescript module work. A
 short-term work around is to add

Ok, so a more fundamental problem. 

Both suggestions you made, work for me:

%workaround1
\ReadFile{type-charissil}
\setupbodyfont[charissil]

%workaround 2
%\usemodule[simplefonts]
%\setmainfont[Charis Sil]

Saves me copying my fixed and combined mkiv file after every update.

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] Minimals on windows 32 bit fails ?

2010-08-03 Thread Martin Althoff
Luigi,

check out Mojca's reply to my : minimals update issues

Martin

--- On Tue, 3/8/10, luigi scarso luigi.sca...@gmail.com wrote:

 From: luigi scarso luigi.sca...@gmail.com
 Subject: Re: [NTG-context] Minimals on windows 32 bit fails ?
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Date: Tuesday, 3 August, 2010, 4:25 PM
 On Tue, Aug 3, 2010 at 10:18 AM,
 Vnpenguin vnpeng...@vnoss.org
 wrote:
  Hi,
  Just install minimal on Windows-XP 32bit (VM). It
 works without error here :)
 
 Still same error as before
 -- 
 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
 ___
 



___
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] minimals update issues

2010-08-03 Thread Martin Althoff

 
 No way that i'm going back to messy encodings for
 patterns.
 
 Hans

I not worried and not pushing for a quick-fix (I went back to a previous 
edition (my fav zip-of-minimals-method)) and am happy to hold off with updates 
until there is a proper solution... 

cheerful 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] CharisSIL doesn't load

2010-08-02 Thread Martin Althoff
Using the typescript for CharisSIL as given doesn't work for me. Modern is 
substituted (as should be). It appears to load the mkiv file, but not the 
fonts, What am I doing wrong? Example below.

(on Mac: MTXrun | current version: 2010.07.30 11:35, LuaTeX, Version 
beta-0.61.0-2010072816)

-- I have adapted to the type-charissil.mkiv to fit the font names as reported 
on my system  and set 
OSFONTDIR=/System/Library/Fonts;~/FontLib/opensource;/Library/Fonts;~/FontLib/context-use;


mtxrun --script font --list --all --name --pattern=charis

charissil charissil 
/Users/martin/FontLib/opensource/CharisSIL/CharisSILR.ttf
charissilbold charissilbold 
/Users/martin/FontLib/opensource/CharisSIL/CharisSILB.ttf
charissilbolditalic   charissilbolditalic   
/Users/martin/FontLib/opensource/CharisSIL/CharisSILBI.ttf
charissilitalic   charissilitalic   
/Users/martin/FontLib/opensource/CharisSIL/CharisSILI.ttf
charissilnormal   charissilitalic   
/Users/martin/FontLib/opensource/CharisSIL/CharisSILI.ttf


The output shows that the the mkiv file is certainly found:
(/Users/martin/contextMini/tex/texmf-context/tex/context/third/typescripts/type-charissil.mkiv)
 


It _will_ work perfectly fine, i.e. work-around, if I combine the 
type-charissil.tex and type-charissil.mkiv into a single file! See my working 
type-charissil.mkiv below. I also hide the .tex file!




Example:

\setupbodyfont[charissil,12pt]
\starttext
\showbodyfont
\input tufte
\stoptext



Working type-charissil.mkiv

%D \module
%D   [   file=type-charissil,
%Dversion=2008.04.21,
%D  title=\CONTEXT\ Typescript Macros,
%D   subtitle=Charis SIL Font Definitions,
%D author=Wolfgang Schuster,
%D   date=\currentdate,
%D  copyright=Wolfgang Schuster]
%C
%C Copyright 2009 Wolfgang Schuster.
%C This file may be distributed under the GNU General Public License v. 2.0.
\starttypescript [serif] [charissil]
\setups[font:fallback:serif]
\definefontsynonym [Serif]   [CharisSIL-Regular]
[features=default]
\definefontsynonym [SerifItalic] [CharisSIL-Italic] 
[features=default]
\definefontsynonym [SerifBold]   [CharisSIL-Bold]   
[features=default]
\definefontsynonym [SerifBoldItalic] [CharisSIL-BoldItalic] 
[features=default]
\stoptypescript

\starttypescript [charissil]
\definetypeface [charissil] [rm] [serif] [charissil] [default]
\stoptypescript

\starttypescript [serif] [charissil]
\definefontsynonym [CharisSIL-Regular][name:charissil] 
[features=default]
\definefontsynonym [CharisSIL-Italic] [name:charissilitalic]  
[features=default]
\definefontsynonym [CharisSIL-Bold]   [name:charissilbold]
[features=default]
\definefontsynonym [CharisSIL-BoldItalic] [name:charissilbolditalic] 
[features=default]
\stoptypescript

\endinput




___
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] minimals update issues

2010-08-02 Thread Martin Althoff
Just ran ./first-setup.sh (yesterday it ran fine, now=5:20AM GMT 3.Aug) and it 
ends very ungracefully:
  

A section from some the first (of more) failure. Am I doing something wrong?


MTXrun | run: texexec --make --all --fast --pdftex cont-nl cont-enTeXExec | 
using search method 'kpsewhich'
TeXExec | using existing database
TeXExec | using tex engine pdftex
TeXExec | using tex format path 
/Users/martin/contextMini/tex/texmf-osx-intel/web2c/pdftex
TeXExec | generating tex format cont-nl
This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010) (INITEX)
 \write18 enabled.
 (/Users/martin/contextMini/tex/texmf-context/web2c/natural.tcx)
entering extended mode
(/Users/martin/contextMini/tex/texmf-context/tex/context/base/cont-nl.tex
(/Users/martin/contextMini/tex/texmf-context/tex/context/base/context.tex

snip


taal: geen afbreekpatronen gr voor gr (n=31,e=ec,m=ec) (lang-gr.pat
,lang-gr.pat)
taal: geen afbreekdefinities gr voor gr (n=31,e=ec,m=ec)
taal: afbreekpatronen agr voor agr geladen (n=32,e=agr,m=agr)
(/Users/martin/contextMini/tex/texmf-context/tex/context/patterns/lang-agr.pat
! Duplicate pattern.
l.137 ΐ1
  
? 




___
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] CharisSIL doesn't load

2010-08-02 Thread Martin Althoff
 There is a typo in the last line of type-charissil.tex:
 Change
 
 \loadmarkfile{charissil}
 
 to
 
 \loadmarkfile{type-charissil}
 
 Aditya
 

Aditya, thanks for that -- hope that typo gets fixed in the sources. 
Unfortunately that did not fix the problem. Despite runs of  

mtxrun --script font --reload
context --generate





___
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] Setting up protrusion, side-effects

2010-07-31 Thread Martin Althoff
 Could as well be a luatex backend problem so I have to
 discuss it with Taco and Hartmut.
 
 Hans
 

Hi Hans,

Thanks for  looking into this further. I have tried to drill down the effect 
being switchable through \setupfootertexts here are my results.

In the example below, I get (with the stress about the latest update, I 
refrained, running: LuaTeX, Version beta-0.60.2-2010070117; ConTeXt  ver: 
2010.07.27 16:30) I can switch/influence the horizontal collapse by (this is 
not a series of steps, each statement assumes starting with the example as 
given):

-- as given, the lines collapse.

-- en-/disabling \sc makes problem switchable

-- en-/disabling \setupfootertexts, problem switchable, however, once 
\setuppagenumbering is commented out, this does not work anymore. The error 
stays permanently.

-- enabling \input tufte in front of the \sc line causes the problem to 
appear permanently now. 

-- adding more tuftes before or after shifts the problem either way. But now 
the permutation of cases gets a bit much...





% protusion 
\definefontfeature [default][default][protrusion=quality,expansion=quality]
\setupalign[hz,hanging]


\setupfootertexts[chapter][pagenumber]
\setuppagenumbering [location=] 


\usetypescript[palatino]
\setupbodyfont[times,12pt]

\starttext

%\input tufte
%\dorecurse {5}{\input tufte}

{\sc Die Exposition der Frage}

Notwendigkeit, Struktur und Vorrang der Frage

\section {Wiederholung der Frage}

\dorecurse {5}{\input tufte}

\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] Setting up protrusion, side-effects

2010-07-31 Thread Martin Althoff

 It has to do with the backend resolving fontnames and
 expansions factors 
 and so ... first I need to hear from Hartmut what he thinks
 of it.


No stress :) I'll wait silently -- just wanted to submit, what I thought to be, 
useful info.

cheers, 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] Setting up protrusion, side-effects

2010-07-29 Thread Martin Althoff
I hate to pick up on this again, but... 

The basic Palatino, together with protrusion and small caps is causing issues. 
Essentially horizontal placing of the characters fails (see previous PDF).

In the example below, I can reliably cause the effect by commenting out (or 
not) the line with the \sc. 

This effect shows up the my real files. While trying to find the trigger by 
culling down the files, for a moment I could reliably (!) turn the effect on 
and off with the line %\setupfootertexts[chapter][pagenumber] and not changing 
the \sc lines. Weird side effect? Sorry, I can't reproduce that one anymore.

One way to reduce, but not prevent the effect, is if more plain text is output 
before using \sc. eg by adding an \input tufte beforehand. But once the text 
after the \sc is a bit longer ie. 10x tufte the effect will show again. Gut 
feeling: successive and cumulative rounding errors.

Question: Am I tripping over side effects? Is using SmallCaps a bad idea when 
using protrusion? It just feels odd that something like this would be so 
uncontrollable. Particularly since the palatino font is from the TexGyre set 
(so close to home)

Thanks for thoughts! Martin


\definefontfeature [default][default][protrusion=quality,expansion=quality]
\setupalign[hz,hanging]

%\setupfooter[text][before=\hairline,leftwidth=.85\textwidth,style=\tfx]
%\setupfootertexts[chapter][pagenumber]


%\usetypescript[palatino]
\setupbodyfont[palatino,12pt]

\starttext
%\input tufte
{\sc Erster Teil}

\input tufte
\stoptext

 Fonts are sometimes special and when ypu load a font it's
 setting (e.g. ligatures, protrusion etc.) are frozen. To change the
 settings you need \definefontfeature before \setupbodyfont, 
 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] using \definebodyfont with multiple size declarations -- Why?

2010-07-28 Thread Martin Althoff
 Can you show me a example where simplefonts is so slow.


Sure, here goes.

I should say, most of my documents are 1-5 pages and build time is usually 
under 5 seconds (2nd and higher runs). 

One (relatively) slow use of simplefonts is the Chinese example (1) below. The 
way I pasted it, it runs just under 13 seconds on 2nd and consecutive runs. Not 
using the adobe but eg the ht series is a whee faster.

It's not that I am doing huge amounts of Chinese, but jumping from, say, 3 to 
12 seconds, is considerably slower. I was hoping by creating a typescript I 
could speed things up a bit. Any suggestions welcome.

Standing corrected, the impact using eg. CharisSIL for phonetic/IPA symbols the 
impact is much less: eg. a jump from 2.8 to 4.8 seconds in Example (2) given 
below. The impact of 2 seconds is bearable!

Let me know if you want to see any output or whatever.

cheers, Martin


%Example (1)

\usemodule[simplefonts]

\setmainfont[texgyrepagella]
\setsansfont[texgyreheros]
\setmonofont[texgyrecursor]

\setcjkmainfont[adobesongstd]
\setcjksansfont[adobeheitistd]
\setcjkmonofont[adobefangsongstd]

% ttf fonts htsong, hthei, htkai, htfs from:
% http://ftp.ctex.org/pub/tex/fonts/truetype/ttf/

%\setcjkmainfont[htsong] % serif, regular
%\setcjksansfont[hthei] % sans
%\setcjkmonofont[htsong] % mono

\setscript[hanzi]

\starttext

Where there is a will, there is a way.

我命由我不由天
\blank
{\rm Serif:  兡也包因沘氓侷柵苗孫孫財 text 兡也包因沘氓侷柵苗孫孫財}
%{\ss Sans:  兡也包因沘氓侷柵苗孫孫財 text 兡也包因沘氓侷柵苗孫孫財}
%{\tt Mono:  兡也包因沘氓侷柵苗孫孫財 text 兡也包因沘氓侷柵苗孫孫財}

\stoptext



% Example (2) - Not sure if the IPA symbols post properly...

\usemodule[simplefonts]
\setmainfont[CharisSIL] 

\starttext
besser [ˈbɛsɐ], der [deːɐ] 

d͡ʒ
\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] Setting up protrusion, side-effects

2010-07-28 Thread Martin Althoff
 Fonts are sometimes special and when ypu load a font it's
 setting (e.g. ligatures, protrusion etc.) are frozen. To change the
 settings you need \definefontfeature before \setupbodyfont, 

OK, got it. Makes sense! 

Could this also be extended to \switchtobodyfont, in case I am using more then 
one font. Any \definefontfeature statements would have to be done before 
switching to any new font?

In regard to the use of \showbodyfont in combination with protusion (the second 
mentioned problem) messing up palatino (ie. TexGyre Pagella), does that mean 
\setupbodyfont is doing some background work causing the layout following it 
to fail when protrusion is applied?

Thanks again, 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] using \definebodyfont with multiple size declarations -- Why?

2010-07-28 Thread Martin Althoff
 cjk fonts are huge ... are you using a slow machine with
 not that much memory?

Hi Hans, well, slow is kind of right: MacBook 2GHz Core Duo (first series of 
MacBooks), but 2GB of RAM is something I would think to be ok. For the Chinese 
example I see:

mkiv lua stats : current memory usage  - 147 MB (ctx: 150 MB)

Not exactly challenging -- if that's a key number.

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] using \definebodyfont with multiple size declarations -- Why?

2010-07-28 Thread Martin Althoff
Hans, thanks for the detailed answer! My understanding is slowly advancing :D


 in principle we could do without, but this helps
 predefining a couple of things that otherwise would slow
 down each font switch

This confirms my (vague) assumption that deep in the internals it helps 
structure things.

 it also relates to bodyfont environments where there are
 relationships between sizes

... thereby creating the a font enviroment


 in practice, if you choose say 13pt it will work out
 ok  as things are checked and defined on the fly; but
 there might be a slight performance hit

This goes towards my fear: I prefer to state things explicitly. Automagic 
that happens in the background covering up for my sloppyness is great, but... 
creates confusion when things trip up. Internals might change. Or I might have 
been building on side effects for all I know. 

For this reason examples with wordy declarations are welcome... Working with 
hard-blocking Modula compilers was a good teacher, but that's long ago.


 you probably want features enables, so *default
 \definefont [WonderFont] [BoldItalic*default sa 4.8]

Hm, I'll have to read up on that one. 

Thanks ! 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] using \definebodyfont with multiple size declarations -- Why?

2010-07-28 Thread Martin Althoff
 indeed. in that case it's mostly the cpu caches that
 matter

Ah... Time to save some money for new hardware 



___
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] using \definebodyfont with multiple size declarations -- Why?

2010-07-28 Thread Martin Althoff
 While \MODULA\ taught me to structure, \TEX\ taught me to think recursive.

I would certainly go along with the teaching structure part for Modula! 



___
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] Minimals without rsync - again?

2010-07-28 Thread Martin Althoff
As I am working in China at the moment, rsync only works sporadically (super 
slow, possibly not at all for a couple of days, then at high speed for a day or 
two), kind of soft blocked. Having clobbered my installation of minimals (and 
other things) because of it, 

Not a solution, but a crutch: zip up the whole minimals folder before running 
rsync. For me that's just under 130MB. Date the file, keep a few...

Maybe the now suggested solution will work for me sometime in the future. 
Currently I am on holiday outside of China. rsync works like a charm in 
Indonesia. 

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] using \definebodyfont with multiple size declarations -- Why?

2010-07-27 Thread Martin Althoff
As someone new to Context, I am trying to get to grips with font handling. 
Reading through a fair amount of documentation it is not always to clear to me 
what recommended practice in todays Luatex/MKIV enviroment is.

My setup is Minimals updated 26.7.2010 (luatex 0.60.2, MTXrun 2010.07.22) 
setup on Mac OS X 10.6.4. I use it to produce documents I need in a language 
teaching environment. As I am starting of without legacy documents, there is no 
need for MKII or any other type of Tex.

Confusing for me is the use of \definebodyfont in typescripts. I read in 
co-fonts.pdf (no release date, internal creation date 18/11/2009):

because Latin Modern comes in design sizes, there was a need to associate a 
specific font with each bodyfont size. You may find yourself in a similar 
situation when you attempt to create a typescript for a ‘professional' 
commercial font set.

Looking at the example:

\definebodyfont [10pt,11pt,12pt] [rm] [tfe=Serif at 48pt, ite=SerifItalic at 
48pt] 
\tfe Big {\it Words}.

What I simply don't understand is the need for multiple font size declarations. 
I can (kind of) see that it might be necessary (looking at typescripts), if the 
whole typescript resolves to design sizes where each point size is a single 
font file. But for ttf/otf fonts, ie. where the font is scaled?


This minimal example, including a special font (TitleFont) works (almost) 
fine for me. 

% the only two statements to declare the fonts I want to use
\usetypescriptfile[type-otf] % being default, I could even miss this 
declaration 
\setupbodyfont[pagella,10pt]

\definefont [WonderFont] [BoldItalic sa 4.8]

\starttext
{\WonderFont The Big Title}
\input aesop-de
\stoptext

I do get one consistant error (the 5pt can vary depending on the size I give 
in setupbodyfont): 

{/Users/martin/contextMini/tex/texmf-context/fonts/map/pdftex/context/mkiv-px.map}
virtual math the mapping is incomplete for 'pxmath' at 5pt

Though, the document looks fine. Does the error hint I am missing something? 
What is good practice in Luatex/MKIV to access the desired fonts?


My questions: 

- when do I need to use the multiple point sizes at all in a Luatex/MKIV 
environment?
- when would I need to provide that information in typescript files I need to 
create? (simplefonts is very slow to load fonts with phonetic symbols)

Any tips to help my understanding would be appreciated!





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