Re: [NTG-context] LMTX deeptextcommand issue

2019-04-02 Thread Jan Tosovsky
On 2019-04-02 Hans Hagen wrote:
> On 4/2/2019 8:41 PM, Jan Tosovsky wrote:
> >
> > my document ends with the index
> >
> > \startbackmatter
> > \chapter{Rejstřík jmenný}
> > \start
> > \switchtobodyfont[8pt]
> > \placeindexname
> > \stop
> > \stopbackmatter
> > \startbackmatter
> > \chapter{Rejstřík věcný}
> > \start
> > \switchtobodyfont[8pt]
> > \placeindexsubject
> > \stop
> > \stopbackmatter
> >
> > At the beginning there is a condition for one word (kind of manual column
> > balancing) - but according to the log, see below, this seems to be an issue:
> > \newconditional\IndexState
> > \define[1]\IndexInternalCommand
> >
> >
> {\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexSt
> a
> > te}#1}
> >
> > \define[1]\IndexCommand
> >{\setfalse\IndexState
> > \setbox\scratchbox\hbox{#1}%
> > \ifconditional\IndexState
> >   \column
> > \fi
> > \box\nextbox}
> 
> does
> 
> \unexpanded\def\IndexCommand#1%
>{
> 
> work?

I've modified that block this way:

\newconditional\IndexState
%\define[1]\IndexInternalCommand
\unexpanded\def\IndexInternalCommand#1%
  
{\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexState}#1}

%\define[1]\IndexCommand
\unexpanded\def\IndexCommand#1%
  {\setfalse\IndexState
   \setbox\scratchbox\hbox{#1}%
   \ifconditional\IndexState
 \column
   \fi
   \box\nextbox}


Is it what you propose? If so, I am still getting the same error.

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] LMTX deeptextcommand issue

2019-04-02 Thread Jan Tosovsky
Dear All,

my document ends with the index

\startbackmatter
\chapter{Rejstřík jmenný}
\start
\switchtobodyfont[8pt]
\placeindexname
\stop
\stopbackmatter
\startbackmatter
\chapter{Rejstřík věcný}
\start
\switchtobodyfont[8pt]
\placeindexsubject
\stop
\stopbackmatter

At the beginning there is a condition for one word (kind of manual column
balancing) - but according to the log, see below, this seems to be an issue:
\newconditional\IndexState
\define[1]\IndexInternalCommand
 
{\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexSta
te}#1}

\define[1]\IndexCommand
  {\setfalse\IndexState
   \setbox\scratchbox\hbox{#1}%
   \ifconditional\IndexState
 \column
   \fi
   \box\nextbox}

\defineregister[indexname][indexnames]
\setupregister[indexname][command=\Word, textcommand=\IndexCommand,
deeptextcommand=\IndexInternalCommand]

\defineregister[indexsubject][indexsubjects]
\setupregister[indexsubject][command=\Word]
\setupheadtext[indexname=Rejstřík jmenný]
\setupheadtext[indexsubject=Rejstřík věcný]


This worked in luatex 1.0.1, but in LMTX I am getting:

structures  > begin of sectionblock 'backpart'
structure   > sectioning > chapter @ level 2 : 0.1 -> Rejstřík jmenný
fonts   > defining > font 'palab', feature 'locl', script 'latn', no
language 'dflt'

tex error   > tex error on line 25 in file
D:/context-lmtx/tex/texmf-context/tex/context/base/mkiv/page-run.mkiv: ?

 [internal expandable lua function call]
   
\IndexInternalCommand ...\setfalse \IndexState }#1
  
\IndexCommand ...ate \setbox \scratchbox \hbox {#1
  }\ifconditional
\IndexStat...
\doapplyregisterentrycommand ...extcommand {#2
  \dostoptagged 
\registerentry ...plyregisterentrycommand {#2}{#5}
  \fi \else \let
\currentreg...
l.25 }

...l.11633 \stop
   

15 
16 \registerctxluafile{page-run}{}
17 
18 \unprotect
19 
20 \unexpanded\gdef\showprint{\dotripleempty\page_layouts_show_print}
21 
22 \gdef\page_layouts_show_print[#1][#2][#3]% only english
23   {\setbuffer[crap]%
24   \unprotect
25 >>  \definepapersize[X][\c!width=4em, \c!height=6em]
26 \definepapersize[Y][\c!width=12em,\c!height=14em]
27 \setuppapersize[X,#1][Y,#2]
28 \setuplayout[#3]
29 \setuplayout[\v!page]
30 \framed
31   [\c!offset=\v!overlay,\c!strut=\v!no,
32\c!width=\paperwidth,\c!height=\paperheight]
33   {\ss ABC\par DEF}%
34   \protect
35\endbuffer


When I've seen that 'crap' and weird page dimensions, I thought it is part
of the April fool, like all that LMTX announcement.

This issue is not urgent, I was just curious how different the output is.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] LuaTex on Windows PCs

2019-03-04 Thread Jan Tosovsky
On 2019-03-04 Hans Hagen wrote:
> On 3/4/2019 4:58 PM, Nigel King wrote:
> > IT do not seem to be able to install a working version of LuaTeX on PCs.
> > I have directed them to ConTeXt Garden but they have had no luck.
> >
> 
> https://wiki.contextgarden.net/ConTeXt_Standalone
> 
> download
> 
> http://minimals.contextgarden.net/setup/context-setup-mswin.zip
> http://minimals.contextgarden.net/setup/context-setup-win64.zip
> 
> unzip someplace, then run
> 
> first-setup.bat
> 

I suppose the problematic part is rsync here, which communicates via unusual 
port number 873. It is typically disabled in company environments.

I encountered this few years ago. Now I've found a workaround for this (but not 
tested):
https://www.poftut.com/specify-different-port-for-linux-rsync/

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 <j.tosov...@email.cz> 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
___

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] 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] 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] 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] Overfull annotations

2016-04-12 Thread Jan Tosovsky
On 2016-04-12 Hans Hagen wrote:
> On 4/12/2016 9:11 PM, Jan Tosovsky wrote:
> >
> > But to be honest, the best for me would be PDF annotations
> > (rectangles) placed to that occurrences. In Acrobat Reader 
> > you can easily list them and automatically navigate to the 
> > target location (and then jump to the prev/next).
> 
> \enabletrackers[builders.hpack.quality]
> \enabletrackers[builders.hpack.overflow]
> 
> \starttext
>  \hsize 8cm \input tufte
> \stoptext
> 

Nice. But..

My use case is 300+ pages book with several occurences. If those red rectangles 
were provided as annotations, I could efficiently jump from one to another, 
without browsing all the book (thanks to the special Annotation pane).
http://ptgmedia.pearsoncmg.com/images/chapter09_0321751256/elementLinks/rc_13.jpg

Both searching occurrences (in PDF) using the line number of the original 
source or visually by looking for red rectangles is IMHO inefficient.

However, I agree there are more important features to implement.

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] docbook(5) to context conversion

2016-04-12 Thread Jan Tosovsky
On 2016-02-25 Jan Tosovsky wrote:
> On 2016-02-23 David Nebauer wrote:
> > On 23/02/16 06:33, Jan Tosovsky wrote:
> > > On 2016-02-22 David Nebauer wrote:
> > > >
> > > > Are there any publicly available solutions for 
> > > > converting docbook/docbook5 to context? ...
> > > >
> > > > * dbcontext - part of dblatex, abandoned ~10 years ago
> > >
> > > I used this way some time ago, but it required tweaks in 
> > > approx 10 xslt files to make it compatible with Context MkIV
> >
> > Cool. Any chance you could post your amended xslt files to give a
> > newbie a head start?
> 
> Ok, I will publish it on my GitHub account later next week (after
> necessary cleanup).

As promised, I've published a set of XSLT stylesheets for DocBook to ConTeXt 
conversion.

Details can be found at http://doctribute.com/blog/

There is also a step by step description how to test stylesheets on a sample 
DocBook v4 book.

As you can see, I've changed my mind and instead of patching dbcontext project 
I created a new one. It finally took more time than originally estimated.

If you encounter any misleading info or inclarity, 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
___

[NTG-context] Overfull annotations

2016-04-12 Thread Jan Tosovsky
Dear All,

thanks to the following command I can already filter out everything except
under/overfull cases:
context --noconsole source.tex

It is nice, but would it be possible to print also affected page numbers of
the final PDF file?

But to be honest, the best for me would be PDF annotations (rectangles)
placed to that occurrences. In Acrobat Reader you can easily list them and
automatically navigate to the target location (and then jump to the
prev/next).

Thanks in advance for a new option :-)

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] Weird background colors in autogenerated index

2016-04-12 Thread Jan Tosovsky
On 2016-04-12 Wolfgang Schuster wrote:
> On 2016-04-12 Jan Tosovsky wrote:
> 
> > I am completely lost. I found page-grd.mkiv, but I have 
> > no idea what to tweak here.
> 
> > By simple putting \showgrid[reset] at the beginning of 
> > the document no grid is shown, but those colored areas 
> > are present.
> 
> You can’t disable the backgrounds with the current beta but 
> in one of the coming betas you can use the "reset" key to 
> disable the grid visualizers and enable afterwards only
> the grid lines.
> 

Ah, thanks for clarification. No problem.

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] Weird background colors in autogenerated index

2016-04-12 Thread Jan Tosovsky
On 2016-04-12 Hans Hagen wrote:
> On 4/11/2016 8:13 PM, Jan Tosovsky wrote:
> > On 2016-04-10 Hans Hagen wrote:
> >> On 4/10/2016 11:26 PM, Pablo Rodriguez wrote:
> >>> On 04/10/2016 11:00 PM, Jan Tosovsky wrote:
> >>>> On 2016-04-10 Hans Hagen wrote:
> >>>>> On 4/9/2016 11:22 PM, Jan Tosovsky wrote:
> >>>>>>
> >>>>>> since LuaTeXt 0.81 my back-of-the-book index (register) is
> >>>>>> with generated strange background colors. The index title
> >>>>>> is typeset in yellowish background and the left column of
> >>>>>> the last index page has a blue background.
> >>>
> >>> here you have the minimal sample:
> >>>
> >>> \showgrid
> >>> \starttext
> >>> a\index{b}
> >>> \completeindex
> >>> \stoptext
> >>>
> >>> Comment the first line and colors background colors will 
> >>> disappear.
> >
> > My idea is to have a single PDF source to showcase some 
> > ConTeXt features, where displaying the grid is handy, yet 
> > allow disabling the grid on demand.
> 
> ... you can influence the grid a bit:
> 
> \showgrid[reset,...]
> 
> You're lucky that it's only a few lines to add 'columns' options 
> (so in some upcoming beta you have to mess with 'reset' 
> and whatever else).
> 

I am completely lost. I found page-grd.mkiv, but I have no idea what to tweak 
here.

By simple putting \showgrid[reset] at the beginning of the document no grid is 
shown, but those colored areas are present.

I am giving it up.

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] Ligature color is not reliable

2016-04-11 Thread Jan Tosovsky
On 2016-04-11 Hans Hagen wrote:
> On 4/11/2016 9:06 PM, Jan Tosovsky wrote:
> > On 2016-04-09 Jan Tosovsky wrote:
> >>
> >> for an illustration I wanted to colorize all ligatures, but the
> >> following method is not reliable for three character ligatures
> >> - which ends up black.
> >>
> >> While tested with Palatino, it can be simulated even with
> >> a default font (however there are missing ffi and ffl ligatures).
> >>
> >> \definefontfamily[palatino][rm][Palatino Linotype]
> >> [features={default, quality}]
> >> \setupbodyfont[palatino]
> >>
> >> \starttext
> >> Je{\red ff}, the o{\red ffi}ce on the {\red fi}rst {\red fl}oor
> >> is o{\red ffl}ine.
> >> \stoptext
> >>
> >> What is happening here?
> >>
> >
> > Any idea how to properly colorize those ligatures?
> 
> update

