Re: [NTG-context] counter in ConTeXt

2006-12-15 Thread Aditya Mahajan
On Thu, 14 Dec 2006, Michael wrote:


 How do I use counter in ConTeXt?

 Specifically, I use this to define '\startproblem\stopproblem'.

 \defineenumeration[problem][location=top,text=Problem,%
between=\blank,before=\blank,after=\page]

 I want to say \totalnumberofproblems, in the beginning of the exam, like
 \totalnumberofpages.  How do I do that?

You need to have a two pass mechanism for this. Save the number of 
problems in the tui/tuo file in the first run and read the 
corresponding values from the file in the second run. Here is a simple 
example

\defineenumeration[problem][location=top,text=Problem,%
  between=\blank,before=\blank]

\def\nofproblems{0}

\definetwopasslist  {problems}

\def\checkproblems
   {\gettwopassdata{problems}
   \iftwopassdatafound
 \xdef \nofproblems {\twopassdata}
   \fi
   \global\let\checkproblems\relax}

\starttext

\checkproblems

This paper has \nofproblems\ Problems.

\dorecurse{10}
{\startproblem test \stopproblem}

\savetwopassdata  {problems}  {\nofproblems} {\getnumber[problem]}

\stoptext



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


Re: [NTG-context] french, ponctuation and directdiscretionary or discretionarytoken pb

2006-12-15 Thread Taco Hoekwater

Hi Olivier,

olivier Turlier wrote:
 Hi everybody,
 
 I've recently upgraded to ConTeXt  ver: 2006.11.23 14:46 MK II  fmt:
 2006.11.24  int: english/english (mswincontext.zip of 2006-11-24) and

Please update again (this should be fixed in 2006.12.07).

Also, please subscribe to the mailing list from the address you use
for posting.

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


[NTG-context] Page headers/footers setup

2006-12-15 Thread Wim Neimeijer
Hi all,

I want to use different headers/footers for the different section blocks.
I use \setupheaderstexts, \setupfootertexts but those are global settings.

What I now use is a couple of \setupheader[state=start/stop] and
\setupfooter[state=start/stop] to switch off/on the (un)desired 
header/footer.

How can I specifically set the headers/footers per sectionblock so
they act only on the body matter or back matter ?

Kind regards

Wim

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


[NTG-context] Full justification within \startframedtext..\stopframedtext

2006-12-15 Thread John R. Culleton
I want even margins within a textframe. How to do it?
-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com

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


[NTG-context] TeX capacity exceeded with my macros

2006-12-15 Thread luigi scarso
I have a
TeX capacity exceeded
message.
I think I'm doing too much,
but before to try another way I would know if
I should enlarge context.

This macro is called ~ 70 000 times
\SetArtValue{1:330128:1007:336:1:d}{}

PS
No problem if none answer to this message.


\def\SetArtValue#1#2{%
\edef\Temp{#1}
\beforesplitstring#1\at:\to\Lang\aftersplitstring#1\at:\to\Temp%%
\beforesplitstring\Temp\at:\to\Code\aftersplitstring\Temp\at:\to\Temp%%
\beforesplitstring\Temp\at:\to\RowLabelId\aftersplitstring\Temp\at:\to\Temp%%
\beforesplitstring\Temp\at:\to\RowId\aftersplitstring\Temp\at:\to\Temp%%
\doiffirstcharelse{9}{\Code}{}{%else
\setgvalue{\Code:\RowId}{{\RowLabelId,#2}}
\setxvalue{\Code}{\Code}
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@EA\appendtoks\RowId,\to\ArticlesRowIdList}
\setxvalue{Array:\the\Row:\the\SummaryTableCountArticles}{(r=\the\Row,c=\the\SummaryTableCountArticles)}%
}
}




\SetArtValue{1:330128:1007:336:1:d}{}

! TeX capacity exceeded, sorry [hash size=6].
\setgvalue ...andafter \gdef \csname #1\endcsname

argument \setgvalue {\Code :\RowId }
  {{\RowLabelId ,}} \setxvalue {\Code }{...

\secondoftwoarguments #1#2-#2

\SetArtValue ...\RowId ,\to \ArticlesRowIdList } }

l.21796 \SetArtValue{1:330128:1007:336:1:d}{}
 %Doleplate\width - mm
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.


Here is how much of TeX's memory you used:
 25279 strings out of 62456
 270234 string characters out of 659612
 4705997 words of memory out of 5746700
 6 multiletter control sequences out of 1+5
 46713 words of font info for 77 fonts, out of 50 for 2000
 408 hyphenation exceptions out of 1000
 47i,15n,56p,343b,556s stack positions out of 3000i,1500n,5000p,20b,15000s
PDF statistics:
 2 PDF objects out of 30
 0 named destinations out of 131072
 7 words of extra memory for PDF output out of 65536
