Re: [NTG-context] Problem with rfc4180splitter

2016-01-29 Thread Hans Hagen

On 1/27/2016 9:04 PM, Jaroslav Hajtmar wrote:

Hello ConTeXist.
After some time I tried to run my older scripts using the latest version
of the standalone ConTeXt and I found that my scripts crashing. When I
testing, I discovered that the culprit is likely to be some change
splitter utilities.parsers.rfc4180splitter. Can you please advise
anybody that somehow did change the functionality of this script and
aproximatelly in which date? The script is the cornerstone of my library
and I need to find out what had changed in him. I want figure out what
the problem is.


i'm not sure if something changed recently but you could diff the old 
and new versions


Hans


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

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

[NTG-context] beta

2016-01-29 Thread Hans Hagen

Hi,

I uploaded a beta. Apart from things mentioned here th emost important 
change is the xml entity handler, some additions to the command setup 
code, and a few extra \xml* helpers (plus some obscure removed). So, if 
you have a critical xml flow, snapshot your tree first.


Hans

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

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

Re: [NTG-context] beta

2016-01-29 Thread Wolfgang Schuster

Hans Hagen 
29. Januar 2016 um 16:12
Hi,

I uploaded a beta. Apart from things mentioned here th emost important 
change is the xml entity handler, some additions to the command setup 
code, and a few extra \xml* helpers (plus some obscure removed). So, 
if you have a critical xml flow, snapshot your tree first.

Doesn’t work here.


This is LuaTeX, Version beta-0.88.0 (TeX Live 2016/dev)  (INITEX)
 system commands enabled.
(/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv 
(/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/context.mkiv 
(/Users/wolf/context/beta/tex/texmf-context/tex/context/base/mkiv/syst-ini.mkiv

warning  (pdf backend): unexpected use of \pdfvariable

warning  (pdf backend): unexpected use of \pdfvariable
! Missing number, treated as zero.

\edef
l.1017 \edef
  \pdfgentounicode{\pdfvariable gentounicode}
\pdfgen...



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] If figures are placed left, left-aligned captions are unwantedly centered

2016-01-29 Thread Aditya Mahajan

On Fri, 29 Jan 2016, Hans Hagen wrote:


On 1/29/2016 9:30 PM, d_jan wrote:

 Hello fellow ConTeXt users,


 I want to place figures left so that text wraps around them if they have
 less width than \textwidth. The figure captions should be aligned left
 (flushleft).

 What happens: The captions are all centered.


What happens is that a caption < width kicks in.


But we already have a way to get around that: width=max

\setupfloat[figure][default={left,nonumber}]

\setupcaption[figure][align=flushleft, width=max]

\starttext

\placefigure{my figure caption a really long 
caption}{\externalfigure[images/image1.jpg]}

\input knuth

\placefigure{my figure caption}{\externalfigure[images/image1.jpg]}
\input tufte
\stoptext

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] If figures are placed left, left-aligned captions are unwantedly centered

2016-01-29 Thread Hans Hagen

On 1/30/2016 12:26 AM, Aditya Mahajan wrote:

On Fri, 29 Jan 2016, Hans Hagen wrote:


On 1/29/2016 9:30 PM, d_jan wrote:

 Hello fellow ConTeXt users,


 I want to place figures left so that text wraps around them if they
have
 less width than \textwidth. The figure captions should be aligned left
 (flushleft).

 What happens: The captions are all centered.


What happens is that a caption < width kicks in.


But we already have a way to get around that: width=max

\setupfloat[figure][default={left,nonumber}]

\setupcaption[figure][align=flushleft, width=max]

\starttext

\placefigure{my figure caption a really long
caption}{\externalfigure[images/image1.jpg]}
\input knuth

\placefigure{my figure caption}{\externalfigure[images/image1.jpg]}
\input tufte
\stoptext


indeed, you're right, no need to change something (i'll add an example 
to the test suite)


Hans


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

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

Re: [NTG-context] If figures are placed left, left-aligned captions are unwantedly centered

2016-01-29 Thread Hans Hagen