Wow! It works 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] Ligature color is not reliable

2016-04-11 Thread Jan Tosovsky
On 2016-04-09 Jan Tosovsky wrote:
> 
> for an illustration I wanted to colorize all ligatures, but the
> following method is not reliable for three character ligatures 
> - which ends up black.
> 
> While tested with Palatino, it can be simulated even with 
> a default font (however there are missing ffi and ffl ligatures).
> 
> \definefontfamily[palatino][rm][Palatino Linotype]
> [features={default, quality}]
> \setupbodyfont[palatino]
> 
> \starttext
> Je{\red ff}, the o{\red ffi}ce on the {\red fi}rst {\red fl}oor 
> is o{\red ffl}ine.
> \stoptext
> 
> What is happening here?
> 

Any idea how to properly colorize those ligatures?

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] Weird background colors in autogenerated index

2016-04-11 Thread Jan Tosovsky
On 2016-04-10 Hans Hagen wrote:
> On 4/10/2016 11:26 PM, Pablo Rodriguez wrote:
> > On 04/10/2016 11:00 PM, Jan Tosovsky wrote:
> >> On 2016-04-10 Hans Hagen wrote:
> >>> On 4/9/2016 11:22 PM, Jan Tosovsky wrote:
> >>>>
> >>>> since LuaTeXt 0.81 my back-of-the-book index (register) is
> >>>> with generated strange background colors. The index title
> >>>> is typeset in yellowish background and the left column of
> >>>> the last index page has a blue background, see the attachment.
> >>>>
> >>>> ... It was fine in the version 0.80.
> >>>
> >>> no example
> >
> > here you have the minimal sample:
> >
> >\showgrid
> >\starttext
> >a\index{b}
> >\completeindex
> >\stoptext
> >
> > Comment the first line and colors background colors will disappear.

a good catch, Pablo, thanks.

> indeed, it's tracing related (no bug)

My idea is to have a single PDF source to showcase some ConTeXt features, where 
displaying the grid is handy, yet allow disabling the grid on demand. 

So any visible \showgrid related issues, which cannot be switched off together 
with the grid layer, are unacceptable ;-)

Is there any chance to improve this a bit?

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] Weird background colors in autogenerated index

2016-04-10 Thread Jan Tosovsky
On 2016-04-10 Hans Hagen wrote:
> On 4/9/2016 11:22 PM, Jan Tosovsky wrote:
> >
> > since LuaTeXt 0.81 my back-of-the-book index (register) is 
> > with generated strange background colors. The index title 
> > is typeset in yellowish background and the left column of 
> > the last index page has a blue background, see the attachment.
> >
> > ... It was fine in the version 0.80.
> 
> no example

I've published both the ConTeXt source and the final PDF here:
http://drifted.in/other/context/

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

2016-04-10 Thread Jan Tosovsky
On 2016-04-03 Hans Hagen wrote:
> On 4/1/2016 9:59 PM, Jan Tosovsky wrote:
> > On 2016-04-01 Hans Hagen wrote:
> >> On 3/31/2016 10:47 PM, Wolfgang Schuster wrote:
> >>>> On 2016-03-31 Jan Tosovsky wrote:
> >>>>
> >>>> I couldn't find any details for that \leftboundary
> >>>
> >>> spac-ver.mkiv:
> >>>
> >>> \unexpanded\def\leftboundary   {\boundary\plusone}
> >>> \unexpanded\def\rightboundary  {\boundary\plustwo}
> >>
> >> it will instruct the protrusion checker to skip the next or
> >> previous node (e.g. a char or hbox or ...) when looking for
> >> an edge
> >
> > Thanks for details. So if that worked with plain \hbox should be
> taken rather as coincidence?
> 
> a hbox becomes one node so that one node is ignored
> 

I found a nasty drawback of this method. If that hbox is used, the first 
paragraph is not evaluated correctly and considered as the second one. When 
indentation is enabled, the first paragraph after the title is not usually 
indented, but now it is. Additionaly, even if indenting is disabled, there is a 
bigger distance between title and the following para.

\setupindenting[yes, 2em]

\starttext

\section{The first section}\index{the first section}

The first para.\par
The second para.

\section{The second section}\leftboundary\hbox{\index{the second section}}

The first para.\par
The second para.

\stoptext


I could eventually avoid inserting that 'index' tweak into titles, but this is 
another exception which an end-user should keep in mind ..and.. I hate 
exceptions ;-)

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] Redirect compilation to another .pdf?

2016-04-09 Thread Jan Tosovsky
On 2016-04-09 Pablo Rodriguez wrote:
> On 04/09/2016 10:51 PM, Alan BRASLAU wrote:
> > On Sat, 9 Apr 2016 22:11:29 +0200 Lukáš Procházka wrote:
> >
> >> Let's have A.tex to be compiled and an existing A.pdf which 
> >> cannot be written into, e.g. due to being open by a viewer.
> >
> > This is only an issue for Windows users...
> 
> As far as I know, this is only an issue for Adobe users...

Especially Adobe Acrobat Reader DC.

When the PDF file is closed in the Reader, a list of recent files is displayed 
instead. The most recent one is selected and its thumbnail is displayed in the 
right pane. From my experience as long as this thumbnail is displayed, the PDF 
file is locked for any modifications (!) Really silly from Adobe developers.

My advice is to either close Reader completely or select another item in the 
recent opened documents.

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] Weird background colors in autogenerated index

2016-04-09 Thread Jan Tosovsky
Dear All,

since LuaTeXt 0.81 my back-of-the-book index (register) is generated with
strange background colors. The index title is typeset in yellowish
background and the left column of the last index page has a blue background,
see the attachment.

I've thought I reported it, but it is still there even in 0.95. It was fine
in the version 0.80.

Could this be somehow eliminated?

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] Ligature color is not reliable

2016-04-09 Thread Jan Tosovsky
Dear All,

for an illustration I wanted to colorize all ligatures, but the following
method is not reliable for three character ligatures - which ends up black.

While tested with Palatino, it can be simulated even with a default font
(however there are missing ffi and ffl ligatures).

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

\starttext
Je{\red ff}, the o{\red ffi}ce on the {\red fi}rst {\red fl}oor is o{\red
ffl}ine.
\stoptext

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
___

Re: [NTG-context] Downloading ConTeXt standalone alternatively

2016-04-07 Thread Jan Tosovsky
On 2016-04-07 Hans Hagen wrote:
> On 4/7/2016 9:04 PM, Jan Tosovsky wrote:
> 
> > I don't have any computer outside the firewall to tunnel 
> > the port using 'nc' program as described at
> > http://wiki.contextgarden.net/ConTeXt_Standalone -
> > and I am on Windows so I don't have 'ssh' either.
> 
> you have putty for ssh on windows

I meant commandline ssh program used for tunneling:

export RSYNC_CONNECT_PROG='ssh tunnelhost nc %H 873'

But I am not sure I understand it correctly.

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] Downloading ConTeXt standalone alternatively

2016-04-07 Thread Jan Tosovsky
Dear All,

I've tried to install ConTeXt at work, but it failed because of blocked 873
port used by rsync. Our admins aren't going to open that port in foreseeable
future.

I don't have any computer outside the firewall to tunnel the port using 'nc'
program as described at http://wiki.contextgarden.net/ConTeXt_Standalone -
and I am on Windows so I don't have 'ssh' either.

Looking into the first-setup.bat and especially to mtx-update.lua all files
seem to be picked up on demand and there isn't any repository for ConTeXt
Standalone I could download directly (that syncing is not crucial now).

Is there more efficient way than packing my home context folder and copying
& unpacking it in my work?

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] Microtypography in ConTeXt

2016-04-06 Thread Jan Tosovsky
On 2016-04-06 Hans Hagen wrote:
> On 4/5/2016 11:51 PM, Jan Tosovsky wrote:
> > On 2016-04-05 Hans Hagen wrote:
> >> On 4/5/2016 10:55 PM, Jan Tosovsky wrote:
> >>>
> >>> according to http://texdoc.net/texmf-
> >>> dist/doc/latex/microtype/microtype.pdf
> >>> pdfTeX offers fine tuning of:
> >>> (1) Character protrusion
> >>> (2) Font expansion
> >>> (3) Tracking
> >>> (4) Additional kerning
> >>> (5) Interword spacing
> >>>
> >>> AFAIK ConTeXt covers 1+2+(3?) ...
> >>> Are there any plans to cover the rest?
> >>
> > My concern was based on this introduction (on title page), especially
> > on that sentence marked with asterisks:
> >
> > 
> > ... the adjustment of interword spacing
> > and of kerning only works with pdfTeX (≥ 1.40).
> > *
> 
> protrusion and expansion are supported at the luatex engine level but
> configuration is up to the macro packages and they can follow different
> approaches
> 
> the other things ... well, they are up to the macro package

Indeed, you most likely figured the problem. They are mentioning luatex, while 
those features require ConTeXt 'preprocessing'.
 
> i don't think that there are typographical advantages of using pdftex
> over luatex (at least not with context)

Great, thanks! I am updating article with comparision of various engines, I'll 
reflect 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] Microtypography in ConTeXt

2016-04-05 Thread Jan Tosovsky
On 2016-04-05 Hans Hagen wrote:
> On 4/5/2016 10:55 PM, Jan Tosovsky wrote:
> >
> > according to http://texdoc.net/texmf-
> > dist/doc/latex/microtype/microtype.pdf
> > pdfTeX offers fine tuning of:
> > (1) Character protrusion
> > (2) Font expansion
> > (3) Tracking
> > (4) Additional kerning
> > (5) Interword spacing
> >
> > AFAIK ConTeXt covers 1+2+(3?) ...
> > Are there any plans to cover the rest?
> 

My concern was based on this introduction (on title page), especially on that 
sentence marked with asterisks:


Note that character protrusion requires pdfTeX (version 0.14f or later), 
LuaTeX, or
XeTeX (at least version 0.9997). Font expansion works with pdfTeX (version 1.20 
for
automatic expansion) or LuaTeX. The package will by default enable protrusion 
and
expansion if they can safely be assumed to work. Disabling ligatures requires 
pdfTeX
(≥ 1.30) or LuaTeX, 


while the adjustment of interword spacing 
and of kerning only works with pdfTeX (≥ 1.40). 

*

Letterspacing is available with pdfTeX (≥ 1.40) or LuaTeX (≥ 0.62).



> 3 - i have no clue what tracking is

As explained in that document this seems to be a synonym for letter spacing, 
which is IMO supported.

> 4 - neither what additional kerning is (unless you mean (usually ugly)
> extra inter character kerning, which is supported)

Rereading the description in that document there is no advanced processing 
behind it, so most likely just that ugly kerning, already available in ConTeXt. 
Just curious why not mentioned as supported on the title page.

> 5 - it being a rather core tex feature, normal interword spacing is
> supported

This seems to be a standard glue with plus/minus value. Again, curious why not 
mentioned as supported on the title page.

Are you aware of any typographic feature which is available in pdfTeXt, but not 
in ConTeXt?

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
___

[NTG-context] Microtypography in ConTeXt

2016-04-05 Thread Jan Tosovsky
Dear All,

according to http://texdoc.net/texmf-dist/doc/latex/microtype/microtype.pdf
pdfTeX offers fine tuning of:
(1) Character protrusion
(2) Font expansion
(3) Tracking
(4) Additional kerning
(5) Interword spacing

AFAIK ConTeXt covers 1+2+(3?). In recent discussion Hans mentioned
experimental 'space kerning'. Is it anything related to above features (4)?
Are there any plans to cover the rest?

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

