Re: [NTG-context] beta

2016-06-08 Thread Jan Tosovsky
On 2016-06-08 Hans Hagen wrote:
>
> This version has (experimental) support for color fonts. 
> ...
> svg one uses svg information from the font

Btw, SVG fonts were removed from SVG 2.0 and considered as a deprecated feature:

http://caniuse.com/#feat=svg-fonts
https://lists.w3.org/Archives/Public/www-svg/2013Jan/0030.html

Jan



___
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] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2016-06-29 Thread Jan Tosovsky
On 2016-06-29 Mojca Miklavec wrote:
> 
> I want to play with CNC and don't yet have any experience with CAD
> software (nor the licence for the expensive ones) other than perhaps
> some Blender, so I decided to try to use the super ugly route with
> metapost -> svg -> dxf -> g-code for the first time.

For simple shapes I'd choose Inkscape SVG editor, which can export to DXF 
directly. In settings you can customize the coords precision to reduce those 
fractions.

For more sophisticated designing I'd skip simple 2D CADs and use parametric 
tools instead (allowing to use equations instead of fixed values which 
simplifies future refactoring).

I'd recommend Autodesk Fusion, which is even free for enthusiasts:
https://knowledge.autodesk.com/support/fusion-360/troubleshooting/caas/sfdcarticles/sfdcarticles/How-to-activate-start-up-or-educational-licensing-for-Fusion-360.html

https://www.youtube.com/watch?v=VzqXo0d0W8s

Jan

___
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] Pretty print Ctx code into HTML

2016-08-24 Thread Jan Tosovsky
On 2016-08-24 Lukáš Procházka wrote:
> 
> does anybody know about a tool (maybe ConTeXt has something like this
> built-in) which would convert ConTeXt code into pretty-printed HTML
> code?

For HTML I'd also consider javascript highlighters
https://highlightjs.org/
http://prismjs.com/
http://alexgorbatchev.com/SyntaxHighlighter/

However, all need special configuration files, which are AFAIK not ready yet. 
They could be derived from TeX though (supported by the first one).

Anyway, adding ConteXt support for these libraries could be sort of ConTeXt 
project promotion ;-)

Jan


---
Tato zpráva byla zkontrolována na viry programem Avast Antivirus.
https://www.avast.com/antivirus

___
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] WYSIWYM editor on top of ConTeXt / Lout

2017-12-05 Thread Jan Tosovsky
On 2017-12-02 Jonas Baggett wrote:
> 
> This is a blog post I recently published:
> https://jonas17b.wixsite.com/monsite/home/wysiwym-editor-on-top-of-
> context-lout.
> It is about some ideas I have for a WYSIWYM editor like LyX, but it
> would be designed for using more than 1 backend (e.g. ConTeXt, Lout),
> and to give a much better user experience.

Visual editing of complex structures is hard to implement. For XML based 
publishing there is just single serious tool!
https://www.oxygenxml.com/xml_author/docbook_editor_structured_editing.html

Desktop is IMHO declining so I'd personally prefer a web app, which could be 
then packed even for desktop via https://electronjs.org/

While web frontend development was very fragmented in past, most developers 
nowadays prefer https://reactjs.org/ framework.

For visual editing an advanced rich text editor is a must. This one is really 
promising https://github.com/ianstormtaylor/slate as it can read/write custom 
scheme. Btw, it is used in https://github.com/GitbookIO/gitbook project. 
Mentioning Gitbook, it could also be a source of inspiration.

Regards,

Jan 










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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] WYSIWYM editor on top of ConTeXt / Lout

2017-12-06 Thread Jan Tosovsky
On 2017-12-06 Marcin Borkowski wrote:
> On 2017-12-06, at 00:01, Jan Tosovsky  wrote:
>> On 2017-12-02 Jonas Baggett wrote:
>>>
>>> This is a blog post I recently published:
>>> https://jonas17b.wixsite.com/monsite/home/wysiwym-editor-on-top-of-context-lout
>>> It is about some ideas I have for a WYSIWYM editor like LyX, but it
>>> would be designed for using more than 1 backend (e.g. ConTeXt, Lout),
>>> and to give a much better user experience.
>>
>> Visual editing of complex structures is hard to implement. For XML based
>> publishing there is just single serious tool!
>> https://www.oxygenxml.com/xml_author/docbook_editor_structured_editing.html
> 
> Strange nobody mentioned Org-mode!
> 
> Also, this:
> https://emacs.cafe/emacs/guest-post/2017/06/26/hierarchy.html (works
> with JSON OOTB, but most probably could be used to edit XML).

I meant visual editing (WYSIWYM), see e.g. 
https://www.youtube.com/watch?v=-3z2sYEaLHM 

Jan



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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Centered title with numeration on the same line

2013-06-04 Thread Jan Tosovsky
Dear All,

in MkIV when any title is centered, its numeration is placed on a separate
line above the title itself.

I'd expect inline formatting which could be overridden as described here
http://wiki.contextgarden.net/Titles

My code:

\setuplabeltext[en][chapter=Chapter~]

% while for chapter title this line break is handy (in my use case)
\setuphead[chapter][
alternative=middle,
style=\bfc,
conversion=Romannumerals,
numbercommand=\groupedcommand{\cap}{\blank[0.5cm]},
after={\blank[1cm]},
]

% for section it is inappropriate
\setuphead[section][
alternative=middle,
style=\bfa,
sectionsegments=section, % ignore component label
]

\starttext
\chapter{Foo}
\section{The First Section}
Text.
\stoptext

How can I keep numeration and title together?

Thanks,
Jan

___
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] Chapter numbering - applying several commands at once

2013-11-17 Thread Jan Tosovsky
Dear All,

in my book I'd like to precede my titles with the number formated as
'CHAPTER I.', e.g. roman numeral and all this small caped and also in bold
as the title itself.

In the following definition I can use either:
(1) \sc + \setcharactercasing - small caps + lowercased number (but not
bold)
(2) \smallcaps - bold small caps (but not lowercased number)
(3) \setcharactercasing - lowercased number (but not small caps)

Idealy I'd like to combine \smallcaps + \setcharactercasing, but this throws
an error.

I am also considering using just smaller font, but I am facing similar
problems as I cannot combine both the casing conversion and e.g. \bfb in
single \groupedcommand.

I prefer setting the upercased version of Romannumerals as I do not want
small roman literals in the TOC or bookmarks. Are there better ways to
accomplish this?

\definefontfamily[palatino][rm][Palatino Linotype][features={default,
quality}]
\setupbodyfont[palatino]

\setuplabeltext[en][chapter=chapter~]

\setuphead[chapter][
 alternative=middle,
 style=\bfc,
 conversion=Romannumerals,
 numbercommand=\groupedcommand{\sc
\setcharactercasing[word]}{.\blank[0.4cm]},
]

\setupcombinedlist[content][list=chapter, alternative=c]

\starttext
\completecontent
\chapter{Foo}text
\chapter{Bar}text
\stoptext


Thanks, Jan

___
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] ToC - right-alignment of roman numerals

2013-11-17 Thread Jan Tosovsky
On 2013-06-03 Marco Patzer wrote:
> On 2013–06–03 honyk wrote:
> 
> > in fresh MkIV I use the following commands for building ToC, but I
> > have no idea how to align the label (roman numeral) to the right.
> 
> The width setting needs to be applied to the chapter list, not the
> content list, see example
>
> \setuphead[chapter][conversion=Romannumerals]
> \setupheadnumber[chapter][48]
> 
> \setupcombinedlist
>   [content]
>   [alternative=c]
> 
> \setupcombinedlist
>   [chapter]
>   [distance=1em,
>width=1cm,
>numbercommand={\simplealignedbox{\listparameter{width}}{flushright}}
>   ]
> 
> \starttext
> \completecontent
> \chapter{Foo}
> \chapter{Bar}
> \stoptext
> 

Whereas this works for basic test cases, in my document it ends with an error:

structure   > sectioning > title @ level 2 : 0.0 -> \headtext {content}
! Argument of \147>flushright has an extra }.

How can I decode this message and fix the problematic location?

Thanks, Jan

___
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] Chapter numbering - applying several commands at once

2013-11-17 Thread Jan Tosovsky
On 2013-11-17 Wolfgang Schuster wrote:
> Am 17.11.2013 um 20:02 schrieb Jan Tosovsky:
> 
> > in my book I'd like to precede my titles with the number formated as
> > 'CHAPTER I.', e.g. roman numeral and all this small caped and also in
> > bold as the title itself.
> >
> Instead of small capitals for the chapter number you can use capitals
> in combination with a smaller font size.
> 
> \setuplabeltext[en][chapter=Chapter~]
> 
> \setuphead
>   [chapter]
>   [alternative=middle,
>style=\bfc,
>numberstyle={\setcharactercasing[WORD]\kerncharacters[0.125]\bfa},
>numbercommand=\groupedcommand{}{\blank[4mm]},
>sectionstopper={.},
>inbetween={\blank[4mm]},
>conversion=Romannumerals]

I must admit this looks much better! Thanks.

The same approach can be used also for small caps, but the result is not so
appealing. Especially I don't like the size of the 'stopper' (dot).

Btw, that case conversion can be eliminated using
\setuplabeltext[en][chapter=CHAPTER~]

Jan

___
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] ToC - right-alignment of roman numerals

2013-11-18 Thread Jan Tosovsky
On 2013-11-17 Jan Tosovsky wrote:
> On 2013-06-03 Marco Patzer wrote:
> > On 2013–06–03 honyk wrote:
> >
> > > in fresh MkIV I use the following commands for building ToC, but I
> > > have no idea how to align the label (roman numeral) to the right.
> >
> > The width setting needs to be applied to the chapter list, not the
> > content list, see example
> >
> > \setuphead[chapter][conversion=Romannumerals]
> > \setupheadnumber[chapter][48]
> >
> > \setupcombinedlist
> >   [content]
> >   [alternative=c]
> >
> > \setupcombinedlist
> >   [chapter]
> >   [distance=1em,
> >width=1cm,
> >numbercommand={\simplealignedbox{\listparameter{width}}{flushright}}
> >   ]
> >
> > \starttext
> > \completecontent
> > \chapter{Foo}
> > \chapter{Bar}
> > \stoptext
> >
> 
> Whereas this works for basic test cases, in my document it ends with an
> error:
> 
> structure   > sectioning > title @ level 2 : 0.0 -> \headtext
> {content}
> ! Argument of \147>flushright has an extra }.

There was a missing comma after the numbercommand parameter! Strange...

Jan

___
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] ToC - right-alignment of roman numerals

2013-11-18 Thread Jan Tosovsky
> On 2013–06–03 honyk wrote:
> in fresh MkIV I use the following commands for building ToC, but I
> have no idea how to align the label (roman numeral) to the right.

I am almost there, but things get complicated when chapters are combined with 
preface/index titles without numbering and thus aligned improperly:

\setupcombinedlist[content][list=chapter, alternative=c]
\setupcombinedlist[chapter][
   distance=1em,
   width=1cm,
   numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]

\starttext
\completecontent

\startfrontmatter
\chapter{Preface}text
\stopfrontmatter

\startbodymatter
\chapter{Chapter}text\index{primary}
\stopbodymatter

\startbackmatter
\completeindex
\stopbackmatter

\stoptext

Is there any way how to indent these non-numbered titles so that they start 
where the chapter title starts?

Thanks, Jan

___
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] PDF bookmarks - incorrect titles for registers

2013-11-18 Thread Jan Tosovsky
Dear All,

when I specify custom titles for my registers, they are ignored in
bookmarks:

\setupinteraction[state=start]
\placebookmarks[chapter]
\setupinteractionscreen[option=bookmark]

\defineregister[indexname][indexnames]
\defineregister[indexsubject][indexsubjects]
\setupheadtext[indexname=Name Index]
\setupheadtext[indexsubject=Subject Index]

\starttext
\completecontent
\chapter{Chapter}text\indexname{primary}\indexsubject{primary}
\startbackmatter
\completeindexname
\completeindexsubject
\stopbackmatter
\stoptext

Is it necessary to switch something else on?

Thanks, Jan

ConTeXt 2013.11.14 & Win 7

___
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] Space before chapters

2013-11-19 Thread Jan Tosovsky
Dear All,

after two hours of investigating wiki and various commands I am giving up...

Is there any way to set a bit of white space before my chapter title?

(1) I've thought that before={\blank[20mm]} should do the job. It works for
sections, but here I suspect it is ignored as my chapter start on a new
page.

(2) numbercommand=\groupedcommand{\blank[20mm]}{\blank[4mm]} - this works as
expected, but only for numbered titles - I need it also for TOC and Preface.

(3) commandbefore={\blank[20mm]} - it inserts the space between the number
and title 

I have no idea what else to try...

\setuphead[chapter][
   alternative=middle,
   %before={\blank[20mm]},
   %commandbefore={\blank[20mm]},
   numbercommand=\groupedcommand{\blank[20mm]}{\blank[4mm]},
   %numbercommand=\groupedcommand{}{\blank[4mm]},
]

\starttext
\startfrontmatter
\chapter{Intro}text
\startfrontmatter
\startbodymatter
\chapter{Chapter}text
\stopbodymatter
\stoptext

Any help is highly appreciated. 

Thanks, Jan

ConTeXt 2013.11.14 & Win 7

___
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] Linespacing in TOC

2013-11-19 Thread Jan Tosovsky
Dear All,

I'd like to tweak a default TOC linespacing...

I've 'invented' this:

\setupcombinedlist[content][list=chapter, alternative=c]

\starttext

\title{Table of Contents}
\setupinterlinespace[line=0.8ex] % too small, just for testing
\placecontent
\setupinterlinespace[line=2.75ex]
%\setupinterlinespace[reset]

\startfrontmatter
\chapter{Intro}text

text

text
\startfrontmatter
\startbodymatter
\chapter{Chapter}text
\stopbodymatter
\startbackmatter
\chapter{Appendix}text
\stopbackmatter
\stoptext

I cannot use simply the \completecontent command as the linespacing is
effective already between the title and the first entry line... so I am
splitting the title and the rest and set the linespacing just before list
rendering. Finally I am resetting the value manually. The 'reset' keyword
seems to be somehow ignored...

Are there better ways to tweak linespacing in TOC ?

Thanks, Jan

___
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] Space before chapters

