Re: [NTG-context] Custom tags, revisited

2018-06-26 Thread Hans Hagen

On 6/26/2018 8:26 PM, Rik wrote:
In September 2015 thread "Custom XML Export," Hans instructed  us on how 
to create custom tags. The example he presented is:


\setupbackend[export=yes]

\definehighlight[this]

\starttext
 \startelement[what]
  \this{that}  \input ward
 \stopelement
\stoptext

When that example is run with the current (2018-06-25) beta or TL18, 
there is no html body:


     
     
     http://www.pragma-ade.com/context/export;>

Rendering can be suboptimal because there is no 
default/fallback css loaded.


  
  


     
     


Further experimentation suggests that \startelement is gobbling the 
output. (Adding \setupstructure does not change the result.)


What is the proper way to add custom tags?

\setelementbackendtag[what]
\setelementnature[what][inline]


-
  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] Custom tags, revisited

2018-06-26 Thread Rik
In September 2015 thread "Custom XML Export," Hans instructed  us on how 
to create custom tags. The example he presented is:


   \setupbackend[export=yes]

   \definehighlight[this]

   \starttext
\startelement[what]
 \this{that}  \input ward
\stopelement
   \stoptext

When that example is run with the current (2018-06-25) beta or TL18, 
there is no html body:


    
    
    http://www.pragma-ade.com/context/export;>

   Rendering can be suboptimal because there is no 
default/fallback css loaded.

   
 
 
   

    
    
   

Further experimentation suggests that \startelement is gobbling the 
output. (Adding \setupstructure does not change the result.)


What is the proper way to add custom tags?

--
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] space sectioning control

2018-06-26 Thread Procházka Lukáš Ing .

Hello,

there was no key "textdistance" described on wiki, so I added the option into 
key-value list:

http://wiki.contextgarden.net/Command/setuphead

Lukas


On Mon, 25 Jun 2018 15:20:43 +0200, Wolfgang Schuster 
 wrote:


You have to change the value of textdistance.

\setuphead
   [subsubsection]
   [alternative=text,
distance=0pt,
textdistance=.5em]

\starttext

\startchapter[title={First}]

\startsubsubsection
\input ward
\stopsubsubsection

\stopchapter

\stoptext

Wolfgang

Idris Samawi Hamid ادريس سماوي حامد 
25. Juni 2018 um 04:45
Dear gang,

Here's an interesting one, attached and below:

===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][criterium=local,distance=0em,sectionstopper=.]

\starttext

\startchapter[title={First},reference={}]
\startsubsection%[title={First}]
\input ward
\stopsubsection
\startsubsection%[title={Second}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second},reference={}]
\startsubsection%[title={}]
\input ward
\stopsubsection
\startsubsection%[title={}]
\input ward
\stopsubsection
\stopchapter
\stoptext
===

Our subsections do not have titles. The space between the subsection
numeral and the text is too large, even with

distance=0em

Negative distances don't behave well - toggle lines 4 and 5.

What can we do to control the space between numeral and text? Thank
you in advance.

Best wishes
Idris
___
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
___
Wolfgang Schuster 
25. Juni 2018 um 13:41
To number paragraphs you can create a counter with \definelabel.


\definelabel[Paragraph][text=,numberstopper={.},headcommand=\groupedcommand{}{ 
}]

\starttext

\startchapter[title={First},reference={}]

\Paragraph\input ward

\Paragraph\input ward

\stopchapter

\startchapter[title={Second},reference={}]

\Paragraph\input ward

\Paragraph\input ward

\stopchapter

\stoptext


Wolfgang


Idris Samawi Hamid ادريس سماوي حامد 
25. Juni 2018 um 14:58
On Mon, 25 Jun 2018 05:41:15 -0600, Wolfgang Schuster
 wrote:


To number paragraphs you can create a counter with \definelabel.


Yes - and tested some paragraph options yesterday. Many thanks for the
sample below.

But this particular project is very large with countless
cross-references already in place that depend on the subsectioning
mechanism. Is there a workaround that will avoid major surgery to the
main text?

Also, subsubsections and subsubsubsections are still needed, as well
as resetting the counters after each chapter etc..

In other words, what's needed is all the features of subsection
without the titling. Just as

\start|stoptitle \start|stopsubject [etc.]

give titling without sectioning numerals, we need something like

\start|stoplabeling \start|stopsublabeling

to get sectioning numerals without titling.

(This is usually not a big deal except in cases like [alternative=text])

(And on a very tight deadline so there is little (‍= no) time to
rebuild structure from scratch. Better to configure subsection to do
what's needed, and perhaps use a different method for the next big
project.)

So is there a way this can be done? Many thanks for your insights and
help.

Idris


\definelabel[Paragraph][text=,numberstopper={.},headcommand=\groupedcommand{}{
}]

\starttext

\startchapter[title={First},reference={}]