2016-04-02 Thread Jan Tosovsky
On 2016-04-02 Wolfgang Schuster wrote:
> On 2016-04-01, Jan Tosovsky wrote:
> > On 2016-04-01 Hans Hagen wrote:
> > > On 2016-03-31, Jan Tosovsky wrote:
> > > >
> > > > http://tracker.luatex.org/view.php?id=884
> > > >
> > > > Use case:
> > > > - book uses global indentation
> > > > - there is poem typeset in narrower block
> > > > - there is punctuation in the first verse which disrupt
> > > >   optical margin alignment
> > >
> > > in your example you use indentation to get a narrower block 
> > > (and as each line is a paragraph each line gets an indent 
> > > box prepended) you should use leftskip (\startnarrower...) 
> > > in such cases
> >
> > I'm lost here (...example...)
>
> This is a bad example because there is no problem with \leftskip.
> 
> What he means is that protrusion at the left margin doesn’t 
> at the begin of a paragraph when you use indentation.

Thanks for examples. I'll finally use another approach - disabling indentation 
locally:

\definefontfeature[default][default][protrusion=quality]

\setupbodyfont[modern-designsize]

\setupalign[hanging]

\setupbackgrounds[text][leftframe=on]

\starttext

\setupindenting[yes,medium]

\input{tufte}

{\noindenting
\startnarrower
“line1\par
line2\par
line3\par
line4.
\stopnarrower
}

\input{tufte}

\stoptext

While protrusion in this case may look ugly, it is consistent with the rest.

I thought Hans could also mean something like example below, but while leftskip 
should 'indent' all lines inside paragraph, it works only for the first one. 
Moreover, protrusion is not applied as well. And \crlf doesn't seem to be soft 
linebreak as it behaves like normal \par command - which is most likely 
explanation for that indenting issue.

{\leftskip=2cm
“line1\crlf
line2\crlf
line3\crlf
line4.
}

Anyway, I found acceptable solution (noindenting).

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

2016-04-01 Thread Jan Tosovsky
On 2016-04-01 Hans Hagen wrote:
> On 3/31/2016 9:28 PM, Jan Tosovsky wrote:
> > On 2016-03-31 Hans Hagen wrote:
> >> On 3/30/2016 8:55 PM, Jan Tosovsky wrote:
> >>>
> >>> http://tracker.luatex.org/view.php?id=884
> >>
> >> indenting prohibits protrusion
> >>
> > Are there alternative ways?
> 
> you should use leftskip (\startnarrower...) in such cases

thanks, but I am lost here. The following has impact on the left margin and it 
doesn't help to hang the initial quote...

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

\starttext
\input{tufte}
{\leftskip=1cm
\startnarrower
\it
»this is,\par
just sample.«\par
\stopnarrower
}
\input{tufte}
\stoptext

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

2016-04-01 Thread Jan Tosovsky
On 2016-04-01 Hans Hagen wrote:
> On 3/31/2016 10:47 PM, Wolfgang Schuster wrote:
> > > On 2016-03-31 Jan Tosovsky wrote:
> > >
> > > I couldn't find any details for that \leftboundary
> >
> > spac-ver.mkiv:
> >
> > \unexpanded\def\leftboundary   {\boundary\plusone}
> > \unexpanded\def\rightboundary  {\boundary\plustwo}
> 
> it will instruct the protrusion checker to skip the next or 
> previous node (e.g. a char or hbox or ...) when looking for 
> an edge

Thanks for details. So if that worked with plain \hbox should be taken rather 
as coincidence?

I prefer motto the fewer commands, the better :-)

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] WIKI - broken links to source files

2016-04-01 Thread Jan Tosovsky
Dear All,

there are broken links on several WIKI pages...

In e.g. http://wiki.contextgarden.net/Protrusion

there is
http://source.contextgarden.net/font-ext.lua
instead of proper one
http://source.contextgarden.net/tex/context/base/font-ext.lua

But when the latter link is clicked, instead of displaying the content I am
getting:
Internal Error - please restart the application!

Links to MkII source I couldn't locate at all.

A side note. Would it be possible to somehow grab Wiki content and verify if
such links to TEX or LUA files exists?

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] Recent changes in paragraph composing

2016-04-01 Thread Jan Tosovsky
On 2016-03-31 Schmitz Thomas A. wrote: 
> > On 2016-03-31 Jan Tosovsky wrote:
> >
> > In time of producing the result image it was sufficient to set 
> > the tolerance to 'strict'.
> >
> > (1) How can this be fixed efficiently?
> 
> The example is missing the language setup:
> 
> \setuplanguage [en] [patterns={en,agr}]
> 
> \mainlanguage [en]
> 

This is indeed most sensible solution.

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] Recent changes in paragraph composing

2016-03-31 Thread Jan Tosovsky
Dear All,

when generating example in the following article, I can't get rid of
overfull in Old greek paragraph even if the tolerance is set to
'verytolerant'.

http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV

In time of producing the result image it was sufficient to set the tolerance
to 'strict'.

(1) How can this be fixed efficiently?
(2) What has changed internally?

Thanks for any hints, 

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] Error - font-otj.lua:1503: attempt to perform arithmetic on local 'rightkern'

2016-03-31 Thread Jan Tosovsky
On 2016-03-31 Hans Hagen wrote:
> On 3/30/2016 9:11 PM, Jan Tosovsky wrote:
> >
> > when generating example from
> >
> > http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV
> >
> > I am getting the following error in the latest beta (0.90):
> 
> fixed in next beta (kerning with spaces is new and still somewhat
> untested)

Thanks a lot for a quick fix!

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

2016-03-31 Thread Jan Tosovsky
On 2016-03-31 Hans Hagen wrote:
> On 3/30/2016 9:53 PM, Jan Tosovsky wrote:
> > On 2016-03-22 Hans Hagen wrote:
> >> On 3/21/2016 10:59 PM, Jan Tosovsky wrote:
> >>> On 2014-02-23 Hans Hagen wrote:
> >>>> On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
> >>>>> 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'd be grateful for ignoring any non document content 
> >>>>> preceding punctuation to avoid its influence on protrusion.
> >>
> >> it's not that trivial
> >>
> >> for the index we can cheat a bit but then i also need to 
> >> check lots of other cases for possible interference
> 
> you can try to do this:
> 
> \leftboundary\hbox{\index{foo}}
 
Wow, I am quite satisfied with this solution.

Btw, I couldn't find any details for that \leftboundary command either in TeX 
[1] or ConTeXt [2] command references.

I've tried it just with \hbox{} and it works as well.

Couldn't this be generalized in a way - if you want protrusion even in edge 
cases, any inline commands have to be wrapped in \hbox{} ?

Jan

___
[1] https://www.tug.org/utilities/plain/cseq.html
[2] http://www.pragma-ade.com/general/qrcs/setup-en.pdf

___
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

2016-03-31 Thread Jan Tosovsky
On 2016-03-31 Hans Hagen wrote:
> On 3/30/2016 8:55 PM, Jan Tosovsky wrote:
> > On 2014-01-30 Jan Tosovsky wrote:
> >>
> >> 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...
> >
> > http://tracker.luatex.org/view.php?id=884
> 
> indenting prohibits protrusion
> 

Good to know, thanks. I take it rather as a limitation.

Use case:
- book uses global indentation
- there is poem typeset in narrower block
- there is punctuation in the first verse which disrupt optical margin alignment

Are there alternative ways?

Btw, from end user perspective I'd expect it should work by default without 
further tweaking.

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

2016-03-30 Thread Jan Tosovsky
On 2016-03-22 Hans Hagen wrote:
> On 3/21/2016 10:59 PM, Jan Tosovsky wrote:
> > On 2014-02-23 Hans Hagen wrote:
> >> On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
> >>> 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
> >>>>
> >>> 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').
> >>>
> >>> I'd be grateful for ignoring any non document content preceding
> >>> punctuation to avoid its influence on protrusion.
> >>
> >> well, think of it like this:
> >>
> >> [something][something else]
> >>
> >> with [something] being bound to < ... so that is then the 
> >> boundary of the word, not < ... i might know a solution (but such 
> >> -major- changes have to fit into my schedule)
> >
> > are there any improvements here with revamped token processing
> > implemented in recent versions?
> 
> it's not that trivial
> 
> ... for the index we can cheat a bit but then i also need to check lots
> of other cases for possible interference
> 

Can you roughly estimate when this could be further investigated?
Between 0.90-0.95, later or after 1.0? 

I hope there will be some way to fix it in ConTeXt one day. 

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] Length range control of the last line of paragraph

2016-03-30 Thread Jan Tosovsky
On 2016-03-26 Hans Hagen wrote:
> 
> I added final|2*final|3*final|4*final
> 
> where final is a hspace of one em by default
> 
> the only purpose of this feature is to ensure a gap at the end (handy
> when there is no indentation)
> 

Does this settings just set \parfillskip XX plus 1fil or there is more complex 
magic in the background?

I'd like to extend a description here:
http://wiki.contextgarden.net/Paragraph_last_line_control

Anyway, this related issue could be closed now:

http://tracker.luatex.org/view.php?id=885

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] Error - font-otj.lua:1503: attempt to perform arithmetic on local 'rightkern'

2016-03-30 Thread Jan Tosovsky
Dear All,

when generating example from 

http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV

I am getting the following error in the latest beta (0.90):


error: ...ext/tex/texmf-context/tex/context/base/mkiv/font-otj.lua:1503:
attempt to perform arithmetic on local 'rightkern' (a table value)

tex error   > tex error on line 28 in file D:/db/foot.tex: ?


\typo_paragraphs_stop_cell_yes ...dstrut \endgraf
  \fi \paragraphsparameter
\...
\stopparagraphscell ->\typo_paragraphs_stop_cell
 \let
\typo_paragraphs_stop_...
\stopTwoColumns ->\stopparagraphscell
  \egroup \paragraphsparameter \c!after
...
l.28 \stopTwoColumns


27 \getbuffer[Plato]
28 >>  \stopTwoColumns
29


Nothing crucial, just verifying the behaviour in the latest beta.

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

2016-03-30 Thread Jan Tosovsky
On 2014-01-30 Jan Tosovsky wrote:
> 
> 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...
> 

http://tracker.luatex.org/view.php?id=884

After recent improvements I've tested this older issue, but it is still
problematic.

When that \setupindenting is uncommented, french quote is not hanged.

Just updating the status :-)

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

2016-03-29 Thread Jan Tosovsky
On 2014-02-23 Wolfgang Schuster wrote:
> On 2014-02-22 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
> >
> > A minimal example is available at
> > http://drifted.in/other/sample.tex
> 
> One problem is the way how context places the footnote number in 
> front of the text, by default context uses the \llap command to move 
> the number into the left margin but this prevents also the protrusion
> of the opening quote. You can avoid this problem when you change the
> footnote setup to \setupnotation[footnote][alternative=margin].
> 

Placing labels into margin seems to be a default settings. 

> 
> The second problem which prevents the opening quote to protrude are
> the struts which are added by context at the begin and end of the 
> footnote content and there is no way to disable them because they are 
> needed to have proper spacing between the individual footnote texts 
> on the same page.
> 

Hans quote from another thread:
>
> for the footnote case there is no real solution as the heuristics of
> finding a protrusion character cannot be tricked too much without
> breaking it in other cases
> 
> but ... i think i can cook up something extra in the engine to drive
> the process

I can't reproduce the original issue in the latest beta (0.90). Was there
something improved in this regard?

It looks really great!

Many 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] Length range control of the last line of paragraph

