Re: [NTG-context] Could you look at this?

2017-08-08 Thread Idris Samawi Hamid ادريس سماوي حامد
On Tue, 08 Aug 2017 22:14:15 -0600, Idris Samawi Hamid ادريس سماوي حامد  
 wrote:



Wikified by Pablo:

http://wiki.contextgarden.net/Paragraph_Enumeration#Using_Section_Numbering_to_Improve_Paragraph_Numbering

And coming soon to a beta near you:

http://wiki.contextgarden.net/Titles#Complete_Section_Numbering


Much improved version, with optional titles - updated the wiki:

==
\defineseparatorset [ParagraphNumber][.,] % no second decimal for  
susubparagraphs
% \defineseparatorset [ParagraphNumber][.,.] % second decimal for  
susubparagraphs


\definecounter[ParagraphNumber][numberseparatorset=ParagraphNumber,criterium=all]

\define\ParagraphNumber
  {{\bf \incrementcounter[ParagraphNumber]%
   \convertedcounter[ParagraphNumber][numbersegments=1]}\quad}

\define\subParagraphNumber
  {{\bf \incrementcounter[ParagraphNumber][2]%
   \convertedcounter[ParagraphNumber][numbersegments=1:2]}\quad}

\define\subsubParagraphNumber
  {{\bf \incrementcounter[ParagraphNumber][3]%
   \convertedcounter[ParagraphNumber][numbersegments=1:3]}\quad}

\setuphead[section]
   [style=\bf,
alternative=text,
criterium=all,
number=no,
textcommand=\ParagraphNumber,
insidesection=\hskip-0.49em] % adjust space after title

\setuphead[subsection]
   [style=\bf,
alternative=text,
criterium=all,
number=no,
textcommand=\subParagraphNumber,
insidesection=\hskip-0.49em] % adjust space after title

\setuphead[subsubsection]
   [style=\bf,
alternative=text,
criterium=all,
number=no,
textcommand=\subsubParagraphNumber,
insidesection=\hskip-0.49em] % adjust space after title

\setupwhitespace[line]

\starttext
\startsection[title={Text.}]
\input ward
\startsubsection
\input ward
\startsubsubsection[title={Text.}]
\input ward
\stopsubsubsection
\stopsubsection
\stopsection

\startsection
\input ward
\startsubsubsection
\input ward
\stopsubsubsection
\stopsection
\stoptext
==

Any further suggestions for improvement?


Many thanks to Wolfgang, Pablo, and of course Hans.


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] Using legacy math fonts

2017-08-08 Thread Henri
Furthermore the example only works in TeXlive 2017 but not in beta.  What has 
changed and how do I
make it work again?

On Wed, 2017-08-09 at 17:00 +1200, Henri wrote:
> Dear list,
> 
> Because I don't like that Euler calligraphic script provided by Latin Modern 
> Math, I want to
> revert
> to Computer Modern for the uppercase calligraphic letters.  I got so far, 
> that the command will
> produce the correct glyphs, however, the kerning is borken.  What did I miss?
> 
> Cheers, Henri
> 
> ---
> 
> % Allocate tokens for legacy math codes
> \newtoks\legacymathcodes\legacymathcodes={
> \Umathcode`A="7"1"41 \Umathcode`B="7"1"42 \Umathcode`C="7"1"43
> \Umathcode`D="7"1"44 \Umathcode`E="7"1"45 \Umathcode`F="7"1"46
> \Umathcode`G="7"1"47 \Umathcode`H="7"1"48 \Umathcode`I="7"1"49
> \Umathcode`J="7"1"4A \Umathcode`K="7"1"4B \Umathcode`L="7"1"4C
> \Umathcode`M="7"1"4D \Umathcode`N="7"1"4E \Umathcode`O="7"1"4F
> \Umathcode`P="7"1"50 \Umathcode`Q="7"1"51 \Umathcode`R="7"1"52
> \Umathcode`S="7"1"53 \Umathcode`T="7"1"54 \Umathcode`U="7"1"55
> \Umathcode`V="7"1"56 \Umathcode`W="7"1"57 \Umathcode`X="7"1"58
> \Umathcode`Y="7"1"59 \Umathcode`Z="7"1"5A
> }
> 
> % Load CM calligraphic
> \font\tensy  =cmsy10 at \mathstyleface\textstyle
> \font\sevensy=cmsy7  at \mathstyleface\scriptstyle
> \font\fivesy =cmsy5  at \mathstyleface\scriptscriptstyle
> 
> % Allocate family
> \newfam\cmcalfam
> 
> % Assign font families
> \textfont\cmcalfam=\tensy
> \scriptfont  \cmcalfam=\sevensy
> \scriptscriptfont\cmcalfam=\fivesy
> 
> % Make a macro wrapper
> \unexpanded\def\cmcal#1{{\fam\cmcalfam\the\legacymathcodes#1}}
> 
> \starttext
> 
> $\mathcal{TUV}$
> 
> $\cmcal{TUV}$
> 
> \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] Using legacy math fonts

