Re: [NTG-context] ending every paragraph

2015-08-04 Thread Ulrike Fischer
Am Sun, 2 Aug 2015 05:36:29 -0600 schrieb idris.ha...@colostate.edu:

 It's also curious that, for all its power, TeX has no straightforward way  
 to recognize paragraph endings.

But tex *does* recognize paragraph endings. After all it does
paragraph separation in a very reliable way and inserts a \par
token.

You could redefine \par to insert something:

\def\par{end of line\endgraf}

\starttext

abc

abc

abc

abc \par blblbl
\stoptext

But as \par is used in various places it could get rather difficult
to fight against the side-effects. A dedicated \stopparagraph
command is much easier to control. 

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] Linenumering inside floats

2015-08-04 Thread Aditya Mahajan

On Wed, 29 Jul 2015, Hans Hagen wrote:


On 6/30/2015 7:56 PM, Aditya Mahajan wrote:

Hi,

I am forwarding a feature request for the t-vim module:
https://github.com/adityam/filter/issues/21

Is there a way to enable line numbering inside floats:

\definefloat[sourcecode][sourcecodes]

\startbuffer
\startlinenumbering
   \input tufte
\stoplinenumbering
\stopbuffer

\starttext
 \startplacesourcecode
   \getbuffer
 \stopplacesourcecode

 \getbuffer
\stoptext


in next beta (somewhat experimental as i needed to adapt an important 
helper for framed)


The example posted above does not work with the beta 2015.08.04.

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
___

[NTG-context] Some questions about an environment (Metafun)

2015-08-04 Thread Fabrice Couvreur
 Hi,
How to have Definition 1, Definition 2, Definition 3 ... ?

Is it possible to translate the image p until the left edge of the text area
?

Thank you,
Fabrice

\showframe

\setupcolors[state=start,cmyk=yes]

\definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
\definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

\setupbodyfont[11pt]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\defineframedtext
   [MyText]
   [frame=off,
background=MyFrame,
width=0.9\textwidth,
location=right]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\def\StartFrame{\startMyText}
\def\StopFrame{\startMyText}

\setMPtext{MyFrame}{\hbox spread 1em {\hss\strut
{\bf\feature[+][f:smallcaps]  Définition 1 }\hss}}}

\startuseMPgraphic{MyFrame}

path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (0,OverlayHeight-ypart center p) ;
a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
fill a withcolor \MPcolor{MyColor} ;
b := boundingbox p ;
fill b withcolor \MPcolor{myColor} ;
draw p withcolor white ;

\stopuseMPgraphic

\starttext
\startlinecorrection[blank]
\startMyText
\input knuth
\stopMyText
\stoplinecorrection

\startlinecorrection[blank]
\startMyText
\input knuth
\stopMyText
\stoplinecorrection

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

[NTG-context] local environment?

2015-08-04 Thread tala...@fastmail.fm
Dear all,

What is the replacement for `localenvironment` in project structures?

The first part of my book has one layout; the second has another. I have 
designed one environment for the first part, and another environment for the 
second. I do not want the first environment to be used for the second half of 
the book.

In cont-eni.pdf, I read about using `localenvironment` for such scenarios, but 
it seems this has been removed.

This is probably a very basic question, but how do I should change the 
following such that *one pdf* is produced, where the first part—ComponentA—uses 
EnvironmentA’s layout, while the second part—ComponentB—uses EnvironmentB's. If 
any startsetups need to be defined, I’d be grateful for any example, showing 
also where to place them.

# Product
\startproduct MyProduct
\component ComponentA
\component ComponentB
\stopproduct

# EnvironmentA
\startenvironment envA
% the definitions
\stopenvironment

# EnvironmentB
\startenvironment envB
% the definitions
\stopenvironment

# ComponentA
\environment envA
\product MyProduct
\startcomponent ComponentA
\starttext
…
\stoptext

# ComponentB
\environment envB
\product MyProduct
\startcomponent ComponentA
\starttext
…
\stoptext

