Re: [NTG-context] More on XML and citations

2006-04-05 Thread Johannes Graumann
Taco Hoekwater wrote:

>> Taco, how would I
>> define a new 'cite' alternative along the lines
>> of 'authoryear'/'authoryears' that would result in 'Author et. al.,
>> 2004'?
> 
> Easiest is by using a special macro breaking it up in two bits, like so:
> 
>\def\mycite#1{\cite[author][#1], \cite[year][#1]}
> 
> there is a way to create 'official' alternatives, but it is quite a
> bit more cumbersome.
Thanks for that. The problem here is that I use XML as the text source and
would like to be able to use 'authoryear', 'authoryears' as well
as 'mycite' occasionally, which I switch to and from by the 'opt' option in
e.g.  ''. If I understand your above
proposal correctly, I would have to literally call '\mycite[hunt:86]' on
the TeX level, and would have to abandon XML ... and thus the reason to
switch from LaTeX to ConTeXt to begin with - and nobody would want that ;0)
Could you - maybe - point me towards the more cumbersome 'official'
solution?

Thanks for your help,

Joh

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


Re: [NTG-context] Problem with encoding, XML and writetolist...

2006-04-05 Thread Martin Kolařík
Hi Hans and Vit,

I've attached pdf and tex made with "texexec 8bit.tex" using the last beta 
(with cp1250 regime). The version chapterB is what I am using now, chapterA 
version is straightforward but not functional.

>From this my ideas from last mail came -- when I am expanding \XMLflush 
>exactly and controlled, result is OK (the expansion stops before active 
>characters start to expand.

IMHO, the solution on character level is something different (although it works 
:-); yes, I did not study Vit's problems from year before. I never had a 
problems with simple TeX (\chapter{čřžý}), only with XML :-), so for me it 
would be sufficient solve XML level. Of course, if it is stuff of other level, 
it cannot be solved in XML.

Thanks, Martin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Hans Hagen
Sent: Wednesday, April 05, 2006 1:03 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] Problem with encoding, XML and writetolist...


