[NTG-context] (XeTeX) trouble debugging a Missing number error

2012-12-05 Thread Lars Huttar
Hi all,

I'm working with some code that was developed by someone else.
The document I'm typesetting is now giving the following error:

! Missing number, treated as zero.
to be read again
   \otr:1:27
\OTRSETdoifcellelse ...er #1:\number #2\endcsname
  \@EA
\secondoftwoarguments...

\@@ar@@1 ...ellelse {\mofcolumns }\columnlastcell
  {\global \advance
\columnl...

\redoloop -\expandrecursecontent
  \endofloop
to be read again
   {
inserted text
28
...
l.12 \startabblist
  {
?

I haven't been able to figure out what's wrong or how to fix it.

I had just made changes to refactor the definitions of fonts. (I
confirmed that these changes really are a necessary cause of the error:
when I back out just these changes, the error goes away.)

From the above error message I understand the error was detected during
the expansion of \startabblist. Here's the definition of abblist:

% Abbreviations
\definestartstop
  [abblist]
  [before={\setupbackgrounds[text][background=verticalline]
\starttextbackground[text]
\setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left]
\startcolumnset[abbcolumn] \startalignment[flushleft,nothyphenated]},
   after={\stopalignment \stopcolumnset \stoptextbackground
\setupbackgrounds[text][background=off]}]

From that, one might guess that the font SansB or the font dimension
\SansBsize were the problem. But those definitions haven't changed
(though I would like to confirm that empirically with a run-time trace
message).

Here are the font settings changes that did occur:

E16fonts.tex:
changed this block:
  \definefont[SerifXLI][name:GentiumBookBasic-Italic at 10pt]
  \definefont[SerifXXL][name:GentiumBookBasic at 12pt]
  \definefont[SerifXXLB][name:GentiumBookBasic-Bold at 12pt]

to use size dimensions defined elsewhere:
\definefont[SerifXLI][name:GentiumBookBasic-Italic at \XLfontsize]
\definefont[SerifXXL][name:GentiumBookBasic at \XXLfontsize]
\definefont[SerifXXLB][name:GentiumBookBasic-Bold at \XXLfontsize]

E16settings.tex: I added these definitions:
\define\XLfontsize{14pt}
\define\XXLfontsize{16pt}

There are modes involved, so things are a bit more complicated, but I
believe that is the only effective difference.

I also created a log file, which I'll attach.
There is also a version with \tracingmacros=1, but it's 600K, so I'll
put it at
http://www.huttar.net/tmp/country-report-country_id-15-tracing.log

Thanks for taking a look. Please let me know what further information I
need to provide.
I can provide the .tex files themselves upon request.

I would especially like to know better techniques for debugging -- how I
can induce TeX/ConTeXt to tell me more about what's going on. I realize
that as a macro language, this is inherently difficult with TeX.

We are heavily invested in XeTeX, so switching to LuaTeX in the near
term is not an option.

ConTeXt version: ConTeXt  ver: 2012.05.30 11:26 MKII  fmt: 2012.11.14
int: english/english
(From TeX Live 2012)

XeTeX version: 3.1415926-2.4-0.9998 (TeX Live 2012) (format=cont-en
2012.11.14)

Lars



This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012) (format=cont-en 
2012.11.14)  4 DEC 2012 14:17
entering extended mode
 restricted \write18 enabled.
 %-line parsing enabled.
**country-report-country_id-15.tex
(./country-report-country_id-15.tex

ConTeXt  ver: 2012.05.30 11:26 MKII  fmt: 2012.11.14  int: english/english

system  : cont-new.mkii loaded
(/usr/local/texlive/2012/texmf-dist/tex/context/base/cont-new.mkii
systems : beware: some patches loaded from cont-new.mkii
)
system  : cont-sys.rme loaded
(/usr/local/texlive/2012/texmf-dist/tex/context/user/cont-sys.rme
(/usr/local/texlive/2012/texmf-dist/tex/context/base/type-siz.mkii)
(/usr/local/texlive/2012/texmf-dist/tex/context/base/type-otf.mkii)
(/usr/local/texlive/2012/texmf-dist/tex/context/base/type-xtx.mkii))
system  : country-report-country_id-15.top loaded
(./country-report-country_id-15.top)
bodyfont: 12pt rm is loaded
language: patterns nl-default:default-1-2:2 us-default:default-2-
2:3 de-default:default-3-3:3 da-default:default-4-2:2 sv-default:default
-5-2:2 af-default:default-6-2:2 gb-default:default-7-2:2 fr-default:de
fault-8-2:2 es-default:default-9-2:2 ca-default:default-10-2:2 it-defa
ult:default-11-2:2 la-default:default-12-2:2 pt-default:default-13-2:2 
ro-default:default-14-2:2 pl-default:default-15-2:2 cs-default:default-
16-2:2 sk-default:default-17-2:2 hr-default:default-18-2:2 sl-default:d
efault-19-2:2 tr-default:default-20-2:2 tk-default:default-21-1:2 lt-d
efault:default-22-2:2 agr-default:default-24-2:2 fi-default:default-25-
2:2 hu-default:default-26-2:2 ru-default:default-28-2:2 uk-default:defau
lt-29-3:3  loaded
specials: dvips loaded
\openout3 = 

Re: [NTG-context] (XeTeX) trouble debugging a Missing number error

2012-12-05 Thread Lars Huttar
/Hans Hagen wrote (///Wed Dec 5 14:10:12 CET 2012/):/


 
 On 12/5/2012 11:19 AM, Lars Huttar wrote:
 / Hi all,
 /

/...

/
 /
 //
 // % Abbreviations
 // \definestartstop
 //[abblist]
 //[before={\setupbackgrounds[text][background=verticalline]
 // \starttextbackground[text]
 // 
 \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left]
 // \startcolumnset[abbcolumn] \startalignment[flushleft,nothyphenated]},
 // after={\stopalignment \stopcolumnset \stoptextbackground
 // \setupbackgrounds[text][background=off]}]
 /
 you can try

 \unexpanded\def\StartAbbList
{\setupbackgrounds[text][background=verticalline]
 \starttextbackground[text]
  
 \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left]
 \startcolumnset[abbcolumn]
 \startalignment[flushleft,nothyphenated]}

 \unexpanded\def\StopAbbList
{\stopalignment
 \stopcolumnset
 \stoptextbackground
 \setupbackgrounds[text][background=off]}

 \definestartstop
[abblist]
[before=\StartAbbList,
 after=\StopAbbList]

Thanks, I will try this.
Is the goal of this change to fix the error? To help diagnose it?
I don't really understand the use of \unexpanded.

After making this change, the behavior is unaffected... I still get the
Missing number error, etc.


 in such case best make a small example, for instance how is abblist used?


\startabblist{
\tab{\ITC{alt.}}\AE{alternate name for}\par
...
\tab{USDS}\AE{US Department of State}\par
}\stopabblist

where \AE is defined as:

   \def\AE#1{\hskip -3mm \SerifL{#1} \vskip 1mm}


 /
 // E16settings.tex: I added these definitions:
 // \define\XLfontsize{14pt}
 // \define\XXLfontsize{16pt}
 //
 // There are modes involved, so things are a bit more complicated, but I
 // believe that is the only effective difference.
 /
 and how about:

 \def\XLfontsize{14pt}
 \def\XXLfontsize{16pt}

I will try that, but all our font size definitions have always used
\define, and it used to work fine without errors.
On http://wiki.contextgarden.net/Command/define it says that \define is
like the TeX primitive \def, but will print an error to the log file if
the new definition overwrites an existing command.
I checked the log file, and there is no error mentioning XLfontsize.

So the purpose of your suggestion is to remove the possibility of
reporting a duplicate definition? (There's probably more to it than that
- I'm just trying to understand.)

I tried changing \define to \def as you suggested. The result was
unchanged - same error.

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


Re: [NTG-context] (XeTeX) trouble debugging a Missing number error

2012-12-07 Thread Lars Huttar
In response to Hans Hagen and Wolfgang Schuster's messages of Dec. 5,
Just to let you know, in response to your messages, I am working a
small, self-contained example that reproduces the problem.
However I have been asked to focus on a different project for a few
days, so ... please don't interpret my silence as We asked him to do
due diligence and he never answered. :-) Hopefully I'll be back with
more, next week.

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


[NTG-context] Missing number, treated as zero error when using \definefont with \define'd dimension

2013-03-21 Thread Lars Huttar
Hello,

I reported a Missing Number error back in December (thread at
http://www.ntg.nl/pipermail/ntg-context/2012/070471.html) but got
sidetracked on another issue before finding a resolution.
Now I'm back to the Missing Number error, and I have a short example
that reproduces it:

  \define\largefontsize{13pt}

  % Works fine: \definefont[SerifL][Arial at 13pt]
  % Leads to error:
  \definefont[SerifL][Arial at \largefontsize]

  % Missing number, treated as zero error thrown on the following line:
  \starttext \SerifL{Hello} \stoptext

Note that the SerifL font definition works fine (no error) if I
hard-code in 13pt instead of using an intervening \largefontsize
definition. But if I hard-code the point size, it would hamper the
modularity of our font configuration and the use of modes in which
different size fonts are used.

Maybe \define is just the wrong command to use when creating an
identifier for a specified dimension?
I tried changing it to \def and the error went away!

I looked up the documentation of \define
(http://wiki.contextgarden.net/Command/define) and \def, and couldn't
find any obvious difference, except that \def is TeX and \define is
ConTeXt. The wiki page I just linked to mentions differences between
MkII and MkIV, but this error occurs in both (in XeTeX and LuaTeX).

Can someone help me understand why I should not use \define for this
case? (Or in general, when I should not use \define?) Or does the
problem lie somewhere else?

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


[NTG-context] Missing number error, related to setupcolumnsetlines

2013-04-18 Thread Lars Huttar
Hello,
I've got a Missing number error, treated as zero. I've whittled the
problem code down to this minimal example:

\definecolumnset [abbcolumn] [n=2,distance=5mm,balancing=yes]

\setupcolumnsetlines[abbcolumn][1][1][60]
\setupcolumnsetlines[abbcolumn][1][2][60]

\starttext
\startcolumnset[abbcolumn]
foo
\stopcolumnset
\stoptext


By contrast, if I remove the \setupcolumnsetlines commands, the error
goes away. (But I think I need those commands, in case the text has more
than 60 lines.)

Also, if I run the example shown on this page
http://wiki.contextgarden.net/Command/setupcolumnsetlines
which seems very similar to mine, it works fine; no errors.

Based on the latter working example, I tried adding the following to my
minimal example that fails:

\switchtobodyfont[small]
or
\setupcolumnsetstart[abbcolumn][1][1][1]
\setupcolumnsetstart[abbcolumn][1][2][1]


but neither one solved the problem.

Here is more of the error output I received when running TeX on the
minimal example shown at the start of this email:

! Missing number, treated as zero.

system   tex  error on line 8 in file minimalex-133.tex:
Missing number, treated as zero ...

 1 \definecolumnset [abbcolumn] [n=2,distance=5mm,balancing=yes]
 2
 3 \setupcolumnsetlines[abbcolumn][1][1][60]
 4 \setupcolumnsetlines[abbcolumn][1][2][60]
 5
 6 \starttext
 7 \startcolumnset[abbcolumn]
 8   foo
 9 \stopcolumnset
10 \stoptext
11

to be read again
   \otr:1:43
\OTRSETdoifcellelse ...er #1:\number #2\endcsname
  \@EA
\secondoftwoarguments...
\@@ar@@1 ...ellelse {\mofcolumns }\columnlastcell
  {\global \advance
\columnl...
\redoloop -\expandrecursecontent
  \endofloop
to be read again
   {
inserted text
44
...
l.8 f
 oo
?



Here is some of the earlier output, include the version info:

 context --mode=windows,report,border --nomapfiles --verbose 
minimalex-133.tex

resolvers   | resolving | creating instance
resolvers   | resolving | variable 'SELFAUTOLOC' set to
'c:/texlive/2012/bin/win32'
...
resolvers   | resolving |
resolvers   | resolving | unknown configuration file
'C:/Users/huttarl/texmf/web2c/texmfcnf.lua'
resolvers   | resolving | unknown configuration file
'c:/texlive/2012/bin/win32/texmfcnf.lua'
...
This is LuaTeX, Version beta-0.70.2-2012080612 (TeX Live 2012/W32TeX)
 \write18 enabled.
(minimalex-133.tex

ConTeXt  ver: 2012.05.30 11:26 MKIV  fmt: 2013.3.11  int: english/english


Thanks for any help!

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


Re: [NTG-context] Missing number error, related to setupcolumnsetlines

2013-04-22 Thread Lars Huttar
On /Fri Apr 19 21:36:41 CEST 2013 /Hans Hagen wrote:
 On 4/18/2013 11:13 PM, Lars Huttar wrote:
 / \definecolumnset [abbcolumn] [n=2,distance=5mm,balancing=yes]
 //
 //  \setupcolumnsetlines[abbcolumn][1][1][60]
 //  \setupcolumnsetlines[abbcolumn][1][2][60]
 /
 the 60 exceeds the number of lines

Hans, thanks for responding.

I don't understand the above statement. What number of lines does 60
exceed? Is there a hard-coded limit? (We didn't seem to have a problem
with this code before we migrated from XeTeX / mkii to LuaTeX / mkiv,
but I couldn't guarantee what else is different.)

Is there a workaround for us now?
I could leave out the \setupcolumnsetlines commands for the moment, and
hope we don't overflow the page. Actually I'm not sure what will happen
if we leave the number of lines at the default (which is apparently zero?).

Regards,
Lars


 /  \starttext
 //  \startcolumnset[abbcolumn]
 //  foo
 //  \stopcolumnset
 //  \stoptext
 /
 i'll add a check

 (i will redo columnsets at some point in a more mkiv-ish way)

 Hans

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

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


Re: [NTG-context] Missing number error, related to setupcolumnsetlines

2013-04-24 Thread Lars Huttar
On /Mon Apr 22 18:59:07 CEST 2013, Hans Hagen wrote:
/
 On 4/22/2013 4:24 PM, Lars Huttar wrote:
 / On /Fri Apr 19 21:36:41 CEST 2013 /Hans Hagen wrote:
 // On 4/18/2013 11:13 PM, Lars Huttar wrote:
 // / \definecolumnset [abbcolumn] [n=2,distance=5mm,balancing=yes]
 // //
 // //  \setupcolumnsetlines[abbcolumn][1][1][60]
 // //  \setupcolumnsetlines[abbcolumn][1][2][60]
 // /
 // the 60 exceeds the number of lines
 //
 // Hans, thanks for responding.
 //
 // I don't understand the above statement. What number of lines does 60
 // exceed? Is there a hard-coded limit? (We didn't seem to have a problem
 // with this code before we migrated from XeTeX / mkii to LuaTeX / mkiv,
 // but I couldn't guarantee what else is different.)
 /
 Column sets allocates a box for each line but does that dynamically 
 (i.e. at the start of a columnset) but the min/max settings in the above 
 command don't check for that so if you have a 55 line layout you get an 
 overflow.

OK, I think I understand now.

 / Is there a workaround for us now?
 /
 I've added a check.

I'm not sure what this means. I guess it will prevent the error message
from occurring.
Is it something I would get from a nightly development snapshot?
If so, where do I find it?

But it also sounds like there's no point in our having a setting of 60
lines when there are only 42 lines in our layout (that's the number
above which this error occurs). So I need to either tweak our layout, or
reduce the number of lines I'm asking for in a columnset.

Thanks,
Lars


 / I could leave out the \setupcolumnsetlines commands for the moment, and
 // hope we don't overflow the page. Actually I'm not sure what will happen
 // if we leave the number of lines at the default (which is apparently 
 zero?).
 /
 no, more like 55 or so (depends on the layout settings)

 / Regards,
 // Lars
 //
 //
 // /  \starttext
 // //  \startcolumnset[abbcolumn]
 // //  foo
 // //  \stopcolumnset
 // //  \stoptext
 // /
 // i'll add a check
 //
 // (i will redo columnsets at some point in a more mkiv-ish way)
 //
 // Hans
 /



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

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


[NTG-context] error: terminal: NOfTextColumns-1, ! Improper final value has been replaced by 0

2013-04-24 Thread Lars Huttar
Hello,

I'm encountering the following error, under ConTeXt  ver: 2012.05.30
11:26 MKIV  fmt: 2013.3.11  int: english/english:

system  tex  error on line 27 in file
data/three-volume-book-book-1.tex: terminal:  NOfTextColumns-1
! Improper final value has been replaced by 0.
to be read again
   :
* for i=1 upto NOfTextColumns-1:
draw (rightboundary TextColumns[i])
shif...


 ...

17 \safeinput ./data/statistics-for-area-area-africa.tex
18 \safeinput ./data/statistics-for-area-area-europe.tex
19
20
21
22 \input ./macros/E16pagenohead.tex
23 \ifodd \pageno \else \noheaderandfooterlines \null \page[yes]\fi
\noheade
randfooterlines
24
25 \startptp{
26 \pagereference[Languages]\pnum{Part II}\ptitle{Language Listings}
27  }\stopptp


This error is very odd because:

a) The only place I can find code mentioning NOfTextColumns-1 is in
mp-core.mpii, where it's commented out!
  % \startuseMPgraphic{whatever}
  % for i=1 upto NOfTextColumns-1 :
  % draw (rightboundary TextColumns[i]) shifted ...

But maybe I just haven't been looking in the right places.

b) The place in my .tex document where the error occurs, line 27, is at
a \stopptp. Yet there is an essentially identical start/stopptp earlier
in the document, where no such error is thrown:

  \startptp{
  \pagereference[Summaries]\pnum{Part I}\ptitle{Statistical Summaries}
  }\stopptp

So I guess there's some content in between the two starts/stop ptp's
that's laying the stage for the error to occur.
I'll be working on a minimal example, but that's time-consuming; and I
thought in the meantime, there may be some clues in the above
information that could help clarify the nature of the problem, to
someone who understands the inner workings of ConTeXt.

Thanks for any help,
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] error: terminal: NOfTextColumns-1, ! Improper final value has been replaced by 0

2013-04-29 Thread Lars Huttar
On 4/26/2013, Hans Hagen wrote:
 
 On 4/24/2013 5:30 PM, Lars Huttar wrote:
 / ...
 /
 It took me a while to figure it out as NOfTextColumns is only used in 
 very special cases and long gone from context (it dates from a previous 
 background implementation). Normally the obsolete code is never seen but 
 in your case consulting the variable might be triggered by the fact that

 multi_column_first_page_hack

 is set to true (looks like a quick hack i made for Jelle long ago).

 I commented it in the mkii source now, hopefully no error message any 
 longer.

Thank you. How can I make this change in our ConTeXt installations?
As noted previously, the only place I could find a mention of/
 for i=1 upto NOfTextColumns-1/
was in some code that was already commented out. So I don't know how I
would comment it out any more effectively than that.


 Hans

 ps. sometimes there is some specific test code that then depends on 
 other experimental code being present

 ps. in mkiv it's all redone anyway and i will redo columnsets one of 
 these days too;

Jut to make sure it's clear, I'm running ConTeXt with mkiv.
(ConTeXt ver: 2012.05.30 11:26 MKIV fmt: 2013.3.11)

I mention that because I'm not sure if your statement about mkiv implies
that this error shouldn't be happening if I'm already using mkiv.

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


[NTG-context] section headings on a grid: less space above?

2013-08-23 Thread Lars Huttar
Hello,

I'm using mkii to typeset a document with grid layout. I'm trying to
configure the formatting of the subsection headings.

I have the following setuphead:
\setuphead[subsection][number=no,style={\switchtobodyfont[SansB,\subheadersize]},grid=top]

This works successfully in that the lines below the heading are aligned
to the grid.

But what I'm trying to change is the fact that 4 grid lines are taken up
by the heading: approximately two blank lines above, and one below. The
requirement is to use 3 grid lines.

I know how to move the heading text down within the space:
grid=3pt
does that.

But I can't figure out how to reduce the number of lines above the
heading text.

The document at http://www.pragma-ade.com/general/manuals/details.pdf
says that the top option (as in grid=top) means add/remove an extra
line to the top. But in my experimenting, the presence or absence of
top seems to make no difference.
I also tried:
grid={broad,low}
grid={fit,low}
grid={line,3pt}
grid=standard
no grid setting at all

but none of these seems to reduce the total amount of vertical space
taken up by the heading.

Can somebody tell me how to do this? E.g. how to make the top option
remove an extra line on top?

Thanks,
Lars

P.S. version:
ConTeXt  ver: 2008.05.21 15:21 MKII  fmt: 2009.1.20
but I'm hoping the oldness of the version isn't a factor here.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] section headings on a grid: less space above?

2013-08-23 Thread Lars Huttar
On 8/23/2013 11:26 AM, Lars Huttar wrote:
 Hello,

 I'm using mkii to typeset a document with grid layout. I'm trying to
 configure the formatting of the subsection headings.


Here is a small, self-contained example showing what I'm talking about:

\definecolumnset [twocol] [n=2,balancing=yes]


\setuphead[subsection][number=no,style=it,grid=top]


\starttext


\startcolumnset[twocol]

\dorecurse {5}{

\subsection{Subsection Heading}

\input knuth

}

\stopcolumnset


\stoptext


When I run this in mkiv, each subsection heading takes up 4 grid lines
of space.
How can I make it take up 3 lines?


(I would also like to lower the placement of the heading text within
that space; grid=3pt or grid={line,3pt} did that in mkii, but doesn't
seem to work in mkiv.)


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


Re: [NTG-context] section headings on a grid: less space above?

2013-08-24 Thread Lars Huttar
Marco wrote,
 On 2013–08–23 Lars Huttar wrote:

 / \setuphead[subsection][number=no,style=it,grid=top]
 /
 Add

   before={\blank[line]}

 Marco

Thank you very much, that worked!
Can you explain how it works?
Does before= override the setting of grid=? Is before= at a lower
level?
Yet before= must be at a high enough level that the grid-setting code
is able to adjust for it and still preserve the grid alignment...

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


[NTG-context] flow text around graphic: lower right

2013-08-26 Thread Lars Huttar
Hi all,
We have the small self-contained example below, in which text flows
around a graphic.
The graphic is aligned with the upper-left corner of the text paragraph
(despite \setuphanging[location=right]). We would very much like to have
the graphic align with the lower right corner of the paragraph.
Is there any way to do that?

\definecolumnset[TwoColumns][n=2]

\setupexternalfigures[location={local,default}]

\setuphanging[location=right]


\starttext

\startcolumnset[TwoColumns]


\dorecurse{3}{

\starthangaround{\externalfigure[cow][width=2cm]}

I want this cow to be in the lower right corner of the paragraph.

\input knuth

\stophangaround

}


\stopcolumnset

\stoptext



Versions: We're using mkii. But we get the same results for mkii and
mkiv on the example above.


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


[NTG-context] bug? gap appears in columnset

2013-09-13 Thread Lars Huttar
Hello,
We have a document where a gap occurs in a columnset under certain
conditions.
It seems to be a confluence of:

- 2 sections, each with 2-column columnsets
- \page[empty] between them
- the 2nd section has a tighter interline space

The problem is that on the first page of the second section, a two-line
gap appears where gridlines 50 and 51 are.

It may be a coincidence, but 50 is also the number of lines per page in
the first section. We've found that coincidence to be true even with
different page and font sizes.

Can anyone tell us a way to get rid of the gap? We've tried things like
  \setupcolumnsetlines[columnsetbibliography][1][1][-1]
  \setupcolumnsetlines[columnsetbibliography][1][2][-1]
with various values for the last parameter, but nothing helps.

Below is a small, self-contained sample.

Thanks for any help you can give.
Lars

Version information:
This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012)
(format=cont-en 2012.11.14)  13 SEP 2013 11:38
ConTeXt  ver: 2012.05.30 11:26 MKII  fmt: 2012.11.14  int: english/english


\showgrid
\setupinterlinespace[line=12pt]
\setuplayout[grid=yes]

\definecolumnset[columnsetIntroduction0][n=2]
\setupcolumnset[columnsetIntroduction0][distance=5mm,balance=yes]

\definecolumnset[columnsetbibliography][n=2]
\setupcolumnset[columnsetbibliography][distance=5mm,balance=yes]

\starttext

\section{Introduction}

\startcolumnset[columnsetIntroduction0]
% The important thing here is how many columns of text we have.
\dorecurse {7} { \input knuth }
\stopcolumnset

\page[yes] % Always finish the current page
% If we haven't ended up on an odd page, generate an empty one.
\ifodd \pageno \else \page[empty] \fi

\section{Bibliography}
\setupinterlinespace[line=9.3pt]

\startcolumnset[columnsetbibliography]
\dorecurse {140} { \input knuth\par }
\stopcolumnset

\stoptext

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

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


Re: [NTG-context] bug? gap appears in columnset

2013-09-13 Thread Lars Huttar
It should also be mentioned that we need the second section to have a
tighter line spacing than the first, but despite the

\setupinterlinespace[line=9.3pt]

command, and despite the red grid lines being tighter, the text itself
seems to have the same interline spacing as in the first section. How do
we actually change the interline spacing?

Thanks again.

Lars

On 9/13/2013 4:07 PM, Lars Huttar wrote:
 Hello,
 We have a document where a gap occurs in a columnset under certain
 conditions.
 It seems to be a confluence of:

 - 2 sections, each with 2-column columnsets
 - \page[empty] between them
 - the 2nd section has a tighter interline space

 The problem is that on the first page of the second section, a two-line
 gap appears where gridlines 50 and 51 are.

 It may be a coincidence, but 50 is also the number of lines per page in
 the first section. We've found that coincidence to be true even with
 different page and font sizes.

 Can anyone tell us a way to get rid of the gap? We've tried things like
   \setupcolumnsetlines[columnsetbibliography][1][1][-1]
   \setupcolumnsetlines[columnsetbibliography][1][2][-1]
 with various values for the last parameter, but nothing helps.

 Below is a small, self-contained sample.

 Thanks for any help you can give.
 Lars

 Version information:
 This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012)
 (format=cont-en 2012.11.14)  13 SEP 2013 11:38
 ConTeXt  ver: 2012.05.30 11:26 MKII  fmt: 2012.11.14  int: english/english


 \showgrid
 \setupinterlinespace[line=12pt]
 \setuplayout[grid=yes]

 \definecolumnset[columnsetIntroduction0][n=2]
 \setupcolumnset[columnsetIntroduction0][distance=5mm,balance=yes]

 \definecolumnset[columnsetbibliography][n=2]
 \setupcolumnset[columnsetbibliography][distance=5mm,balance=yes]

 \starttext

 \section{Introduction}

 \startcolumnset[columnsetIntroduction0]
 % The important thing here is how many columns of text we have.
 \dorecurse {7} { \input knuth }
 \stopcolumnset

 \page[yes] % Always finish the current page
 % If we haven't ended up on an odd page, generate an empty one.
 \ifodd \pageno \else \page[empty] \fi

 \section{Bibliography}
 \setupinterlinespace[line=9.3pt]

 \startcolumnset[columnsetbibliography]
 \dorecurse {140} { \input knuth\par }
 \stopcolumnset

 \stoptext



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

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