2016-03-26 Thread Jan Tosovsky
On 2016-03-26 Hans Hagen wrote:
> On 3/25/2016 10:57 PM, Jan Tosovsky wrote:
> > On 2016-03-25 Hans Hagen wrote:
> >> On 3/25/2016 2:40 PM, Jan Tosovsky wrote:
> >>> On 2016-03-24 Hans Hagen wrote:
> >>>> On 3/24/2016 8:36 PM, Jan Tosovsky wrote:
> >>>>>
> >>>>> We basically need:
> >>>>> 
> >>>>>
> >>>>> and I thought this is exactly what \parfillskip ensures
> >>>>> \parfillskip XX plus (hsize - 3*indent)
> >>>>>
> >>>> the fil is taken into account when calculating the best break
> >>>> points and then the XX is fixed but plus/minus can lead to if
> >>>> being less or more, all relative to other fill (distributed)
> >>>>
> >>>> so, XX plus (hsize - 3*indent) is not a fixed value, it's XX 
> >>>> or more
> >
> > So the following \parfillskip specification finally seems to be 
> > what I was looking for ...
> >
> > \parfillskip \lastlinemingap plus 
> > \dimexpr\availablehsize-\lastlineminlength-\lastlinemingap\relax
> >
>
> \parfillskip \lastlinemingap plus 1fill
> 
> works just as well
>

I am getting slightly different results on several pages. The number of 
problematic cases is lower in my variant so I hope it makes still sense.

> try \ward{}okay i.e. a short word at the end

Hmm, I indeed tested my approach with bad example.
Now your previous examples make more sense to me :-)

> for your case i see no solution apart from heuristic lua magic

Bad news. But I hope my parfillskip will work for majority cases and these 
problematic with words shorter than parindent+tolerance can be fixed afterwards 
by joining them with previous words using non-breaking space.

I'll look into your 'crap' paragraph builder lua code if this exception could 
be handled programmatically without touching the source file (i.e. test for 
short last line and treat leading whitespace as it was '~' if necessary).

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] Length range control of the last line of paragraph

2016-03-25 Thread Jan Tosovsky
On 2016-03-25 Hans Hagen wrote:
> On 3/25/2016 2:40 PM, Jan Tosovsky wrote:
> > On 2016-03-24 Hans Hagen wrote:
> >> On 3/24/2016 8:36 PM, Jan Tosovsky wrote:
> >>>
> >>> We basically need:
> >>> 
> >>>
> >>> and I thought this is exactly what \parfillskip ensures
> >>> \parfillskip XX plus (hsize - 3*indent)
> >>>
> >>
> >> the fil is taken into account when calculating the best break 
> >> points and then the XX is fixed but plus/minus can lead to if 
> >> being less or more, all relative to other fill (distributed)
> >>
> >> so, XX plus (hsize - 3*indent) is not a fixed value, it's XX or
> >> more
> >>
> >> take this:
> >>
> >> \ruledhbox to 10cm {x\hskip0pt plus 1cm x}
> >>
> >> the skip will stretch more than 1cm
> >
> > I can see.
> >
> > But sorry for my ignorance, as far as I understand, \parfillskip 
> > is added to the end of the paragraph, so we have rather
> > \ruledhbox to 10cm {x\hskip0pt plus 1cm} % without that 'x' at the
> > end, so no 'glue' distribution is performed
> 
> there is but not enough stretch so there will be a warning ... you
> can see it from
> 
> \ruledhbox to 10cm {x}
> \ruledhbox to 10cm {x\hskip0pt plus 1cm}
> \ruledhbox to 10cm {x\hskip0pt plus 1fill}
> 

I get it, thanks.

> > If '\parfillskip 2em plus (hsize - 3*(2em) - 2em)' is specified, I
> > still think we should get space of width at least 2em '' which 
> > can be extended as indicated by hyphens '-' here:
> >
> > emememememememememememememememememememem
> > emememememem
> >
> > So there are two last line lengths extrems:
> > (shortest)
> > emememememememememememememememememememem
> > emememememem
> >
> > (longest)
> > emememememememememememememememememememem
> > emememememememememememememememememem
> 
> you always add a 2em skip so there will never be a word touching the
> right margin in the last line; 

yes, but this is my goal (!)

See https://mailman.ntg.nl/pipermail/ntg-context/2016/084858.html - case (2)

I am afraid I hasn't been clear enough yet.


> > Can I somehow define command globally which takes local block widths?
> >
> > \parfillskip #1 plus \localhsize-#1-#2, where
> > #1 gap width
> > #2 shortest line width
> 
> \availablehsize
> 


So the following \parfillskip specification finally seems to be what I was 
looking for as it covers both cases in my original question:

\setupindenting[yes,2em]

\newdimen\lastlineminlength
\newdimen\lastlinemingap

\lastlineminlength=3em
\lastlinemingap=1em

\parfillskip \lastlinemingap plus 
\dimexpr\availablehsize-\lastlineminlength-\lastlinemingap\relax

\edef\ward{\cldloadfile{ward}}

\starttext

\dorecurse{100}{
 \hsize\dimexpr\textwidth-#1mm\relax
 \ward  \par
 \ward  \par
 \startnarrower[left]
 \ward \par
 \ward \par
 \stopnarrower
 \page
}

\stoptext

As it can be done in one place globally and in almost single line, no special 
new command is necessary (as requested originally).

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] Length range control of the last line of paragraph

2016-03-25 Thread Jan Tosovsky
On 2016-03-24 Hans Hagen wrote:
> On 3/24/2016 8:36 PM, Jan Tosovsky wrote:
> >
> > We basically need:
> > 
> >
> > and I thought this is exactly what \parfillskip ensures
> > \parfillskip XX plus (hsize - 3*indent)
> >
> 
> the fil is taken into account when calculating the best break points
> and then the XX is fixed but plus/minus can lead to if being less 
> or more, all relative to other fill (distributed)
> 
> so, XX plus (hsize - 3*indent) is not a fixed value, it's XX or more
> 
> take this:
> 
> \ruledhbox to 10cm {x\hskip0pt plus 1cm x}
> 
> the skip will stretch more than 1cm

I can see. 

But sorry for my ignorance, as far as I understand, \parfillskip is added to 
the end of the paragraph, so we have rather 
\ruledhbox to 10cm {x\hskip0pt plus 1cm} % without that 'x' at the end, so no 
'glue' distribution is performed

If '\parfillskip 2em plus (hsize - 3*(2em) - 2em)' is specified, I still think 
we should get space of width at least 2em '' which can be extended as 
indicated by hyphens '-' here:

emememememememememememememememememememem
emememememem

So there are two last line lengths extrems:
(shortest)
emememememememememememememememememememem
emememememem

(longest)
emememememememememememememememememememem
emememememememememememememememememem

I slightly modified your example and even with verystrict settings all seems to 
be fine (except too narrow blocks, which is not my use case).

\showmakeup[glue]

\setupindenting[yes,2em]

\edef\ward{\cldloadfile{ward}}

\setupalign[verystrict,hz]

\starttext
\dorecurse{100}{
 \hsize\dimexpr\textwidth-#1mm\relax
 \dimen0=\hsize
 \advance\dimen0 by -8em % 3*em - 2em
 \parfillskip 2em plus \dimen0\relax
 \ward  \par
 \parfillskip 2em plus \dimen0\relax
 \ward  \par
 \startnarrower[left]
 \parfillskip 2em plus \dimen0\relax
 \ward \par
 \stopnarrower
 \startnarrower[left]
 \parfillskip 2em plus \dimen0\relax
 \ward \par
 \stopnarrower
 \page
}
\stoptext

The problem here this settings cannot be done globally if there are various 
block widths.

Can I somehow define command globally which takes local block widths?

\parfillskip #1 plus \localhsize-#1-#2, where 
#1 gap width
#2 shortest line width

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] Length range control of the last line of paragraph

2016-03-24 Thread Jan Tosovsky
On 2016-03-24 Hans Hagen wrote:
> On 3/23/2016 8:14 PM, Jan Tosovsky wrote:
> > On 2016-03-22 Hans Hagen wrote:
> >> On 3/22/2016 9:57 PM, Jan Tosovsky wrote:
> >>> On 2016-03-22 Hans Hagen wrote:
> >>>> On 3/21/2016 8:14 PM, Jan Tosovsky wrote:
> >>>>>
> >>>>> when paragraphs are separated by indenting the first line
> >>>>> (instead of an empty line), these rules should be followed:
> >>>>>
> >>>>> (2) the last line is shorter than block width
> >>>>>
> >>>>>xx
> >>>>>  xx
> >>>>>
> >>>>>
> >>>>> (ad 2) This can be done using \parfillskip XXpt plus 1fil
> >>>>> (where XX is required gap)
> >>>>
> >>>> setting the XXpt is tricky as it might lead to underful or
> >>>> overful cases when that amount start interfering with an optimal
> >>>> solution (as it's seen as acceptable overflow in some direction)
> >>>
> >>> underful or overful where? in previous lines? I am quite lost here
> >>
> >> \starttext
> >>
> >> \setupalign[tolerant,stretch]
> >> \dorecurse{100}{
> >>   \hsize\dimexpr\textwidth-#1pt\relax
> >>   \parfillskip -4em plus 1 fill
> >>   \input tufte
> >>   \page
> >> }
> >>
> >> \stoptext
> >>
> >> page 43
> >
> > In my output I can see overful of the last line on pages 38-46.
> >
> > How can this happen? Isn't it a clear bug?
> >
> > What exactly mean 'that amount start interfering with an optimal
> > solution'? Isn't parfillskip settings taken already into an 
> > account when composing the paragraph?
> 
> it's just a skip added at the end of the line ... so like any skip 
> and if you give it a fill that will be taken into account in 
> linebreaks (just like other fill)
> 
> \starttext
> 
> \dorecurse{100}{testtesttesttesttest #1 \hskip0ptplus1fill\relax}
> 
> \stoptext
> 

To be honest, I can't still decipher the reason why the line is not broken...

We basically need:


and I thought this is exactly what \parfillskip ensures
\parfillskip XX plus (hsize - 3*indent)

Or is it impossible in TeX to achieve such rule?

Are there other ways? I can think of:


But in this case that space at the end can be completely swallowed (by negative 
glue). I've tried it in the following example, but there is another problem 
from page 58 - blank line. But my TeX interpretation of the above pseudo code 
may be inappropriate...

\showmakeup

\starttext

\setupindenting[yes, 30pt]

\edef\ward{\cldloadfile{ward}}

%\setupalign[verytolerant,stretch]

\dorecurse{100}{
 \hsize\dimexpr\textwidth-#1mm\relax
 \dimen0=\dimexpr\availablehsize-3\parindent
 \advance\dimen0 by -\parindent

 \parfillskip \zeropoint plus \dimen0
 \ward\hbox to 10pt{}

 \ward\hbox to 10pt{}

 \startnarrower[left]
\parfillskip \zeropoint plus \dimen0
\ward\hbox to 10pt{}

\parfillskip \zeropoint plus \dimen0
\ward\hbox to 10pt{}

 \stopnarrower

 \page
}

\stoptext

Any idea?

___
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] Length range control of the last line of paragraph

2016-03-23 Thread Jan Tosovsky
On 2016-03-22 Hans Hagen wrote:
> On 3/22/2016 11:54 AM, Hans Hagen wrote:
> > On 3/21/2016 8:14 PM, Jan Tosovsky wrote:
> > > when paragraphs are separated by indenting the first line 
> > > (instead of an empty line), these rules should be followed:
> 
> a next beta will provide three new keywords (related to n times
> parindent filling, fwiw)
> 
> \setupalign[four]
> \setupalign[three]
> \setupalign[two]
> 
> ...

Thanks for this! I'd personally prefer more self-decriptive keywords. After 
several months I usually forgot the original meaning. But I understand this is 
unacceptable:

last-line-length-greater-than-four-parindents

:-)

___
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] Length range control of the last line of paragraph

