Re: [NTG-context] BUG: % is comment in btx fields

2017-05-08 Thread Rik Kabel

On 2017-05-08 21:40, Henri Menke wrote:


That is simply not true!  Content inside ConTeXt buffers is as verbatim
as reading an external file.  Try \typebuffer instead of \getbuffer
your example below and observe that the comment sign is perfectly
preserved.

I am sorry. You are, of course, correct, and I use both, so should know 
better.



--
Rik
___
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] BUG: % is comment in btx fields

2017-05-08 Thread Henri Menke
On Mon, 2017-05-08 at 20:15 -0400, Rik Kabel wrote:
> On 2017-05-08 17:44, Henri Menke wrote:
> > Dear list,
> > 
> > The percent character in btx field is taken as a comment characters
> > which leads to the rest of the field being discarded.  In the MWE
> > below, the URL is cut off at the % sign and everything after it is
> > lost.
> > 
> > Cheers, Henri
> > 
> > 
> > ---
> > 
> > 
> > \startbuffer[references]
> > @misc{kraft,
> >   author = "Kraft, Nathan",
> >   title = "Mr Kraft's Virtual Filing Cabinet",
> >   year = "2015",
> >   url = "http://mrkraft.wikispaces.com/Mr+Kraft%27s+Virtual+Filing+
> > Cabi
> > net"
> > }
> > \stopbuffer
> > 
> > \usebtxdataset[references.buffer]
> > \usebtxdefinitions[apa]
> > 
> > \starttext
> > 
> > \nocite[kraft]
> > \placelistofpublications
> > 
> > \stoptext
>  The bibtex entry in this example is provided in a buffer. The buffer
> mechanism does not handle characters any differently than other text
> in the file, and % in a ConTeXt buffer has to be escaped if it does
> not signify a comment.

That is simply not true!  Content inside ConTeXt buffers is as verbatim
as reading an external file.  Try \typebuffer instead of \getbuffer
your example below and observe that the comment sign is perfectly
preserved.

> If you specify an external (.bib or .bibtex) file to supply the
> data,  % does not need to be escaped. So, this part is simple user
> error.
> (With
> \starttext
> \startbuffer
>   abc%def
> 
>   ghi\%jkl
> \stopbuffer
> \getbuffer
> \stoptext
> you do not get %def in the output. Why do you expect different
> behavior if the buffer holds a bibtex entry?)
> 
> The way hyphenatedurl handles things may well be worthy of
> improvement.
> 
> -- 
> Rik
> _
> __
> 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/nt
> g-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] BUG: % is comment in btx fields

2017-05-08 Thread Rik Kabel

On 2017-05-08 17:44, Henri Menke wrote:

Dear list,

The percent character in btx field is taken as a comment characters
which leads to the rest of the field being discarded.  In the MWE
below, the URL is cut off at the % sign and everything after it is
lost.

Cheers, Henri


---


\startbuffer[references]
@misc{kraft,
   author = "Kraft, Nathan",
   title = "Mr Kraft's Virtual Filing Cabinet",
   year = "2015",
   url = "http://mrkraft.wikispaces.com/Mr+Kraft%27s+Virtual+Filing+Cabi
net"
}
\stopbuffer

\usebtxdataset[references.buffer]
\usebtxdefinitions[apa]

\starttext

\nocite[kraft]
\placelistofpublications

\stoptext
The bibtex entry in this example is provided in a buffer. The buffer 
mechanism does not handle characters any differently than other text in 
the file, and % in a ConTeXt buffer has to be escaped if it does not 
signify a comment. If you specify an external (.bib or .bibtex) file to 
supply the data,  % does not need to be escaped. So, this part is simple 
user error.


(With

   \starttext
   \startbuffer
  abc%def

  ghi\%jkl
   \stopbuffer
   \getbuffer
   \stoptext

you do not get %def in the output. Why do you expect different behavior 
if the buffer holds a bibtex entry?)


The way hyphenatedurl handles things may well be worthy of improvement.

--
Rik
___
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] BUG: % is comment in btx fields