!  == Fatal error occurred, the output PDF file is not finished!

My texmf.cnf
% ConTeXt is a memory hog...
extra_mem_top.context = 200
extra_mem_bot.context = 400
main_memory.context = 150
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Full justification within \startframedtext..\stopframedtext

2006-12-15 Thread Aditya Mahajan
On Fri, 15 Dec 2006, John R. Culleton wrote:

 I want even margins within a textframe. How to do it?

What do you mean by even margins?

maybe

\setupframedtexts[width=\textwidth]

or

\setupframedtexts[align=hanging]

Aditya

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


Re: [NTG-context] TeX capacity exceeded with my macros

2006-12-15 Thread andrea valle
Luigi,
I'm totally ignorant but I know for sure there are some messages on the  
list on the topic (one thread started by me). Maybe it could be helpful  
to check the archives?

Best

-a-

On 15 Dec 2006, at 16:55, luigi scarso wrote:

 I have a
 TeX capacity exceeded
 message.
 I think I'm doing too much,
 but before to try another way I would know if
 I should enlarge context.

 This macro is called ~ 70 000 times
 \SetArtValue{1:330128:1007:336:1:d}{}

 PS
 No problem if none answer to this message.

 --- 
 -
 \def\SetArtValue#1#2{%
 \edef\Temp{#1}
 \beforesplitstring#1\at:\to\Lang\aftersplitstring#1\at:\to\Temp%%
 \beforesplitstring\Temp\at:\to\Code\aftersplitstring\Temp\at:\to\Temp%%
 \beforesplitstring\Temp\at:\to\RowLabelId\aftersplitstring\Temp\at: 
 \to\Temp%%
 \beforesplitstring\Temp\at:\to\RowId\aftersplitstring\Temp\at: 
 \to\Temp%%
 \doiffirstcharelse{9}{\Code}{}{%else
 \setgvalue{\Code:\RowId}{{\RowLabelId,#2}}
 \setxvalue{\Code}{\Code}
 [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED] 
 [EMAIL PROTECTED],\to\ArticlesRowIdList}
 \setxvalue{Array:\the\Row: 
 \the\SummaryTableCountArticles}{(r=\the\Row,c=\the\SummaryTableCountArt 
 icles)}%
 }
 }




 \SetArtValue{1:330128:1007:336:1:d}{}

 ! TeX capacity exceeded, sorry [hash size=6].
 \setgvalue ...andafter \gdef \csname #1\endcsname

 argument \setgvalue {\Code :\RowId }
   {{\RowLabelId ,}} \setxvalue  
 {\Code }{...

 \secondoftwoarguments #1#2-#2

 \SetArtValue ...\RowId ,\to \ArticlesRowIdList } }

 l.21796 \SetArtValue{1:330128:1007:336:1:d}{}
  %Doleplate\width - mm
 If you really absolutely need more capacity,
 you can ask a wizard to enlarge me.


 Here is how much of TeX's memory you used:
  25279 strings out of 62456
  270234 string characters out of 659612
  4705997 words of memory out of 5746700
  6 multiletter control sequences out of 1+5
  46713 words of font info for 77 fonts, out of 50 for 2000
  408 hyphenation exceptions out of 1000
  47i,15n,56p,343b,556s stack positions out of  
 3000i,1500n,5000p,20b,15000s
 PDF statistics:
  2 PDF objects out of 30
  0 named destinations out of 131072
  7 words of extra memory for PDF output out of 65536
 !  == Fatal error occurred, the output PDF file is not finished!

 My texmf.cnf
 % ConTeXt is a memory hog...
 extra_mem_top.context = 200
 extra_mem_bot.context = 400
 main_memory.context = 150
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context


Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
[EMAIL PROTECTED]

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


Re: [NTG-context] Full justification within \startframedtext..\stopframedtext

2006-12-15 Thread John R. Culleton
On Friday 15 December 2006 10:55, Aditya Mahajan wrote:
 On Fri, 15 Dec 2006, John R. Culleton wrote:
  I want even margins within a textframe. How to do it?

 What do you mean by even margins?

 maybe

TeX normally sets a paragraph with full justification, which means that each 
line of text is the same length and the text block appears rectangular. That 
is what I want to achieve within a framed text.

 \setupframedtexts[width=\textwidth]

I already have the width set narrower. 
 or

 \setupframedtexts[align=hanging]

 Aditya


I eliminated align=middle and it cured itself.  But now it overhyphenates.

John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com

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


Re: [NTG-context] \placeformula and $$ doesn't work anymore

2006-12-15 Thread Hubertus
Hello again,
I've been offline for the last week, so I could'nd write. Thanks for your 
answers!
Well my problem is, that I'm just some kind of ordinary user. I've no clue about
tex. I've had a look into the conre-mat.tex and tried to compare it with your
posts. But, alas, no success.
Is this a bug which is going to be fixed, or do I have to do it myself? If that
is the case, please give me more detailed informations about what I have to do.
Have a good weekend

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


