Re: [NTG-context] distributed / parallel TeX?

2008-12-17 Thread Hans Hagen

Lars Huttar wrote:

On 12/16/2008 3:15 PM, luigi scarso wrote:


On Tue, Dec 16, 2008 at 9:08 AM, Taco Hoekwater t...@elvenkind.com
mailto:t...@elvenkind.com wrote:


Hi Lars,


Lars Huttar wrote:



So the question comes up, can TeX runs take advantage of
parallelized or
distributed processing?


No. For the most part, this is because of another requisite: for
applications to make good use of threads, they have to deal with a
problem that can be parallelized well. And generally speaking,
typesetting  does not fall in this category. A seemingly small change
on page 4 can easily affect each and every page right to the end
of the document.


Also
3.11 Theory of page breaking
www.cs.utk.edu/~eijkhout/594-LaTeX/handouts/TeX%20LaTeX%20
http://www.cs.utk.edu/~eijkhout/594-LaTeX/handouts/TeX%20LaTeX%20*course*.pdf


Certainly that is a tough problem (particularly in regard to laying out
figures near the references to them). But again, if you can break down
the document into chunks that are fairly independent of each other (and
you almost always can for large texts), this problem seems no worse for
distributed processing than for sequential processing. For example, the
difficult part of laying out figures in Section 1 is confined to Section
1; it does not particularly interact with Section 2. References in
Section 2 to Section 1 figures are going to be relatively distant from
those figures regardless of page breaking decisions. Thus the difficult
problem of page breaking is reduced to the sequential-processing case...
still a hard problem, but one that can be attacked in chunks. Indeed,
the greater amount of CPU time per page that is made available through
distributed processing may mean that the algorithms can do a better job
of page breaking than through sequential processing.


you need to keep an eye on where tex spends its time on, and much is 
related to loading fonts, reading files, saving output, etc and with 
multiple threads one would have to coordinate that and make sure the 
time spent on it does not become larger overall


for instance, in your document making these large tables takes a while 
only because bTABLE is not that fast, so when at some point i can redo 
part of such mechanisms in lua we might gain way more runtime than by 
running distributed


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] distributed / parallel TeX?

2008-12-17 Thread Taco Hoekwater


Martin Schröder wrote:
 2008/12/16 Lars Huttar lars_hut...@sil.org:
 Good point... although doesn't the page optimization feed back into
 paragraph layout?
 
 No. :-(

But from Lars' POV, that is good :)

There are some interesting ideas in this discussion, but with
the current state of the code base all of this will be exceedingly
difficult (especially because of all the synchronisation issues).

Unless someone wants to work on this idea him/herself (and that
would be great, there are not nearly enough people working on TeX
development!), you could remind me, say, two years from now?

Best wishes,
Taco






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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] distributed / parallel TeX?

2008-12-17 Thread luigi scarso

 you need to keep an eye on where tex spends its time on, and much is
 related to loading fonts, reading files, saving output, etc and with
 multiple threads one would have to coordinate that and make sure the time
 spent on it does not become larger overall

 for instance, in your document making these large tables takes a while only
 because bTABLE is not that fast, so when at some point i can redo part of
 such mechanisms in lua we might gain way more runtime than by running
 distributed

 Hans


If you are under Linux
you can try /dev/shm
http://www.cyberciti.biz/tips/what-is-devshm-and-its-practical-usage.html

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


Re: [NTG-context] setupdelimitedtext: linespacing in final quoted paragraph

2008-12-17 Thread Taco Hoekwater


Sanjoy Mahajan wrote:
 Thanks for the responses.  I've wikified a short example, putting it at
 end of this page:
 
 http://wiki.contextgarden.net/Long_quotations_and_extracts
 
 Feel free to move or improve.
 
 Will LuaTeX's paragraph builder have the same restriction -- perhaps for
 compatability -- that linespacing be constant throughout the paragraph?

Maybe not (I am considering a mode where parameter changes are saved in
nodes), but even so, that does not remove the need to insert \par's
inbetween paragraphs.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] distributed / parallel TeX?

2008-12-17 Thread Lars Huttar
Thanks, everybody, for the discussion on running TeX distributed / in
parallel.
I am much educated about the state of the art. :-)

Summary ...