2013-11-19 Thread Jan Tosovsky
On 2013-11-19 Hans Hagen wrote:
> On 11/19/2013 9:24 PM, Jan Tosovsky wrote:
> >
> > Is there any way to set a bit of white space before my chapter title?
> >
> > (1) I've thought that before={\blank[20mm]} should do the job. It
> > works for sections, but here I suspect it is ignored as my chapter 
> > start on a new page.
> >
> 
> before={\blank[force,20mm]},
> 
> whitespace at the top of a page is discarded otherwise

I was hoping there is a simple option for this (any counterpart to XSL-FO
space-before.conditionality="retain" property)... And it is :-)

Thanks for a quick response. I'll keep this in mind.
 
Jan

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

2013-11-20 Thread Jan Tosovsky
On 2013-11-20 Bill Meahan wrote:
> On 11/20/2013 8:59 AM, Aditya Mahajan wrote:
> >
> > As far as ConTeXt is concerned, you can process the above XML quite
> > easily. Come to think of it, it may be a useful to provide a module
> > that maps HTML5 to PDF.
> >
> 
> I would vote for that approach. It is pretty much analogous to what I
> have decided to do. I'm doing my actual writing in HTML. creating CSS
> for ebooks and ConTeXt environment files for PDF.
> ...
> 
> My needs are much simpler than the majority of people on this list. I
> have no need for math, no need for indexes, no need for bibliographies,
> footnotes or citations. BUT I want really top-notch visual output
> whether in PDF or printed on dead trees. 

This is exactly my situation ;-)

Two outputs ideally from the same data. But thanks to my XML background and
experience in the single source publishing it was clear from the very
beginning that I need a well structured and also semantically rich
vocabulary like DocBook.

Generating ePub3 outputs is very straighforward (things gets complicated
when you need customize it). It is same for PDF outputs. These outputs are
generated using XSL-FO processors. But to be honest, outputs are not so
visually appealing as they lack many microtypographic features (expansion,
hanging punctuation etc).

This is the reason why I do a noise here in this forum.

There is a db-context tool (set of XSLT stylesheets):
http://dblatex.sourceforge.net/releases/download.html

It can convert DocBook XML into the ConTeXt source. I do some direct (local)
changes into it to avoid manual post-processing (which gets lost with every
generating - I still do some corrections in my source).

This solution requires some experience in XML processing, but I encourage
anybody who need multiple outputs from a single data to investigate it a
bit. It is so powerfull ;-)

Jan



___
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] Footnote line position

2013-11-22 Thread Jan Tosovsky
Dear All,

when a single line footnote is used, the footnote divider is rendered in
larger distance than for footnotes with two or more lines (I mean a gap
between the line and the footnote text). Initially I though there must be an
'empty' paragraph in my footnote but looking into the source it turned out
to be a false alarm as it seems to be consistent. It can be tested easily: 

\chapter{Chapter}Foo\footnote{Bar}.
\chapter{Chapter}Foo\footnote{Bar

Bar}.

Is this behaviour deliberate?

Thanks, Jan

ConTeXt 2013.11.14 & Win 7

___
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] Linespacing in TOC

2013-11-22 Thread Jan Tosovsky
On 2013-11-20 Hans Hagen wrote:
> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
> >
> > I'd like to tweak a default TOC linespacing...
> >
> > I've 'invented' this:
> >
> > \setupcombinedlist[content][list=chapter, alternative=c]
> >
> > \starttext
> >
> > \title{Table of Contents}
> > \setupinterlinespace[line=0.8ex] % too small, just for testing
> > \placecontent
> > \setupinterlinespace[line=2.75ex]
> > %\setupinterlinespace[reset]
> >
> > \startfrontmatter
> > \chapter{Intro}text
> >
> > text
> >
> > text
> > \startfrontmatter
> > \startbodymatter
> > \chapter{Chapter}text
> > \stopbodymatter
> > \startbackmatter
> > \chapter{Appendix}text
> > \stopbackmatter
> > \stoptext
> >
> > I cannot use simply the \completecontent command as the linespacing
> > is effective already between the title and the first entry line... 
> > so I am splitting the title and the rest and set the linespacing 
> > just before list rendering. Finally I am resetting the value manually.
> >
> > Are there better ways to tweak linespacing in TOC ?
> 
> \title{Table of Contents}
> 
> \start
>  \setupinterlinespace[line=0.8ex] % too small, just for testing
>  \placecontent
> \stop

Thanks for the hint. 

But as I found, any value below 2.8ex causes interline inconsistencies when
special cases appears, see the extreme below:

\starttext
\start
\setupinterlinespace[line=1.0ex]
\placecontent
\stop
\chapter{}. % line without descenders precedes a line without
ascenders
\chapter{}. % line with descenders is followed with a line with
ascenders
\chapter{}. % the result is an inconsistent baseline distance
\stoptext

Is there any remedy for this? Can I fix the baseline distance somehow?

I have such cases in my TOC :-( 
(but not so extreme as here)

Thanks, Jan

___
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] Paragraph - the last line handling

2013-11-22 Thread Jan Tosovsky
Hello Everyone,

in my document there are lot of cases when the last line in the paragraph
has a very narrow gap on the right (case 1 below). I understand it is
sometimes difficult to squeeze characters to the desired lenght (case 2)
without any impact to the final quality, but this looks very unnatural now
(besides all other lines, which are nicely typeset keeping the optical edge
on the right).

Is it possible to somehow define that under a certain limit the line will be
expanded to the end (case 3)? 

    (1)
xx
x
    (2)
xx

    (3)
xx
xx

I use the following setup now:

\setupalign[hz, hanging]
\setuptolerance[verystrict] % even 'strict' doesn't help here
\setupindenting[medium, yes]

Any idea?

Thanks, Jan

___
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] Linespacing in TOC

2013-11-22 Thread Jan Tosovsky
On 2013-11-22 Hans Hagen wrote:
> On 11/22/2013 9:44 PM, Jan Tosovsky wrote:
> > On 2013-11-20 Hans Hagen wrote:
> >> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
> >>>
> >>> I'd like to tweak a default TOC linespacing...
> >>>
> >> \title{Table of Contents}
> >>
> >> \start
> >>   \setupinterlinespace[line=0.8ex] % too small, just for testing
> >>   \placecontent
> >> \stop
> >
> > But as I found, any value below 2.8ex causes interline
> > inconsistencies when
> > special cases appears, see the extreme below:
> >
> > \starttext
> > \start
> > \setupinterlinespace[line=1.0ex]
> > \placecontent
> > \stop
> > \chapter{}. % line without descenders precedes a line without
> > ascenders
> > \chapter{}. % line with descenders is followed with a line
> > with ascenders
> > \chapter{}. % the result is an inconsistent baseline distance
> > \stoptext
> >
> > Is there any remedy for this? Can I fix the baseline distance
> > somehow?
> >
> 
> \definegridsnapping[crap] [fit,0.2]
> \setuplayout[grid=crap]

This helps! But... it breaks something else :-(

I am confused a bit. 

What exactly the linespacing is doing? It can set the baseline distance
(line=...), but it is not handled correctly? Is that snapping a workaround
for this deficiency of a standard solution?

All lines in my book have a certain (default) linespacing.
TOC entries are rendered (by default) using bigger linespacing.

I just wanted to make that TOC distance smaller a bit. Is this really the
only solution?

\definegridsnapping[crap] [fit] % what was that magic number 0.2 ?
\setuplayout[grid=crap]

\start
\setupinterlinespace[line=2.2ex]
\placecontent
\stop

It works. But that snapping is set globally and it breaks whitespace
handling in other parts of my document... It even produces widows/orphans
what I haven't seen before.

Just smaller gap between TOC lines, just that ;-)

Thanks in advance, Jan

___
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] Linespacing in TOC

2013-11-23 Thread Jan Tosovsky
On 2013-11-23 Jan Tosovsky wrote:
> On 2013-11-22 Hans Hagen wrote:
> > On 11/22/2013 9:44 PM, Jan Tosovsky wrote:
> > > On 2013-11-20 Hans Hagen wrote:
> > >> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
> > >>>
> > >>> I'd like to tweak a default TOC linespacing...
> > >>>
> > >> \title{Table of Contents}
> > >>
> > >> \start
> > >>   \setupinterlinespace[line=0.8ex]
> > >>   \placecontent
> > >> \stop
> > >
> > > But as I found, any value below 2.8ex causes interline
> > > inconsistencies when
> > > special cases appears, see the extreme below:
> > >
> > > \starttext
> > > \start
> > > \setupinterlinespace[line=1.0ex]
> > > \placecontent
> > > \stop
> > > \chapter{}. % line without descenders
> > > \chapter{}. % line with descenders
> > > \chapter{}. % the result is an inconsistent baseline
> > > \stoptext
> > >
> > > Is there any remedy for this? Can I fix the baseline distance
> > > somehow?
> > >
> >
> > \definegridsnapping[crap] [fit,0.2]
> > \setuplayout[grid=crap]
> 
> This helps! But... it breaks something else :-(

I've finally found an acceptable solution.

During my tests I found a crucial difference between:

\setupinterlinespace[line=2.0ex]

and 

\setupinterlinespace[0.25]

The latter sets the baseline distance correctly even without that
problematic snapping to the grid!

> All lines in my book have a certain (default) linespacing.
> TOC entries are rendered (by default) using bigger linespacing.

Btw, is there any option to override a default (huge) TOC linespacing? I
still consider my solution rather a hack.

Regards, Jan

___
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] Linespacing in TOC

2013-11-23 Thread Jan Tosovsky
On 2013-11-23 Hans Hagen wrote:
> On 11/23/2013 12:16 PM, Jan Tosovsky wrote:
> > On 2013-11-23 Jan Tosovsky wrote:
> >> On 2013-11-22 Hans Hagen wrote:
> >>> On 11/22/2013 9:44 PM, Jan Tosovsky wrote:
> >>>> On 2013-11-20 Hans Hagen wrote:
> >>>>> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
> >>>>>>
> >>>>>> I'd like to tweak a default TOC linespacing...
> >>>>>>
> >>>>> \title{Table of Contents}
> >>>>>
> >>>>> \start
> >>>>>\setupinterlinespace[line=0.8ex]
> >>>>>\placecontent
> >>>>> \stop
> >>>>
> >>>> But as I found, any value below 2.8ex causes interline
> >>>> inconsistencies when
> >>>> special cases appears, see the extreme below:
> >>>>
> >>>> \starttext
> >>>> \start
> >>>> \setupinterlinespace[line=1.0ex]
> >>>> \placecontent
> >>>> \stop
> >>>> \chapter{}. % line without descenders
> >>>> \chapter{}. % line with descenders
> >>>> \chapter{}. % the result is an inconsistent baseline
> >>>> \stoptext
> >>>>
> >>>> Is there any remedy for this? Can I fix the baseline distance
> >>>> somehow?
> >>>>
> >>>
> >>> \definegridsnapping[crap] [fit,0.2]
> >>> \setuplayout[grid=crap]
> >>
> >> This helps! But... it breaks something else :-(
> >
> > I've finally found an acceptable solution.
> >
> > During my tests I found a crucial difference between:
> >
> > \setupinterlinespace[line=2.0ex]
> >
> > and
> >
> > \setupinterlinespace[0.25]
> >
> > The latter sets the baseline distance correctly even without that
> > problematic snapping to the grid!
> >
> >> All lines in my book have a certain (default) linespacing.
> >> TOC entries are rendered (by default) using bigger linespacing.
> >
> > Btw, is there any option to override a default (huge) TOC
> linespacing? I
> > still consider my solution rather a hack.
> 
> just set 'before' and 'after'

Ok. I haven't realize that.

> normally linespacing in the toc is the same as in the rest of the
> document unless one has assigned to before/after

This example shows different behaviour:

\showgrid
\starttext
\start
\placecontent
\stop
\chapter{}Foo

Bar
\chapter{}.
\chapter{}.
\stoptext

On my computer the TOC linespacing is almost twice as big as that in the
paragraph.

Jan

___
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] Eliminating orphans/widows when grid is on

2013-11-23 Thread Jan Tosovsky
Dear All,

when the grid is switched on in my document, there are lots of orphan and
widows in the output. 

\setuplayout[grid=yes] % grid=tolerant doesn't help

According to the manual the grid typesetting is a solely ConTeXt feature not
available in the core TEX. Is it production ready? Are there any options to
handle o/w correctly?

Thanks, Jan

___
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] Linespacing in TOC

2013-11-23 Thread Jan Tosovsky
On 2013-11-23 Hans Hagen wrote:
> On 11/23/2013 1:44 PM, Jan Tosovsky wrote:
> > On 2013-11-23 Hans Hagen wrote:
> >>
> >> normally linespacing in the toc is the same as in the rest of the
> >> document unless one has assigned to before/after
> >
> > This example shows different behaviour:
> >
> > \showgrid
> > \starttext
> > \start
> > \placecontent
> > \stop
> > \chapter{}Foo
> >
> > Bar
> > \chapter{}.
> > \chapter{}.
> > \stoptext
> >
> > On my computer the TOC linespacing is almost twice as big as that in
> > the paragraph.
> 
> if the grid is on that can indeed be the case but only if there are
> lines with > lineheight so that's why you can use less strict options
> (older mails)

Yes, it is true, but in my example the grid is not activated, just shown to
compare differences...



___
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] Paragraph - the last line handling

2013-11-23 Thread Jan Tosovsky
On 2013-11-23 Hans Hagen wrote:
> On 11/22/2013 11:07 PM, Jan Tosovsky wrote:
> >
> > in my document there are lot of cases when the last line in the
> > paragraph has a very narrow gap on the right. 
> 
> \hsize 15.4cm
> 
> \input tufte
> 
> \parfillskip30pt plus 1 fill  \input tufte

Wow, exactly! Thanks a lot.

Sorry for a dumb question, but is there any way how to use it globally for
all paragraphs in my document?

Thanks, Jan

___
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] Index entries - custom font size

2013-11-23 Thread Jan Tosovsky
On 2013-11-16 Jan Tosovsky wrote:
> there are lot of index entries in my document and with the standard
> body font size they occupy too much space. I've tried to decrease 
> the size by the textstyle parameter. It works, but it is applied 
> recursively to every nested level: secondary items are smaller twice 
> and tertiary items three times...
> 
> \setupregister[index][command=\Word, textstyle=small]
> \starttext
> \index{primary}\index{primary+secondary}\index{primary+secondary+tertia
> ry}Text
> \completeindex
> \stoptext
> 