2017-08-08 Thread Henri
Dear list,

Because I don't like that Euler calligraphic script provided by Latin Modern 
Math, I want to revert
to Computer Modern for the uppercase calligraphic letters.  I got so far, that 
the command will
produce the correct glyphs, however, the kerning is borken.  What did I miss?

Cheers, Henri

---

% Allocate tokens for legacy math codes
\newtoks\legacymathcodes\legacymathcodes={
\Umathcode`A="7"1"41 \Umathcode`B="7"1"42 \Umathcode`C="7"1"43
\Umathcode`D="7"1"44 \Umathcode`E="7"1"45 \Umathcode`F="7"1"46
\Umathcode`G="7"1"47 \Umathcode`H="7"1"48 \Umathcode`I="7"1"49
\Umathcode`J="7"1"4A \Umathcode`K="7"1"4B \Umathcode`L="7"1"4C
\Umathcode`M="7"1"4D \Umathcode`N="7"1"4E \Umathcode`O="7"1"4F
\Umathcode`P="7"1"50 \Umathcode`Q="7"1"51 \Umathcode`R="7"1"52
\Umathcode`S="7"1"53 \Umathcode`T="7"1"54 \Umathcode`U="7"1"55
\Umathcode`V="7"1"56 \Umathcode`W="7"1"57 \Umathcode`X="7"1"58
\Umathcode`Y="7"1"59 \Umathcode`Z="7"1"5A
}

% Load CM calligraphic
\font\tensy  =cmsy10 at \mathstyleface\textstyle
\font\sevensy=cmsy7  at \mathstyleface\scriptstyle
\font\fivesy =cmsy5  at \mathstyleface\scriptscriptstyle

% Allocate family
\newfam\cmcalfam

% Assign font families
\textfont\cmcalfam=\tensy
\scriptfont  \cmcalfam=\sevensy
\scriptscriptfont\cmcalfam=\fivesy

% Make a macro wrapper
\unexpanded\def\cmcal#1{{\fam\cmcalfam\the\legacymathcodes#1}}

\starttext

$\mathcal{TUV}$

$\cmcal{TUV}$

\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] Could you look at this?

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

On Tue, 08 Aug 2017 08:13:22 -0600, Idris Samawi Hamid ادريس سماوي حامد

Here is a first attempt to combine this paragraph numbering with  
sectioning:


\defineseparatorset [ParagraphNumber][.,] % no second decimal for  
susubparagraphs
% \defineseparatorset [ParagraphNumber][.,.] % second decimal for  
susubparagraphs


\definecounter[ParagraphNumber][numberseparatorset=ParagraphNumber,criterium=all]

\define\ParagraphNumber
   {{\bf \incrementcounter[ParagraphNumber]%
\convertedcounter[ParagraphNumber][numbersegments=1]}\quad}

\define\subParagraphNumber
   {{\bf \incrementcounter[ParagraphNumber][2]%
\convertedcounter[ParagraphNumber][numbersegments=1:2]}\quad}

\define\subsubParagraphNumber
   {{\bf \incrementcounter[ParagraphNumber][3]%
\convertedcounter[ParagraphNumber][numbersegments=1:3]}\quad}