2016-03-23 Thread Jan Tosovsky
On 2016-03-22 Hans Hagen wrote:
> On 3/21/2016 8:14 PM, Jan Tosovsky wrote:
> >
> > when paragraphs are separated by indenting the first line 
> > (instead of an empty line), these rules should be followed:
> 
> a next beta will provide a bit more control over last words
>
> \usemodule[art-01] \setupbodyfont[10pt]
> 
> \definehyphenationfeatures
>[words-1]
>[rightwords=3,
> lefthyphenmin=4,
> righthyphenmin=4]> 
>
> ...
> 
> not uploaded yet

I am impressed by your passion. Thanks for your continuous tweaking and 
inventing various approaches to fulfil my needs!

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] Length range control of the last line of paragraph

2016-03-22 Thread Jan Tosovsky
On 2016-03-22 Hans Hagen wrote:
> On 3/21/2016 8:14 PM, Jan Tosovsky wrote:
> > Dear All,
> >
> > when paragraphs are separated by indenting the first line (instead of
> an
> > empty line), these rules should be followed:
> >
> > (1) the last line lenght is greater than the left indent
> >  
> >  
> >xx
> >  
> >
> > (2) the last line is shorter than block width
> >  
> >  xx
> >xx
> >  
> >
> 
> you need to keep in mind that what would work out well for one specific
> case will not look nice in general as the last line filling is just one
> of the aspects ... so, your last line + following first line might look
> okay (according to whatever rules and criteria) but then, as you also
> need to increase the tolerance and enable stretch to permit that
> solution to be found, the rest might look like crap

I (naively) thought the last line can be somehow isolated in the engine so the 
parfillskip settings doesn't influence the rest (too much). 

I understand your point.
 
> > (ad 2) This can be done using \parfillskip XXpt plus 1fil (where 
> > XX is required gap)
> 
> setting the XXpt is tricky as it might lead to underful or overful
> cases when that amount start interfering with an optimal solution (as it's
> seen as acceptable overflow in some direction)
> 

underful or overful where? in previous lines? I am quite lost here :-)

> it's hard to envision an interface, maybe some extra key in setupalign
> 
> \setupindenting[big] \indenting[yes]
> 
> \edef\ward{\cldloadfile{ward}}
> 
> \setupalign[verytolerant,stretch]
> 
> \dorecurse{100}{
>  \hsize\dimexpr\textwidth-#1mm\relax
>  \parfillskip \zeropoint plus 1fil\relax
>  \ward  \par
>  \parfillskip \zeropoint plus \dimexpr\availablehsize-
> 3\parindent\relax
>  \ward  \par
>  \startnarrower[left]
>  \parfillskip \zeropoint plus 1fil\relax
>  \ward \par
>  \stopnarrower
>  \startnarrower[left]
>  \parfillskip \zeropoint plus
> \dimexpr\availablehsize-3\parindent\relax
>  \ward \par
>  \stopnarrower
>  \page
> }

Wow, this is cool visualization!

When \zeropoint is replaced by e.g. 2em, I have what wanted originally.

Could anybody explain drawbacks of such approach? I mean especially that 
overful magic above. I'd like to summarize this topic on Wiki.

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] Length range control of the last line of paragraph

2016-03-22 Thread Jan Tosovsky
Hi Michael,

On 2016-03-22 Rogers, Michael K wrote:
>
> Perhaps this?  (I'm still better at Plain TeX than ConTeXt.)
> 
> 
> \starttext
> \setupindenting[yes,40pt]
> \dimen0=\hsize
> \advance\dimen0 by -\parindent
> \advance\dimen0 by -2em
> \parfillskip=2em plus \dimen0
> \tolerance=0   % strictly enforces glue dimensions/stretching - may
> have unwanted side effects
> 
> \dorecurse{41}{wxyz }\par
> \dorecurse{42}{wxyz }\par
> \dorecurse{26}{wxyz }
> 

thanks, if I understand correctly, this follows my original idea to dynamically 
get the actual block width, simply substract indentation and use the variable 
for defining \parfillskip

I modified it slightly, but it doesn't seem to have desired effect. The last 
line of third paragraph is still too short:

\starttext
\hsize 15.37cm
\input tufte

\parfillskip30pt plus 1fil
\input tufte

\dimen0\hsize
\advance\dimen0 by -60pt
\parfillskip=30pt plus \dimen0
%\tolerance=0   % strictly enforces glue dimensions/stretching - may have 
unwanted side effects

\input tufte

\parfillskip0pt plus 1fil

\input tufte 

hsize is \the\hsize{}\par
dimen0 is \the\dimen0{}

\stoptext

I disabled that tolerance as it caused overflowing the text to the margin. Was 
that the key for the functionality?

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

2016-03-21 Thread Jan Tosovsky
On 2014-02-23 Hans Hagen wrote:
> On 2/22/2014 2:38 PM, Jan Tosovsky wrote:
> > 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').
> >
> > I'd be grateful for ignoring any non document content preceding
> > punctuation to avoid its influence on protrusion.
> 
> well, think of it like this:
> 
> [something][something else]
> 
> with [something] being bound to < ... so that is then the boundary of
> the word, not < ... i might know a solution (but such -major- changes
> have to fit into my schedule)

are there any improvements here with revamped token processing implemented
in recent versions?

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] Length range control of the last line of paragraph

2016-03-21 Thread Jan Tosovsky
Dear All,

when paragraphs are separated by indenting the first line (instead of an
empty line), these rules should be followed:

(1) the last line lenght is greater than the left indent


  xx


(2) the last line is shorter than block width

xx
  xx



(ad 1) Some suggestions can be found in
http://tex.stackexchange.com/questions/28357/ensure-minimal-length-of-last-l
ine - but to be honest, it is not very clear to me how to apply it and even
combine with (2)

(ad 2) This can be done using \parfillskip XXpt plus 1fil (where XX is
required gap)

I'd be grateful for any command which would set this globally for all
paragraphs. Partly requested here  http://tracker.luatex.org/view.php?id=885

One could set 
(a) minimum length - default=2*indent
(b) minimum gap - default=indent
(c) minimum block width where (a) and (b) are still to be applied -
default=2*a+b

(ad c) if there are narrower blocks within the document (e.g. blockquotes),
we should still have some room for typesetting the last line content. If the
area width is insufficient, the last line would be typeset without these
(a+b) restrictions.

In meantime, any suggestion how to combine a+b manually are welcome.

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] docbook(5) to context conversion

2016-02-22 Thread Jan Tosovsky
On 2016-02-22 David Nebauer wrote:
> 
> Are there any publicly available solutions for converting
> docbook/docbook5 to context? ...
> 
> * dbcontext
>  - part of dblatex, abandoned ~10 years ago

I used this way some time ago, but it required tweaks in approx 10 xslt files 
to make it compatible with Context MkIV (depends how many elements you use in 
your source, my is not so complex).

For me, XSLT programmer, this is the most natural approach. You can directly 
customize your outputs this way.

I call the transformation directly via command line without that default python 
stuff.

Some general tweaks were sent to the original author who promised merging them. 
He also mentioned planned update in the near future...

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] Incorrect placement of visualizer vbox in latest beta

2015-11-20 Thread Jan Tosovsky
Dear All, 

when the following source is processed in the last Beta (0.85 - 2015.11.19
19:13), that visualizer vbox is shifted upwards.

\showgrid
\starttext
\input{tufte}
\stoptext

Nothing crucial :-)

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] Line height - changes in defaults

2015-10-26 Thread Jan Tosovsky
Dear All,

comparing same source generated in 0.80 and in recent 0.81 beta I can see
changes in default line height. See the attached image - that black text is
the current, the grey is the old one.

In my B5 page size there were approx 44 lines while now only 39. It can be
reproduced with this MWE:

\setuppapersize[B5]
\setuplayout[header=0cm, footer=1cm, grid=yes]
\showgrid

% the used font doesn't seem to have any influence on this
%\definefontfamily[palatino][rm][Palatino Linotype][features={default,
quality}]
%\setupbodyfont[palatino, 10pt]

\starttext
\input{tufte}
\stoptext

Is this new value a new default or a bug? In other words, should it be fixed
on my or your side?

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] tex error in curent beta

2015-10-26 Thread Jan Tosovsky
Hi Wolfgang,