\Paragraph\input ward

\Paragraph\input ward

\stopchapter

\startchapter[title={Second},reference={}]

\Paragraph\input ward

\Paragraph\input ward

\stopchapter

\stoptext


Can this be made into


Wolfgang


Idris Samawi Hamid ادريس سماوي حامد 
25. Juni 2018 um 04:45
Dear gang,

Here's an interesting one, attached and below:

===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][criterium=local,distance=0em,sectionstopper=.]

\starttext

\startchapter[title={First},reference={}]
\startsubsection%[title={First}]
\input ward
\stopsubsection
\startsubsection%[title={Second}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second},reference={}]
\startsubsection%[title={}]
\input ward
\stopsubsection
\startsubsection%[title={}]
\input ward
\stopsubsection
\stopchapter
\stoptext
===

Our subsections do not have titles. The space between the subsection
numeral and the text is too large, even with

distance=0em

Negative distances don't behave well - toggle lines 4 and 5.

What can 

Re: [NTG-context] beta

2018-06-26 Thread Ulrike Fischer
Am Sat, 23 Jun 2018 12:12:05 +0200 schrieb Hans Hagen:

> don't use register split in luaotfload ... look in luatex-fonts.lua etc 
> to soo how to analyze the name .. splitters are something context specific

It looks as if we managed to get it working in luaotfload. 

We are trying to setup test files. But normalization of the
log-files are complicate as the fontloader uses in various places
texio.write. E.g texio.write(format("(load luc: %s)",lucname))

Would it be possible to change this to some log-function which could
be adapted for the tests (so that e.g. newlines could be inserted
and the path stripped from file names)? 


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

Re: [NTG-context] Overriding / redefining / disabling standard commands

2018-06-26 Thread Hans Hagen

On 6/26/2018 9:35 AM, Hans Hagen wrote:

On 6/26/2018 4:44 AM, Rik Kabel wrote:

I thought that the ability to override a command like \index might be 
generally useful, and so brought it up to the list when I could not 
find a way to do it.
could be but only when it can be implemented efficiently (i don't want 
to add overhead related to export when export is off so it would mean 
permanently disabled and not locally in a run) ... what commands are we 
talking about

i'll add \ignoretagsinexport as in:

\setupbackend[export=yes]

\ignoretagsinexport
  [registerlocation]

\starttext

test \index {test} test

\stoptext




-
  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] Overriding / redefining / disabling standard commands

2018-06-26 Thread Alan Braslau
On Tue, 26 Jun 2018 09:35:06 +0200
Hans Hagen  wrote:

> On 6/26/2018 4:44 AM, Rik Kabel wrote:
> 
> > I thought that the ability to override a command like \index might
> > be generally useful, and so brought it up to the list when I could
> > not find a way to do it.  
> could be but only when it can be implemented efficiently (i don't
> want to add overhead related to export when export is off so it would
> mean permanently disabled and not locally in a run) ... what commands
> are we talking about

AND, I still don't get the point...
(you can always define your own custom commands by mode)

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] Align TOC section numbers flushright

2018-06-26 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 25 Jun 2018 14:20:03 -0600, Wolfgang Schuster  
 wrote:



If one turns on \showframe, one sees that the width value does not
prevent crossing the left side of the textblock (a good thing). OTOH,
getting the TOC numerals to lineup with the left side is a matter of
trial and error. [width=1.85em comes close]

And if the document is changed so that the wider roman numerals are
not needed, then one has to reset the width value, again by trial and
error.

So is there a way to make the left side of the textblock flush with
the widest roman? It's by no means urgent, but sine we are supposed to
be able to automate nearly everything.. -)


This isn’t supported but adding a sample key (which is supported by
enumerations) where you can set a text which is used to calculate the
width should be easy.


Ok, hereby making this a feature request -)


The attached file shows which values are valid for \setupcombinedlist.


Ah, our npp-4-context config files for calltips need updating, I have

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setuplist]

but that should be

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setupcombinedlist]


I have the changes only in my local files.


Ah, ok. Many thanks.

Idris
--
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] Overriding / redefining / disabling standard commands

2018-06-26 Thread Hans Hagen

On 6/26/2018 4:44 AM, Rik Kabel wrote:

I thought that the ability to override a command like \index might be 
generally useful, and so brought it up to the list when I could not find 
a way to do it.
could be but only when it can be implemented efficiently (i don't want 
to add overhead related to export when export is off so it would mean 
permanently disabled and not locally in a run) ... what commands are we 
talking about


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] Overriding / redefining / disabling standard commands

2018-06-26 Thread Wolfgang Schuster



Alan Braslau 
26. Juni 2018 um 04:00
On Mon, 25 Jun 2018 20:50:51 -0400

\setupregister[index][referencing=off]


This option doesn’t exist in MkIV and there is no other option to 
disable \index.


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
___