\setuphead[section]
[style=\bf,
 alternative=text,
 criterium=all,
 number=no]

\setuphead[subsection]
[style=\bf,
 alternative=text,
 criterium=all,
 number=no]

\setuphead[subsubsection]
[style=\bf,
 alternative=text,
 criterium=all,
 number=no]

\setupwhitespace[line]

\def\startsectionpar{\startsection[title={\ParagraphNumber}]}
\def\startsubsectionpar{\startsection[title={\subParagraphNumber}]}
\def\startsubsubsectionpar{\startsection[title={\subsubParagraphNumber}]}
\def\stopsectionpar{\stopsection}
\def\stopsubsectionpar{\stopsubsection}
\def\stopsubsubsectionpar{\stopsubsubsection}

\starttext
\startsectionpar[title=\ParagraphNumber]
\input ward
\startsubsectionpar[title=\subParagraphNumber]
\input ward
\startsubsubsectionpar[title=\subsubParagraphNumber]
\input ward
\stopsubsubsectionpar
\stopsubsectionpar
\stopsectionpar

\startsectionpar[title=\ParagraphNumber]
\input ward
\startsubsubsectionpar[title=\subsubParagraphNumber]
\input ward
\stopsubsubsectionpar
\stopsection
\stoptext
==


Wikified by Pablo:

http://wiki.contextgarden.net/Paragraph_Enumeration#Using_Section_Numbering_to_Improve_Paragraph_Numbering

And coming soon to a beta near you:

http://wiki.contextgarden.net/Titles#Complete_Section_Numbering

Many thanks to Wolfgang, Pablo, and of course Hans.

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] xml verbatim in xml...

2017-08-08 Thread Pablo Rodriguez
On 08/08/2017 11:26 PM, Pablo Rodriguez wrote:
> On 08/08/2017 10:46 PM, Schmitz Thomas A. wrote:
>> Hi all,
>>
>> excellent excuse to pester the list with a program: it’s for my
>> presentation at the ConTeXt meeting (have YOU registered yet?)…
>> So: I want to show verbatim xml, and I’m writing in xml. This
>> solution: http://wiki.contextgarden.net/Verbatim_XML mostly works
>> (for Lua and TeX code), except for one little detail: for verbatim
>> xml, it also prints the  tag. Example:
> Thomas,
> 
> \xmlprettyprint seems an easier approach.
> 
> And I don’t know whether there might be a bug here, but your issue
> arises when it contains XML tags:

Buffer in my previous sample was wrong (I modified something [to check
whether the string "xml" was the cause] and I copied the wrong version):

\startbuffer[test]

  
  \starttext
\ConTeXt\ is awesome!
  \stoptext
  

  
   
   
  ...
   
   
  ...
   
  
  

\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{a/xmlcode}{xml:xmlcode}
\xmlsetsetup{\xmldocument}{a/texcode}{xml:texcode}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:texcode
\xmlprettyprint{#1}{none}
\stopxmlsetups

\startxmlsetups xml:xmlcode
\xmlprettyprint{#1}{none}
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

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] BUG: Colour spilling in btxrendering

2017-08-08 Thread Pablo Rodriguez
On 08/08/2017 11:02 PM, Henri wrote:
> On Tue, 2017-08-08 at 17:31 +0200, Pablo Rodriguez wrote:
>> [...]
>> This fixes in my computer what I guess is your problem.
> 
> I would call this a workaround. What I want are coloured links.
> Usually only the clickable area is coloured but in the bibliography
> it somehow "spills" over to the surrounding text as well.

You are right, Henri. My guess was wrong.

Link is in both cases the same field (doi). But the color is spilled
over the whole reference.

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] xml verbatim in xml...

2017-08-08 Thread Pablo Rodriguez
On 08/08/2017 10:46 PM, Schmitz Thomas A. wrote:
> Hi all,
> 
> excellent excuse to pester the list with a program: it’s for my
> presentation at the ConTeXt meeting (have YOU registered yet?)…
> So: I want to show verbatim xml, and I’m writing in xml. This
> solution: http://wiki.contextgarden.net/Verbatim_XML mostly works
> (for Lua and TeX code), except for one little detail: for verbatim
> xml, it also prints the  tag. Example:
Thomas,

