Re: [NTG-context] Adding line numbers to all pages?

2019-12-02 Thread Weber, Matthias
Now that is embarrassing finding my question answered in an earlier post by 
Oliver from today.

Sorry for the noise.

Matthias

On Dec 2, 2019, at 17:49, Weber, Matthias 
mailto:matwe...@indiana.edu>> wrote:

Dear All,

Is there a simple way to add line numbers to the margin of each page of a 
document? They should recommence at 1 on every page,
and either omit formulas or handle them “gracefully”. I’d be happy to have any 
ad-hoc solution.

Thanks,

Matthias



\starttext

\input tufte
\startformula
1+1=1
\stopformula
\input knuth

\input tufte
\startformula
1+1=2
\stopformula
\input knuth

\input tufte
\startformula
1+1=3
\stopformula
\input 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
___


[NTG-context] Adding line numbers to all pages?

2019-12-02 Thread Weber, Matthias
Dear All,

Is there a simple way to add line numbers to the margin of each page of a 
document? They should recommence at 1 on every page,
and either omit formulas or handle them “gracefully”. I’d be happy to have any 
ad-hoc solution.

Thanks,

Matthias



\starttext

\input tufte
\startformula
1+1=1
\stopformula
\input knuth

\input tufte
\startformula
1+1=2
\stopformula
\input knuth

\input tufte
\startformula
1+1=3
\stopformula
\input 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
___


Re: [NTG-context] issue with beta from 2019.11.29 21:47 in Windows

2019-12-02 Thread Hans Hagen

On 12/2/2019 6:51 PM, Pablo Rodriguez wrote:

On 12/2/19 6:05 PM, Hans Hagen wrote:

[...]
anyway, in luametatex with lmtx we're (hopefully) code page neutral (as
far as i could test; all utf8 and windows utf16) and we're not going to
touch the default luatex internals like that


Many thanks for your reply, Hans.

As written before, I would love to use LMTX, but using some Gill Sans
and Arial Narrow is mandatory for us.

For some strange reason (as reported in my previous message), LMTX isn’t
able to deal with them.


arial looks ok here ... (2014 version windows) so maybe you should look 
for a new version than yours



(windows 7 is kind of outdated so you can't expect someone to check that
setup out)


I only use Windows at work. All I wanted to know was whether Windows was
affected by this issue.

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
___




--

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


Re: [NTG-context] issue with beta from 2019.11.29 21:47 in Windows

2019-12-02 Thread Wolfgang Schuster


Pablo Rodriguez schrieb am 02.12.2019 um 18:46:

Could anyone confirm the issue I’m describing in Windows?

I get the same results with MkIV but LMTX works.

I’d love to switch to LMTX, but this isn’t an option for me. It has an
issue with some fonts (I already reported).

In this sample \ss and \cg fonts cannot be used, even invoking them by
file name:

 \definefontfamily[mainface][rm][TeX Gyre Heros]
 \definefontfamily[mainface][mm][TeX Gyre Termes Math]
 \definefontfamily[mainface][ss][Gill Sans MT][tf=file:GIL_.TTF]
 \definefontfamily[mainface][tt][Cousine]
 \definefontfamily[mainface][cg][Arial Narrow][tf=file:ARIALN.TTF]
 \setupbodyfont[mainface]
 \startbuffer
 \ConTeXt\ is awesome!\par
 \stopbuffer
 \starttext
 \startTEXpage[offset=1em]
 \getbuffer
 \ss\getbuffer
 \tt\getbuffer
 \cg\getbuffer
 \stopTEXpage
 \stoptext


LMTX finds the fonts and loads them but nothing appears in the final PDF.

\nopdfcompression

\starttext
\definedfont[file:arialn.ttf*default]Arial Narrow
\stoptext


A alternative to Arial Narrow is Arial Nova which has condensed variant 
and comes as part of the pan-european font pack in windows 10.


\startmkivmode

    \definefontfamily [arial-narrow] [ss] [Arial Narrow]

    \definefontfamily [gill-sans] [ss] [Gill Sans MT]

\stopmkivmode

\startlmtxmode

    \definefontfamily [arial-narrow] [ss] [Arial Nova]
    [tf=style:condensed,
 it=style:condenseditalic,
 bf=style:condensedbold,
 bi=style:condensedbolditalic]

    \definefontfamily [gill-sans] [ss] [Gill Sans Nova]

\stoplmtxmode

\starttext

regular \italic{italic} \bold{bold} \bolditalic{bolditalic}

\switchtobodyfont[arial-narrow]