The following code switches the font size for all the index content. Even
for group titles (letters), but it is beneficial here. The index title is
split to keep the original size.

\startbackmatter
\chapter{Index}
\start
\switchtobodyfont[8pt]
\placeindex
\stop
\stopbackmatter

Jan

___
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] Paragraph - the last line handling

2013-11-23 Thread Jan Tosovsky
On 2013-11-23 Hans Hagen wrote:
> On 11/23/2013 2:43 PM, Jan Tosovsky wrote:
> > On 2013-11-23 Hans Hagen wrote:
> >> On 11/22/2013 11:07 PM, Jan Tosovsky wrote:
> >>>
> >>> in my document there are lot of cases when the last line in the
> >>> paragraph has a very narrow gap on the right.
> >>
> >> \hsize 15.4cm
> >>
> >> \input tufte
> >>
> >> \parfillskip30pt plus 1 fill  \input tufte
> >
> > Sorry for a dumb question, but is there any way how to use it
> > globally for all paragraphs in my document?
> 
> no, as i need to think of a decent interface to that (so remind me in a
> few months)

Ok. And is there any temporary hack like redefining \par macro on my side?
I've stumbled upon macro redefining somewhere, but I have no idea if this
case is doable this way. I am still newbie in the TeX world...

Jan

___
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] [***SPAM***] Eliminating orpans in the Index

2013-11-23 Thread Jan Tosovsky
Hello Everyone,

in my two-column index there are several cases when the last entry in the
given letter group overflows to the next column/page. In the extreme case it
is just the last page reference. Can I somehow prevent this? E.g. keep at
least two/three index entries together when the overflowing is triggered?
And always keep all the page references together?

Additionaly, columns are not balanced properly in all cases. When the first
is longer, it is not a big problem. But the opposite case looks weird.

Can I influence this behaviour?

Thanks, Jan

PS: Grid is not activated.

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

2013-11-24 Thread Jan Tosovsky
Dear All, 

is it possible to get the complete representation of the layout that is
processed in the luatex PDF generator?

I mean coordinations of individual text boxes, their dimensions etc.

In e.g. XSL-FO processors it is provided in the XML based formats:

http://www.renderx.com/reference.html#IntermediateFormatSpecification
http://xmlgraphics.apache.org/fop/1.1/intermediate.html

Actually, I'd like to retrieve the page number and vertical position of my
object with a specific id (reference) to be able to perform PDF
post-processing.

Is DVI way to go? How can I get it in MkIV?

Thanks, Jan

___
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] ToC - right-alignment of roman numerals

2013-11-24 Thread Jan Tosovsky
On 2013-11-18 Jan Tosovsky wrote:
> > On 2013–06–03 Jan Tosovsky wrote:
> > in fresh MkIV I use the following commands for building ToC, but I
> > have no idea how to align the label (roman numeral) to the right.
> 
> I am almost there, but things get complicated when chapters are
> combined with preface/index titles without numbering and thus aligned
> improperly:
> 
> \setupcombinedlist[content][list=chapter, alternative=c]
> \setupcombinedlist[chapter][
>distance=1em,
>width=1cm,
> 
> numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
> ]
> 
> \starttext
> \completecontent
> 
> \startfrontmatter
> \chapter{Preface}text
> \stopfrontmatter
> 
> \startbodymatter
> \chapter{Chapter}text\index{primary}
> \stopbodymatter
> 
> \startbackmatter
> \completeindex
> \stopbackmatter
> 
> \stoptext
> 
> Is there any way how to indent these non-numbered titles so that they
> start where the chapter title starts?

I've fixed it by applying a margin to everything and setting a negative width 
to the numbers (distance = -width):

\setupcombinedlist[chapter][
   distance=0.5cm,
   width=-0.5cm,
   margin=2cm,
   numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]

I don't know exactly why it works, but it works :-)

Jan

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

2013-11-25 Thread Jan Tosovsky
On 2013-11-25 Hans Hagen wrote:
> On 11/24/2013 8:32 PM, Jan Tosovsky wrote:
> >
> > is it possible to get the complete representation of the layout that
> > is processed in the luatex PDF generator?
> >
> > I mean coordinations of individual text boxes, their dimensions etc.
> >
> > Actually, I'd like to retrieve the page number and vertical position
> > of my object with a specific id (reference) to be able to perform PDF
> > post-processing.
> 
> \starttext
> 
>  we are here: \setposition{crap}(\MPx{crap},\MPy{crap})
> 
> \stoptext

Thanks! Looks promising, Actually I'd like to print it into a log or
somewhere else, not into the document itself. But I need also the page
number. Every record should be ideally in the form: ID;page-number;Y-coord.

> > Is DVI way to go? How can I get it in MkIV? 

I've found that luatex can optionally output DVI [1], but I cannot find any
ConTeXt commandline switch to change the output format from PDF to something
else...

Thanks, Jan

___
[1]
http://tex.stackexchange.com/questions/42216/which-tex-programs-produce-dvi-
output


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

2013-11-25 Thread Jan Tosovsky
On 2013-11-25 Aditya Mahajan wrote:
> >> On 11/24/2013 8:32 PM, Jan Tosovsky wrote:
> >>>
> >>> is it possible to get the complete representation of the layout
> >>> that is processed in the luatex PDF generator?
> >>>
> >>> I mean coordinations of individual text boxes, their dimensions
> >>> etc.
> >>>
> >>> Actually, I'd like to retrieve the page number and vertical
> >>> position of my object with a specific id (reference) to be able 
> >>> to perform PDF post-processing.
> >>
> 
> \setposition{id}
> \message{id:\MPp{id};\MPy{id};\MPx{id}}
> 
> should work (untested). Then you can parse the log file.

This is coool!

Is there any documentation to all this stuff? I cannot find anything in Wiki
or User Guide...

Jan

___
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] ToC - right-alignment of roman numerals

2013-11-25 Thread Jan Tosovsky
On 2013-11-25 Hans Hagen wrote:
> On 11/24/2013 10:49 PM, Jan Tosovsky wrote:
> > On 2013-11-18 Jan Tosovsky wrote:
> >>> On 2013–06–03 Jan Tosovsky wrote:
> >>>
> >>> in fresh MkIV I use the following commands for building ToC, but I
> >>> have no idea how to align the label (roman numeral) to the right.
> >>
> >> I am almost there, but things get complicated when chapters are
> >> combined with preface/index titles without numbering and thus
> >> aligned improperly:
> >>
> >> \setupcombinedlist[content][list=chapter, alternative=c]
> >> \setupcombinedlist[chapter][
> >> distance=1em,
> >> width=1cm,
> >>
> numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
> >> ]
> >>
> >> \starttext
> >> \completecontent
> >>
> >> \startfrontmatter
> >> \chapter{Preface}text
> >> \stopfrontmatter
> >>
> >> \startbodymatter
> >> \chapter{Chapter}text\index{primary}
> >> \stopbodymatter
> >>
> >> \startbackmatter
> >> \completeindex
> >> \stopbackmatter
> >>
> >> \stoptext
> >>
> >> Is there any way how to indent these non-numbered titles so that
> >> they start where the chapter title starts?
> >
> > I've fixed it by applying a margin to everything and setting a
> > negative width to the numbers (distance = -width):
> >
> > \setupcombinedlist[chapter][
> > distance=0.5cm,
> > width=-0.5cm,
> > margin=2cm,
> >
> numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
> > ]
> >
> > I don't know exactly why it works, but it works :-)
> >
> 
> \setupcombinedlist
>[content]
>[list=chapter,
> alternative=c]
> 
> \setuplist
>[chapter]
>[aligntitle=yes,
> distance=1em,
> width=1cm]
> 

Thanks for this alternative, but I am getting something different. Desired 
output can be produced with this code:

\setuphead[chapter][conversion=Romannumerals]
%\setupheadnumber[chapter][48] % this is ignored when a preface is defined
\setupcombinedlist[content][alternative=c]
\setupcombinedlist[chapter][
   distance=1em,
   width=-1em,
   margin=15mm,
   numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]

\starttext
\completecontent

\startfrontmatter
\chapter{Preface}
\stopfrontmatter

\startbodymatter
\chapter{Chapter1}
\chapter{Chapter2}
\chapter{Chapter3}
\chapter{Chapter4}
\stopbodymatter

\stoptext
If there is a less cumbersome method, thanks for sharing.

Jan

___
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] PDF bookmarks - incorrect titles for registers

2013-11-26 Thread Jan Tosovsky
On 2013-11-18 Jan Tosovsky wrote:
> 
> when I specify custom titles for my registers, they are ignored in
> bookmarks:
> 
> \setupinteraction[state=start]
> \placebookmarks[chapter]
> \setupinteractionscreen[option=bookmark]
> 
> \defineregister[indexname][indexnames]
> \defineregister[indexsubject][indexsubjects]
> \setupheadtext[indexname=Name Index]
> \setupheadtext[indexsubject=Subject Index]
> 
> \starttext
> \completecontent
> \chapter{Chapter}text\indexname{primary}\indexsubject{primary}
> \startbackmatter
> \completeindexname
> \completeindexsubject
> \stopbackmatter
> \stoptext
> 
> Is it necessary to switch something else on?

According to the proposed solution at
http://tracker.luatex.org/view.php?id=865

it can be switched on using this magic formula
\enabledirectives[references.bookmarks.preroll]

What is the correct usage of this? And are there any details why it is
required and what exactly it does?

When it is added to the beginning of my example, it returns an error:
attempt to call field 'boxtostring' (a nil value)

But to be honest, I'd expect setting this flag internally by default as I
cannot imagine any use case where the index ID should be preferred in favor
of the title...

Jan

___
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] PDF bookmarks - incorrect titles for registers

2013-11-26 Thread Jan Tosovsky
On 2013-11-26 Hans Hagen wrote:
> On 11/26/2013 8:03 PM, Jan Tosovsky wrote:
> > On 2013-11-18 Jan Tosovsky wrote:
> >>
> >> when I specify custom titles for my registers, they are ignored in
> >> bookmarks:
> >>
> >> \setupinteraction[state=start]
> >> \placebookmarks[chapter]
> >> \setupinteractionscreen[option=bookmark]
> >>
> >> \defineregister[indexname][indexnames]
> >> \defineregister[indexsubject][indexsubjects]
> >> \setupheadtext[indexname=Name Index]
> >> \setupheadtext[indexsubject=Subject Index]
> >>
> >> \starttext
> >> \completecontent
> >> \chapter{Chapter}text\indexname{primary}\indexsubject{primary}
> >> \startbackmatter
> >> \completeindexname
> >> \completeindexsubject
> >> \stopbackmatter
> >> \stoptext
> >>
> >> Is it necessary to switch something else on?
> >
> > According to the proposed solution at
> > http://tracker.luatex.org/view.php?id=865
> >
> > it can be switched on using this magic formula
> > \enabledirectives[references.bookmarks.preroll]
> >
> > What is the correct usage of this? And are there any details why it
> > is required and what exactly it does?
> 
> as titles can be anything and bookmarks are limited, we need to have
> some protection in place ... unexpandable macros are simply dropped so
> \labeltext{index} becomes index
>
> by default the title is set to a label which is not expandable
> 
> the directive will convert the typeset title into a bookmark
>

Thanks for this detailed explanation. If I understand correctly, this switch
is intentional and won't be applied automatically even for registers or
other peculiar cases where title is specified differently/unexpectedly.

> > When it is added to the beginning of my example, it returns an error:
> > attempt to call field 'boxtostring' (a nil value)
> 
> ah, only in my experimental tree, i'll add it to the beta

Thanks, but this one is not so urgent.

Jan

___
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] Eliminating orpans in the Index

2013-11-26 Thread Jan Tosovsky
On 2013-11-23 Jan Tosovsky wrote:
>
> in my two-column index there are several cases when the last 
> entry in the given letter group overflows to the next column/page. 
> In the extreme case it is just the last page reference. 
> ...
> Additionaly, columns are not balanced properly in all cases. When the
> first is longer, it is not a big problem. But the opposite case 
> looks weird.

As the registers are rendered programatically, I cannot intervene into this
process. But can I influence it e.g. using 'processors' applied to
problematic index entries?

Processors can be used for setting the font-weight or color of particular
entry. Can the same method used for manual setting of
'keep-with-previous/next' ?

Thanks, Jan
 



___
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] Palatino patch for the current ConTeXt version

2013-11-26 Thread Jan Tosovsky
On 2013-11-17 Hans Hagen wrote:
> On 11/17/2013 12:23 PM, honyk wrote:
> > Hello Everyone,
> >
> > I am trying to fix a Palatino small caps issue using the procedure
> > explained here:
> > http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV
> >
> > That fix seems to be obsolete nowadays and returning errors.
> >
> 
> there are several ways to apply patches runtime, see *.lfg files (and
> also fonts-mkiv.pdf)

1) I've created a sample LFG file
2) placed it into the folder where other LFG files are stored
3) removed pala.tma and pala.tmc files from the cache
4) triggered the generating

My pala.lfg file seems to be ignored:

return {
name = "pala",
comment = "Switching the small capped 'i' to a dotless variant in
Palatino Linotype.",
remapping = {
tounicode = true,
unicodes = {
["i.sc"] = 983201,
},
},
}

1) How the LFG file is matched with the font? Is it via the 'name'
parameter, "pala" in my case? Does that name equals to the file title
without an extension or something else?

2) Should I see that comment in the log or is it just a remark for editors?

3) Can I emulate this patch via direct editing of pala.tma file? When I
change the 'unicodes' value there, it has no impact on generating (nothing
changes in the output).

Thanks, Jan

___
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] [***SPAM***] Incorrect internal font processing

2013-11-27 Thread Jan Tosovsky
Dear All,

during my attempts to patch the Palatino's dotless 'i' I found that this
font is parsed incorrectly by ConTeXt.

Comparing index/name info of individual glyphs in the font software and
resulting pala.tma file there is the following difference:

Index | Name - font| Name - tma
1110  | dotlessi.smcp  | i.sc(1)
1170  | i.smcp | i.sc(2)

(2) - this is a composite character which consist of dotlessi.smcp and dot.