Re: [NTG-context] bug? gap appears in columnset

2013-09-16 Thread Lars Huttar
FYI, I have posted this question on
http://tex.stackexchange.com/questions/133586/bug-unwanted-gap-in-2nd-columnset
Marco and phg were able to reproduce the problem, including in the
latest versions.
I don't plan to keep posting in both places, but wanted to leave a
pointer from this thread to the other one.

Regards,
Lars

On 9/13/2013 4:07 PM, Lars Huttar wrote:
 Hello,
 We have a document where a gap occurs in a columnset under certain
 conditions.


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

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


Re: [NTG-context] bug? gap appears in columnset

2013-09-16 Thread Lars Huttar
I was advised to report the bug back to this list, with an even more
minimized example.
Here it is below.
This bug occurs in both mkiv and mkii, in the latest versions (current
beta).

|\setupinterlinespace[line=12pt]

\definecolumnset[columnset1][n=2]
\setupcolumnset[columnset1][distance=5mm,balance=yes]

\starttext

\section{Introduction}
\startcolumnset[columnset1]
\dorecurse {7} { \input knuth } 
\stopcolumnset

\section{Bibliography}
\setupinterlinespace[line=9.3pt]
\startcolumnset[columnset1]
\dorecurse {10} { \input knuth }
\stopcolumnset

\stoptext


Note the gap across both columns on p. 3, about 3/4 of the way down.
Any suggestions for a workaround would be appreciated.

Lars

|

On 9/16/2013 2:29 PM, Lars Huttar wrote:
 FYI, I have posted this question on
 http://tex.stackexchange.com/questions/133586/bug-unwanted-gap-in-2nd-columnset
 Marco and phg were able to reproduce the problem, including in the
 latest versions.
 I don't plan to keep posting in both places, but wanted to leave a
 pointer from this thread to the other one.

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


Re: [NTG-context] bug? gap appears in columnset

2013-09-17 Thread Lars Huttar
Aditya wrote:
 Any particular reason you are using columnsets rather than \startcolumns 
 or \startmixedcolumns. Columnsets are for specialized layout requirements, 
 and in my experience, mixing columnsets with text that is not in 
 columnsets is a bit tricky.


Thanks for suggesting a potential workaround.

We do have pretty specialized layout requirements, including figures
(some of which are hangarounds within columns, and some are outside of
columnsets but on the same page) and page-width-centered section
headings that are outside of columnsets.
I suspect that we tried \startcolumns and couldn't get it to work, but I
will definitely try again

I can't find \startmixedcolumns on the contextgarden wiki nor in the
ConTeXt manual. There are references to it on this mailing list, as a
rewrite of the old columns mechanism. I'm reluctant to entrust a big
production project to undocumented features, but at this point, if it
works, we'll probably go with it. I wonder if it's available in mkii as
well as in mkiv?

 \startsetups normal
 \setupinterlinespace[line=12pt]
 \stopsetups

 \startsetups tight
 \setupinterlinespace[line=9.3pt]
 \stopsetups
 \setupmixedcolumns[distance=5mm, balance=yes]

 \starttext
 \section{Introduction}
 \startmixedcolumns[setups=normal]
 \dorecurse {7} { \input knuth }
 \stopmixedcolumns

 \section{Bibliography}

 \startmixedcolumns[setups=tight]
 \dorecurse {10} { \input knuth }
 \stopmixedcolumns


 Aditya (not sure why the interlinespacing is not working)

At
http://tex.stackexchange.com/questions/133586/bug-unwanted-gap-in-2nd-columnset#comment301754_133586,
phg wrote If you want lines to adhere to a tighter line spacing you
will have to set a smaller font size, (the default one is 12pt I think)
e.g. |\setupbodyfont [7pt]| gets you the desired baseline skip and
decent leading. Doesn’t make the gap disappear, though.
I had left font settings out of the minimal example, since they aren't
necessary to exercise the bug.

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


Re: [NTG-context] bug? gap appears in columnset

2013-09-17 Thread Lars Huttar
Hans wrote,
 Just wondering ... do you think that the first pages look ok?

Thanks for your response.
By look ok, are you referring to the closeness of the lines of text?
It does seem kind of close, but within acceptable limits, depending on
other constraints; however I'm not really the one to make aesthetic
decisions about the document. I'm just trying to implement what the
customer wants.

Also, the minimal example is stripped down to minimally exercise the
unexplained behavior, so it doesn't reflect the fact that in our actual
document, we reduce the font size in places where we reduce the
interlinespace. In that sense, maybe a less minimal example would serve
the purpose better. I'll work on that, now that I know the font size may
be an integral part of the problem.

 You mess 
 with the interlinespace in a way that will make the outcome never look 
 okay.

I'd like to know more what that means, but I think it's elaborated on
below when you talk about baselineskip.

 Also, columnsets assume that the interlinespace is sane.

Can you point me to documentation on the constraints that define what
kind of interlinespace is sane?

Also, given the goal that For using ConTeXt, no TeX programming skills
and no technical background are needed. Some basic knowledge of
typography and document design will enable you to use the full power of
ConTeXt (http://wiki.contextgarden.net/What_is_ConTeXt), does/could
ConTeXt issue an error when its assumptions are violated?

 \setbox0\hbox{Tg}\the\htdp0,\the\baselineskip

 gives

 10.59601pt,9.3pt

 so, any line that has a character with ascender and descender will 
 enforce a larger than 9.3pt distance + lineskip and mess up any 
 prediction cq. heuristics

I can't find any reference defining \htdp0, but I'm guessing it means
the height+depth (where depth means how far descenders extend below the
baseline) of the Tg box.
I'm also confused as to why you're adding 9.3pt + lineskip, when in my
limited understanding of TeX, I understood lineskip to be *part* of the
distance between baselines, rather than an additional distance. But
maybe that's not important to the main issue.

I'm trying to formulate a rule for knowing whether interlinespace is sane.
Is it that interlinespace needs to be more than or equal to the maximum
of (height + depth + lineskip) of any line in the text?

Thanks again for your help.

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


Re: [NTG-context] bug? gap appears in columnset

2013-09-18 Thread Lars Huttar
Regarding sane interlinespace,
Hans wrote,
 ok, but then, an interlinespace is normally around 1.2 times the 
 bodyfontsize

OK. That's helpful.

But notice that in the following example, the interline space that
causes the problem is in the *first* section (where htdp is 12pt and
baselineskip is also 12pt!), while the gap shows up in the *second*
section, whose interlinespace is 2.8ex:

\def\printHtdp{\setbox0\hbox{()} \the\htdp0,\the\baselineskip}


\definecolumnset[columnset1][n=2]

\setupcolumnset[columnset1][distance=5mm,balance=yes]


\starttext


\section{Introduction}


\setupinterlinespace[line=12pt]

\startcolumnset[columnset1]

\printHtdp

\dorecurse {7} { \input knuth }

\stopcolumnset


\section{Bibliography}


\tfxx

\setupinterlinespace[line=2.8ex] %or use 11pt

\startcolumnset[columnset1]

\printHtdp

\dorecurse {10} { \input knuth }

\stopcolumnset


\stoptext


Since the problem can appear a ways after the cause, that makes it an
especially hard problem to track down, especially for someone who is
unaware of the nature of the problem. But even now that we're aware of
what the problem (hopefully) is, we've not been able to fix it in our
real-life document.


We sprinkled in many places the code to show htdp and baselineskip
(\printHtdp). E.g. in the early sections that would putatively cause the
problem, our htdp/baselineskip in 8.60252pt,10.5pt. That's a ratio of
more than 1.2. We have eliminated all the places we could find where the
htdp/baselineskip ratio was less than 1.2, even where there was no text.
But the gap persists.

We have a large and complex document, so there might conceivably be
places where a larger htdp than expected is hiding. Are there any tools
for automatically going through a document and reporting places where
not-sane interlinespace occurs?

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


Re: [NTG-context] bug? gap appears in columnset

2013-09-19 Thread Lars Huttar
Hans wrote,
 Columnsets are rather special and mostly meant for magazine like 
 documents, where content can span columns, images are explicitly placed 
 on the grid, etc. For that reason columnset soperate on a rather strict 
 grid that gets setup based in the lineheight and although content can be 
 larger, the grid dictates what happens. Balancing is semi automatic and 
 nearly always demands some tweaks.

In our use of columnsets, we do have content that can span columns (but
we keep it outside of columnsets). We also have images within columns
that are placed in the flow of text via hangarounds. We manually tweak
our column lengths on each page (e.g.
\setupcolumnsetlines[columnset10][1][1][42]), in order to avoid the
worst of the widows and orphans. As you say, balancing requires manual
tweaks too, but it's not that big a burden, since we're already doing
\setupcolumnsetlines for many pages.

 Using columnsets for a large document that has to flow automatically is 
 therefore debatable. Regular multi columns or in mkiv mixed-columns are 
 a better choice then.

We have tried to port our code to mkiv, but have so far found been
unsuccessful. (But are trying again now, having found new success with
TL2013 mkii.)
Also, we've been unable to find any statement that mkiv is out of beta
status. Moreover, much of the documentation still seems to be oriented
toward mkii. So it's hard to justify much of a time investment in
porting production work to mkiv yet. Can you comment on the official
status of mkiv?

Regarding mixed-columns: I understand it's a rewrite of the old
columns model. My impression is that columns didn't support manual
tweaking of column lengths (like \setupcolumnsetlines). Does
mixed-columns support such a thing? That would be a critical question
for us, as it wouldn't be an option for us to spend time porting to mkiv
and using mixed-columns, if it doesn't allow us to tweak the height of
each column on each page.

Thanks again for your help and advice.
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] question about linespace adjustment

2013-09-24 Thread Lars Huttar
Hello,
I'm working through the reference manual trying to understand how things
work in regard to fonts. I'll be submitting clarifications and
elaborations to the manual in an attempt to help other non-experts to
grasp the design of ConTeXt.

There's a point that's confusing to me in section 5.5, Line spacing. On
page 108 of the manual it says
Linespacing alters when a new bodyfont is used or when linespacing is
defined explicitly by \setupinterlinespace (which is explained later)

But on the next page it says,
When you make a font switch the linespacing is adapted when you give
the command \setupinterlinespace without any setup parameters and also
when you add the key reset, for example...

So here's why I'm confused. When you change fonts, (a) does linespacing
get changed automatically, or (b) do you have to say
\setupinterlinespace? If (a), then why does the second quote above seem
to say you need \setupinterlinespace to make it happen? If (b), then
isn't the first quote above inaccurate?

Is there a distinction being drawn here between when a new bodyfont is
used and when you make a font switch, or are those just variant
phrasings for what is intended to mean the same thing?

Thanks for your help,
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] question about linespace adjustment

2013-09-24 Thread Lars Huttar
Aditya wrote,
 Contrast

 {\switchtobodyfont[14pt] \input ward \endgraf}

 with

 {\tfc \input ward \endgraf}


Thanks for your help. You've left me to draw my own conclusions from
this example, so I'll say what I think this implies, and please correct
me if I'm wrong.

(Note to other non-TeXnichians: \endgraf is a TeX synonym for \par: end
of paragraph.)

I think the principle that you're trying to demonstrate is that the
answer to my last paragraph is yes: there is an important distinction
between making a font switch, e.g. \tfc, and using a new body font,
of which \switchtobodyfont is apparently an example.
Namely, that the latter causes the interlinespace to be automatically
adjusted, whereas the former doesn't unless you explicitly use
\setupinterlinespace.

Can you explain how/why the two ways of increasing the font size should
have such different effects? (I have read section 5.8 and 5.9 about
selecting bodyfonts and interlinespace but still don't get it.)
\tfc is described as a font selector command (5.3.2). It seems to me
that both \tfc and \switchtobodyfont[20pt] simply attempt to switch to a
different size of whatever bodyfont is currently in effect. But there
must be something I'm missing. (Or else it's just an arbitrary
distinction, but that seems unlikely.)

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


Re: [NTG-context] question about linespace adjustment

2013-09-24 Thread Lars Huttar
On 9/24/2013 12:01 PM, Lars Huttar wrote:

 Can you explain how/why the two ways of increasing the font size should
 have such different effects? (I have read section 5.8 and 5.9 about
 selecting bodyfonts and interlinespace but still don't get it.)
 \tfc is described as a font selector command (5.3.2). It seems to me
 that both \tfc and \switchtobodyfont[20pt] simply attempt to switch to a
 different size of whatever bodyfont is currently in effect. But there
 must be something I'm missing. (Or else it's just an arbitrary
 distinction, but that seems unlikely.)



Is it that \switchdobodyfont changes the *body* font, which engages the
associated bodyfont environment...
whereas \tfc changes the *font*, not the *body* font?

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


Re: [NTG-context] question about linespace adjustment

2013-09-24 Thread Lars Huttar
Luigi,
Thanks for your reply.

On 9/24/2013 2:18 PM, luigi scarso wrote:

 On Tue, Sep 24, 2013 at 7:45 PM, Lars Huttar lars_hut...@sil.org
 mailto:lars_hut...@sil.org wrote:


 Is it that \switchdobodyfont changes the *body* font, which
 engages the
 associated bodyfont environment...
 whereas \tfc changes the *font*, not the *body* font?

 Lars

 You can look into
  font-pre.mkiv

OK. I'm looking at it,
http://repo.or.cz/w/context.git/blob/HEAD:/tex/context/base/font-pre.mkiv
Is there anything in particular you had in mind that I can learn from it?
I found some aliases, e.g. \smaller, which are handy to know. But I
don't know how much I can rely on the undocumented ones to continue to
do what they do now.

 \tfc augment the fontsize of a factor of 1.728
 It's relative to the default fount size not to the current fontsize:
 {\tfc foo {\tfc foo}} both foo have the same size

Thank you, this is an important nugget that I didn't understand when
reading the documentation. \setsmallbodyfont and \setbigbodyfont, in
contrast, change the font size relative to the current size.


 But interlinespace is not modified, so we need to reset
 \starttext
 OK: \input knuth\blank{\tfx WRONG: \input knuth\blank \tfc WRONG:
 \input knuth\relax} \page
 OK: \input knuth\blank{\tfx\setupinterlinespace OK: \input knuth\blank
 \tfc WRONG: \input knuth\blank} \page
 OK: \input knuth\blank{\tfx\setupinterlinespace OK: \input knuth\blank
 \tfc\setupinterlinespace OK: \input knuth\blank}
 \stoptext

Ok. This confirms what Aditya said, and what the manual says: that you
have to use \setupinterlinespace after \tfx or \tfc if you want the
interlinespace to be adjusted.

But I would really like to understand the categories involved here.
So we have one category of font size selector commands, which includes
\setsmallbodyfont and \setbigbodyfont, that cause interlinespace to be
adjusted automatically.
Then we have another category, including \tfc, \tfx, \ita, and others,
that do not cause interlinespace to be adjusted.