On 2015-10-26 Wolfgang Schuster wrote:
> 
> Try to make shorter examples by removing layout and font changes when
> when they are not necessary.
> 
> \define[1]\ChapterListNumbercommand
>{\offset[x=-2cm,width=0pt]{\simplealignedbox{1.5cm}{flushright}{#1}}}
> 
> \setuplist
>   [chapter]
>   [distance=0cm,
>width=0cm,
>margin=2cm,
>numbercommand=\ChapterListNumbercommand]
> 
> \starttext
> 
> \startfrontmatter
> \completecontent
> \chapter{Preface}
> \stopfrontmatter
> 
> \startbodymatter
> \chapter{Introduction}
> \chapter{Workflow}
> \chapter{Input}
> \chapter{Output}
> \stopbodymatter
> 
> \startbackmatter
> \chapter{Index}
> \stopbackmatter
> 
> \stoptext
> 

thanks a lot! I was loosing my hope :-)

Your solution is much cleaner. Incorporated.

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] tex error in curent beta

2015-10-24 Thread Jan Tosovsky
On 2015-10-22 Jan Tosovsky wrote:
> On 2015-10-16 Jan Tosovsky wrote:
> > On 2015-10-15 Wolfgang Schuster wrote:
> > >
> > > Create a command and apply it to the numbercommand key.
> > >
> > > \define[1]\ChapterListNumbercommand
> > > {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
> > >
> > > \setuplist
> > > [chapter]
> > > [
> > > before=,
> > > distance=0.5cm,
> > > width=-0.5cm,
> > > margin=2cm,
> > > numbercommand=\ChapterListNumbercommand,
> > > pageconversionset=pagenumber,
> > > ]
> > >
> >
> > This compiles, thanks, but that number is not hanging on the right
> any
> > more :-(
> >
> > This is my more complete MWE:
> >
> > \setuphead[chapter][
> >alternative=middle,
> >before={\blank[force,10mm]},
> >after={\blank[1*line]},
> >style=\bfc,
> >numberstyle={\kerncharacters[0.125]\bfa},
> >numbercommand=\groupedcommand{}{\blank[4mm]},
> >sectionstopper={.},
> >conversion=Romannumerals,
> > ]
> >
> > \define[1]\ChapterListNumbercommand
> > {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
> >
> > \setupcombinedlist[chapter][
> >before=,
> >distance=0.5cm,
> >width=-0.5cm,
> >margin=2cm,
> >numbercommand=\ChapterListNumbercommand,
> >pageconversionset=pagenumber,
> > ]
> >
> > \starttext
> > \startfrontmatter
> > \title{TOC}
> > \placecontent
> > \chapter{Preface}
> > \stopfrontmatter
> > \startbodymatter
> > \chapter{Chapter 1}
> > \stopbodymatter
> > \stoptext
> >
> > Desired output is attached.
> >
> 
> If I recapitulate it, it is apparent regression as it worked in 0.79.
> 
> That error can be eliminated using a user defined command instead, but
> that command doesn't seem to be executed as it doesn't produce desired
> effect.
> 
> \define[1]\ChapterListNumbercommand{\simplealignedbox{\listparameter{wi
> dth}}{flushright}{#1}}
> ...
> numbercommand=\ChapterListNumbercommand,
> ...
> 
> 
> Any idea how to fix this? Is that complex numbercommand unsupported any
> more and should be replaced with something else? Or should I report it
> somewhere and hope for fixing it?
> 
> It is not urgent now, I just want to avoid any potential problems
> introduced with new tokenizer in place... (boundary conditions).
> 

More complete example for experiments:
(I am not experienced in ConTeXt, most of it was suggested here in the forum, 
there are most likely other ways how to accomplish the desired output - see 
attachments).


\mainlanguage[cs]

\setuppapersize[B5]

\setuplayout[header=0cm, footer=1cm]
\setuppagenumbering[alternative=doublesided, location={footer, right}, 
style=italic]

% page numbering
\definestructureconversionset[frontpart:pagenumber][][romannumerals]
\definestructureconversionset[bodypart:pagenumber] [][numbers]
\definestructureconversionset[backpart:pagenumber] [][numbers]

\startsectionblockenvironment[frontpart]
\setupuserpagenumber[numberconversion=romannumerals]
\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
\setupuserpagenumber[numberconversion=numbers]
\stopsectionblockenvironment

\startsectionblockenvironment[backpart]
\setupuserpagenumber[numberconversion=numbers]
\stopsectionblockenvironment

% fonts
\definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}]
\definefontfeature[f:superscript][sups=yes]
\setupbodyfont[palatino, 10pt]

\setuplabeltext[cs][chapter=KAPITOLA  ]

\setupindenting[medium, yes]

\setuphead[chapter][
   alternative=middle,
   before={\blank[force,10mm]},
   after={\blank[1*line]},
   style=\bfc,
   numberstyle={\kerncharacters[0.125]\bfa},
   numbercommand=\groupedcommand{}{\blank[4mm]},
   sectionstopper={.},
   conversion=Romannumerals,
]

% this alignment has no effect in 0.81
\define[1]\ChapterListNumbercommand
   {\simplealignedbox{\listparameter{width}}{flushright}{#1}}

\setupcombinedlist[content][list=chapter, alternative=c]
\setupcombinedlist[chapter][
   before=,
   distance=0.5cm,
   width=-0.5cm,
   margin=2cm,
   numbercommand={\ChapterListNumbercommand},
   pageconversionset=pagenumber,
]

\starttext
\startfrontmatter
\title{TOC}
\placecontent
\chapter{Preface}
\stopfrontmatter
\startbodymatter
\chapter{Introduction}
\chapter{Workflow}
\chapter{Input}
\chapter{Output}
\stopbodymatter
\startbackmatter
\chapter{Index}
\stopbackmatter
\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] tex error in curent beta

2015-10-22 Thread Jan Tosovsky
On 2015-10-16 Jan Tosovsky wrote:
> On 2015-10-15 Wolfgang Schuster wrote:
> >
> > Create a command and apply it to the numbercommand key.
> >
> > \define[1]\ChapterListNumbercommand
> > {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
> >
> > \setuplist
> > [chapter]
> > [
> > before=,
> > distance=0.5cm,
> > width=-0.5cm,
> > margin=2cm,
> > numbercommand=\ChapterListNumbercommand,
> > pageconversionset=pagenumber,
> > ]
> >
> 
> This compiles, thanks, but that number is not hanging on the right any
> more :-(
> 
> This is my more complete MWE:
> 
> \setuphead[chapter][
>alternative=middle,
>before={\blank[force,10mm]},
>after={\blank[1*line]},
>style=\bfc,
>numberstyle={\kerncharacters[0.125]\bfa},
>numbercommand=\groupedcommand{}{\blank[4mm]},
>sectionstopper={.},
>conversion=Romannumerals,
> ]
> 
> \define[1]\ChapterListNumbercommand
> {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
> 
> \setupcombinedlist[chapter][
>before=,
>distance=0.5cm,
>width=-0.5cm,
>margin=2cm,
>numbercommand=\ChapterListNumbercommand,
>pageconversionset=pagenumber,
> ]
> 
> \starttext
> \startfrontmatter
> \title{TOC}
> \placecontent
> \chapter{Preface}
> \stopfrontmatter
> \startbodymatter
> \chapter{Chapter 1}
> \stopbodymatter
> \stoptext
> 
> Desired output is attached.
> 

If I recapitulate it, it is apparent regression as it worked in 0.79.

That error can be eliminated using a user defined command instead, but that
command doesn't seem to be executed as it doesn't produce desired effect.

\define[1]\ChapterListNumbercommand{\simplealignedbox{\listparameter{width}}
{flushright}{#1}}
...
numbercommand=\ChapterListNumbercommand,
...


Any idea how to fix this? Is that complex numbercommand unsupported any more
and should be replaced with something else? Or should I report it somewhere
and hope for fixing it?

It is not urgent now, I just want to avoid any potential problems introduced
with new tokenizer in place... (boundary conditions).

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] tex error in curent beta

2015-10-16 Thread Jan Tosovsky
On 2015-10-15 Wolfgang Schuster wrote:
>
> Create a command and apply it to the numbercommand key.
> 
> \define[1]\ChapterListNumbercommand
> {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
> 
> \setuplist
> [chapter]
> [
> before=,
> distance=0.5cm,
> width=-0.5cm,
> margin=2cm,
> numbercommand=\ChapterListNumbercommand,
> pageconversionset=pagenumber,
> ]
> 

This compiles, thanks, but that number is not hanging on the right any more :-(

This is my more complete MWE:

\setuphead[chapter][
   alternative=middle,
   before={\blank[force,10mm]},
   after={\blank[1*line]},
   style=\bfc,
   numberstyle={\kerncharacters[0.125]\bfa},
   numbercommand=\groupedcommand{}{\blank[4mm]},
   sectionstopper={.},
   conversion=Romannumerals,
]
 
\define[1]\ChapterListNumbercommand
{\simplealignedbox{\listparameter{width}}{flushright}{#1}}

\setupcombinedlist[chapter][
   before=,
   distance=0.5cm,
   width=-0.5cm,
   margin=2cm,
   numbercommand=\ChapterListNumbercommand,
   pageconversionset=pagenumber,
]

\starttext
\startfrontmatter
\title{TOC}
\placecontent
\chapter{Preface}
\stopfrontmatter
\startbodymatter
\chapter{Chapter 1}
\stopbodymatter
\stoptext

Desired output is attached.

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] tex error in curent beta

2015-10-15 Thread Jan Tosovsky
Hi Wolfgang, thanks,

On 2015-10-15 Wolfgang Schuster wrote:
> On 2015-10-15 Jan Tosovsky wrote:
> >
> > I am getting tex error > tex error on line 22 in file D:/source.tex: !
> > Missing { inserted
> >
> > 
> > \edef
> > \currentlistsymbol ->\edef
> > \p_symbol {\listparameter \c!symbol
> > }\doifelseins...
> > \14>:113>:abc ...numbercommand \currentlistsymbol
> 
>
> What I can take from the error message is that you have a problem with
> the list mechanism.

you are right, I've created this MWE (but not sure if it still makes sense).


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

\starttext
\startfrontmatter
\title{TOC}
\placecontent
\chapter{Preface}
\stopfrontmatter
\stoptext

That list definition creates right aligned roman chapter numbers in the ToC,
see
http://www.ntg.nl/pipermail/ntg-context/2013/076154.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
___

[NTG-context] tex error in curent beta

2015-10-15 Thread Jan Tosovsky
Dear All,

I've updated context, tried to regenerate my tex source and it doesn't
compile any more. It was Ok in 0.79 (in March).

I am getting tex error after these 3 lines (followed by a blank line and
other lines):
 
...
\definestructureconversionset[frontpart:pagenumber][][romannumerals]
\definestructureconversionset[bodypart:pagenumber] [][numbers]
\definestructureconversionset[backpart:pagenumber] [][numbers]

\startsectionblockenvironment[frontpart]
\setupuserpagenumber[numberconversion=romannumerals]
\stopsectionblockenvironment
...

tex error   > tex error on line 22 in file D:/source.tex: ! Missing {
inserted


\edef
\currentlistsymbol ->\edef
   \p_symbol {\listparameter \c!symbol
}\doifelseins...
\14>:113>:abc ...numbercommand \currentlistsymbol
  }\else \setbox
\b_strc_lis...
\strc_lists_apply_renderingsetup ...nderingsetup }
  \relax \the
\t_lists_every...
\strc_lists_entry_process ...i \fi \fi \endcsname
  \dostoptagged
\listextrapa...
\strclistsentryprocess ...trc_lists_entry_process
  \clf_poplist
...
l.150

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] Custom XML Export

2015-09-14 Thread Jan Tosovsky
On 2015-09-12 Henning Hraban Ramm wrote:
> Am 2015-09-12 um 18:14 schrieb luigi scarso :
> 
> > Do you know a good XSLT processor except Saxon? Its free version is
> > just too limited.
> > 
> > xsltproc for xslt 1.0, but you are looking for xslt 2.0 , right ?
> 
> No, the only extension from commercial Saxon ...
 
XSLT 1.0 is capable to handle anything (turing machine).
XSLT 2.0 brings some syntactic sugar.
XSLT 3.0 supports streaming.
 
If you need 2.0 features, you can use Saxon-B 9.1.0.8 (free, but not
maintained any more).

> ... I would need are global variables.

In pure XSLT any variable is fixed and its value cannot be changed. There
are, however, different approaches how to accomplish this. Most common is
defining template parameters and passing the proper values via them, see
below.

> E.g. if I don’t markup all my paragraphs (because it clutters the
> source too much and is tedious), I get s between the original
> paragraphs. I could convert these to HTML s like:
> 
> 
> 0
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 1
> 
> 0
> 



   
   
   



   
   



Btw, istead of 


you can write 



> Maybe there’s another solution, but I’m not comfortable enough in XSL
> to see it.

Yes, functional programming requires different approaches, but I undestand
it can be tough. As for me in early stages :-)

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

2015-08-07 Thread Jan Tosovsky
On 2015-08-07 Hans Hagen wrote:
 
 http://www.tomsguide.com/us/amazon-kindle-paperwhite,review-2967.html
 
 I read under Advanced Typesetting
 
 ... improved character placement and spacing, with advanced kerning and
 ligatures ...books with this enhanced typesetting are not easy to find
 
 which makes me wonder: how can an html file (just a char stream)
 determine in an epub that kerning/ligaturing is disabled By default?
 
 (I can imagine a css enabling something but still ...)
 

There was lot of work in W3 recently dedicated in CSS for paged media. Even
further development of mature XSL-FO has been discontinued in favor of
HTML+CSS. 

http://www.smashingmagazine.com/2015/01/designing-for-print-with-css/

And many publishers believe this is the future. While many features are not
available in browsers yet, there are corresponding JavaScript
modules/polyfills which mimic the intended rendering so nothing stops the
publishing industry from migrating their workflows into the new standards.

One of such JavaScript framework is vivliostyle.js - http://vivliostyle.com/

Back to the original question, enabling/disabling font features can be done
using CSS font-feature:
http://www.w3.org/TR/css3-fonts/#font-rend-props

Jan
attachment: winmail.dat___
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] Open LaTeX Studio project

2015-05-22 Thread Jan Tosovsky
Dear All,

I've just stumbled upon a new editor for LaTeX source:
https://blogs.oracle.com/geertjan/entry/open_latex_studio

Maybe ConTeX could be integrated as well in the future...

In the light of various services like 
https://www.sharelatex.com/  
https://www.authorea.com/ 
https://www.overleaf.com

this seems to be anachronic, but in case it could be helpful to somebody...

Just sharing.

Jan
attachment: winmail.dat___
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] ConTeXt installation problem with Windows 8.1

2015-04-29 Thread Jan Tosovsky
On 2015-04-29 Mojca Miklavec wrote:
 On Wed, Apr 29, 2015 at 4:28 PM, Jaroslav Hajtmar wrote:
 
  The problem may be elsewhere. At my working computer (at work) 
  I have  Windows 8.1, and there I ConTeXt standalone installed ok 
  everything works as it should. 
  
  On my own laptop I install Windows 8.1 Enterprise (ie. I
  think the top product) and even ConTeXt not installed because 
  the installation procedure did not find DLL.
 
 Please try again (you need to download
 http://distribution.contextgarden.net/setup/context-setup-mswin.zip
 again). I added the missing dll. If any other file is still missing,
 please say which file exactly.

Btw, there is a handy utility for analysing dependency problems:
http://www.dependencywalker.com/

You can browse for any exe file and inspect if all referenced libraries are
available on your system. 

Jan
attachment: winmail.dat___
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] Asciidoc to PDF over Context

2015-02-13 Thread Jan Tosovsky
On 2015-02-13 luigi scarso wrote:
 On 2015-02-12 Tobias Famulla u...@famulla.eu wrote:
 
  Context could be the right processor to create beautiful
  PDFs out of intermediate formats (DocBook 5 or Asciidoc).
 
 The DocBook is a huge specification, so I guess that a convert 
 for ConTeXt takes a huge amount of work if you want to map 
 everything --- but it is feasible if you plan to start with
 a small subset.

 From this point of view, Docbook already has a xslt to latex

DocBook has even ConTeXt output
http://sourceforge.net/projects/dblatex/files/dbcontext/

Actually it produces quite obsolete syntax, but it is a good starting point
for further tweaking. Exactly this I did in my recent project.

While my resources are very limited, if any effort in this field will start,
I can share my DocBook/XSLT experience. It could also be a nice GSoC project
for students:
https://lists.oasis-open.org/archives/docbook/201501/msg00027.html

Btw, I prefer DocBook over lightweight markup languages (Markdown, Asciidoc)
as latter lack semantics and advanced structuring, which may be limiting in
some projects requiring advanced formatting.

Jan
attachment: winmail.dat___
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] contextual alternates

2015-01-25 Thread Jan Tosovsky
On 2015-01-25 Hans Hagen wrote:
 On 1/24/2015 2:12 PM, Pablo Rodriguez wrote:
 
  I have the following sample:
 
   \definefontfeature[default][default][script=latn, calt=yes]
   \definefontfamily[mainface][serif][Pecita]
   \setupbodyfont[mainface]
   \starttext
   \input zapf
   \stoptext
 
  The Pecita font is licensed under the Open Font License and it can be
  downloaded at http://pecita.eu/b/Pecita.otf.
 
  For some strange reason, the contextual alternates feature isn’t
  working.
 
 
 maybe they depend on other features being set

There are lots of definitions in calt table, but referenced via 'lookup'
mechanism.

lookup calt5 {
#sub @calt30' @calt30' by [a.I_ ... f_dotlessi._I];
} calt5;

language ENG ; # English
 script DFLT;
lookup calt5;

To me it is quite unusual.

Jan
attachment: winmail.dat___
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] XML as source (was: E-books and XML)

2014-08-27 Thread Jan Tosovsky
On 2014-08-27 Procházka Lukáš Ing. - Pontex s. r. o. wrote:

 Which editor(s) (including commercial one(s)) do you usually use to
 create XML source for Ctx? (Under Windows?)

This is IMO the best you can currently get:
http://www.oxygenxml.com/xml_author.html

 - XML input vs. .tex (.cld) source:
 
 IMHO, when one needs to program parts of Ctx source, it's better to use
 TeX source/language combined with Lua or CLD.
 
 Or - is it possible to program anyhow in XML source (Lua)?

Most natural way for XML processing is XSLT transformation (kind of functional 
programming language). 

It is advisable to choose one of standardized vocabulary (DocBook, DITA, TEI) 
what give you a set of out-of-the-box XSLT stylesheets for common output 
formats. And in some tools, e.g. Oxygen, you can get additional level of 
comfort (various schema related functionality boosting your productivity) over 
using your own XML structure.

In case of DocBook you can get even Context output using this XSLT set:
http://dblatex.sourceforge.net/ (there is a dbcontext part in the download 
section)

Actually, this is my way of using ConTeXt, but with various MKIV compatibility 
tweaks. From the same DocBook XML source I am producing epub and also WebHelp 
(set of HTML pages).
http://docbook.sourceforge.net/release/xsl/current/webhelp/docs/ch01.html

HTH, 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] Fonthandling/protrusion question: handling of left margin

2014-07-18 Thread Jan Tosovsky
On 2014-07-18 Hans Hagen wrote:
 On 7/18/2014 3:10 PM, Wolfgang Schuster wrote:
 
  BTW, is it intended that protrusion doesn't work for indented lines?
 
  \setupfontprotrusion[mine][vector=punctuation,left=2]
  \definefontfeature[default][default][protrusion=mine]
 
  \setupalign[hanging]
 
  \starttext
 
  Text
 
  Text
 
  \blank \setupindenting[yes,medium]
 
  Text
 
  Text
 
  \stoptext
 
 probably intended (not sure about hanging)

I've reported something related some time ago:
http://tracker.luatex.org/view.php?id=884

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] Testing the param value

2014-07-06 Thread Jan Tosovsky
On 2014-07-05 Wolfgang Schuster wrote:
 Am 05.07.2014 um 16:47 schrieb Jan Tosovsky:
 
  I am hacking the context index entry rendering... ;-)
  ... but I am stuck with a simple comparison
 
  How can I test the given entry if it equals to the specified one?
 
  The following code has no effect.
 
  \unexpanded\def\defaultregisterentry#1#2#3#4%
  % #1:processor #2:internal #3:seeindex #4:word
   {\def\currentregisterpageindex{#2}%
% start hacking
\def\myword{#4}%
\ifx\myword{My Primary}
   \column % do something
\fi
% stop hacking
\strc_register_injector_process
...
 
  What is the proper syntax?
 
 
 This should be possible without hacks but without a example I can't
 provide more than a simple example code.
 
 \newconditional\IndexState
 
 \define[1]\IndexInternalCommand
 
 {\doifelse{#1}{MyPrimary}{\global\settrue\IndexState}{\global\setfalse\
 IndexState}#1}
 
 \define[1]\IndexCommand
   {\setfalse\IndexState
\setbox\scratchbox\hbox{#1}%
\ifconditional\IndexState
  \column
\fi
\box\nextbox}
 
 \setupregister
   [index]
   [textcommand=\IndexCommand,
deeptextcommand=\IndexInternalCommand]
 

Thanks, it looks promising even I am quite lost in this logic :-)

Do I understand correctly that the IndexState is a global boolean which is
set either to true or false when deeptextcommand is processed and when
textcommand is called, it works with this pre-filled variable?

{\setfalse\IndexState % why this? A default value?
 \setbox\scratchbox\hbox{#1}%
 \box\nextbox} % what do these two do?

I am asking as #1 is consumed somehow and there is just a page reference in
the result index. But that break (\column) works correctly.

I've encountered mising words when comparing hashed params directly. Like if
they are read once, they are not available any more. This was the reason why
I used a helper 'myword' variable in my hack.

But I've just written that code analogically to some other conditions found
in the sources without proper knowledge what exactly it does.

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

2014-07-05 Thread Jan Tosovsky
On 2014-06-25 Jan Tosovsky wrote:
 On 2014-06-23 Jan Tosovsky wrote:
  On 2014-04-23 Jan Tosovsky wrote:
  
   There are also few cases of orphans:
   ...
   ...
   Josef 29
  
   K
   Karel 69 (! alone !)
    (end page) -
  
 
 I've found the corresponding code in strc-reg.mkiv:
 
 \setvalue{\??registerindicator a}#1%
   {\registerparameter\c!before
% bugged, why does leftskip gets set:
 \vskip\lineheight\goodbreak\vskip-\lineheight
\begingroup
\useregisterstyleandcolor\c!style\c!color
\dontleavehmode
\strut
\iflocation
  \dosetdirectpagereference{\currentregister:\v!section:#1}%
\fi
\registerparameter\c!command{#1}%
\endgroup
\blank[\v!samepage]%
\registerparameter\c!after
\par
\nobreak}
 
 That (2) case can be fixed by a small change:
 \testcolumn[3]\registerparameter\c!command{#1}%
 
 But when tested on this MWE, you can see a drawback - the first 
 letter (p) starts always on the second line (not on the first one):
 
 \setupregister[balance=yes]
 \starttext
 \index{primary+secondary+tertiary}
 \index[primary long]{\dorecurse{5}{primary long }}
 \index[primary longer]{\dorecurse{5}{primary longer }}
 \input{tufte}
 \completeindex
 \stoptext

I've realized that empty line is placed before every Index section where
\testcolumn command is placed (by my patch).

Is there any way to use \testcolumn and avoid producing that empty line?

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] Testing the param value

2014-07-05 Thread Jan Tosovsky
Dear All,

I am hacking the context index entry rendering... ;-)
... but I am stuck with a simple comparison

How can I test the given entry if it equals to the specified one?

The following code has no effect.

\unexpanded\def\defaultregisterentry#1#2#3#4% 
% #1:processor #2:internal #3:seeindex #4:word
  {\def\currentregisterpageindex{#2}%
   % start hacking
   \def\myword{#4}%
   \ifx\myword{My Primary}
  \column % do something
   \fi
   % stop hacking
   \strc_register_injector_process
   ...

What is the proper syntax?

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] Conditional keep-with-next rules

2014-06-28 Thread Jan Tosovsky
On 2014-06-27 Jan Tosovsky wrote:
 Dear All,
 
 in my index I can see disturbing page breaks.
 
 primary-01
 primary-02
secondary-01
 --- ( next page ) -
secondary-02
 primary-03
 
 instead of
 
 primary-01
 --- ( next page ) -
 primary-02
secondary-01
secondary-02
 primary-03
 
 Is it possible to somehow define conditional keep-with-next rules?
 
 I'd like to express:
 (1) keep always the primary with the first secondary (this seems to be
 implemented)
 (2) keep always the first secondary with the next secondary
 (3) keep always the last secondary with the previous secondary
 
 And similarly for tertiary.

In XSL-FO all these can be set quite easily using keep-with-next/previous
rules placed on first and last items. The complexity behind is left to
XSL-FO processors. 

primary-01 % keep-with-previous  keep-with-next (rules 1  2)
primary-02 
secondary-01 % keep-with-previous  keep-with-next (rules 1  2)
secondary-02
secondary-03
secondary-04 % keep-with-previous (rule 3)
primary-03 % keep-with-previous (rule 3)

The only natural break is between secondaries: 

primary-01
primary-02 
secondary-01
secondary-02
 ( break ) ---
secondary-03
secondary-04
primary-03

In case of three secondaries all is kept together and moved to the next page
as a whole:
primary-01
primary-02 
secondary-01
secondary-03
secondary-04
primary-03

Only if a large block doesn't fit the page, it is somehow broken.

I've investigated several TeX resources but I still cannot find any
convenient solution.

I've found related thread at
http://tex.stackexchange.com/questions/185059/preventing-page-break-after-th
e-first-or-before-the-last-list-item

That solution with \pagecheck looks promising, but it has to be implemented
on ConTeXt/Lua side. It requires adding 'checking' commands to proper
places. 

Only ConTeXt knows the item tree, it can count number of item in every level
and then decide where placing the command is appropriate.

The \testpage or \testcolumn are not IMHO sufficient here. They cannot
prevent breaking after the first primary. The optional value [2] should
somehow be cummulated. Moreover, testing the number of lines is weak as
index entries can be long or with many page references requiring more lines
than one.

\testpage[2] % keep first two together (generalized rule 2)
primary-01
\testpage[2] % (rule 1)
primary-02
secondary-01
secondary-02
\testpage[2] % (rule 3)
secondary-03
secondary-04
primary-03 % how to set rule 3 here?

Maybe some kind of 'samepage' would be better here.
http://tex.stackexchange.com/questions/64363/context-equivalent-of-latex-sam
epage

\startsamepage
primary-01
primary-02
secondary-01
secondary-02
% placing soft page-break
% http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nopagebrk
\pagebreak[0]
secondary-03
secondary-04
primary-03
\stopsamepage

Unfortunately, all this would have to be implemented on engine side during
rendering index entries. Or are there any ways 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
___


[NTG-context] Exporting auto-generated Index/Registers as ConTeXt source

2014-06-28 Thread Jan Tosovsky
Dear All,

I'd like to tweak the auto-generated Index. Is there any possibility to
export it as the ConTeXt source, modify it and then include instead of
auto-generated Index?

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] Conditional keep-with-next rules

2014-06-27 Thread Jan Tosovsky
Dear All,

in my index I can see disturbing page breaks. 

primary-01
primary-02
   secondary-01
--- ( next page ) -
   secondary-02
primary-03

instead of 

primary-01
--- ( next page ) -
primary-02
   secondary-01
   secondary-02
primary-03

Is it possible to somehow define conditional keep-with-next rules?

I'd like to express:
(1) keep always the primary with the first secondary (this seems to be
implemented)
(2) keep always the first secondary with the next secondary
(3) keep always the last secondary with the previous secondary

And similarly for tertiary.

As the Index is generated, I can't see an easy way to accomplish something
like this. I hope I am wrong :-)

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] testcolumn error

2014-06-27 Thread Jan Tosovsky
Dear All,

the following MWE works fine, but when that 'First line' is uncommented, I
am getting 'Undefined control sequence' error in the console (ConTeXt -
2014.06.22).

\starttext
\startcolumns[n=2]
%First Line
\testcolumn[2]\input{tufte}
\stopcolumns
\stoptext

Any idea what is wrong 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
___


Re: [NTG-context] Orphans/Widows in the Index

2014-06-25 Thread Jan Tosovsky
On 2014-06-23 Jan Tosovsky wrote:
 On 2014-04-23 Jan Tosovsky wrote:
 
  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 (! alone !)
 
  V
  Vamberk 18
  ...
  ...
 
 
  There are also few cases of orphans, but this is not so strange:
  ...
  ...
  Josef 29
 
  K
  Karel 69 (! alone !)
   (end page) -
 
 
 I think both cases could be eliminated by establishing a new constraint
 to the 'key letter':
 (1) There must be 0 or at least 3 lines at the beginning of the
 page/column before the Key letter.
 (2) There must be at least 2 lines after the Key letter.
 
 Can this be somehow set in my source file?
 

I've found the corresponding code in strc-reg.mkiv:

\setvalue{\??registerindicator a}#1%
  {\registerparameter\c!before
   % bugged, why does leftskip gets set:
\vskip\lineheight\goodbreak\vskip-\lineheight
   \begingroup
   \useregisterstyleandcolor\c!style\c!color   
   \dontleavehmode
   \strut
   \iflocation
 \dosetdirectpagereference{\currentregister:\v!section:#1}%
   \fi
   \registerparameter\c!command{#1}%
   \endgroup
   \blank[\v!samepage]%
   \registerparameter\c!after
   \par
   \nobreak}

That (2) case can be fixed by a small change:
\testcolumn[3]\registerparameter\c!command{#1}%

But when tested on this MWE, you can see a drawback - the first letter (p)
starts always on the second line (not on the first one):

\setupregister[balance=yes]
\starttext
\index{primary+secondary+tertiary}
\index[primary long]{\dorecurse{5}{primary long }}
\index[primary longer]{\dorecurse{5}{primary longer }}
\input{tufte}
\completeindex
\stoptext

Can this issue somehow be eliminated? Tested on the last beta (with my
patch).

That (1) case is still open. I have no idea how to accomplish something like
this using (Con)TeX(t) syntax :-(

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

2014-06-23 Thread Jan Tosovsky
On 2014-04-23 Jan Tosovsky wrote:
 
 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 (! alone !)
 
 V
 Vamberk 18
 ...
 ...
 
 
 There are also few cases of orphans, but this is not so strange:
 ...
 ...
 Josef 29
 
 K 
 Karel 69 (! alone !)
  (end page) -
 
 In my setup I have defined (with no luck):
 
 \startsetups[grid][mypenalties]
 \setdefaultpenalties
 \setpenalties\widowpenalties{2}{1}
 \setpenalties\clubpenalties {2}{1}
 \stopsetups
 
 \setuplayout[grid=yes, setups=mypenalties]
 

After finishing another duties I am back ... and still facing these issues.

I think both cases could be eliminated by establishing a new constraint to
the 'key letter':
(1) There must be 0 or at least 3 lines at the beginning of the 
page/column before the Key letter.
(2) There must be at least 2 lines after the Key letter.

Can this be somehow set in my source 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] Experience with DITA XML or XSL/FO

2014-05-25 Thread Jan Tosovsky
Hi Mica,

 I won't make enough (or any) money to justify the very 
 expensive license for Antenna House or XEP, thus they are not
 really an option. I find FOP to be really sub par.

I fully understand. I was exactly in the same situation few months ago and
also found ConTeXt as the only option for my needs. Welcome to the club :-)

 My basic work flow would have to be DITA XML  DITA OpenToolkit (build
 process)  ???  ConTeXt  PDF, where ??? could be some Toolkit XML
 output, XHTML, HTML5, FO.

In your case I would fork 'dbcontext' stylesheets and adapt them to the DITA
vocabulary (reasonable subset). If the Tooolkit is really 'Open', it
shouldn't be so hard to integrate this new stuff into it. The build process
would simply generate the ConTeXt source file. 

Even forking of something already done means lot of work so I suggested
switching to DocBook instead to reduce this effort significantly.

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] Experience with DITA XML or XSL/FO

2014-05-23 Thread Jan Tosovsky
On 2014-05-22 Mica Semrick wrote:
 
 I've been contemplating making a ConTeXt output or parser for DITA XML
 and was wondering if anyone has worked with DITA and ConTeXt before? If
 you have and could offer any advice and/code, that would be most
 helpful!

What is your real use case? A typical XML based workflow involves XSL-FO -
PDF route using FO processor (Antenna House, XEP, FOP etc). 

Anyway, there are several ways. If you are not locked to DITA yet, I would
strongly recommend switching to DocBook instead :-) You get similar single
source solution with the semantically rich vocabulary that allows you to
produce all typical outputs. Moreover, there is a special project dedicated
to DocBook to ConTeXt conversion 'dbcontext'
http://dblatex.sourceforge.net/releases/download.html although I had to
tweak it for my recent project to ensure compatibility with current ConTeXt
version (MkIV).

This XSLT way is most natural for XML processing, but I understand that
writing XSLT transformation is discouraging for many people.

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] [OT] Typographical quality of various engines

2014-05-15 Thread Jan Tosovsky
On 2014-05-15 Hans Hagen wrote:
 On 5/14/2014 10:21 PM, Jan Tosovsky wrote:
  Dear All,
 
  I've finished a rough comparision of various engines for their
  typographical quality: http://drifted.in/publishing/
 
  From my point of view the ConTeXt is the best offering in this 
  field to date, so congratulation!
 
  If you find something inappropriate or misleading in my text, please
  comment or let me know.
 
  If my ConTeXt examples could be written more efficiently, I am open
  to fix it.
 
 Font expansion only, applied to a limited character subset
 
 Is that true? It is applied to any character that you want, of course
 given that you associate expansion factors, but that happens for quite
 some characters in context.

Good point, it should be clarified it is a default vector set, which can be
further customized (extended).
My info is based on this Wiki http://wiki.contextgarden.net/Protrusion
pointing to this source code:
http://source.contextgarden.net/font-ext.lua 

By that subset I mean the table vectors['default']


 Concerning homogenization, context has support for dynamically aplying
 feature (alternates) to improve the look and feel but of course not
 many fonts have multiple variants for glyphs grouped in stylistic 
 alternates so this mechanism is hardly used (only for some arabic).

Yes, I am aware of this, but it is indeed not very obvious from the text.

Thanks for your 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] [OT] Typographical quality of various engines

2014-05-15 Thread Jan Tosovsky
On 2014-05-15 luigi scarso wrote:
 On 5/14/2014 10:21 PM, Jan Tosovsky wrote:
 
  I've finished a rough comparision of various engines for
  their typographical quality: http://drifted.in/publishing/ 
 
 Another point could be the server property... the swiglib project is
 an attempt to cover this side
 
 https://swiglib.foundry.supelec.fr/

I am sad seeing lot of technical details without single sentence covering 
benefits for the end user... 

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] [OT] Typographical quality of various engines

2014-05-14 Thread Jan Tosovsky
Dear All,

I've finished a rough comparision of various engines for their typographical
quality:
http://drifted.in/publishing/

From my point of view the ConTeXt is the best offering in this field to
date, so congratulation!

If you find something inappropriate or misleading in my text, please comment
or let me know.

If my ConTeXt examples could be written more efficiently, I am open to fix
it.

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] Proper setting of font features for protrusion/expansion

2014-05-04 Thread Jan Tosovsky
Dear All,


e.g. in the last example at http://wiki.contextgarden.net/Protrusion there
is the following definition:

\definefontfeature[default][default][expansion=quality,protrusion=quality]


I understand it overrides default settings and adds these two features.

In my code I use the following shortcut found somewhere:

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


Both features works, but I am not sure if I am getting the best quality.

Is there any description what that '[features={default, quality}]' option
really does?


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] Proper setting of font features for protrusion/expansion

2014-05-04 Thread Jan Tosovsky
On 2014-05-04 Wolfgang Schuster wrote:
 Am 04.05.2014 um 19:34 schrieb Jan Tosovsky:
 
  In my code I use the following shortcut found somewhere:
 
  \definefontfamily[palatino][rm][Palatino Linotype][features={default,
  quality}]
 
  Is there any description what that '[features={default, quality}]'
  option really does?
 
 When you apply features to a font you can set a list of features and
 all of them will be applied.
 
 In the example below you can see both methods, the first text uses the
 new featurelist testfeature which uses default and extends it with
 protrusion=quality. The second text applies the two predefined lists 
 default and quality (which sets protrusion=quality
 and expansion=quality).
 
 \definefontfeature[testfeature][default][protrusion=quality]
 ... 
 \startfont[Serif*testfeature]
 ...
 \startfont[Serif*default,quality]

Aahh, thanks. 

So it is the preset name what confused me here... From my POV the 'quality'
should be replaced with the more specific label. I believe it will enhance
readability the code. I can imagine even 'microtypography' for this kind of
preset.

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] Advanced ligatures

