Re: [NTG-context] tex error in curent beta

2015-10-26 Thread Wolfgang Schuster

Jan Tosovsky 
24. Oktober 2015 um 21:34

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

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

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

Re: [NTG-context] Bug with ConTeXt and pgfplot library fillbetween

2015-10-26 Thread Wolfgang Schuster

Aditya Mahajan 
24. Oktober 2015 um 20:45
On Fri, 23 Oct 2015, Wolfgang Schuster wrote:


Thanks!

What is the easiest way to fix this (without patching tikz)?
Ensure that | has always the same catcode in math mode independant of 
the catcode in text mode like _ and ^.

I thought that

\pushcatcodetable
\usemodule[pgfplots]
\usepgfplotslibrary[fillbetween]
\popcatcodetable

should work, but it does not. Why?

Surrounding by \unprotect ... \protect does work, so I am wondering 
what is the difference between the two?
When you use \unprotect … \protect context changes the catcode table 
between the group but when you only use push and pop this isn’t the case.


Below is a simplified version of your example where the catcode change 
remains even when I try to restore the default settings with 
\catcodetable\ctxcatcodes but I don’t now if this is a bug.


\starttext

\the\catcode`|

\catcode`|=12

\catcodetable\ctxcatcodes

\the\catcode`|

\stoptext

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

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

Re: [NTG-context] Bug with ConTeXt and pgfplot library fillbetween

2015-10-26 Thread Mojca Miklavec
On Sat, Oct 24, 2015 at 8:45 PM, Aditya Mahajan wrote:
>
> What is the easiest way to fix this (without patching tikz)?

It would also make sense to ask about the proper patch for TikZ, so
that we could push the patch upstream.

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

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

[NTG-context] Bug with ConTeXt and pgfplot library fillbetween

2015-10-26 Thread Akira Kakuto

\starttext

\the\catcode`|

\catcode`|=12

\catcodetable\ctxcatcodes

\the\catcode`|

\stoptext


mkiv gives 13, and 12.
mkii gives 13, and 13.

Best,
Akira

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

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 with label inright placement

2015-10-26 Thread Wolfgang Schuster

Rik Kabel 
26. Oktober 2015 um 02:13
The following code, a slight addition to test suite 
descriptions/labels-003.tex, when using ConTeXt from 20150904  and 
earlier works properly. Between that release and 20151004 something 
changed, and it fails with the labels shifted to reflect the 
temporarily narrowed text.

Oeps indeed!

It’s unrelated to the label mechanism.

\showframe

\starttext

\startnarrower
\inright[scope=local]{Right}\input ward
\stopnarrower

\blank

\startnarrower
\inright{Right}\input ward
\stopnarrower

\stoptext

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

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

Re: [NTG-context] Improving Pandoc Support for ConTeXt

2015-10-26 Thread Wolfgang Schuster

Aditya Mahajan 
24. Oktober 2015 um 21:11
On Mon, 19 Oct 2015, Andrew Dunning wrote:
It has been mentioned a few times on this list, with Pablo Rodríguez 
recently developing a set of templates for typesetting its XHTML 
output (at https://github.com/ousia/from-pandoc-to-context). One of 
its aims is to ease the process of producing a high-quality PDF; it 
has the strongest support for LaTeX at the moment, but it seems to me 
that ConTeXt would ultimately provide a more reliable and lightweight 
solution. The basic support is already in place; it only needs to be 
more thoroughly updated to take advantage of MkIV.


This translation is not written in a ConTeXtish way. A lot of

\startmode[*en,*uk] \chapter{...} \stopmode
\startmode[*es] \chapter {...} \stopmode

etc could be written using \labeltext. For example:

\chapter{\labeltext{notes}]

\setuplabeltext[en][notes={Notes}]
\setuplabeltext[es][notes={Notas}]
etc.

Why don’t you use \headtext?

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

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

Re: [NTG-context] list with individual item indications

2015-10-26 Thread Wolfgang Schuster

dr. Hans van der Meer 
25. Oktober 2015 um 10:46
I want to typeset a series of items in the itemize-list structure. But 
not numbered 1. 2. etc, but each item a separate indication, in fact 
in this case years. In \startitemize \startitem .. \stopitem .. 
\stopitemize I am not able to realize this and the ConTeXt Wiki on 
these commands didn't help me further.

How to accomplish?

\starttext

\startitemize[width=3em]

\txt{1978} First version of \TEX.

\txt{1982} \TEX 82.

\txt{1989} \TEX\ Version 3.0

\stopitemize

\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : 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] New btx code problem with quote protrusion, redux

2015-10-26 Thread Wolfgang Schuster