What is the rhyme or reason behind these categories? And that would help
me know, which other commands belong to which category? E.g. would
\serif cause interlinespace to be adjusted? An experiment would reveal
the answer, at least in the circumstances that I think of testing, but
I'd like to understand the conceptual model.
Maybe the concept is that the first category affects the body font
(and therefore interacts with the properties of the body font
environment), and the second category only affects the font (and I'm
still not clear on how the body font differs from the current font).

Thanks for your help,
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] question about linespace adjustment

2013-09-25 Thread Lars Huttar
On 9/24/2013 5:25 PM, Aditya Mahajan wrote:
 On Tue, 24 Sep 2013, Lars Huttar wrote:

 environment), and the second category only affects the font (and I'm
 still not clear on how the body font differs from the current font).

 (Sorry for the terse replies...)

 {\switchtobodyfont[14pt] Text $math$ \sans{Sans} \endgraf}

 {\tfc Text $math$ \sans{Sans} \endgraf}

 Aditya

I don't know how this answers the above question. Can anybody explain?

Clearly you're drawing a comparison between \switchtobodyfont[14pt] and
\tfc.
I've run the sample, and I see that, as in other samples earlier in this
thread, \switchtobodyfont causes the interlinespace to be adjusted
accordingly, and \tfc doesn't.

Is that intended to be an answer to 'how the body font differs from
the current font'? And is the answer that the bodyfont is a conglomerate
of more properties than just the font, including interlinespace?

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


Re: [NTG-context] question about linespace adjustment

2013-09-25 Thread Lars Huttar
Wolfgang, thanks for your response.

On 9/25/2013 5:02 PM, Wolfgang Schuster wrote:
 You can’t expect from \tfa etc. to change the interlinespace because these
 commands can be used in your paragraphs to change the size of certain
 words only and in this case you don’t want a forced change of the 
 interlinespace.

Well... \switchtobodyfont[20pt] can also be used in paragraphs to change
the size of just a few words.
But the above suggests that \switchtobodyfont shouldn't be used for that
purpose, and commands like \tfc should?

 To adapt the interlinespace when you now use \tfa etc. you have to add
 \setupinterlinespace to your code (arguments aren’t needed) to tell context
 to recalculate it.


Thank you. What I'm trying to learn now is *why* that's true. Or more
precisely, where is the boundary between the font-changing commands that
automatically adjust interlinespace, and those commands that don't? and
what is the conceptual model that motivates the boundary, and helps
users remember and predict where the boundary lies?

What I think I'm hearing is that \switchtobodyfont is intended for
changes of longer duration, say, at least a paragraph. Whereas \tfa and
so on are intended for brief changes, to set off a phrase, for example.

As an example of where's the boundary, experimentation shows that
\setsmallbodyfont is in the same category as \switchtobodyfont: it
automatically affects the interlinespace. Nevertheless I can't find
anywhere in the manual or on the wiki that tells me that
\setsmallbodyfont differs from \tx in this way (let alone *why* it
differs). Maybe I should expect that any command that has bodyfont in
its name is intended for long-term changes, and other commands aren't?

Sorry if I'm being slow on the uptake.
Documentation like
http://wiki.contextgarden.net/Command/switchtobodyfont just doesn't seem
to explain this difference in intention.

Thanks again. I do hope to use this experience to contribute
clarifications to the manual. I've already done that some on the wiki
(hoping that if I get it wrong, someone will correct my mistakes!)

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


Re: [NTG-context] git or svn

2013-09-27 Thread Lars Huttar
On 9/27/2013 3:38 AM, Taco Hoekwater wrote:
 On Sep 27, 2013, at 9:01 AM, Peter Münster pmli...@free.fr wrote:

 On Fri, Sep 27 2013, Aditya Mahajan wrote:

 The last time I tried, merging multiple version in svn is a huge pain. One 
 of
 the advantages of DVCS is that branching and merging are easy.
 I understand. Please go ahead if you need git. My preference for svn is
 just my personal opinion, coming from my personal experience: people
 wanted to change a well running system, using the latest and greatest
 tools. In the end, after quite some efforts, there was no benefit, it
 was just a bit more complicated.
 +1 from me: I have exactly the same experience personally.


I'm with Taco and Peter on this one. SVN is part of my everyday
workflow; Git requires a lot more reading and fumbling. However I know
the need to be fluent with Git is becoming more and more prevalent, and
for many people it's already the easiest thing. So I wouldn't argue
against moving to Git. I'm just reporting my preference.

BTW I committed several changes to the manual yesterday, and plan to do
a fair bit more in the coming week or two. I would appreciate if someone
knowledgeable could check and make sure that I haven't said things that
are misleading or incorrect.

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


Re: [NTG-context] git or svn

2013-09-27 Thread Lars Huttar
On 9/26/2013 9:10 PM, Aditya Mahajan wrote:
 Github seems to be the most popular DVCS hosting site at the moment.
 For manuals, I think that Github is particularly useful because you
 can click on edit and make the change. Github automatically creates a
 fork, a new branch, and pull request for you. So the technical barrier
 to participation is low.

I would question the perception that the technical barrier to
participation on Github is low. Not long ago I tried to submit a patch
to a project on Github, improving documentation and adding features. It
took several hours (distributed over a couple of weeks) to learn how to
do all that was required. It was *not* automatic. It strongly
discouraged me from making more contributions to that project.

Maybe some major things have changed on Github since then. In any case,
I have no doubt that once you know the system, and have the
infrastructure set up, it's easy to participate. And I'm not saying that
SVN makes it easy for non-SVN users to participate. All I'm saying is
that for non-Git users, the technical barrier to participation was
substantial, last time I tried it.

Again, I'm not arguing against a move to Git. I would just like to
contribute my recent experience toward a well-informed decision process.

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


Re: [NTG-context] question about linespace adjustment

2013-09-27 Thread Lars Huttar
On 9/26/2013 3:47 PM, Wolfgang Schuster wrote:
 Am 25.09.2013 um 23:45 schrieb Lars Huttar lars_hut...@sil.org:

 Wolfgang, thanks for your response.

 On 9/25/2013 5:02 PM, Wolfgang Schuster wrote:
 You can’t expect from \tfa etc. to change the interlinespace because these
 commands can be used in your paragraphs to change the size of certain
 words only and in this case you don’t want a forced change of the 
 interlinespace.
 Well... \switchtobodyfont[20pt] can also be used in paragraphs to change
 the size of just a few words.
 But the above suggests that \switchtobodyfont shouldn't be used for that
 purpose, and commands like \tfc should?
 You can use \switchtobodyfont to change the size for certain parts of a text
 but it’s best to keep this to a minimum because \tfa etc. are a  lot faster.

 The reason why you don’t need \setupinterlinespace when you use
 \switchtobodyfont is that \setupinterlinespace is already called by
 \switchtobodyfont.

OK, good to know.

 Another thing which shouldn’t be forgotten is that \switchtobodyfont
 controls and changes the sizes for \tfa etc.

Can you elaborate on that?
A few days ago, Luigi wrote,

 \tfc augment the fontsize of a factor of 1.728
 It's relative to the default font size not to the current fontsize

So when he says relative to the default font size, does that mean the
same thing as relative to the current body font size? I think so. The
following example shows that the function of \tfc is relative to the
size set by \switchtobodyfont:

{\tfc tfc \tfc tfc}


{\switchtobodyfont[20pt] 20pt \tfc tfc}


{\switchtobodyfont[6pt] 6pt \tfc tfc}


Here the text after \tfc appears in three different sizes, proportional
to (and larger than) the \switchtobodyfont setting in effect. However,
the first line shows us that \tfc is *not* affected by previous effects
of \tfc. So as Luigi said, there is a distinction between the current
font size (which is affected by \tfc), and the default font size -- or
maybe it should be described as the current body font size -- which is
not affected by \tfc.
Is that correct?

So does \tfc mean set the current font size to be three steps up from
the current body font size?

Thanks. I'm contributing clarifications into the manual as I come to
understand how things are designed to work.

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


Re: [NTG-context] Feedback wanted on a ConTeXt tutorial

2013-09-30 Thread Lars Huttar
On 9/29/2013 1:05 PM, Marco Patzer wrote:
 Some thoughts:

   1.1.1
   Unfortunately there’s no really easy way to install ConTEXt on Windows.

 I never installed ConTeXt on Windows, but if this is true this
 should definitely be fixed. According to

   http://wiki.contextgarden.net/ConTeXt_Standalone#Command_line_method
 ...

For my part ... I recently installed TeXLive 2012 and 2013 on Windows 7,
and it was easy.

I told it to install only the ConTeXt scheme, instead of installing
everything.
Also I had to configure the TeXWorks editor options to use ConTeXt
(LuaTeX) by default instead of pdfLaTeX.
But other than that, unless I'm forgetting something, it worked fine,
out-of-the-box.

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


[NTG-context] What do \start and \stop mean?

2013-09-30 Thread Lars Huttar
I found \start and \stop referenced in the context reference manual
(e.g. section 5.5).
While \startXYZ - \stopXYZ pairs are discussed earlier, I can't find any
place that \start and \stop (with no suffix) are described.
They seem to be used like \bgroup and \egroup. Is that right?
They are defined in core-sys.mkiv, but I can't figure out from there
what they actually do.

I'll contribute documentation for them if someone can tell me what they
mean.

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


Re: [NTG-context] question about linespace adjustment

2013-09-30 Thread Lars Huttar
On 9/26/2013 3:47 PM, Wolfgang Schuster wrote:
 You can use \switchtobodyfont to change the size for certain parts of a text
 but it’s best to keep this to a minimum because \tfa etc. are a  lot faster.

 The reason why you don’t need \setupinterlinespace when you use
 \switchtobodyfont is that \setupinterlinespace is already called by
 \switchtobodyfont.

 Another thing which shouldn’t be forgotten is that \switchtobodyfont
 controls and changes the sizes for \tfa etc.

 Wolfgang

To summarize this, and what I've learned from others on this list over
the last week or two, I've updated the wiki page
http://wiki.contextgarden.net/Font_Switching
It's a pretty substantial change, so I hope someone knowledgeable will
look at it and make sure it's right.

I'm trying to find ways to express the fact that, as I understand it,
there are two distinct concepts of current font in effect at any given
time:
1) the bodyfont, which is set by \setupbodyfont or \switchtobodyfont
2) the effective font (is there a more standard term for this?) which
is changed by \tfa, \ss, etc.

\tfa etc. change the effective font based on what the bodyfont is.
Anything that changes the bodyfont, such as \switchtobodyfont, also
affects the linespacing.
Just changing the effective font does not affect the linespacing.
Changing the bodyfont changes the effective font.

Does that give an accurate picture?

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


[NTG-context] can't find file `core-swd'

2008-11-06 Thread Lars Huttar
Hello,
I've just been trying to install context on Ubuntu 8.10.
Today I went to http://minimals.contextgarden.net/setup/
and followed the instructions:

 On unix (linux, mac, freebsd, sun, ...) run:
 
   mkdir context  cd context
   rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
   ./first-setup.sh

The first-setup script initially failed because I did not have ruby
installed. So I installed ruby and then ran it again.

It cranked away for awhile, then ended up with the error:
! I can't find file `core-swd'.
to be read again
   \relax
l.228 \loadmkiifile{core-swd}

The preceding output was:
systeem : markering subsubsubsubonderwerpnummer gedefinieerd
[subsubsubsubonderwerpnummer]
)

However, when I do a search, I see that there is a file core-swd.mkii.
Its path is context/tex/texmf-context/tex/context/base
(I kid you not -- tex and context each show up three times in the path!)

Can anybody suggest how to fix the problem?

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] can't find file `core-swd'

2008-11-06 Thread Lars Huttar
On 11/6/2008 3:49 PM, Lars Huttar wrote:
 Hello,
 I've just been trying to install context on Ubuntu 8.10.
 Today I went to http://minimals.contextgarden.net/setup/
 and followed the instructions:
 
 On unix (linux, mac, freebsd, sun, ...) run:

  mkdir context  cd context
  rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
  ./first-setup.sh
 
 The first-setup script initially failed because I did not have ruby
 installed. So I installed ruby and then ran it again.
 
 It cranked away for awhile, then ended up with the error:
   ! I can't find file `core-swd'.
   to be read again
  \relax
   l.228 \loadmkiifile{core-swd}
 
 The preceding output was:

Let me add a little more preceding output:
(/home/.../context/tex/texmf-context/tex/context/base/core-sec.mkii
loading : Context Core Macros / Sectioning
...

   systeem : markering subsubsubsubonderwerpnummer gedefinieerd
 [subsubsubsubonderwerpnummer]
   )
 
 However, when I do a search, I see that there is a file core-swd.mkii.
 Its path is context/tex/texmf-context/tex/context/base
 (I kid you not -- tex and context each show up three times in the path!)
 
 Can anybody suggest how to fix the problem?

Just for kicks, I tried the following. The prompt said
Please type another input file name:
so I entered core-swd.mkii (i.e. I added the .mkii suffix).
This seemed to satisfy the processor ... until the same error happened
again a little while later (with the same preceding output).
This happened about 4 times total.

Was that a legitimate solution? Or should it really be looking for a
core-swd.tex file?

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] can't find file `core-swd'

2008-11-06 Thread Lars Huttar
On 11/6/2008 3:49 PM, Lars Huttar wrote:
 Hello,
 I've just been trying to install context on Ubuntu 8.10.
 Today I went to http://minimals.contextgarden.net/setup/
 and followed the instructions:
 
 On unix (linux, mac, freebsd, sun, ...) run:

  mkdir context  cd context
  rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
  ./first-setup.sh
 
 The first-setup script initially failed because I did not have ruby
 installed. So I installed ruby and then ran it again.
 
 It cranked away for awhile, then ended up with the error:
   ! I can't find file `core-swd'.
   to be read again
  \relax
   l.228 \loadmkiifile{core-swd}
 
 The preceding output was:
   systeem : markering subsubsubsubonderwerpnummer gedefinieerd
 [subsubsubsubonderwerpnummer]
   )
 
 However, when I do a search, I see that there is a file core-swd.mkii.
 Its path is context/tex/texmf-context/tex/context/base

Just to clarify, since I wasn't explicit: there is no core-swd.tex file
in the context/base folder.

Googling core-swd context gives results that indicate there used to be
a core-swd.tex file there. I could use the google cached copy, although
I suppose there was some reason why it was removed?

After using the google cached copy, and rerunning the first-setup
script, the script ends without obvious errors:
TeXExec | runtime: 14.383196
make | done
state | saved

Can anyone confirm that using the cached core-swd.tex indeed solved the
problem, rather than merely masking it?
Maybe core-swd.tex was rightfully removed, and the correct fix would be
to remove the reference to it in the other file?

Thanks,
Lars


 
 Can anybody suggest how to fix the problem?
 
 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] can't find file `core-swd'

2008-11-11 Thread Lars Huttar
On 11/6/2008 4:02 PM, Lars Huttar wrote:
 On 11/6/2008 3:49 PM, Lars Huttar wrote:
 Hello,
 I've just been trying to install context on Ubuntu 8.10.
 Today I went to http://minimals.contextgarden.net/setup/
 and followed the instructions:

 On unix (linux, mac, freebsd, sun, ...) run:

 mkdir context  cd context
 rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
 ./first-setup.sh
 The first-setup script initially failed because I did not have ruby
 installed. So I installed ruby and then ran it again.

 It cranked away for awhile, then ended up with the error:
  ! I can't find file `core-swd'.
  to be read again
 \relax
  l.228 \loadmkiifile{core-swd}

 The preceding output was:
 
 Let me add a little more preceding output:
   (/home/.../context/tex/texmf-context/tex/context/base/core-sec.mkii
   loading : Context Core Macros / Sectioning
   ...
 
  systeem : markering subsubsubsubonderwerpnummer gedefinieerd
 [subsubsubsubonderwerpnummer]
  )

 However, when I do a search, I see that there is a file core-swd.mkii.
 Its path is context/tex/texmf-context/tex/context/base
 (I kid you not -- tex and context each show up three times in the path!)

 Can anybody suggest how to fix the problem?
 
 Just for kicks, I tried the following. The prompt said
   Please type another input file name:
 so I entered core-swd.mkii (i.e. I added the .mkii suffix).
 This seemed to satisfy the processor ... until the same error happened
 again a little while later (with the same preceding output).
 This happened about 4 times total.
 
 Was that a legitimate solution? Or should it really be looking for a
 core-swd.tex file?
 
 Thanks,
 Lars
 

Wolfgang Schuster wrote:

 Can your try this:
 
 mtxrun --selfupdate
 luatools --selfupdate
 context --generate
 context --make en
 
 Wolfgang

I guess I should first delete the core-swd.tex that I got from cache?
(Did that...)

mtxrun gives command not found... So I added context/bin to the PATH.

Then I ran mtxrun again and got
/usr/bin/env: texlua: No such file or directory.

Later I found
http://wiki.contextgarden.net/ConTeXt_Minimals#First_Installation which
said to add something like source [dir...]/context/tex/setuptex
[dir...]/context/tex to the system startup script.

(It would be helpful to add a prominent link to
http://wiki.contextgarden.net/ConTeXt_Minimals#First_Installation from
the instructions at http://minimals.contextgarden.net/setup/, labeled
Please see more complete instructions here. There is currently a link
between those two pages, but it is labeled These might eventually
become a new minimal ConTeXt distribution which doesn't suggest that
you need to visit the link to supplement the installation instructions
already given.)

After adding the above source line, the four commands you asked me to
try run without obvious errors.

No base/core-swd.tex file appears.

Is there something specific I should look for to tell whether the above
commands solved my problem? Should I run first-setup.sh again?

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] can't find file `core-swd'

2008-11-11 Thread Lars Huttar
Wolfgang Schuster wrote:
 core-swd.tex is removed in the last beta and the old file was saved
 under the name core-swd.mkii
 
 Generate the formats with texexec --make --all and it should work.
 
 Wolfgang
 

Thanks for taking the time to look into this...

I tried the command you suggested and got the same error: I can't find
file `core-swd'.

(Apologies that this reply is not linked to the email it really replies
to. For some reason the above email didn't make it to my inbox; I only
found it via gmane.)

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] can't find file `core-swd'

2008-11-11 Thread Lars Huttar
On 11/11/2008 1:32 PM, Lars Huttar wrote:
 On 11/6/2008 4:02 PM, Lars Huttar wrote:
 On 11/6/2008 3:49 PM, Lars Huttar wrote:
 Hello,
 I've just been trying to install context on Ubuntu 8.10.
 Today I went to http://minimals.contextgarden.net/setup/
 and followed the instructions:

 On unix (linux, mac, freebsd, sun, ...) run:

mkdir context  cd context
rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
./first-setup.sh
 The first-setup script initially failed because I did not have ruby
 installed. So I installed ruby and then ran it again.

 It cranked away for awhile, then ended up with the error:
 ! I can't find file `core-swd'.
 to be read again
\relax
 l.228 \loadmkiifile{core-swd}

 The preceding output was:
 Let me add a little more preceding output:
  (/home/.../context/tex/texmf-context/tex/context/base/core-sec.mkii
  loading : Context Core Macros / Sectioning
  ...

 systeem : markering subsubsubsubonderwerpnummer gedefinieerd
 [subsubsubsubonderwerpnummer]
 )

 However, when I do a search, I see that there is a file core-swd.mkii.
 Its path is context/tex/texmf-context/tex/context/base
 (I kid you not -- tex and context each show up three times in the path!)

 Can anybody suggest how to fix the problem?
 Just for kicks, I tried the following. The prompt said
  Please type another input file name:
 so I entered core-swd.mkii (i.e. I added the .mkii suffix).
 This seemed to satisfy the processor ... until the same error happened
 again a little while later (with the same preceding output).
 This happened about 4 times total.

 Was that a legitimate solution? Or should it really be looking for a
 core-swd.tex file?

 Thanks,
 Lars

 
 Wolfgang Schuster wrote:
 
 Can your try this:

 mtxrun --selfupdate
 luatools --selfupdate
 context --generate
 context --make en

 Wolfgang
 
 I guess I should first delete the core-swd.tex that I got from cache?
 (Did that...)
 
 mtxrun gives command not found... So I added context/bin to the PATH.
 
 Then I ran mtxrun again and got
   /usr/bin/env: texlua: No such file or directory.
 
 Later I found
 http://wiki.contextgarden.net/ConTeXt_Minimals#First_Installation which
 said to add something like source [dir...]/context/tex/setuptex
 [dir...]/context/tex to the system startup script.
 
 (It would be helpful to add a prominent link to
 http://wiki.contextgarden.net/ConTeXt_Minimals#First_Installation from
 the instructions at http://minimals.contextgarden.net/setup/, labeled
 Please see more complete instructions here. There is currently a link
 between those two pages, but it is labeled These might eventually
 become a new minimal ConTeXt distribution which doesn't suggest that
 you need to visit the link to supplement the installation instructions
 already given.)
 
 After adding the above source line, the four commands you asked me to
 try run without obvious errors.
 
 No base/core-swd.tex file appears.
 
 Is there something specific I should look for to tell whether the above
 commands solved my problem? Should I run first-setup.sh again?