The first one should have IMHO a different name, e.g. dotlessi.sc (to keep
conventions). The same name for two glyphs might be dangerous.

Regards, Jan

___
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] Palatino patch for the current ConTeXt version

2013-11-27 Thread Jan Tosovsky
On 2013-11-27 Hans Hagen wrote:
> On 11/27/2013 12:40 AM, Jan Tosovsky wrote:
> > On 2013-11-17 Hans Hagen wrote:
> >> On 11/17/2013 12:23 PM, honyk wrote:
> >>> Hello Everyone,
> >>>
> >>> I am trying to fix a Palatino small caps issue using the procedure
> >>> explained here:
> >>> http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV
> >>>
> >>> That fix seems to be obsolete nowadays and returning errors.
> >>>
> >>
> >> there are several ways to apply patches runtime, see *.lfg files
> >> (and also fonts-mkiv.pdf)
> >
> > 1) I've created a sample LFG file
> > 2) placed it into the folder where other LFG files are stored
> > 3) removed pala.tma and pala.tmc files from the cache
> > 4) triggered the generating
> >
> > My pala.lfg file seems to be ignored:
> >
> > return {
> >  name = "pala",
> >  comment = "Switching the small capped 'i' to a dotless variant
> > in Palatino Linotype.",
> >  remapping = {
> >  tounicode = true,
> >  unicodes = {
> >  ["i.sc"] = 983201,
> >  },
> >  },
> > }
> 
> you have to load them ... see fonts-mkiv.pdf

Thanks, I got it. Two next steps are required and one turned out as
redundant.

1) Create a sample LFG file
2) Place it into the folder where other LFG files are stored
3) NEW! Execute 'mtxrun --generate' command to include newly added LFG file
into a file database
4) NEW! Specify a new font feature referencing to this goodie:
\definefontfeature[dotlessi][mode=base,goodies=pala,unicoding=yes]
\definefontfamily[mainface][rm][Palatino
Linotype][features={default,quality,dotlessi}]
5) Trigger the generating

It does something, but not what I need :-)

My MWE:
\definefontfeature[dotlessi][mode=base,goodies=pala,unicoding=yes]
\definefontfamily[palatino][rm][Palatino
Linotype][features={default,quality,dotlessi}]
\setupbodyfont[palatino]
\starttext
Athenians \sc{Athenians}
\stoptext

This LFG core settings:
unicodes = {
   ["a.sc"] = 97, (1)
   ["b.sc"] = 983261, (2) 
},

(1) replaces all small 'a' into small caps variants - just for testing
purposes
(2) doesn't replace small caps 'i' to small caps 'b', but when small caps
text is selected, b is copied into the clipboard - so some replacement is
performed, but incomplete.

Maybe other tables need to be tweaked as well...
Has anybody any experience with this?

Thanks, Jan

___
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] [***SPAM***] Incorrect internal font processing

2013-11-27 Thread Jan Tosovsky
On 2013-11-27 Hans Hagen wrote:
> On 11/27/2013 8:44 PM, Jan Tosovsky wrote:
> >
> > during my attempts to patch the Palatino's dotless 'i' I found that
> > this font is parsed incorrectly by ConTeXt.
> >
> > Comparing index/name info of individual glyphs in the font software
> > and resulting pala.tma file there is the following difference:
> >
> > Index | Name - font| Name - tma
> > 1110  | dotlessi.smcp  | i.sc(1)
> > 1170  | i.smcp | i.sc(2)
> >
> > (2) - this is a composite character which consist of dotlessi.smcp
> > and dot.
> >
> > The first one should have IMHO a different name, e.g. dotlessi.sc (to
> > keep conventions). The same name for two glyphs might be dangerous.
> 
> the font pala.ttf has two entries i.sc and i see no reference to *.smcp

The version of my Palatino is 5.0 (I run on Win7)
It is located at c:/windows/fonts/pala.ttf  

There is no 'i.sc' glyph available according to the font software, only
those .smcp, listed in the smcp6 table.

As there are only .sc names in the TMA file, I suppose there is some kind of
name normalization. But not very precise...

> (mtxrun --script --save pala.ttf)

This returns an error:
c:/windows/fonts/pala.ttf:1: unexpected symbol

Jan

___
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] [***SPAM***] Incorrect internal font processing

2013-11-27 Thread Jan Tosovsky
On 2013-11-27 Hans Hagen wrote:
> On 11/27/2013 9:53 PM, Jan Tosovsky wrote:
> > On 2013-11-27 Hans Hagen wrote:
> >> On 11/27/2013 8:44 PM, Jan Tosovsky wrote:
> >>>
> >>> during my attempts to patch the Palatino's dotless 'i' I found that
> >>> this font is parsed incorrectly by ConTeXt.
> >>>
> >>> Comparing index/name info of individual glyphs in the font software
> >>> and resulting pala.tma file there is the following difference:
> >>>
> >>> Index | Name - font| Name - tma
> >>> 1110  | dotlessi.smcp  | i.sc(1)
> >>> 1170  | i.smcp | i.sc(2)
> >>>
> >>> The first one should have IMHO a different name, e.g. dotlessi.sc
> >>> (to keep conventions). The same name for two glyphs 
> >>> might be dangerous.
> >>
> >> the font pala.ttf has two entries i.sc and i see no reference to
> >> *.smcp
> >
> > There is no 'i.sc' glyph available according to the font software,
> > only those .smcp, listed in the smcp6 table.
> >
> > As there are only .sc names in the TMA file, I suppose there is some
> > kind of name normalization. But not very precise...
>
> mtxrun --script font --save pala.ttf

I can confirm your observations. In this lua export there is no .smcp, but
doubled i.sc records. Strange. There must be really some kind of
normalization there...

It would be nice to review the corresponding part of the code as it is IMHO
potentially dangerous. 

I felt obliged to report it :-)

Jan

___
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] [***SPAM***] Incorrect internal font processing

2013-11-27 Thread Jan Tosovsky
On 2013-11-27 Hans Hagen wrote:
> On 11/27/2013 10:20 PM, Jan Tosovsky wrote:
> > On 2013-11-27 Hans Hagen wrote:
> >> On 11/27/2013 9:53 PM, Jan Tosovsky wrote:
> >>> On 2013-11-27 Hans Hagen wrote:
> >>>> On 11/27/2013 8:44 PM, Jan Tosovsky wrote:
> >>>>>
> >>>>> during my attempts to patch the Palatino's dotless 'i' I found 
> >>>>> that this font is parsed incorrectly by ConTeXt.
> >>>>>
> >>>>> Comparing index/name info of individual glyphs in the font
> >>>>> software and resulting pala.tma file there is the following 
> >>>>> difference:
> >>>>>
> >>>>> Index | Name - font| Name - tma
> >>>>> 1110  | dotlessi.smcp  | i.sc(1)
> >>>>> 1170  | i.smcp | i.sc(2)
> >>>>>
> >>>>> The first one should have IMHO a different name, e.g. dotlessi.sc
> >>>>> (to keep conventions). The same name for two glyphs
> >>>>> might be dangerous.
> >>>>
> 
> the fact that there are two i.sc in the font is suspicious ... best
> check the font in fontforge ... one never know what kind of things
> other programs do

Hmm, FontForge glyphs naming corresponds to what we can observe in the
ConTeXt (doubled i.sc). My previous analysis was based on FontLab. I am
confused now...

Jan

___
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] [***SPAM***] Incorrect internal font processing

2013-11-27 Thread Jan Tosovsky
On 2013-11-27 Jan Tosovsky wrote:
> On 2013-11-27 Hans Hagen wrote:
> > On 11/27/2013 10:20 PM, Jan Tosovsky wrote:
> > > On 2013-11-27 Hans Hagen wrote:
> > >> On 11/27/2013 9:53 PM, Jan Tosovsky wrote:
> > >>> On 2013-11-27 Hans Hagen wrote:
> > >>>> On 11/27/2013 8:44 PM, Jan Tosovsky wrote:
> > >>>>>
> > >>>>> during my attempts to patch the Palatino's dotless 'i' I found
> > >>>>> that this font is parsed incorrectly by ConTeXt.
> > >>>>>
> > >>>>> Comparing index/name info of individual glyphs in the font
> > >>>>> software and resulting pala.tma file there is the following
> > >>>>> difference:
> > >>>>>
> > >>>>> Index | Name - font| Name - tma
> > >>>>> 1110  | dotlessi.smcp  | i.sc(1)
> > >>>>> 1170  | i.smcp | i.sc(2)
> > >>>>>
> > >>>>> The first one should have IMHO a different name.
> > >>>>> The same name for two glyphs might be dangerous.
> > >>>>
> >
> > the fact that there are two i.sc in the font is suspicious ... best
> > check the font in fontforge ... one never know what kind of things
> > other programs do
> 
> Hmm, FontForge glyphs naming corresponds to what we can observe in the
> ConTeXt (doubled i.sc). My previous analysis was based on FontLab. I am
> confused now...

Actually, there are no names of these glyphs available in the font so they
are calculated(!)
Each of two programs uses a different method. FontLab method is based on
layout tables - GPOS, GSUB, GDEF (it somehow detects that both glyps
differs). The FontForge method is unclear and seems to be buggy. But we
should blame rather the font itself as it is the primary cause of these
problems (= missing glyph names).

Jan

___
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] Palatino patch for the current ConTeXt version

2013-11-29 Thread Jan Tosovsky
On 2013-11-27 Hans Hagen wrote:
> On 11/27/2013 9:16 PM, Jan Tosovsky wrote:
> > On 2013-11-27 Hans Hagen wrote:
> >> On 11/27/2013 12:40 AM, Jan Tosovsky wrote:
> >>> On 2013-11-17 Hans Hagen wrote:
> >>>> On 11/17/2013 12:23 PM, honyk wrote:
> >>>>> Hello Everyone,
> >>>>>
> >>>>> I am trying to fix a Palatino small caps issue using the
> >>>>> procedure explained here:
> >>>>> http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV
> >>>>>
> >>>>> That fix seems to be obsolete nowadays and returning errors.
> >
> > This LFG core settings:
> > unicodes = {
> > ["a.sc"] = 97, (1)
> > ["b.sc"] = 983261, (2)
> > },
> >
> > (1) replaces all small 'a' into small caps variants - just for
> > testing purposes
> > (2) doesn't replace small caps 'i' to small caps 'b', but when small
> > caps text is selected, b is copied into the clipboard - so some
> > replacement is performed, but incomplete.
> >
> 
> this mechanism assumes that the shapes match the one that unicode
> expects so the (default) tounicode is used ... originally this features
> was meant for fonts with a faulty mapping (some dingbat fonts have
> that)
> 

So a different approach is needed. In another thread we've found out that
there are two glyphs of the same name:

glyph index | glyph name
1110| i.sc/ small caps dotlessi
1170| i.sc/ small caps i 

Currently when 'i' is to be rendered as small caps, 1170 is used, but I'd
like to use 1110 instead.

Can this be specified using a LFG file?

Thanks, Jan

___
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] Eliminating orpans in the Index

2013-11-29 Thread Jan Tosovsky
On 2013-11-27 Hans Hagen wrote:
> On 11/26/2013 10:09 PM, Jan Tosovsky wrote:
> > On 2013-11-23 Jan Tosovsky wrote:
> >>
> >> in my two-column index there are several cases when the last
> >> entry in the given letter group overflows to the next column/page.
> >> In the extreme case it is just the last page reference.
> >> ...
> >> Additionaly, columns are not balanced properly in all cases. When
> >> the first is longer, it is not a big problem. But the opposite 
> >> case looks weird.
> >
> > As the registers are rendered programatically, I cannot intervene
> > into this process. But can I influence it e.g. using 'processors' 
> > applied to problematic index entries?
> >
> > Processors can be used for setting the font-weight or color of
> > particular
> > entry. Can the same method used for manual setting of
> > 'keep-with-previous/next' ?
> 
> I can think of a hack but it will always be for last minute work.

I am also investigating grids. Switching this feature on has introduced
orphan/widows in the standard body text. I've applied setups according to:
http://www.mail-archive.com/ntg-context@ntg.nl/msg66393.html

and it now fixes also problematic index entries :-)

Like orphan/widow settings weren't specified by default...

But I suspect the correct result to be rather coincidence... Some higher
number of lines kept together still produce orphans... But it is overall
much better now.

One extra observation. Regardless the number of lines in the setups max. two
lines seem to be kept together in the index...

Jan

___
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] [***SPAM***] Provide showgrid as a PDF layer

2013-11-29 Thread Jan Tosovsky
Dear All,

it would be nice to have a possibility to interactively disable/enable a
grid rendered via \showgrid command. Whereas this grid is helpful for
debugging, it disturbs when the page is evaluated as the whole. Using layers
could make this process more efficient (not requiring to generate both
variants).

I've noticed something like this is already implemented for the body area
(visualizer vbox layer).

Or is there any option for this already?

Thanks, Jan

___
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] [***SPAM***] Provide showgrid as a PDF layer

2013-11-30 Thread Jan Tosovsky
On 2013-11-30 Hans Hagen wrote:
> On 11/30/2013 12:04 AM, Jan Tosovsky wrote:
> >
> > it would be nice to have a possibility to interactively
> > disable/enable a  grid rendered via \showgrid command. 
> >
> 
> \setupinteraction[state=start]
> \showgrid  \showframe \showmakeup \showlayoutcomponents
> 
> \starttext
>  \input tufte \placefigure{}{}
> \stoptext

Wow, thanks! 

So to show grids as a layer at least \showlayoutcomponents must be set as
well. To be honest, I'd expect displaying the grid directly without this
dependency...

Anyway, it works fine in Adobe Reader.

Jan

___
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] Keeping titles together with the following text when grid is on

2013-11-30 Thread Jan Tosovsky
Dear All,

when grid is on, orphan and widows have to be eliminated using additional
penalty settings. Whereas it works fine for body text, section titles are
still sometimes left at the bottom of the page.

It can be reproduced using this example:

\setuppapersize[B5]

\startsetups[grid][mypenalties]
\setdefaultpenalties
\setpenalties\widowpenalties{2}{1}
\setpenalties\clubpenalties {2}{1}
\stopsetups

%comment the following line to see the difference
\setuplayout[grid=yes, setups=mypenalties] 
\showgrid 

\starttext
   \blank[force, 9.5cm]
   \input tufte
   \section{Tufte}
   \input tufte