---
With thanks,
Talal
___
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] Linenumering inside floats

2015-08-04 Thread Aditya Mahajan

On Tue, 4 Aug 2015, Hans Hagen wrote:


On 8/4/2015 4:52 PM, Aditya Mahajan wrote:

On Wed, 29 Jul 2015, Hans Hagen wrote:


On 6/30/2015 7:56 PM, Aditya Mahajan wrote:

Hi,

I am forwarding a feature request for the t-vim module:
https://github.com/adityam/filter/issues/21

Is there a way to enable line numbering inside floats:

\definefloat[sourcecode][sourcecodes]

\startbuffer
\startlinenumbering
   \input tufte
\stoplinenumbering
\stopbuffer

\starttext
 \startplacesourcecode
   \getbuffer
 \stopplacesourcecode

 \getbuffer
\stoptext


in next beta (somewhat experimental as i needed to adapt an important
helper for framed)


The example posted above does not work with the beta 2015.08.04.


you need to wrap it in framed

 \startplacesourcecode
   \framed[align=normal,frame=off]{\getbuffer}
 \stopplacesourcecode


Ah, thanks!

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
___

[NTG-context] Is this a bug?

2015-08-04 Thread Matt Gushee
Hello, all--

I asked this question a few days ago, in the context of solving a problem I
was having. That problem is solved, thanks to Wolfgang, but I haven't seen
any response to my mention of what I think is a bug.

The issue I was having was that, when I tried to process an old project
with mkIV, there was no output because the project structure was obsolete:
it contained a project and several products, but no components.

But even though there was no output, there was also no error message, and
in fact the log file falsely reported that a PDF file had been saved. That
can't be right, can it? Seems like a bug.

My ConTeXt version is:
current version: 2015.05.18 12:26

--
Matt Gushee
___
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] Some questions about an environment (Metafun)

2015-08-04 Thread Hans Hagen

On 8/4/2015 5:04 PM, Fabrice Couvreur wrote:

Hi,
How to have Definition 1, Definition 2, Definition 3 ...?

Is it possible to translate the image p until the left edge of the text
area ?



\startuseMPgraphic{MyFrame}
picture p ;
p := textext.rt(\MPstring{MyFrame}) ;
p := p shifted (0,OverlayHeight-ypart center p) ;
fill OverlayBox leftenlarged .1TextWidth withcolor \MPcolor{MyColor} ;
fill boundingbox p withcolor \MPcolor{myColor} ;
draw p withcolor white ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic




Thank you,
Fabrice

\showframe

\setupcolors[state=start,cmyk=yes]

\definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
\definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

\setupbodyfont[11pt]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\defineframedtext
[MyText]
[frame=off,
 background=MyFrame,
 width=0.9\textwidth,
 location=right]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\def\StartFrame{\startMyText}
\def\StopFrame{\startMyText}

\setMPtext{MyFrame}{\hbox spread 1em {\hss\strut
{\bf\feature[+][f:smallcaps]  Définition 1 }\hss}}}

\startuseMPgraphic{MyFrame}

path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (0,OverlayHeight-ypart center p) ;
a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
fill a withcolor \MPcolor{MyColor} ;
b := boundingbox p ;
fill b withcolor \MPcolor{myColor} ;
draw p withcolor white ;

\stopuseMPgraphic

\starttext
\startlinecorrection[blank]
\startMyText
\input knuth
\stopMyText
\stoplinecorrection

\startlinecorrection[blank]
\startMyText
\input knuth
\stopMyText
\stoplinecorrection

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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | 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] r2l alignment and linenumbering conflict?

2015-08-04 Thread Otared Kavian
Hi Hans,

Thanks for the new beta.

As Idris pointed out, the logic you follow for naming greeknumerals, 
romannumerals, persiannumerals, arabicnumerals, and all others in core-con.lua, 
makes sense but I didn’t notice this logic before…  Which means one may learn 
each and evry day :-)