I ran first-setup.sh again, because that was where I first encountered
the error I can't find file `core-swd'.
It gave the same error again, even after running the four commands you
suggested, Wolfgang.

I don't know the setup well enough to know whether this means that the
problem was not solved, or whether it means that the problem was solved
by the four commands but was unsolved by first-setup.sh.

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] can't find file `core-swd'

2008-11-11 Thread Lars Huttar
On 11/11/2008 11:01 AM, Wolfgang Schuster wrote:
 Am 11.11.2008 um 17:20 schrieb Alan STONE:
 
 On Thu, Nov 6, 2008 at 11:37 PM, Wolfgang Schuster [EMAIL PROTECTED] 
 wrote:
 core-swd.tex is removed in the last beta and the old file was saved
 under the name core-swd.mkii

 Generate the formats with texexec --make --all and it should work.

 It doesn't work (on Windows XP), neither adding the mkii suffix.
 
 What is the result from kpsewhich core-swd.mkii.
 
 Wolfgang

I got basically the same as Alan Stone:

/home/ethnologue/context/tex/texmf-context/tex/context/base/core-swd.mkii


___
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] can't find file `core-swd'

2008-11-18 Thread Lars Huttar
On 11/11/2008 5:06 PM, Wolfgang Schuster wrote:
 Am 11.11.2008 um 23:39 schrieb Lars Huttar:
 
 On 11/11/2008 11:01 AM, Wolfgang Schuster wrote:
 Am 11.11.2008 um 17:20 schrieb Alan STONE:

 On Thu, Nov 6, 2008 at 11:37 PM, Wolfgang Schuster [EMAIL PROTECTED]
 wrote:
 core-swd.tex is removed in the last beta and the old file was saved
 under the name core-swd.mkii

 Generate the formats with texexec --make --all and it should work.

 It doesn't work (on Windows XP), neither adding the mkii suffix.
 What is the result from kpsewhich core-swd.mkii.

 Wolfgang
 I got basically the same as Alan Stone:

 /home/ethnologue/context/tex/texmf-context/tex/context/base/core- 
 swd.mkii
 
 It's Hans fault, he loads core-swd in context.mkii with the command
 \loadmkiifile but the command expects .tex as file extension, you
 could either rename core-swd.mkii to core-swd.tex or you change
 the line \loadmkiifile{core-swd} to \loadmarkfile{core-swd} or
 \loadmkiifile{core-swd.mkii}.
 
 Wolfgang
 

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


[NTG-context] modifying URL wrapping rules

2008-11-18 Thread Lars Huttar
Hello,
I would like to modify the rules for wrapping URLs (aka hyphenating
URLs, but generally without inserting hyphens) to conform more closely
to the Chicago Manual of Style, 15th ed. I've read on this list that the
code for doing this is defined in the \hypthenatedurl

There are several files with the same name, in
contextminimal\texmf-context\tex\context\base\:
lang-url.mkii
lang-url.mkiv
lang-url.lua
lang-url.tex

From what I can tell, the .tex file loads one of the other three:
\loadmarkfile{lang-url}

I'm not sure which one it loads -- the lua, mkii, or mkiv.
All three seem to have the rules for url hyphenation encoded in them.
Is it a matter of which engine I'm using, e.g. luatex?
Our project has a requirement of using Xetex, so I have to stick with
that. Does that mean lang-url doesn't work at all?

We also have users using ConTeXt Minimal as well as ConTeXt from the
TeXLive 2008 distribution.
I want to do things in a way that will work in both. I would be happy to
put in some extra effort to make the result generally available to
others who want to follow the Chicago style for wrapping long URLs.

Thanks for any hints...

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] modifying URL wrapping rules

2008-11-18 Thread Lars Huttar
On 11/18/2008 3:44 PM, Arthur Reutenauer wrote:
 From what I can tell, the .tex file loads one of the other three:
  \loadmarkfile{lang-url}
 
   \loadmarkfile loads either lang-url.mkii or lang-url.mkiv, depending
 on the ConTeXt version you're running (MkII / MkIV).  In Mark IV, the
 Lua code is then put in lang-url.lua, which is input by lang-url.mkiv
 (you can see \registerctxluafile{lang-url}{1.001} near the beginning
 of the latter).  This architecture enables you to reuse the Lua code in
 completely different environments (for example, in a pure Lua script).
 
 Our project has a requirement of using Xetex, so I have to stick with
 that. Does that mean lang-url doesn't work at all?
 
   ConTeXt on XeTeX is considered Mark II as far as the mark business
 goes (it doesn't know about Lua), so you have access to the exact same
 code as with pdfTeX; in this case, lang-url.mkii will be loaded.

Thanks for the explanation... this is helpful.

So it sounds like I should definitely modify the lang-url.mkii file.

  But if
 you know that all your users will be using XeTeX, you don't really need
 to worry about the \loadmarkfile mechanism; it is there to accommodate
 different engines.

OK... but I'm not sure what I would do differently if I'm not worrying
about the \loadmarkfile mechanism... Still modify the lang-url.mkii file?

Given that I'm willing to put in a little extra effort to make the
result available to a wider set of users, should I still modify
lang-url.mkii?

 We also have users using ConTeXt Minimal as well as ConTeXt from the
 TeXLive 2008 distribution.
 
   The particular distribution one uses shouldn't be a problem at all for
 implementing hyphenation rules.

Good to know, thanks.

 I want to do things in a way that will work in both. I would be happy to
 put in some extra effort to make the result generally available to
 others who want to follow the Chicago style for wrapping long URLs.
 
   This will certainly be most appreciated.
 

I will probably need more help in order to know how to do this. Once
I've finished doing it for us, in .mkii, I'll ask again on this list.

Thanks again,
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] modifying URL wrapping rules

2008-11-19 Thread Lars Huttar
On 11/18/2008 3:44 PM, Arthur Reutenauer wrote:
 From what I can tell, the .tex file loads one of the other three:
  \loadmarkfile{lang-url}
 
   \loadmarkfile loads either lang-url.mkii or lang-url.mkiv, depending
 on the ConTeXt version you're running (MkII / MkIV).  In Mark IV, the
 Lua code is then put in lang-url.lua, which is input by lang-url.mkiv
 (you can see \registerctxluafile{lang-url}{1.001} near the beginning
 of the latter).  This architecture enables you to reuse the Lua code in
 completely different environments (for example, in a pure Lua script).
 
 Our project has a requirement of using Xetex, so I have to stick with
 that. Does that mean lang-url doesn't work at all?
 
   ConTeXt on XeTeX is considered Mark II as far as the mark business
 goes (it doesn't know about Lua), so you have access to the exact same
 code as with pdfTeX; in this case, lang-url.mkii will be loaded. 

OK, I've taken a stab at it. Here is the main code now in the modified
lang-url.mkii. For brevity in this email I've just omitted the lines
that I actually commented out in the file, namely characters that
Chicago style does not say you can line-break URLs on.

\def\sethyphenatedurlnormal#1{\expandafter\chardef\csname url @
#1\endcsname\zerocount}
\def\sethyphenatedurlbefore#1{\expandafter\chardef\csname url @
#1\endcsname\plusone  }
\def\sethyphenatedurlafter #1{\expandafter\chardef\csname url @
#1\endcsname\plustwo  }

% Chicago manual of style rules:
% Break URLs after: / or // (I don't know how to implement // so will be
content with / for now.
%  To do: prevent breaking in middle of double slash //.)
% Break URLs before: ~ . , - _ ? # %
% Break URLs before or after: =  (I don't know how to implement 'before
or after' so will
%   be content with breaking 'before' these characters for now).
\sethyphenatedurlbefore \letterhash
\sethyphenatedurlbefore \letterpercent
\sethyphenatedurlbefore \letterampersand
\sethyphenatedurlbefore ,
\sethyphenatedurlbefore -
\sethyphenatedurlbefore .
\sethyphenatedurlbefore =
\sethyphenatedurlbefore ?
\sethyphenatedurlbefore _
\sethyphenatedurlbefore \lettertilde

\sethyphenatedurlafter / % was \sethyphenatedurlbefore /


However, I have a few unsolved problems here.

1) I don't see a way, with the '\sethyphenatedurlbefore' or 'after'
mechanism, to tell it not to break a URL between two slashes, as in
http://;. At first I thought that since our text only had a few URLs,
we'd likely never care. But ... you guessed it. One URL got broken
between the slashes: http:/
/www.sil.org/...

So I tried using the base tex hyphenation mechanism to inhibit breaking
there: I changed the document from
\hyphenatedurl{http://www.sil.org/...}
to
\hyphenatedurl{\hyphenation{http://}www.sil.org/...}
but that gave a stack overflow.

Then I tried
\hyphenation{http://}\hyphenatedurl{www.sil.org/...}
but got this error:
! Not a letter.
inserted text http:
 //
\hyphenation ...malhyphenation {\the \scratchtoks
  }\endgroup
argument ... Linguistics. \hyphenation {http://}
  \hyphenatedurl
{www.sil.or...

\BE #1-\startmainexdent {#1
}\stopmainexdent
l.317 ...l.org/silesr/abstract.asp?ref=2007-015}.}


I'm kind of shooting in the dark there, so maybe somebody who knows TeX
can help me out.


2) Even though I have \sethyphenatedurlafter / instead of
\sethyphenatedurlbefore /, there are four cases where a URL is broken
before a slash, e.g.:
http://www.sil.org/.../009
/YAMBASSA.html.
and no cases where a URL is broken after a slash (except when it's also
before a slash -- see 1).

I wonder if my modifications are actually taking effect?
Do I need to compile the changes to the .mkii file or something? I tried
texexec.bat --make --all, but that didn't seem to change the outcome.


3) Conversely, even though I have \sethyphenatedurlbefore - and not
\sethyphenatedurlafter -, there is a case where a URL is broken after
a hyphen (a hyphen that was already present in the URL):
http://www/Niger-
Congo/...
and no case where a URL is broken before a hyphen.
Note that the \sethyphenatedurlbefore - setting is unchanged from the
original lang-url.mkii, so this is not an issue of needing to recompile.

Maybe the general tex hyphenation mechanism is operating here, in spite
of the URL breaking settings. How do I override that (only for the URL)?


4) In one case, a URL is broken over the end of a column. That's ok, but
it would be nice to be able to strongly discourage that from happening
at the end of a page. I'm told that's a difficult problem to solve. It's
not mandatory for us at this point but if anyone has a solution I'd like
to hear about it.


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

maillist : 

Re: [NTG-context] modifying URL wrapping rules

2008-11-19 Thread Lars Huttar
On 11/19/2008 2:35 PM, Lars Huttar wrote:
 
 However, I have a few unsolved problems here.
 
 1) I don't see a way, with the '\sethyphenatedurlbefore' or 'after'
 mechanism, to tell it not to break a URL between two slashes, as in
 http://;. At first I thought that since our text only had a few URLs,
 we'd likely never care. But ... you guessed it. One URL got broken
 between the slashes: http:/
 /www.sil.org/...

I found a way to deal with this... Based on a tip from
http://xpt.sourceforge.net/techdocs/language/latex/latex03-LaTexUsage/ar01s04.html,
I used
{\lefthyphenmin=64 http://}\hyphenatedurl{www.sil.org/...}
It seems to work in practice -- hyphenation and breaking are disabled
for the http://; chunk. And hyphenation seems to successfully resume
afterwards.
This also fixes the problem of a URL breaking before the //.

The other problems are still outstanding though (wanting to break a URL
after a slash, not before; and before a hyphen, not after).

Thanks for any ideas...
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] modifying URL wrapping rules

2008-11-20 Thread Lars Huttar
On 11/20/2008 2:29 AM, Hans Hagen wrote:
 Lars Huttar wrote:
 On 11/19/2008 2:35 PM, Lars Huttar wrote:
 However, I have a few unsolved problems here.

 1) I don't see a way, with the '\sethyphenatedurlbefore' or 'after'
 mechanism, to tell it not to break a URL between two slashes, as in
 http://;. At first I thought that since our text only had a few URLs,
 we'd likely never care. But ... you guessed it. One URL got broken
 between the slashes: http:/
 /www.sil.org/...
 I found a way to deal with this... Based on a tip from
 http://xpt.sourceforge.net/techdocs/language/latex/latex03-LaTexUsage/ar01s04.html,
 I used
  {\lefthyphenmin=64 http://}\hyphenatedurl{www.sil.org/...}
 It seems to work in practice -- hyphenation and breaking are disabled
 for the http://; chunk. And hyphenation seems to successfully resume
 afterwards.
 This also fixes the problem of a URL breaking before the //.

 The other problems are still outstanding though (wanting to break a URL
 after a slash, not before; and before a hyphen, not after).

 Thanks for any ideas...
 
 cleaner than the lefthyphenmin hackery .,..
 
 {\hbox{http://}\hyphenatedurl{www.sil.org/...

Thank you!

 in context mkiv i can provide a hyphenater based on the url syntax 
 (after all, mkiv already has an analyser for urls)

That would be great, but as I understand it, using mkiv would require us
to move to a beta version of ConTeXt... and we're right at the end (we
hope!) of a production cycle, where moving to any new version (whether
beta or not) could cost us a lot of time if any behavior changes.

So while I would be glad to see a hyphenator based on URL syntax, I
don't think a mkiv version won't help us this time.

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] modifying URL wrapping rules

2008-11-20 Thread Lars Huttar
On 11/19/2008 2:35 PM, Lars Huttar wrote:
 2) Even though I have \sethyphenatedurlafter / instead of
 \sethyphenatedurlbefore /, there are four cases where a URL is broken
 before a slash, e.g.:
 http://www.sil.org/.../009
 /YAMBASSA.html.
 and no cases where a URL is broken after a slash (except when it's also
 before a slash -- see 1).
 
 I wonder if my modifications are actually taking effect?
 Do I need to compile the changes to the .mkii file or something? I tried
 texexec.bat --make --all, but that didn't seem to change the outcome.

Can someone tell me if there's a compile command necessary for mkii?

 3) Conversely, even though I have \sethyphenatedurlbefore - and not
 \sethyphenatedurlafter -, there is a case where a URL is broken after
 a hyphen (a hyphen that was already present in the URL):
 http://www/Niger-
 Congo/...
 and no case where a URL is broken before a hyphen.
 Note that the \sethyphenatedurlbefore - setting is unchanged from the
 original lang-url.mkii, so this is not an issue of needing to recompile.
 
 Maybe the general tex hyphenation mechanism is operating here, in spite
 of the URL breaking settings. How do I override that (only for the URL)?

Maybe it would help if someone could explain to me what 'normal' means
in lang-url.mkii:

\def\dohyphenatedurlnormal#1{\char#1\relax}%
\def\dohyphenatedurlafter
#1{\char#1\discretionary{}{\hyphenatedurlseparator}{}}%
\def\dohyphenatedurlbefore#1{\discretionary{\hyphenatedurlseparator}{}{}\char#1\relax}%

% 0=normal 1=before 2=after

\def\sethyphenatedurlnormal#1{\expandafter\chardef\csname url @
#1\endcsname\zerocount}
\def\sethyphenatedurlbefore#1{\expandafter\chardef\csname url @
#1\endcsname\plusone  }
\def\sethyphenatedurlafter #1{\expandafter\chardef\csname url @
#1\endcsname\plustwo  }

It looks like 'normal' means don't put a discretionary
hyphenatedurlseparator before/after the character. Which would mean
either (a) the url cannot be separated there (unless an adjacent
character has hyphenatedurlbefore/after specified on it); or (b) the url
will follow the same hyphenation rules as normal text (no special
url-related rules). Can anyone tell me which it is? The definition of
hyphenatedurl is:

\unexpanded \def\hyphenatedurl#1%
  {\dontleavehmode
   \begingroup
   \the\everyhyphenatedurl
   \edef\ascii{#1}%

\expanded{\handletokens{\detokenize\expandafter{\ascii}}}\with\dohyphenatedurl
   \endgroup}

and the definition of \dontleavehmode is in syst-ext.tex with some comments:

%D \macros
%D  {dontleavehmode}
%D
%D Sometimes when we enter a paragraph with some command, the
%D first token gets the whole first line. We can prevent this
%D by saying:
%D
%D \starttyping
%D \dontleavehmode
%D \stoptyping
...
\unexpanded \def\dontleavehmode
  {\ifhmode\else \ifmmode\else
 \setbox\@@dlhbox\hbox{\mathsurround\zeropoint\everymath\emptytoks$
$}\unhbox\@@dlhbox
   \fi \fi}
...
%D But, if you run a recent version of \TEX, we can use the new
%D primitive:

\ifx\normalquitvmode\undefined \else \let\dontleavehmode\normalquitvmode \fi

I am running Xetex, FWIW.
This is XeTeX, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)

The above makes me think that dontleavehmode should prevent any
'hyphenation' except for the types explicitly allowed in lang-url.mkii
via \sethyphenatedurlafter/before/normal.

Yet that isn't happening... it's breaking before slash instead of after,
 and after hyphen instead of before.

I wondered briefly whether I had misinterpreted (swapped) the semantics
of \sethyphenatedurlafter and \sethyphenatedurlbefore. But no,
\sethyphenatedurlbefore . is working as expected: URLs break before a
period. So I'm just puzzled.

Thanks for any help...

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] modifying URL wrapping rules

2008-11-21 Thread Lars Huttar
On 11/21/2008 2:22 AM, Hans Hagen wrote:
 Lars Huttar wrote:
 On 11/19/2008 2:35 PM, Lars Huttar wrote:
 2) Even though I have \sethyphenatedurlafter / instead of
 \sethyphenatedurlbefore /, there are four cases where a URL is broken
 before a slash, e.g.:
 http://www.sil.org/.../009
 /YAMBASSA.html.
 and no cases where a URL is broken after a slash (except when it's also
 before a slash -- see 1).

 I wonder if my modifications are actually taking effect?
 Do I need to compile the changes to the .mkii file or something? I tried
 texexec.bat --make --all, but that didn't seem to change the outcome.
 Can someone tell me if there's a compile command necessary for mkii?
 
 texexec --make
 

Thanks for your reply...
OK, I did that. Behavior with respect to the two outstanding problems
(breaking after hyphen and before slash) has not changed.
But it's good to know that it's not due to some dependencies not being
updated.

 however, i strongly advise you to put such patches or tuning in your 
 document style because otherwise you loose them when you update

Understood. A colleague tells me that if I put the
\sethyphenatedurlbefore/after settings in the .tex document they will
override the settings in lang-url.mkii, which is very good news.

So if lang-url.mkii says
\sethyphenatedurlbefore \letterbar
I can comment that line out in lang-url.mkii; but if I don't want to
modify lang-url.mkii, can I accomplish the same thing by putting
\sethyphenatedurlnormal \letterbar
in my .tex file?


 \ifx\normalquitvmode\undefined \else \let\dontleavehmode\normalquitvmode \fi

 I am running Xetex, FWIW.
 This is XeTeX, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)

 The above makes me think that dontleavehmode should prevent any
 'hyphenation' except for the types explicitly allowed in lang-url.mkii
 via \sethyphenatedurlafter/before/normal.
 
 just leave dontleavehmode untouched; it's definition adapts itself to 
 the engine
 
 i leave it to others to react on the rest of your mail (some users have 
 been tuning the mechanism too)

I would be very glad to hear from said users who have had any success.
I'm emailing Steffen and Aditya now.


Actually, just now looking at lang-url.tex I see the comments

%D For those who want to put full \URL's in a text, we offer
%D
%D \startbuffer
%D
\hyphenatedurl{http://optimist.optimist/optimist/optimist.optimist#optimist}
%D \stopbuffer
%D
%D \typebuffer

which makes me wonder if I need to put the
\startbuffer,\stopbuffer,\typebuffer commands in my tex code. But I
think maybe it's markup for generating documentation.
If so, I wonder why I can't find such generated documentation on
\hyphenatedurl.

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] modifying URL wrapping rules

2008-11-21 Thread Lars Huttar
On 11/21/2008 2:22 AM, Hans Hagen wrote:
 i leave it to others to react on the rest of your mail (some users have
 been tuning the mechanism too)

 Hans


On 11/21/2008 9:45 AM, Steffen Wolfrum wrote:
 
 Am 21.11.2008 um 16:35 schrieb Lars Huttar:
 

 Hello,

 Did either of you, Aditya or Steffen, have success modifying how URLs
 are wrapped? Did you do it by using \sethyphenatedurlbefore/etc.?

 I'm trying to finish a production project and am stuck on this problem.

 Thanks,
 Lars
 
 
 Hi Lars,
 
 ... no, I am still hoping for a fix for that.
 
 As far as I have seen also Mojca asked for How to influence hyphenation
 points in URLs?
 And even her got no answer! That's a bad sign ;o)
 
 Steffen

