Re: [NTG-context] avoid newline after definestartstop

2016-10-26 Thread Wolfgang Schuster

Michael Eidenbenz 
26. Oktober 2016 um 23:03
Dear Wolfgang,

thanks for your mail, that led me to the source in syst-aux where I 
found the TeX approach, my final solution.


\def\startCitation%
  { \startnarrower[left,right]
\symbol[leftquotation]
\removeunwantedspaces}


\unexpanded\def\startCitation
  {\startnarrower[left,right]
   \symbol[leftquotation]%
   \ignorespaces}


\def\stopCitation#1\par%
  { \removeunwantedspaces
\symbol[rightquotation]
#1
\stopnarrower}


\unexpanded\def\stopCitation#1\par
  {\removeunwantedspaces
   \symbol[rightquotation]%
   #1%
   \stopnarrower}

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-26 Thread Michael Eidenbenz
Dear Wolfgang, 

thanks for your mail, that led me to the source in syst-aux where I found the 
TeX approach, my final solution.

\def\startCitation%
  { \startnarrower[left,right]
\symbol[leftquotation]
\removeunwantedspaces}

\def\stopCitation#1\par%
  { \removeunwantedspaces
\symbol[rightquotation]
#1
\stopnarrower}
  
\starttext
  
\startCitation
  \input knuth
\stopCitation
\footnote{This is a Quote of Donald Knuth}

\input knuth

\stoptext

> On 26 Oct 2016, at 18:40, Wolfgang Schuster  
> wrote:
> 
>> Michael Eidenbenz  26. Oktober 2016 um 16:30
>> after some readings in the TeX book I came up with the following solution 
>> that works for me without having to change all my instances of 
>> startstopCitation in the text.
> This doesn’t work when you have more than one paragraph in the Citation 
> environment.
>> \definestartstop
>> [Citation]
>> [
>> before={\hangindent=20mm\hangafter=0\symbol[leftquotation]},
>> after={\removeunwantedspaces\symbol[rightquotation]},
>> ]
>> 
>> \starttext
>> \startCitation
>> \input tufte
>> \stopCitation
>> \footnote{This is a Quote of Donald Knuth}
>> 
>> \input tufte
>> \stoptext
> Here is a alternative version but you need a empty line or \par after 
> \stopCitation.
> 
> \define\startCitation
>   {\startnarrower[left]
>\symbol[leftquotation]\ignorespaces}
> 
> \define\stopCitation
>   {\BeforePar{\removeunwantedspaces\symbol[rightquotation]}%
>\AfterPar {\endgraf\stopnarrower}%
>\GetPar}
> 
> \starttext
> 
> \startCitation
>   \input knuth
> \stopCitation
> \footnote{This is a Quote of Donald Knuth}
> 
> \input knuth
> 
> \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://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] marginal heads as standard option?

2016-10-26 Thread Pablo Rodriguez
On 10/26/2016 01:50 PM, Hans Hagen wrote:
> [...]
> I'll add something
> 
> % \definemargindata
> %   [margintext:chapter]
> %   [margintext:section]
> 
> % \defineheadalternative
> %   [margintext:chapter]
> %   [margintext]
> %   [margintext=margintext:chapter]
> 
> % \setuphead
> %   [chapter]
> %   [alternative=margintext:chapter]
> 
> \setuphead
>[chapter]
>[alternative=margintext]
> 
> that uses the margindata margintext:section but no special rendering 
> options because demands can differ

Many thanks for your implementation, Hans.

I’m looking forward deploying the new feature in next beta.

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] mathsf / mathversions in context

2016-10-26 Thread Wolfgang Schuster

Csikos Bela 
20. Oktober 2016 um 16:59
Wolfgang Schuster  írta:

Thank you again. Now I am even more confused.


3. I found that if I write \definefontfamily [docuf] [mm] [TeX Gyre Pagella 
Math]
before \definefallbackfamily lines, the latter have no effect. Is this normal?
Shouldn't the order of definition lines be indifferent?

The fallbackfamily settings are applied to a typeface and the
\definefontfamily commands creates the typeface, without \definefontfamily the
fallbacks are never used because there is no font which can use the settings.


Sorry, but I don't understand the answer. If I have the code:

\definefallbackfamily [documentfont] [mm] [Tex Gyre Adventor] 
[preset=math:lowercaseitalic]
\definefontfamily [documentfont] [mm] [TeX Gyre Pagella Math]

then Tex Gyre Adventor font is used for math (\definefallbackfamily has effect).

If I have this code:

\definefontfamily [documentfont] [mm] [TeX Gyre Pagella Math]
\definefallbackfamily [documentfont] [mm] [Tex Gyre Adventor] 
[preset=math:lowercaseitalic]

then Tex Gyre Pagella is used for math (\definefallbackfamily has no effect).

According to your answer the opposite should happen, shouldn't?
I am confused.