- There is plenty of optimization that normally can be done. If a
ConTeXt run is taking a really long time, chances are that something is
not being done according to the design.

- For most (current) purposes, documents are small enough and ConTeXt is
fast enough that the effort to automate distribution of typesetting runs
may not be worthwhile. On the other hand, the usage of TeX might expand
if greater throughput were available.

- However, as things stand now, one can always divide documents up by
hand, typeset the parts independently, and stitch them back together
using tools such as divert/undivert. One can even design a document with
the spec that the canonical typesetting process is to typeset the
sections independently; then the sections can never affect each other,
except for explicitly added inter-section effects like page reference
updates.

If you're not aware of MarkMail, it's a handy place to browse / search
archives of mailing lists. This thread can be found at
http://markmail.org/search/?q=ntg+context+distributed+parallel

On 12/17/2008 2:47 AM, Taco Hoekwater wrote:
 There are some interesting ideas in this discussion, but with
 the current state of the code base all of this will be exceedingly
 difficult (especially because of all the synchronisation issues).

 Unless someone wants to work on this idea him/herself (and that
 would be great, there are not nearly enough people working on TeX
 development!), you could remind me, say, two years from now?

Sure. Thank you for your interest.

I wasn't asking for someone to implement new features for this, though I
would be happy to see it happen if it is worthwhile for the community.

As Dr Dobb's says, Single core systems are history
(http://www.ddj.com/hpc-high-performance-computing/207100560). Software
that can take advantage of multiple cores (or threads, or distributed
nodes) will continue to scale. Of course some effort, and often some
adjustment, is necessary to enable programs to effectively use parallelism.

I'll create a page at http://wiki.contextgarden.net/Parallel summarizing
this discussion if that's OK.

Regards,
Lars

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] starting headings at top of column

2008-12-17 Thread Lars Huttar
Hello,

I've started talking to people in charge about contributing some money
to this mailing list, or the wiki, or something ... we're certainly
getting a lot of help from it. Is there an org or project to contribute to?

Anyway, my current challenge is this.
We have a two-column layout using columnsets. Fairly often, we start a
new section (within a column... this does not interrupt the flow of
columns).

Some constraints we want to fulfill are:

- Normally we want a little space before each new section heading
  - Except at the top of a column; can I check whether we're at the top
of a column and do a conditional \vskip based on that?(*)

- Avoid orphans: when starting a new section, if there's not enough room
left in the current column, do a column break before outputting the
section heading. I've tried \testcolumn[n], but it doesn't seem to work
right. What are the units of the argument to \testcolumn?

We also do manual column balancing using \definecolumnset,
\setupcolumnset, and \setupcolumnsetlines. My concern is, does this
apply after other layout is performed, so that any test performed above
(*) regarding position within the column would fail to reflect these
column balancing adjustments and therefore could give wrong results?
That could explain why \testcolumn has been behaving in unexpected ways...

Thanks,
Lars



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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] setupdelimitedtext: linespacing in final quoted paragraph

2008-12-17 Thread Sanjoy Mahajan
Taco Hoekwater t...@elvenkind.com wrote:

 ...that does not remove the need to insert \par's in between
 paragraphs.

Right, although I think that the \par, or blank line, should go after
the \stopdelimitedtext in some cases.  I was imagining (and using)
quotations within a single larger paragraph, for example:

  Blah, blah, blah says:

 Ideas A, B and C.

  But those ideas are nonsense.

where the Ideas A, B, and C. are indeed a paragraph but internal to
the single surrounding paragraph, like a displayed equation would be.

Then it could be typeset:

  Blah, blah, blah says:
  \startblockquote
   Ideas A, B and C.
  \stopblockquote
  But those ideas are nonsense.

  On to the next paragraph...

Rather, it could be typeset that way if the TeX paragraph builder didn't
have the constant linespacing restriction (or maybe with \vadjust).

-Sanjoy