On 11/21/2008 9:52 AM, Aditya Mahajan wrote:
 No, I had a deadline and in the end, I did URL breaking by hand, using
 \break at appropriate places. But it was a short article (4/5 pages).

 Aditya


So as far as we know, nobody has successfully used
\sethyphenatedurlbefore/after/etc. to tune the url-breaking mechanism.
Has anybody else on the list done this?

If not, maybe the mkii implementation has never worked for that
purpose... it's possible, since urls are breaking after hyphens when
lang-url.mkii says to break before hyphens.

If this is the case (\sethyphenatedbefore/after in mkii is broken), then
rather than awaiting a fix for the soon-obsolete mkii implementation,
maybe I can do a workaround. I need help with the tex details though,
please, as I am still very much a tex newbie...

We are generating our tex document, so verbosity is not a problem, but
irregularity would be.
Rather than inserting \break in various places manually, which would
have to be redone often, I could automatically insert \discretionary or
\allowbreak before/after the appropriate characters in the tex document.
Would that work?
How would I suppress hyphenation at other points -- \dontleavehmode or
something like that?

Thanks again,

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] modifying URL wrapping rules

2008-11-21 Thread Lars Huttar
On 11/21/2008 12:01 PM, Lars Huttar wrote:
 
 So as far as we know, nobody has successfully used
 \sethyphenatedurlbefore/after/etc. to tune the url-breaking mechanism.
 Has anybody else on the list done this?
 
 If not, maybe the mkii implementation has never worked for that
 purpose... it's possible, since urls are breaking after hyphens when
 lang-url.mkii says to break before hyphens.
 
 If this is the case (\sethyphenatedbefore/after in mkii is broken), then
 rather than awaiting a fix for the soon-obsolete mkii implementation,
 maybe I can do a workaround. I need help with the tex details though,
 please, as I am still very much a tex newbie...
 
 We are generating our tex document, so verbosity is not a problem, but
 irregularity would be.
 Rather than inserting \break in various places manually, which would
 have to be redone often, I could automatically insert \discretionary or
 \allowbreak before/after the appropriate characters in the tex document.
 Would that work?
 How would I suppress hyphenation at other points -- \dontleavehmode or
 something like that?


OK... I have a working workaround... close your eyes, because it's ugly.

I just put \hbox{} around the sections that we don't want broken, and
\discretionary{}{}{} in the places we will allow a break:

\hbox{http://}\discretionary{}{}{}\hbox{www}\discretionary{}{}{}\hbox{.sil}\discretionary{}{}{}\hbox{.org/}\discretionary{}{}{}\hbox{silesr/}...

One of our URLs goes from 89 to 391 characters!  :-p

Maybe posting this awful kluge to the list will motivate someone who
knows TeX better to post a more elegant solution. :-)

Ugly as it is, it does allow me to control exactly where I want to allow
a break and where I don't. So I'll go with that for now, in order to
meet our deadline.

I'm sure someone could write a TeX macro to do the above algorithmically
instead of brute-force specifying every possible break point explicitly.

But that's what \hyphenatedurl is supposed to be, and it doesn't seem to
be working for me.

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
___


Re: [NTG-context] modifying URL wrapping rules

2008-11-24 Thread Lars Huttar
On 11/21/2008 4:53 PM, Hans Hagen wrote:
 Mojca Miklavec wrote:
 
   hack hack hack hack 
 
 I tried solutions with special patterns sveral times but the problem is 
 in mixed languages, i.e. english text mixed with url-language; there are 
 some limitations (in pdftex for instance the same codes are used fo rthe 
 whole par (i.e. mixed languages are possible but with the same lccodes 
 etc). Also, one needs to get rid of the -
 
 Anyhow, there is another trick, one that Aditya might love ...
 
 \bgroup
 
 \gdef\lettercolon{:}
 
 \catcode`\:=\active
 \catcode`\^=\active
 \catcode`\/=\active
 \catcode`\~=\active
 
 \gdef\ForMojcaWhoLikesHacks#1%
{\dontleavehmode
 \begingroup
 \mathcode`\:=8000
 \mathcode`\^=8000
 \mathcode`\/=8000
 \mathcode`\~=8000
 \def:{\nobreak   \hbox{\lettercolon}\allowbreak}%
 \def^{\allowbreak\hbox{\letterhat  }\nobreak}%
 \def/{\nobreak   \hbox{\letterslash}\allowbreak}%
 \def~{\allowbreak\hbox{\lettertilde}\nobreak}%
 \everymath\emptytoks
 \mathsurround\zeropoint$\tttf#1$%
 \endgroup}
 
 \egroup
 
 \hsize 1mm \ForMojcaWhoLikesHacks{http://www.sil.org/silesr/}
 

Thanks, this is great.

Looks like, as in improvement over \hyphenatedurl, it allows you to
specify that you can break before a character, after, or both.

I think I can even see how to use it in a document...
though, would I have to undo the initial \catcode commands after the
\egroup?

Also, I don't see a way to prevent breaking between two slashes...
unless you treat them as part of a separate hbox:
   \hbox{http://}\ForMojcaWhoLikesHacks{www.sil.org/silesr/}
which is not a big problem.

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] modifying URL wrapping rules

2008-11-24 Thread Lars Huttar
On 11/24/2008 8:45 AM, Hans Hagen wrote:
 Lars Huttar wrote:
 
 Also, I don't see a way to prevent breaking between two slashes...
 unless you treat them as part of a separate hbox:
\hbox{http://}\ForMojcaWhoLikesHacks{www.sil.org/silesr/}
 which is not a big problem.
 
 it's no problem to catch the // but in general this method is not that 
 generic since font changes in math are somewhat limited and kerning is 
 gone too

Oh... so my ugly \hbox{...}\discretionary{}{}{} method eliminates
kerning? Bummer...

___
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] difference between TeX behavior and ConTeXt

2008-11-25 Thread Lars Huttar
Hello,

I've been reading through the TeXbook to solidify the foundations for
TeX programming. In an exercise on roman and italic text, ConTeXt seems
to behave differently from what the book specifies (Plain TEX) at a
fairly fundamental level.

Exercise 4.1 says, Explain how to typeset a roman word in the midst of
an italicized sentence.
I wrote, and the solution in the appendix says,
{\it Explain how to typeset a\/ {\rm roman} word
 in the midst of an italicized sentence.}

But when I typeset this using texexec, the word roman appears in
italic, just like the rest of the sentence.

I tried this on both Windows XP and Ubuntu Linux, with both PDFTex and
Xetex engines. On Windows I'm using ConTeXt minimal, and on Linux I'm
using ConTeXt from the TeXLive 2008 CD. The result is the same in all
cases: all the text is italicized.

Does this difference in behavior represent a known feature of ConTeXt?
If so, is it a difference in the defined behavior of \rm?

When I put \show\rm in the .tex file to display the definition of the
\rm macro, and run texexec, I get:
 \rm=\protected macro:
-\setcurrentfontstyle {rm}.
l.7 \show\rm
By contrast, according to
http://webpages.charter.net/davidlha/.trm/trmi.html, Plain TeX defines
\rm to be `\fam=0 \tenrm'.
So clearly the definition of the \rm macro is different in ConTeXt than
it is in Plain TeX.

I could understand ConTeXt possibly changing the details of \rm's
definition, e.g. a change in default font family; but it would really be
surprising to find that the logic of \rm's behavior has been changed.

Please help me understand if this is a bug or if there is a design
principle of ConTeXt that I should be aware of...

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] difference between TeX behavior and ConTeXt

2008-11-25 Thread Lars Huttar
On 11/25/2008 3:21 PM, Lars Huttar wrote:

 When I put \show\rm in the .tex file to display the definition of the
 \rm macro, and run texexec, I get:
\rm=\protected macro:
   -\setcurrentfontstyle {rm}.
   l.7 \show\rm
 By contrast, according to
 http://webpages.charter.net/davidlha/.trm/trmi.html, Plain TeX defines
 \rm to be `\fam=0 \tenrm'.
 So clearly the definition of the \rm macro is different in ConTeXt than
 it is in Plain TeX.
 

P.S. The same TeX reference reports,

This switch plus the assignments made by Plain TeX are what makes
`${\rm text }$' typeset `text' in roman instead of in italics [154].
where [154] refers to the page number in the TeXbook.

The latter says The control sequence \rm is an abbreviation for '\fam=0
\tenrm'; thus, \rm causes \fam to become zero, and it makes \tenrm the
current font. In horizontal mode, the \fam value is irrelevant and the
current font governs the typesetting of letters; ... [stuff about math
mode, which doesn't seem to apply to this situation].

FWIW.
___
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] difference between TeX behavior and ConTeXt

2008-11-25 Thread Lars Huttar
On 11/25/2008 5:37 PM, Rory Molinari wrote:
 Lars Huttar wrote:
 
 Thanks for the explanation.
 I hope that when the manual is finished it will make this clearer.
 Currently, the draft chapter says
 As will be explained later, the command \rm is used to switch to a
 roman/serif/regular style
 which does not seem to be happening.
 
 I think it is due to a difference in terminology between (plain) TeX and 
 ConTeXt.
 Knuth uses roman to mean with serifs and not slanted

Interesting.
As a newbie to typesetting, reading the TeXbook, I certainly wondered
which axes Knuth meant 'roman' to refer to... he simply describes it
as 'normal roman' and gives a visual example. So far, all I'd gathered
was that it meant not italic.

Now that you brought up serifs, I read further in the chapter where
Knuth introduces \rm (ch. 4). He eventually makes clear that he does not
contrast roman with sans-serif (nor with slanted!), because he mentions
both slanted roman (p. 13) and the approved use of \rm to be temporarily
defined to mean a sans-serif type (p. 15). Apparently the only thing
roman is contrasted with in Knuth's book is italic (i.e. the modified
glyph style of an italic font, regardless of the slant).

Out of curiosity, I looked up 'roman' with regard to typography on
wikipedia. On the disambiguation page for Roman it says Roman type, an
upright typeface style, contrasted to italic. But on the Roman_type
page it lists both not-italic and with-serif as (separate) senses of
roman. Thanks for the tip.


Regardless of the terminology used, though, what is objectively clear is
that \rm has different effects on font settings in ConTeXt than in Plain
TeX. The TeXbook makes clear by example, if not by statement, that one
of the effects of '\rm' must be to make text non-italicized (also
non-slanted).

If it's designed not to do that in ConTeXt -- i.e. the ConTeXt designers
decided to change the semantics of one of the basic control sequences in
TeX, rather than merely providing a different one with new semantics --
you would think one would want that to be prominently documented. (Maybe
some flashing orange lights? :-)

Whereas \rm is not found at all in the command reference at
http://texshow.contextgarden.net/


 while ConTeXt
 uses it to mean just not sans serif.

I wonder if the command sequence \serif was already taken?
That would certainly be less ambiguous and confusing...


 So something like
 
 aardvark {\it aardvark {\rm aardvark}}
 
 is really doing something like:
 
 - Set aardvark in the default face (which is probably an unslanted serif)
 - Switch to the italic flavor of the default face, which here means a 
 traditional italic
 - While in the italic flavor, switch to a roman base.  But we already 
 had a roman base so this doesn't change anything: we are still slanted 
 because of the enclosing \it.
 
 Roman and italic are on different axes and can be changed independently.

It makes sense for italicness and serifity to be independently
changeable.
What's discouraging to me as a entrant to the whole TeX world (but an
experienced programmer) is the (apparently undocumented) redefinition of
a well-established control sequence that used to mean non-italic to
mean something different (maybe serif -- I still don't know for sure).

If I were choosing a TeX macro package at this point, I would definitely
 look for one that kept semantics of basic TeX command sequences
consistent with the intent expressed in the TeXbook... to avoid package
lock-in, as well as to make the learning curve easier and to be able to
use the resources of the whole TeX community.

That being said, I appreciate the design goals of ConTeXt, including the
desire to have independent controls for +/- italic, +/- serif, etc. I'm
also amazed at the energy that Hans still devotes to answering questions
on this mailing list, 18 years after ConTeXt was written! That's dedication.

Sorry if the above sounds too negative. After all, the TeXbook itself
does not make the semantics of \rm obvious.
However, once you dig deep enough it becomes clear that \rm does mean
switch to a non-italic typeface in Plain TeX.


 
 However, things are different if we start off in a sans serif face, like
 
 \ss aardvark {\it aardvark {\rm aardvark}}
 
 Now the \it still gives slanted text, but since the base is sans serif 
 we don't get the traditional italic appearance that corresponds to a 
 roman base.  The nested \rm now does that.
 
 (Note: my terminology is all wrong.  Base and flavor aren't the 
 right terms at all, but I cannot remember the correct terms right now. 
 I would be grateful is someone could correct me.)
 
 Cheers,
 Rory
 

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

Re: [NTG-context] difference between TeX behavior and ConTeXt

2008-11-25 Thread Lars Huttar
On 11/25/2008 10:15 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
 Hi,
 
 On Tue, 25 Nov 2008 14:29:09 -0700, Lars Huttar [EMAIL PROTECTED]  
 wrote:
 
 P.S. The same TeX reference reports,
 
 Be careful, PlainTeX is a macropaackage, just as ConTeXt is. One must  
 distinguish PlainTeX commands from the TeX (and pdftex/luaTeX) primitives.  
 Although some PlainTeX commands work similarly to the ConTeXt  
 counterparts, you can rarely assume this. There are lots and lots more  
 examples. Better to just treat them as very distinct macropackages, with a  
 few commonly USED command names in common, but used to MENTION different  
 things.

Ah...
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] difference between TeX behavior and ConTeXt

2008-11-26 Thread Lars Huttar
On 11/26/2008 2:41 AM, Marcin Borkowski wrote:
 Dnia Tue, Nov 25, 2008 at 10:30:51PM -0600, Lars Huttar napisa#322;(a):
 It makes sense for italicness and serifity to be independently
 changeable.
 What's discouraging to me as a entrant to the whole TeX world (but an
 experienced programmer) is the (apparently undocumented) redefinition of
 a well-established control sequence that used to mean non-italic to
 mean something different (maybe serif -- I still don't know for sure).
 
 Hi,
 
 and welcome to the TeX world;).
 
 Me not being an experienced programmer, but (some kind) of more or less
 experienced TeX user, I'd add the following.

I appreciate your time and the explanations, from an experienced TeX user.
(To all) please pardon the frustration apparent in my previous email,
from a TeX and especially ConTeXt newbie.

 It is probably true that plain TeX is weird and incomplete in a sense.
 What \rm means in plain TeX is: switch to upright, serif font in 10pt
 size.

This is good to know.
However what I'm getting at is not just its concrete definition
(implementation) in Plain TeX, but its general intent.

The reason I ask that question is this: Knuth makes clear in TeXbook ch.
4 that \rm and other macros are intended to be redefined according to
the needs of the book section. Therefore \rm is not intended to remain
defined always specifically as switch to upright, serif font in 10pt
size. But it is *not* intended that \rm be defined to mean reduce the
left margin to the dimension provided by the following argument, or
even switch to italic, serif font in 10pt size. Sure you could define
\rm to mean anything, but your end users would string you up.

Somewhere between those extremes is an intended consistency of meaning
for \rm. If it were not so, macro packages would be gibberish,
intelligible to the executing processor but intractable for humans.

My contention is that the intended invariant of \rm semantics,
communicated in TeXbook (e.g. exercise 4.2 and the bottom of p. 15), is
that of not italic.

 [helpful orientation on the major macro packages snipped]

 (and level of frustration), sometimes with LaTeX having more wtf per
 minute 

I had not heard of that metric before. :-)

 That's right.  I would add one more point: if everyone called the
 software of ConTeXt quality beta, then Windows would be pre-alpha and
 a typical GNU/Linux probably something between alpha and beta.

Except perhaps the documentation. I have yet to find a reference that
clearly describes what \rm is to do in ConTeXt. One responder pointed to
http://www.pragma-ade.com/general/manuals/cont-eni.pdf. The closest
thing to a definition of \rm there that I could find is on p. 111: The
command \rm is used to switch to a roman/serif/regular style,...
These three terms are not explicitly defined; they are given as names of
styles in an illustrative table above. One may apparently assume that
the meaning serif style here actually is intended to mean that the
typeface has serifs (not a trivial assumption: see 'regular'). However
the examples of serif/regular/roman in the illustrative table are also
all non-italic, and the word regular in typography usually (as far as
I can tell... please enlighten) means upright in contrast to italic.
Yet apparently \rm does not switch to regular (if that means or
includes upright) in ConTeXt.

 Sorry if the above sounds too negative. After all, the TeXbook itself
 does not make the semantics of \rm obvious.
 
 Well, it does, but _not_ in the context of changing sizes/styles/etc...

Again, I think we're talking about two different things: the original
macro definition in Plain TeX, vs. the communicated intended invariant
meaning over redefinitions of \rm in various formats (Knuth's term
which I take to mean macro packages or something like that).

 However, once you dig deep enough it becomes clear that \rm does mean
 switch to a non-italic typeface in Plain TeX.
 
 I'll stress it again: no.  In plain TeX, it means switch to cmr10 at
 10pt, full stop.

See previous comment.

But even in plain TeX, switch to cmr10 at 10pt *does* include
switching to a non-italic typeface, which is what I meant here. I didn't
mean that in plain TeX \rm means *only* switch to a non-italic
typeface. Sorry that wasn't clear.

And the jolt here with ConTeXt is that the meaning of \rm no longer
includes switch to a non-italic typeface, and that this change is not
clearly documented.

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] difference between TeX behavior and ConTeXt

2008-11-26 Thread Lars Huttar
On 11/26/2008 7:43 AM, Lars Huttar wrote:
...
 and the word regular in typography usually (as far as
 I can tell... please enlighten) means upright in contrast to italic.

I now see that regular (apparently less often) can refer to weight:
not bold or light. Still, the point remains.

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] difference between TeX behavior and ConTeXt

2008-12-01 Thread Lars Huttar
On 11/27/2008 3:57 AM, Taco Hoekwater wrote:
 
 Lars Huttar wrote:
 something like this:

  switch to a serif style

 (if that's what \rm means in ConTeXt -- I still don't know for sure).
 
 \rm in ConTeXT means: switch to the internal style group named rm
 (and likewise for \ss - ss etc.)
 
 Whether rm points to a group of fonts that actually have serifs
 attached to the glyph shapes depends totally on the specific typescript
 that is being used in the document (usually they will, and I think all
 the predefined typescripts are set up that way, but that is not a
 requirement at all).
 
 The basic idea is that the style rm switches to the font set used
 for the main portion of the text. ss is the style for supporting
 texts, like section heads and headers/footers. tt is useful for
 fixed-width text, (this gets it own special group because it is very
 often needed in manuals). hw, and cg are variations for different
 forms of supporting texts, these are rarely used.
 
 Does it make more sense now?
 

Thank you, that helps a lot. I understand now that \rm is more abstract
than I'd initially thought... more powerful but also harder to predict.
Nevertheless useful generalizations can be made (as you showed) that are
helpful in learning the system.

I think it would be worthwhile to explain that in the manual you are
writing (if it doesn't already... sorry, I'm on a tight deadline now and
can't recheck!)... that the style rm switches to the font set used for
the main portion of the text, which typically is a serif font. I think
it would also be helpful to note that this switch does not (normally?)
affect italicization, because some TeX-world users will be coming in
with wrong expectations regarding rm and italics.

Best wishes,
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] widow/orphan control in columns?

2008-12-02 Thread Lars Huttar
Hello,

We have a document with a 2-column layout where we have section headers
that keep ending up at the bottom of columns.
E.g.

\startsectionheading{2. Foo bar baz}\stopsectionheading

where \startsectionheading is defined by:

\definestartstop
  [sectionheading]
  [before={ \startalignment[middle]},
   after={\stopalignment \bigskip},
   style={\switchtobodyfont[...,...]}]

In order to make sure this section heading gets followed by a line or
two of actual text, I saw on web pages [1] and [2] that you can use
\testpage[n] to check whether there is room for n more lines, and if
not, to produce a page break. I checked the manual [3] and command
reference [4] but couldn't find information about \testpage.
Is there a corresponding command to conditionally produce a column break?

Thanks,
Lars

[1] http://getfo.org/context_xml/page4.html
[2] http://wiki.contextgarden.net/Layout
[3] http://www.pragma-ade.com/general/manuals/cont-eni.pdf
[4] http://texshow.contextgarden.net/

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

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


Re: [NTG-context] widow/orphan control in columns?

2008-12-02 Thread Lars Huttar
On 12/2/2008 1:45 PM, Lars Huttar wrote:
 Hello,
 
 We have a document with a 2-column layout where we have section headers
 that keep ending up at the bottom of columns.
...
 I checked the manual [3] and command
 reference [4] but couldn't find information about \testpage.
 Is there a corresponding command to conditionally produce a column break?
 
 Thanks,
 Lars