2017-05-08 Thread Alan Braslau
On Tue, 9 May 2017 11:27:51 +1200
Henri Menke  wrote:

> However, I wonder whether the treatment of % in bib files is correct,
> as regular BibTeX does treat the % verbatim.  Because the following
> LaTeX example works just fine, with unescaped %.  In my opinion this
> behaviour should be adopted by ConTeXt.

From BibTeXing:

7. For Scribe compatibility, the database files allow an @COMMENT
command; it’s not really needed because BibTEX allows in the database
files any comment that’s not within an entry. If you want to comment
out an entry, simply remove the ‘@’ character preceding the entry type.

...

14. LATEX’s comment character ‘%’ is not a comment character in the
database files.




From Tame the BeaST:

New entries always start with @. Anything outside the “argument” of a
“command” starting with an @ is considered as a comment. This gives an
easy way to comment a given entry: just remove the initial @. As usual
when a language allows comments, don’t hesitate to use them so that you
have a clean, ordered, and easy-to-maintain database. Conversely,
anything starting with an @ is considered as being a new entry.

There is a special entry type named @comment. The main use of such an
entry type is to comment a large part of the bibliography easily, since
anything outside an entry is already a comment, and commenting out one
entry may be achieved by just removing its initial @.


So bibtex has a funny way of dealing with comments, and do we really
care about Scribe? We made the choice NOT to remain *strictly* bibtex
compatible, after all bibtex is limited to ASCII 7-bit!

The % comment is *universal* in TeX, Metapost, etc. so we chose to
respect this, much stronger in my opinion, convention.

Alan




-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS UMR 3680
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.fr
___
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] BUG: % is comment in btx fields

2017-05-08 Thread Henri Menke
On Mon, 2017-05-08 at 16:27 -0600, Alan Braslau wrote:
> Of course, you have to escape the percent character if you do not
> want
> it to be interpreted as a comment... however, in the example below,
> the
> URL does not get rendered properly, nor does using \letterpercent, so
> there is something that we need to fix in our treatment of URLs.

That is easily fixed by making \hyphenatedurl aware of \% being
\letterpercent.


\appendtoks
  \let\%\letterpercent
\to \everyhyphenatedurl


However, I wonder whether the treatment of % in bib files is correct,
as regular BibTeX does treat the % verbatim.  Because the following
LaTeX example works just fine, with unescaped %.  In my opinion this
behaviour should be adopted by ConTeXt.


\begin{filecontents*}{\jobname.bib}
@misc{kraft,
  author = "Kraft, Nathan",
  title = "Mr Kraft's Virtual Filing Cabinet",
  year = "2015",
  url = "http://mrkraft.wikispaces.com/Mr+Kraft%27s+Virtual+Filing+Cabi
net"
}
\end{filecontents*}

\documentclass{article}
\usepackage{apacite,url}
\begin{document}

\nocite{kraft}
\bibliographystyle{apacite}
\bibliography{\jobname.bib}

\end{document}

> 
> \startbuffer[references]
> 
> @misc{kraft,
>   author = "Kraft, Nathan",
>   title = "Mr Kraft's Virtual Filing Cabinet",
>   year = "2015",
>   url = "http://mrkraft.wikispaces.com/Mr+Kraft\%27s+Virtual+Filing+C
> abinet"
> }
> 
> \stopbuffer
> 
> \usebtxdefinitions[apa]
> \usebtxdataset[references.buffer]
> 
> \starttext
> 
> \nocite[kraft]
> 
> \placelistofpublications
> 
> \showbtxdatasetcompleteness
> 
> \stoptext
> 
> 
> 
> On Tue, 9 May 2017 09:44:01 +1200
> Henri Menke  wrote:
> 
> > 
> > Dear list,
> > 
> > The percent character in btx field is taken as a comment characters
> > which leads to the rest of the field being discarded.  In the MWE
> > below, the URL is cut off at the % sign and everything after it is
> > lost.
> > 
> > Cheers, Henri
> > 
> > 
> > ---
> > 
> > 
> > \startbuffer[references]
> > @misc{kraft,
> >   author = "Kraft, Nathan",
> >   title = "Mr Kraft's Virtual Filing Cabinet",
> >   year = "2015",
> >   url =
> > "http://mrkraft.wikispaces.com/Mr+Kraft%27s+Virtual+Filing+Cabi
> > net"
> > }
> > \stopbuffer
> > 
> > \usebtxdataset[references.buffer]
> > \usebtxdefinitions[apa]
> > 
> > \starttext
> > 
> > \nocite[kraft]
> > \placelistofpublications
> > 
> > \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
___