Re: [NTG-context] french, ponctuation and directdiscretionary or discretionarytoken pb

2006-12-15 Thread olivier Turlier
Taco Hoekwater a écrit :
 Hi Olivier,
 
 Please update again (this should be fixed in 2006.12.07).
 
 Also, please subscribe to the mailing list from the address you use
 for posting.
 
 Best, Taco

Ok, thanks for the answer, will do it.

I'll manage also modifications on ntg ml, and will try to remenber to
check size of attachment files under 40 kO !

Thanks again

-- 
Olivier TURLIER
CRP La Rouguière
101 Bd des Libérateurs
13367 MARSEILLE CEDEX 11
tel : (33) 04 91 18 56 00

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


[NTG-context] Fwd: coupling register with head

2006-12-15 Thread Idris Samawi Hamid
Dear knights,

I sent this earlier, never got a response...

I'm sure I'm not the first to ask this question, seems like a pretty  
common register-task. But if it's impossible, please let me know that too!

Best
Idris

--- Forwarded message ---
From: Idris Samawi Hamid [EMAIL PROTECTED]
To: mailing list for ConTeXt users ntg-context@ntg.nl
Cc:
Subject: [NTG-context] coupling register with head
Date: Sun, 10 Dec 2006 20:49:48 -0700

Dear posse,

Is it possible to couple the \index register with \head instead of page
numbers? I have a document that is exactly one single
\start-\stopitemize[n] with over 1000 \head entries. The \index'ed items
occur for the most part in the second paragraph after \head. I would like
the index to tell me which heading number my entry falls under.

Is this possible? If so, how?

Thnx in advance and
Best
Idris



-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Full justification within \startframedtext..\stopframedtext

2006-12-15 Thread Aditya Mahajan
On Fri, 15 Dec 2006, John R. Culleton wrote:

 On Friday 15 December 2006 10:55, Aditya Mahajan wrote:
  On Fri, 15 Dec 2006, John R. Culleton wrote:
   I want even margins within a textframe. How to do it?
 
  What do you mean by even margins?
 
  maybe
 
 TeX normally sets a paragraph with full justification, which means that each 
 line of text is the same length and the text block appears rectangular. That 
 is what I want to achieve within a framed text.
 
  or
 
  \setupframedtexts[align=hanging]
 
 I eliminated align=middle and it cured itself.  But now it overhyphenates.

\setupframedtexts[align=verytolerant] ?

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


[NTG-context] What happened to the em dashes?

2006-12-15 Thread John R. Culleton
I just noticed on a sample chapter sent to a customer that the em dashes are 
missing. What is shown is the three hyphens instead.

In my document I have this:

\loadmapfile[8r-adobe-garamond.map]
\usetypescriptfile[type-agaramond.tex]
\usetypescript[AGaramond]
\setupbodyfont[MyGaramond,11pt]

In type-agaramond.tex I have this:
---
\usetypescriptfile[type-buy]

\starttypescript [serif] [garamond] [8r]
  \definefontsynonym [AGaramond-Roman]   [8r-raw-AGaramond-Regular]  
[encoding=8r]
\definefontsynonym [AGaramond-Italic]  [8r-raw-AGaramond-Italic] 
[encoding=8r]
 \definefontsynonym [AGaramond-Roman-SmallCaps] [8r-raw-AGaramond-RegularSC] 
[encoding=8r]
\stoptypescript

\starttypescript [serif] [garamond] [name]
  \usetypescript[serif][fallback]
  \definefontsynonym [Serif]   [AGaramond-Roman]
  \definefontsynonym [SerifItalic] [AGaramond-Italic]
 \definefontsynonym [SerifCaps]   [AGaramond-Roman-SmallCaps]  
\stoptypescript

\starttypescript [AGaramond] 
  \definetypeface [MyGaramond] [rm] [serif] [garamond] [default] [encoding=8r]
\stoptypescript
-
I intstalled the fonts by using the texfont package.

I can of course look up the glyph on the chart and do a \char thingie but the 
em dash is so basic I don't know how I messed it up. Does it have something 
to do with the 8r-raw encoding? That is what came out of texfont. 


-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com

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


Re: [NTG-context] TeX capacity exceeded with my macros

2006-12-15 Thread Hans Hagen
luigi scarso wrote:
 I have a
 TeX capacity exceeded
 message.
 I think I'm doing too much,
 but before to try another way I would know if
 I should enlarge context.

 This macro is called ~ 70 000 times
 \SetArtValue{1:330128:1007:336:1:d}{}

 PS
 No problem if none answer to this message.

   
in texmf.cnf increase the hash size and remake the format 


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