I just looked at the implementation of \testpage in base/page-ini.tex
and found \testcolumn.
I imagine that should be analogous to \testpage, but hesitate to rely on
an undocumented feature, as it might be unused or obsolete code. I can't
find any examples of anyone using \testcolumn.

Yet it seems that keeping a section header with the following text in a
column would be a common layout requirement; even Microsoft Word does
it. Am I missing something?

Does anybody know if \testcolumn is intended for public use?

Thanks again,
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] how to get thick and thin borders working in tables (ConTeXt)

2008-12-09 Thread Lars Huttar
Hello,

We are using ConTeXt (with XeTeX engine) to typeset some tables that
have borders (rules) between cells.

In the previous edition of the book (which was not done in TeX), some of
the lines between table cells were double, others single. This was done
to show grouping of columns and rows. We have been told that in TeX, or
at least in ConTeXt, you can't do double rules (we'd be happy to be
corrected on that point), so we have been trying to use thick and thin
lines to show grouping.

Thick or thin lines work fine if applied to whole tables or whole cells,
but when there are cells with thick rules on some sides and thin rules
on other sides, it gets confused.

For example, we tried
(a) \setupTABLE[c][4][leftframe=on,rulethickness=0.5mm]
to set the left border of the fourth column to be thick. This worked.
But then if we use
(b) \setupTABLE[c][4][rightframe=on,rulethickness=0.25mm]
to set the right border of the same column to be thin, it overrides the
thickness of both left and right borders, so setting (a) is lost.

In other words, we can't seem to get a given cell to have a thick border
on one side and a thin border on the other side. (Well, we could fake it
in some cases by setting rulethickness for an adjacent cell, but that
adjacent cell would then have to have thick borders on all sides.)

Does anybody know if it's possible to do this in ConTeXt? or in TeX?

Thanks for any ideas,
Lars

P.S.
Incidentally, if you set the bottom border of row 1 and the top border
of row 2 each to be thick, the result is additive: you get a
doubly-thick border.


___
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] how to get thick and thin borders working in tables (ConTeXt)

2008-12-09 Thread Lars Huttar
On 12/9/2008 2:01 PM, Lars Huttar wrote:
 On 12/9/2008 12:04 PM, Wolfgang Schuster wrote:

We applied your example to our document, and were able to get it working
with thick and thin lines. Thanks very much!

Now since you included double lines in your example, I've been aspiring
to use that instead of just thick lines...


 \startuseMPgraphic{table:frame:double}
 draw OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ; % outer frame
 draw OverlayBox enlarged -2pt ;% inner frame
 setbounds currentpicture to OverlayBox ;
 \stopuseMPgraphic

OK... the above results in triple lines between cells, so I modified the
draw OverlayBox lines as follows:

draw OverlayBox enlarged \the\dimexpr\linewidth*1\relax ; % outer frame
draw OverlayBox enlarged -\the\dimexpr\linewidth*2\relax ; % inner frame

This was mainly experimental, as I don't fully understand the model.
(I looked up some Metapost references but couldn't find a definition of
enlarged.) But it seems to work: the double lines between two cells
overlap exactly, so you get a consistent look.

However, when I try to mix double frames with single frames, I'm having
trouble. Here is what I tried, in order to get a cell with double frame
on the left, and single frame everywhere else:

\startuseMPgraphic{table:frame:Lrtb} % left border is double
draw leftboundary OverlayBox enlarged \the\dimexpr\linewidth*1\relax ; %
outer frame
draw leftboundary OverlayBox enlarged -\the\dimexpr\linewidth*2\relax ;
% inner frame
draw rightboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ;
draw topboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ;
draw bottomboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic

Now the graphic has double line on the left and a single line elsewhere.
However, the lines are thicker than in the previous one... about twice
as thick, too heavy for our requirements. And I can't tell why. This is
true on all four sides.
See http://www.huttar.net/lars-kathy/tmp/test-mp-tableframe.pdf, second
table.

Also, on the side that has double lines, the double lines don't go all
the way to the top and bottom (see same pdf, second table), so that the
double line is not continuous across multiple rows.

Any suggestions?

The above graphic is used as follows...
\start
\setupTABLE[c][first][background={table:frame:Lrtb}]
\getbuffer
\stop


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] how to get thick and thin borders working in tables (ConTeXt)

2008-12-11 Thread Lars Huttar
On 12/10/2008 4:05 AM, Wolfgang Schuster wrote:
 On Wed, Dec 10, 2008 at 7:07 AM, Lars Huttar [EMAIL PROTECTED] wrote:
...
 However, when I try to mix double frames with single frames, I'm having
 trouble. Here is what I tried, in order to get a cell with double frame
 on the left, and single frame everywhere else:

 \startuseMPgraphic{table:frame:Lrtb} % left border is double
 draw leftboundary OverlayBox enlarged \the\dimexpr\linewidth*1\relax ; %
 outer frame
 draw leftboundary OverlayBox enlarged -\the\dimexpr\linewidth*2\relax ;
 % inner frame
 draw rightboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ;
 draw topboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ;
 draw bottomboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ;
 setbounds currentpicture to OverlayBox ;
 \stopuseMPgraphic

 Now the graphic has double line on the left and a single line elsewhere.
 However, the lines are thicker than in the previous one... about twice
 as thick, too heavy for our requirements. And I can't tell why. This is
 true on all four sides.
 See http://www.huttar.net/lars-kathy/tmp/test-mp-tableframe.pdf, second
 table.

 Also, on the side that has double lines, the double lines don't go all
 the way to the top and bottom (see same pdf, second table), so that the
 double line is not continuous across multiple rows.

 Any suggestions?

 The above graphic is used as follows...
 \start
 \setupTABLE[c][first][background={table:frame:Lrtb}]
 \getbuffer
 \stop
 
 \startuseMPgraphic{table:frame:all}
 draw OverlayBox enlarged -0.2 ;
 setbounds currentpicture to OverlayBox ;
 \stopuseMPgraphic
 
 \startuseMPgraphic{table:frame:leftdouble}
 draw OverlayBox leftenlarged 2 topenlarged -0.2 bottomenlarged -0.2
 rightenlarged -0.2 ;
 setbounds currentpicture to OverlayBox ;
 \stopuseMPgraphic
 
 \defineoverlay[table:frame:all][\useMPgraphic{table:frame:all}]
 \defineoverlay[table:frame:leftdouble][\useMPgraphic{table:frame:leftdouble}]
 
 \starttext
 
 \startbuffer
 \bTABLE[frame=off,offset=2ex]
\bTR
\bTD One   \eTD
\bTD Two   \eTD
\bTD Three \eTD
\eTR
\bTR
\bTD Four  \eTD
\bTD Five  \eTD
\bTD Six   \eTD
\eTR
\bTR
\bTD Seven \eTD
\bTD Eight \eTD
\bTD Nine  \eTD
\eTR
 \eTABLE
 \stopbuffer
 
 \start
 \setupTABLE[background={table:frame:all}]
 \setupTABLE[c][first][background={table:frame:all,table:frame:leftdouble}]
 \getbuffer
 \stop
 
 \stoptext
 
 Wolfgang
 

This fixes the problems I mentioned in my previous email. Thanks again
for that!

Unfortunately, when I generalize it, it takes us back to producing
triple borders between adjacent cells. I think this is inevitable when
overlaying a double frame (for certain sides) on top of a single frame
for all sides, because a double side overlaid on a single side cannot be
centered (or else the single line shows through separately from the
double line).

So my fix... which I'm posting here in hopes that someone may refine it,
and for the benefit of others who may attempt similar things... is to
center the double frames between the cells and avoid overlaying a double
frame side over a single frame side.

We center borders between the cells by using enlarged values -0.2 +/-
k, i.e. center around -0.2. I'm not sure why -0.2 works better than
zero, but it does... Doing this makes coincident border lines from
adjacent cells look like ordinary single lines instead of  being extra
thick. We settled on k = 0.6 to get the desired distance between our
double lines. Incidentally, I wish I knew how to put -0.2, 0.2-k, and
-0.2+k into variables or something so that they could all be changed in
one place, instead of hard-coded in many places. Maybe somebody can help
me there.

A cost of this single-overlay-per-cell approach is that we have to
specify individually the 16 possible overlays (combinations of single
and double edges) for any possible cell. But that's not too bad, as we
only have to define them once. (In practice, we also had to define a
couple of special cases where we needed some cells with open edges for a
faked rowspan. We haven't completely got those working yet.)

An unexpected and potentially large benefit of this approach is that for
each cell, we only generate one MPgraphic (apparently because we only
use one overlay per cell), which should make the TeX run much faster,
and avoid running over the maxnumMPgraphics limit. With the
multiple-overlay-per-cell approach, we ended up using about 13,000
MPgraphics for our document, far beyond the default limit of 4000, and
taking 15 minutes to run compared to 37 seconds for a similar document
without the tables.

Here is our working system... hope it's helpful to somebody:

 define MPgraphics for double-ruled tables
% Lars Huttar, 2008-12-09
% Thanks to Wolfgang Schuster on NTG-list

% Each MPgraph (and overlay) is named lrtb, with capitalized letters
indicating which sides are double-ruled.
% Adjacent

Re: [NTG-context] how to get thick and thin borders working in tables (ConTeXt)

2008-12-11 Thread Lars Huttar
On 12/11/2008 3:24 PM, Wolfgang Schuster wrote:
 
 Am 11.12.2008 um 18:05 schrieb Lars Huttar:
 
 We center borders between the cells by using enlarged values -0.2 +/-
 k, i.e. center around -0.2. I'm not sure why -0.2 works better than
 zero, but it does... Doing this makes coincident border lines from
 adjacent cells look like ordinary single lines instead of  being extra
 thick. We settled on k = 0.6 to get the desired distance between our
 double lines. Incidentally, I wish I knew how to put -0.2, 0.2-k, and
 -0.2+k into variables or something so that they could all be changed in
 one place, instead of hard-coded in many places. Maybe somebody can help
 me there.
 
 \startMPinitializations
 numeric InnerFrame, MiddleFrame, OuterFrame ;
 InnerFrame  := 0.2 ;
 MiddleFrame := 0.4 ;
 OuterFrame  := 0.8 ;
 \stopMPinitializations

Makes sense.
Thanks... this will make the code clearer and more maintainable.


 % 1 double side
 \startuseMPgraphic{table:frame:Lrtb} % left double
 draw OverlayBox leftenlarged  MiddleFrame topenlarged -InnerFrame
 bottomenlarged -InnerFrame rightenlarged -InnerFrame ;
 draw OverlayBox leftenlarged -OuterFrame topenlarged -InnerFrame
 bottomenlarged -InnerFrame rightenlarged -InnerFrame ;
 setbounds currentpicture to OverlayBox ;
 \stopuseMPgraphic
 
 An unexpected and potentially large benefit of this approach is that for
 each cell, we only generate one MPgraphic (apparently because we only
 use one overlay per cell), which should make the TeX run much faster,
 and avoid running over the maxnumMPgraphics limit. With the
 multiple-overlay-per-cell approach, we ended up using about 13,000
 MPgraphics for our document, far beyond the default limit of 4000, and
 taking 15 minutes to run compared to 37 seconds for a similar document
 without the tables.
 
 Use the 'nomprun' switch for texexec
 
 texexec --nomprun --xtx file
 
 ConTeXt collects now all graphics and process them after the TeX run.

Hmm... we tried this, but it doesn't seem to make any obvious difference.
Is this supposed to give a speed improvement? or get around the
maxnumMPgraphics limit?

Thanks again for your help.

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] distributed / parallel TeX?

2008-12-15 Thread Lars Huttar
Hello,

We've been using TeX to typeset a 1200-page book, and at that size, the
time it takes to run becomes a big issue (especially with multiple
passes... about 8 on average). It takes us anywhere from 80 minutes on
our fastest machine, to 9 hours on our slowest laptop.

So the question comes up, can TeX runs take advantage of parallelized or
distributed processing? As many in the computer industries are aware,
processor speed (clock rate) has plateaued; it is not going to continue
rising at the rate it had been. Hence the common move to dual-core,
quad-core, etc. machines. But applications in general cannot take
advantage of multiple cores to speed their work unless they are
architected to take advantage of them.

We googled around a bit but were surprised not to find any real
references to efforts at running TeX in parallel or on distributed
networks or clusters. Wouldn't this be something that a lot of people
would find useful? Or does everyone only use TeX for typesetting short
papers?

Sure, you can use manual tricks to speed up TeX processing.
You can comment out sections of a document, or select them via modes.
But then you have to remember where you did the commenting out, so you
can reverse it. And you have no guarantees as to whether the
inclusion/exclusion of section B will affect the layout of section C or not.

Wouldn't it be nice if TeX (or a TeX wrapper, or macro package, or
typesetting system) could take care of this for you?
What if you had a language -- or a few extensions to existing languages
-- to give your typesetting engine hints or commands about where to
split up your long document into fairly-independent chunks? What if you
designed your document specifically to be typeset in independent,
parallel pieces so that you could guarantee that you would get the same
result for section B whether or not you were typesetting the whole book
at the same time?
What if the typesetting system automated the stitching-back-together
process of the chunks, gathering page reference info from each chunk to
inform the next iteration of typesetting the other chunks?

Has anyone been working on this already? It seems like it must have been
discussed, but I don't know where to go to look for that discussion.

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] distributed / parallel TeX?

2008-12-16 Thread Lars Huttar
On 12/16/2008 2:08 AM, Taco Hoekwater wrote:
 
 Hi Lars,
 
 Lars Huttar wrote:
 Hello,

 We've been using TeX to typeset a 1200-page book, and at that size, the
 time it takes to run becomes a big issue (especially with multiple
 passes... about 8 on average). It takes us anywhere from 80 minutes on
 our fastest machine, to 9 hours on our slowest laptop.
 
 You should not need an average of 8 runs unless your document is
 ridiculously complex and I am curious what you are doing (but that
 is a different issue from what you are asking).
 
 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.

Thank you for your response.

Certainly this is true in general and in the worst case, as things stand
currently. But I don't think it has to be that way. The following could
greatly mitigate that problem:

- You could design your document *specifically* to make the parts
independent, so that the true and authoritative way to typeset them is
to typeset the parts independently. (You can do this part now without
modifying TeX at all... you just have the various sections' .tex files
input common headers / macro defs.) Then, by definition, a change in
one section cannot affect another section (except for page numbers, and
possibly left/right pages, q.v. below).

- Most large works are divisible into chunks separated by page breaks
and possibly page breaks that force a recto. This greatly limits the
effects that any section can have on another. The division (chunking)
of the whole document into fairly-separate parts could either be done
manually, or if there are clear page breaks, automatically.

- The remaining problem, as you noted, is how to fix page references
from one section to another. Currently, TeX resolves forward references
by doing a second (or third, ...) pass, which uses page information from
the previous pass. The same technique could be used for resolving
inter-chunk references and determining on what page each chunk should
start. After one pass on of the independent chunks (ideally performed
simultaneously by separate processing nodes), page information is sent
from each node to a coordinator process. E.g. the node that processed
section two tells the coordinator that chapter 11 starts 37 pages after
the beginning of section two. The coordinator knows in what sequence the
chunks are to be concatenated, thanks to a config file. It uses this
information together with info from each of the nodes to build a table
of what page each chunk should start on, and a table giving the absolute
page number of each page reference. If pagination has changed, or is
new, this info is sent back to the various nodes for another round of
processing.

If this distributed method of typesetting a document takes 1 additional
iteration compared to doing it in series, but you get to split the
document into say 5 roughly equal parts, you could presumably get the
job done a lot quicker in spite of the extra iteration.

This is a crude description but hopefully the idea is clear enough.

 parallel pieces so that you could guarantee that you would get the same
 result for section B whether or not you were typesetting the whole book
 at the same time?
 
 if you are willing to promiss yourself that all chapters will be exactly
 20 pages - no more, no less - they you can split the work off into
 separate job files yourself and take advantage of a whole server
 farm. If you can't ...

Yes, the splitting can be done manually now, and when the pain point
gets high enough, we do some manual separate TeX runs.

However, I'm thinking that for large works, there is enough gain to be
had that it would be worth systematizing the splitting process and
especially the recombining process, since the later is more error-prone.

I think people would do it a lot more if there were automation support
for it. I know we would.

But then, maybe our situation of having a large book with dual columns
and multipage tables is not common enough in the TeX world.
Maybe others who are typesetting similar books just use commercial
WYSIWYG typesetting tools, as we did in the previous edition of this book.

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] distributed / parallel TeX?

2008-12-16 Thread Lars Huttar
On 12/16/2008 11:37 AM, Hans Hagen wrote:
 Lars Huttar wrote:
 
 We have close to 7000 mpgraphics, and they add about 15 minutes to the
 run time.
 
 most of them are the same so reusing them made sense
 
 But the run time was already quite long before we started using those.

 - define fonts beforehand

 OK, we will look into this. I'm sure Jelle knows about this but I'm a
 noob. I'm pretty sure we are not *loading* fonts every time, but maybe
 we're scaling fonts an unnecessary number of times.
 For example, we have the following macro, which we use thousands of
 times:
 \def\LN#1{{\switchtobodyfont[SansB,\LNfontsize]{#1}}}
 
 indeed this will define the scaled ones again and again (whole sets of
 them since you use a complete switch); internall tex reuses them but it
 only know so when they're defined
 
 Would it help much to instead use
 \definefont[SansBLN][... at \LNfontsize]
 and then
 \def\LN#1{{\SansBLN{#1}}}
 ?
 
 indeed:
 
 \definefont[SansBLN][... at \LNfontsize]
 
 but no extra { } needed:
 
 \def\LN#1{{\SansBLN#1}}

Thanks, we will try this.
(Jelle, since you have worked with this a lot longer than I have, please
stop me if you have concerns about my making this sort of change.)

 - use unique mpgraphic when possible

 I would be interested to know if this is possible in our situation. Most
 of our mpgraphics are due to wanting thick-and-thin or single-and-double
 borders on tables, which are not natively supported by the ConTeXt table
 model.
 
 i sent jelle the patched files

OK, I'll look to hear from him. Are these patches to support these kinds
of borders on tables, thus no longer needing to use MPgraphics?

 The advice I received said to define each mpgraphic using
 \startuseMPgraphic (we have about 18 of these), associate them with
 overlays using \defineoverlay (again, we have 18), and then use them in
 table cells using statements like
 \setupTABLE[c][first][background={LRtb}]
 Empirically, this seems to end up using one mpgraphic per table cell,
 hence our thousands of mpgraphics. I don't know why a new mpgraphic
 would be created for each cell. Can someone suggest a way to avoid this?
 
 metafun manual: unique mp graphics

Great...
I converted our useMPgraphics to uniqueMPgraphics. This reduced our
number of mpgraphics from 7000 to 800!

Unfortunately the result doesn't look quite right... but since we may
not need to use mpgraphics anyway thanks to your patches, I'll hold off
on debugging the result.

 i changes the definitions a bit and now get 5 pages per second on my
 laptop in luatex; xetex processes the pages a bit faster but spends way
 more time on the mp part

 My last run gave about 0.25 pages per second on our fastest server, when
 taking into account multiple passes; that comes out to about 2 pps for
 --once.
 
 the patched files do 5-10 pps on my laptop (was  1 sec pp) so an
 improvement factor of at least 5 is possible
 
 there are probably other optimizations possible but i cannot spent too
 much time on it

Thanks for all your help thus far.

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] distributed / parallel TeX?

2008-12-16 Thread Lars Huttar
On 12/16/2008 3:31 PM, Martin Schröder wrote:
 2008/12/16 Lars Huttar lars_hut...@sil.org:
 - You could design your document *specifically* to make the parts
 independent, so that the true and authoritative way to typeset them is
 to typeset the parts independently. (You can do this part now without
 modifying TeX at all... you just have the various sections' .tex files
 input common headers / macro defs.) Then, by definition, a change in
 one section cannot affect another section (except for page numbers, and
 possibly left/right pages, q.v. below).
 
 True. Also with TeX if your paragraphs are independent of each other
 (i.e. they don't include references to others), they could the typeset
 in parallel and then handed over to the page builder.

Good point... although doesn't the page optimization feed back into
paragraph layout?

 - Most large works are divisible into chunks separated by page breaks
 and possibly page breaks that force a recto. This greatly limits the
 effects that any section can have on another. The division (chunking)
 of the whole document into fairly-separate parts could either be done
 manually, or if there are clear page breaks, automatically.
 
 pdfTeX 1.50 knows about the page diversions (analogue to m4's divert
 and undivert). They have a lot of potential.

Sounds useful. It's impressive if you can get a correct table of
contents in the first run (says
http://www.gust.org.pl/BachoTeX/2008/presentations/ms/handout.pdf)

 page number of each page reference. If pagination has changed, or is
 new, this info is sent back to the various nodes for another round of
 processing.
 
 Hopefully stopping at some point. If you use something like varioref,
 you can end with infinite circles. :-)

But this is just a problem of typesetting with TeX in general, not
particular to parallel/distributed typesetting, right?
IIRC, Knuth even says in the TeXbook that a really pathological case
might never stabilize.

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] distributed / parallel TeX?