\xmlprettyprint seems an easier approach.

And I don’t know whether there might be a bug here, but your issue
arises when it contains XML tags:

\startbuffer[test]

  
  \starttext
\ConTeXt\ is awesome!
  \stoptext
  

  
   
   
  ...
   
   
  ...
   
  
  

\stopbuffer

\startxmlsetups xml:testsetups %sorry, too lazy for more
\xmlsetsetup{\xmldocument}{a/xmlcode}{xml:xmlcode}
\xmlsetsetup{\xmldocument}{a/texcode}{xml:texcode}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:texcode
\xmlprettyprint{#1}{none}
\stopxmlsetups

\startxmlsetups xml:xmlcode
\xmlprettyprint{#1}{none}
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

Just in case it helps,

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] BUG: Colour spilling in btxrendering

2017-08-08 Thread Henri
On Tue, 2017-08-08 at 17:31 +0200, Pablo Rodriguez wrote:
> On 08/08/2017 08:04 AM, Henri wrote:
> > 
> > This problem is still present in latest beta (see attached). I was unable 
> > to identify the cause.
> > Please fix this. Bibliographies are somewhat unusable with coloured links 
> > right now.
> Hi Henri,
> 
> I don’t think there is a problem with the bibliographies.
> 
> It is only how you set up interaction in the document:
> 
>   \setupinteraction[state=start, style=, color=, contrastcolor=]
>   \enabledirectives[references.border]
> 
> The directive only creates a gray border (which won’t be printed) to see
> where you may click.
> 
> This fixes in my computer what I guess is your problem.

I would call this a workaround.  What I want are coloured links.  Usually only 
the clickable area is
coloured but in the bibliography it somehow "spills" over to the surrounding 
text as well.

> 
> I hope it helps,
> 
> Pablo
___
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] comment colors in \typebuffers

2017-08-08 Thread Pablo Rodriguez
Hans,

I have the following sample:

\starttext
\startTEXpage[offset=1em]
\startTEX
This is text. % and this is a comment
\stopTEX

\startXML
This is text.
\stopXML

\startLUA
if code=="code" then --this is a comment

--[[
and this is a
multiline comment
--]]
\stopLUA
\stopTEXpage
\stoptext

All comments are colored in darkyellow, but the issue is that in Lua and
TeX only the comment markers are colored, while in XML only the comment
content is colored.

Because it is basic to display what it won’t affect to the
interpretation or compilation of the code, would it be possible that the
whole comments (both markers and content) could be colored?

Sorry, but in all the code editors I have used in my life, comment
coloring involved both markers (or delimiters) and content.

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
___

[NTG-context] xml verbatim in xml...

2017-08-08 Thread Schmitz Thomas A.
Hi all,

excellent excuse to pester the list with a program: it’s for my presentation at 
the ConTeXt meeting (have YOU registered yet?)… So: I want to show verbatim 
xml, and I’m writing in xml. This solution: 
http://wiki.contextgarden.net/Verbatim_XML mostly works (for Lua and TeX code), 
except for one little detail: for verbatim xml, it also prints the  
tag. Example:

\startbuffer[test]

  
   
   
  ...
   
   
  ...
   
  
  

\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{a|xmlcode}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startluacode
function xml.functions.processXML(t)
buffers.assign("MyXml", "\\startXML\n" .. tostring(xml.text(t)) .. 
"\n\\stopXML")
context.getbuffer { "MyXml" }
end
\stopluacode

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:xmlcode
  \pushcatcodetable
\setcatcodetable\ctxcatcodes
\xmlfunction{#1}{processXML}
\popcatcodetable
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}

\stoptext

How can this be prevented? 

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
___

Re: [NTG-context] methods for numbered paragraphs (ii)