Rik Kabel 
23. Oktober 2015 um 20:40
At Wolfgang’s request, a new thread for this subject. I have cleaned 
up the example from the July 5 posting, but the problems are the same 
as shown there. In July Alan suggested that there might a bug here, 
but nothing has been done to address it since then. Wolfgang suggested 
(http://www.mail-archive.com/ntg-context%40ntg.nl/msg35580.html) that 
method=font is required for proper protrusion handling for quotations.


1. When \setupdelimitedtext[quotation][method=font] is present /and
   //there is //no citation//in a footnote within a startquotation
   block and a bibliography is produced/, compilation proceeds normally.
2. When \setupdelimitedtext[quotation][method=font] is present /and
   //there is a citation//in a footnote within a startquotation block
   and a bibliography is produced,/ the compilation complains of a
   missing right curly. When allowed to continue to completion the
   protrusion for the opening quotation marks does not match the
   protrusion for similar marks not produced through \startquotation.
   Citations in footnotes outside quotation blocks are not a problem.
   Without a bibliography (\placelistofpublications)

You have to change the following definition in publ-imp-default.mkvi:

\definebtx
  [\s!default:\s!list:title:article]
  [\s!default:\s!list:title]
- [\c!style=, % journal is set in italics
-  \c!command={\quotation\Word}]
+ [\c!style={\setcharactercasing[\v!Word]},
+  \c!command=\quotation]

3. When \setupdelimitedtext[quotation][method=font] is present, the
   [right] option of \startblockquotation is treated as text within the
   quotation. This can be resolved by adding “leftmargin=” to the
   \setupdelimitedtext[quotation] command (but that complicates matters
   when you want other alignments). Similarly, the [left] and [middle]
   options are ignored as options and appear as text.

When you use method=font context using a different rendering mechanism
for the quotation block without the optional argument.

4. When “method=font” is not present, protrusion for block quotations
   (\startblockquotation … \stopblockquotation) is greater than and not
   aligned with other protrusion.
5. When “method=font” is not present, protrusion for non-block
   quotations (\quotation{…}) is not done at all.

When you use the default method context puts the quotation marks
in a box which is only moved into the margin independant of protrusion.

6. With the older bibliography system, footnotes in citations in
   quotation blocks do not cause a halt in compilation.

See 2.

7. With the older bibliography system, item 3 is still a problem, that
   is, method=font appears to be inimical to the left, right, and
   middle options for \startblockquotation without regard to the
   bibliography system in use.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : 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
___

[NTG-context] \setfirstline Inside columns environment does not seem to work

2015-10-26 Thread josephcanedo
Dear all,


I would like to use the first line specific style magic but I cannot make it to 
work within 2 column text. I give a simple example (I’ve modified from previous 
post example on this list). Is that expected ? If you uncomment the 
\startcolumns and \stopcolumns below, the first line style disappears (both 
bigger font line and dark blue 2 first words).


I use standalone ConTeXt (installed 1 week ago or so).


$ context --version


mtx-context | ConTeXt Process Management 0.62
mtx-context |
mtx-context | main context file: 
c:/ConTeXt/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2015.10.09 21:28


Thanks

Best

Joseph Canedo


\setupbodyfont[pagella]


\starttext


% \startcolumns[n=2]


\setupindenting[medium,yes]
\setupalign[tolerant]


\definefirstline
[fancy]
[alternative=line,
style=\tfd]


\setfirstline[fancy] \input tufte \par
\setfirstline[fancy] \input ward \par
\setfirstline[fancy] \input knuth \par
\setfirstline[fancy] \input bryson \page


\definefirstline
[fancy]
[alternative=word,
color=darkblue,
style=bold,
n=2]


\setfirstline[fancy] \input tufte \par
\setfirstline[fancy] \input ward \par
\setfirstline[fancy] \input knuth \par
\setfirstline[fancy] \input bryson \page


% \stopcolumns


\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] Regression with label inright placement

2015-10-26 Thread Rik Kabel

On 2015-10-26 07:03, Wolfgang Schuster wrote:

\showframe

\starttext

\startnarrower
\inright[scope=local]{Right}\input ward
\stopnarrower

\blank

\startnarrower
\inright{Right}\input ward
\stopnarrower

\stoptext

Okay, unrelated to the label mechanism.

However, for explicitly placed margin data, as a workaround I can set 
default placement with \setupinmargin[right][scope=global]; with 
\setuplabel  I find no such option, so a fix is still needed.


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

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] Improving Pandoc Support for ConTeXt

2015-10-26 Thread Aditya Mahajan

On Mon, 26 Oct 2015, Wolfgang Schuster wrote:


 Aditya Mahajan 
 24. Oktober 2015 um 21:11
 On Mon, 19 Oct 2015, Andrew Dunning wrote:
>  It has been mentioned a few times on this list, with Pablo Rodríguez 
>  recently developing a set of templates for typesetting its XHTML output 
>  (at https://github.com/ousia/from-pandoc-to-context). One of its aims is 
>  to ease the process of producing a high-quality PDF; it has the 
>  strongest support for LaTeX at the moment, but it seems to me that 
>  ConTeXt would ultimately provide a more reliable and lightweight 
>  solution. The basic support is already in place; it only needs to be 
>  more thoroughly updated to take advantage of MkIV.


 This translation is not written in a ConTeXtish way. A lot of

 \startmode[*en,*uk] \chapter{...} \stopmode
 \startmode[*es] \chapter {...} \stopmode

 etc could be written using \labeltext. For example:

 \chapter{\labeltext{notes}]

 \setuplabeltext[en][notes={Notes}]
 \setuplabeltext[es][notes={Notas}]
 etc.

Why don’t you use \headtext?


Because I did not know about it :-)

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

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

Re: [NTG-context] Bug with ConTeXt and pgfplot library fillbetween

2015-10-26 Thread Aditya Mahajan

On Mon, 26 Oct 2015, Wolfgang Schuster wrote:
Below is a simplified version of your example where the catcode change 
remains even when I try to restore the default settings with 
\catcodetable\ctxcatcodes but I don’t now if this is a bug.


\starttext
\the\catcode`|
\catcode`|=12
\catcodetable\ctxcatcodes
\the\catcode`|
\stoptext


This works:

\starttext
\the\catcode`|
\pushcatcodetable
\catcodetable\prtcatcodes
\catcode`|=12
\popcatcodetable
\the\catcode`|
\stoptext

(Note that under \prtcatcode, the catcode of | is 12). 
But replacing \prtcatcodes with \ctxcatcodes does not work.


So, one "proper" fix may be add a new catcodetable, say \tikzcatcodes, for 
all the catcode changes that tikz does.


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

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