As far as I know, at least in the Persian use of the abjad system of counting, 
the first case corresponding to the number 1, is usually written 
الف
in order to avoid the confusion with the digit 
۱

I don’t know if this can be fixed in the table you have in core-con.lua.

A further remark is that, don’t you think that the pagenumbering, as well as 
the numbers for chapters, sections, items, equations, etc, should be switched 
by default to arabicdecimals, or persiandecimals, as soon as \mainlanguage has 
been set to arabic or persian?
Or maybe one could have a command like
\setupdefaultnumberings[arabicdecimals]
which sets a default for conversion of numbers for all the counters.

Again many thanks for the features you included in ConTeXt for bidi writing.

Best regards: OK

 On 04 Aug 2015, at 01:30, Hans Hagen pra...@wxs.nl wrote:
 
 On 8/3/2015 9:25 PM, Otared Kavian wrote:
 Hi Hans, Idris, Talal,
 
 Some years ago we had a discussion on the issue, but I don’t remember where 
 we ended up…
 In my opinion, I think that the numberings should be maned as follows:
 
 arabicnumerals: should be  ١,٢,٣,٤,٥,٦,٧,٨,٩,٠
 
 persiannumerals: should be ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۰
 
 abjadnumerals: should be الف، ب، ج، د، ه، و، ز،…..
 
 As of today it seems that « persiannumerals » results in what should be 
 named abjadnuemrals, and this is not correct.
 
 so you and idris and tatal has to come to some agreement on that
 
 we have these alphabetic ones
 
 arabicnumerals
 persiannumerals
 arabicexnumerals
 
 and some special ones
 
 abjadnumerals
 abjadnodotnumerals
 
 (these use small, medium, large chars and do special things with 10 100 1000)
 
 and now
 
 arabicdecimals
 persiandecimals
 
 see core-con.lua
 
 Hans
 
 -
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | 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
 ___

___
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] Linenumering inside floats

2015-08-04 Thread Hans Hagen

On 8/4/2015 4:52 PM, Aditya Mahajan wrote:

On Wed, 29 Jul 2015, Hans Hagen wrote:


On 6/30/2015 7:56 PM, Aditya Mahajan wrote:

Hi,

I am forwarding a feature request for the t-vim module:
https://github.com/adityam/filter/issues/21

Is there a way to enable line numbering inside floats:

\definefloat[sourcecode][sourcecodes]

\startbuffer
\startlinenumbering
   \input tufte
\stoplinenumbering
\stopbuffer

\starttext
 \startplacesourcecode
   \getbuffer
 \stopplacesourcecode

 \getbuffer
\stoptext


in next beta (somewhat experimental as i needed to adapt an important
helper for framed)


The example posted above does not work with the beta 2015.08.04.


you need to wrap it in framed

 \startplacesourcecode
   \framed[align=normal,frame=off]{\getbuffer}
 \stopplacesourcecode



--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | 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] Formatting footnotes

2015-08-04 Thread robheus

Wolfgang Schuster schreef op 2015-08-03 12:00:

robheus
3. August 2015 11:31
Hello list,

I want some adjustments to my footnotes.

1. The note number in the footnote needs to be normal instead of
superscript.

2. The placement of the number is now in the margin, but needs to be
in the normal starting position of body text. Of course the foot
note texts then has to shift accordingly to the right, and leaving
enough room for footnote numbers not exceeding 99.

How do I dot this?

 \setupnotation[footnote][alternative=serried,numbercommand=]

\starttext
One\footnote{First footnote.}
Two\footnote{Second footnote.}
\stoptext

Wolfgang


Thanks Wolfgang. This is almost the result what I want, just that I want 
the footnote text in a seperate column, not the first line of a footnote 
indented.


Rob
___
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] Some questions about an environment (Metafun)

2015-08-04 Thread Fabrice Couvreur
Hi Hans,
Thank you for your suggestion, but it's not what I want, but I probably
misstated my request. For me, the image p contains the text Définition 1, and
this is what I want orange rectangle translate to the left edge of the text
area.
Am I more clearly ?
Fabrice