2008-12-16 Thread Lars Huttar
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.

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


[NTG-context] error when using uniqueMPgraphics

2008-12-22 Thread Lars Huttar
On 12/16/2008 1:28 PM, Lars Huttar wrote [Re: [NTG-context] distributed
/ parallel TeX?]:
 On 12/16/2008 11:37 AM, Hans Hagen wrote:
 Lars Huttar wrote:
...
 The advice I received said to define each mpgraphic using
 \startuseMPgraphic (we have about 18 of these), associate them with
 overlays using \defineoverlay (again, we have 18), and then use them in
 table cells using statements like
 \setupTABLE[c][first][background={LRtb}]
 Empirically, this seems to end up using one mpgraphic per table cell,
 hence our thousands of mpgraphics. I don't know why a new mpgraphic
 would be created for each cell. Can someone suggest a way to avoid this?
 metafun manual: unique mp graphics
 
 Great...
 I converted our useMPgraphics to uniqueMPgraphics. This reduced our
 number of mpgraphics from 7000 to 800!
 
 Unfortunately the result doesn't look quite right... but since we may
 not need to use mpgraphics anyway thanks to your patches, I'll hold off
 on debugging the result.

When I use uniqueMPgraphics, things run faster, but I get errors and
warnings. They look like this:

** WARNING ** Specified (image) object doesn't exist: MP::139
** WARNING ** Interpreting special command uxobj (pdf:) failed.
** WARNING **  at page=32 position=(216.633, 268.835) (in PDF)
** WARNING **  xxx pdf:uxobj @MP::139
** WARNING ** Error locating image file MP::185
** WARNING ** Specified (image) object doesn't exist: MP::185
** WARNING ** Interpreting special command uxobj (pdf:) failed.
** WARNING **  at page=32 position=(250.44, 268.835) (in PDF)
** WARNING **  xxx pdf:uxobj @MP::185
** WARNING ** Error locating image file MP::141
** WARNING ** Specified (image) object doesn't exist: MP::141
** WARNING ** Interpreting special command uxobj (pdf:) failed.
** WARNING **  at page=32 position=(284.247, 268.835) (in PDF)
** WARNING **  xxx pdf:uxobj @MP::141
** WARNING ** Error locating image file MP::186
** WARNING ** Specified (image) object doesn't exist: MP::186
** WARNING ** Interpreting special command uxobj (pdf:) failed.
** WARNING **  at page=32 position=(316.111, 268.835) (in PDF)
** WARNING **  xxx pdf:uxobj @MP::186
** WARNING ** Error locating image file MP::143
** WARNING ** Specified (image) object doesn't exist: MP::143
** WARNING ** Interpreting special command uxobj (pdf:) failed.
** WARNING **  at page=32 position=(352.456, 268.835) (in PDF)
** WARNING **  xxx pdf:uxobj @MP::143



The tex looks like:

\startMPinitializations
numeric FrameDist, Inner, Middle, Outer ;
FrameDist := 0.6;
Middle  := -0.2 ;
Inner := Middle - FrameDist;
Outer  := Middle + FrameDist;
\stopMPinitializations

% 0 double sides
\startuniqueMPgraphic{table:frame:lrtb} % all single
draw OverlayBox enlarged Middle ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic

% 1 double side
\startuniqueMPgraphic{table:frame:Lrtb} % left double
draw OverlayBox leftenlarged Outer topenlarged Middle bottomenlarged
Middle rightenlarged Middle ;
draw OverlayBox leftenlarged Inner topenlarged Middle bottomenlarged
Middle rightenlarged Middle ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
...
% 0 double sides
\defineoverlay[lrtb][\uniqueMPgraphic{table:frame:lrtb}]
% 1 double side
\defineoverlay[Lrtb][\uniqueMPgraphic{table:frame:Lrtb}]
\defineoverlay[lRtb][\uniqueMPgraphic{table:frame:lRtb}]
\defineoverlay[lrTb][\uniqueMPgraphic{table:frame:lrTb}]
\defineoverlay[lrtB][\uniqueMPgraphic{table:frame:lrtB}]

...

\def\setuptableone{\setupTABLE[frame=off,split=no,option=stretch,offset=0.85mm,distance=0mm,columndistance=0mm,leftmargindistance=0mm,rightmargindistance=0mm]
\setupTABLE[r][each][height=0.6cm,align={middle,lohi}]
\setupTABLE[2,3,4,5,6,7][4,5,6,7,8,9][align={flushright,lohi}]
\setupTABLE[1][4,5,6,7,8,9][align={flushleft,lohi}]
\setupTABLE[c][1][background={LRtb}]
\setupTABLE[c][2,4][background={Lrtb}]
...}

\bgroup
\setuptableone
\startTabTableHeader
[nc=7,height=0.8cm,align={right,lohi}]\switchtobodyfont[SansB,\countryheadersize]{Table
1.}
...

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

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


Re: [NTG-context] error when using uniqueMPgraphics

2008-12-22 Thread Lars Huttar
On 12/22/2008 9:48 PM, Lars Huttar wrote:
 On 12/16/2008 1:28 PM, Lars Huttar wrote [Re: [NTG-context] distributed
 / parallel TeX?]:
 On 12/16/2008 11:37 AM, Hans Hagen wrote:
 Lars Huttar wrote:
 ...
 The advice I received said to define each mpgraphic using
 \startuseMPgraphic (we have about 18 of these), associate them with
 overlays using \defineoverlay (again, we have 18), and then use them in
 table cells using statements like
 \setupTABLE[c][first][background={LRtb}]
 Empirically, this seems to end up using one mpgraphic per table cell,
 hence our thousands of mpgraphics. I don't know why a new mpgraphic
 would be created for each cell. Can someone suggest a way to avoid this?
 metafun manual: unique mp graphics
 Great...
 I converted our useMPgraphics to uniqueMPgraphics. This reduced our
 number of mpgraphics from 7000 to 800!

 Unfortunately the result doesn't look quite right... but since we may
 not need to use mpgraphics anyway thanks to your patches, I'll hold off
 on debugging the result.
 
 When I use uniqueMPgraphics, things run faster, but I get errors and
 warnings. They look like this:
 
 ** WARNING ** Specified (image) object doesn't exist: MP::139
 ** WARNING ** Interpreting special command uxobj (pdf:) failed.
 ** WARNING **  at page=32 position=(216.633, 268.835) (in PDF)
 ** WARNING **  xxx pdf:uxobj @MP::139
 ** WARNING ** Error locating image file MP::185
 ** WARNING ** Specified (image) object doesn't exist: MP::185
 ** WARNING ** Interpreting special command uxobj (pdf:) failed.
 ** WARNING **  at page=32 position=(250.44, 268.835) (in PDF)
 ** WARNING **  xxx pdf:uxobj @MP::185
 ** WARNING ** Error locating image file MP::141
 ** WARNING ** Specified (image) object doesn't exist: MP::141
 ** WARNING ** Interpreting special command uxobj (pdf:) failed.
 ** WARNING **  at page=32 position=(284.247, 268.835) (in PDF)
 ** WARNING **  xxx pdf:uxobj @MP::141
 ** WARNING ** Error locating image file MP::186
 ** WARNING ** Specified (image) object doesn't exist: MP::186
 ** WARNING ** Interpreting special command uxobj (pdf:) failed.
 ** WARNING **  at page=32 position=(316.111, 268.835) (in PDF)
 ** WARNING **  xxx pdf:uxobj @MP::186
 ** WARNING ** Error locating image file MP::143
 ** WARNING ** Specified (image) object doesn't exist: MP::143
 ** WARNING ** Interpreting special command uxobj (pdf:) failed.
 ** WARNING **  at page=32 position=(352.456, 268.835) (in PDF)
 ** WARNING **  xxx pdf:uxobj @MP::143
 
 
 
 The tex looks like:
 
 \startMPinitializations
 numeric FrameDist, Inner, Middle, Outer ;
 FrameDist := 0.6;
 Middle  := -0.2 ;
 Inner := Middle - FrameDist;
 Outer  := Middle + FrameDist;
 \stopMPinitializations
 
 % 0 double sides
 \startuniqueMPgraphic{table:frame:lrtb} % all single
 draw OverlayBox enlarged Middle ;
 setbounds currentpicture to OverlayBox ;
 \stopuniqueMPgraphic
 
 % 1 double side
 \startuniqueMPgraphic{table:frame:Lrtb} % left double
 draw OverlayBox leftenlarged Outer topenlarged Middle bottomenlarged
 Middle rightenlarged Middle ;
 draw OverlayBox leftenlarged Inner topenlarged Middle bottomenlarged
 Middle rightenlarged Middle ;
 setbounds currentpicture to OverlayBox ;
 \stopuniqueMPgraphic
 ...
 % 0 double sides
 \defineoverlay[lrtb][\uniqueMPgraphic{table:frame:lrtb}]
 % 1 double side
 \defineoverlay[Lrtb][\uniqueMPgraphic{table:frame:Lrtb}]
 \defineoverlay[lRtb][\uniqueMPgraphic{table:frame:lRtb}]
 \defineoverlay[lrTb][\uniqueMPgraphic{table:frame:lrTb}]
 \defineoverlay[lrtB][\uniqueMPgraphic{table:frame:lrtB}]
 
 ...
 
 \def\setuptableone{\setupTABLE[frame=off,split=no,option=stretch,offset=0.85mm,distance=0mm,columndistance=0mm,leftmargindistance=0mm,rightmargindistance=0mm]
 \setupTABLE[r][each][height=0.6cm,align={middle,lohi}]
 \setupTABLE[2,3,4,5,6,7][4,5,6,7,8,9][align={flushright,lohi}]
 \setupTABLE[1][4,5,6,7,8,9][align={flushleft,lohi}]
 \setupTABLE[c][1][background={LRtb}]
 \setupTABLE[c][2,4][background={Lrtb}]
 ...}
 
 \bgroup
 \setuptableone
 \startTabTableHeader
 [nc=7,height=0.8cm,align={right,lohi}]\switchtobodyfont[SansB,\countryheadersize]{Table
 1.}
 ...
 


Sorry, I left out a couple of things I meant to say...

Basically, when we run with uniqueMPgraphic instead of useMPgraphic, we
get a lot fewer mpgraphic files; but the tables we produce lack the
outer border. And we get the above errors.

Googling the errors leads us to dvipdfmx, e.g.
http://tug.org/texlive/devsrc/Build/source/texk/dvipdfmx/src/spc_pdfm.c
http://dvipdfmx.sourcearchive.com/documentation/1:20050831-5/pdfximage_8c-source.html

But I don't think dvipdfmx is the cause.
Can anyone explain the error messages or suggest a fix?
We would love to use uniqueMPgraphics for efficiency, but we can't if it
gives the wrong result...

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

[NTG-context] tool for reviewing hyphenation

2009-02-03 Thread Lars Huttar
Hello,

We have a situation where hyphenation is an issue, due to a 2-column
layout where the columns are not very wide. We've done a lot of tweaking
of settings for hyphenation and interword spacing, and the result seems
pretty good. In particular, there are not many cases of consecutive
lines that end with hyphens, and not many cases where a hyphenation
occurs over a right-hand page break. The few cases that exist, we have
been fixing manually by using \hbox{...} to prevent hyphenation at the
trouble spot.

But the hyphenation is by nature somewhat volatile, so whenever we
change something we would like to be able to easily recheck the hyphenation.
And our book is over 1200 pages, so it would be very helpful to have
tools to make the checking more efficient.

One tool we found was the evince PDF viewer in Linux, which highlights
all search results at once. So you can search for -, and it will
highlight all hyphens, which makes it easier to scan the PDF visually
for hyphenation problems.
Still, this approach has its limitations... our layout domain experts
don't have Linux machines, and I haven't found a PDF viewer for Windows
that can highlight all search results at once.

Another approach we wondered about was having TeX highlight the
hyphenations... e.g. changed the background color to yellow or red, when
outputting a word that's dynamically broken/hyphenated. (Rather like we
have TeX output red grid lines to help with debugging layout.)
I think we would also want to highlight static hyphens that occur at the
end of a line, as in Niger-
Congo, because they have a similar visual impact. Possibly using a
different color.

This would be an ideal solution, I think, but we don't know how to have
TeX detect when a word gets dynamically hyphenated.

Another possibility we've looked into is using javascript in Adobe
Reader to find and highlight end-of-line (and end-of-page) hyphens. But
this approach has proved more difficult than expected... the API and the
DOM are complex, and I haven't figured out yet how to access the text of
the document to search for hyphens. (The search method seems to just
go to the first or next occurence, and highlight only one occurrence at
a time.)

Thanks for any help,
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] tool for reviewing hyphenation

2009-02-03 Thread Lars Huttar
On 2/3/2009 1:29 PM, Hans Hagen wrote:
 Lars Huttar wrote:
 
 But the hyphenation is by nature somewhat volatile, so whenever we
 change something we would like to be able to easily recheck the
 hyphenation.
 And our book is over 1200 pages, so it would be very helpful to have
 tools to make the checking more efficient.
 
 so, you only want to highlight hyphens?

Yes. Especially hyphens introduced by TeX for line-breaking.

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] tool for reviewing hyphenation

2009-02-03 Thread Lars Huttar
On 2/3/2009 2:22 PM, Hans Hagen wrote:
 Lars Huttar wrote:
 On 2/3/2009 1:29 PM, Hans Hagen wrote:
 Lars Huttar wrote:

 But the hyphenation is by nature somewhat volatile, so whenever we
 change something we would like to be able to easily recheck the
 hyphenation.
 And our book is over 1200 pages, so it would be very helpful to have
 tools to make the checking more efficient.
 so, you only want to highlight hyphens?

 Yes. Especially hyphens introduced by TeX for line-breaking.
 
 in mkiv it probably takes me a couple of hours to implement such a feature
 
 Hans


Unfortunately at this point I believe we are restricted to mkii.


However, I have made progress implementing a tool like this in Adobe
javascript. The obstacle I am facing now is that the PDF (produced by
xdvipdfmx) is not configured to allow Adobe Reader users to manipulate
comments; thus my js code to add highlighting throws an exception.
If we had an Adobe Acrobat license it probably would not be a problem;
but our current reality is that we don't.
Does anyone know how to tell xdvipdfmx to enable commenting rights in
the PDF it creates? Or how to add these rights afterwards, without Adobe
Acrobat?

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] tool for reviewing hyphenation

2009-02-03 Thread Lars Huttar
On 2/3/2009 4:27 PM, Hans Hagen wrote:
 Lars Huttar wrote:
 On 2/3/2009 3:53 PM, Martin Schröder wrote:
 2009/2/3 Lars Huttar lars_hut...@sil.org:
 Does anyone know how to tell xdvipdfmx to enable commenting rights in
 the PDF it creates? Or how to add these rights afterwards, without
 Adobe
 Acrobat?
 This is not (legally) possible.
 http://en.wikipedia.org/wiki/Adobe_LiveCycle_Reader_Extensions

 Best
Martin

 OK, thanks for this explanation.

 Since what I want to do is really not about modifying the document but
 about displaying it differently, I wonder if there is a way to highlight
 parts of the document without requiring the right to manipulate
 comments. Maybe there's another PDF manipulation API I should be looking
 at. But that's probably beyond the scope of this list.
 
 i'm not talking of commenting, just processing it with non intrusive
 some option that will color the hyphens
 
 Hans
 

That sounds good! If it doesn't require us to move from mkii to mkiv...

We're in production, very close to being finished, and I don't think I
could convince the production manager that mkiv would be guaranteed to
produce exactly the same layout as mkii.

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] tool for reviewing hyphenation

2009-02-03 Thread Lars Huttar
On 2/3/2009 3:53 PM, Martin Schröder wrote:
 2009/2/3 Lars Huttar lars_hut...@sil.org:
 Does anyone know how to tell xdvipdfmx to enable commenting rights in
 the PDF it creates? Or how to add these rights afterwards, without Adobe
 Acrobat?
 
 This is not (legally) possible.
 http://en.wikipedia.org/wiki/Adobe_LiveCycle_Reader_Extensions
 
 Best
Martin

OK, thanks for this explanation.

Since what I want to do is really not about modifying the document but
about displaying it differently, I wonder if there is a way to highlight
parts of the document without requiring the right to manipulate
comments. Maybe there's another PDF manipulation API I should be looking
at. But that's probably beyond the scope of this list.

Cheers,
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] tool for reviewing hyphenation

2009-02-04 Thread Lars Huttar
On 2/4/2009 3:10 AM, Alan BRASLAU wrote:
 On Tuesday 03 February 2009 22:53:08 Martin Schröder wrote:
 2009/2/3 Lars Huttar lars_hut...@sil.org:
 Does anyone know how to tell xdvipdfmx to enable commenting rights in
 the PDF it creates? Or how to add these rights afterwards, without Adobe
 Acrobat?
 This is not (legally) possible.
 http://en.wikipedia.org/wiki/Adobe_LiveCycle_Reader_Extensions
 
 Welcome to the world of proprietary software.
 
 Some pdf viewers
 (such as okular on KDE, now also available on Windows and MacOS)
 allow annotations, but the data is saved in an auxiliary file.

Can you tell me where to find Okular for Windows? I read some rumors
that it was available, but http://okular.kde.org/download.php only gives
 instructions for compiling Okular, using a bunch of Linux packages.

 This can be exchanged with collegues, but is specific
 to the reader employed, thus limiting the portability (pdf).
 
 The advantage, however, is that all formats handled
 by the document viewer can be annotated, in principle...

Sounds good... is the annotation mechanism available via an API? Or do I
have to go through and highlight each hyphen by hand?

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] tool for reviewing hyphenation

2009-02-04 Thread Lars Huttar
On 2/4/2009 12:08 PM, Alan BRASLAU wrote:
 On Wednesday 04 February 2009 17:16:12 Lars Huttar wrote:
 Can you tell me where to find Okular for Windows? I read some rumors
 that it was available, but http://okular.kde.org/download.php only gives
  instructions for compiling Okular, using a bunch of Linux packages.
 
 http://windows.kde.org
 
 KDE on Windows is not in the final state, so applications can be unsuitable 
 for day to day use yet.
 
 I installed it without any problems and it appears to work.
 
 Alan
 

Thanks for the pointer. I look forward to trying this out.

In the meantime, I downloaded Adobe Acrobat Pro Trial version so that I
could test my javascript function that adds annotations.
I'm happy to report that it works... pretty well. It highlights only
words hyphenated over line breaks, not just all hyphens, and makes them
very visible. But you do need Acrobat Pro (or a PDF that's
comment-enabled via LiveCycle) to run it.

I'll try to post the javascript to the wiki, as it may be useful to
others, within its limitations.
The wiki page will be called
http://wiki.contextgarden.net/Reviewing_Hyphenation

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] Simplefonts

2013-10-14 Thread Lars Huttar
Hi Wolfgang,

I'm doing an overhaul of font handling in our large project, and
wondering whether I should switch to simplefonts at this point.

Can you tell me, how mature is simplefonts? Is it ready for heavy-duty,
complex production use?

Also, is it superceding the standard ConTeXt font handling? That is,
should I expect to find better help available from this list for issues
with simplefonts? Will new development be focused more on simplefonts?

Thanks,
Lars


On 10/10/2013 2:02 PM, Wolfgang Schuster wrote:
 Hi all,

 I’m happy to announce a new version of the simplefonts code. Thew new version 
 of the code
 is a complete rewrite and brings many changes.

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

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

[NTG-context] ConTeXt standalone - in what situations is it better?

2013-10-24 Thread Lars Huttar
Hello,
I was looking into simplefonts
(http://wiki.contextgarden.net/simplefonts) and noticed the clause

 if you’re running ConTeXt Standalone
 http://wiki.contextgarden.net/ConTeXt_Standalone (which is a better
 option)

Well I'm using TeXLive, but am happy to take good advice, so I looked at
http://wiki.contextgarden.net/ConTeXt_Standalone to see why it would be
a better option.
The basic reason I can see is that Standalone is updated more frequently.

So if you're using bleeding-edge features of ConTeXt (including recent
fixes to simplefonts?), I can see wanting to use Standalone and have
access to the latest features and fixes.

On the other hand, if you're working on a large production project that
has to be careful of stability, is there any advantage to Standalone
over TeXLive? Sure, you can keep a standalone version frozen in place,
but then that seems equivalent to staying with an existing version of
TeXLive.

The other issue for me with Standalone is that the only version listed
for Windows is W32TeX. When I go to the web page for that platform, I
don't see any information about what W32TeX is; just how to install it.
It sounds like it's specific to 32-bit systems, and mine is 64-bit. But
I suppose in that regard it's no different from TeXLive -- the
executables are 32-bit but they run fine on 64-bit systems.

Does anybody have advice for me on other reasons for switching from
TeXLive to ConTeXt Standalone, or reasons not to?

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


[NTG-context] installing a true-type font: can't find ttf2afm