2014-04-29 Thread Jan Tosovsky
Dear All,

is there any way to switch the hlig or dlig features on? The corresponding
glyphs are present in the font, but somehow ignored...

\definefontfamily[palation][rm][Palatino Linotype]
\definefontfeature[f:historical_ligatures][hlig=yes]
\definefontfeature[f:discretionary_ligatures][dlig=yes]

% custom shortcuts
\define[1]\hlig{\feature[+][f:historical_ligatures]#1}
\define[1]\dlig{\feature[+][f:discretionary_ligatures]#1}

\starttext
\setupbodyfont[palatino]
ff fi fl\par
{\hlig {ct sp st}}\par
{\dlig {Qu}}\par
\stoptext

Thanks, Jan

Context 2014.04.17. 
LuaTeX 0.79.1

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

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


Re: [NTG-context] Advanced ligatures

2014-04-29 Thread Jan Tosovsky
On 2014-04-29 Wolfgang Schuster wrote: 
 Am 29.04.2014 um 16:21 schrieb Jan Tosovsky j.tosov...@email.cz:
 
  is there any way to switch the hlig or dlig features on? The
  corresponding glyphs are present in the font, but somehow ignored.
 
 The name of the typeface you defined here
 
  \definefontfamily[palation][rm][Palatino Linotype]
 
 isn't the same which you use here
 
  \setupbodyfont[palatino]
 

What a stupid mistake! Now it works as expected.

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
___


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


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
___


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] 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 thanga...@gmail.com:
 
  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
___


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


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


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


  1   2   >