Vit Zyka wrote:
> Martin Kolařík wrote:
>   
>> Hi Hans,
>>
>> I've analyzed the situation using different combinations of regimes and 
>> encodings, including switching off handling (\donothandleactivecharacter) 
>> and it seems to me, that every text with chars > 127, which is fully 
>> expanded (as in 8bit.tex), must cause difficulties, because TOC entry read 
>> back from TUO is scanned independently and thus spaces are gobbled.
>> 
>
> Hi Martin,
>
> we have discussed this problem a year ago. In that time I solve it just 
> writing '{}' in each title where was needed, like
>
>\chapter{Dobré{} ráno}
>
> Now I have cooked an automatic solution. It is not optimal (effective) 
> but working. The only needs is to redefine
>
>\def\numcharacter#1{\char#1{}}
>\let\dochar\numcharacter
>
> and to load appropriate encoding file once more. Since it is banned a 
> new macro \reuseencoding was introduce:
>
> For Hans:
> It would be nice if this feature was enabled in a standard distro. 
> Perhaps you will find some more optimal solution...
>
> ---
> \unprotected
> \def\doreuseencoding#1%
>{\letvalue{\c!file\f!encodingprefix#1}\empty
> \makeshortfilename[\f!encodingprefix#1]%
> \startreadingfile
> \readsysfile\shortfilename
>   {\showmessage\m!encodings2{#1}}
>   {\showmessage\m!encodings3{#1}}%
> \stopreadingfile}
> \def\reuseencoding[#1]%
>{\processcommalist[#1]\doreuseencoding}
>
>
> \def\numcharacter#1{\char#1{}}
> \let\dochar\numcharacter
>
> \reuseencoding[ec]
>
> \enableregime[latin2]
>
> \starttext
> \writetolist[chapter]{1}{Dobré ráno}
> \expanded{\writetolist[chapter]{2}{Dobré odpoledne}}
>
> \placecontent
> \stoptext
>   
the {} may break liguature building (and maybe kerning) ... taco knows ...

I got a brainwave ... 

\enableregime[latin2]

\starttext

\def\numcharacter#1{\rawcharacter{#1}}%
\let\dochar\numcharacter

\writetolist[chapter]{1}{Dobré ráno}

\expanded{\writetolist[chapter]{2}{Dobré odpoledne}}

\placelist[chapter][criterium=text]

test

\typefile{test.tuo}

\stoptext

this can be sped up (a bit) with 

% \dostepwiserecurse{0}{255}{1}
%   {\setevalue{rchr:\recurselevel}{\rawcharacter\recurselevel}}

% \def\rawcharacter#1{\getvalue{rchr:#1}}

this means that all chars are round tripped to themselves in output files! 

raw characters are not active and they are therefore equivalent to \char  

it's enough then to put 

\def\numcharacter#1{\rawcharacter{#1}}%
\let\dochar\numcharacter

into cont-new.tex 

(i will discuss this in more detail with taco later) 

Hans 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


8bit.pdf
Description: Adobe PDF document


8bit.tex
Description: Binary data
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] version dates confuse me after upgrade

2006-04-05 Thread Sanjoy Mahajan
I just upgraded following the instructions on the wiki, and wanted to
check that it went well and that the newer ones were being found --
always a nightmare subject in *TeX* with paths configurable by a
combination of environment variables, config files, and config files
chosen by other env variables.  So:

$ texexec --version

 TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

   texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
   texutil : TeXUtil 9.0.1 - ConTeXt / PRAGMA ADE 1992-2006
   tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
   context : ver: 2006.03.25 13:21
   cont-en : ver: 2005.01.31  fmt: 2006.3.28  mes: english

Here is the version line in the output of 'texexec somerandomfile.tex':

  ConTeXt  ver: 2006.03.25 13:21  fmt: 2006.4.6  int: english  mes: english

The context version date match what texexec --version produces (though
texexec doesn't give the fmt date).  But what does the early cont-en
version date (2005.01.31) mean?

-Sanjoy

`A society of sheep must in time beget a government of wolves.'
   - Bertrand de Jouvenal
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Myway on using mathalign

2006-04-05 Thread Aditya Mahajan
On Thu, 6 Apr 2006, WN wrote:

> [EMAIL PROTECTED] wrote:
>> On Wed, 5 Apr 2006, WN wrote:
>>> One thing I want to do with a set of subformula's is
>>> to reference the main formula but still subnumbering the equations
>>> like
>> 
>> Try this. Warning: I do not know everything that is happening here. There 
>> may be some unexpected side effects.
>> 
>> \unprotect
>> \def\placesubformulawithnumber{%
>>   \dodoubleempty\doplacesubformulawithnumber}
>> 
>> \def\doplacesubformulawithnumber[#1][#2]%#2 gobbles spaces
>>   {\iffirstargument
>> \incrementnumber[\v!formula]
>> \makesectionnumber[\v!formula]
>> \rawreference{\s!for}{#1}{\composedsectionnumber}
>>   \else
>> \incrementnumber[\v!formula]
>>   \fi\placesubformula}
>> \protect
>> 
>> 
>>> \starttext
>> %% > \incrementnumber[formula]
>> %% > \placesubformula
>> \placesubformulawithnumber[eqn1] %I need to think of a smaller name
>>> \startformula
>>> \startalign
>>> \NC div  \vec{E} \NC =  \epsilon_{0}^{-1} \rho  \NR[eqn1:A][a]
>>> \NC rot  \vec{E} \NC =  0 \NR
>>> \NC div  \vec{B} \NC =  0 \NR[eqn1:B][b]
>>> \NC rot  \vec{B} \NC =  \mu_{0} \vec{j} \NR
>>> \stopalign
>>> \stopformula
>>> See *\in[eqn1] *for the static Maxwell equations, where we are going to 
>>> examine \in[eqn1:A] a bit further 
>>> \stoptext
>>> 
>> 
>> Also, note that div and rot should be in text font. You should probably do
>> \startmathcollection[default]
>>   \definemathcommand [div]  [nolop] {\mfunction{div}}
>>   \definemathcommand [rot]  [nolop] {\mfunction{rot}}
>> \stopmathcollection
>> 
>> and use \div \rot etc.
>> 
> Hi Aditya,
> I tested your solution and it works great. I cannot see any problems 
> in my output. I wish I had your Tex programming skills, I am trying 
> to learn the language myself from the TexBook (D.Knuth) but I still 
> have a long way to go.

Well, I do not understand Tex. What I usually do is look at the 
context source, which is much easier to read than latex internals, and 
then copy from there, play around a bit, and sometimes things 
work.

> Another test to check that the formula numbers work as expected
> \placeformula[kem-chapter-eqn11]
> \startformula
> \cases{
> \eqalign{
> \widehat{\vec{x}} &= - \vec{x} \cr
> \widehat{t} & = t \cr
> }}
> \quad \text{resp.} \quad
> \cases{\eqalign{
> \widehat{\vec{x}} &=  \vec{x} \cr
> \widehat{t} & = -t \cr
> }}
> \stopformula

How about

\definemathmatrix
   [group]
   [left={\left\{\,},right={\right.}]

\startformula
   \startgroup
 \NC \widehat{\vec{x}} \NC= - \vec x \NR
 \NC \widehat t\NC= t\NR
   \stopgroup
   \quad \text{resp} \quad
   \startgroup
 \NC \widehat{\vec{x}} \NC= \vec x \NR
 \NC \widehat t\NC= -t \NR
   \stopgroup
\stopformula

There is also startstop cases, but that does not give the correct 
spacing in this case. May be useful otherwise.

\startformula
   \startcases
 \NC \widehat{\vec{x}} \MC= - \vec x \NR
 \NC \widehat t\MC= t\NR
   \stopcases
% Read MC as Math Column, there is also the usual NC
% which gives a text column
   \quad \text{resp} \quad
   \startcases
 \NC \widehat{\vec{x}} \MC= \vec x \NR
 \NC \widehat t\MC= -t \NR
   \stopcases
\stopformula


HTH,
Aditya

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


Re: [NTG-context] placefigure: mysterious whitespace with 'rightmargi n'figures

2006-04-05 Thread David Arnold
Sanjoy,

Hans had me do the following and it worked.

\placefigure
[inright,reset][fig:graphmap]
{A mapping diagram for $f$.}
{\externalfigure[graph1][width=\marginwidth]}


On Apr 5, 2006, at 9:49 PM, Sanjoy Mahajan wrote:

> I tested the following on the context live.  Both figures are in the
> margin, but the first and second paragraphs have a large gap between
> them with figure 1 in the margin, beside the gap.  My first theory was
> that the margin figure requires the whitespace (unlikely, I know).   
> But
> that theory didn't last long: If I restore the commented-out '\input
> knuth' line, then the layout has no gaps.
>
> ==
> \useMPlibrary[dum]
>
> \starttext
> \input tufte
> \placefigure[rightmargin]{first}{\externalfigure[dummy]} \par
> %\input knuth
> \placefigure[rightmargin]{third}{\externalfigure[dummy]} \par
> \input knuth
> \stoptext
> ==
>
>
> -Sanjoy
>
> `A society of sheep must in time beget a government of wolves.'
>- Bertrand de Jouvenal
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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


[NTG-context] placefigure: mysterious whitespace with 'rightmargin' figures

2006-04-05 Thread Sanjoy Mahajan
I tested the following on the context live.  Both figures are in the
margin, but the first and second paragraphs have a large gap between
them with figure 1 in the margin, beside the gap.  My first theory was
that the margin figure requires the whitespace (unlikely, I know).  But
that theory didn't last long: If I restore the commented-out '\input
knuth' line, then the layout has no gaps.

==
\useMPlibrary[dum]

\starttext
\input tufte 
\placefigure[rightmargin]{first}{\externalfigure[dummy]} \par
%\input knuth
\placefigure[rightmargin]{third}{\externalfigure[dummy]} \par
\input knuth
\stoptext
==


-Sanjoy

`A society of sheep must in time beget a government of wolves.'
   - Bertrand de Jouvenal
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] placefigure feature request ?

2006-04-05 Thread Sanjoy Mahajan
Hans Hagen <[EMAIL PROTECTED]> wrote:

> Sanjoy Mahajan wrote:
> >context : ver: 2005.01.31
> >cont-en : ver: 2005.01.31  fmt: 2006.3.28  mes: english
> >
> > Maybe this context installation is too old for nocheck.  On the other
> > hand, it should complain then?
> >   
> i remember a bug (actually the mechanism is rather old, so the bug
> must have been a temp one)

I tried it on context live (2006.04.04), and it works as hoped (figure 2
is the on on top of the page with numbering=nocheck, otherwise it's
numbered in page order).  Definitely I need to do an upgrade.

But I noticed another problem: The context-live pdf is black/white,
whereas on my system the figures come out in color.  I could reproduce
the difference with the following:

$ texexec --pdf 3  => 3.pdf is B/W

versus

$ texexec 3.tex
$ dvips 3
$ ps2pdf 3.ps   => 3.pdf is in color

texexec --color makes the two pathways give identical pdf files, but
shouldn't they also be identical (and B/W) without the --color?  Or is
that too much of a mess, to inquire into what colors the metapost (or
other EPS) figures are doing.

-Sanjoy

`A society of sheep must in time beget a government of wolves.'
   - Bertrand de Jouvenal
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Extending the black circled numbers

2006-04-05 Thread nico
On Wed, 05 Apr 2006 22:52:33 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote:

> nico wrote:
>> It seems to be related to some font loading stuff, since when I don't  
>> put
>> \ss I haven't this. So, if I put the following in the test I have no  
>> more
>> the problem.
>>
> strange, here it shows twice the same size
>
> \starttext
> {\tracingall\setbox0\hbox{\ss 99}\the\wd0}
> \stoptext
>
> may give some info where a blank space (or so) creeps in

Looking at the log, I've found blank spaces after "\pdfobj reserveobjnum"  
in enco-pfr.tex. Removing them makes the file compile ok (the bubbles are  
all the same :-).

\def\dodoincludepdffontresource
   {% does this font has an encoding specified vector
\doifsomething\currentencoding % no \ifx
  {% is there a pdf font encoding resource file defined
   \ifcsname\pdffontresource\endcsname
 % (fake) object defined
   \else\ifcsname\pdffontfileresource\endcsname
 % is there a resource already included
 \doifsomething\pdffontfileresource
% --> {\pdfobj reserveobjnum {}% <-- blank space
   {\pdfobj reserveobjnum{}%
\setxvalue\pdffontresource{\the\pdflastobj}%
\flushatshipout{\dododoincludepdffontresource{\currentencoding}}}%
%\doglobal\appendetoks
%  \noexpand\dododoincludepdffontresource{\currentencoding}%
%\to \everybeforeshipout}% prevent multiple loading
   \fi\fi
   \ifcsname\pdffontresource\endcsname
 \expanded{\pdffontattr\font{/ToUnicode  
\csname\pdffontresource\endcsname\space0 R}}%
 % do it only once for each font
 \letgvalue{\s!ucmap\fontfile}\empty
   \fi}}
...
\def\dodoincludepdffontresource
   {\doifsomething\currentencoding % no \ifx
  {\expandafter\ifx\csname\pdffontresource\endcsname\relax
 \expandafter\ifx\csname\pdffontfileresource\endcsname\relax\else
   \doifsomething\pdffontfileresource
% -->   {\pdfobj reserveobjnum {}% <-- blank space
 {\pdfobj reserveobjnum{}%
  \setxvalue\pdffontresource{\the\pdflastobj}%
  \flushatshipout{\dododoincludepdffontresource{\currentencoding}}}%
%  \doglobal\appendetoks
%\noexpand\dododoincludepdffontresource{\currentencoding}%
%  \to \everybeforeshipout}% prevent multiple loading
 \fi
   \fi
   \expandafter\ifx\csname\pdffontresource\endcsname\relax\else
 \expanded{\pdffontattr\font{/ToUnicode  
\csname\pdffontresource\endcsname\space0 R}}%
 % do it only once for each font
 \letgvalue{\s!ucmap\fontfile}\empty
   \fi}}

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


Re: [NTG-context] Myway on using mathalign

2006-04-05 Thread WN

[EMAIL PROTECTED] wrote:

On Wed, 5 Apr 2006, WN wrote:

One thing I want to do with a set of subformula's is
to reference the main formula but still subnumbering the equations
like


Try this. Warning: I do not know everything that is happening here. 
There may be some unexpected side effects.


\unprotect
\def\placesubformulawithnumber{%
  \dodoubleempty\doplacesubformulawithnumber}

\def\doplacesubformulawithnumber[#1][#2]%#2 gobbles spaces
  {\iffirstargument
\incrementnumber[\v!formula]
\makesectionnumber[\v!formula]
\rawreference{\s!for}{#1}{\composedsectionnumber}
  \else
\incrementnumber[\v!formula]
  \fi\placesubformula}
\protect



\starttext

%% > \incrementnumber[formula]
%% > \placesubformula
\placesubformulawithnumber[eqn1] %I need to think of a smaller name

\startformula
\startalign
\NC div  \vec{E} \NC =  \epsilon_{0}^{-1} \rho  \NR[eqn1:A][a]
\NC rot  \vec{E} \NC =  0 \NR
\NC div  \vec{B} \NC =  0 \NR[eqn1:B][b]
\NC rot  \vec{B} \NC =  \mu_{0} \vec{j} \NR
\stopalign
\stopformula
See *\in[eqn1] *for the static Maxwell equations, where we are going 
to examine \in[eqn1:A] a bit further 

\stoptext



Also, note that div and rot should be in text font. You should 
probably do

\startmathcollection[default]
  \definemathcommand [div]  [nolop] {\mfunction{div}}
  \definemathcommand [rot]  [nolop] {\mfunction{rot}}
\stopmathcollection

and use \div \rot etc.

HTH,
Aditya



Hi Aditya,
I tested your solution and it works great. I cannot see any problems in 
my output.
I wish I had your Tex programming skills, I am trying to learn the 
language myself from

the TexBook (D.Knuth) but I still have a long way to go.

BTW

Thanks for your comment on the div, rot.
I indeed defined the div and rot in text font, it is defined in one of 
my environment settings.

Attached my small Context script to confirm your solution

Again thanks for your help,
Kind regards
Wim

\unprotect

% = Aditya code 
\def\placesubformulawithnumber{%
  \dodoubleempty\doplacesubformulawithnumber}

\def\doplacesubformulawithnumber[#1][#2]%#2 gobbles spaces
  {\iffirstargument
\incrementnumber[\v!formula]
\makesectionnumber[\v!formula]
\rawreference{\s!for}{#1}{\composedsectionnumber}
  \else
\incrementnumber[\v!formula]
  \fi\placesubformula}

\startmathcollection[default]
  \definemathcommand [div]  [nolop] {\mfunction{div}}
  \definemathcommand [rot]  [nolop] {\mfunction{rot}}
\stopmathcollection 
% =
\definereferenceformat [informula] 
[left=(, right=), text=]

\protect 

\starttext
Some math tests, use of formula/subformula numbering.
\placesubformulawithnumber[kem-chapter1-eqn1]
\startformula
\startalign
\NC \div  \vec{E} \NC =  \frac{\rho}{\epsilon_{0}}\NR[kem-chapter1-eqn1:A][a]
\NC \rot  \vec{B}  \NC =  \mu_{0}  \:\vec{j}  
\NR[kem-chapter1-eqn1:B][b]
\NC \div  \vec{B} \NC =  0\NR[kem-chapter1-eqn1:C][c]
\NC \rot  \vec{E} + \frac{\partial \vec{B} }{\partial t} \NC = 0  
\NR[kem-chapter1-eqn1:D][d]
\stopalign
\stopformula
See \informula[kem-chapter1-eqn1] or alternatively
\informula[kem-chapter1-eqn1:A], 
\informula[kem-chapter1-eqn1:B],\informula[kem-chapter1-eqn1:C] or
\informula[kem-chapter1-eqn1:D].
\blank
Another test to check that the formula numbers work as expected
\placeformula[kem-chapter-eqn11]
\startformula
\cases{
\eqalign{
\widehat{\vec{x}} &= - \vec{x} \cr
\widehat{t} & = t \cr
}}
\quad \text{resp.} \quad
\cases{\eqalign{
\widehat{\vec{x}} &=  \vec{x} \cr
\widehat{t} & = -t \cr
}}
\stopformula

\stoptext

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


Re: [NTG-context] [Fwd: Re: Miktex, Metapost and \loadfontfilesoncetrue]

2006-04-05 Thread WN

[EMAIL PROTECTED] wrote:



Hi Wim,

Let me know if you need perl help, ok?

Taco

Hi Taco,

I am doing regular expression (regex) and I am trying to process my 
Latex files (a lot)

to automate the translation to Context primitives.
I am partially  successfully but it is a complex job, so some of the 
Latex/Tex primitives

I convert by hand.

But thanks for your kind offer. Attached is my perl script, but don't expect
a lot from it or clean or optimized code, I wrote it in 2 hours.
Feel free to share it with anyone, if you think others may benefit.

Kind regards
Wim



#
# Author  : Wim Neimeijer, The Netherlands
#
# File: convert.pl
#
# Date: 25 March 2006
#
# Purpose : Process a Latex script and try to convert 
# : my Latex commands into Context one's, 
#
# Coding  : no standards
#
# Level   : N/A
#
# Warning : Use at your own risk, certainly not full proof 
# : and quit minimum in its workings, 
# 
# 
#!/usr/bin/perl
use File::Basename;

if ( $#ARGV eq -1){
$wildcards = "*.tex";
}

if ( $#ARGV ge 0 ){
foreach $b (@ARGV){
$wildcards = $wildcards . " " . $b;
}
}

@pstfiles= glob $wildcards;
for $a (@pstfiles){

($base,$dir,$ext) = fileparse($a);

@part = split '\.', $base;
$newfile = $part[0];

$sourcefile = $a;
open(SOURCE, "<"  ,$sourcefile) or die "$0 - cannot open $sourcefile";
$tmpfile = "tmp.log";
open(TMPFILE, ">"  ,$tmpfile) or die "$0 - cannot open $tmpfile";

@linesa = ;
# remove comments first
@foo = grep(!/^\%/, @linesa);   

my @newline;

$i = 0;
$currentline = 0;
for $b (@foo){
chomp($b);
chomp($foo[$i]);

# replace chapter{} by chapter[]{}
if ($foo[$i] =~ /^\\chapter\{/){

if ($foo[$i+1] =~ /^\\label\{/){

$startbrace = index($foo[$i+1],"\{");
$endbrace = index($foo[$i+1],"\}");

if (($startbrace >= 0) and ($endbrace <= length($foo[$i+1]))) {
$s = substr($foo[$i+1],$startbrace+1,$endbrace - 
$startbrace - 1);

$b =~ s/\\chapter\{/\\chapter[$s]\{/;
push @newline, $b;
delete $foo[$i+1];
}
}
else {
$b =~ s/\\chapter\{/\\chapter[]\{/;
push @newline, $b;
}
}
elsif ($foo[$i] =~ /^\\section\{/){

if ($foo[$i+1] =~ /^\\label\{/){

$startbrace = index($foo[$i+1],"\{");
$endbrace = index($foo[$i+1],"\}");

if (($startbrace >= 0) and ($endbrace <= length($foo[$i+1]))) {
$s = substr($foo[$i+1],$startbrace+1,$endbrace - 
$startbrace - 1);

$b =~ s/\\section\{/\\section[$s]\{/;
push @newline, $b;
delete $foo[$i+1];
}

}
else {
$b[$i] =~ s/\\section\{/\\section[]\{/;
push @newline, $b;
}
}
elsif ($foo[$i] =~ /^\\begin{equation}/) {
if ($foo[$i+1] =~ /^\\label\{/){

$startbrace = index($foo[$i+1],"\{");
$endbrace = index($foo[$i+1],"\}");

if (($startbrace >= 0) and ($endbrace <= length($foo[$i+1]))) {
$s = substr($foo[$i+1],$startbrace+1,$endbrace - 
$startbrace - 1);

$b =~ s/\\begin{equation}/\\placeformula[$s]/;
push @newline, $b;
push @newline , "\\startformula";

delete $foo[$i+1];  
}
}
else {
$b =~ s/\\begin{equation}/\\placeformula[]/;
push @newline, $b;
push @newline, "\\startformula";
}
}
elsif ($foo[$i] =~ /^\\begin{align\*}/) {
push @newline, "\\startformula";
push @newline, "\\startalign[n=3]"; 
}
elsif ($foo[$i] =~ /^\\begin{equation\*}/) {
push @newline, "\\startformula";
}
elsif ($foo[$i] =~ /^\\begin{eqnarray}/){

if ($foo[$i+1] =~ /^\\label\{/){

$startbrace = index($foo[$i+1],"\{");
$endbrace = index($foo[$i+1],"\}");

if (($startbrace >= 0) and ($endbrace <= length($foo[$i+1]))) {
$s = substr($foo[$i+1],$startbrace+1,$endbrace - 
$startbrace - 1);

$b =~ s/^\\begin{eqnarray}/\\placeformula[$s]/;

push @newline, $b;
push @newline, "\\startformula";
push @newline, "\\startalign[n=3]";

delete $foo[$i+1];  
}

Re: [NTG-context] Extending the black circled numbers

2006-04-05 Thread nico
On Wed, 05 Apr 2006 22:52:33 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote:

> nico wrote:
>> It seems to be related to some font loading stuff, since when I don't  
>> put
>> \ss I haven't this. So, if I put the following in the test I have no  
>> more
>> the problem.
>>
> strange, here it shows twice the same size
>
> \starttext
> {\tracingall\setbox0\hbox{\ss 99}\the\wd0}
> \stoptext
>
> may give some info where a blank space (or so) creeps in

Ok, you don't need to waste your time with this minor thing (that you  
cannot reproduce). Within the long verbose log there is:

{into \box0=
\hbox(8.333+0.0)x15.66658 []}
{vertical mode: \setbox}
{entering hbox group (level 2) at line 2}

In fact a second setbox after gives:

{leaving hbox group (level 2) entered at line 2}
{changing \box0=
\hbox(8.333+0.0)x15.66658 []}
{into \box0=
\hbox(8.333+0.0)x11.74997 []}
{vertical mode: end-group character }}

If you are still interested I can send you the full bzipped log (15KB),  
but you can stay at this step since I've an easy workaround. Thanks for  
your patience.

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


Re: [NTG-context] Extending the black circled numbers

2006-04-05 Thread Hans Hagen
nico wrote:
> It seems to be related to some font loading stuff, since when I don't put  
> \ss I haven't this. So, if I put the following in the test I have no more  
> the problem.
>   
strange, here it shows twice the same size 

\starttext
{\tracingall\setbox0\hbox{\ss 99}\the\wd0}
\stoptext 

may give some info where a blank space (or so) creeps in

Hans 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] placefigure feature request ?

2006-04-05 Thread Hans Hagen
Sanjoy Mahajan wrote:
>context : ver: 2005.01.31
>cont-en : ver: 2005.01.31  fmt: 2006.3.28  mes: english
>
> Maybe this context installation is too old for nocheck.  On the other
> hand, it should complain then?
>   
i remember a bug (actually the mechanism is rather old, so the bug must have 
been a temp one) 

Hans 
 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Extending the black circled numbers

2006-04-05 Thread Hans Hagen
nico wrote:
> On Wed, 05 Apr 2006 21:59:36 +0200, nico <[EMAIL PROTECTED]>  
> wrote:
>
>   
>> On Wed, 05 Apr 2006 09:42:51 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote:
>>
>> 
>> But there's something strange: the first circle is greater than the
>> others
>> (but the numbers have all the same size). Tracing a bit I see that  
>> the
>> first circle has a width=16.5333pt, the others 13.19997pt. What's the
>> reason for this?
>>
>> 
> what os the exact code that you use?how many mp runs do yuo have?
>   
 It's exactly the one you gave. I attach the file I compile. Two
 mpruns; I attach the log too.
 
>>> one run here .. can you try the beta? i remember a spurious space
>>> problem someplace
>>>   
>
> Well, here is an even smaller test that shows the problem:
>
> \starttext
>
> \setbox0\hbox{\ss 99}
> \writestatus{co}{width=\the\wd0}%
>
> \setbox0\hbox{\ss 99}
> \writestatus{co}{width=\the\wd0}%
>
> \stoptext
>   
actually that file faile here because of a bug in pdftex that i ran into 
earlier todat (no text on the page, so an empty document, but an incomplete 
object being flushed) 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Extending the black circled numbers

2006-04-05 Thread nico
On Wed, 05 Apr 2006 21:59:36 +0200, nico <[EMAIL PROTECTED]>  
wrote:

> On Wed, 05 Apr 2006 09:42:51 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote:
>
> But there's something strange: the first circle is greater than the
> others
> (but the numbers have all the same size). Tracing a bit I see that  
> the
> first circle has a width=16.5333pt, the others 13.19997pt. What's the
> reason for this?
>
 what os the exact code that you use?how many mp runs do yuo have?
>>>
>>> It's exactly the one you gave. I attach the file I compile. Two
>>> mpruns; I attach the log too.
>> one run here .. can you try the beta? i remember a spurious space
>> problem someplace

Well, here is an even smaller test that shows the problem:

\starttext

\setbox0\hbox{\ss 99}
\writestatus{co}{width=\the\wd0}%

\setbox0\hbox{\ss 99}
\writestatus{co}{width=\the\wd0}%

\stoptext

It seems to be related to some font loading stuff, since when I don't put  
\ss I haven't this. So, if I put the following in the test I have no more  
the problem.

\setbox\scratchbox\hbox{\ss 99} % workaround to fix the strange size  
initialization...

\starttext
   \dontleavehmode \dorecurse{99}{\conum{\recurselevel}, }
\stoptext

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


Re: [NTG-context] Extending the black circled numbers

2006-04-05 Thread nico
On Wed, 05 Apr 2006 09:42:51 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote:

 But there's something strange: the first circle is greater than the
 others
 (but the numbers have all the same size). Tracing a bit I see that the
 first circle has a width=16.5333pt, the others 13.19997pt. What's the
 reason for this?

>>> what os the exact code that you use?how many mp runs do yuo have?
>>
>> It's exactly the one you gave. I attach the file I compile. Two
>> mpruns; I attach the log too.
> one run here .. can you try the beta? i remember a spurious space  
> problem someplace

Same thing. I've found that I haven't the problem with producing dvi  
instead of pdf. I've limited the case to:

\starttext

\setbox\scratchbox\hbox
   {\small\ss\bf
\setbox\scratchbox\hbox{99}%
\hbox to 1.2\wd\scratchbox{\hss1\hss}}
\writestatus{co}{width=\the\wd\scratchbox}%

\setbox\scratchbox\hbox
   {\small\ss\bf
\setbox\scratchbox\hbox{99}%
\hbox to 1.2\wd\scratchbox{\hss1\hss}}
\writestatus{co}{width=\the\wd\scratchbox}%

\stoptext

With --output=pdftex I have the log:
  (./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo)
(./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo) (./try.tuo)
(./try.tuo)
systems : begin file try at line 1
(/usr/local/share/texmf-local/tex/context/base/pdfr-ec.tex)
co  : width=16.5333pt
co  : width=13.19997pt
systems : end file try at line 15
  )

Should I update something else? texexec --version gives:

  TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
texutil : TeXUtil 9.0.1 - ConTeXt / PRAGMA ADE 1992-2006
tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
context : ver: 2006.04.05 20:06
cont-en : ver: 2006.04.05 20:06  fmt: 2006.4.5  mes: english

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


Re: [NTG-context] placefigure feature request ?

2006-04-05 Thread Sanjoy Mahajan
From:Hans Hagen <[EMAIL PROTECTED]>
> \useMPlibrary[dum]
> \setupfloats[numbering=nocheck]
> \starttext
> \input tufte \placefigure[rightmargin]{first} {\externalfigure[dummy]} \par
> \input knuth \placefigure[top]{second}{\externalfigure[dummy]} \par
> \stoptext
> 
> does commenting the no check line makes a differnece? 
> 
> nocheck: top=2, margin=1 
> yes: top=1, margin=2  (default behaviour) 

No difference.  I get the default behavior in both cases, and both log
files mention the renumbering:

$ texexec 3.tex > somewhere
$ mv 3.log 3-nocheck.log
[comment out the nocheck line]
$ texexec 3.tex > somewhereelse
$ grep renumber 3{,-nocheck}.log
3.log:floatblocks : 1 renumbered / figure 1 => 2
3.log:floatblocks : 2 renumbered / figure 2 => 1
3-nocheck.log:floatblocks : 1 renumbered / figure 1 => 2
3-nocheck.log:floatblocks : 2 renumbered / figure 2 => 1

TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005

   texexec : TeXExec 5.2.4 - ConTeXt / PRAGMA ADE
   1997-2005
   texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE
   1992-2004
   tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
   context : ver: 2005.01.31
   cont-en : ver: 2005.01.31  fmt: 2006.3.28  mes: english

Maybe this context installation is too old for nocheck.  On the other
hand, it should complain then?

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


Re: [NTG-context] placefigure feature request ?

2006-04-05 Thread Hans Hagen
Sanjoy Mahajan wrote:
> Meanwhile I've been experimenting in baby steps, and numbering=yes does
> what I want, as does specifying nothing about numbering.  But
> numbering=nocheck doesn't stop it, so I'm confused by what the nocheck
> option does (doesn't cause me problems since the default is what I want,
> but I'm curious).
>   
even more minimal:

\useMPlibrary[dum]

\setupfloats[numbering=nocheck]

\starttext
\input tufte \placefigure[rightmargin]{first} {\externalfigure[dummy]} \par
\input knuth \placefigure[top]{second}{\externalfigure[dummy]} \par
\stoptext


does commenting the no check line makes a differnece? 

nocheck: top=2, margin=1 
yes: top=1, margin=2  (default behaviour) 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] French punctuation: improvement needed

2006-04-05 Thread Hans Hagen
Renaud AUBIN wrote:
> Hans Hagen a écrit :
>> but why do you need defs at all 
>>
>> Hans
>>   
> Because if I don't use this def, I don't obtain correct spacing (i.e. 
> no space between the word and { ;, :, !, ? } ) !
>
> Considering this sample:
>
> \setupoutput[pdftex]
>
> \enableregime[il9]
> \useencoding[ffr]
> \mainlanguage[fr]
>
> \starttext
> Essai: est-ce que la ponctuation est correcte?
>
> Essai : est-ce que la ponctuation est correcte?
>
> Essai : est-ce que la ponctuation est correcte ?
>
> Peut-être bien que oui ! Peut-être que non!
> \stoptext
>
> The output returns:
>
> Essai: est-ce que la ponctuation est correcte?
>
> Essai: est-ce que la ponctuation est correcte?
>
> Essai: est-ce que la ponctuation est correcte?
>
> Peut-être bien que oui! Peut-être que non!
change this in enco-ffr: (\empty -> \currentmainlanguage) 

\startlanguagespecifics[\s!fr]
\definetextmodediscretionary : 
{\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentmainlanguage{:}:}
\definetextmodediscretionary ; 
{\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentmainlanguage{;};}
\definetextmodediscretionary ? 
{\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentmainlanguage{?}?}
\definetextmodediscretionary ! 
{\removeunwantedspaces\prewordbreak\kern\hspaceamount\currentmainlanguage{!}!}
\stoplanguagespecifics

(btw, this feature will be replaces in due time by pdftex's pre/post character 
kerning features) 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Cite module: APA citation proposals

2006-04-05 Thread Taco Hoekwater
Mojca Miklavec wrote:
> 
> PS: I noticed that some updates are being made about the modules, but
> the following sites

I am slowly fixing all those links. The contextgarden is the leading
source of the module as well as the manual.

> http://modules.contextgarden.net/bib (wrong link to the documentation)

I tried to fix that but just made the mess a bit bigger, I am afraid.
At the moment, there are two links at [EMAIL PROTECTED] that both
point to [EMAIL PROTECTED] The bottom one "Manual (alternative link)"
is the right one, the other one is broken (old path). It seems
documentation items are still read-only, so I only added to the mess
when I tried to fix it. Sorry, Patrick!

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


Re: [NTG-context] French punctuation: improvement needed

2006-04-05 Thread Renaud AUBIN




I remember that french punctuation worked well in the past, then it
doesn't work anymore... At this time, I thought that my problem are due
to my document and correct the problem with the first def, then forget
and think about other problems...

See [NTG-context] French punctuation spacing not working anymore   
(2006.02.15)

Renaud

Hans Hagen a écrit :

  Renaud AUBIN wrote:
  
  
Yes, in my product I use:

\enableregime[il9]
\useencoding[ffr]
\mainlanguage[fr]

just before \startproduct

Taco's def works fine...

  
  but why do you need defs at all 

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


  




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


Re: [NTG-context] French punctuation: improvement needed

2006-04-05 Thread Renaud AUBIN




Hans Hagen a écrit :

  but why do you need defs at all 

Hans
  

Because if I don't use this def, I don't obtain correct spacing (i.e.
no space between the word and { ;, :, !, ? } ) !

Considering this sample:

\setupoutput[pdftex]

\enableregime[il9]
\useencoding[ffr]
\mainlanguage[fr]

\starttext
Essai: est-ce que la ponctuation est correcte?

Essai : est-ce que la ponctuation est correcte?

Essai : est-ce que la ponctuation est correcte ?

Peut-être bien que oui ! Peut-être que non!
\stoptext

The output returns:

Essai: est-ce que la ponctuation est correcte?

Essai: est-ce que la ponctuation est correcte?

Essai: est-ce que la ponctuation est correcte?

Peut-être bien que oui! Peut-être que non!

...

Renaud

with:

TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

   texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
   texutil : TeXUtil 9.0.1 - ConTeXt / PRAGMA ADE 1992-2006
   tex : pdfeTeX, 3.141592-1.30.6-2.2 (Web2C 7.5.5)
   context : ver: 2006.03.25 13:21
   cont-en : ver: 2006.03.25 13:21  fmt: 2006.4.4  mes:
english




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


Re: [NTG-context] Cite module: APA citation proposals

2006-04-05 Thread Mojca Miklavec
On 4/4/06, Johannes Graumann wrote:
> Hello,
>
> I'm a biochemist and
> the majority of my cited sources derives from www.pubmed.org, which I
> import into BibTeX via pybliographic. I have some slight problems with the
> formating as provided by the database and was wondering whether it's
> possible to fix them ...

Have you ever tried JabRef? I find it a marvellous tool (there is some
functionality which could be added, but the current functionality is
more than satisfying for me).
You can write the article's Pubmed ID and it will import all the data
automatically (I guess that pybliographer does that as well, but in
any case - it is one of the features I like most).

> 1) Titles from PubMed always end with a '.'. Since the cite module (at least
> the version with Tetex in Debian unstable) does not check for the presence
> of a '.', but just appends one, I end up with 2 '.'s after the title when
> using a unmanipulated *.bib file. Would it be possible to include a check
> for that into the module?

Are you sure that the dot comes from PubMed? In that I case I would
call it pybliographic's problem, not Taco's problem.
Removing the trailing dot (if it's really explicitely present in the
title) is doable in TeX, but a bit complex and imagine that you had a
title where you wanted to keep the trailing dot intentionally. Besides
that you would surely want to remove that dot on other places as well,
not only under "References".

Why don't you simply open the resulting bib file in a good text editor
and delete the trailing dots in titles with a single regular
expression? If you don't know how to do that in less than 10 seconds,
write me off-list (and include the .bib file).

I never had any problems with dots in PubMed's articles. However
there's often an additional dot if some data is missing. That can be
regulated with style. Sometimes the default behaviour is to write down
a dot even if some bib field is empty. You can fix that with adjusting
 \setuppublicationlayout. See bibl-apa.tex or the documentation.
(That's what Taco already suggested.)

Mojca

PS: I noticed that some updates are being made about the modules, but
the following sites
http://wiki.contextgarden.net/Bibliography
http://wiki.contextgarden.net/User:Taco/Bib
http://modules.contextgarden.net/bib (wrong link to the documentation)
[content of] http://tex.aanhet.net/bib/
seem a bit unsyncronized (and not enough "interlinked"). "dl" was the
only place where I managed to find the documentation.
http://wiki.contextgarden.net/Bibliography should perhaps include all
the relevant links including documentation. Should the latest module
version point on "aanhet" or on the "modules" section?
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] placefigure feature request ?

2006-04-05 Thread Hans Hagen
Sanjoy Mahajan wrote:
> Taco's msg about no meaning yes made me wonder: what's the special case
> or problem you were thinking of?
>   
probably that the automatic renumbering sometimes interferes with non 
trivial sequential flushing
> Perhaps Holland in the winter can offer the dark, rainy day (just like
> here in Boston, USA) but the 'non-busy' may be more difficult.
>   
i remember a pretty hot boston made even more hot because i had to carry 
the nice big book "inventing the charles river" around -)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] placefigure feature request ?

2006-04-05 Thread Sanjoy Mahajan
Hans Hagen <[EMAIL PROTECTED]> wrote:
> Sanjoy Mahajan wrote:
> > Here \figuremacro figures out (sorry) that narrow figures go in the
> > margin and wide figures go at the top of the page.  But the page will
> > look funny: The narrow figure will be numbered, say, Figure 10, and
> > the wide figure will be Figure 11, but Figure 11 will appear before
> > Figure 10 on the page.  Which is disconcerting to the reader.  
> >   
> this 'choose between locations' feature is kind of present but only with 
> 'here' as fallback but it's trivial to make that configurable:
> 

[useful code snipped]

Thanks very much -- I'll work through the code and learn some conTeXt to
boot.

> no, actually floats will be renumbered automatically unless nocheck is
> given; the problem is that the order in which margins etc flush plays
> a role then.
> 
> I can imagine another solution but i need a dark rainy non-busy day
> for that

Taco's msg about no meaning yes made me wonder: what's the special case
or problem you were thinking of?

Perhaps Holland in the winter can offer the dark, rainy day (just like
here in Boston, USA) but the 'non-busy' may be more difficult.

-Sanjoy

`A society of sheep must in time beget a government of wolves.'
   - Bertrand de Jouvenal
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] placefigure feature request ?

2006-04-05 Thread Sanjoy Mahajan
Taco Hoekwater <[EMAIL PROTECTED]> wrote:
> Hans Hagen wrote:
> >>So 'numbering=yes' will number according to position on the page?
> >>
> > no
> 
> To avoid confusion:
> 
> When 'page' refers to the typeset result, then Hans' answer actually
> means 'yes'. Or it should, at least. I remember files where I had to
> run texexec twice though. I am not sure if that bug still happens,
> so be careful.

Right, I meant in pages of the typeset result.  I'll watch for the need
to run texexec and make a minimal example if I find the problem.  

Meanwhile I've been experimenting in baby steps, and numbering=yes does
what I want, as does specifying nothing about numbering.  But
numbering=nocheck doesn't stop it, so I'm confused by what the nocheck
option does (doesn't cause me problems since the default is what I want,
but I'm curious).

Probaby I'm just using an old version of context since the texshow-web
says that numbering=nocheck is a new option.  My last attempt at
upgrading didn't go well (I have tetex-3.0) but maybe it's time to try
again.

$ texexec --version

 TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005

   texexec : TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
   texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
   tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
   context : ver: 2005.01.31
   cont-en : ver: 2005.01.31  fmt: 2006.3.28  mes: english

With this output on the file 

$ texexec 2m
[...snip...]
systems : begin file 2m at line 6
(/usr/share/texmf-tetex/tex/context/sample/tufte.tex)
figures : dimensions of ./a.1 loaded from figurefile itself
(./2m.tuo)
floatblocks : 1 renumbered / figure 1 => 2
floatblocks : 1 placed
(/usr/share/texmf-tetex/tex/context/sample/knuth.tex)
figures : dimensions of ./a.2 loaded from figurefile itself
floatblocks : 2 renumbered / figure 2 => 1
floatblocks : 2 placed
[1.1]
systems : end file 2m at line 13
[...snip...]

So the figures get renumbered.


Here's the 2m.tex file:
==
\setuplayout[textwidth=3.6in, rightmargin=2in]
\useexternalfigure[mpg][a.1]
\useexternalfigure[mpg2][a.2]
\setupfloats[numbering=nocheck]

\starttext
\input tufte 
\placefigure[rightmargin]{first in source file.}{\externalfigure[mpg]}
\par
\input knuth 
\placefigure[top]{second in source file.}{\externalfigure[mpg2]}
\par
\stoptext
==

Where a.mp to produce a.1 and a.2 is:
==
beginfig(1)
fill unitsquare scaled 1in withcolor red;
endfig;
beginfig(2)
fill unitsquare scaled 1in withcolor green;
endfig;
end
==


-Sanjoy

`A society of sheep must in time beget a government of wolves.'
   - Bertrand de Jouvenal
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] French punctuation: improvement needed

2006-04-05 Thread Hans Hagen
Renaud AUBIN wrote:
> Yes, in my product I use:
>
> \enableregime[il9]
> \useencoding[ffr]
> \mainlanguage[fr]
>
> just before \startproduct
>
> Taco's def works fine...
but why do you need defs at all 

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] French punctuation: improvement needed

2006-04-05 Thread Renaud AUBIN




Yes, in my product I use:

\enableregime[il9]
\useencoding[ffr]
\mainlanguage[fr]

just before \startproduct

Taco's def works fine...

Renaud

  do you use \useencoding[ffr]? 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


  




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


Re: [NTG-context] Problem with encoding, XML and writetolist...

2006-04-05 Thread Hans Hagen
Vit Zyka wrote:
>
> So there is no need to have only 7-bit chars in tui/tuo etc.? All right, 
> I think this will be better also for sorting. Sounds promissing.
>   
if the regime is the same for a whole document ... indeed

Hans

 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Problem with encoding, XML and writetolist...

2006-04-05 Thread Vit Zyka
Hans Hagen wrote:
> Vit Zyka wrote:
> 
>>Martin Kolařík wrote:
>>  
>>
>>>Hi Hans,
>>>
>>>I've analyzed the situation using different combinations of regimes and 
>>>encodings, including switching off handling (\donothandleactivecharacter) 
>>>and it seems to me, that every text with chars > 127, which is fully 
>>>expanded (as in 8bit.tex), must cause difficulties, because TOC entry read 
>>>back from TUO is scanned independently and thus spaces are gobbled.
>>>
>>
>>Hi Martin,
>>
>>we have discussed this problem a year ago. In that time I solve it just 
>>writing '{}' in each title where was needed, like
>>
>>   \chapter{Dobré{} ráno}
>>
>>Now I have cooked an automatic solution. It is not optimal (effective) 
>>but working. The only needs is to redefine
>>
>>   \def\numcharacter#1{\char#1{}}
>>   \let\dochar\numcharacter
>>
>>and to load appropriate encoding file once more. Since it is banned a 
>>new macro \reuseencoding was introduce:
>>
>>For Hans:
>>It would be nice if this feature was enabled in a standard distro. 
>>Perhaps you will find some more optimal solution...
>>
>>---
>>\unprotected
>>\def\doreuseencoding#1%
>>   {\letvalue{\c!file\f!encodingprefix#1}\empty
>>\makeshortfilename[\f!encodingprefix#1]%
>>\startreadingfile
>>\readsysfile\shortfilename
>>  {\showmessage\m!encodings2{#1}}
>>  {\showmessage\m!encodings3{#1}}%
>>\stopreadingfile}
>>\def\reuseencoding[#1]%
>>   {\processcommalist[#1]\doreuseencoding}
>>
>>
>>\def\numcharacter#1{\char#1{}}
>>\let\dochar\numcharacter
>>
>>\reuseencoding[ec]
>>
>>\enableregime[latin2]
>>
>>\starttext
>>\writetolist[chapter]{1}{Dobré ráno}
>>\expanded{\writetolist[chapter]{2}{Dobré odpoledne}}
>>
>>\placecontent
>>\stoptext
>>  
> 
> the {} may break liguature building (and maybe kerning) ... taco knows ...

Hmmm, that's right.

> I got a brainwave ... 
> 
> \enableregime[latin2]
> 
> \starttext
> 
> \def\numcharacter#1{\rawcharacter{#1}}%
> \let\dochar\numcharacter

So there is no need to have only 7-bit chars in tui/tuo etc.? All right, 
I think this will be better also for sorting. Sounds promissing.

> \writetolist[chapter]{1}{Dobré ráno}
> 
> \expanded{\writetolist[chapter]{2}{Dobré odpoledne}}
> 
> \placelist[chapter][criterium=text]
> 
> test
> 
> \typefile{test.tuo}
> 
> \stoptext
> 
> this can be sped up (a bit) with 
> 
> % \dostepwiserecurse{0}{255}{1}
> %   {\setevalue{rchr:\recurselevel}{\rawcharacter\recurselevel}}
> 
> % \def\rawcharacter#1{\getvalue{rchr:#1}}
> 
> this means that all chars are round tripped to themselves in output files! 
> 
> raw characters are not active and they are therefore equivalent to \char  
> 
> it's enough then to put 
> 
> \def\numcharacter#1{\rawcharacter{#1}}%
> \let\dochar\numcharacter
> 
> into cont-new.tex 
> 
> (i will discuss this in more detail with taco later) 

All right, thanks Hans,
Vit

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


Re: [NTG-context] French punctuation: improvement needed

2006-04-05 Thread Hans Hagen
Renaud AUBIN wrote:
>
> Hi all,
>
> For my french document, I use:
>
> \def\activateSomeCharacters{%
>   \defineactivecharacter ! {\,\string!}%
>   \defineactivecharacter ? {\,\string?}%
>   \defineactivecharacter : {\,\string:}%
>   \defineactivecharacter ; {\,\string;}}
> \activateSomeCharacters
> \appendtoks\activateSomeCharacters\to\everystarttext
>
> in my environment, but there is a problem:
>
> If the input is "test:", the result is correct but if the input is 
> "test :" (with a space between test and :) the output space between 
> test and : is too large (I assume a normal space + \,)
> Is this possible to get this def smarter ?
do you use \useencoding[ffr]? 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] French punctuation: improvement needed

2006-04-05 Thread Taco Hoekwater
Renaud AUBIN wrote:
> 
> Is this possible to get this def smarter ?

   \defineactivecharacter : {\removelastspace \,\string:}

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


[NTG-context] French punctuation: improvement needed

2006-04-05 Thread Renaud AUBIN





Hi all,

For my french document, I use:

\def\activateSomeCharacters{%
  \defineactivecharacter ! {\,\string!}%
  \defineactivecharacter ? {\,\string?}%
  \defineactivecharacter : {\,\string:}%
  \defineactivecharacter ; {\,\string;}}
\activateSomeCharacters
\appendtoks\activateSomeCharacters\to\everystarttext

in my environment, but there is a problem:

If the input is "test:", the result is correct but if the input is
"test :" (with a space between test and :) the output space between
test and : is too large (I assume a normal space + \,)
Is this possible to get this def smarter ?

Cheers,

Renaud




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


Re: [NTG-context] Problem with encoding, XML and writetolist...

2006-04-05 Thread Hans Hagen
Vit Zyka wrote:
> Martin Kolařík wrote:
>   
>> Hi Hans,
>>
>> I've analyzed the situation using different combinations of regimes and 
>> encodings, including switching off handling (\donothandleactivecharacter) 
>> and it seems to me, that every text with chars > 127, which is fully 
>> expanded (as in 8bit.tex), must cause difficulties, because TOC entry read 
>> back from TUO is scanned independently and thus spaces are gobbled.
>> 
>
> Hi Martin,
>
> we have discussed this problem a year ago. In that time I solve it just 
> writing '{}' in each title where was needed, like
>
>\chapter{Dobré{} ráno}
>
> Now I have cooked an automatic solution. It is not optimal (effective) 
> but working. The only needs is to redefine
>
>\def\numcharacter#1{\char#1{}}
>\let\dochar\numcharacter
>
> and to load appropriate encoding file once more. Since it is banned a 
> new macro \reuseencoding was introduce:
>
> For Hans:
> It would be nice if this feature was enabled in a standard distro. 
> Perhaps you will find some more optimal solution...
>
> ---
> \unprotected
> \def\doreuseencoding#1%
>{\letvalue{\c!file\f!encodingprefix#1}\empty
> \makeshortfilename[\f!encodingprefix#1]%
> \startreadingfile
> \readsysfile\shortfilename
>   {\showmessage\m!encodings2{#1}}
>   {\showmessage\m!encodings3{#1}}%
> \stopreadingfile}
> \def\reuseencoding[#1]%
>{\processcommalist[#1]\doreuseencoding}
>
>
> \def\numcharacter#1{\char#1{}}
> \let\dochar\numcharacter
>
> \reuseencoding[ec]
>
> \enableregime[latin2]
>
> \starttext
> \writetolist[chapter]{1}{Dobré ráno}
> \expanded{\writetolist[chapter]{2}{Dobré odpoledne}}
>
> \placecontent
> \stoptext
>   
the {} may break liguature building (and maybe kerning) ... taco knows ...

I got a brainwave ... 

\enableregime[latin2]

\starttext

\def\numcharacter#1{\rawcharacter{#1}}%
\let\dochar\numcharacter

\writetolist[chapter]{1}{Dobré ráno}

\expanded{\writetolist[chapter]{2}{Dobré odpoledne}}

\placelist[chapter][criterium=text]

test

\typefile{test.tuo}

\stoptext

this can be sped up (a bit) with 

% \dostepwiserecurse{0}{255}{1}
%   {\setevalue{rchr:\recurselevel}{\rawcharacter\recurselevel}}

% \def\rawcharacter#1{\getvalue{rchr:#1}}

this means that all chars are round tripped to themselves in output files! 

raw characters are not active and they are therefore equivalent to \char  

it's enough then to put 

\def\numcharacter#1{\rawcharacter{#1}}%
\let\dochar\numcharacter

into cont-new.tex 

(i will discuss this in more detail with taco later) 

Hans 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Problem with encoding, XML and writetolist...

2006-04-05 Thread Vit Zyka
Martin Kolařík wrote:
> Hi Hans,
> 
> I've analyzed the situation using different combinations of regimes and 
> encodings, including switching off handling (\donothandleactivecharacter) and 
> it seems to me, that every text with chars > 127, which is fully expanded (as 
> in 8bit.tex), must cause difficulties, because TOC entry read back from TUO 
> is scanned independently and thus spaces are gobbled.

Hi Martin,

we have discussed this problem a year ago. In that time I solve it just 
writing '{}' in each title where was needed, like

   \chapter{Dobré{} ráno}

Now I have cooked an automatic solution. It is not optimal (effective) 
but working. The only needs is to redefine

   \def\numcharacter#1{\char#1{}}
   \let\dochar\numcharacter

and to load appropriate encoding file once more. Since it is banned a 
new macro \reuseencoding was introduce:

For Hans:
It would be nice if this feature was enabled in a standard distro. 
Perhaps you will find some more optimal solution...

---
\unprotected
\def\doreuseencoding#1%
   {\letvalue{\c!file\f!encodingprefix#1}\empty
\makeshortfilename[\f!encodingprefix#1]%
\startreadingfile
\readsysfile\shortfilename
  {\showmessage\m!encodings2{#1}}
  {\showmessage\m!encodings3{#1}}%
\stopreadingfile}
\def\reuseencoding[#1]%
   {\processcommalist[#1]\doreuseencoding}


\def\numcharacter#1{\char#1{}}
\let\dochar\numcharacter

\reuseencoding[ec]

\enableregime[latin2]

\starttext
\writetolist[chapter]{1}{Dobré ráno}
\expanded{\writetolist[chapter]{2}{Dobré odpoledne}}

\placecontent
\stoptext
---

> 
> Now I have solved it using not-stable solution -- I am using triple sequence 
> of \expandafter to expand \XMLflush after \chapter instead \expanded. The 
> solution is not stable as it is ConTeXt implementation dependent.
> 
> On the other side, now I do not know, how to partially expand code 
> \chaper{\XMLflush{XMLTag}} to obtain sequence of simple unexpanded chars. 
> Simple \expandafter is not sufficient, more \expandafters is dirty trick and 
> full expansion (\expanded) leads to TOC entry problem. In TeX source this 
> cannot occur (or can occur in strange situations :-), in XML source this is 
> almost rule.
> 
> Maybe it would be useful to have in XML engine macro, which expands XMLdata 
> exactly to get read (original) content (like mine triple \expandafter). Maybe 
> such macro already exists and I am a real fool :-)
> 
> Thank you for help, have a nice day,
> 
> Martin
> 
> 
>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>>Behalf Of Hans Hagen
>>Sent: Monday, April 03, 2006 11:57 AM
>>To: [EMAIL PROTECTED]; mailing list for ConTeXt users
>>Subject: Re: [NTG-context] Problem with encoding, XML and writetolist...
>>
>>
>>Martin Kolařík wrote:
>>
>>>Aha, here maybe will be the solution :-)
>>>
>>>I'am using standalone Win32 distribution from Pragma and I'm 
>>
>>running texexec with --translate=cp1252cs. Typescripts use il2, 
>>which corresponds to fonts, of course. If I run the code without 
>>XML (if I transcribe XML to \chapter etc.) I get toc entry correctly too.
>>
>>>Where should I look for more? What is natural.ctx?
>>>  
>>
>>this is a one-to-one translation vector, and the one standard 
>>used by context; forget about all those other mappings, they can 
>>be done using regimes; you can use an il2 input regime, and any 
>>(resonable) font encoding, 
>>
>>Hans 
>>
>>-
>>  Hans Hagen | PRAGMA ADE
>>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>> tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>> | www.pragma-pod.nl
>>-
>>
>>___
>>ntg-context mailing list
>>ntg-context@ntg.nl
>>http://www.ntg.nl/mailman/listinfo/ntg-context
>>
> 
> 
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

-- 
===
Ing. Vít Zýka, Ph.D. TYPOkvítek

database publishing  databazove publikovani
data maintaining and typesetting in typographic quality
priprava dat a jejich sazba v typograficke kvalite

tel.: (+420) 777 198 189 www: http://typokvitek.com
===

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


Re: [NTG-context] Cite module: APA citation proposals

2006-04-05 Thread Taco Hoekwater

Hi Johannes,

Johannes Graumann wrote:

> 1) Titles from PubMed always end with a '.'. Since the cite module (at least
> the version with Tetex in Debian unstable) does not check for the presence
> of a '.', but just appends one, I end up with 2 '.'s after the title when
> using a unmanipulated *.bib file. Would it be possible to include a check
> for that into the module?

That is a bit problematic, to be honest. My suggestion is to make a copy
of the bibl-apa.tex style and removing the additional dots from that.

> 2) Pybliographic also delivers the article language in a 'language' field
> and not in the 'lang' field the cite module expects, which terminates
> compilation with an unmanipulated *.bib file. Would it be possible to make
> the module more promiscuous in this respect?

AFAIK, the module should understand bibtexs language field. An example
would be helpful for bughunting.

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


Re: [NTG-context] Problems with Standalone distribution

2006-04-05 Thread Hans Hagen
[EMAIL PROTECTED] wrote:
> As I said, I work with the standalone distri?
>   
the minimal or the complete windows version (including scite etc)
> And I thought, the binaries are from fptex, right?
>   
sure
> And if both texexec.ini's are removed:
>
> texexec complains: 
>
>   warning: texexec.ini not found, try 'texexec --verbose'
>
> (the same with texexec --verbose)
>   
but that should normally be no problem

>  
>   
>> newtexexec.rb (which will replace texexec.pl) has no ini file but
>> uses 
>> some heuristics to determine what environment it runs in
>> 
>>>  
>>>   
>>>   
 'texexec --verbose' tries to compile all the files in the aktuel
 path.

 but

 'texmfstart texexec.pl --verbose' works ok.

 same with

 'texexec --make --all' doesn't work

 but 

 'texmfstart texexec.pl --make --all' works!
 
 
>> good
>> 
>
> upps?
>
> texexec (without parameters)
>
> compiles cscite.bat! Why?
>   
strange indeed

can you run "texmfstart texexec" and see what happens then
>  
>   
>> on windows: you need to associate the pl suffix to perl
>> on linux you need to make  texexec into a script (suffixless)
>>
>> on both you can best use texmfstart to launch the scripts since
>> that's 
>> upward compatible (and in some respects this call is more clever);
>> if 
>> needef you can create stubs with texmfstart (see manual)
>> 
>
> This works!
>
> But next Problem:
>
> pdfetex can not find pk-fonts.
>
> I have written: 
>
> PKFONTS = .;$TEXMF/fonts/pk//
>
> in 'texmf.cnf'
>
> font-file lies in
>
> texmf-project/fonts/pk/ricoh/local/msl/msl50.pk
>
> what else can I do?
>   
ok, that's another problem (once solved you know a bit about tex and fonts) ... 
it looks like there is a problem with locating fonts ... what 
font is that: msl50 ? 

(the minimal distribution does not have such a font)  

Hans 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Taco Hoekwater


Hans Hagen wrote:
> Thomas Engel wrote:
> 
>>Hello Hans,
>>
>>
>>this is the message I got after running texexec pro_mcc_a3.tex.
>>As you can see I have increased the memory size for mp.
>>I have attached the two tex-files.
>>Maybe there is a mistake in the mp-code. A pdf-file will be produced,
>>but if you check the output you will see, that one cubicle is missing!
>>  
> 
> i run out of tex memory (8 meg) while converting the big last one 

Oh yeah, it needs 14.5 MB of memory or so for the conversion.

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


Re: [NTG-context] Problem with encoding, XML and writetolist...

2006-04-05 Thread Hans Hagen
Martin Kolařík wrote:
> Hi Hans,
>
> I've analyzed the situation using different combinations of regimes and 
> encodings, including switching off handling (\donothandleactivecharacter) and 
> it seems to me, that every text with chars > 127, which is fully expanded (as 
> in 8bit.tex), must cause difficulties, because TOC entry read back from TUO 
> is scanned independently and thus spaces are gobbled.
>
> Now I have solved it using not-stable solution -- I am using triple sequence 
> of \expandafter to expand \XMLflush after \chapter instead \expanded. The 
> solution is not stable as it is ConTeXt implementation dependent.
>
> On the other side, now I do not know, how to partially expand code 
> \chaper{\XMLflush{XMLTag}} to obtain sequence of simple unexpanded chars. 
> Simple \expandafter is not sufficient, more \expandafters is dirty trick and 
> full expansion (\expanded) leads to TOC entry problem. In TeX source this 
> cannot occur (or can occur in strange situations :-), in XML source this is 
> almost rule.
>
> Maybe it would be useful to have in XML engine macro, which expands XMLdata 
> exactly to get read (original) content (like mine triple \expandafter). Maybe 
> such macro already exists and I am a real fool :-)
>
> Thank you for help, have a nice day,
>   
some commands indeed have keys like: 

expansion=no|yes|utf|xml|command 

and alike 

the problem is that when one does something \expanded{...} in a style, it 
bypasses this mechanism 

can you make me a (as small as possible) example of a doc? i can then test it 
here with my version 

Hans 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Hans Hagen
Thomas Engel wrote:
> Hello Hans,
>
>
> this is the message I got after running texexec pro_mcc_a3.tex.
> As you can see I have increased the memory size for mp.
> I have attached the two tex-files.
> Maybe there is a mistake in the mp-code. A pdf-file will be produced,
> but if you check the output you will see, that one cubicle is missing!
>   
ok, i stripped down the sample to one image and coul dgenerate a page 

(btw \twodigitMPoutput will make mem usage less but also the quality) 

now, the problem is in the way you define your graphic: 

def Whatever () = 
  save SomePicture ; 
  picture SomePicture ; 
  lots of draws
  SomePicture := currentpicture ;
  SomePicture % return value
end 

here you *never* erase the currentpicture, so graphic keeps accumulating, and 
each SomePicture has all previous draws

you can see that on the screen: acrobat takes ages to draw the simple graphic 
and you can also see it from the mp output (a couple of 100K lines). 

solution: 

def Whatever () = 
  save SomePicture ; 
  picture SomePicture ; 
  lots of draws
  SomePicture := currentpicture ;
  currentpicture := nullpicture ; % ADDED
  SomePicture % return value
end 

or just 

def Whatever () = 
  image ( 
  lots of draws
  ) 
end 

So ... 

Hans 

  

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Absolute positioning of grafics in ConTeXt

2006-04-05 Thread Vit Zyka
Johannes Fichtinger wrote:
> Hi all, 
> 
> I'm quite new to ConTeXt, but I've been working with LaTeX for several years
> now. Now I faced a problem which I'm not able to solve in LaTeX which
> probably can be solved in ConTeXt:
> 
> I need a possibility to set grafics in a book on exact, absolute positions.
> Now I found the way for background images, like in the attached example.
> But obviously, normal text is written above the background image. I need
> now a possibility like this but for foreground grafics.
> 
> So, how can I set the position of grafics absolutely in ConTeXt?
> 
> Thanks,
> Johannes.
> 
> My example:
> 
> --
> \enableregime   [il1]
> \mainlanguage   [de]
> \setuplayout[grid=yes,marking=on,horoffset=2cm,veroffset=2cm]
> \definepapersize[jo][width=14cm,height=18cm]
> \setuppapersize [jo][a4]
> 
> \useexternalfigure[wr][dpm][type=png, width=5cm, height=4cm]
> \definelayer[wr-layer]
> \defineoverlay[wr-overlay][\composedlayer{wr-layer}]
> \setupbackgrounds[page][background={wr-overlay}]

\setupbackgrounds[page][background={foreground,wr-overlay}]

Cheers, Vit

> \starttext
> 
> \setlayer[wr-layer][x=-0.1cm,y=-0.1cm]{\externalfigure[wr]}
> Blablabla
> 
> \stoptext
> --
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 

-- 
===
Ing. Vít Zýka, Ph.D. TYPOkvítek

database publishing  databazove publikovani
data maintaining and typesetting in typographic quality
priprava dat a jejich sazba v typograficke kvalite

tel.: (+420) 777 198 189 www: http://typokvitek.com
===

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


Re: [NTG-context] placefigure feature request ?

2006-04-05 Thread Taco Hoekwater


Hans Hagen wrote:
>>So 'numbering=yes' will number according to position on the page?
>>
> no

To avoid confusion:

When 'page' refers to the typeset result, then Hans' answer actually
means 'yes'. Or it should, at least. I remember files where I had to
run texexec twice though. I am not sure if that bug still happens,
so be careful.

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


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Hans Hagen
Thomas Engel wrote:
> Hello Hans,
>
>
> this is the message I got after running texexec pro_mcc_a3.tex.
> As you can see I have increased the memory size for mp.
> I have attached the two tex-files.
> Maybe there is a mistake in the mp-code. A pdf-file will be produced,
> but if you check the output you will see, that one cubicle is missing!
>   
i run out of tex memory (8 meg) while converting the big last one 

btw: 

\definelayer[s1]
\defineoverlay[s1][\composedlayer{s1}]
\setupbackgrounds[page][background=s1]

you can omit the second lin ethere (automatically done) 

\definelayer[s1]
\setupbackgrounds[page][background=s1]

also, there is no need for \starttext .. \stoptext inside a \startproject .. 
\stopproject 

Hans 




-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Extending the black circled numbers

2006-04-05 Thread Hans Hagen
nico wrote:
> On Tue, 04 Apr 2006 22:50:58 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote:
>
>> nico wrote:
>>> On Tue, 04 Apr 2006 14:44:28 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote:
>>>
>>>
 nico wrote:

> Hello,
>
> Typically the numbers are rendered white in black
> circle. I could use the Dingbats numbers, but it is limited to 10, so
> that
> I emulated them with the following code to be able to go up to 99.
>
> The questions I have:
> - Is it the right way to do it in context (do I really need metafont?
> Simpler, smarter method?)
>
>>>
>>>
 \setupcolors[state=start]

 \startuniqueMPgraphic{CoCircle}
fill fullcircle xysized (OverlayWidth,OverlayHeight) withcolor
 OverlayColor ;
 \stopuniqueMPgraphic

>>>
>>> I see here the Hans touch again: it's better and I don't really 
>>> understand
>>> how it works :-)
>>> But there's something strange: the first circle is greater than the 
>>> others
>>> (but the numbers have all the same size). Tracing a bit I see that the
>>> first circle has a width=16.5333pt, the others 13.19997pt. What's the
>>> reason for this?
>>>
>> what os the exact code that you use?how many mp runs do yuo have?
>
> It's exactly the one you gave. I attach the file I compile. Two 
> mpruns; I attach the log too.
one run here .. can you try the beta? i remember a spurious space problem 
someplace 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] placefigure feature request ?

2006-04-05 Thread Hans Hagen
Sanjoy Mahajan wrote:
> Hans Hagen wrote:
>   
>> maybe
>> \setupfloats[numbering=nocheck]
>> does what you want
>> 
>
> I think I want the opposite.  The documentation for \setupfloats at
>  says
>
>   New option:
>   numbering   yes nocheck (default yes)
> nocheck causes no renumbering so it preserves figure's source order
>
> My problem was that the source order (which is the order of first
> reference, probably) is not the order on the page.  The wide figure
> floats to the top of the page (because it's wide) even though its
> source position is later than the narrower figure that fits in the
> margin.
>
> So 'numbering=yes' will number according to position on the page?
>
>   
no, actually floats will be renumbered automatically unless nocheck is given; 
the problem is that the order in which margins etc flush plays a role then. 

I can imagine another solution but i need a dark rainy non-busy day for that 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Problem with encoding, XML and writetolist...

2006-04-05 Thread Martin Kolařík
Hi Hans,

I've analyzed the situation using different combinations of regimes and 
encodings, including switching off handling (\donothandleactivecharacter) and 
it seems to me, that every text with chars > 127, which is fully expanded (as 
in 8bit.tex), must cause difficulties, because TOC entry read back from TUO is 
scanned independently and thus spaces are gobbled.

Now I have solved it using not-stable solution -- I am using triple sequence of 
\expandafter to expand \XMLflush after \chapter instead \expanded. The solution 
is not stable as it is ConTeXt implementation dependent.

On the other side, now I do not know, how to partially expand code 
\chaper{\XMLflush{XMLTag}} to obtain sequence of simple unexpanded chars. 
Simple \expandafter is not sufficient, more \expandafters is dirty trick and 
full expansion (\expanded) leads to TOC entry problem. In TeX source this 
cannot occur (or can occur in strange situations :-), in XML source this is 
almost rule.

Maybe it would be useful to have in XML engine macro, which expands XMLdata 
exactly to get read (original) content (like mine triple \expandafter). Maybe 
such macro already exists and I am a real fool :-)

Thank you for help, have a nice day,

Martin

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Hans Hagen
> Sent: Monday, April 03, 2006 11:57 AM
> To: [EMAIL PROTECTED]; mailing list for ConTeXt users
> Subject: Re: [NTG-context] Problem with encoding, XML and writetolist...
> 
> 
> Martin Kolařík wrote:
> > Aha, here maybe will be the solution :-)
> >
> > I'am using standalone Win32 distribution from Pragma and I'm 
> running texexec with --translate=cp1252cs. Typescripts use il2, 
> which corresponds to fonts, of course. If I run the code without 
> XML (if I transcribe XML to \chapter etc.) I get toc entry correctly too.
> >
> > Where should I look for more? What is natural.ctx?
> >   
> this is a one-to-one translation vector, and the one standard 
> used by context; forget about all those other mappings, they can 
> be done using regimes; you can use an il2 input regime, and any 
> (resonable) font encoding, 
> 
> Hans 
> 
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>  | www.pragma-pod.nl
> -
> 
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 

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