\stoptext

Is there any extra option for handling this?

Thanks, Jan

___
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] Placefigure without Caption-Numbering

2013-11-30 Thread Jan Tosovsky
On 2013-04-16 Wolfgang Schuster wrote:
> Am 16.04.2013 um 18:56 schrieb "H. Özoguz" :
> >
> > How to deactive the Caption-Numbering:
> > 
> > \starttext
> > 
> > \placefigure[here]{Blub}{\externalfigure[image][width=6cm]}
> > 
> > \stoptext
> > 
> > I want the caption "Blub", but not the "Figure 1" label.
>
> \placefigure[here,nonumber]{.}{.}

It helped me now. 

Btw, there is no such an option mentioned in the WIKI or user guide...

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

But I'd like to add:
(1) caption=none renders 'none' instead of nothing...
(2) when key=none is combined, e.g. [none, page], the numbering is
suppressed, but the second option is ignored. But [page, none] works fine.
The order matters. It is same for [page, nonumber].

It would be nice to fix those examples in Wiki or if MkIV behaves
differently, add an appropriate alternative there.

Thanks, Jan


___
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] Placefigure without Caption-Numbering

2013-11-30 Thread Jan Tosovsky
On 2013-11-30 Alan Braslau wrote:
> On Sat, 30 Nov 2013 19:42:54 +0100
> Jan Tosovsky  wrote: 
> > On 2013-04-16 Wolfgang Schuster wrote:
> > > Am 16.04.2013 um 18:56 schrieb "H. Özoguz"
> > > >
> > > > How to deactive the Caption-Numbering:
> > > >
> > > > \starttext
> > > >
> > > > \placefigure[here]{Blub}{\externalfigure[image][width=6cm]}
> > > >
> > > > \stoptext
> > > >
> > > > I want the caption "Blub", but not the "Figure 1" label.
> > >
> > > \placefigure[here,nonumber]{.}{.}
> >
> > It helped me now.
> >
> > Btw, there is no such an option mentioned in the WIKI or user
> > guide...
> >
> > http://wiki.contextgarden.net/Command/placefigure
> >
> > But I'd like to add:
> > (1) caption=none renders 'none' instead of nothing...
> > (2) when key=none is combined, e.g. [none, page], the numbering is
> > suppressed, but the second option is ignored. But [page, none] works
> > fine. The order matters. It is same for [page, nonumber].
> >
> > It would be nice to fix those examples in Wiki or if MkIV behaves
> > differently, add an appropriate alternative there.
> 
> I find that the \startplacefigure \stopplacefigure interface is much
> cleaner:
> 
> \startplacefigure [location=here,numbering=no,title=Blub]
>   \externalfigure [image] [width=6cm]
> \stopplacefigure
> 

Indeed much cleaner. But that numbering option seems to be ignored ;-)
Does it work for you?

Jan

___
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] Palatino patch for the current ConTeXt version

2013-12-01 Thread Jan Tosovsky
On 2013-11-17 Jan Tosovsky wrote:
> 
> I am trying to fix a Palatino small caps issue using the procedure
> explained here:
> http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV
> 
> That fix seems to be obsolete nowadays and returning errors.
> 

almost fixed now using this procedure:

1) Create a new LFG file

local fix_pala = {
   comment = "Switching i.sc glyphs indexes",
   fixes = function(data)
  local descriptions = data.descriptions
  descriptions[983201].index = 1170
  descriptions[983261].index = 1110
   end
}

return {
   name = "pala",
   comment = "Switching the small capped 'i' to a dotless variant in
Palatino Linotype.",
   treatments = {
  ["pala.ttf"]   = fix_pala,
  ["palai.ttf"]  = fix_pala,
  ["palab.ttf"]  = fix_pala,
  ["palabi.ttf"] = fix_pala,  
   },
}


2) Place it into the folder where other LFG files are stored
(tex\texmf-context\tex\context\fonts)

3) Execute 'mtxrun --generate' command to include newly added LFG file
into a file database

4) Specify a new font feature referencing to this goodie in the source file:

\definefontfeature[dotlessi][mode=base,goodies=pala]
\definefontfamily[palatino][rm][Palatino
Linotype][features={default,quality,dotlessi}]
\setupbodyfont[palatino]
\starttext
{Athenians \smallcaps{Athenians}}\par
{Athenians \sc{Athenians}}\par
{\it Athenians \smallcaps{Athenians}}\par
{\bf Athenians \smallcaps{Athenians}}\par
{\bi Athenians \smallcaps{Athenians}}\par
\stoptext

5) Trigger the generating

It works except the regular font style. In this case \smallcaps option
behaves differently than for e.g. \it or \bf styles. I am quite confused.
Moreover, when faked caps are switched on using \sc, it works. Can anybody
explain what is happening here?

Thanks, Jan

___
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] [***SPAM***] RE: Footnote line position

2013-12-01 Thread Jan Tosovsky
On 2013-11-22 Jan Tosovsky wrote:
> 
> when a single line footnote is used, the footnote divider is 
> rendered in larger distance than for footnotes with two or 
> more lines (I mean a gap between the line and the footnote text).
>
> It can be tested easily:
> 
> \chapter{Chapter}Foo\footnote{Bar}.
> \chapter{Chapter}Foo\footnote{Bar
> 
> Bar}.
> 

This behaviour seems to be driven by this code in strc-not.mkvi:

\unexpanded\def\normalnoterule
  {\ifvmode
 \dontleavehmode \blackrule
   [\c!color=\noteparameter\c!rulecolor,
\c!width=.2\hsize,
\c!height=\noteparameter\c!rulethickness,
\c!depth=\zeropoint]%
 \endgraf
 \kern\strutdepth
   \fi}

When e.g. \endgraf or \kern\strutdepth lines are commented, the gap is
smaller, but still different.

Changing the depth from \zeropoint to a bigger value (1cm) makes the gap
same, but it leads to extreme thick rule.

What else could be tweaked here?

Thnaks, Jan

___
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] Keeping titles together with the following text when grid is on

2013-12-02 Thread Jan Tosovsky
On 2013-12-02 "H. Özoguz" wrote:
> On 2013-12-01 Jan Tosovsky wrote:
> > 
> > when grid is on, orphan and widows have to be eliminated using
additional
> > penalty settings. Whereas it works fine for body text, section titles
are
> > still sometimes left at the bottom of the page.
> 
> this is not the same question as handling orphan and widows - because
> you surely do not want some titles with only 2-3 lines of body text
> after them.
> 
> I always use "\testpage[x]" to handle those issues, see your example
> with testpage:
> 
> \setuphead[section][before={\testpage[8]\blank}]

Thanks, it works! Another magic command not documented anywhere in the
ConTeXt Guide or Wiki...

I was looking for any alternative for XSL-FO's keep-with-next="always". This
is a different approach, but it doesn't matter.

Btw, I still don't understand why keeping the title and text behaves
differently when grid is on...
 
Jan

___
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] Keeping titles together with the following text when grid is on

2013-12-02 Thread Jan Tosovsky
On 2013-12-02 Thomas A. Schmitz wrote:
> On 12/02/2013 09:02 PM, Jan Tosovsky wrote:
> > Thanks, it works! Another magic command not documented anywhere in
> > the ConTeXt Guide or Wiki...
> 
> So have you added it yet?
> 

I plan to update some pages in near future, but rather in form of examples
of use. 

It is hard to describe commands without knowing what exactly they do, in
which versions they are supported (I work in most recent MkIV which is not
the case of everybody), whether they are perspective/deprecated or if there
are any limitations when they are used. 

Nowadays most of API/command references are generated automatically directly
from the source code comments. It ensures up to date data, but it helps also
to programmers. Descriptive comments in the source helps to understand the
given code when editing older parts. I do not know to what extent it could
be implemented here, but the respective person could give it a try.

Jan

___
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] [***SPAM***] OT: Generating Command reference from source code

2013-12-03 Thread Jan Tosovsky
Dear All,

in another thread I was dreaming ... to have always the complete and up to
date command/macro reference with basic descriptions and list all of the
parameter/options...

'Spoiled' by goodies offered by various Java APIs (based on
http://en.wikipedia.org/wiki/Javadoc ) I am missing this a lot.

Example of the result:
http://docs.oracle.com/javase/7/docs/api/index.html?overview-summary.html

In Java there is the following structure (simplified):
1) 'packages' defining the hierarchy
2) 'classes' defining objects
3) 'properties' and 'methods' for every particular 'class'

I've roughly scanned the ConTeXt source structure and bringing the following
idea:

1) There is no 'packages' counterpart in ConTeXt, but it would be handy to
think of any logical structure to group commands to logical groups (even
nested). Maybe the filename title prefix could be taken as a starting point
for this.
2) 'classes' = all individual .mkiv files
3) 'methods' = all public \def, \define etc in mkiv files (+maybe other
contructs I am not aware)

Supposing that ...
a) every .mkiv file is enhanced by 'package' annotation
b) every public command/macro contains a description with the list of all
available params
(sensible subset of JavaDoc annotations)

... I can imagine to extract this info and:

A) build the static command reference website with all the hyperlinks
B) eventually generate PDF variant of the same
C) export it into the form which can be imported into the WIKI (with
read-only mode)

If every change of behaviour was reflected immediately in the description,
if any newly added parameter was added into the parameter list, the main
goal would be achieved.

But I understand there is lot of to do in the beginning... with disputable
effect in the end.

I can help with some coding, transforming ... 

Jan

Btw, would it be sufficient to scan texmf-context\tex\context\base\*.mkiv
files or there are other parts somewhere else? There are approx 500 files
now. It is huge number, but finite :-)


___
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] [***SPAM***] OT: Generating Command reference from source code

2013-12-04 Thread Jan Tosovsky
On 2013-12-04 Hans Hagen wrote:
> On 12/3/2013 10:59 PM, Jan Tosovsky wrote:
> >
> > Supposing that ...
> > a) every .mkiv file is enhanced by 'package' annotation
> > b) every public command/macro contains a description with the list of
> >all available params (sensible subset of JavaDoc annotations)
> >
> >  I can imagine to extract this info and:
> >
> > A) build the static command reference website with all the hyperlinks
> > B) eventually generate PDF variant of the same
> > C) export it into the form which can be imported into the WIKI (with
> > read-only mode)
> >
> > If every change of behaviour was reflected immediately in the
> > description, if any newly added parameter was added into the parameter 
> > list, the main goal would be achieved.
> 
> there is a (somewhat incomplete) reference definition in xml format so
> your (b) is in principle covered; 

where is it stored?

> these definitions used to be in the source (more than a decade ago) but
> i moved them out because some functionality is stepwise provided 
> (not in one place) and also because many commands are generated 
> (you will not find their names by interpreting the source)

I was afraid of something like this :-(

In this case all the idea seems to be unrealistic.
 
> for documentation several methods are used:
> 
> - examples in the test suite
> - some explanation in the source
> - explanations on the wiki
> - dedicated manuals
> - articles by users (+examples)
> 

A nice overview. I would add the ConTeXt mail archive to this list ;-)

Thanks for your exhaustive insight to this topic!

Jan

___
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] [***SPAM***] OT: Generating Command reference from source code

2013-12-04 Thread Jan Tosovsky
On 2013-12-04 Wolfgang Schuster wrote: 
> Am 04.12.2013 um 18:56 schrieb Jan Tosovsky :
> > On 2013-12-04 Hans Hagen wrote:
> >>
> >> there is a (somewhat incomplete) reference definition in xml format
> >> so your (b) is in principle covered;
> >
> > where is it stored?
> 
> The english interface is stored in the file cont-en.xml, the path for
> the file on my system is
> 
> /Users/wolf/context/beta/tex/texmf-
> context/tex/context/interface/cont-en.xml
> 
> A PDF with all commands from the files is available here:
> http://pragma-ade.com/show-man-10.htm

Thanks. Interesting to see what can be found on my PC :-)

Unfortunately there isn't even minimal description what the particular
command does :-(

And what is the purpose of those localized versions?

Jan

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

2013-12-08 Thread Jan Tosovsky
On 2013-12-06 H. van der Meer wrote:
> Some further experimentation: interchanging two chapters makes the
> problem go away.
> 
> It is reproducible, because putting the chapters back als brings the
> problem back. Even stranger, sitting at chapter 5 it kills the
> interaction for chapter 6 and 8, leaving the interactivity for the
> intervening and later chapters intact.
> 
> Addition of content to the start of chapter 5 helped for chapter 6 but
> not for chapter 8, which seems strange.
> Addition of content to the end of chapter 5 also helped for chapter 6
> 
> Addition of content to the start of chapter 7 did help to solve for
> chapter 8.
> 
> So I fear it has in some way to do with the moment the output routine
> is
> called in relation to the reference processing in
> \startchapter[title=,reference=].

This topic was discussed few weeks ago without clear conclusion:
http://www.ntg.nl/pipermail/ntg-context/2013/075988.html

In my case most of cases were resolved when I changed
\placebookmarks[chapter, section] just to \placebookmarks[chapter]
Although few cases still remain, it is much better now.

When the particular item doesn't react via bookmark, it doesn't react also
via ToC.

I plan to prepare an example for this, but for me it is not so urgent issue.

Jan

___
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] [***SPAM***] Incorrect internal font processing

2013-12-08 Thread Jan Tosovsky
On 2013-12-01 Khaled Hosny wrote:
> On Sun, Dec 01, 2013 at 11:21:30AM +0200, Khaled Hosny wrote:
> 
> Interestingly, after I patched Sorts Mill (a FontForge fork) to avoid
> duplicates[1] I ended up with a ‘dotlessi.sc’ glyph, as it turns out
> the font has a  →  later on, so that is 
> where FontLab gets the glyph name, too.
> 
> I’ll try to port this patch to LuaTeX later.

Thanks for handling this! 

When can I expect this fix in luatex.dll updated on my local machine using the 
first-setup script?

Will it be in any following minor 0.77 update or in 0.80 later this year?

Jan

Btw, FontForge could be patched as well ;-)

___
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] Palatino patch for the current ConTeXt version

2013-12-21 Thread Jan Tosovsky
On 2013-11-17 Jan Tosovsky wrote:
> I am trying to fix a Palatino small caps issue using the procedure
> explained here:
> http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV
> 
> That fix seems to be obsolete nowadays and returning errors.
> 