2013-11-04 Thread Lars Huttar
Hi all,
I'm following the instructions at
http://wiki.contextgarden.net/Installing_a_TrueType_font,_step_by_step
because I want to install a TTF (Gentium in fact) for ConTeXt to use.
There is a warning that these instructions may be out of date, but I
haven't found anything newer.

This is under TeX Live 2013, the context scheme, and I've been using
ConTeXt mkiv.

I found texfont.pl, though it wasn't in the path, and managed to run it
in the directory where I have my .ttf files:
$ sudo PATH=$PATH
/usr/local/texlive/2013/texmf-dist/scripts/context/perl/texfont.pl
--ve=sil --co=gentium --makepath --install

But then I get errors about ttf2afm:

TeXFont 2.2.1 - ConTeXt / PRAGMA ADE 2000-2004

mktexlsr: Updating /usr/local/texlive/2013/../texmf-local/ls-R...
mktexlsr: Done.
   encoding vector : texnansi
   vendor name : sil
   source path : .
   font collection : gentium
   texmf font root : /usr/local/texlive/2013/../texmf-local
 map file name : texnansi-sil-gentium.map
   source path : .
  processing files : all on afm path
locating afm files : using pattern ./*.afm
locating afm files : using ttf files
   generating afm file : ./GentiumPlus-I.afm
sh: ttf2afm: command not found
   generating afm file : ./GentiumPlus-R.afm
sh: ttf2afm: command not found
 copying files : afm
 copying files : pfb
 copying files : ttf
   copying : GentiumPlus-I.ttf
   copying : GentiumPlus-R.ttf
processing aborted : no afm files found

--help : show some more info


I can't find ttf2afm anywhere. Is it part of pdfTex? Do I have to have
the pdftex scheme installed in order to install True-type fonts?

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


Re: [NTG-context] installing a true-type font: can't find ttf2afm

2013-11-04 Thread Lars Huttar
On 11/4/2013 3:34 PM, Mojca Miklavec wrote:
 - you can find Gentium at http://www.ctan.org/pkg/gentium-tug (also in
 TeX Live and in the ConTeXt distribution)

Thank you ... that was key information I didn't have.
I was instead downloading the TTF files from sil.org.

 - Gentium works out-of-the-box in ConTeXt (see the documentation of
 gentium-tug) 

When you say out of the box, I think you're referring to the
gentium-tug package box, not the ConTeXt box... in other words, I should
not expect Gentium to work just because I installed ConTeXt; I have to
also install gentium-tug, right?
If not, I must be doing something wrong because I can't find Gentium in
the luatex-cache font database.

 This is under TeX Live 2013, the context scheme, and I've been using
 ConTeXt mkiv.
 So why bother about pdfTeX?

Only because the latest instructions I could find said to use texfont,
which uses ttf2afm, which was missing and I thought it might come from
pdfTeX. I'm glad to know I don't have to, and I'll update that wiki page
accordingly.

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


Re: [NTG-context] installing a true-type font: can't find ttf2afm

2013-11-05 Thread Lars Huttar
On 11/4/2013 5:32 PM, Wolfgang Schuster wrote:
 Am 04.11.2013 um 22:56 schrieb Mojca Miklavec 
 mojca.miklavec.li...@gmail.com:

 That TTF should work as well. The only difference is that you might
 need slightly different commands to set it up (there were recent
 changes/improvements in that, other users should tell you how exactly
 that can be done). 

 Make your choice:

 \definefontfamily [gentium-basic] [serif] [Gentium Basic]
 \definefontfamily [gentium-book]  [serif] [Gentium Book Basic]
 \definefontfamily [gentium-plus]  [serif] [Gentium Plus]

 \starttext

 {\switchtobodyfont[gentium-basic]Upright \it Italic \bf Bold \bi BoldItalic}

 {\switchtobodyfont[gentium-book]Upright \it Italic \bf Bold \bi BoldItalic}

 {\switchtobodyfont[gentium-plus]Upright \it Italic \bf Bold \bi BoldItalic}

 \stoptext



Thanks for the suggestion.
I don't know if I'm doing something wrong, but when I try to compile the
above with mkiv, I get Undefined control sequence on line 1:

l.1 \definefontfamily

[gentium-basic] [serif] [Gentium Basic]


ConTeXt ver: 2013.05.28 00:36 MKIV current fmt: 2013.10.11 int:
english/english


Nor can I find \definefontfamily in the ref man or on the wiki.


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


Re: [NTG-context] installing a true-type font: can't find ttf2afm

2013-11-05 Thread Lars Huttar
On 11/5/2013 12:05 PM, Mojca Miklavec wrote:
 On Tue, Nov 5, 2013 at 5:08 PM, Lars Huttar  wrote:
 On 11/4/2013 5:32 PM, Wolfgang Schuster wrote:

 Make your choice:

 \definefontfamily [gentium-basic] [serif] [Gentium Basic]
 \definefontfamily [gentium-book]  [serif] [Gentium Book Basic]
 \definefontfamily [gentium-plus]  [serif] [Gentium Plus]

 \starttext

 {\switchtobodyfont[gentium-basic]Upright \it Italic \bf Bold \bi BoldItalic}

 {\switchtobodyfont[gentium-book]Upright \it Italic \bf Bold \bi BoldItalic}

 {\switchtobodyfont[gentium-plus]Upright \it Italic \bf Bold \bi BoldItalic}

 \stoptext
 Thanks for the suggestion.
 I don't know if I'm doing something wrong, but when I try to compile the
 above with mkiv, I get Undefined control sequence on line 1:

 l.1 \definefontfamily
 As I told you: there were recent changes/improvements in that.

 http://www.ntg.nl/pipermail/ntg-context/2013/075428.html

 You would need the ConTeXt distribution for that, TeX Live 2013 is too
 old. (You can probably still load the simplefonts module explicitly or
 write the typescripts yourself - again different syntax.)

 Mojca


Thanks again for your responses.

I did try loading the simplefonts module explicitly, but
definefontfamily is still undefined.

I'm working on a large, production project, and the deadline is too
close to risk using unstable releases. Is there a context release since
Wolfgang's new version of simplefonts, that has been declared stable?
Given that his new version came out less than a month ago, it seems
unlikely.

Maybe I can get TTFs working using mtxrun, as Hans suggested. It seems
to be working on Windows; I need to try the same on Linux with our
custom font.

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


Re: [NTG-context] installing a true-type font: can't find ttf2afm

2013-11-05 Thread Lars Huttar
On 11/4/2013 4:56 PM, Mojca Miklavec wrote:
 On Mon, Nov 4, 2013 at 10:46 PM, Lars Huttar wrote:
 On 11/4/2013 3:34 PM, Mojca Miklavec wrote:
 - you can find Gentium at http://www.ctan.org/pkg/gentium-tug (also in
 TeX Live and in the ConTeXt distribution)
 Thank you ... that was key information I didn't have.
 I was instead downloading the TTF files from sil.org.
 That TTF should work as well. The only difference is that you might
 need slightly different commands to set it up (there were recent
 changes/improvements in that, other users should tell you how exactly
 that can be done).

I will look for that, because it turns out that I still need to use a
TTF font. Gentium Plus does not include bold and bold-italic weights,
and Gentium Basic doesn't include all the characters ranges I need. We
have a customized version of Gentium Basic with bold weight, with an
extra character added, and it's a TTF. We had it working with mkii but
not yet with mkiv.

 When you say out of the box, I think you're referring to the
 gentium-tug package box, not the ConTeXt box... in other words, I should
 not expect Gentium to work just because I installed ConTeXt; I have to
 also install gentium-tug, right?
 The font is installed by default when installing the ConTeXt
 distribution. I thought it was also installed by default with the
 ConTeXt scheme in TeX Live, but apparently I was wrong. I can fix
 this. The scheme already contains a bunch of nice fonts and Gentium
 could/probably should be among them.


Just to confirm the above: After installing TeX Live context scheme on
Linux, Gentium was not in my names.tma. And when I tried to use
\setmainfont[Gentium], I got errors, 'simplefonts  font ''gentium'' not
found'. After installing the gentium-tug package (sudo
/usr/local/bin/tlmgr install gentium-tug), and compiling a .tex file
using \setmainfont[Gentium], the errors went away, and my names.tma now
includes several variants of Gentium. At no point did I run mtxrun
(knowingly).

On the other hand, on Windows, I had installed TeX Live context scheme
as well, and have not installed gentium-tug. But I did install Gentium
as an OS font (using TTF files). I then ran mtxrun --generate (as
suggested by Hans), and after that, gentium* showed up in names.tma, and
I was then able to successfully compile a .tex file using
\setmainfont[Gentium] with mkiv context. (But that didn't work before I
ran mtxrun --generate.)

Just a couple of data points in case they're relevant.

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


[NTG-context] setting size for mainfont or sansfont in stable simplefonts

2013-11-06 Thread Lars Huttar
Hello,

I'm using the simplefonts module from TeX Live 2013. (I can't use the
new simplefonts for this production project, due to stability requirements.)

I have the following, which works well for the most part:

\setupbodyfontenvironment[default][em=italic]

\usemodule[simplefonts][size=9.2pt]

\setmainfont[Gentium Book Basic]
\setsansfont[Tex Gyre Heros]


\starttext

Serif typeface: regular, {\em italic}, {\bf bold} and {\bf\em bold
italic} styles.


\ss Sans--serif typeface: regular, {\em italic}, {\bf bold} and {\bf\em
bold italic} styles.

\stoptext



Because the Tex Gyre Heros font is larger than Gentium Book Basic at a
given point size, when I compile this document, there is a size mismatch
between the serif and the sans typefaces. So I looked for a way to give
the sans font a smaller default size. I couldn't find an example of such
at http://wiki.contextgarden.net/simplefonts. I tried this:

\setsansfont[Tex Gyre Heros][size=8pt]

but it didn't seem to have any effect.

Is there a way to do what I'm trying to do? I could use
\switchtobodyfont[8pt] every time I go to sans, but I don't think that's
the intention of simplefonts.

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


Re: [NTG-context] setting size for mainfont or sansfont in stable simplefonts

2013-11-06 Thread Lars Huttar
On 11/6/2013 5:35 PM, Wolfgang Schuster wrote:
 Am 06.11.2013 um 23:27 schrieb Lars Huttar lars_hut...@sil.org:

 \setsansfont[Tex Gyre Heros][size=8pt]

 but it didn't seem to have any effect.
 \setsansfont[…][scale=0.95]

 Wolfgang


Thanks for the quick response!

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


[NTG-context] how to include sans, bold and size in \setuptab[headstyle=???]

2013-11-11 Thread Lars Huttar
Hello, I have the following MWE:
\starttext

\setuptab[headstyle=ssbfb]

\tab{foo} \input knuth \par

\stoptext


Here, the headstyle specifies a sans font with boldface style, at 1.44
times the current bodyfont size.


However, I want to be able to specify an absolute point size, instead of
a relative size.

I tried variations like

  \setuptab[headstyle=18pt]

but that has no effect: the size remains 12pt, or whatever the default is.

If I use
  \setuptab[headstyle={\switchtobodyfont[18pt]}]

then the size takes effect (for the key only, which is what I want).
I can combine that with sans:
  \setuptab[headstyle={\switchtobodyfont[ss, 18pt]}]

and that works.


But how to mix in boldface?
  \setuptab[headstyle={\switchtobodyfont[ssbf, 18pt]}]

doesn't give sans boldface, but reverts to a serif, non-bold style (at
18pt size).

  \setuptab[headstyle={\switchtobodyfont[ss, bf, 18pt]}]

gives the same results.


I finally tried

  \setuptab[headstyle={\ssbf \switchtobodyfont[18pt]}]

and that works! But it seems clunky: it looks like it requires two font
switches, which I'm told makes things slower.

And I can't help wondering if I'm missing some simpler way.
Is there a more efficient or elegant way to do this?


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


Re: [NTG-context] how to include sans, bold and size in \setuptab[headstyle=???]

2013-11-11 Thread Lars Huttar
On 11/11/2013 12:27 PM, Wolfgang Schuster wrote:
 Lars Huttar mailto:lars_hut...@sil.org
 11. November 2013 18:00
 I finally tried

 \setuptab[headstyle={\ssbf \switchtobodyfont[18pt]}]

 and that works! But it seems clunky: it looks like it requires two font
 switches, which I'm told makes things slower.

 And I can't help wondering if I'm missing some simpler way.
 Is there a more efficient or elegant way to do this?

 \definefont[BigBoldSans][SansBold at 18pt]

 \setuptab[headstyle=BigBoldSans]

OK, but in order to use this systematically, I would have to have a
\definefont for every potential combination of font style (serif/sans),
alternative (bold/italic/etc.), and size that will get used in the
document. In a large, complex book, that extra layer of indirection
seems unattractive. But maybe there's no better way to do it.

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


[NTG-context] syntax for \definesimplefont in TeX Live version of simplefonts

2013-11-14 Thread Lars Huttar
Hello,
We are using simplefonts, the version included with TeX Live 2013. As
mentioned in another email, we don't have the freedom to experiment with
potentially unstable versions.

I've been reading
http://wiki.contextgarden.net/simplefonts
and have it working well so far with the mainfont, sansfont, and
mainfontfallback.

The part I need help with is for using another font.
http://wiki.contextgarden.net/simplefonts#Defining_other_typefaces_and_fonts
says we can use

  * |\definesimplefont|, defines a font for the use in headers or other
style elements.
  * |\simplefont|, defines a font for inline use.

Can anyone tell me the syntax for these commands - and for using them?
I tried
 \definesimplefont[titleface][Gentium Basic]
 ...
 \setupbodyfont[titleface]

There are no complaints and the \definesimplefont line, but I don't know
if it's the right syntax. And the \setupbodyfont line is giving the warning
  fonts  typescripts  unknown library 'titleface'



So I'm guessing that the \definesimplefont line is correct, but I just
don't know how to use the defined font.


Help please?


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


Re: [NTG-context] syntax for \definesimplefont in TeX Live version of simplefonts

2013-11-14 Thread Lars Huttar
On 11/14/2013 11:35 AM, Aditya Mahajan wrote:
 On Thu, 14 Nov 2013, Lars Huttar wrote:

 I tried
 \definesimplefont[titleface][Gentium Basic]
 ...
 \setupbodyfont[titleface]

 So I'm guessing that the \definesimplefont line is correct, but I just
 don't know how to use the defined font.

 \titleface

So simple! facepalm

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


Re: [NTG-context] syntax for \definesimplefont in TeX Live version of simplefonts

2013-11-14 Thread Lars Huttar
On 11/14/2013 11:31 AM, Wolfgang Schuster wrote:
 Am 14.11.2013 um 16:42 schrieb Lars Huttar lars_hut...@sil.org:

 Hello,
 We are using simplefonts, the version included with TeX Live 2013. As
 mentioned in another email, we don't have the freedom to experiment with
 potentially unstable versions.

 I've been reading
 http://wiki.contextgarden.net/simplefonts
 and have it working well so far with the mainfont, sansfont, and
 mainfontfallback.

 The part I need help with is for using another font.
 http://wiki.contextgarden.net/simplefonts#Defining_other_typefaces_and_fonts
 says we can use

  * |\definesimplefont|, defines a font for the use in headers or other
style elements.
  * |\simplefont|, defines a font for inline use.

 Can anyone tell me the syntax for these commands - and for using them?
 I tried
 \definesimplefont[titleface][Gentium Basic]
 ...
 \setupbodyfont[titleface]

 There are no complaints and the \definesimplefont line, but I don't know
 if it's the right syntax. And the \setupbodyfont line is giving the warning
  fonts  typescripts  unknown library 'titleface'



 So I'm guessing that the \definesimplefont line is correct, but I just
 don't know how to use the defined font.
 The \definesimplefont command can be used when you want a certain font
 for the chapter, section etc. heading, e.g.

   \definesimplefont[ChapterFont][Gentium Basic][size=24pt]

   \setuphead[chapter][style=ChapterFont]

 but I don’t recommend this command anymore (and removed it from the new 
 version)
 because you can get the same result with a custom typeface, e.g.

   \definesimplefonttypeface[chapterfont][Gentium Basic]

   \definefont[ChapterFont][\classfont{chapterfont}{Serif} at 24pt]

   \setuphead[chapter][style=ChapterFont]


 When you want to change only the global font for your document you
 need the \definesimplefonttypeface command, e.g.

   \definesimplefonttypeface[documentfont][Gentium Basic]

   \setupbodyfont[documentfont]


 Wolfgang

Thanks, very helpful.
I will update the wiki page with this.

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


[NTG-context] simplefonts: defining a fallback for a non-main font

2013-11-14 Thread Lars Huttar
Hi again,

I'm using simplefonts (TeX Live 2013 version) and I have a main font:

\setmainfont[Gentium Book Basic]

and I can set a fallback for it,

\setmainfontfallback[Gentium Plus][range={ipaextensions}, force=yes,
rscale=auto]

and that works.


But then I have another font for the title:
\definesimplefont[titleface][Gentium Basic][size=40pt]


How do I set a fallback for it?

After looking at the source code for simplefonts, I tried:

% undefined cs: \definesimplefontfallback[titleface][Gentium
Plus][range={ipaextensions}, force=yes, rscale=auto]

% undefined cs: \fontfallback[titleface][Gentium
Plus][range={ipaextensions}, force=yes, rscale=auto]

% undefined cs: \definefallbackfont[titleface][Gentium
Plus][range={ipaextensions}, force=yes, rscale=auto]


But they all gave undefined control sequence errors.


I can work around the problem by setting the main font before the title,
using the main font for the title, and then changing the main font after
the title is done. But that seems kludgy.

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


Re: [NTG-context] simplefonts: defining a fallback for a non-main font

2013-11-14 Thread Lars Huttar
On 11/14/2013 5:06 PM, Wolfgang Schuster wrote:
 There is no support for this with the old version of the module.


OK, good to know. 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] simplefonts: defining a fallback for a non-main font

2013-11-15 Thread Lars Huttar
On 11/14/2013 5:06 PM, Wolfgang Schuster wrote:
 Am 14.11.2013 um 22:52 schrieb Lars Huttar lars_hut...@sil.org:

 ... But then I have another font for the title:
 \definesimplefont[titleface][Gentium Basic][size=40pt]


 How do I set a fallback for it?
 ...
 There is no support for this with the old version of the module.


For posterity, here is how I worked around it:

\usemodule[simplefonts]

% The main font for text:
\setmainfont[Gentium Book Basic]

\setmainfontfallback[Gentium Plus][range={ipaextensions}, force=yes,
rscale=auto]

% The font for the title:
\def\titlefont{Gentium Basic}

\starttext

% Temporarily change the main font, while keeping the main font fallback:
{ \setmainfont[\titlefont] \switchtobodyfont[40pt] Title with a fancy
ɠlyph }


% Back to our previously defined main font:

Body text ...

\stoptext


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

Re: [NTG-context] simplefonts: defining a fallback for a non-main font

2013-11-15 Thread Lars Huttar
On 11/15/2013 11:50 AM, Aditya Mahajan wrote:
 Just a minor improvement:

 On Fri, 15 Nov 2013, Lars Huttar wrote:

 % Temporarily change the main font, while keeping the main font
 fallback:
 { \setmainfont[\titlefont] \switchtobodyfont[40pt] Title with a fancy
 ɠlyph }

 Make that {\setmainfont[...] ... \endgraf}

 Otherwise, the interline space will not be calculated correctly.

Thanks. It actually didn't seem to make any difference, but I put it in.

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

[NTG-context] how to reduce \lineskiplimit in ConTeXt grid layout

2013-11-15 Thread Lars Huttar
As you know, in plain TeX, \lineskiplimit tunes the vertical glue
algorithm by specifying the minimum amount of space between the bottom
edge of one line and the top edge of the following line.

But in ConTeXt, it appears that \lineskiplimit is set to zero, at least
in grid mode.
We're using grid mode, and we have some occasional high ascenders, e.g.
capital letters with diacritics on top.
We have bodyfont size 8.1pt, and interlinespace = 9.3pt. We realize this
is less than the recommended ratio of 1.2.

Understandably, when those tall characters occur, we sometimes get a
blank line above them. It looks like the \lineskiplimit would be
violated if the 9.3pt interlinespace were enforced, so ConTeXt adds some
space (analogous to \lineskip in TeX?). But since we're on a grid, more
space has to be added in order to conform to the grid.

All that makes sense, but we would like to be able typeset the lines
closer together, and judge for ourselves whether it looks too bad. (When
we used to typeset the same text at 8.1pt/9.3pt using mkii, blank lines
did not occur.) Is there something similar to \lineskiplimit that we can
tweak? I've been reading section 5.5 Line Spacing in the context ref
manual, but I don't see anything there about changing a threshold
analogous to \lineskiplimit.

I tried setting \lineskiplimit=-2pt, but that caused a worse problem: a
blank line across both columns, instead of just one.

Thanks,
Lars
Version: mkiv luatex in Tex Live 2013.

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

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


  1   2   >