2015-08-04 20:08 GMT+02:00 Hans Hagen pra...@wxs.nl:

 On 8/4/2015 5:04 PM, Fabrice Couvreur wrote:

 Hi,
 How to have Definition 1, Definition 2, Definition 3 ...?

 Is it possible to translate the image p until the left edge of the text
 area ?



 \startuseMPgraphic{MyFrame}
 picture p ;
 p := textext.rt(\MPstring{MyFrame}) ;
 p := p shifted (0,OverlayHeight-ypart center p) ;
 fill OverlayBox leftenlarged .1TextWidth withcolor \MPcolor{MyColor} ;
 fill boundingbox p withcolor \MPcolor{myColor} ;
 draw p withcolor white ;
 setbounds currentpicture to OverlayBox ;
 \stopuseMPgraphic



 Thank you,
 Fabrice

 \showframe

 \setupcolors[state=start,cmyk=yes]

 \definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
 \definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

 \setupbodyfont[11pt]
 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

 \defineframedtext
 [MyText]
 [frame=off,
  background=MyFrame,
  width=0.9\textwidth,
  location=right]

 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

 \def\StartFrame{\startMyText}
 \def\StopFrame{\startMyText}

 \setMPtext{MyFrame}{\hbox spread 1em {\hss\strut
 {\bf\feature[+][f:smallcaps]  Définition 1 }\hss}}}

 \startuseMPgraphic{MyFrame}

 path a ;
 path b ;
 picture p ;
 o := BodyFontSize ;
 p :=textext.rt(\MPstring{MyFrame}) ;
 p := p shifted (0,OverlayHeight-ypart center p) ;
 a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
 fill a withcolor \MPcolor{MyColor} ;
 b := boundingbox p ;
 fill b withcolor \MPcolor{myColor} ;
 draw p withcolor white ;

 \stopuseMPgraphic

 \starttext
 \startlinecorrection[blank]
 \startMyText
 \input knuth
 \stopMyText
 \stoplinecorrection

 \startlinecorrection[blank]
 \startMyText
 \input knuth
 \stopMyText
 \stoplinecorrection

 \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

 ___



 --

 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | 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

 ___

___
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] r2l alignment and linenumbering conflict?

2015-08-04 Thread Hans Hagen

On 8/4/2015 5:46 AM, tala...@fastmail.fm wrote:

Hans, the beta is a solid step forward regarding bidi and Arabic support, and 
not just in footnotes. Thank you.

However, it appears that my earlier declarations of ‘problem solved’ were a bit 
premature.  Footnotes display everything correctly, but not linenumber notes. 
Using the three bidi methods of \setupdirections[bidi]:

- ‘default’ orders the linenumber notes and their texts right-to-left, but any 
number therein is reversed (4102 instead of 2014).


let's first try to get that one right .. new beta coming (also needs 
testing by idris



- ‘one’ does not render either the note block nor the individual notes' texts 
right-to-left.


i have to rewrite that one using more efficient means (i really need 48 
hour sin a day)



- ‘two’ is identical to method ‘one’.


it is .. just a newer version of the unicode bidi one


Compare these to regular footnotes, where everything is rendered correctly as 
of this new beta.


you can trace flagging in default with:

\enabletrackers[typesetters.directions.default]

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | 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] Formatting footnotes - conditional rule

2015-08-04 Thread robheus

Hello list,

Formatting footnotes allows defining wether the rule is on or off, 
seperating normal text from the foot notes.
Can it be implemented in Context to display the footnote rule depending 
on wether either a new footnote begins (fist line starts with foot note 
number) or the footnote text is a continuation of a footnote started on 
a previous page?


Thanks,

Rob
___
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] Some questions about an environment (Metafun)

2015-08-04 Thread Aditya Mahajan

On Tue, 4 Aug 2015, Fabrice Couvreur wrote:


How to have Definition 1, Definition 2, Definition 3 ... ?


\defineenumeration[definition][text=Definition]

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
___