regular \italic{italic} \bold{bold} \bolditalic{bolditalic}

\switchtobodyfont[gill-sans]

regular \italic{italic} \bold{bold} \bolditalic{bolditalic}

\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] Line numbering in two column layout conflicts with marking

2019-12-02 Thread Oliver von Criegern

Dear list members,

line numbering in a two column layout apparently conflicts with the 
marking mechanism.


Consider the following example:


\setupcolumns[n=2]

\setuplinenumbering
    [
    step=5,
    method=page,
    align=flushright,
    ]

\definemarking[Test]

\setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}]

\startbuffer
\dorecurse{12}{words }
\stopbuffer

\starttext
\startcolumns
\startlinenumbering
\marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par
\marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par
\marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer}\par
\stoplinenumbering
\stopcolumns
\stoptext


In the result, the header of the first page reads "ONE -- THREE", 
despite marking "THREE" being placed in the third line of the second page.


Without linenumbering, the header of the first page reads "ONE -- TWO", 
as is to be expected.


Best regards,
Oliver


--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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] hz / expansion

2019-12-02 Thread Hans Hagen

Hi,

The latest lmtx has a new feature: expansion control independent of font 
specific settings. When used the font specific step stretch and shrink 
will be overloaded. This permits mixed setups that are normally nor 
possible because these three properties need to be consistent within a 
paragraph. It also permits local deviations from the defaults, for 
instance in more extreme cases.


\startluacode

local classes = fonts.expansions.classes

classes.qualityb = {
vector  = "default",
factor  = 1,
stretch = 8,
shrink  = 4,
step= .5,
}

classes.qualitya = {
vector  = "default",
factor  = 1,
stretch = 4,
shrink  = 2,
step= .5,
}

\stopluacode

\showframe

% \enabletrackers[*expansion]

\setupbodyfont[dejavu,8pt]

\defineexpansion
  [myexpansion]
  [step=1,
   stretch=50,
   shrink=20]

\definefontfeature [basea] [default] [expansion=qualitya]
\definefontfeature [baseb] [default] [expansion=qualityb]

\definefont[FontA][Serif*basea]
\definefont[FontB][Serif*baseb]

\setupalign[verytolerant,stretch,hz]

\starttext

\startbuffer
\dorecurse {30} {%
{\FontB \red test me #1,} \FontA \dorecurse{#1}{test ##1, }%
}\par
\stopbuffer

   {\getbuffer \page}
\setexpansion[myexpansion] {\getbuffer \page}

\stoptext

Maybe it's useful (I hardly use expansion myself). Hopefully there are 
no side effects.


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
___


Re: [NTG-context] issue with beta from 2019.11.29 21:47 in Windows

2019-12-02 Thread Pablo Rodriguez
On 12/2/19 6:05 PM, Hans Hagen wrote:
> [...]
> anyway, in luametatex with lmtx we're (hopefully) code page neutral (as
> far as i could test; all utf8 and windows utf16) and we're not going to
> touch the default luatex internals like that

Many thanks for your reply, Hans.

As written before, I would love to use LMTX, but using some Gill Sans
and Arial Narrow is mandatory for us.

For some strange reason (as reported in my previous message), LMTX isn’t
able to deal with them.

> (windows 7 is kind of outdated so you can't expect someone to check that
> setup out)

I only use Windows at work. All I wanted to know was whether Windows was
affected by this issue.

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] issue with beta from 2019.11.29 21:47 in Windows

2019-12-02 Thread Pablo Rodriguez
On 12/2/19 6:01 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 02.12.2019 um 16:18:
>>  \starttext
>>  \executesystemcommand{contextjit --purgeall
>> --arguments="OptionThis={\ThisOption},OptionThat={\ThatOption}" second.tex}
>
> Limited alternative (no rerun when second.pdf exists and by default the
> resulting PDF is loaded as image).
>
> \typesetfile[second.tex][--arguments="OptionThis={\ThisOption},OptionThat={\ThatOption}"][object=no]

Many thanks for your reply, Wolfgang.

This is an interesting way to avoid the issue.

>> Could anyone confirm the issue I’m describing in Windows?
>
> I get the same results with MkIV but LMTX works.

I’d love to switch to LMTX, but this isn’t an option for me. It has an
issue with some fonts (I already reported).

In this sample \ss and \cg fonts cannot be used, even invoking them by
file name:

\definefontfamily[mainface][rm][TeX Gyre Heros]
\definefontfamily[mainface][mm][TeX Gyre Termes Math]
\definefontfamily[mainface][ss][Gill Sans MT][tf=file:GIL_.TTF]
\definefontfamily[mainface][tt][Cousine]
\definefontfamily[mainface][cg][Arial Narrow][tf=file:ARIALN.TTF]
\setupbodyfont[mainface]
\startbuffer
\ConTeXt\ is awesome!\par
\stopbuffer
\starttext
\startTEXpage[offset=1em]
\getbuffer
\ss\getbuffer
\tt\getbuffer
\cg\getbuffer
\stopTEXpage
\stoptext

https://mailman.ntg.nl/pipermail/ntg-context/2019/094953.html
https://mailman.ntg.nl/pipermail/ntg-context/2019/095353.html

>> Is there any ConTeXt command (or Lua function) that translates non-ASCII
>> chars to their ASCII values?
>
> Lua: characters.shaped(...)

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] issue with beta from 2019.11.29 21:47 in Windows

2019-12-02 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 02.12.2019 um 16:18:

Dear list,

I have the following sample:

 \def\ThisOption{ab}
 \def\ThatOption{ábc}
 \starttext
 \executesystemcommand{contextjit --purgeall
--arguments="OptionThis={\ThisOption},OptionThat={\ThatOption}" second.tex}


Limited alternative (no rerun when second.pdf exists and by default the 
resulting PDF is loaded as image).


\typesetfile[second.tex][--arguments="OptionThis={\ThisOption},OptionThat={\ThatOption}"][object=no]


 \contextversion
 \stoptext

The contents of second.tex read:

 \starttext
 \enablemode[\env{OptionThis}]
 \enablemode[\env{OptionThat}]
 This: \doifmodeelse{ab}{enabled}{disabled}.\par
 That: \doifmodeelse{ábc}{enabled}{disabled}.
 \stoptext

I use --arguments to pass modes to documents compiled via
\executesystemcommand.

Everything worked fine. This morning I updated ConTeXt at work (with
Win7) and modes with non-ASCII chars aren’t recognized.

Could anyone confirm the issue I’m describing in Windows?


I get the same results with MkIV but LMTX works.


Is there any ConTeXt command (or Lua function) that translates non-ASCII
chars to their ASCII values?


Lua: characters.shaped(...)

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] issue with beta from 2019.11.29 21:47 in Windows

2019-12-02 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\def\ThisOption{ab}
\def\ThatOption{ábc}
\starttext
\executesystemcommand{contextjit --purgeall
--arguments="OptionThis={\ThisOption},OptionThat={\ThatOption}" second.tex}

\contextversion
\stoptext

The contents of second.tex read:

\starttext
\enablemode[\env{OptionThis}]
\enablemode[\env{OptionThat}]
This: \doifmodeelse{ab}{enabled}{disabled}.\par
That: \doifmodeelse{ábc}{enabled}{disabled}.
\stoptext

I use --arguments to pass modes to documents compiled via
\executesystemcommand.

Everything worked fine. This morning I updated ConTeXt at work (with
Win7) and modes with non-ASCII chars aren’t recognized.

Could anyone confirm the issue I’m describing in Windows?

Is there any ConTeXt command (or Lua function) that translates non-ASCII
chars to their ASCII values?

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] What is the meaning of `\start`

2019-12-02 Thread Aditya Mahajan

On Sun, 1 Dec 2019, denis.maier.li...@mailbox.org wrote:


Hi,

in some examples I have found `\start` and `\stop`. What are they 
exactly? Just like `\begingroup` `\endgroup`? Or is there something 
else?


They are equivalent to `\bgroup` and `\egroup`. You can also use 
`\start[whatever]` to get \startwhatever (which is sometimes useful)


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


[NTG-context] Indenting number in TOC, particular numbering scheme, and other questions

2019-12-02 Thread Daniel Haid

Hello everyone,

I just started to experiment with ConTeXt. I have a few issues with my 
first document structure. I need a very particular numbering scheme, 
which I have tried to implement. I have appended the document below.


1. Why is there no indenting in the TOC starting with (what I call) 
level 7? This could have to something with the fact that the levels 
starting from 7 are defined in the subsub module?


2. Why are the numbers in the headings inside the main text not printed 
for levels 8 and 9? Interestingly, they *are* printed for level 7, which 
is defined in the subsub module. I have looked into m-subsub.mkiv and 
saw no difference at all between the different levels defined there.


3. Is it possible to indent not only the section name but also the 
number in the TOC? Moreover, I would like to have a dot after the first 
three levels, but not the other ones (in the TOC and in the text), like 
this:


A. First Level .. 1
I. Second Level . 2
1. Third Level .. 3
a) Fourth Level . 4
...

4. I use the conversions A, I, 1 (without dot), and then defined my own 
ones "a)", "aa)", etc. *with* the ")". I think this is correct, since 
the way a section has to be referenced in the text is like this (for 
example):


B.IV.5.c).aa).(4)

Is there a way to get this? Moreover, is it possible to have a relative 
referencing command, for example, if section B.IV.5.d) is quoted from 
inside section B.IV.6.f) the command should only print 5.d) since the 
B.IV is implied.


5. How can I get rid of the additional vertical space before the second 
entry "B. Another first level" (chapter)?


6. I wanted to define aliases for the \subsub...subsection commands, 
since they are difficult to read, and I used \def as you can see below. 
Is this the right way to do it or would you recommend something else?


Any help would be greatly appreciated.

D.

--

\usemodule[subsub]

\usetypescript[termes]
\setupbodyfont[termes,12pt]

\def\arconv#1{\alphabeticnumerals{#1})}
\defineconversion[ar][\arconv]

\def\aarconv#1{\alphabeticnumerals{#1}\alphabeticnumerals{#1})}
\defineconversion[aar][\aarconv]

\def\lnrconv#1{(\numbers{#1})}
\defineconversion[lnr][\lnrconv]

\def\larconv#1{(\alphabeticnumerals{#1})}
\defineconversion[lar][\larconv]

\def\laarconv#1{(\alphabeticnumerals{#1}\alphabeticnumerals{#1})}
\defineconversion[laar][\laarconv]

\def\alpharconv#1{\greeknumerals{#1})}
\defineconversion[alphar][\alpharconv]

\definestructureconversionset[myconvset][,A,I,n,ar,aar,lnr,lar,laar,alphar]

\setupheads[part,
  chapter,
  section,
  subsection,
  subsubsection,
  subsubsubsection,
  subsubsubsubsection,
  subsubsubsubsubsection,
  subsubsubsubsubsubsection,
  subsubsubsubsubsubsubsection][sectionconversionset=myconvset]

\setuphead[chapter][sectionsegments=chapter]
\setuphead[section][sectionsegments=section]
\setuphead[subsection][sectionsegments=subsection]
\setuphead[subsubsection][sectionsegments=subsubsection]
\setuphead[subsubsubsection][sectionsegments=subsubsubsection]
\setuphead[subsubsubsubsection][sectionsegments=subsubsubsubsection]
\setuphead[subsubsubsubsubsection][sectionsegments=subsubsubsubsubsection]
\setuphead[subsubsubsubsubsubsection][sectionsegments=subsubsubsubsubsubsection]
\setuphead[subsubsubsubsubsubsubsection][sectionsegments=subsubsubsubsubsubsubsection]

\def\startA{\startchapter}
\def\stopA{\stopchapter}
\def\startI{\startsection}
\def\stopI{\stopsection}
\def\startS{\startsubsection}
\def\stopS{\stopsubsection}
\def\startSS{\startsubsubsection}
\def\stopSS{\stopsubsubsection}
\def\startSSS{\startsubsubsubsection}
\def\stopSSS{\stopsubsubsubsection}
\def\startX{\startsubsubsubsubsection}
\def\stopX{\stopsubsubsubsubsection}
\def\startXX{\startsubsubsubsubsubsection}
\def\stopXX{\stopsubsubsubsubsubsection}
\def\startXXX{\startsubsubsubsubsubsubsection}
\def\stopXXX{\stopsubsubsubsubsubsubsection}
\def\start{\startsubsubsubsubsubsubsubsection}
\def\stop{\stopsubsubsubsubsubsubsubsection}

\setupcombinedlist[content][list={chapter,
section,
subsection,
subsubsection,
subsubsubsection,
subsubsubsubsection,
subsubsubsubsubsection,
subsubsubsubsubsubsection,
subsubsubsubsubsubsubsection},alternative=c]

\starttext

\placecontent

\startA[title={First level}]
  \startI[title={Second level}]
\startS[title={Third level}]
  \startSS[title={Fourth level}]
\startSSS[title={Fifth level}]
  \startX[title={Sixth level}]
\startXX[title={Seventh level}]
  \startXXX[title={Eighth level}]
\start[title={Ninth level}]
\stop
  \stopXXX
\stopXX
  \stopX
\stopSSS
  \stopSS
\stopS
  \stopI
\stopA

\startA[title={Another first level}]
\stopA

\stoptext
___
If your question