thanks a lot to all who participated on this issue, especially to Khaled for
fixing the internal font processing. Now Palatino font doesn't need to be
patched on client side which simplifies the font setup significantly.

I've updated that Wiki page accordingly. Feel free to correct me.

Jan

___
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] Centering the last line in combination subcaptions

2013-12-27 Thread Jan Tosovsky
Hello Everyone,

I try to fill the entire page with two images with their captions. The final
page should be floating, keeping both images together and not containing any
other text.

I found this solution. It work fine for short captions / wide images.

\starttext
test
\startplacefigure[location=page, number=no, title={}]

%\setupcombinations[align={hz, hanging}]
%\setuptolerance[strict]

{\startcombination[1*2]
   {\externalfigure[cow]} {\input{ward}}
   {\externalfigure[cow]} {\input{ward}}
\stopcombination}

\stopplacefigure
\stoptext

If captions are long and the image narrow, they are typeset on multiple
lines. Default centering produces the ragged column - both not very nice and
difficult to read. When the alignment is set to hanging, it looks better
except the last line which is not centered.

Is there any settings for centering the last line?

Can the 'column' width be somehow extended to e.g. 80% of text width? If not
via the 'combination', are there any better alternatives for my use case?

Any hint is appreciated.

Thanks, Jan

___
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] Alignment for narrower text

2014-01-30 Thread Jan Tosovsky
Dear All,

how can I specify the alignment of narrower text, 'hanging' in my case?

\definefontfamily[palatino][rm][Palatino Linotype][features={default,
quality}]
\setupbodyfont[palatino]
\setupalign[hz, hanging]
\setupindenting[medium, yes]

\starttext
\input{tufte}
\setupnarrower[left=0cm] % surprisingly it is narrower
\startnarrower[left]
\setupalign[hz, hanging] % setting this again here has no effect
\it
>this is,\par
just sample.<\par
\stopnarrower
\input{tufte}
\stoptext

Thanks, Jan


___
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] Alignment for narrower text

2014-01-30 Thread Jan Tosovsky
On 2014-01-30 Wolfgang Schuster wrote:
> Am 30.01.2014 um 20:08 schrieb Jan Tosovsky :
> >
> > how can I specify the alignment of narrower text, 'hanging' in my
> > case?
> 
> What do you expect from the output?
> 

I'd expect that starting french quote sign outside the left text edge -
similarly like it is aligned the main flow when the hanging feature is
enabled.

Now I've found it works as expected when the indenting is disabled:

\definefontfamily[palatino][rm][Palatino Linotype][features={default,
quality}]
\setupbodyfont[palatino]
\setupalign[hz, hanging]
%\setupindenting[medium, yes]  % this helped

\starttext
\input{tufte}
\setupnarrower[left=1cm]
\startnarrower[left]
\it
>this is,\par
just sample.<\par
\stopnarrower
\input{tufte}
\stoptext

Can I have both the main flow indentation and the proper alignment of the
narrow text block?

Thanks for any hint,

Jan

___
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] ToC like entry list

2014-01-30 Thread Jan Tosovsky
Dear All,

I am trying to typeset a quite complex list of accounting entries.
http://drifted.in/other/045.jpg

It is like Table of Contents, but without page numbers. I have no idea what
commands to use for this. There is no need to have it exactly the same, just
roughly.

Thanks, Jan

___
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] ToC like entry list

2014-01-31 Thread Jan Tosovsky
On 2014-01-30 Jan Tosovsky wrote:
> 
> I am trying to typeset a quite complex list of accounting entries.
> http://drifted.in/other/045.jpg
> 

I've made some progress with this code:

\def\mydots{\leavevmode\xleaders\hbox to 0.5em{\hfil.\hfil}\hfill\kern0pt}
% credit to:
http://tex.stackexchange.com/questions/85335/how-to-change-dot-spacing-in-do
tfill
\starttext
\setupTABLE[frame=off]
\setupTABLE[column][first][align={hz, hanging}, indenting=yes] %indenting
seems to be ignored
\setupTABLE[column][last][align={left, low}]
\bTABLE[columndistance=0.2cm]
\bTR \bTD[indent=next] \input{ward} \mydots \eTD \bTD 1.220 \eTD \eTR
\bTR \bTD somewhat more \mydots \eTD \bTD[bottomframe=on] 5.186 \eTD \eTR
\bTR \bTD {\hskip 11cm} together \mydots \eTD \bTD 6.406 \eTD \eTR
\eTABLE
\stoptext

Now I am trying to left indent paragraph lines except the first one. But
indenting seems to be ignored in the cell at all. How can I accomplish this?

Thanks, Jan

___
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] ToC like entry list

2014-01-31 Thread Jan Tosovsky
On 2014-01-31 Jan Tosovsky wrote:
> On 2014-01-30 Jan Tosovsky wrote:
> >
> > I am trying to typeset a quite complex list of accounting entries.
> > http://drifted.in/other/045.jpg
> >
> 
> I've made some progress with this code:
> ...
> Now I am trying to left indent paragraph lines except the first one.
> But indenting seems to be ignored in the cell at all. How can I accomplish
> this?

According to the following thread I placed \hangindent=1cm \hangafter=1
commands in the cell and it works as expected (although I have no idea what
really I do :-)
http://tex.stackexchange.com/questions/96020/how-do-i-do-hanging-indents-in-
context


\def\mydots{\leavevmode\xleaders\hbox to 0.5em{\hfil.\hfil}\hfill\kern0pt}

\starttext
\setupTABLE[frame=off]
\setupTABLE[column][1][align={hz, hanging}]
\setupTABLE[column][last][align={left, low}]
\bTABLE[columndistance=0.2cm]
\bTR \bTD \hangindent=1cm \hangafter=1 \input{ward} \mydots \eTD \bTD 1.220
\eTD \eTR
\bTR \bTD somewhat more \mydots \eTD \bTD[bottomframe=on] 5.186 \eTD \eTR
\bTR \bTD {\hskip 11cm} together \mydots \eTD \bTD 6.406 \eTD \eTR
\eTABLE
\stoptext

Thanks for watching. Problem solved. The rest are just variations on the
code above.
If there is a room for other optimizations, please let me know.

Thanks, Jan

___
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] Centering the last line in combination subcaptions

2014-02-07 Thread Jan Tosovsky
On 2013-12-27 Jan Tosovsky wrote:
> I try to fill the entire page with two images with their captions. The
> final page should be floating, keeping both images together and not
> containing any other text.
> 
> I found this solution. It work fine for short captions / wide images.
> 
> \starttext
> test
> \startplacefigure[location=page, number=no, title={}]
> 
> %\setupcombinations[align={hz, hanging}]
> %\setuptolerance[strict]
> 
> {\startcombination[1*2]
>{\externalfigure[cow]} {\input{ward}}
>{\externalfigure[cow]} {\input{ward}}
> \stopcombination}
> 
> \stopplacefigure
> \stoptext
> ...
> If captions are long and the image narrow, they are typeset on multiple
> lines. Default centering produces the ragged column - both not very
> nice and difficult to read. When the alignment is set to hanging, it 
> looks better except the last line which is not centered.
> 
> Is there any settings for centering the last line?

I've found it is a general problem with the centering the last line when
hanging alignment is set. Here is the similar thread, but with no response:
https://www.mail-archive.com/ntg-context@ntg.nl/msg32884.html

This is quite old thread. Are there any new possibilities in the Context
from that era?

Thanks, Jan

___
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] Centering the last line in combination subcaptions

2014-02-07 Thread Jan Tosovsky
On 2014-02-07 Jan Tosovsky wrote:
> On 2013-12-27 Jan Tosovsky wrote:
> >
> > If captions are long and the image narrow, they are typeset on
> > multiple lines. Default centering produces the ragged column - 
> > both not very nice and difficult to read. When the alignment is 
> > set to hanging, it looks better except the last line which is 
> > not centered.

Finally fixed with align=last :-)

This is the improved example. The only remaining issue is an one empty line
between the image and the label when \startnarrower command is used.

Please compare two pages w/o this option set:


%\definefontfamily[palatino][rm][Palatino Linotype][features={default,
quality}]
%\setupbodyfont[palatino]
\setupnarrower[middle=-2.8cm]

\starttext
test
\startplacefigure[location=page, number=no, title={}]
\setupcombinations[align={last, hz, hanging}]
{\startcombination[1*2]
{\externalfigure[cow]} {\startnarrower {\itx \input{tufte}}
\stopnarrower}
{\externalfigure[cow]} {\startnarrower {\itx \input{lorem}}
\stopnarrower}
\stopcombination} 
\stopplacefigure

\startplacefigure[location=page, number=no, title={}]
\setupcombinations[align={last, hz, hanging}]
{\startcombination[1*2]
{\externalfigure[cow]} {\itx \input{ward}}
{\externalfigure[cow]} {\itx \input{ward}}
\stopcombination} 
\stopplacefigure

\stoptext

I haven't find any better way to extend the caption width than that negative
value for narrowed text. It works, but that empty space above looks weird
:-(

Thanks for any suggestions,

Jan

___
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] Centering the last line in combination subcaptions

2014-02-08 Thread Jan Tosovsky
On 2014-02-08 Wolfgang Schuster wrote:
> 
> > I haven't find any better way to extend the caption width than that
> > negative value for narrowed text. It works, but that empty space above 
> > looks weird
> 
> You have to force a certain width for your images because the width
> of the text space depends on the width of the images. You can use
> \framed (instead of loffset/roffset you can also set a fixed width) or
> \simplealignedbox to set the width of the images.
> 
> \setupexternalfigures[location=default]
> 
> \defineframed[CombinationBox][frame=off,offset=none,loffset=3cm,roffset
> =3cm]
> 
> \starttext
> 
> \startplacefigure[location={force,none}]
>   \startcombination[nx=1,ny=2,align={last,hz,hanging},style=\itx]
> % first image
> \startcontent
> 
> %\simplealignedbox{11cm}{middle}{\externalfigure[cow][width=5cm]}
> \CombinationBox{\externalfigure[cow][width=5cm]}
>   \stopcontent
>   \startcaption
> \input{ward}
>   \stopcaption
>   % second image
> \startcontent
> 
> %\simplealignedbox{11cm}{middle}{\externalfigure[cow][width=5cm]}
> \CombinationBox{\externalfigure[cow][width=5cm]}
>   \stopcontent
>   \startcaption
> \input{ward}
>   \stopcaption
>   \stopcombination
> \stopplacefigure
> 
> \stoptext

Thanks a lot, it is much simpler! I also like that \start \stop structure
which makes the code more clear.

Just for future reference: CombinationBox extends the current image width
with the fixed value. When different image widths are used in your document,
the caption width varies as well. To keep the consistency within the
document I've chosen that simplealignedbox instead. 

Jan

___
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] [***SPAM***] RE: Footnote line position

2014-02-08 Thread Jan Tosovsky
On 2013-12-01 Jan Tosovsky wrote:
> On 2013-11-22 Jan Tosovsky wrote:
> >
> > when a single line footnote is used, the footnote divider is
> > rendered in larger distance than for footnotes with two or
> > more lines (I mean a gap between the line and the footnote text).
> >
> > It can be tested easily:
> >
> > \chapter{Chapter}Foo\footnote{Bar}.
> > \chapter{Chapter}Foo\footnote{Bar
> >
> > Bar}.
> >
> 
> This behaviour seems to be driven by this code in strc-not.mkvi:
> 
> \unexpanded\def\normalnoterule
>   {\ifvmode
>  \dontleavehmode \blackrule
>[\c!color=\noteparameter\c!rulecolor,
> \c!width=.2\hsize,
> \c!height=\noteparameter\c!rulethickness,
> \c!depth=\zeropoint]%
>  \endgraf
>  \kern\strutdepth
>\fi}
> 
> When e.g. \endgraf or \kern\strutdepth lines are commented, the gap is
> smaller, but still different.
> 
> Changing the depth from \zeropoint to a bigger value (1cm) makes the
> gap same, but it leads to extreme thick rule.
> 

After couple of weeks I've updated my Beta and I cannot reproduce the
original behaviour any more!

Thanks for fixing, 

Jan

___
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] Divider in grid environment

2014-02-08 Thread Jan Tosovsky
Dear All,

I'd like to use a divider between certain paragraphs. As I want to keep all
the lines on the grid so it should have a height = N x line height.

As \hl renders the line on baseline, I have to tweek the space before/after
using the 'blank' command to keep the horizontal line in the +/- middle:

\setuplayout[grid=yes]
\showgrid
\showlayoutcomponents

\starttext
\input{ward}
\blank[4mm]\middlealigned{\hl[4]}\blank[6mm]
\input{ward}
\stoptext

But this solution requires adjustments for different fonts or font sizes...

Is there a more efficient way how to accomplish this?

Thanks, Jan

___
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] Divider in grid environment

2014-02-08 Thread Jan Tosovsky
On 2014-02-08 Jan Tosovsky wrote:
> I'd like to use a divider between certain paragraphs. As I want to keep
> all the lines on the grid so it should have a height = N x line height.
> 
> As \hl renders the line on baseline, I have to tweak the space
> before/after using the 'blank' command to keep the horizontal line 
> in the +/- middle:
> 
> \setuplayout[grid=yes]
> \showgrid
> \showlayoutcomponents
> 
> \starttext
> \input{ward}
> \blank[4mm]\middlealigned{\hl[4]}\blank[6mm]
> \input{ward}
> \stoptext
> 
> But this solution requires adjustments for different fonts or font
> sizes...
> 
> Is there a more efficient way how to accomplish this?

Additionally, I'd like to keep that divider with the previous content
(paragraph).

In this case AFAIK \testpage[n] cannot be used directly in the divider
definition as it breaks the page at position of this command.

I'd like to express rather: If there is no space for three lines, break the
page, but grab few previous lines (at least 2) together with me (according
to orphan/widow settings).

The current behaviour can be demonstrated using this example:

\startsetups[grid][mypenalties]
\setdefaultpenalties
\setpenalties\widowpenalties{2}{1}
\setpenalties\clubpenalties {2}{1}
\stopsetups

\setuplayout[grid=yes, setups=mypenalties]
\showgrid
\showlayoutcomponents

\starttext
\blank[force, 30*line]
\input{tufte}
\blank[4mm]\middlealigned{\hl[4]}\blank[6mm]
\stoptext