[NTG-context] problem with mathmode in footnotes

2017-05-08 Thread Alan Bowen
The code

\definefontfamily[mainface][serif][Brill]
[protrusion=quality,
expansion=quality,
mode=node,
force=yes,
]

\definefallbackfamily[mainface][mm][TeX Gyre Pagella]
[preset=math:digitsnormal,features=f:oldstyle,scale=0.93]

\definefallbackfamily [mainface] [mm] [Brill]
[preset=math:lowercasegreeknormal]
\definefallbackfamily [mainface] [mm] [Brill]
[preset=math:lowercasegreekitalic]
\definefallbackfamily [mainface] [mm] [Brill]
[preset=math:uppercasegreeknormal]
\definefallbackfamily [mainface] [mm] [Brill]
[preset=math:uppercasegreekitalic]

\definefontfamily[mainface][mm][TeXGyre Termes Math][scale=0.94]
\setupmathematics[ucgreek=normal,lcgreek=italic]

\setupbodyfont[mainface,10pt]

\starttext

Euclid \emph{Elem}.\ 3.20 states that if \m{BC} is  joined to the center
\m{O} of the circle, then \m{\angle BOC = 2\cdot\angle A},  and \m{\angle
BOC} is equal to  \m{BC\kern-1em\raise1.8ex\hbox{\frown}}.%
%
\footnote{Euclid \emph{Elem}.\ 3.20 states that if \m{BC} is  joined to the
center \m{O} of the circle, then \m{\angle BOC = 2\cdot\angle A},  and
\m{\angle BOC} is equal to \m{BC\kern-1em\raise1.8ex\hbox{\frown}}.}

\stoptext

processes as it should using earlier versions (e.g., ConTeXt  ver:
2017.03.26)  but goes awry using ConTeXt  ver: 2017.05.06.

So far as I can tell, the problem comes with the specification of the
fonts. If one omits the stuff before “\starttext”, the footnote looks as it
should and everyone but the publisher would be happy.

Alan
___
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] BUG: % is comment in btx fields

2017-05-08 Thread Alan Braslau
Of course, you have to escape the percent character if you do not want
it to be interpreted as a comment... however, in the example below, the
URL does not get rendered properly, nor does using \letterpercent, so
there is something that we need to fix in our treatment of URLs.

\startbuffer[references]

@misc{kraft,
  author = "Kraft, Nathan",
  title = "Mr Kraft's Virtual Filing Cabinet",
  year = "2015",
  url = "http://mrkraft.wikispaces.com/Mr+Kraft\%27s+Virtual+Filing+Cabinet;
}

\stopbuffer

\usebtxdefinitions[apa]
\usebtxdataset[references.buffer]

\starttext

\nocite[kraft]

\placelistofpublications

\showbtxdatasetcompleteness

\stoptext



On Tue, 9 May 2017 09:44:01 +1200
Henri Menke  wrote:

> Dear list,
> 
> The percent character in btx field is taken as a comment characters
> which leads to the rest of the field being discarded.  In the MWE
> below, the URL is cut off at the % sign and everything after it is
> lost.
> 
> Cheers, Henri
> 
> 
> ---
> 
> 
> \startbuffer[references]
> @misc{kraft,
>   author = "Kraft, Nathan",
>   title = "Mr Kraft's Virtual Filing Cabinet",
>   year = "2015",
>   url =
> "http://mrkraft.wikispaces.com/Mr+Kraft%27s+Virtual+Filing+Cabi net"
> }
> \stopbuffer
> 
> \usebtxdataset[references.buffer]
> \usebtxdefinitions[apa]
> 
> \starttext
> 
> \nocite[kraft]
> \placelistofpublications
> 
> \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
> ___