`Until lions have their historians, tales of the hunt shall always
 glorify the hunters.'  --African Proverb
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Contributing [was: Re: starting headings at top of column

2008-12-17 Thread Idris Samawi Hamid ادريس سماوي ح امد

Hi Lars,

On Wed, 17 Dec 2008 10:57:41 -0700, Lars Huttar lars_hut...@sil.org  
wrote:



I've started talking to people in charge about contributing some money
to this mailing list, or the wiki, or something ... we're certainly
getting a lot of help from it. Is there an org or project to contribute  
to?


My suggestion is to start a fund to sponsor the first commercial ConTeXt  
book. Steve Peter, myself and others have been pushing in this direction  
for awhile, and the time is approaching to work on it in earnest. Feel  
free to contact me off-list to discuss this if you like.


Best wishes
Idris

--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] starting headings at top of column

2008-12-17 Thread Hans Hagen

Lars Huttar wrote:

Hello,

I've started talking to people in charge about contributing some money
to this mailing list, or the wiki, or something ... we're certainly
getting a lot of help from it. Is there an org or project to contribute to?


a few ideas:

- at the tug web page there is a sponsor link ..

https://www.tug.org/donate.html

there you can explicitly sponsor luatex code development (which includes 
mplib); since this project is directly related to context mkiv, support 
will indirectly boost mkiv development (ok, within the limitations of my 
time)


- another option is to sponsor development meetings (e.g. help some 
contributers to context to attend the context conference); there is no 
context link (yet) on the tug page -)



Anyway, my current challenge is this.
We have a two-column layout using columnsets. Fairly often, we start a
new section (within a column... this does not interrupt the flow of
columns).

Some constraints we want to fulfill are:

- Normally we want a little space before each new section heading
  - Except at the top of a column; can I check whether we're at the top
of a column and do a conditional \vskip based on that?(*)

- Avoid orphans: when starting a new section, if there's not enough room
left in the current column, do a column break before outputting the
section heading. I've tried \testcolumn[n], but it doesn't seem to work
right. What are the units of the argument to \testcolumn?

We also do manual column balancing using \definecolumnset,
\setupcolumnset, and \setupcolumnsetlines. My concern is, does this
apply after other layout is performed, so that any test performed above
(*) regarding position within the column would fail to reflect these
column balancing adjustments and therefore could give wrong results?
That could explain why \testcolumn has been behaving in unexpected ways...


columnsets are kind of special:

- strongly grid based (which permits tricky figure placement)
- a regular mvl (which permits most context features)

sometime next year, when we enter the 'opening up luatexs page-builder' 
stage, we can look into enhancing columnsets (i hit some of tex's 
limitations there)


also, when the mvl code is extended i can finish the new mkiv 
spacing/penalty model i'm working on (but first math)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] mpost manual

2008-12-17 Thread luigi scarso
There is a bugtracker for this
http://tracker.luatex.org/ http://tracker.luatex.org/view.php?id=137

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


[NTG-context] mpost manual

2008-12-17 Thread Hans van der Meer
This might be considered a little off topic but I take the liberty to  
draw your attention to a problem with the mpost distribution. If there  
is really a problem with that distribution, I think it is in our  
interest to remedy it.


I made mpost from the mpost-1.101 distribution (sh build.sh), then  
updated mpost.mem and finally called make in the manual directory of  
this distribution. Surprisingly a faulty cmr10.tfm was flagged. The  
output being:


122 ~/TeX/metapost/metapost-1.101/manual: make
mpost -tex=tex mpman
This is MetaPost, version 1.101 (kpathsea version 3.5.7)
(./mpman.mp (/usr/local/texlive/2008/texmf-dist/metapost/base/boxes.mp)
! Font cmr10 not usable: TFM file is bad.
_s-...oup.addto._p.also(EXPR2)infont(EXPR3)scaled
   
(EXPR4)shifted((EXPR5),(EX...

argument ..._n0=cmr10;_s(Figures,_n0,1,0,0,)
  ;_s 
(in,_n0,1,35.3674,0,)...


beginbox_-...UFFIX2):=nullpicture;for._p_=(TEXT3)
  :pic_ 
(SUFFIX2):=if.picture...


boxit-...boxpath_,sizebox_,(SUFFIX2),(TEXT3))
  ;generic_declare 
(pair)_n.s...

l.26 aa(btex \place{Figures in MetaPost} etex)
  ;
As can be seen, I am using the texlive/2008 distribution (on Macintosh  
MACOSX 10.5.6).


Searching for cmr10.tfm delivers:
120 ~/TeX/metapost/metapost-1.101/manual: kpsewhich cmr10.tfm
/usr/local/texlive/2008/texmf-dist/fonts/tfm/public/cm/cmr10.tfm
Which should be fine in my opinion.

The question: Are there people out there who would be willing try the  
same and report the result? This is the first step to locate the  
problem: is this is local or does it occur elsewhere and on different  
systems too?


Hans van der Meer




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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Unescaped $ and in texts

2008-12-17 Thread Wolfgang Schuster

Can't we add a new mode to ConTeXt to use $ and  in text
without escaping them with a backslash,  is not needed
to write tables and for inline math \formula could be used.

In text only documents I want also the % as normal character
where I don't need comments. What do you think, with \nonknuthmode
we have already a command to write '_' in text mode.

\appendtoks
\catcode`\$=12
\catcode`\=12
\catcode`\%=12
\to \everystarttext