In my case the divider is used also to emphasise Chapter ends - so it is
very often the last element one the page and there is no need to check also
the space which follows (whether next lines will fit or not). So
'keep-with-previous' is enough for me.

Jan

___
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] Linespacing in TOC

2014-02-10 Thread Jan Tosovsky
On 2013-11-23 Hans Hagen wrote:
> On 11/23/2013 2:32 PM, Jan Tosovsky wrote:
> > On 2013-11-23 Hans Hagen wrote:
> >> On 11/23/2013 1:44 PM, Jan Tosovsky wrote:
> >>> On 2013-11-23 Hans Hagen wrote:
> >>>>
> >>>> normally linespacing in the toc is the same as in the rest of the
> >>>> document unless one has assigned to before/after
> >>>
> >>> This example shows different behaviour:
> >>>
> >>> \showgrid
> >>> \starttext
> >>> \start
> >>> \placecontent
> >>> \stop
> >>> \chapter{}Foo
> >>>
> >>> Bar
> >>> \chapter{}.
> >>> \chapter{}.
> >>> \stoptext
> >>>
> >>> On my computer the TOC linespacing is almost twice as big as that
> in
> >>> the paragraph.
> >>
> >> if the grid is on that can indeed be the case but only if there are
> >> lines with > lineheight so that's why you can use less strict
> options
> >> (older mails)
> >
> > Yes, it is true, but in my example the grid is not activated, just
> shown to
> > compare differences...
> 
> maybe
> 
> \showmakeup
> 
> shows what makes that happen (for instance it can be that you inject
> invisible stuff that interferes with spacing, in which case
> \dontleavehmode's might help as otherwise tex enters / exits h/v mode
> unexpected)

To be honest, I don't understand to \showmakeup result at all...

When the following code is used, I am getting almost desired output. But
when the grid is switched on (by uncommenting the first line), it again
produces extra lines after every TOC line...

%\setuplayout[grid=yes]
\showgrid
%\showmakeup

\starttext
%\placeongrid{\startlinecorrection
%\start
\setupinterlinespace[0]  % looks like there is an extra line (?) ...
%\setupwhitespace[none]
\placecontent
%\stop
%\stoplinecorrection}

\chapter{}.
\chapter{}.
\chapter{}.
\stoptext

I am quite sad that after lot of investigation I still cannot achieve such a
basic formatting...

As it is required to force \setupinterlinespace[0] to zero to get proper
result even in non-grid environment, I suspect there is some white space
placed between lines (out of my control).

I still prefer placing lines on the grid. But if the grid could be switched
off just for ToC, I could use the above code ensuring lines in the 'grid'
positions. It is fake, but I cannot manage even that (startlinecorrection
doesn't work here).

Any idea?

Thanks, Jan

___
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] Linespacing in TOC

2014-02-11 Thread Jan Tosovsky
On 2014-02-10 Wolfgang Schuster wrote:
> 
> Am 10.02.2014 um 22:49 schrieb Jan Tosovsky :
> 
> > I still prefer placing lines on the grid. But if the grid could be
> switched
> > off just for ToC, I could use the above code ensuring lines in the
> 'grid'
> > positions. It is fake, but I cannot manage even that
> (startlinecorrection
> > doesn't work here).
> >
> > Any idea?
> 
> When you have characters with big ascenders/descenders you have to
> increase
> the interlinespace or change the height/depth ration of a strut.
> 
> 1. Change the interlinespace value with
> 
>   \setupinterlinespace[line=14pt]
> 
> 2. Change the height/depth ration with
> 
>   \setupinterlinespace[height=0.8,depth=0.2] % default:
> height=0.72,depth=0.28

Thanks, but neither solution works for me.

My fundamental question is why ToC has different ToC line gaps than body
text. I still think it is rather a bug which we are trying to work around
all the time...

Jan

\setuplayout[grid=yes]
\showgrid

\starttext
\setupinterlinespace[height=0.8, depth=0.2]
\placecontent  % there are blank lines between ToC lines

\chapter{}

\input{tufte}  % this is good
\chapter{}
\chapter{}
\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] Linespacing in TOC

2014-02-12 Thread Jan Tosovsky
On 2014-02-11 Wolfgang Schuster wrote: 
> > Am 11.02.2014 um 17:32 schrieb Jan Tosovsky :
> >
> > My fundamental question is why ToC has different ToC line gaps
> > than body text. I still think it is rather a bug which we are 
> > trying to work around all the time.
> 
> The chapter entries insert a empty line before their content, you can
> disable this with
> 
>   \setuplist[chapter][before=]

Great! I was not aware of that empty line!

I misled all of you by incorrect wording, sorry, but it is fortunately fixed
now!

Thanks a lot.

Jan

___
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] Divider in grid environment

2014-02-13 Thread Jan Tosovsky
On 2014-02-08 Jan Tosovsky wrote:
> On 2014-02-08 Jan Tosovsky wrote:
>
> Additionally, I'd like to keep that divider with the previous content
> (paragraph).
> 
> In this case AFAIK \testpage[n] cannot be used directly in the divider
> definition as it breaks the page at position of this command.
> 
> I'd like to express rather: If there is no space for three lines, 
> break the page, but grab few previous lines (at least 2) together 
> with me (according to orphan/widow settings).
> 
> The current behaviour can be demonstrated using this example:
> 
> \startsetups[grid][mypenalties]
> \setdefaultpenalties
> \setpenalties\widowpenalties{2}{1}
> \setpenalties\clubpenalties {2}{1}
> \stopsetups
> 
> \setuplayout[grid=yes, setups=mypenalties]
> \showgrid
> \showlayoutcomponents
> 
> \starttext
> \blank[force, 30*line]
> \input{tufte}
> \blank[4mm]\middlealigned{\hl[4]}\blank[6mm]
> \stoptext
> 

I found that \page[no] does exactly what I wanted. If needed, it breaks the
page not at the positon of a divider, but sooner, so that divider is
preceded at least with 2 lines of text.

\page[no]\blank[4mm]\middlealigned{\hl[4]}\blank[6mm]

Jan

___
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] wrong \sc i with Palatino Linotype

2014-02-17 Thread Jan Tosovsky
On 2014-02-17 Pablo Rodriguez wrote:
> 
> I have noticed that ConTeXt (beta from 2014.02.14 17:07) has a problem
> with Palatino Linotype.
> 
> Here the sample:
> 
> \definefontfeature[capstosc][c2sc=yes]
> \definefontfamily[mainface][serif][Palatino Linotype]
> \setupbodyfont[mainface]
> \starttext
> {\addfeature[capstosc] AEIOU}
> 
> \sc aeiou
> \stoptext
> 
> All vowels are fine, but the i is a dotted small cap i. The regular
> small cap i is defined as i.sc (and the dotted small cap i is defined
> as i.sc too). But FontForge applies both c2sc and smcp substitutions
> fine.
> 

It seems to be a regression as this example now produces a dot as well:
http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV

(in ConTeXt 2013.12.20 it was Ok)

Jan

___
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] Indenting after floating image

2014-02-17 Thread Jan Tosovsky
Dear All,

when an indenting is set, it is applied in a smart way and sometimes
suppressed, e.g after images.

But when the image is floating and forced to be displayed on a separate
page, I would expect the indenting of the following paragraph preserved.
Currently it doesn't, see this example:

\setupexternalfigures[location=default]
\setupindenting[medium, yes]

\starttext
\input{ward}
\startplacefigure[number=no, location={page}, title={}]
\externalfigure[cow]
\stopplacefigure
\input{ward}
\stoptext

Is there a global switch for it or am I to force the indenting in these
cases manually?

Thanks, Jan

___
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] Indenting after floating image

2014-02-19 Thread Jan Tosovsky
On 2014-02-19 Thangalin wrote:
>
> A work-around:
> 
> \setupexternalfigures[location=default]
> \setupindenting[yes,medium]
> 
> \define[1]\PlaceFigure{
>   \startplacefigure[number=no, location={page}, title={}]
>   \externalfigure[#1]
>   \stopplacefigure
>   \\ \vskip-1em
> }
> 
> \starttext
> \input{ward}
> \PlaceFigure{cow}
> \input{ward}
> \stoptext
> 
> The wiki states:
> 
> \setupindenting does not take care of indenting after environments,
> such as ConTeXt's itemizes, enumerations, definitions, formulas and
> floats.
> 
> The work-around forces the new line using \\, then immediately skips
> back a line.

Thanks for sharing your approach. In meantime I've found an alternative
solution:

... 
\stopplacefigure
\indentation % this command forces the indentation of the next first
paragraph

Jan

___
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] Various setuptolerance settings within a single document

2014-02-19 Thread Jan Tosovsky
Dear All,

I'd like to apply 'verystrict' tolerance as a default value, which would be
overridden by less strict values in several specific paragraphs with tricky
word combinations causing problems when hyphenating.

But when \setuptolerance command is used multiple times, the last one seems
to be active only from that place on.

When settings is wrapped by \start \stop commands, it seems to be ignored:

\start
\setuptolerance[tolerant]
%text
\stop

Is there any way how to achieve this or do I have to use the lowest required
value for the whole document?

Thanks, Jan

___
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] Various setuptolerance settings within a single document

2014-02-19 Thread Jan Tosovsky
On 2014-02-19 Wolfgang Schuster wrote:
> 
> Am 19.02.2014 um 21:00 schrieb Jan Tosovsky :
> 
> > I'd like to apply 'verystrict' tolerance as a default value, which
> > would be overridden by less strict values
> >
> > When settings is wrapped by \start \stop commands, it seems to be
> > ignored:
> >
> > \start
> > \setuptolerance[tolerant]
> > %text
> > \stop
> >
> 
> Can you try to end the paragraph before the \stop with a empty line or
> the \par command.

Wow! Ending that block with \par\stop does the job!

Thanks a lot for this hint!

Jan

___
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] Paragraph - the last line handling

2014-02-19 Thread Jan Tosovsky
On 2013-11-23 Hans Hagen wrote:
> On 11/23/2013 2:43 PM, Jan Tosovsky wrote:
> > On 2013-11-23 Hans Hagen wrote:
> >> On 11/22/2013 11:07 PM, Jan Tosovsky wrote:
> >>>
> >>> in my document there are lot of cases when the last line in the
> >>> paragraph has a very narrow gap on the right.
> >>
> >> \hsize 15.4cm
> >>
> >> \input tufte
> >>
> >> \parfillskip30pt plus 1 fill  \input tufte
> >
> > Wow, exactly! Thanks a lot.
> >
> > Sorry for a dumb question, but is there any way how to use it
> > globally for all paragraphs in my document?
> 
> no, as i need to think of a decent interface to that (so remind me in a
> few months)

When this gap (parfillskip) is set in the beginning of the document, it is
shared for all paragraphs within the document. I was not aware of that.

But I've encountered this weird edge case. When the text is followed with
\stopregister command, the last line has no gap at all:


\starttext

\hsize 15.3cm % in older versions this value has to be set to 15.4cm

\input tufte

\parfillskip 30pt plus 1 fill  

\input tufte
 
\startregister[index][test]{test}
\input{tufte}
\stopregister[index][test]

\stoptext

It can be fixed by a blank line inserted before \stopregister command, but
this is unacceptable in my case for other reasons.

Any idea?

Thanks, Jan

___
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] Hanging punctuation misalignment in footnotes

2014-02-21 Thread Jan Tosovsky
Dear All,

when hanging in footnotes is enabled and the starting character is a
punctuation, it is not protruded. However, the same character in the
footnote body works fine. When both cases are close each other, it looks
weird, see the screenshot:

http://drifted.in/other/footnote_alignment.png

Would it be possible make this behaviour uniform - either do not protrude it
on the starting (left) edge or protrude it everywhere?

Thanks, Jan

___
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] Hanging punctuation misalignment in footnotes

2014-02-21 Thread Jan Tosovsky
On 2014-02-22 Jan Tosovsky wrote:
> 
> when hanging in footnotes is enabled and the starting character is a
> punctuation, it is not protruded. However, the same character in the
> footnote body works fine. When both cases are close each other, it
> looks weird, see the screenshot:
> 
> http://drifted.in/other/footnote_alignment.png
> 
> Would it be possible make this behaviour uniform - either do not
> protrude it
> on the starting (left) edge or protrude it everywhere?
> 

A minimal example is available at 
http://drifted.in/other/sample.tex

(those guillemets would be lost here in the mailing list)

Tested in the current beta on Windows (it requires Palatino Linotype font).

Jan

___
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] Protrusion cancellation by index term

2014-02-21 Thread Jan Tosovsky
Dear All, 

when a punctuated phrase appears at the beginning of the line, it is not
protruded correctly when preceded by an index term.

... \index{foo}>Bar< ...

A minimal example is available at 
http://drifted.in/other/sample.tex

I cannot place the space character between these two parts (which helps) as
I sometimes need to join this and the previous phrase with the non-breaking
space.

Any idea how to fix this?

Thanks, Jan




___
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] Hanging punctuation misalignment in footnotes

2014-02-22 Thread Jan Tosovsky
On 2014-02-22 Hans Hagen wrote:
> On 2/22/2014 1:25 AM, Jan Tosovsky wrote:
> > On 2014-02-22 Jan Tosovsky wrote:
> >>
> >> when hanging in footnotes is enabled and the starting character is a
> >> punctuation, it is not protruded. However, the same character in the
> >> footnote body works fine. When both cases are close each other, it
> >> looks weird, see the screenshot:
> >>
> >> http://drifted.in/other/footnote_alignment.png
> >>
> >> Would it be possible make this behaviour uniform - either do not
> >> protrude it
> >> on the starting (left) edge or protrude it everywhere?
> >>
> >
> > A minimal example is available at
> > http://drifted.in/other/sample.tex
> >
> > (those guillemets would be lost here in the mailing list)
> >
> > Tested in the current beta on Windows (it requires Palatino Linotype
> font).
> 
> Hard to solve that one fast .. basically all that gets bound to 
> a next characters makes that next character not protrude. This is 
> not something the engine can solve as it doesn't know what it deals 
> with (so the current behaviour is as it should be).

:-/

> Maybe in a future version of context I can deal with it (as I know how
> to do it, but that doesn't help much now).

I am looking forward to it. 

While I can intervene manualy now {\hskip -0.7mm}>Fel..., it is of no use
for dynamic publishing.

Thanks, Jan

___
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] Paragraph - the last line handling