The \definefontfamily command creates a typeface which is used to load a 
font but after this point
you can’t make changes to it. The \definefallbackfamily command let you 
assign additional
characters for a font but this has to happen before the font is loaded, 
therefore \definefallbackfamily

needs before \definefontfamily in the document.

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

2016-10-26 Thread Wolfgang Schuster

Javier M Mora 
24. Oktober 2016 um 14:37
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?

You can’t use them in floats unless you add a frame around the content, e.g.

\startplacealgorithm
\startframedtext
\startlinenumbering
...
\stoplinenumbering
\stopframedtext
\stopplacealgorithm
* 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?
Not with linenumbering, what you need is counter which is inserted at 
the begin of each line.


\definelabel[algorithmicline][text=,alternative=inleft]

\definelines[algorithmic][command=\algorithmicline]

\setuplayout[width=4cm]

\showframe[text][text]

\starttext

\startalgorithmic
text
text text text text text text text text text text text text
text
\stopalgorithmic

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

[NTG-context] \definefallbackfamily for math fonts, again

2016-10-26 Thread Csikos Bela
Dear list members:

I have the following context code:

\definefontfamily [doc] [rm] [TeX Gyre Bonum]
\definefontfamily [doc] [ss] [Tex Gyre Adventor]
\definefallbackfamily [doc] [mm] [Tex Gyre Adventor] 
[range=0x0-0x2FA1F,force=yes]
\definefontfamily [doc] [mm] [TeX Gyre Pagella Math]
\setupbodyfont[doc,10pt]
\starttext
Text font: , {\ss } \\
Math font: \m{}, \m{\rm }, \m{\ss 
}
\stoptext

1. In the pdf result \rm math font is Tex Gyre Adventor and \ss math is Tex 
Gyre Pagella.
How can I have context to print math \rm with Tex Gyre Pagella serif, and math 
\ss
with Tex Gyre Adventor font? Why a roman/serif font is replaced with a sans 
serif font?

2. What range would be the most correct to include all characters for 
replacement?

Thank you in advance,

bcsikos

___
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-26 Thread Wolfgang Schuster

Michael Eidenbenz 
26. Oktober 2016 um 16:30
after some readings in the TeX book I came up with the following 
solution that works for me without having to change all my instances 
of startstopCitation in the text.
This doesn’t work when you have more than one paragraph in the Citation 
environment.

\definestartstop
[Citation]
[
before={\hangindent=20mm\hangafter=0\symbol[leftquotation]},
after={\removeunwantedspaces\symbol[rightquotation]},
]

\starttext
\startCitation
\input tufte
\stopCitation
\footnote{This is a Quote of Donald Knuth}

\input tufte
\stoptext
Here is a alternative version but you need a empty line or \par after 
\stopCitation.


\define\startCitation
  {\startnarrower[left]
   \symbol[leftquotation]\ignorespaces}

\define\stopCitation
  {\BeforePar{\removeunwantedspaces\symbol[rightquotation]}%
   \AfterPar {\endgraf\stopnarrower}%
   \GetPar}

\starttext

\startCitation
  \input knuth
\stopCitation
\footnote{This is a Quote of Donald Knuth}

\input knuth

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

Re: [NTG-context] avoid newline after definestartstop

2016-10-26 Thread Michael Eidenbenz
after some readings in the TeX book I came up with the following solution that 
works for me without having to change all my instances of startstopCitation in 
the text.

\definestartstop
  [Citation]
  [
before={\hangindent=20mm\hangafter=0\symbol[leftquotation]},
after={\removeunwantedspaces\symbol[rightquotation]},
  ]

\starttext
\startCitation
  \input tufte
\stopCitation
\footnote{This is a Quote of Donald Knuth}

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

Re: [NTG-context] marginal heads as standard option?

2016-10-26 Thread Hans Hagen

On 10/25/2016 9:06 PM, Pablo Rodriguez wrote:

Hans,

I have the following sample:

\setuphead[section][alternative=margin]
\starttext
\section{afeasdf}
\input knuth

\section{afeasfdf}
\input zapf
\stoptext

Would it be possible to have value to the "alternative" key that
automatically places the head on the margin? I mean, not only the
number, but the whole title.

Probably this option should allow the user to set head in the inner,
outer, left and right margins.

I know that it should be possible with an extra command, but consider
that "reverse" is also a value for the "alternative",

Many thanks for your help,


I'll add something

% \definemargindata
%   [margintext:chapter]
%   [margintext:section]

% \defineheadalternative
%   [margintext:chapter]
%   [margintext]
%   [margintext=margintext:chapter]

% \setuphead
%   [chapter]
%   [alternative=margintext:chapter]

\setuphead
  [chapter]
  [alternative=margintext]

that uses the margindata margintext:section but no special rendering 
options because demands can differ


Hans


-
  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] .mp files in non-standard locations

2016-10-26 Thread Nicola

Hello,
I have some documents that contain:

\startMPinclusions
input "mycode";
\stopMPinclusions

where mycode.mp is somewhere in my project's directory. Is there a way 
to tell ConTeXt how to find 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
___