2017-08-08 Thread Pablo Rodriguez
On 08/08/2017 09:36 AM, Hans Hagen wrote:
> On 8/7/2017 11:03 PM, Pablo Rodriguez wrote:
>> But even in that case, numbering from:
>>
>>\section{A}
>>\subsubsection{B}
>>
>> gives:
>>
>>1 A
>>1 B
>>
>> Should it be the following?
>>
>>1 A
>>1.1 B
> 
> no it would be 1 and 1.0.1 then

Sorry, I haven’t explained myself, Hans.

With the complete sample:

 \starttext
 \section{A}
 \subsubsection{B}
 \stoptext

Being the default and criterium applied, we get:

 1 A
 1 B

Isn’t this (again, I mean the default, not the extra option you are
going to implement) a wrong structuring?

I may understand that the original code considers the \subsubsection as
\subsection in regard to numbering to keep the structure, but
considering \subsubsection in the previous sample as a \section in
regard to numbering destroys the structure.

I hope this is clear now.

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] methods for numbered paragraphs (ii)

2017-08-08 Thread Pablo Rodriguez
On 08/08/2017 02:42 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> [...]
> - see attached - so maybe the criterium=all support wasn't included in  
> yesterday's release but is intended for a subsequent one..

I think so (he said he would support). It will be in next beta.
According to "curl -I http://pragma-ade.com/context/beta/cont-tmf.zip;
has to be released.

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] BUG: Colour spilling in btxrendering

2017-08-08 Thread Pablo Rodriguez
On 08/08/2017 08:04 AM, Henri wrote:
> This problem is still present in latest beta (see attached). I was unable to 
> identify the cause.
> Please fix this. Bibliographies are somewhat unusable with coloured links 
> right now.

Hi Henri,

I don’t think there is a problem with the bibliographies.

It is only how you set up interaction in the document:

  \setupinteraction[state=start, style=, color=, contrastcolor=]
  \enabledirectives[references.border]

The directive only creates a gray border (which won’t be printed) to see
where you may click.

This fixes in my computer what I guess is your problem.

I hope it helps,

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] Could you look at this?

2017-08-08 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 07 Aug 2017 13:57:56 -0600, Wolfgang Schuster  
 wrote:



Simpler version:
\defineseparatorset [ParagraphNumber][.,]
\definecounter[ParagraphNumber][numberseparatorset=ParagraphNumber,criterium=all]
\define\ParagraphNumber
  {\incrementcounter[ParagraphNumber]%
   \convertedcounter[ParagraphNumber][numbersegments=1]\quad}
\define\subParagraphNumber
  {\incrementcounter[ParagraphNumber][2]%
   \convertedcounter[ParagraphNumber][numbersegments=1:2]\quad}
\define\subsubParagraphNumber
  {\incrementcounter[ParagraphNumber][3]%
   \convertedcounter[ParagraphNumber][numbersegments=1:3]\quad}
\setupwhitespace[line]
\starttext
\ParagraphNumber\input ward
\subsubParagraphNumber\input ward
\subParagraphNumber\input ward
\subsubParagraphNumber\input ward
\subsubParagraphNumber\input ward
\subParagraphNumber\input ward
\subsubParagraphNumber\input ward
\ParagraphNumber\input ward
\stoptext


Here is a first attempt to combine this paragraph numbering with  
sectioning:


\defineseparatorset [ParagraphNumber][.,] % no second decimal for  
susubparagraphs
% \defineseparatorset [ParagraphNumber][.,.] % second decimal for  
susubparagraphs


\definecounter[ParagraphNumber][numberseparatorset=ParagraphNumber,criterium=all]

\define\ParagraphNumber
  {{\bf \incrementcounter[ParagraphNumber]%
   \convertedcounter[ParagraphNumber][numbersegments=1]}\quad}

\define\subParagraphNumber
  {{\bf \incrementcounter[ParagraphNumber][2]%
   \convertedcounter[ParagraphNumber][numbersegments=1:2]}\quad}

\define\subsubParagraphNumber
  {{\bf \incrementcounter[ParagraphNumber][3]%
   \convertedcounter[ParagraphNumber][numbersegments=1:3]}\quad}

