Re: [NTG-context] issue with string.collapsespaces()

2018-02-12 Thread Pablo Rodriguez
On 02/12/2018 05:09 PM, Hans Hagen wrote:
> On 2/12/2018 5:00 PM, Pablo Rodriguez wrote:
>> [...]
>> Sorry for the stupid question, but isn’t the collapsespaces function
>> intended to remove spaces?
>>
>> What am I missing here?
>> 
> that it collapses multiple spaces into one
Many thanks for your reply, Hans.

I understood “collapse” as “remove”, and obviously they are two
different actions.

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an 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] issue with string.collapsespaces()

2018-02-12 Thread Hans Hagen

On 2/12/2018 5:00 PM, Pablo Rodriguez wrote:

Dear list,

I have the following sample:

 \starttext
 \startlua
 a = "a bc de"
 context(string.collapsespaces(a))
 \stoplua
 \stoptext

Sorry for the stupid question, but isn’t the collapsespaces function
intended to remove spaces?

What am I missing here?

that it collapses multiple spaces into one

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] issue with string.collapsespaces()

2018-02-12 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\starttext
\startlua
a = "a bc de"
context(string.collapsespaces(a))
\stoplua
\stoptext

Sorry for the stupid question, but isn’t the collapsespaces function
intended to remove spaces?

What am I missing here?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an 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] notes in the margin

2018-02-12 Thread Henning Hraban Ramm
Ahoi,
I’m still working on this issue.

For the usual cases, the current mechanism is good (see attachment).

* I gave up on the number placement in its own line (without text indent).

* Footnotes in captions mostly disappear.

* Footnotes in captions or other boxed environments (chapter title in my case) 
get misplaced, e.g. if a figure is narrower than \textwidth, the margin note is 
moved into the textarea by the difference.

\startplacefigure[location=here,title={Some caption\footnote{Source of the 
image. This disappeares or gets misplaced}}]
\externalfigure[cow]%[width=.8\textwidth]
\placelocalfootnotes % doesn’t change anything
\stopplacefigure

* Further, in some cases it would be good to move the margin note by a few 
lines higher or lower.
 \inmargin has this first parameter: "+ - low" in reference, e.g. \inmargin 
[method=first,voffset=-6pt] in source typo-mar.mkiv)
 I just need a way to transfer this option through \footnote: I used a global 
definition that I redefine where I need it:

\def\FNVOffset{0} % vertical shift of footnotes in negative lines
% this is unclean, but works quite well

\define\PlaceFootnote%
 
{\inmargin[voffset=\dimexpr-\FNVOffset\lineheight\relax]{\vtop{\placelocalnotes[footnote][before=,after=]}}}
\def\FNo#1{{\ss\tfx #1}}

\setupnote[footnote]
 [location=text,
  bodyfont=,
  indenting=no,
  before={\noindent},
  next=\PlaceFootnote]
\setupnotation[footnote][
   way=bychapter,
   align=flushleft,
   style={\ss\tfx},
   indenting=no,
   location=serried,
   alternative=serried,
   width=broad,
   numbercommand=\FNo,
]
\setuptexttexts[margin][]
   [{\framed[
 align={flushleft,bottom},
 frame=off,
 height=\textheight,
 width=\rightmarginwidth]{%
 \strut\vfill\placenotes[footnote]}}]

\setupmargindata[inmargin][location=outer,stack=continue,align=flushleft,style={\ss\tfx}]
\setupmargindata[inouter][location=outer,stack=continue,align=flushleft,style={\ss\tfx}]



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD


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