On 1/29/2016 9:30 PM, d_jan wrote:

Hello fellow ConTeXt users,


I want to place figures left so that text wraps around them if they have
less width than \textwidth. The figure captions should be aligned left
(flushleft).

What happens: The captions are all centered.


What happens is that a caption < width kicks in.

% put this on cont=-new.mkiv

\unprotect

\def\strc_floats_prepare_side_caption_fit
  {\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax
 \setbox\b_strc_floats_caption\vbox
   {\forgetall % needed?
\hsize\wd\b_strc_floats_content
\strc_floats_make_complete_caption}%
   \else
  \setbox\b_strc_floats_caption\hpack
{\strc_floats_make_complete_caption}%
   \fi}

\protect

% then you can do this (maybe Wolfgang can check the logic too):

\starttext

\setupfloat[figure][default={left,nonumber}]

\placefigure{my figure caption my figure 
caption}{\framed[width=4cm,height=1cm]{}} \input tufte
\placefigure{my figure caption} 
{\framed[width=4cm,height=1cm]{}} \input tufte


\setupfloat[figure][location=left]

\placefigure{my figure caption my figure 
caption}{\framed[width=4cm,height=1cm]{}} \input tufte
\placefigure{my figure caption} 
{\framed[width=4cm,height=1cm]{}} \input tufte


\stoptext

don't use flushleft as that won't work ok for location


Details:

If I use default={here,nonumber} instead of default={left,nonumber}
in\setupfloat[figure][default=..., the captions are aligned left, just
like they should.

It does not matter if the text warps around the captioned image, the
centered is present for all figure-captions, regardless of their width.


Code demonstrating the behaviour:
-

\setupfloat[figure][default={left,nonumber}]

\setupcaption[figure][align=flushleft] %prefix: section-wis 3

\starttext

%here is some text...
Lorem Ipsum

\placefigure{my figure caption}{\externalfigure[images/image1.jpg]}


%here is some text
Lorem Ipsum
\placefigure{my figure caption}{\externalfigure[images/image1.jpg]}


Is there any way to left-place figures and have the captions flushleft
aligned? (Ideally while keeping the content after starttext the same)

addition: I tried with an comes-with-Ubuntu-14.04 and a LiveTex2015
Version of ConTeXt, no difference in behavior.

Kind Regards,
  Jan

PS.: Previously posted this on tex.stackexchange too
(http://tex.stackexchange.com/questions/289752/if-figures-are-placed-left-left-aligned-captions-are-unwantedly-centered-conte),
but without answers so far.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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




--

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

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

[NTG-context] If figures are placed left, left-aligned captions are unwantedly centered

2016-01-29 Thread d_jan
Hello fellow ConTeXt users,


I want to place figures left so that text wraps around them if they have
less width than \textwidth. The figure captions should be aligned left
(flushleft).

What happens: The captions are all centered.

Details:

If I use default={here,nonumber} instead of default={left,nonumber}
in\setupfloat[figure][default=..., the captions are aligned left, just
like they should.

It does not matter if the text warps around the captioned image, the
centered is present for all figure-captions, regardless of their width.


Code demonstrating the behaviour:
-

   \setupfloat[figure][default={left,nonumber}]

   \setupcaption[figure][align=flushleft] %prefix: section-wis 3

   \starttext

   %here is some text...
   Lorem Ipsum

   \placefigure{my figure caption}{\externalfigure[images/image1.jpg]}


   %here is some text
   Lorem Ipsum
   \placefigure{my figure caption}{\externalfigure[images/image1.jpg]}


Is there any way to left-place figures and have the captions flushleft
aligned? (Ideally while keeping the content after starttext the same)

addition: I tried with an comes-with-Ubuntu-14.04 and a LiveTex2015
Version of ConTeXt, no difference in behavior.

Kind Regards,
 Jan

PS.: Previously posted this on tex.stackexchange too
(http://tex.stackexchange.com/questions/289752/if-figures-are-placed-left-left-aligned-captions-are-unwantedly-centered-conte),
but without answers so far.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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