\setuphead[section]
   [style=\bf,
alternative=text,
criterium=all,
number=no]

\setuphead[subsection]
   [style=\bf,
alternative=text,
criterium=all,
number=no]

\setuphead[subsubsection]
   [style=\bf,
alternative=text,
criterium=all,
number=no]

\setupwhitespace[line]

\def\startsectionpar{\startsection[title={\ParagraphNumber}]}
\def\startsubsectionpar{\startsection[title={\subParagraphNumber}]}
\def\startsubsubsectionpar{\startsection[title={\subsubParagraphNumber}]}
\def\stopsectionpar{\stopsection}
\def\stopsubsectionpar{\stopsubsection}
\def\stopsubsubsectionpar{\stopsubsubsection}

\starttext
\startsectionpar[title=\ParagraphNumber]
\input ward
\startsubsectionpar[title=\subParagraphNumber]
\input ward
\startsubsubsectionpar[title=\subsubParagraphNumber]
\input ward
\stopsubsubsectionpar
\stopsubsectionpar
\stopsectionpar

\startsectionpar[title=\ParagraphNumber]
\input ward
\startsubsubsectionpar[title=\subsubParagraphNumber]
\input ward
\stopsubsubsectionpar
\stopsection
\stoptext
==

There are surely ways to continue to improve this.. Thanks again,  
Wolfgang, and to everyone who has contributed.


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] Could you look at this?

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

On Tue, 08 Aug 2017 01:29:12 -0600, Hans Hagen  wrote:


On 8/8/2017 12:32 AM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Thank you again, Wolfgang. After playing with this, figured out how to  
do the full decimal version; just toggle
 % \defineseparatorset [ParagraphNumber][.,] % no second decimal for  
susubparagraphs
\defineseparatorset [ParagraphNumber][.,.] % second decimal for  
susubparagraphs

 Pablo, could you wikify this? The following page is now obsolete:
 http://wiki.contextgarden.net/Paragraph_Enumeration
 Thanks in advance.
 Again, many thanks to Pablo and Wolfgang.

Hey, you are the one who should now wikify this!


Even better, should prepare a TeX article on Wittgenstein numbering!

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] Could you look at this?

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

[off-topic]

Hi Jean-Pierre,

On Tue, 08 Aug 2017 01:34:28 -0600, Jean-Pierre Delange  
 wrote:



Hi Idriss, Pablo, Wolfgang and Hans,
 It has been a long time since I have read the Wittgenstein  
"Tractacus-Logico-Philosophicus". I remember, when I was 20, that I was  
very puzzled by this assertion : "Wovon man nicht klar sagen, muss man  
schweigen".


That clause comes at the end of a larger assertion:

"Was sich überhaupt sagen lässt, lässt sich klar sagen; und wovon man  
nicht reden kann, darüber muss man schweigen."


"What can be said at all can be said clearly; and whereof one cannot speak  
thereof one must be silent."


That assertion (as well as the entire Tractatus) involves multiple  
epistemic-ontic confusions. For example: It is not the case that what is  
clear to one person is automatically clear to another person. Nor is it  
the case that a statement which is unclear to the person who hears it is  
automatically unclear to the person who stated it.


Unfortunately for Wittgenstein, when held to the standard of his own  
benchmark above he often paints himself into a corner. From John Corcoran  
(one of the greatest living logicians):


===
INTERPRETING ARISTOTLE: I took for my principle of interpretation that he  
meant what he said: and truly he is a writer who deserves this compliment.  
—Augustus De Morgan 1862.


INTERPRETING WITTGENSTEIN: I took for my principle of interpretation that  
he meant what he said: and truly he is a writer who deserves this  
punishment. —Frango Nabrasa 2002.

===

https://www.academia.edu/s/a5a4386b75/surprises-in-logic?


 I guess Wittgenstein didn't think about coding numbered paragraphs !


Indeed, his system has perplexed most readers of the Tractatus; some of  
his commentators consider it perverse, even a joke. The obscurity of his  
numbering system has created something of a cottage industry:


https://philpapers.org/rec/GIBITN
https://philpapers.org/rec/VERTNS

Judged by the standard expressed by the assertion you quoted, Wittgenstein  
should not have used his own system!


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] methods for numbered paragraphs (ii)

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

On Tue, 08 Aug 2017 01:36:00 -0600, Hans Hagen  wrote:


On 8/7/2017 11:03 PM, Pablo Rodriguez wrote:

On 08/07/2017 08:57 PM, Hans Hagen wrote:

On 8/7/2017 5:08 PM, Pablo Rodriguez wrote:

[...]
I mean, in a common sectioning structure a \subsubsection comes after  
a

\subsection. But I don’t think it must be mandatory.


Well, it's all on purpose ... no excuse for bad structuring

 But even in that case, numbering from:
\section{A}
   \subsubsection{B}
 gives:
1 A
   1 B
 Should it be the following?
1 A
   1.1 B


no it would be 1 and 1.0.1 then


anyway, i'll support the criterium flag in sections too:

\setuphead[subsection][criterium=all]

and for sure i'll forget about it so I wonder who will document it ...

 I have done it
(http://wiki.contextgarden.net/Titles#Complete_Section_Numbering).
 But Idris should review and improve it ;-).
 Many thanks for the improvoement,


current version: 2017.08.07 11:30

===
\setuphead[subsection][criterium=all]

\starttext
\section{A}
\subsection{B}
\subsubsection{C}

\section{D}
% \subsection{E}
\subsubsection{F}
\stoptext
===

produces the following

1 A
1.1 B
1.1.1 C
2 D
1 F

- see attached - so maybe the criterium=all support wasn't included in  
yesterday's release but is intended for a subsequent one..


Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

section-intext2.pdf
Description: Adobe PDF document
___
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] methods for numbered paragraphs (ii)

2017-08-08 Thread Hans Hagen

On 8/7/2017 11:03 PM, Pablo Rodriguez wrote:

On 08/07/2017 08:57 PM, Hans Hagen wrote:

On 8/7/2017 5:08 PM, Pablo Rodriguez wrote:

[...]
I mean, in a common sectioning structure a \subsubsection comes after a
\subsection. But I don’t think it must be mandatory.


Well, it's all on purpose ... no excuse for bad structuring


But even in that case, numbering from:

   \section{A}
   \subsubsection{B}

gives:

   1 A
   1 B

Should it be the following?

   1 A
   1.1 B


no it would be 1 and 1.0.1 then


anyway, i'll support the criterium flag in sections too:

\setuphead[subsection][criterium=all]

and for sure i'll forget about it so I wonder who will document it ...


I have done it
(http://wiki.contextgarden.net/Titles#Complete_Section_Numbering).

But Idris should review and improve it ;-).

Many thanks for the improvoement,

Pablo




--

-
  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] Could you look at this?

2017-08-08 Thread Jean-Pierre Delange

Hi Idriss, Pablo, Wolfgang and Hans,

It has been a long time since I have read the Wittgenstein 
"Tractacus-Logico-Philosophicus". I remember, when I was 20, that I was 
very puzzled by this assertion : "Wovon man nicht klar sagen, muss man 
schweigen".


I guess Wittgenstein didn't think about coding numbered paragraphs !

JP


Le 08/08/2017 à 00:26, Idris Samawi Hamid ادريس سماوي حامد a écrit :

Hi Wolfgang,

On Mon, 07 Aug 2017 12:17:21 -0600, Wolfgang Schuster 
 wrote:





Idris Samawi Hamid ادريس سماوي حامد 
7. August 2017 um 15:54
Hi Hans,

https://mailman.ntg.nl/pipermail/ntg-context/2017/089431.html

For the current writing project: It seems I've gotten about as far as
I'm going to get on the list with this. Could you kindly take a look
at the two automation challenges at the end of the message when you
get a chance?

Eventually we want to also get, e.g.

1.01
2.01

etc. but the full decimal version is a start. Here is a link to the
book that illustrates the layout:

https://www.dropbox.com/s/q7znlu0y362abno/Mure-Introduction-to-Hegel-OCR.pdf?dl=0 




Thanks in advance for your help.


\defineexpandable[1]\PreviousNumber
   {\number\numexpr#1-1\relax}

\defineconversion[PreviousNumber][\PreviousNumber]

\defineconversionset[ParagraphNumber][n,PreviousNumber,PreviousNumber]
\defineseparatorset [ParagraphNumber][.,]

\definecounter[ParagraphNumber][numberconversionset=ParagraphNumber,numberseparatorset=ParagraphNumber] 



\define\ParagraphNumber
   {\incrementcounter[ParagraphNumber]%
\incrementcounter[ParagraphNumber][2]%
\incrementcounter[ParagraphNumber][3]%
\convertedcounter[ParagraphNumber][numbersegments=1]\quad}

\define\subParagraphNumber
   {\incrementcounter[ParagraphNumber][2]%
\incrementcounter[ParagraphNumber][3]%
\convertedcounter[ParagraphNumber][numbersegments=1:2]\quad}

\define\subsubParagraphNumber
   {\incrementcounter[ParagraphNumber][3]%
\convertedcounter[ParagraphNumber][numbersegments=1:3]\quad}

\setupwhitespace[line]

\starttext

\ParagraphNumber\input ward

\subsubParagraphNumber\input ward

\subParagraphNumber\input ward

\subsubParagraphNumber\input ward

\subsubParagraphNumber\input ward

\subParagraphNumber\input ward

\subsubParagraphNumber\input ward

\ParagraphNumber\input ward

\stoptext


Many thanks, Wolfgang, you are a true wizard. Wittgenstein and Mure 
would be proud.


With much appreciation
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
___

Re: [NTG-context] Could you look at this?

2017-08-08 Thread Hans Hagen

On 8/8/2017 12:32 AM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Thank you again, Wolfgang. After playing with this, figured out how to 
do the full decimal version; just toggle


% \defineseparatorset [ParagraphNumber][.,] % no second decimal for 
susubparagraphs
\defineseparatorset [ParagraphNumber][.,.] % second decimal for 
susubparagraphs


Pablo, could you wikify this? The following page is now obsolete:

http://wiki.contextgarden.net/Paragraph_Enumeration

Thanks in advance.

Again, many thanks to Pablo and Wolfgang.

Hey, you are the one who should now wikify this!

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] BUG: Colour spilling in btxrendering

2017-08-08 Thread Henri
This problem is still present in latest beta (see attached). I was unable to 
identify the cause.
Please fix this. Bibliographies are somewhat unusable with coloured links right 
now.

On Mon, 2017-05-08 at 09:43 +1200, Henri Menke wrote:
> Dear list,
> 
> I reported this already some time ago but apparently it went unnoticed.
> 
> https://mailman.ntg.nl/pipermail/ntg-context/2016/086227.html
> 
> When you place hyperlinks in the bibliography the colour »spills over«,
> see MWE below.  The link is only on the string `Phys. Rev. 140
> A1133–A1138 (1965)` but the whole line is coloured.
> 
> Cheers,
> Henri
> 
> ---
> 
> \startbuffer[references]
> @article{Kohn1965,
>   title = {Self-Consistent Equations Including Exchange and Correlation
> Effects},
>   author = {Kohn, W. and Sham, L. J.},
>   journal = {Phys. Rev.},
>   volume = {140},
>   issue = {4A},
>   pages = {A1133--A1138},
>   numpages = {0},
>   year = {1965},
>   month = {Nov},
>   publisher = {American Physical Society},
>   doi = {10.1103/PhysRev.140.A1133},
>   url = {https://link.aps.org/doi/10.1103/PhysRev.140.A1133}
> }
> \stopbuffer
> 
> \setupinteraction[state=start]
> 
> \usebtxdataset[references.buffer]
> \usebtxdefinitions[aps]
> 
> \starttext
> 
> \nocite{Kohn1965}
> \placelistofpublications
> 
> \stoptext

test.pdf
Description: Adobe PDF document
___
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
___