Re: [NTG-context] avoid newline after definestartstop

2016-10-24 Thread Thomas A. Schmitz

On 10/24/2016 05:08 PM, Otared Kavian wrote:

Hi Michael,

Maybe what Wolfgang meant by « putting the marks by hand » is something like: 
you define \StartCitation and \StopCitation in the following way:

% begin quotation-note.tex

\define\StartCitation{\startnarrower[left,right]«~}
\define[1]\StopCitation{~»\footnote{#1}\stopnarrower}

\starttext
\input tufte
\StartCitation
 \input knuth
\StopCitation{This is a Quote of Donald Knuth}
\stoptext
% end quotation-note.tex

Indeed instead of the quotation marks « and » you can put whatever you wish.
If you have quotations without footnotes, then you may define another 
start-stop.


Here would be my suggestion, which gives a syntax that is a bit more 
ConTeXt-like, I feel (but the coding can probably be improved):


\def\startQuote%
  {\dosingleempty\dostartQuote}

\def\dostartQuote[#1]%
  {\blank [line]
   \iffirstargument
\getparameters[QQ][note=oops,#1]
\def\stopQuote{\footnote{\QQnote}\stopnarrower\blank [line]}%
  \else
\def\stopQuote{\stopnarrower\blank [line]}
  \fi
  \setupnarrower [left=1cm,right=2cm]
  \startnarrower}

\starttext

\input zapf

\startQuote
\input tufte
\stopQuote

\startQuote[note=Knuth]
\input knuth
\stopQuote

\stoptext

Thomas
___
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] avoid newline after definestartstop

2016-10-24 Thread Wolfgang Schuster

Michael Eidenbenz 
20. Oktober 2016 um 11:13
hello,

how can I put the footnote number right after the quotationmarks 
without having a newline?

dontleavehmode does not work.
The quotation environments creates a separate paragraph for the content 
and anything

after is belongs to a new paragraph.

thanks michael

\definestartstop[Citation]
[before={\startnarrower[left,right]\startquotation},
after={\stopquotation\stopnarrower\dontleavehmode}]

You can do the same with a custom quote environment:

\definedelimitedtext
  [Citation]
  [quotation]
  [leftmargin=standard]

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

Re: [NTG-context] avoid newline after definestartstop

2016-10-24 Thread Pablo Rodriguez
On 10/24/2016 06:07 PM, Michael Eidenbenz wrote:
> Thanks!
> 
> sometimes the moste obvious is hidden...
> although I would consider this a hack, it works perfectly.
> but I'm still wondering, if there is no soultion for the more
> "canonical" way.
> 
> Regards Michael

Hi Michael,

allow me two comments on your issue.

The hack is also using a block element as span element (pardon my XML
parlance). Either I’m missing something, or how would you do the same
with  in HTML?

From a typographical point of view, do you really need the quotes with a
narrower paragraph? I mean, do you think it isn’t clear enough that this
is quote?

Just in case it might be useful,

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] avoid newline after definestartstop

2016-10-24 Thread Michael Eidenbenz
Thanks!

sometimes the moste obvious is hidden...
although I would consider this a hack, it works perfectly.
but I'm still wondering, if there is no soultion for the more "canonical" way.

Regards Michael

> On 24 Oct 2016, at 17:08, Otared Kavian  wrote:
> 
> Hi Michael,
> 
> Maybe what Wolfgang meant by « putting the marks by hand » is something like: 
> you define \StartCitation and \StopCitation in the following way:
> 
> % begin quotation-note.tex
> 
> \define\StartCitation{\startnarrower[left,right]«~}
> \define[1]\StopCitation{~»\footnote{#1}\stopnarrower}
> 
> \starttext
> \input tufte
> \StartCitation
>  \input knuth
> \StopCitation{This is a Quote of Donald Knuth}
> \stoptext
> % end quotation-note.tex
> 
> Indeed instead of the quotation marks « and » you can put whatever you wish.
> If you have quotations without footnotes, then you may define another 
> start-stop.
> 
> Best regards: OK
> 
>> On 24 Oct 2016, at 12:42, Michael Eidenbenz > > wrote:
>> 
>> hello,
>> 
>> I found this old mail below, that is related to my problem.
>> is there still no workaround for this problem?
>> putting a (foot)note after a quotation mark is quite common and I don't want 
>> to put the marks by hand.
>> 
>> i was looking at spac-hor.mkiv and tried setupnarrower[after=]. 
>> but this did not work.
>> 
>> any help is appreciated
>> 
>> thanks michael
>> 
>> 
>>> Am 21.08.2014 um 23:42 schrieb Gerben Wierda >> >:
>>> 
 Is it possible to use \startquotation..\stopquotation and have an endnote 
 number follow the closing ''? If the \endnote is before \stopquotation, it 
 ends up inside the '' character at the end. If it is after \stopquotation, 
 it 
 becomes the beginning of the next paragraph.
>>> 
>>> 
>>> AFAIK this is only possible when you place the quotation marks by hand.
>>> 
>>> Wolfgang
>> 
>> 
>> 
>>> 
>>> On 20 Oct 2016, at 11:13, Michael Eidenbenz >> > wrote:
>>> 
>>> hello,
>>> 
>>> how can I put the footnote number right after the quotationmarks without 
>>> having a newline?
>>> dontleavehmode does not work.
>>> 
>>> thanks michael
>>> 
>>> 
>>> 
>>> 
>>> \definestartstop[Citation]
>>>[before={\startnarrower[left,right]\startquotation},
>>> after={\stopquotation\stopnarrower\dontleavehmode}]
>>> 
>>> \starttext
>>> \input tufte
>>> \startCitation
>>>  \input knuth
>>> \stopCitation
>>> \footnote{This is a Quote of Donald Knuth}
>>> \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://context.aanhet.net 
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>>> 
>>> 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://context.aanhet.net 
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> 
>> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : 

Re: [NTG-context] avoid newline after definestartstop

2016-10-24 Thread Otared Kavian
Hi Michael,

Maybe what Wolfgang meant by « putting the marks by hand » is something like: 
you define \StartCitation and \StopCitation in the following way:

% begin quotation-note.tex

\define\StartCitation{\startnarrower[left,right]«~}
\define[1]\StopCitation{~»\footnote{#1}\stopnarrower}

\starttext
\input tufte
\StartCitation
 \input knuth
\StopCitation{This is a Quote of Donald Knuth}
\stoptext
% end quotation-note.tex

Indeed instead of the quotation marks « and » you can put whatever you wish.
If you have quotations without footnotes, then you may define another 
start-stop.

Best regards: OK

> On 24 Oct 2016, at 12:42, Michael Eidenbenz  wrote:
> 
> hello,
> 
> I found this old mail below, that is related to my problem.
> is there still no workaround for this problem?
> putting a (foot)note after a quotation mark is quite common and I don't want 
> to put the marks by hand.
> 
> i was looking at spac-hor.mkiv and tried setupnarrower[after=]. 
> but this did not work.
> 
> any help is appreciated
> 
> thanks michael
> 
> 
>> Am 21.08.2014 um 23:42 schrieb Gerben Wierda > >:
>> 
>>> Is it possible to use \startquotation..\stopquotation and have an endnote 
>>> number follow the closing ''? If the \endnote is before \stopquotation, it 
>>> ends up inside the '' character at the end. If it is after \stopquotation, 
>>> it 
>>> becomes the beginning of the next paragraph.
>> 
>> 
>> AFAIK this is only possible when you place the quotation marks by hand.
>> 
>> Wolfgang
> 
> 
> 
>> 
>> On 20 Oct 2016, at 11:13, Michael Eidenbenz > > wrote:
>> 
>> hello,
>> 
>> how can I put the footnote number right after the quotationmarks without 
>> having a newline?
>> dontleavehmode does not work.
>> 
>> thanks michael
>> 
>> 
>> 
>> 
>> \definestartstop[Citation]
>>[before={\startnarrower[left,right]\startquotation},
>> after={\stopquotation\stopnarrower\dontleavehmode}]
>> 
>> \starttext
>> \input tufte
>> \startCitation
>>  \input knuth
>> \stopCitation
>> \footnote{This is a Quote of Donald Knuth}
>> \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://context.aanhet.net 
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> 
>> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Text editors

2016-10-24 Thread Nicola

On 24/10/2016 13:41, Henning Hraban Ramm wrote:


How about including the vim support files in the distribution (like the SciTE 
support files)?


Updated scripts for ConTeXt have just been included in Vim:

https://github.com/vim/vim/commit/46fceaaa8d1447a9588736d86eb4908214187b08

so there is no need to include anything in the ConTeXt distribution.

I plan to update the Vim wiki page on ConTeXt Garden when I have some 
time: I will post here when I have done it.


Nicola


___
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] Algorithmic, Floats and line numbers.

2016-10-24 Thread Javier M Mora

Hi, I'm trying to use Algorithmic module with floating and line numbering.

In the first attempt, I get the "code" with lines numbered. But isn't 
floating.


In the second one, line numbers disappear inside the floating block.


Two questions:

* How can I get line numbers inside floating block?

* In algorithms, I think it has more sense to number only "logical" 
lines. The second state is so long that wraps into another line. Is it 
possible to number only logical lines?



This is my little test file:

\starttext

\usemodule[algorithmic]

%% First Attempt
\startalgorithmic[numbering=yes]
  \STATE a = 2
  \STATE this line is really very large. Very very very very very very 
very very very very very large

  \STATE this is the real third state.
\stopalgorithmic

\definefloat[algorithm][algorithms]
\setupfloat[algorithm][
  background=color,
  backgroundcolor=gray,
]

%% Second Attempt
\startplacealgorithm[title={Floating algorithm}]
  \startalgorithmic[numbering=yes]
\STATE a = 2
\STATE this line is really very large. Very very very very very very
very very very very very large
\STATE this is the real third state.
  \stopalgorithmic
\stopplacealgorithm

\stoptext


Thanks.

jmmora.
___
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] Text editors

2016-10-24 Thread Michael Eidenbenz
Hi,

I use emacs with the spacemacs distribution.
To manage my bibliographies (and also images) I use ebib 
(http://joostkremers.github.io/ebib/ ) 
instead of reftex.

Regards, Michael

> On 24 Oct 2016, at 13:41, Henning Hraban Ramm  wrote:
> 
> Hi all,
> 
> I just edited http://wiki.contextgarden.net/Text_Editors,
> reordered, updated, killed some discontinued programs etc.
> 
> I didn’t delete wiki pages of outdated apps, though.
> 
> There’s still a lot of room for enhancement, e.g. the feature columns make no 
> sense this way.
> 
> I’d like to know:
> - What editor(s) do you use for ConTeXt?
> - Are there any other editors with ConTeXt (not only LaTeX) support?
> 
> How about including the vim support files in the distribution (like the SciTE 
> support files)?
> 
> I recently discovered Textadept, a relative of SciTe’s, also available for 
> OSX - did anyone try to adapt SciTE ConTeXt support for that?
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> https://www.cacert.org (I'm an assurer)
> GPG Key ID 1C9B22FD
> 
> ___
> 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
> ___

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

2016-10-24 Thread Henning Hraban Ramm
Hi all,

I just edited http://wiki.contextgarden.net/Text_Editors,
reordered, updated, killed some discontinued programs etc.

I didn’t delete wiki pages of outdated apps, though.

There’s still a lot of room for enhancement, e.g. the feature columns make no 
sense this way.

I’d like to know:
- What editor(s) do you use for ConTeXt?
- Are there any other editors with ConTeXt (not only LaTeX) support?

How about including the vim support files in the distribution (like the SciTE 
support files)?

I recently discovered Textadept, a relative of SciTe’s, also available for OSX 
- did anyone try to adapt SciTE ConTeXt support for that?


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)
GPG Key ID 1C9B22FD

___
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] avoid newline after definestartstop

2016-10-24 Thread Michael Eidenbenz
hello,

I found this old mail below, that is related to my problem.
is there still no workaround for this problem?
putting a (foot)note after a quotation mark is quite common and I don't want to 
put the marks by hand.

i was looking at spac-hor.mkiv and tried setupnarrower[after=]. 
but this did not work.

any help is appreciated

thanks michael


> Am 21.08.2014 um 23:42 schrieb Gerben Wierda :
> 
>> Is it possible to use \startquotation..\stopquotation and have an endnote 
>> number follow the closing ''? If the \endnote is before \stopquotation, it 
>> ends up inside the '' character at the end. If it is after \stopquotation, 
>> it 
>> becomes the beginning of the next paragraph.
> 
> 
> AFAIK this is only possible when you place the quotation marks by hand.
> 
> Wolfgang



> 
> On 20 Oct 2016, at 11:13, Michael Eidenbenz  wrote:
> 
> hello,
> 
> how can I put the footnote number right after the quotationmarks without 
> having a newline?
> dontleavehmode does not work.
> 
> thanks michael
> 
> 
> 
> 
> \definestartstop[Citation]
>[before={\startnarrower[left,right]\startquotation},
> after={\stopquotation\stopnarrower\dontleavehmode}]
> 
> \starttext
> \input tufte
> \startCitation
>  \input knuth
> \stopCitation
> \footnote{This is a Quote of Donald Knuth}
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___