-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS UMR 3680
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.fr
___
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] BUG: % is comment in btx fields

2017-05-08 Thread Martin Schröder
2017-05-08 23:44 GMT+02:00 Henri Menke :
> The percent character in btx field is taken as a comment characters
> which leads to the rest of the field being discarded.  In the MWE
> below, the URL is cut off at the % sign and everything after it is
> lost.

See also https://tex.stackexchange.com/q/368730/5763

Best
   Martin
___
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] BUG: % is comment in btx fields

2017-05-08 Thread Henri Menke
Dear list,

The percent character in btx field is taken as a comment characters
which leads to the rest of the field being discarded.  In the MWE
below, the URL is cut off at the % sign and everything after it is
lost.

Cheers, Henri


---


\startbuffer[references]
@misc{kraft,
  author = "Kraft, Nathan",
  title = "Mr Kraft's Virtual Filing Cabinet",
  year = "2015",
  url = "http://mrkraft.wikispaces.com/Mr+Kraft%27s+Virtual+Filing+Cabi
net"
}
\stopbuffer

\usebtxdataset[references.buffer]
\usebtxdefinitions[apa]

\starttext

\nocite[kraft]
\placelistofpublications

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

[NTG-context] get the dimensions of xcell

2017-05-08 Thread Pablo Rodriguez
Dear list,

sorry for bothering you with this minor question, but this information
is important for me.

I have the following sample:

\starttext
\startxtable[option=stretch]
\startxrow
\startxcell \the\lineheight\stopxcell
\startxcell how do I get the frame height?\stopxcell
\stopxrow
\startxrow
\startxcell \the\textwidth\stopxcell
\startxcell how do I get the frame width?\stopxcell
\stopxrow
\stopxtable
\stoptext

How can I get the height and the width of the xcell?

I mean, is there a similar command for xcells or frames?

Many thannks in advance,

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
___

[NTG-context] Fwd: ANNOUNCE: pandoc scholar

2017-05-08 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

This just in. Slightly off-topic, but in the wake of the recent markdown  
thread some of you may find this approach interesting or a source of ideas  
for doing something similar in ConTeXt.


Best wishes
Idris

--- Forwarded message ---
From: "Albert Krewinkel" 
To: pandoc-disc...@googlegroups.com
Cc:
Subject: ANNOUNCE: pandoc scholar
Date: Mon, 08 May 2017 11:43:42 -0600

I'm happy to announce pandoc scholar, a tool and general effort to
enable and promote the use of pandoc markdown as a format for scientific
publishing .

We developed conventions, lua scripts, and accompanying makefiles to
make authoring of scientific articles as simple and comfortable as
possible, enabling authors to semantically enrich their manuscripts with
additional metadata. The corresponding manuscript has been published
today in PeerJ CS: .

The pandoc scholar utility was build with compatibility in mind,
requiring only `pandoc` and `make`.  Most computations are performed
using lua scripts, using [panlunatic] to output the modified document as
pandoc JSON.  Makefiles are used to hide the additional complexity and
to set sensible default options when calling pandoc.  A styled html
template, which makes use of the additional metadata fields, is provided
as well.

Any feedback is welcome.


--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] question about Linux Libertine

2017-05-08 Thread Hans Hagen

On 5/8/2017 12:20 AM, kaddour kardio wrote:

i managed to get the ornaments from Linux Libertine by using a rather
low-level command

\definesymbol
  [leaf]
  [\getnamedglyphdirect
{kad}
{ampersand.alt}]


But for other symbols i have to use another command like that:

\definesymbol[orn1][\getglyph{kad}{\char9753}]


because using \getnamedglyphdirect{kad}{uni2619} doesn't work.

Did i miss a thing ?


it has no name in the font

you can add this to symb-ini.mkvi:

\unexpanded\def\resolvedglyphstyled#fontname#character%
  {{\setstyledsymbolicfont{#fontname}\clf_tochar{#character}}}
\unexpanded\def\resolvedglyphdirect#fontname#character%
  {{\setdirectsymbolicfont{#fontname}\clf_tochar{#character}}}

and remake the format and then say:

\definesymbol
  [leaf]
  [\resolvedglyphdirect
 {name:linuxlibertine}{n:ampersand.alt}]

\definesymbol
  [orn1]
  [\resolvedglyphdirect
 {name:linuxlibertine}{x:2619}]

valid prefixes are:

e  entity
x  hexadecimal unicode
d  decimal unicode
s  hexadecimal index (slot)
i  decimal index
n  name
u  unicode description (synonym)
a  namd or description
c  char (name itself)

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] another question about markings

2017-05-08 Thread Thomas A. Schmitz
Aaaand here's another question about markings: how could I compare the 
value of the top/bottom (or first/last) markings and have the header 
change accordingly? Example attached, it doesn't do what I (naively) 
expected it to do.


All best

Thomas

\setuppapersize [A5]

\definemarking[Head]

\startsetups Headersetup

\doifelse{\expanded{\getmarking[Head][top]}}{\expanded{\getmarking[Head][bottom]}}{\getmarking[Head][top]}{\getmarking[Head][top] 
– \getmarking[Head][bottom]}

\stopsetups

\setupheadertexts[\texsetup{Headersetup}]

\starttext

\dorecurse{6}{\marking[Head]{Tufte}\input tufte\par}

\dorecurse{6}{\marking[Head]{Knuth}\input knuth\par}

\dorecurse{6}{\marking[Head]{Tufte}\input tufte\par}

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

[NTG-context] Strange behavior with Enumerations

2017-05-08 Thread Fabrice Couvreur
Hello,
The alignment of the third level is incorrect, why ?

##
\starttext

\startitemize[n][stopper={.},style=bold,color=darkred]

   \item  Soit \math{f} la fonction définie pour tout réel \m{x} différent
de \m{-1} par \math{f(x)=\dfrac{x+2}{x+1}} et \math{\cal C} sa courbe
représentative dans un repère du plan.
  \startitemize[a][stopper={.},style=bold,color=darkred]
   \item L'image de 3 par la fonction \math{f} est :

\startitemize[i,columns,joinedup,pack,1*broad,three]
 [stopper={.},style=bold,color=darkred,grid=line]

\item \math{\dfrac{14}{3}}

\item \math{\dfrac{5}{4}}

\item \math{2}

\stopitemize
  \stopitemize
\stopitemize


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

[NTG-context] linenumbers in marking

2017-05-08 Thread Thomas A. Schmitz

Hi all,

5 years ago, on the mailing list, there was a thread started by Pablo 
Rodríguez (http://www.mail-archive.com/ntg-context@ntg.nl/msg62140.html) 
about line numbers in headers. Wolfgang Schuster replied that in 
principle, it's possible to have line numbers in headers, "but it’s not 
usable because the numbers are always shown on the next page." He made 
the following example (which I have slightly adapted):


\definemarking[linenumber]

\define\LinenumberCommand
  {\normalexpanded{\setmarking[linenumber]{\linenumber}}}

\setuplinenumbering[command=\LinenumberCommand]

\startsetups linenumber

\doiftext {
\getmarking[linenumber]
}
{
\getmarking[linenumber][top] – 
\getmarking[linenumber][bottom]

}

\stopsetups

\setupheadertexts[\texsetup{linenumber}]

\starttext

\dorecurse{6}{\input tufte\par}

\startlinenumbering
\dorecurse{20}{\input knuth\par}
\stoplinenumbering

\resetmarking[linenumber]

\dorecurse{6}{\input tufte\par}

\stoptext

Hans wrote: "currently it's not possible but it's no big deal to add 
that feature at some point." I have now a similar problem with markings 
in a header. Is there a solution to this? Could it be implemented now?


Thanks, and best wishes

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
___