\starttext

Procter  Gamble’s stock climbed to $2, a 10% gain.

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Unescaped $ and in texts

2008-12-17 Thread Aditya Mahajan

On Wed, 17 Dec 2008, Wolfgang Schuster wrote:


Can't we add a new mode to ConTeXt to use $ and  in text
without escaping them with a backslash,  is not needed
to write tables and for inline math \formula could be used.


Also add # to the list. Basically, we can just define a catcode regime 
where only \ { and } are special. Inside math mode (activated by \formula, 
\math, \mathematics, or \startformula) we can switch to a catcode regime 
where _ and ^ are also set to appropriate catcodes. I would go as far as 
to say that we should make this default, but I don't think everyone will 
like that. So, for me a \justwritenaturally macro will do :-)


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] interactionbuttons question

2008-12-17 Thread Alan STONE
How do you get the buttons within the edge's left and right margins while
keeping the button width=\rightedgewidth ?

\setuplayout[
 rightmargin=0mm,
 rightedge=15mm]

\showframe

\def\myButtons{
\vtop {
  \interactionbuttons[
   width=\rightedgewidth,
   height=20pt]
   [StartMovie]
  \blank
  \interactionbuttons[
   width=\rightedgewidth,
   height=20pt]
   [StartMovie]}}

\setupinteraction[state=start]

\setuptexttexts[edge]
 [][\myButtons]

\starttext
test
\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Unescaped $ and in texts

2008-12-17 Thread Wolfgang Schuster


Am 17.12.2008 um 21:46 schrieb Aditya Mahajan:


On Wed, 17 Dec 2008, Wolfgang Schuster wrote:


Can't we add a new mode to ConTeXt to use $ and  in text
without escaping them with a backslash,  is not needed
to write tables and for inline math \formula could be used.


Also add # to the list. Basically, we can just define a catcode  
regime where only \ { and } are special. Inside math mode (activated  
by \formula, \math, \mathematics, or \startformula) we can switch to  
a catcode regime where _ and ^ are also set to appropriate catcodes.  
I would go as far as to say that we should make this default, but I  
don't think everyone will like that. So, for me a  
\justwritenaturally macro will do :-)


I wasn't sure if I should add # to the list bit it makes sense.

\nonknuthmode takes care to tread _ and ^ as subscript and superscript
in math mode and as normal chars in text mode.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Unescaped $ and in texts

2008-12-17 Thread Hans Hagen

Aditya Mahajan wrote:

On Wed, 17 Dec 2008, Wolfgang Schuster wrote:


Can't we add a new mode to ConTeXt to use $ and  in text
without escaping them with a backslash,  is not needed
to write tables and for inline math \formula could be used.


Also add # to the list. Basically, we can just define a catcode regime 
where only \ { and } are special. Inside math mode (activated by 
\formula, \math, \mathematics, or \startformula) we can switch to a 
catcode regime where _ and ^ are also set to appropriate catcodes. I 


there is already \nonknuthmode -)

would go as far as to say that we should make this default, but I don't 
think everyone will like that. So, for me a \justwritenaturally macro 
will do :-)


we can discuss this some time next year or so; it is slightly more 
complex than changing a few catcoded because we need to make sure that 
modules etc are loaded under a different catcode regime then


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Reset linenumbers on each page

2008-12-17 Thread Wolfgang Schuster

Hi,

How can I reset the linenumber on each new page.

\starttext

\startlinenumbering
\dorecurse{10}{\input knuth\par}
\stoplinenumbering

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___