2014-02-22 Thread Jan Tosovsky
On 2014-02-19 Jan Tosovsky wrote:
> On 2013-11-23 Hans Hagen wrote:
> > On 11/23/2013 2:43 PM, Jan Tosovsky wrote:
> > > On 2013-11-23 Hans Hagen wrote:
> > >> On 11/22/2013 11:07 PM, Jan Tosovsky wrote:
> > >>>
> > >>> in my document there are lot of cases when the last line in the
> > >>> paragraph has a very narrow gap on the right.
> > >>
> > >> \hsize 15.4cm
> > >>
> > >> \input tufte
> > >>
> > >> \parfillskip30pt plus 1 fill  \input tufte
> > >
> > > Wow, exactly! Thanks a lot.
> > >
> > > Sorry for a dumb question, but is there any way how to use it
> > > globally for all paragraphs in my document?
> >
> > no, as i need to think of a decent interface to that (so remind me in
> > a few months)
> 
> When this gap (parfillskip) is set in the beginning of the document, it
> is shared for all paragraphs within the document. I was not aware of that.
>

I've found while this setting in the beginning of the document is applied to
all paragraphs, it is not shared in footnotes.

I am fixing it by repeating this command at the beginning of every footnote,
but I am curious why footnotes are handled differently. 

Is it possible to set this behavïour for footnotes globally only once?

Thanks, Jan


___
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] Protrusion cancellation by index term

2014-02-22 Thread Jan Tosovsky
On 2014-02-22 Jan Tosovsky wrote:
>
> when a punctuated phrase appears at the beginning of the line, it is
> not protruded correctly when preceded by an index term.
> 
> ... \index{foo}>Bar< ...
> 
> A minimal example is available at
> http://drifted.in/other/sample.tex
> 
> I cannot place the space character between these two parts (which
> helps) as I sometimes need to join this and the previous phrase with 
> the non-breaking space.
> 

It is more serious issue than expected. Consider next two variants:

(1) sentence, \index{primary}>Primary< 
(2) sentence,\index{primary} >Primary<

When the line is broken after a comma:
ad 1) starting guillemet is not protruded
ad 2) ending comma is not protruded

When \index is surrounded by spaces from both sides, the space is rendered
at the beginning of the next line (resulting in 'indenting').

:-S

I'd be grateful for ignoring any non document content preceding punctuation
to avoid its influence on protrusion.

Thanks, Jan

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

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


[NTG-context] Interaction's focus for footnotes/index entries

2014-02-23 Thread Jan Tosovsky
Dear All,

'focus=standard' settings for interaction seems to be supported for ToC
only...
When any hyperlink for footnote or index is clicked, the zoom is set to
FitPage:

\setupinteraction[state=start,focus=standard]
\starttext
\startfrontmatter
\completecontent
\stopfrontmatter
\startbodymatter
\section{Primary}\index{primary}
Dummy text\footnote{footnote}.
\stopbodymatter
\startbackmatter
\completeindex
\stopbackmatter
\stoptext

Just generate the output, zoom the second or third page in and click any
hyperlink on that scaled page. It points to the correct location, but the
original page zoom is discarded...

Is there something else to switch on?

Thanks, Jan

___
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] Interaction's focus for footnotes/index entries

2014-02-24 Thread Jan Tosovsky
On 2014-02-24 Rik Kabel wrote:
> On 2014-02-23 17:24, Jan Tosovsky wrote:
> >
> > 'focus=standard' settings for interaction seems to be supported for
> > ToC only...
> > When any hyperlink for footnote or index is clicked, the zoom is set
> > to FitPage:
> >
> > \setupinteraction[state=start,focus=standard]
> > \starttext
> > \startfrontmatter
> > \completecontent
> > \stopfrontmatter
> > \startbodymatter
> > \section{Primary}\index{primary}
> > Dummy text\footnote{footnote}.
> > \stopbodymatter
> > \startbackmatter
> > \completeindex
> > \stopbackmatter
> > \stoptext
> >
> > Just generate the output, zoom the second or third page in and click
> > any hyperlink on that scaled page. It points to the correct location, 
> > but the original page zoom is discarded...
> >
> > Is there something else to switch on?
> >
>
> Works as expected here with Sumatra PDF on Windows 8.1. Zoom does not
> change from any link.

My PDF viewer is Adobe Reader XI (11.0.06) on Windows 7. The file is
produced with the current ConTeXt beta (2014-02-14).

It does not work for me. I can confirm it is Ok in Summatra (less strict to
the standard?), but it should work everywhere. 

Jan

___
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] [Index] Indenting long primaries after secondaries

2014-02-26 Thread Jan Tosovsky
Dear All,

when a long primary is preceded with the secondary or tertiary index entry,
the second line is not indented as usual, see the following example:

\setupregister[balance=no]
\starttext
\index{primary+secondary+tertiary}
\index[primary long]{\dorecurse{5}{primary long }}
\index[primary longer]{\dorecurse{5}{primary longer }} % but this is Ok
\input{tufte}
\completeindex
\stoptext

How can I avoid this?

Thanks, Jan

___
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] Footnote mark gap

2014-02-27 Thread Jan Tosovsky
Dear All,

when footnotes are placed after certain accented characters, the
corresponding footnote marks are rendered too close to them:

\starttext
í\footnote{í}
T\footnote{T}
ľ\footnote{ľ}
ě\footnote{ě}
ď\footnote{ď}
\stoptext

Is there any option for making this distance a bit larger?

On the other hand this gap may produce too much white space when placed
after characters like period or comma...

Ideally it could be positioned 'optically' ;-)

Regards, Jan

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

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


Re: [NTG-context] Footnote mark gap

2014-02-28 Thread Jan Tosovsky
On 2014-02-27 Wolfgang Schuster wrote: 
> Am 27.02.2014 um 23:19 schrieb Thangalin :
> 
> > Try:
> >
> > \setupfootnotes[
> >  textstyle={\hskip.05em},
> > ]
> 
> It's better to add the space with the textcommand key.
> 
> \setupnote[footnote][textcommand={\hairspace\high}]

Thanks! I was trying \hskip on \setupnotation[footnote] before as I though
this command is preferred in MkIV. My fault. 

When I saw 'hairspace' I was afraid the footnote mark can wrap to the next
line, but after some tests it seems to be a false assumption.

Jan

___
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] [Index] Indenting long primaries after secondaries

2014-03-07 Thread Jan Tosovsky
On 2014-02-26 Jan Tosovsky wrote:
> 
> when a long primary is preceded with the secondary or tertiary 
> index entry, the second line is not indented as usual, see 
> the following example:
> 
> \setupregister[balance=no]
> \starttext
> \index{primary+secondary+tertiary}
> \index[primary long]{\dorecurse{5}{primary long }}
> \index[primary longer]{\dorecurse{5}{primary longer }} % but this is Ok
> \input{tufte}
> \completeindex
> \stoptext
> 

I've tested this in new beta and the issue is still there...

Jan

___
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] [Index] Indenting long primaries after secondaries

2014-03-16 Thread Jan Tosovsky
On 2014-03-16 Hans Hagen wrote:
> On 3/7/2014 6:54 PM, Jan Tosovsky wrote:
> > On 2014-02-26 Jan Tosovsky wrote:
> >>
> >> when a long primary is preceded with the secondary or tertiary
> >> index entry, the second line is not indented as usual, see
> >> the following example:
> >>
> >> \setupregister[balance=no]
> >> \starttext
> >> \index{primary+secondary+tertiary}
> >> \index[primary long]{\dorecurse{5}{primary long }}
> >> \index[primary longer]{\dorecurse{5}{primary longer }} % Ok 
> >> \input{tufte}
> >> \completeindex
> >> \stoptext
> >>
> 
> how is a \dorecurse supposed to get sorted ...
> 

That \dorecurse is used in this MWE only to make it shorter. Indeed, this
command confuses the letter grouping procedure so this is the reason why I
specified the sorting key via the bracket syntax [].

I think there is no need to fix this grouping issue (not enough ROI), but if
so, I would expect to resolve the \dorecurse command first and then apply
the grouping/sorting etc.

My main wish is fixing that indentation (or offering any workaround).

Thanks, Jan

___
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] [Index] Indenting long primaries after secondaries

2014-03-16 Thread Jan Tosovsky
On 2014-03-16 Hans Hagen wrote:
> >>> On 2014-02-26 Jan Tosovsky wrote:
> >>>>
> >>>> when a long primary is preceded with the secondary or tertiary
> >>>> index entry, the second line is not indented as usual, see
> >>>> the following example:
> >>>>
> >>>> \setupregister[balance=no]
> >>>> \starttext
> >>>> \index{primary+secondary+tertiary}
> >>>> \index[primary long]{\dorecurse{5}{primary long }}
> >>>> \index[primary longer]{\dorecurse{5}{primary longer }} % Ok
> >>>> \input{tufte}
> >>>> \completeindex
> >>>> \stoptext
> >>>>
> >
> > My main wish is fixing that indentation (or offering any workaround).
> 
> we get this:
> 
> p
> primary
>secondary
>  tertiary 1
> primary long primary long primary
>long primary long primary long 1
> primary longer primary longer primary
>longer primary longer primary longer
>1
> 

hmm, I was getting different output in ConTeXt-2014.03.07:

p
primary
  secondary
 tertiary 1
primary long primary long primary
long primary long primary long 1 (!!! this was not indented)
primary longer primary longer primary
  longer primary longer primary longer 1

(or see the screenshot)

I've just updated ConTeXt to 2014.03.16 and now it works as expected!

Thanks a lot!

Jan


long_primary.png
Description: Binary data
___
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] Regression in register processing in last beta

2014-03-16 Thread Jan Tosovsky
Dear All,

I have to admit I use quite cumbersome code to get desired output, but while
it was working in previous betas, now emergency stop is reported:
'Extra }, or forgotten \endgroup'

Here is MWE:

\setupalign[hz, hanging]
\setupindenting[medium, yes]
\setupnotation[footnote][align={hz, hanging}]

\starttext
Hello One
\start
\setuptolerance[strict] 
\startregister[index][two]{two}
Hello Two

This is \footnote{
\parfillskip 14pt plus 1 fill
Footnote \index{content}content.
}\par\stop  % this brace is reported as unexpected character here
\stopregister[index][two]

\page
\placeindex
\stoptext

Briefly, when footnotes appear in \startregister ... \stopregister block,
processing is somehow confused and ends prematurely.

ConTeXt-2014.03.16
LuaTeX 0.79
Win7-64bit

Any suggestion how to update my code to get it working again?

Thanks, Jan

___
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] Regression in register processing in last beta

2014-03-16 Thread Jan Tosovsky
On 2014-03-16 Jan Tosovsky wrote:
> Dear All,
> 
> I have to admit I use quite cumbersome code to get desired output, but
> while
> it was working in previous betas, now emergency stop is reported:
> 'Extra }, or forgotten \endgroup'
> 
> Here is MWE:
> 
> \setupalign[hz, hanging]
> \setupindenting[medium, yes]
> \setupnotation[footnote][align={hz, hanging}]
> 
> \starttext
> Hello One
> \start
> \setuptolerance[strict]
> \startregister[index][two]{two}
> Hello Two
> 
> This is \footnote{
> \parfillskip 14pt plus 1 fill
> Footnote \index{content}content.
> }\par\stop  % this brace is reported as unexpected character here
> \stopregister[index][two]
> 
> \page
> \placeindex
> \stoptext
> 
> Briefly, when footnotes appear in \startregister ... \stopregister
> block,
> processing is somehow confused and ends prematurely.
> 
> ConTeXt-2014.03.16
> LuaTeX 0.79
> Win7-64bit
> 
> Any suggestion how to update my code to get it working again?
> 

There was mistake in my code:
\startregister has to be before \start command to be correctly paired. 

Maybe parsing is now stricter, which I rather appreciate :-)

Sorry for the noise,

Jan

___
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] Regression in register processing in last beta

2014-03-16 Thread Jan Tosovsky
On 2014-03-16 Hans Hagen wrote:
> On 3/16/2014 7:25 PM, Jan Tosovsky wrote:
> > Dear All,
> >
> > I have to admit I use quite cumbersome code to get desired output,
> but while
> > it was working in previous betas, now emergency stop is reported:
> > 'Extra }, or forgotten \endgroup'
> >
> > Here is MWE:
> >
> > \setupalign[hz, hanging]
> > \setupindenting[medium, yes]
> > \setupnotation[footnote][align={hz, hanging}]
> >
> > \starttext
> > Hello One
> > \start
> > \setuptolerance[strict]
> > \startregister[index][two]{two}
> > Hello Two
> >
> > This is \footnote{
> > \parfillskip 14pt plus 1 fill
> > Footnote \index{content}content.
> > }\par\stop  % this brace is reported as unexpected character here
> > \stopregister[index][two]
> >
> > \page
> > \placeindex
> > \stoptext
> >
> > Briefly, when footnotes appear in \startregister ... \stopregister
> block,
> > processing is somehow confused and ends prematurely.
> >
> > ConTeXt-2014.03.16
> > LuaTeX 0.79
> > Win7-64bit
> >
> > Any suggestion how to update my code to get it working again?
> 
> ah, i have to swap some definition order 
> 
> new beta coming

:-) Awesome!

Thanks for quick fix! Now it works even without source changes!

Jan


___
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] Orphans/Widows in the Index

2014-04-23 Thread Jan Tosovsky
Dear All,

in my auto-generated two column index (registry) there are several cases of
widows - it is the last item of the given letter which overflows to next
column/page:

--- (start page) ---
Usti 29 (!!! - I would expect to place here also one or better two
previous entries)

V
Vamberk 18 
...
...


There are also few cases of orphans, but this is not so strange:
...
...
Josef 29

K (!!! - both these lines could be moved to the next
column/page)
Karel 69  
 (end page) -

In my setup I have defined:

\startsetups[grid][mypenalties]
\setdefaultpenalties
\setpenalties\widowpenalties{2}{1} % change to {3}{1} doesn't
help
\setpenalties\clubpenalties {2}{1}
\stopsetups

\setuplayout[grid=yes, setups=mypenalties]

It is hard to provide MWE. Moreover, the content is for private use only.

Is there any remedy for this?

Thanks, Jan

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