Re: [NTG-context] Switching to righttoleft without changing margins of delimited text

2021-12-13 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context

Hi,

On Mon, 13 Dec 2021 12:06:33 -0700, Hans Hagen via ntg-context  
 wrote:



i'll also add it to mkiv


By about when do you expect mkiv to become frozen a la mkii?

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] Can modes be used for content control?

2021-11-17 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context
On Wed, 17 Nov 2021 08:51:03 -0700, Henning Hraban Ramm via ntg-context  
 wrote:



TeX comments will illustrate:

==
This text goes into the abridged version.

% This text will appear in the unabridged version.

And this text goes into the abridged version.

% And this text goes into the unabridged version.

And this additional text goes into the abridged version.

% And this additional text goes into the unabridged version.
==

An abridged run will ignore the commented text, and an unabridged run  
will include it.


Ok, it it’s about such small snippets, consider  
\doifmode{mode1,mode2}{Conditional text}.


I don’t think you would get shorter markup with nesting.

More possibilities see  
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.contextgarden.net%2FModesdata=04%7C01%7CIdris.Hamid%40ColoState.EDU%7C14c5b723751a4eb2bb9308d9a9e42f31%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637727619814441586%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=tljjceauaTpF%2FYlSHYhna05nmXP5ppCsMVHDj0VNBWk%3Dreserved=0


Started there before starting this thread, but the focus appears to be  
global and the one and only working example near the end is pretty trivial  
-)


But armed with the answers received here, will look at it again for ideas.


Consider variant texts:

===
Here is some text that
  contains % mode=variantone
  includes % mode=varianttwo
  is comprised of % mode=variantthree
some variants.

Here is some more text that
  features % mode=variantone
  exhibits % mode=varianttwo
  illustrates % mode=variantthree
some variants.
===

This example is to be processed to produce exactly three distinct  
results. So, e.g., "contains" and "features" belong to variantone. Etc.  
So like XML.


How about:

Here is some text that
\startmodeset
[variantone] {contains}
[varianttwo] {includes}
[variantthree]   {is comprised of}
[default]{doesn’t contain}
\stopmodeset
some variants.


Very nice, many thanks! Will experiment with this method as well,  
comparing and contrasting with blocks and Aditya's modes method.


It might be a bit annoying, but you could end the previous mode before  
starting the next.
Assuming that I'm not misunderstanding you: For a book-length project,  
that would be beyond annoying.


Well, it looks like you’ll need a lot of markup anyway.


Indeed. And that's ok, as long as the structure is simple enough.. Occam's  
razor!


Best wishes
--
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] Can modes be used for content control?

2021-11-17 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context
On Wed, 17 Nov 2021 11:54:52 -0700, Hans Hagen via ntg-context  
 wrote:


 Blocks are a better mechanism, but I still prefer modes here because I  
find the \beginblock ... \endblock syntax to be a bit awkward in a  
context document.


it also depends on usage ... you can have blocks and delay them or reuse  
them or call them up later etc .. so you can code answers with questions  
and then call them up in an appendix


Many thanks. Will do some comparison-and-contrast tests for research  
writing with both methods. The pedagogical use of blocks will certainly  
come in handy at some point.


Best wishes
--
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] Can modes be used for content control?

2021-11-17 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context
On Wed, 17 Nov 2021 10:56:46 -0700, Aditya Mahajan via ntg-context  
 wrote:



But you don't have to directly use the modes. The following will work:

\definestartstop[abridged]

% By default, don't show the unabridged text
\definebuffer[unabridged][local=yes, nested=yes]

\startmode[unabridged]
% In the unabridged mode, show the abridged text
\definestartstop[unabridged]
\stopmode

\starttext
\startabridged
\input knuth

\startunabridged
\startblockquote
\input ward
\stopblockquote
\stopunabridged

\input zapf
\stopabridged


Excellent, many thanks! Starting to get the feel of the matter now. Will  
put together some tests..


Best wishes
--
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] Can modes be used for content control?

2021-11-17 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context

Hi Hraban,

Many thanks; see below:

On Wed, 17 Nov 2021 04:32:56 -0700, Henning Hraban Ramm via ntg-context  
 wrote:


Am 17.11.2021 um 04:06 schrieb ⁨Idris Samawi Hamid ادريس سماوي حامد via  
ntg-context⁩ <⁨ntg-context@ntg.nl⁩>:





You know about \startnotmode and that you can use lists of modes?
\startmode[short,long]
Something that appears everywhere.
\stopmode
\startmode[long] % or \startnotmode[short]
Something that’s only in the long version.
\stopmode


Many thanks; will study this.


Unfortunately - as pointed out on the wiki - modes cannot be nested.

:

Why would you need that?

:

Can you give an example for a use case?

:
That looks to me like flawed logic – why should content for the  
unabridged version appear within the abridged version?


TeX comments will illustrate:

==
This text goes into the abridged version.

% This text will appear in the unabridged version.

And this text goes into the abridged version.

% And this text goes into the unabridged version.

And this additional text goes into the abridged version.

% And this additional text goes into the unabridged version.
==

An abridged run will ignore the commented text, and an unabridged run will  
include it.


Consider variant texts:

===
Here is some text that
   contains % mode=variantone
   includes % mode=varianttwo
   is comprised of % mode=variantthree
some variants.

Here is some more text that
   features % mode=variantone
   exhibits % mode=varianttwo
   illustrates % mode=variantthree
some variants.
===

This example is to be processed to produce exactly three distinct results.  
So, e.g., "contains" and "features" belong to variantone. Etc. So like XML.


It might be a bit annoying, but you could end the previous mode before  
starting the next.


Assuming that I'm not misunderstanding you: For a book-length project,  
that would be beyond annoying.



And, as mentioned above, you can use \startmode with lists.


Will try it. Thank you again!

Best wishes
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] Can modes be used for content control?

2021-11-16 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context

Hi Aditya,

Many thanks; see below:

On Tue, 16 Nov 2021 17:23:59 -0700, Aditya Mahajan via ntg-context  
 wrote:


On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد via ntg-context  
wrote:



Dear gang,

For creating/authoring content in ConTeXt: Can modes or the like be used
for content control? For example, someone wants to write at least two
versions of a book managed from a single file. So, e.g., we may have

a) abridged content
b) unabridged content - includes a)
c) abridged content + translation
d) unabridged content + translation
[:]

One can author and organize this in XML - pre-ConteXt - but perhaps one
prefers to write in ConTeXt (take advantage of shortcuts etc.). So maybe

\defineparagraphs[unabridged]
\defineparagraphs[abridged]
\defineparagraphs[translation]

Then one authors the complete work in a single project, but you can
produce a variety of versions, depending on the mode chosen:

\definemode[unabridged]
etc.

Can one do this in context?


Yes!

This is what I do (for solutions in homework assignments):

\definebuffer[solution][local=yes,nested=yes]

\startmode[solution]
\defineenumeration[solution][fancy setup...]
\stopmode

Then, in the main tex file:


\startsolution
...
\stopsolution


By default, gives the version without solution. Compile with  
--mode=solution to get the version with solution. The same thing should  
work in your case by defining two modes: unabridged and translation. And  
then use --mode=unabridged,translate etc to get multiple modes.


Here's a working sample:

===
% \definebuffer[unabridged]
% \definebuffer[abridged]

\setupwhitespace[big]

\starttext
\startmode[unabridged]
\input knuth

\startblockquote
\input ward
\stopblockquote

% \startmode[abridged]
% \input knuth
% \stopmode
\stopmode

\startmode[abridged]
\input knuth
\stopmode

% \startmode[abridged]
% \input zapf
% \stopmode
\stoptext
===

Unfortunately - as pointed out on the wiki - modes cannot be nested.

Furthermore, each mode is unique and there is apparently no  
inheritance/continuance.


So using this method appears to be quite unwieldy for book-length  
projects. What is needed is something like this


\startmode[abridged]
\input knuth

\startmode[unabridged]
\startblockquote
\input ward
\stopblockquote
\stopmode

\input zapf
\stopmode

That is not supported, so need to find another method - assuming there  
even is one. Otherwise will have to consider XML authoring and process the  
selected tags in ConTeXt..


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


[NTG-context] Can modes be used for content control?

2021-11-16 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context

Dear gang,

For creating/authoring content in ConTeXt: Can modes or the like be used  
for content control? For example, someone wants to write at least two  
versions of a book managed from a single file. So, e.g., we may have


a) abridged content
b) unabridged content - includes a)
c) abridged content + translation
d) unabridged content + translation
[:]

One can author and organize this in XML - pre-ConteXt - but perhaps one  
prefers to write in ConTeXt (take advantage of shortcuts etc.). So maybe


\defineparagraphs[unabridged]
\defineparagraphs[abridged]
\defineparagraphs[translation]

Then one authors the complete work in a single project, but you can  
produce a variety of versions, depending on the mode chosen:


\definemode[unabridged]
etc.

Can one do this in context? If so, does anyone have some working example  
of how to do it? Might even be worth a MyWay if not too unwieldy.. Thank  
you in advance!


Best wishes
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] LMTX error processing Adobe Arabic Naskh font

2021-11-13 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context
Problems I and II are apparently solved in the latest update. As for III,  
the following works:


\definefont[ARABICFONT][file:almfixed.otf*arabic at 28pt]

\noheaderandfooterlines
\setupwhitespace[big]

% \starttext
\startTEXpage[offset=1ex]
% \setupdirections[bidi=global,method=one]
\righttoleft
% \setupalign[r2l]
% \dontleavehmode \setupalign[r2l]
\ARABICFONT

\utfchar{"062E}\utfchar{"064E}\utfchar{"200D}
\stopTEXpage
% \stoptext

As Hans explained off-list, TEXpage interacts with hmode and vmode in ways  
that may appear unpredictable in some circumstances. In this case the  
circumstance is


% \setupdirections[bidi=global,method=one]

Uncommenting this line will bring the bidi issue back, but it's not needed  
for the desired result.


Best wishes
Idris

On Wed, 10 Nov 2021 09:00:26 -0700, Idris Samawi Hamid ادريس سماوي حامد  
via ntg-context  wrote:



Dear Hans and gang,

Consider the following MWE:

==
\definefont[ARABICFONT][file:Adobe_Naskh.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Amiri-Regular_0.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Scheherazade-Regular.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:UthmanTN1_Ver10.otf*arabic at 28pt]
% \definefont[ARABICFONT][file:almfixed.otf*arabic at 28pt]

\disabledirectives[filters.utf.reorder]
\noheaderandfooterlines

\setupwhitespace[big]
% \setupinterlinespace[line=4.2ex]

\starttext
% \startTEXpage[offset=1ex]
\setupdirections[bidi=global,method=one]
\righttoleft
\ARABICFONT

خَ‍ % a

خَل

% \stopTEXpage
\stoptext
==

Three bugs:

I. If we use start|stoptex and comment start|stopTeXpage, then both  
lines 19 and 21 give an error:


===
tex error   > tex error on line 20 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to  
index a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string  
"local tonut  = nodes.tonut..."]:12>

(...tail calls...)  

10 \setupwhitespace[big]
11 % \setupinterlinespace[line=4.2ex]
12
13 \starttext
14 % \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍
20 >>
21 خَل
22
23 % \stopTEXpage
24 \stoptext
===

Comment line 19 and yu will get virtually the same error.

II. Using start|stopTeXpage, only line 21 gives the error:

===
tex error   > tex error on line 22 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to  
index a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string  
"local tonut  = nodes.tonut..."]:12>

(...tail calls...)  

12
13 % \starttext
14 \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍ % a
20
21 خَل
22 >>
23 \stopTEXpage
24 % \stoptext
===

III Let us switch to almfixed:

If you comment line 21 and use only line 19, then there is no tex error,  
but the result is rendered incorrectly - see test-broken.pdf.


For the correct result, see test-correct.pdf (add a space and any letter  
- uncomment the end of line 19).


Adobe Naskh is not publicly available. The four commented fonts are  
publicly available and generate no tex errors.


Best wishes
Idri

Re: [NTG-context] LMTX error processing Adobe Arabic Naskh font

2021-11-10 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context

For III: See attached!

On Wed, 10 Nov 2021 09:00:26 -0700, Idris Samawi Hamid ادريس سماوي حامد  
 wrote:



Dear Hans and gang,

Consider the following MWE:

==
\definefont[ARABICFONT][file:Adobe_Naskh.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Amiri-Regular_0.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Scheherazade-Regular.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:UthmanTN1_Ver10.otf*arabic at 28pt]
% \definefont[ARABICFONT][file:almfixed.otf*arabic at 28pt]

\disabledirectives[filters.utf.reorder]
\noheaderandfooterlines

\setupwhitespace[big]
% \setupinterlinespace[line=4.2ex]

\starttext
% \startTEXpage[offset=1ex]
\setupdirections[bidi=global,method=one]
\righttoleft
\ARABICFONT

خَ‍ % a

خَل

% \stopTEXpage
\stoptext
==

Three bugs:

I. If we use start|stoptex and comment start|stopTeXpage, then both  
lines 19 and 21 give an error:


===
tex error   > tex error on line 20 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to  
index a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string  
"local tonut  = nodes.tonut..."]:12>

(...tail calls...)  

10 \setupwhitespace[big]
11 % \setupinterlinespace[line=4.2ex]
12
13 \starttext
14 % \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍
20 >>
21 خَل
22
23 % \stopTEXpage
24 \stoptext
===

Comment line 19 and yu will get virtually the same error.

II. Using start|stopTeXpage, only line 21 gives the error:

===
tex error   > tex error on line 22 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to  
index a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string  
"local tonut  = nodes.tonut..."]:12>

(...tail calls...)  

12
13 % \starttext
14 \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍ % a
20
21 خَل
22 >>
23 \stopTEXpage
24 % \stoptext
===

III Let us switch to almfixed:

If you comment line 21 and use only line 19, then there is no tex error,  
but the result is rendered incorrectly - see test-broken.pdf.


For the correct result, see test-correct.pdf (add a space and any letter  
- uncomment the end of line 19).


Adobe Naskh is not publicly available. The four commented fonts are  
publicly available and generate no tex errors.


Best wishes
Idris



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

test-broken.pdf
Description: Adobe PDF document


test-correct.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
___


[NTG-context] LMTX error processing Adobe Arabic Naskh font

2021-11-10 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context

Dear Hans and gang,

Consider the following MWE:

==
\definefont[ARABICFONT][file:Adobe_Naskh.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Amiri-Regular_0.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:Scheherazade-Regular.ttf*arabic at 28pt]
% \definefont[ARABICFONT][file:UthmanTN1_Ver10.otf*arabic at 28pt]
% \definefont[ARABICFONT][file:almfixed.otf*arabic at 28pt]

\disabledirectives[filters.utf.reorder]
\noheaderandfooterlines

\setupwhitespace[big]
% \setupinterlinespace[line=4.2ex]

\starttext
% \startTEXpage[offset=1ex]
\setupdirections[bidi=global,method=one]
\righttoleft
\ARABICFONT

خَ‍ % a

خَل

% \stopTEXpage
\stoptext
==

Three bugs:

I. If we use start|stoptex and comment start|stopTeXpage, then both lines  
19 and 21 give an error:


===
tex error   > tex error on line 20 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to index  
a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string "local  
tonut  = nodes.tonut..."]:12>

(...tail calls...)  

10 \setupwhitespace[big]
11 % \setupinterlinespace[line=4.2ex]
12
13 \starttext
14 % \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍
20 >>
21 خَل
22
23 % \stopTEXpage
24 \stoptext
===

Comment line 19 and yu will get virtually the same error.

II. Using start|stopTeXpage, only line 21 gives the error:

===
tex error   > tex error on line 22 in file ./test.tex:

lua error:

	callback error: [string  
"C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: attempt to index  
a number value (local 'chainstep')

stack traceback:
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2058: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
function <[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2514>

(...tail calls...)
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2065: in  
upvalue 'chainrun'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:2941: in  
local 'handler'
	[string "C:/ConTeXt/tex/texmf-context/tex/context/base..."]:3999: in  
field '?'
	...eXt/tex/texmf-context/tex/context/base/mkxl/node-fnt.lmt:459: in  
upvalue 'nodes_handlers_characters'
	[string "local tonut  = nodes.tonut..."]:23: in function <[string "local  
tonut  = nodes.tonut..."]:12>

(...tail calls...)  

12
13 % \starttext
14 \startTEXpage[offset=1ex]
15 \setupdirections[bidi=global,method=one]
16 \righttoleft
17 \ARABICFONT
18
19 خَ‍ % a
20
21 خَل
22 >>
23 \stopTEXpage
24 % \stoptext
===

III Let us switch to almfixed:

If you comment line 21 and use only line 19, then there is no tex error,  
but the result is rendered incorrectly - see test-broken.pdf.


For the correct result, see test-correct.pdf (add a space and any letter -  
uncomment the end of line 19).


Adobe Naskh is not publicly available. The four commented fonts are  
publicly available and generate no tex errors.


Best wishes
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] Converting footnotes to endnotes

2021-06-05 Thread Idris Samawi Hamid ادريس سماوي حامد

On Fri, 04 Jun 2021 12:06:31 -0600, Hans Hagen  wrote:


On 6/3/2021 10:09 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,
 Generally, I do not use endnotes - see Robert Bringhurst's criticisms  
of endnotes in typography - but a publisher is demanding them.  
Converting footnotes to endnotes must be quite simple yet I'm missing  
it:
Ah ... those publishers ... so you still need their demands? They should  
be glad that they get ready typeset books (I bet they often don't do a  
better job themselves, maybe aven introduce errors in the complex things  
you do).


The main publishers are constituted by a multiplicity of bureaucracies  
where the left hand hardly knows what the right hand is doing. No amount  
of reasoning can get through to these people. And if you're working with  
an intermediate editor of a book, the situation is beyond hopeless.



I thought they keyed it into word eventually anyway.


Yep. Luigi and I spent considerable time on a ConTeXt => Word workflow,  
but what was so far accomplished is not sufficiently general; it needs  
more work before it is useful enough to be released.


Unfortunately, not even ConTeXt'ers have expressed much interest,  
otherwise would suggest releasing it as a community project..


So I'm caught between academia (Word or, occasionally, LaTeX) and my  
strong preference for and investment in ConTeXt..


End notes are definitely handier when they outsource I guess. Does that  
mean no more critical editions?


Critical editions with apparatus converted to endnotes? Never!

I admit that I do like endnotes more than footnotes when they for  
instance contain some more about the origin of some idea (or so) and  
suggest further reading ... (1) then i can read them all in one go (if I  
want) and (2) it's kind of a test if one can remember what it points  
back to.


Hm, this would make for an interesting discussion. I suppose if a set of  
endnotes (to a chapter, say, or a book) are written in a manner such that,  
in the spirit of your 1) they form a single whole, then sure, why not? But  
if that's the case, I would probably prefer an explicit, structured  
appendix to endnotes.


As for your 2), have always found going back or forth annoying - which  
takes me back to Bringhurst's rule..


--
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] Converting footnotes to endnotes

2021-06-03 Thread Idris Samawi Hamid ادريس سماوي حامد
On Thu, 03 Jun 2021 14:17:15 -0600, Wolfgang Schuster  
 wrote:



\setupnote
  [footnote]
  [location=none]


That did the trick; many thanks!

==
\setupnote
  [footnote]
  [location=none]

\starttext
\startsection[title={},reference={}]
\input ward
\startfootnote
\input ward
\stopfootnote{}
\input ward
\startfootnote
\input ward
\stopfootnote{}
\stopsection

\startsection[title={},reference={}]
\input ward
\startfootnote
\input ward
\stopfootnote{}
\input ward
\startfootnote
\input ward
\stopfootnote{}
\stopsection

\startsubject[title={},reference={}]
\placenotes [footnote]
\stopsubject
\stoptext
==

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


[NTG-context] Converting footnotes to endnotes

2021-06-03 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Generally, I do not use endnotes - see Robert Bringhurst's criticisms of  
endnotes in typography - but a publisher is demanding them. Converting  
footnotes to endnotes must be quite simple yet I'm missing it:


\setupnotation[footnote]
[way=bychapter]

% \setupnote[footnote]
% [way=bychapter]

\starttext
\startsection[title={},reference={}]
\input ward
\startfootnote
\input ward
\stopfootnote{}
\input ward
\startfootnote
\input ward
\stopfootnote{}
\stopsection

\startsection[title={},reference={}]
\input ward
\startfootnote
\input ward
\stopfootnote{}
\input ward
\startfootnote
\input ward
\stopfootnote{}
\stopsection

\startsubject[title={},reference={}]
\placenotes [footnote]
\stopsubject
\stoptext

What's the best way to convert the above to endnotes? Thank you in advance!

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


[NTG-context] What is the ConTeXt way to handle this \vbox trick?

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

Dear gang,

Consider the following MWE (for a sequential multiple-choice exam), using  
some old and ugly TeX code:


===
\setupbodyfont[schola]
\noheaderandfooterlines
\setupwhitespace[big]

\def\CHOICE#1#2{\leavevmode\vbox{\tabskip=0pt\everycr={}
\halign{\strut\hfil##\hfil\cr#1\cr#2\cr}}}

\starttext
(Religion * Biology * Cosmology * Physics) is part of the subject matter  
of World Philosophies.


(Religion * Biology * Cosmology * Physics) is part of the subject matter  
of World Philosophies.


(\CHOICE{1}{Religion}\ * \CHOICE{X}{Biology} *
\CHOICE{2}{Cosmology}\ * \CHOICE{X}{Physics}) is part of the subject  
matter of World Philosophies.

\stoptext
===

Result is attached. Question:

What is the most elegant ConTeXt way to get the same result as the above  
code, with equal or better control? Thank you in advance.


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

choice-mwe.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] future versions

2018-07-24 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Hans, all,

On Tue, 24 Jul 2018 12:43:51 -0600, Hans Hagen  wrote:


Hi,

Around the upcoming context meeting we expect to release luatex 1.09 (or  
1.10 ... yet undecided) which is the prelude to the next year tex live  
version. It's another step towards a stable version in terms of  
functionality as we don't expect much more to be added (in fact, I'm  
wondering if it makes sense to come up with a leaner and meaner version  
at some point because context can probably benefit from that). Of course  
under the hood there are improvements possible and we have some ideas  
(that might materialize at some point) but generally spoken, this is  
what one gets.


That said, a logical question is how about next versions of context. Are  
there fundamental features missing? Is more needed? Keep in mind that  
we're not talking of desk top publishing (click and point and place  
stuff) and also not of word processing (office like stuff) but of mostly  
automated structured document rendering. Also, keep in mind the  
landscape that we operate in (context development is mostly user driven  
as publishers imo long ago lost interest in any research and development  
and the potential of tex and friends is largely unknown elsewhere).


It's not my intention to implement each possible feature as core feature  
(no one would document it anyway). Also, as development is basically a  
spare time effort, don't expect complex commercially interesting niches  
to come for free either as in that case one can wait till I a find a  
reason for implementing it for fun or development is driven by a project.


When thinking of future additions, tex, lua, metapost of a mix is  
possible. They should be of interest for more than one user. Of course  
it can also be that everything needed is there. Maybe existing  
mechanisms can be improved in terms of functionality or performance  
(although i think that performance wise we're ok). But again keep in  
mind that the boundary conditions (all these interacting sub mechanisms)  
also prohibit some functionality.


One needed feature that would be of general use is better support for  
synctex. Thinking especially of structural elements such as headings,  
footnotes, etc. which mostly do not work with synctex - i.e., clicking on  
these elements in the pdf do not take one back to the correct location in  
the relevant TEX file.


Best wishes
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] The best command for parallel texts

2018-07-03 Thread Idris Samawi Hamid ادريس سماوي حامد
On Tue, 03 Jul 2018 15:30:18 -0600, Idris Samawi Hamid ادريس سماوي حامد  
 wrote:



Hi Martin, Wolfgang,

On Mon, 02 Jul 2018 14:41:31 -0600, Wolfgang Schuster  
 wrote:



Martin Hasoň <mailto:martin.ha...@gmail.com>
1. Juli 2018 um 12:18
Hi all,

I need to type parallel text on double columns. I've tried paragraphs,
tabulate, table and column environments.The best result of these
options gives the tabulate.Unfortunately, it does not respect
alignment - many \hbox errors in all environments except columns
:(.What should I use and set up?


None of the table environments use the global alignment settings and
you have to set them again to get better results for the content.


Martin, have you tried streams?

http://wiki.contextgarden.net/Columns#Streams

Under the examples you will find an example of a columnar, aligned  
streams setup - by Wolfgang.


Ok, needed a break from work, so for fun and for learning something new:

==
\setuppapersize[A4][A4]
\defineparagraphs[TwoLang][n=2]
\setuptabulate[split=yes]
\setupalign[verytolerant,stretch]

\starttext
\showframe

\startoutputstream[one]
   \setupalign[flushleft]
   \framedtext[width=17.4em,align=verytolerant,stretch,frame=on,offset=overlay]
   {\input lorem }
   \hfill
   \par
\stopoutputstream

\startoutputstream[two]
   \setupalign[flushright]
   \hfill
   \framedtext[width=17.4em,align=verytolerant,stretch,frame=on,offset=overlay]
   {\input davis }
   \par
\stopoutputstream

\synchronizestreams[one,two]

\startoverlay
   {\raise2\strutdp\outputstreambox[one]}
   {\raise0\strutdp\outputstreambox[two]}
\stopoverlay
\startTwoLang
\input lorem
\nextTwoLang
\input davis
\stopTwoLang

\starttabulate[|p|p|]
\NC\input lorem
\NC\input davis
\NC\NR
\stoptabulate

\bTABLE[frame=off,align=yes,split=yes]
\bTR
\bTD[roffset=2mm]\input lorem\eTD
\bTD[loffset=2mm]\input davis\eTD
\eTR
\eTABLE

\startcolumns[n=2]
\input lorem
\column
\input davis
\stopcolumns

\stoptext
==

The \raise2\strutdp etc. feels like a hack, Wolfgang knows better why it's  
needed, as as how and why the value for one stream affects the other..


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

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX 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] The best command for parallel texts

2018-07-03 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Martin, Wolfgang,

On Mon, 02 Jul 2018 14:41:31 -0600, Wolfgang Schuster  
 wrote:



Martin Hasoň 
1. Juli 2018 um 12:18
Hi all,

I need to type parallel text on double columns. I've tried paragraphs,
tabulate, table and column environments.The best result of these
options gives the tabulate.Unfortunately, it does not respect
alignment - many \hbox errors in all environments except columns
:(.What should I use and set up?


None of the table environments use the global alignment settings and
you have to set them again to get better results for the content.


Martin, have you tried streams?

http://wiki.contextgarden.net/Columns#Streams

Under the examples you will find an example of a columnar, aligned streams  
setup - by Wolfgang.


Best wishes
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] Referencing footnotes by SECTION

2018-07-02 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 02 Jul 2018 07:21:19 -0600, Wolfgang Schuster  
 wrote:



Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
2. Juli 2018 um 14:34
Hi Wolfgang,

On Mon, 02 Jul 2018 00:58:44 -0600, Wolfgang Schuster
 wrote:


Hi Idris,

you can enable the display of chapter numbers with the prefix-key:

\setupnotation
   [footnote]
   [prefix=yes,
   %prefixsegments=chapter,
way=bychapter]


Many thanks for this. There is an unwanted side-effect: Let

marker= main-text footnote marker
header= numeral for footnote header
reference = reference numeral

The prefix appears in three places, e.g.,

marker- II.1
header- II.1
reference - II.1

but we only want the prefix in the reference, not anywhere else, e.g.,

marker- 1
header- 1
reference - II.1

The prefix in the main-text marker and in the footnote header are
superfluous, e.g., the reader already knows which chapter one is
reading. But to reference a footnote from a later chapter, a prefix is
needed to let the reader know which chapter.

So the question is: Can the prefix be made to apply only to the
reference and not the marker or notation header?


You have to set different prefixsegments settings for the note entries
and the references.


\defineconversionset [OLIE] [n,R,n,n,n,n] [n]

\setuphead
   [sectionconversionset=OLIE]

\setupnotation
   [footnote]
   [prefix=yes,
prefixset=none]

\setupreferencestructureprefix
   [footnote]
   [default]
   [prefixsegments=chapter,
prefixset=all]

\starttext

\chapter{Chapter}

Hey\footnote[listen]{This is a footnote.}

See \in{footnote}[listen].

\stoptext


Excellent; this is a big help. Many thanks!


==
Observation:

For endnotes at the end of a book having the prefix in the header is
also useful, i.e.,

marker- 1
header- II.1
reference - II.1

So a general mechanism to set the prefix for each of the above three
would be useful.

If not currently supported, would like to make this a feature request.
==


I don’t think this is possible because marker and header share the same
counter setups.


Ok, that makes sense. As always, thank you for your pointers and  
explanations!


Best wishes
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] \setupreferencestructureprefix and numberconversionset

2018-07-02 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Wolfgang,

On Mon, 02 Jul 2018 01:08:23 -0600, Wolfgang Schuster  
 wrote:



Hi Idris,

you get the correct reference numbers when you apply the conversion of
the section numbers
with the sectionconversionset-key, this does also mean you have to
remove “conversion=R”
from chapter setup.

==
\defineconversionset [OLIE] [n,R,n,n,n,n] [n]

\setuphead[sectionconversionset=OLIE]
==


Amazing and elegant. Many thanks!

Best wishes
Idris


Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
30. Juni 2018 um 22:42
Dear gang,

Chapter numbers are indicated roman numerals (conversion=R), all
subsectioning by decimal numerals. See attached and below:

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

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]

% \setupreferencestructureprefix [chapter] [default]
   % [prefixstopper=\zerowidthspace,
% numberconversionset=OLIE]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsubsection[title={},reference={reference4}]
\input ward
\stopsubsubsection
\startsubsection[title={},reference={reference5}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

So, e.g., Chapter II, Subsection 1, Subsubsection 1

In the references we get

2.1.1

But what we want is

II.1.1

Adding the following to the preamble doesn't appear to work:

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]
What am I missing? Thanks in advance for any guidance.

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
___





--
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] Referencing footnotes by SECTION

2018-07-02 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Wolfgang,

On Mon, 02 Jul 2018 00:58:44 -0600, Wolfgang Schuster  
 wrote:



Hi Idris,

you can enable the display of chapter numbers with the prefix-key:

\setupnotation
   [footnote]
   [prefix=yes,
   %prefixsegments=chapter,
way=bychapter]


Many thanks for this. There is an unwanted side-effect: Let

marker= main-text footnote marker
header= numeral for footnote header
reference = reference numeral

The prefix appears in three places, e.g.,

marker- II.1
header- II.1
reference - II.1

but we only want the prefix in the reference, not anywhere else, e.g.,

marker- 1
header- 1
reference - II.1

The prefix in the main-text marker and in the footnote header are  
superfluous, e.g., the reader already knows which chapter one is reading.  
But to reference a footnote from a later chapter, a prefix is needed to  
let the reader know which chapter.


So the question is: Can the prefix be made to apply only to the reference  
and not the marker or notation header?


==
Observation:

For endnotes at the end of a book having the prefix in the header is also  
useful, i.e.,


marker- 1
header- II.1
reference - II.1

So a general mechanism to set the prefix for each of the above three would  
be useful.


If not currently supported, would like to make this a feature request.
==

Thank you again, Wolfgang.

Best wishes
Idris


Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
30. Juni 2018 um 23:04
Dear gang,

When referencing footnotes that reset each chapter, is there a way to
include the chapter information? See attached and below:

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

\setupnotation[footnote][way=bychapter]

\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward
\startfootnote[footnote1]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote2].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference5}]
\input ward
\startfootnote[footnote2]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote1].
\stopsubsection
\stopchapter
\stoptext
===

If line 8 is commented -
\setupnotation[footnote][way=bychapter]
- we get what we expect. But if line 8 is activated, we get an
ambiguity: Both references give back

 "Footnote 1"

Whereas what we would like is something like this:

 Footnote  I.1

i.e., Chapter I, Footnote 1 - for the first footnote; and

 Footnote II.1

i.e., Chapter II, Footnote 1 - for the second footnote.

Is there a straightforward way to do this?

[[Of course, for the roman chapter numbering we also run into the
reference-numberconversionset issue of the other thread, where

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]

doesn't seem to work.]]

Thank you in advance for any guidance or pointers you can provide!

Best wishes
Idris





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

reference-footnotes.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] Referencing footnotes by SECTION

2018-06-30 Thread Idris Samawi Hamid ادريس سماوي حامد

Attached!

On Sat, 30 Jun 2018 15:04:02 -0600, Idris Samawi Hamid ادريس سماوي حامد  
 wrote:



Dear gang,

When referencing footnotes that reset each chapter, is there a way to  
include the chapter information? See attached and below:


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

\setupnotation[footnote][way=bychapter]

\setupreferencestructureprefix [section] [default]
[prefixstopper=\zerowidthspace]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward
\startfootnote[footnote1]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote2].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference5}]
\input ward
\startfootnote[footnote2]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote1].
\stopsubsection
\stopchapter
\stoptext
===

If line 8 is commented -
\setupnotation[footnote][way=bychapter]
- we get what we expect. But if line 8 is activated, we get an  
ambiguity: Both references give back


  "Footnote 1"

Whereas what we would like is something like this:

  Footnote  I.1

i.e., Chapter I, Footnote 1 - for the first footnote; and

  Footnote II.1

i.e., Chapter II, Footnote 1 - for the second footnote.

Is there a straightforward way to do this?

[[Of course, for the roman chapter numbering we also run into the  
reference-numberconversionset issue of the other thread, where


\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
[prefixstopper=\zerowidthspace,
 numberconversionset=OLIE]

doesn't seem to work.]]

Thank you in advance for any guidance or pointers you can provide!

Best wishes
Idris



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

scratch.tex
Description: TeX document


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

[NTG-context] Referencing footnotes by SECTION

2018-06-30 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

When referencing footnotes that reset each chapter, is there a way to  
include the chapter information? See attached and below:


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

\setupnotation[footnote][way=bychapter]

\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward
\startfootnote[footnote1]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote2].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference5}]
\input ward
\startfootnote[footnote2]
\input ward
\stopfootnote{}

See \in{Footnote}[footnote1].
\stopsubsection
\stopchapter
\stoptext
===

If line 8 is commented -
\setupnotation[footnote][way=bychapter]
- we get what we expect. But if line 8 is activated, we get an ambiguity:  
Both references give back


 "Footnote 1"

Whereas what we would like is something like this:

 Footnote  I.1

i.e., Chapter I, Footnote 1 - for the first footnote; and

 Footnote II.1

i.e., Chapter II, Footnote 1 - for the second footnote.

Is there a straightforward way to do this?

[[Of course, for the roman chapter numbering we also run into the  
reference-numberconversionset issue of the other thread, where


\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]

doesn't seem to work.]]

Thank you in advance for any guidance or pointers you can provide!

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

[NTG-context] \setupreferencestructureprefix and numberconversionset

2018-06-30 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Chapter numbers are indicated roman numerals (conversion=R), all  
subsectioning by decimal numerals. See attached and below:


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

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]

% \setupreferencestructureprefix [chapter] [default]
   % [prefixstopper=\zerowidthspace,
% numberconversionset=OLIE]

\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsubsection[title={},reference={reference4}]
\input ward
\stopsubsubsection
\startsubsection[title={},reference={reference5}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

So, e.g., Chapter II, Subsection 1, Subsubsection 1

In the references we get

2.1.1

But what we want is

II.1.1

Adding the following to the preamble doesn't appear to work:

\definestructureconversionset[OLIE][n,R,n,n,n,n][n]
\setupreferencestructureprefix [section] [default]
   [prefixstopper=\zerowidthspace,
numberconversionset=OLIE]
What am I missing? Thanks in advance for any guidance.

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

scratch.tex
Description: TeX document


scratch.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] referencing and stoppers

2018-06-30 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 30 Jun 2018 04:20:57 -0600, Wolfgang Schuster  
 wrote:



You can use the \setupreferencestructureprefix command set a different
value for
the stopper but you have to ensure the key takes a value because a empty
argument is ignored. Instead of the argument I used in my example
(\symbol[none])
you can also use a unicode character without width, e.g. \zerowidthspace.


\setupreferencestructureprefix [section] [default]
[prefixstopper={\symbol[none]}]
%\setupreferencestructureprefix [section] [default]
[prefixstopper=\zerowidthspace]

   1. Argument: section name -> section == \section / \startsection
   2. Argument: reference type -> default == \in
   3. Argument: settings which differ from \setuphead


Many thanks, this is exactly what was needed!

Your replies and pointers are appreciated and not taken for granted.

Best wishes
Idris


Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
29. Juni 2018 um 16:22
Dear gang,

For, e.g., \setuphead[...][alternative=text], one often wants the
stopper to appear in the main text sectioning but not in the
references to those sections. For example (attached and below):

===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]
\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference4}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

See Sections 2.1. and Section 2.2..
See Sections 1.1. and Section 1.2..

SHOULD BE

See Sections 2.1 and Section 2.2.
See Sections 1.1 and Section 1.2.

Is there a straightforward way to remove the stopper from the \in
reference while maintaining it in the main sectioning but removing it
in the referencing?

If there is no straightforward way, what is the best workaround?

As mentioned at the outset, this is not an uncommon scenario. If there
is no straightforward way, would like to make it a feature request.

Thank you in advance for your help.

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
___





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

[NTG-context] referencing and stoppers

2018-06-29 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

For, e.g., \setuphead[...][alternative=text], one often wants the stopper  
to appear in the main text sectioning but not in the references to those  
sections. For example (attached and below):


===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
   textdistance=0.7em,
   sectionstopper=.,
   criterium=local]
\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference4}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
===

See Sections 2.1. and Section 2.2..
See Sections 1.1. and Section 1.2..

SHOULD BE

See Sections 2.1 and Section 2.2.
See Sections 1.1 and Section 1.2.

Is there a straightforward way to remove the stopper from the \in  
reference while maintaining it in the main sectioning but removing it in  
the referencing?


If there is no straightforward way, what is the best workaround?

As mentioned at the outset, this is not an uncommon scenario. If there is  
no straightforward way, would like to make it a feature request.


Thank you in advance for your help.

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

section-space-text.pdf
Description: Adobe PDF document


section-space-text.tex
Description: TeX 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] bidi in footnotes

2018-06-27 Thread Idris Samawi Hamid ادريس سماوي حامد
On Wed, 27 Jun 2018 02:03:32 -0600, Wolfgang Schuster  
 wrote:





Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
23. Juni 2018 um 23:49
On Sat, 23 Jun 2018 07:10:27 -0600, Wolfgang Schuster
 wrote:


When you use the global whitespace settings in footnotes you get the
same space between each footnote entry. What can be done is to add a
whitespace key to setupnote which is easier than using
setups-environment.


Could this be a feature request then? So

\setupnote[whitespace=big,bidi=on]

I forgot that you can set the whitespace also with the style-key from
\setupnotation.

\setupnotation[footnote][style={\setupwhitespace[line]}]

\starttext
\input ward\footnote{\input{knuth}}
\stoptext


Many thanks. Although bidi is not technically a "style" option, and one  
may be accused of mixing apples and oranges here, decided to test - see  
attached and below:


===
\setupdirections[bidi=global]
\setupwhitespace[big]
\setupnotation[footnote][style={\setupwhitespace[big],\setupdirections[bidi=global]}]

\starttext
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test \par Test امتحان test
\startfootnote
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test \par Test امتحان test
\stopfootnote{}
\stoptext
===

Why does bidi=global get applied to the second paragraph of the footnote,  
but not to the first?


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

scratch.tex
Description: TeX document


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

2018-06-25 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 25 Jun 2018 13:17:40 -0600, Wolfgang Schuster  
 wrote:





Idris Samawi Hamid ادريس سماوي حامد schrieb:

\setuphead[chapter]   [conversion=R]

\setuplist[chapter][width=2.8em]

\definecombinedlist
[content]
[chapter]
[level=chapter,
alternative=c,
numberalign=flushright]


Use \setuplist to change the numeralign setting, you need also a
distance value.

\setuplist
   [chapter]
   [alternative=c,
width=2.8em,
distance=1em,
numberalign=flushright]


Many thanks. Had come up with this awkward workaround:

\define[1]\FLUSHRIGHT{\hfill#1\hbox to0.7em{}}

\setuplist[chapter][width=2.8em]
\setuplist[chapter][stopper=.,numbercommand=\FLUSHRIGHT]

Does the attached tex file look correct?

\setuplist
  [chapter]
  [alternative=c,
   width=1.85em,
   distance=0.5em,
   numberalign=flushright,
   level=chapter]

\definecombinedlist
[content]
[chapter]

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.. -)



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]

Many thanks.

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

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX 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] space sectioning control

2018-06-25 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 25 Jun 2018 07:20:43 -0600, 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


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

[NTG-context] Align TOC section numbers flushright

2018-06-25 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Trying to get the sectioning numerals in the left margin of the TOC to be
fushright; by default they are flushleft; see attached and below:

===
\setuphead[chapter]   [conversion=R]

\setuplist[chapter][width=2.8em]

\definecombinedlist
[content]
[chapter]
[level=chapter,
alternative=c,
numberalign=flushright]

\starttext
\placecontent[conversion=R]
\startchapter[title={First},reference={}]   \input ward \stopchapter
\startchapter[title={Second},reference={}]  \input ward \stopchapter
\startchapter[title={Third},reference={}]   \input ward \stopchapter
\startchapter[title={Fourth},reference={}]  \input ward \stopchapter
\startchapter[title={Fifth},reference={}]   \input ward \stopchapter
\startchapter[title={Sixth},reference={}]   \input ward \stopchapter
\startchapter[title={Seventh},reference={}] \input ward \stopchapter
\startchapter[title={Eighth},reference={}]  \input ward \stopchapter
\stoptext
===

numberalign=flushright would seem to be the governing keyword+value, but
that has no effect here.

For the form of the desired result, see toc-margin_numerals-MURE.pdf:

https://www.dropbox.com/s/j0etnkt54zji6h5/toc-margin_numerals-MURE.pdf?dl=0

(note the stopper after each margin numeral!). Thank you in
advance.

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

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX 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] space sectioning control

2018-06-25 Thread Idris Samawi Hamid ادريس سماوي حامد
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 ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
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.


--
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] Table of Contents sectioning numbers in margin + oddity

2018-06-25 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 25 Jun 2018 01:10:18 -0600, Wolfgang Schuster  
 wrote:





Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
25. Juni 2018 um 01:17
On Sun, 24 Jun 2018 17:09:02 -0600, Wolfgang Schuster
 wrote:


2. Oddity: Why does the TOC in the attached example default to a
monospaced font?



You put \placecontent before \starttext but the default fonts are
loaded after \starttext.
When you now put text in a box before \starttext a monospaced font is
loaded as replacement for the missing text font.


Ah, new protocol... many thanks.


Putting \placecontent or any other text creating command before
\starttext was always wrong.


Of course, was referring to the use of fixed-width for default font in  
such an event.. -)


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
___

[NTG-context] space sectioning control

2018-06-24 Thread Idris Samawi Hamid ادريس سماوي حامد

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
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

scratch.tex
Description: TeX document


scratch.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] Table of Contents sectioning numbers in margin + oddity

2018-06-24 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 24 Jun 2018 17:09:02 -0600, Wolfgang Schuster  
 wrote:


2. Oddity: Why does the TOC in the attached example default to a  
monospaced font?


You put \placecontent before \starttext but the default fonts are loaded  
after \starttext.
When you now put text in a box before \starttext a monospaced font is  
loaded as replacement for the missing text font.


Ah, new protocol... 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
___

[NTG-context] Table of Contents sectioning numbers in margin + oddity

2018-06-24 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

mtx-context | current version: 2018.06.24 18:28

In the attached and below, we want sectioning numbers placed and naturally  
aligned in the margin:


===
\definecombinedlist % \setuplist[]
[content]
[section]
[level=section,
alternative=c,
criterium=local]

\setuphead[section][alternative=inmargin]
\setupitemize[1][inmargin][stopper=]

\placecontent

\starttext
\startsection[title= First]
\input ward
\stopsection
\startsection[title= Second]
\startitemize[r]
\startitem[] \input ward \stopitem
\startitem[] \input ward \stopitem
\stopitemize
\stopsection
\stoptext
===

1. What is the most straightforward way to to the section numerals  
generated by \placecontent placed and aligned inmargin?


2. Oddity: Why does the TOC in the attached example default to a  
monospaced font?


Thanks in advance.

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

test-content.pdf
Description: Adobe PDF document


test-content.tex
Description: TeX 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] bidi in footnotes

2018-06-23 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 23 Jun 2018 07:10:27 -0600, Wolfgang Schuster  
 wrote:



Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
23. Juni 2018 um 14:17
On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster
 wrote:


2. a complete list of those typographical settings (bidi, whitespace,
etc,) which are have to explicitly setup for such environments?



Whitespace etc. are unrelated to the problem above and can be changed
with the normal setup-commands.


Counterexample to whitespace attached and below:

\setupwhitespace[big]

\starttext
\input ward \par \input ward
\startfootnote
\input ward \par \input ward
\stopfootnote{}
\stoptext

Whitespace is applied in the main text but not in the footnotes. How
is this case different from global declaration of bidi etc.? It seems
these elements really do live in their own world now..


This would lead to other side effects shown in the following example.


Yes, ok.


When you use the global whitespace settings in footnotes you get the
same space between each footnote entry. What can be done is to add a
whitespace key to setupnote which is easier than using  
setups-environment.


Could this be a feature request then? So

\setupnote[whitespace=big,bidi=on]

[Although in the case of bidi I still think that one declaration of  
bidi=global at the beginning of the document should radiate to all other  
elements, except as otherwise configured through their \setup's  
etc.]


Many thanks for the explanations.

Best wishes
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] bidi in footnotes

2018-06-23 Thread Idris Samawi Hamid ادريس سماوي حامد

oops, attached

On Sat, 23 Jun 2018 06:17:27 -0600, Idris Samawi Hamid ادريس سماوي حامد  
 wrote:


On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster  
 wrote:


2. a complete list of those typographical settings (bidi, whitespace,  
etc,) which are have to explicitly setup for such environments?


Whitespace etc. are unrelated to the problem above and can be changed  
with the normal setup-commands.


Counterexample to whitespace attached and below:

\setupwhitespace[big]

\starttext
\input ward \par \input ward
\startfootnote
\input ward \par \input ward
\stopfootnote{}
\stoptext

Whitespace is applied in the main text but not in the footnotes. How is  
this case different from global declaration of bidi etc.? It seems these  
elements really do live in their own world now..


Again, what are the general classes of commands and guidelines governing  
what declarations are globally applied and which are not?





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

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX 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] bidi in footnotes

2018-06-23 Thread Idris Samawi Hamid ادريس سماوي حامد
On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster  
 wrote:





Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
22. Juni 2018 um 21:01
On Thu, 21 Jun 2018 08:36:52 -0600, Alan Braslau
 wrote:


Many thanks. Is there (Hans? Wolfgang?) available somewhere

1. a complete list of these environments whose typographical settings
are decoupled from the rest of the document?


The problem you mentioned isn’t limited to bidi but applies also to
linbreaking for east asian languages (e.g. chinese) and fixing it makes
sense.


The reason why you have to re-enable the functions is that certain
environment disable a number of Lua attributes to avoid side effects,
e.g. to change the footnote color when you change the text color at the
page break.


One way to fix this is to make the attributes of the affected commands
global which means they won’t be reseted, e.g. change the line
(typo-dir.mkiv)

 \definesystemattribute[directions][public]

to

 \definesystemattribute[directions][public,global]


Another way is to re-enable the commands in footnotes etc.

 \appendtoks
 \ifcase\directionsbidimode \else
 \setdirection[\number\directionsbidimode]%
 \fi
 \to \everybeforenoteinsert


There are three parts in context where attributes are disabled which
affects bidi:

1. Note inserts which affects \footnote.

2. Margin data which affects \inmargin etc.

3. The output routine which affects header and footer lines.


This helps: many thanks for this detailed explanation!

--
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] bidi in footnotes

2018-06-23 Thread Idris Samawi Hamid ادريس سماوي حامد
On Fri, 22 Jun 2018 14:13:22 -0600, Wolfgang Schuster  
 wrote:


2. a complete list of those typographical settings (bidi, whitespace,  
etc,) which are have to explicitly setup for such environments?


Whitespace etc. are unrelated to the problem above and can be changed  
with the normal setup-commands.


Counterexample to whitespace attached and below:

\setupwhitespace[big]

\starttext
\input ward \par \input ward
\startfootnote
\input ward \par \input ward
\stopfootnote{}
\stoptext

Whitespace is applied in the main text but not in the footnotes. How is  
this case different from global declaration of bidi etc.? It seems these  
elements really do live in their own world now..


Again, what are the general classes of commands and guidelines governing  
what declarations are globally applied and which are not?


--
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] bidi in footnotes

2018-06-22 Thread Idris Samawi Hamid ادريس سماوي حامد
On Thu, 21 Jun 2018 08:36:52 -0600, Alan Braslau  
 wrote:



On Thu, 21 Jun 2018 06:20:45 -0600
Idris Samawi Hamid ادريس سماوي حامد  wrote:


Many thanks. Question: Is this use of setups now the "official" or
preferred way to handle footnote typography options? On the surface,
it appears to be overkill. For the declaration

\setupdirections[bidi=global]

shouldn't that mean that bidi is applied, well, globally?


The same holds for \setupalign[verytolerant], for example, that does
not get applied to a (figure,table) caption...

These environments (captions, footnotes, ...) inherit their settings
and then live independently.


Many thanks. Is there (Hans? Wolfgang?) available somewhere

1. a complete list of these environments whose typographical settings are  
decoupled from the rest of the document?


2. a complete list of those typographical settings (bidi, whitespace,  
etc,) which are have to explicitly setup for such environments?


If not, such lists should be compiled in lieu of trial and error -)

Best wishes
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] bidi in footnotes

2018-06-21 Thread Idris Samawi Hamid ادريس سماوي حامد

Salaam, Mohammad Hossein, Otared,

On Wed, 20 Jun 2018 15:27:56 -0600, Mohammad Hossein Bateni  
 wrote:



\startsetups[bidi:footnotes]
\setupdirections[bidi=on]
\stopsetups
\setupnotes[footnote][setups=bidi:footnotes]


On Wed, 20 Jun 2018 22:31:05 -0600, Otared Kavian  wrote:


% begin test-bidi-footnote.tex
\setupdirections[bidi=global]
\startsetups[bidi:footnotes]
\setupdirections[bidi=on]
\definedfont[file:almfixed.otf*arabic at 14pt]
\stopsetups
\setupnotes[footnote][setups=bidi:footnotes]

\starttext
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test
\startfootnote
Test امتحان test
\stopfootnote{}
\stoptext
% end test-bidi-footnote.tex


Many thanks. Question: Is this use of setups now the "official" or  
preferred way to handle footnote typography options? On the surface, it  
appears to be overkill. For the declaration


\setupdirections[bidi=global]

shouldn't that mean that bidi is applied, well, globally?

For \definedfont the behavior is less surprising, since that is obviously  
a local command. But is setups the official way to globalize the command  
(aside from typescripts or simplefonts)?


Best wishes
Idris

On 20 Jun 2018, at 23:22, ⁨Idris Samawi Hamid ادريس سماوي حامد⁩  
<⁨idris.ha...@colostate.edu⁩> wrote:


Dear gang,

In the attached/following example, bidi is not applied in the footnote:

\setupdirections[bidi=global]

\starttext
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test
\startfootnote
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test
\stopfootnote{}
\stoptext

Is there something else that I need to do? Thanks in advance!

[Also: Is there a way to not have to declare \definedfont twice?]



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

[NTG-context] bidi in footnotes

2018-06-20 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

In the attached/following example, bidi is not applied in the footnote:

\setupdirections[bidi=global]

\starttext
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test
\startfootnote
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test
\stopfootnote{}
\stoptext

Is there something else that I need to do? Thanks in advance!

[Also: Is there a way to not have to declare \definedfont twice?]

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

scratch.tex
Description: TeX document


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

[NTG-context] bidi protocols

2018-06-06 Thread Idris Samawi Hamid ادريس سماوي حامد

Greetings,

mtx-context | current version: 2018.06.02 22:34

In the following, bidi does not work:

===
\setupdirections[bidi=global]

\starttext
\definedfont[file:almfixed.otf*arabic at 14pt]
Test امتحان test

\righttoleft
Test امتحان test
\stoptext
===

See attached. This used to work: Is there a new protocol or something that  
I'm missing? Thank you in advance.


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

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX 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] Numbered, counted snippets in running text

2018-05-20 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 20 May 2018 08:02:46 -0600, Wolfgang Schuster  
<schuster.wolfg...@gmail.com> wrote:



\definelabel[idris][text=,headstyle=,numberconversion=R]

\defineframed
   [NUM]
   [width=fit,
align=middle,
frame=off,
background=color,
backgroundcolor=green,
top={\idris\par},
location=bottom]

\starttext
\dorecurse{5}{Unnumbered Text \NUM{Numbered Text} }
\stoptext


Wow.. many thanks!

Idris



Wolfgang

Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
19. Mai 2018 um 23:34
Dear gang,

Just put together a macro that appears to do what's desired. However,
is there a cleaner, more ConTeXt-like way to do this?

===
\newcount \MQT
\MQT=1
\define[1]\NUM{%
\framed[offset=overlay,frame=off,background=color,backgroundcolor=green]
{\starttabulate[|c|]
\NC \mbox{\the\MQT} \NR
\NC #1 \NR
\stoptabulate}%
\advance\MQT by 1
\hbox{}}

\startTEXpage
\dorecurse{5}{Unnumbered Text \NUM{Numbered Text} }
\stopTEXpage
===


--
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] Numbered, counted snippets in running text

2018-05-19 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 19 May 2018 16:47:34 -0600, Henri Menke <henrime...@gmail.com>  
wrote:



On 05/20/2018 09:34 AM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,

Just put together a macro that appears to do what's desired. However, is
there a cleaner, more ConTeXt-like way to do this?

===
\newcount \MQT
\MQT=1
\define[1]\NUM{%
\framed[offset=overlay,frame=off,background=color,backgroundcolor=green]
{\starttabulate[|c|]
\NC \mbox{\the\MQT} \NR
\NC #1 \NR
\stoptabulate}%
\advance\MQT by 1
\hbox{}}

\startTEXpage
\dorecurse{5}{Unnumbered Text \NUM{Numbered Text} }
\stopTEXpage
===


This feels more like “the ConTeXt way” to me.

\defineframed
  [MQTframed]
  [offset=overlay,
   frame=off,
   background=color,
   backgroundcolor=green,
   align=middle]

\definecounter[MQT]
\setcounter[MQT][1]

\define[1]\NUM
{%
  \startframed[MQTframed]
\convertedcounter[MQT]\par
#1%
  \stopframed
  \incrementcounter[MQT]%
}

\startTEXpage
\dorecurse{5}{Unnumbered Text \NUM{Numbered Text}\par}
\stopTEXpage



See attached. Thanks in advance for any suggestions for improvement.


Many thanks, Henri; this is a big help!

Best wishes
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] Conversion of \newcounts

2018-05-19 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 19 May 2018 16:40:13 -0600, Wolfgang Schuster  
<schuster.wolfg...@gmail.com> wrote:






Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
20. Mai 2018 um 00:30
Dear gang,

Related to the last thread ("Numbered, counted snippets in running
text"). Let us consider the same macro:

===
\newcount \MQT
\MQT=1
\define[1]\NUM{%
\framed[offset=overlay,frame=off,background=color,backgroundcolor=green]
{\starttabulate[|c|]
\NC \mbox{\the\MQT} \NR
\NC #1 \NR
\stoptabulate}%
\advance\MQT by 1
\hbox{}}

\startTEXpage
\dorecurse{5}{Unnumbered Text \NUM{Numbered Text} }
\stopTEXpage
===

How can one make a conversion of the numerals output by the \newcount?
That is, how so we replace the default U+0030-U+0039 digits (0 1 2
3..) with some defined conversion (e.g., \romannumerals)?

Is there a ConTeXt way to setup new counts so that they can
automatically use the conversion mechanism?


\definecounter[idris]%[numberconversion=R]

\starttext

\incrementcounter[idris]
\convertedcounter[idris]

\incrementcounter[idris]
\convertedcounter[idris][numberconversion=a]

\incrementcounter[idris]
\convertedcounter[idris]

\setupcounter[idris][numberconversion=r]

\incrementcounter[idris]
\convertedcounter[idris]

\stoptext


Many thanks, Wolfgang, that is a huge help!

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
___

[NTG-context] Conversion of \newcounts

2018-05-19 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Related to the last thread ("Numbered, counted snippets in running text").  
Let us consider the same macro:


===
\newcount \MQT
\MQT=1
\define[1]\NUM{%
\framed[offset=overlay,frame=off,background=color,backgroundcolor=green]
{\starttabulate[|c|]
\NC \mbox{\the\MQT} \NR
\NC #1 \NR
\stoptabulate}%
\advance\MQT by 1
\hbox{}}

\startTEXpage
\dorecurse{5}{Unnumbered Text \NUM{Numbered Text} }
\stopTEXpage
===

How can one make a conversion of the numerals output by the \newcount?  
That is, how so we replace the default U+0030-U+0039 digits (0 1 2 3..)  
with some defined conversion (e.g., \romannumerals)?


Is there a ConTeXt way to setup new counts so that they can automatically  
use the conversion mechanism?


See attached. Thanks in advance for your wisdom!

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

scratch.tex
Description: TeX document


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

[NTG-context] Numbered, counted snippets in running text

2018-05-19 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Just put together a macro that appears to do what's desired. However, is  
there a cleaner, more ConTeXt-like way to do this?


===
\newcount \MQT
\MQT=1
\define[1]\NUM{%
\framed[offset=overlay,frame=off,background=color,backgroundcolor=green]
{\starttabulate[|c|]
\NC \mbox{\the\MQT} \NR
\NC #1 \NR
\stoptabulate}%
\advance\MQT by 1
\hbox{}}

\startTEXpage
\dorecurse{5}{Unnumbered Text \NUM{Numbered Text} }
\stopTEXpage
===

See attached. Thanks in advance for any suggestions for improvement.

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

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX 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] How to setup the footnote number in local footnotes

2018-03-26 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 25 Mar 2018 16:34:08 -0600, Wolfgang Schuster  
<schuster.wolfg...@gmail.com> wrote:





Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
26. März 2018 um 00:24


2) Alternatively, would like to be able to define a conversion that
sets the footnote numeral to 2.
3) Uncommenting the line % \startlocalfootnotes[n=2] doesn't work,
although it is mentioned here:
http://wiki.contextgarden.net/Command/startlocalfootnotes
So that must be for MKII..


Check setup-en.pdf for valid arguments in MkIV.


There are no options for \startlocalfootnotes and there is no command
such
as \setuplocalfootnotes. So how does one setup a conversion (or manual
numbering) for localfootnotes?


\startlocalnotes[footnote]
\setupnotation[footnote][numberconversion=...]
...
\stoplocalnotes


Many thanks.


BTW: \startlocalfootnotes = \startlocalnotes[footnote]


Ah, good to know that - still addicted to old habits here -)

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] How to setup the footnote number in local footnotes

2018-03-25 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sun, 25 Mar 2018 09:29:01 -0600, Wolfgang Schuster
<schuster.wolfg...@gmail.com> wrote:


Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
25. März 2018 um 17:04
Dear gang,

Consider the following:

==
\starttext
\startframedtext[width=fit,frame=off,offset=0pt]
% \startlocalfootnotes[n=2]
\startlocalfootnotes
\input ward
\startfootnote
\input ward
\stopfootnote

\placelocalfootnotes
\stoplocalfootnotes
\stopframedtext
\stoptext
==

See attached:

1) Would like the footnote-number counter to start at 2, not 1.


Add

 \setcounter[footnote][1]

after \startlocalfootnotes.


Works, many thanks.


2) Alternatively, would like to be able to define a conversion that
sets the footnote numeral to 2.
3) Uncommenting the line % \startlocalfootnotes[n=2] doesn't work,
although it is mentioned here:
http://wiki.contextgarden.net/Command/startlocalfootnotes
So that must be for MKII..


Check setup-en.pdf for valid arguments in MkIV.


There are no options for \startlocalfootnotes and there is no command such
as \setuplocalfootnotes. So how does one setup a conversion (or manual
numbering) for localfootnotes?

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
___

[NTG-context] How to setup the footnote number in local footnotes

2018-03-25 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Consider the following:

==
\starttext
\startframedtext[width=fit,frame=off,offset=0pt]
% \startlocalfootnotes[n=2]
\startlocalfootnotes
\input ward
\startfootnote
\input ward
\stopfootnote

\placelocalfootnotes
\stoplocalfootnotes
\stopframedtext
\stoptext
==

See attached:

1) Would like the footnote-number counter to start at 2, not 1.
2) Alternatively, would like to be able to define a conversion that sets  
the footnote numeral to 2.
3) Uncommenting the line % \startlocalfootnotes[n=2] doesn't work,  
although it is mentioned here:

http://wiki.contextgarden.net/Command/startlocalfootnotes
So that must be for MKII..

Any pointers in setting up 1) and 2) are much appreciated. Thank you in  
advance!


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

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX 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
___

[NTG-context] ANNOUNCEMENT: Notepad++ for ConTeXt - Version 0.98

2018-03-05 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear ConTeXt gang,

A continuing desideratum for ConTeXt is a user-friendly writing and  
editing environment, where the range of application of the category  
“user-friendly” includes especially non-experts in programming or software  
development. The lack of such an environment is one factor that inhibits  
the wider use of ConTeXt. Despite its immense power, precision, and  
flexibility: At present it is not generally feasible for instructors and  
researchers in, e.g., the humanities to assign the use of ConTeXt to  
students, or to use it to collaborate on projects.


In addition, the first author (Idris) especially required a ConTeXt editor  
with, among other features, bidirectional capabilities to serve both  
academic writing as well as the needs of the Oriental TeX project,  
including the Zahrāʾ (aka Husayni) typeface system under current  
development.


In the course of an ongoing effort to address these lacunae, in 2017 a  
project to develop a set of utilities for the Windows editor Notepad++ was  
launched. After months of development and testing, Luigi and I are proud  
to present to the ConTeXt community


Notepad++ for ConTeXt: Lexer and Macro Utilities for editing ConTeXt  
Documents

Version 0.98

This package includes

I. A plugin for Notepad++ that implements, for the ConTeXt document  
processing system,
i)   a language lexer for semantic highlighting of TeX, LuaTeX, and  
ConTeXt commands;
ii)  autocompletion of commands with full support for calltips (set in  
columns);
iii) tagging and insertion of markup and templates, with support for  
mnemonic keys.


II. A color scheme and two complementary Notepad++ themes:
Silver Twilight Hi and Silver Twilight Lo.

Notepad++ for ConTeXt is available here:

https://github.com/luigiScarso/context-npp
https://github.com/luigiScarso/context-npp/blob/master/install/Npp-for-ConTeXt.zip

as well as here:

http://wiki.contextgarden.net/File:Npp-for-ConTeXt.zip

For a future TeXLive DVD: The package will be available under

texmf-dist/context/data/npp/context

The complete manual for Notepad++ ConTeXt, along with its TeX sources, may  
be

found in the following directory of the zip:

/Npp-for-ConTeXt/doc/npp-context-manual.pdf

It may also be downloaded here:
https://github.com/luigiScarso/context-npp/tree/master/doc

The README follows this announcement.

NOTA BENE: The old wiki page
http://wiki.contextgarden.net/Notepad++
is currently obsolete and needs to be updated in its entirety.

Further development is planned beyond this initial release. We warmly  
welcome and look forward to feedback and suggestions for improvement from  
the ConTeXt community!


Best wishes
Idris and Luigi

==
REAMDE.md:

*Notepad++ for ConTeXt: Lexer and Macro Utilities for editing ConTeXt  
Documents

Version 0.98*

This package includes

I. A plugin for Notepad++ that implements, for the ConTeXt document
processing system,
i) a language lexer for semantic highlighting of TeX, LuaTeX, and ConTeXt  
commands;
ii) autocompletion of commands with full support for calltips (set in  
columns);
iii) tagging and insertion of markup and templates, with support for  
mnemonic keys.


II. A color scheme and two complementary Notepad++ themes: Silver
Twilight Hi and Silver Twilight Lo.

Notepad++ for ConTeXt is available here:

https://github.com/luigiScarso/context-npp
https://github.com/luigiScarso/context-npp/blob/master/install/Npp-for-ConTeXt.zip

as well as here:

http://wiki.contextgarden.net/File:Npp-for-ConTeXt.zip

For a future TeXLive DVD: The package will be available under

texmf-dist/context/data/npp/context

The complete manual for Notepad++ ConTeXt, along with its TeX sources, may  
be

found in the following directory of the zip:

/Npp-for-ConTeXt/doc/npp-context-manual.pdf

It may also be downloaded here:
https://github.com/luigiScarso/context-npp/tree/master/doc

Completing development of the C++ plugin and lexer was done by the current
maintainer, Luigi Scarso (ConTeXt Development Team). Original C++ plugin
and lexer development was done by Dr. Jason Wu (Colorado State
University). Project vision and development planning (as well as the two
themes and color scheme) are by Professor Idris Samawi Hamid (Colorado
State University).

The Notepad++ for ConTeXt lexer is strongly influence by the plugin
WebEdit by Alexander Iljin:
https://sourceforge.net/projects/npp-plugins/files/WebEdit/

This plugin aims to support the editing of ConTeXt documents in a number
of ways. This includes some integration with the standalone distribution
of ConTeXt.

(For more information on ConTeXt see

http://wiki.contextgarden.net/Main_Page
http://www.pragma-ade.nl/index.htm .)

This plugin includes a language lexer for semantic highlighting of
ConTeXt commands; it also includes a system for tagging and inserting of
markup and templates, with support for mnemonic keys.

In its first phase of development, the plugin borrowed some ideas and
implementations from other 

Re: [NTG-context] Table of contents: style and subject

2018-03-04 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sun, 04 Mar 2018 06:29:53 -0700, Hans Hagen  wrote:

A working minimal example follows. Is this the recommended practice?  
Can it be streamlined further?

:

\placecontent


\placelist[content]
[subject,section,subsection,subsubsection]


Hm, toggling lines 12-13 below: Line 13 makes the TOC disappear entirely:

==
\setuphead[subject]
  [incrementnumber=yes,  % keep track of the number
   number=no]% but don't show it

\starttext % Approach I
\starttitle[title={Table of Contents},reference={}]
\start
\setuplist[subject,section,subsection,subsubsection]
  [alternative=c,style=bold]
\setupcombinedlist[content]
  [list={subject,section,subsection,subsubsection}]
% \placecontent % line 12
\placelist[content] % line 13
   [subject,section,subsection,subsubsection]
\stop
\stoptitle
\page
\startsection[title={Section One},reference={}]
new page \page
\stopsection

\startsection[title={Section Two},reference={}]
new page \page
\stopsection

\startsubject[title={Subject},reference={}]

\stopsubject
\stoptext
==

--
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] Table of contents: style and subject

2018-03-04 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sun, 04 Mar 2018 02:47:17 -0700, Hans Hagen <pra...@wxs.nl> wrote:


On 3/4/2018 4:27 AM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,
 Here's a strange situation:
 In approach I) we get the subject heading in the TOC, but style=bold  
doesn't work.
 In approach II) style=bold works, but the subject heading doesn't show  
up.
 For each approach, how do we get both subject heading and style=bold  
in the TOC?


you set up individual lists elements at another level

\setuplist[subject,section,subsection,subsubsection][alternative=c,style=bold]


Ok - see below.


looks bad this:

\setupinterlinespace[line=1.4ex]


Yes, residue from another experiment..

Between I) and II), which is the current recommended standard practice  
for MKIV?


A working minimal example follows. Is this the recommended practice? Can  
it be streamlined further?


Best wishes
Idris

==
\setuphead[subject]
  [incrementnumber=yes,  % keep track of the number
   number=no]% but don't show it

\starttext % Approach I
\starttitle[title={Table of Contents},reference={}]
\start
\setuplist[subject,section,subsection,subsubsection]
  [alternative=c,style=bold]
\setupcombinedlist[content]
  [list={subject,section,subsection,subsubsection}]
\placecontent
\stop
\stoptitle
\page
\startsection[title={Section One},reference={}]
new page \page
\stopsection

\startsection[title={Section Two},reference={}]
new page \page
\stopsection

\startsubject[title={Subject},reference={}]

\stopsubject
\stoptext
==

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

scratch.tex
Description: TeX 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
___

[NTG-context] Table of contents: style and subject

2018-03-03 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Here's a strange situation:

In approach I) we get the subject heading in the TOC, but style=bold  
doesn't work.


In approach II) style=bold works, but the subject heading doesn't show up.

For each approach, how do we get both subject heading and style=bold in  
the TOC?


Between I) and II), which is the current recommended standard practice for  
MKIV?


See below and attached scratch. Toggle the two \start|stoptext  
environments.


Best wishes
Idris

==
\setuphead[subject]
  [incrementnumber=yes,  % keep track of the number
   number=no]% but don't show it

\starttext % Approach I
\starttitle[title={Table of Contents},reference={}]
\start
\setupcombinedlist[content]
  [list={subject,section,subsection,subsubsection},alternative=c,style=bold]
\setupinterlinespace[line=1.4ex]
\placecontent
\stop
\stoptitle
\page
\startsection[title={Section One},reference={}]
new page \page
\stopsection

\startsection[title={Section Two},reference={}]
new page \page
\stopsection

\startsubject[title={Subject},reference={}]

\stopsubject
% \stoptext

% \starttext % Approach I
% \starttitle[title={Table of Contents},reference={}]
% \start
% \setupcombinedlist[{subject,section,subsection,subsubsection}]
  % [alternative=c,style=bold]
% \setupinterlinespace[line=1.4ex]
% \placecontent
% \stop
% \stoptitle
% \page
% \startsection[title={Section One},reference={}]
% new page \page
% \stopsection

% \startsection[title={Section Two},reference={}]
% new page \page
% \stopsection

% \startsubject[title={Subject},reference={}]

% \stopsubject
% \stoptext
==

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

scratch.tex
Description: TeX 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] Midsentence alias

2018-02-11 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sun, 11 Feb 2018 09:56:40 -0700, Hans Hagen <pra...@wxs.nl> wrote:


On 2/11/2018 5:20 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Is there an analogous symbol for a midsentence, which requires a mark  
only at its beginning?

|=|


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

[NTG-context] Midsentence alias

2018-02-11 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Midsentences in the ConTeXt sense are quite common. Consider the following:

===
\setuplanguage[en]
[leftsentence={{} \endash\nobreakspace},
 rightsentence={{} \endash\nobreakspace},
 leftsubsentence={{} \textbar\nobreakspace},
 rightsubsentence={{} \textbar\nobreakspace},
 midsentence={{} \endash\nobreakspace}]

\starttext
This is a sentence|<|this is a subsentence|>|that includes a subsentence.
\blank
This is a sentence|<|this is a subsentence|<|this is a nested  
subsentence|>|that includes a nested subsentence|>|that includes a  
subsentence.

\blank
This is a sentence that ends in a midsentence\midsentence Here is the  
midsentence.

\stoptext
===

A primary subsentence or nested subsentence is marked off by |<| and |>|  
respectively.


Is there an analogous symbol for a midsentence, which requires a mark only  
at its beginning?


If not, how can I make a private one? For example:

This is a sentence that ends in a midsentence|<>|Here is the midsentence.

How can I properly define |<>| to be an alias for \midsentence, in a way  
consistent with the rest of the subsentence mechanism?


Note: Could only find one reference to midsentence in the sources:  
lang-ini.mkiv, line 354


If this is not already supported, would like to propose that |<>| be added  
to ConTeXt as an alias for \midsentence.


BTW: It may appear that one can just use |<| to mark a midsentence, but  
then the next subsentence in the document will be treated as a nested  
subsentence.


Thank you in advance!

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

scratch.pdf
Description: Adobe PDF document


scratch.tex
Description: TeX 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] Setting the footnote symbol

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

On Fri, 17 Nov 2017 13:06:02 -0700, Pablo Rodriguez  wrote:


With average user, I mean I don’t fully understand the code that I read
(and I cannot write code for ConTeXt [either TeX or Lua]). Otherwise, I
would be contributing code to ConTeXt.


But what you contribute by answering and helping is as important as  
understanding or writing code -) So definitely above average :-)


Many thanks, Pablo, for your time and help; it is much appreciated and not  
taken for granted.


Best wishes
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] Setting the footnote symbol

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

On Thu, 16 Nov 2017 11:40:40 -0700, Pablo Rodriguez <oi...@gmx.es> wrote:


On 11/16/2017 07:18 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Yes, but the point of this scenario is to do everything with  
\definefont.

pagella is just for purposes of a MWE: otherwise the scenario calls for
using a font that has no associated typescript.

Put another way: We want to set up full control over font-style of each
element of a footnote using only \definefont. If that's impossible, it
would be good to know that as well as why.


I must confess that this is far beyond my knowledge. I never used
\definefont.


Mainly useful for testing for bugs in other macros etc..


If you don’t mind using \definefontfamily, this works fine:

  \definefontfamily[lareba][rm][Larabiefont]

  \setupnote[footnote][textstyle={\setupbodyfont[lareba, 12pt]\high}

No previous typescript is required (Larabiefont doesn’t have one).


Yes, SimpleFonts work, but then might as well set the whole document that  
way -)



But for explanations, I’m afraid I’m only an average user :-(.


Pablo, you are anything but an average user :-) Many thanks for your time  
and help.


Best wishes
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] Setting the footnote symbol

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

On Thu, 16 Nov 2017 11:11:50 -0700, Pablo Rodriguez <oi...@gmx.es> wrote:


On 11/16/2017 06:57 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Thu, 16 Nov 2017 10:47:13 -0700, Pablo Rodriguez <oi...@gmx.es>  
wrote:

[...]
You should rewrite your \setupnote command in the following way:

  \setupnote[footnote][textcommand={\PagellaRegularSmall\high}]


Many thanks. This fixes the height, but we lose the styling of the
reference symbol in the main text - see attached.


I see. One of these commands should work:

\setupnote[footnote][textcommand={\switchtobodyfont[pagella, 12pt]\high}

\setupnote[footnote][textcommand={\setupbodyfont[pagella, 12pt]\high}


Yes, but the point of this scenario is to do everything with \definefont.  
pagella is just for purposes of a MWE: otherwise the scenario calls for  
using a font that has no associated typescript.


Put another way: We want to set up full control over font-style of each  
element of a footnote using only \definefont. If that's impossible, it  
would be good to know that as well as why.


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] Setting the footnote symbol

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

Dear Pablo,

On Thu, 16 Nov 2017 10:47:13 -0700, Pablo Rodriguez <oi...@gmx.es> wrote:


On 11/16/2017 06:11 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

What do we need to do to get a raised footnote symbol in the main text
(line 6 of the pdf)? Thanks in advance.


BTW, I mixed the number which had to be raised.

By default, the textcommand option has a value of \high in \setupnote.

You should rewrite your \setupnote command in the following way:

  \setupnote[footnote][textcommand={\PagellaRegularSmall\high}]


Many thanks. This fixes the height, but we lose the styling of the  
reference symbol in the main text - see attached.


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

test-note.pdf
Description: Adobe PDF document


test-note.tex
Description: TeX 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
___

[NTG-context] Setting the footnote symbol

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

Der gang,

For the following \definefont scenario, the footnote symbol in the main  
text is not raised:


===
\setuppapersize[letter][letter]

% \setupbodyfont[schola,12pt]
\definefont[PagellaRegular] [texgyrepagella-regular.otf at 14pt]
\definefont[PagellaRegularSmall][texgyrepagella-regular.otf at 12pt]

\setupwhitespace[big]
\setuplayout[width=4.5in,height=5.5in,backspace=2in]

\setupnotation[footnote][style={\PagellaRegularSmall},   % text style  
of the footnote text
 numbercommand=\PagellaRegularSmall, % symbol-font  
style in the footnote
 titlestyle={\PagellaRegularSmall}]  % Why is this  
necessary?
\setupnote[footnote][textcommand={\PagellaRegularSmall}] % symbol-font  
style in the main text


\noheaderandfooterlines

\starttext \PagellaRegular
\startframedtext[width=4.5in,offset=0pt]
\startlocalfootnotes
Hence in Met VII, where Aristotle debates with masterly penetration how to  
meet the claim of substance to be at once universal, intelligible, and  
definable, and at the same time unique and individual, the singular is at  
length superseded on the throne of substance by the infima species.

\startfootnote
Or \quotation{materiate form,} as Aristotle also calls it because it  
attains existence in a material embodiment and cannot be defined without  
reference to matter, though matter is itself indefinable. The discussion  
is interspersed with criticism of the forms. Aristotle attacks the theory  
as a purely arbitrary individualisation of universals, and the detail of  
the polemic, as well as the context, suggest that he is attacking Plato  
not for divorcing infimae species from singulars, but for separating and  
reifying genera taken apart from species. [\textellipsis]

\stopfootnote\
That is to say the genus is taken to be fully actualised in its infimae  
species, and its further differentiation into singulars is treated as  
irrelevant.


\placelocalfootnotes
\stoplocalfootnotes
\stopframedtext
\stoptext
===

What do we need to do to get a raised footnote symbol in the main text  
(line 6 of the pdf)? Thanks in advance.


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

test-note.pdf
Description: Adobe PDF document


test-note.tex
Description: TeX 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] show bounding boxes

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

Hi Herbert,

On Wed, 23 Aug 2017 02:18:34 -0600, Herbert Voss  
 wrote:



Hello all,
is it possible to get additional frames around words and
the whole line?


\definefontfeature[default][default][boundingbox=frame]

\starttext
»Tee for Two« shows negative kerning.
\input sapolsky
\stoptext


Curious: What kind of applications are you interested in, particularly for  
the framing-the-whole-line case?


I suspect want you want is doable but will take some start|stopluacode  
trickery that is far beyond my pay grade.


In any case, these might be useful tracing features to add to the bag of  
tricks, if they are not already there..


Best wishes
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 22:14:15 -0600, Idris Samawi Hamid ادريس سماوي حامد  
<idris.ha...@colostate.edu> 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] 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] 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 <pra...@wxs.nl> 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-07 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Hans, Pablo,

On Mon, 07 Aug 2017 15:03:41 -0600, 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


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,


Much appreciated and much obliged. Will try to find time to edit the wiki,  
although am already overloaded wearing too many hats (font development,  
lexer for npp, now writing metaphysics, semester about to start soon..)


Many thanks, guys.

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


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.
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-07 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Wolfgang,

On Mon, 07 Aug 2017 12:17:21 -0600, Wolfgang Schuster  
<schuster.wolfg...@gmail.com> wrote:





Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
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
--
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
___

[NTG-context] Could you look at this?

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

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.

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-06 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sun, 06 Aug 2017 13:49:37 -0600, Pablo Rodriguez <oi...@gmx.es> wrote:


On 08/06/2017 03:54 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

In addition to the two dropbox links above, see the following:

https://people.umass.edu/klement/tlp/tlp.html#bodytext
https://people.umass.edu/klement/tlp/tlp.pdf

The dropbox links (from Introduction to Hegel by GRG Mure) illustrate a
combination of Wittgenstein numbering with paragraph indentation. So it  
is

something of a hybrid between sectioning and paragraph numbering.

NOTE: A full implementation of Wittgenstein numbering is not required,  
and

would probably not be wise except in the context of producing a ConTeXt
edition of the Tractatus (something of zero interest to this writer).
Indeed, Wittgenstein's numbering system is inconsistent or obscure in
places... What we are looking for is something actually sane-)

Hi Idris,

I forgot to comment. If you want to reproduce the layout of the
Wittgenstein edition, margin heads would be a better approach.


No, we want the numbering, but the layout we're trying to reproduce is  
that of Introduction to Hegel (see dropbox samples in earlier message)



But for that, we need first to present to Hans a unified proposal for
paralell streams.


Ah the streams thread.. need to revisit that for other purposes as well.


I meant its layout, not the “Tractatus” itself :-).


Indeed (I'm biting my tongue here -) )


Just in case it helps (the proposal ;-)),


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

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

On Sun, 06 Aug 2017 13:39:50 -0600, Pablo Rodriguez <oi...@gmx.es> wrote:


On 08/06/2017 03:54 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

[...]
Something along the lines of the following would be a sufficient (and
easier) first step for the current project, although we may want to
revisit the above for the future:

3  % section
3.0.1   % subsubsection

4  % section
4.1% subsection
4.1.1   % subsubsection

How can we automate this?


Hi Idris,

if you only need a printed version, I think the following approach might
help:

\setupwhitespace[big]

\setuphead[section]
[alternative=margintext,
 color=white,
 style=\tfxx,
 before=,
 after=,
 commandafter={\setupparagraphintro[first]
[{{\bf \getmarking[sectionnumber][current]
\hspace[big]}}]}]

\setuphead[subsection]
[commandafter={\setupparagraphintro[first]
[{{\bf \getmarking[subsectionnumber][current]
\hspace[big]}}]}]

\setuphead[subsubsection]
[commandafter={\setupparagraphintro[first]
[{{\bf \getmarking[subsubsectionnumber][current]
\hspace[big]}}]}]

\starttext

\dorecurse{3}{\section{}
\startpar\input ward\stoppar
\startpar\input ward\stoppar
\dorecurse{3}{\subsection{}
\startpar\input ward\stoppar
\startpar\input ward\stoppar
\dorecurse{3}{\subsubsection{}
\startpar\input ward\stoppar
\startpar\input ward\stoppar
\startpar\input ward\stoppar}
\startpar\input ward\stoppar}
\startpar\input ward\stoppar}

\stoptext


Thank you very much, Pablo. Here is a modified version:

\setupwhitespace[big]

\setuphead[section]
[alternative=margintext,
 color=white,
 style=\tfxx,
 before=,
 after=,
 commandafter={\setupparagraphintro[first]
[{{\bf \getmarking[sectionnumber][current]
\hspace[big]}}]}]

\setuphead[subsection]
[commandafter={\setupparagraphintro[first]
[{{\bf \getmarking[subsectionnumber][current]
\hspace[big]}}]}]

\setuphead[subsubsection]
[commandafter={\setupparagraphintro[first]
[{{\bf \getmarking[subsubsectionnumber][current]
\hspace[big]}}]}]

\starttext
\starttitle[title=Paper]
\dorecurse{2}{%
\startsection
\startpar\input ward\stoppar
\startparagraph\input ward\stopparagraph

\startsubsubsection{}
\startpar\input ward\stoppar
\stopsubsubsection

\dorecurse{2}{%
\startsubsection
\startpar\input ward\stoppar
\startparagraph\input ward\stopparagraph

\dorecurse{2}{%
\startsubsubsection{}
\startpar\input ward\stoppar
\startparagraph\input ward\stopparagraph
\stopsubsubsection
}

\startparagraph{\bf level 2} \input ward\stopparagraph
\stopsubsection
}

\startparagraph{\bf level 1} \input ward\stopparagraph
\stopsection
}

\stoptitle
\stoptext
Challenges:

1. How can we get automatic indentation for all heads *except* the first  
one that occurs after the \starttitle?


2. Look at the output of the adjusted version above - attached. Note that  
a subsubsection after a section gives


1.1
2.1

which are the same as those given by a subsection after a section. How can  
we get a subsubsection after a section to produce the following?


1.0.1
2.0.1

etc.

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

numbered-paragraphs-pablo.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-06 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sat, 05 Aug 2017 21:28:30 -0600, Idris Samawi Hamid ادريس سماوي حامد
<idris.ha...@colostate.edu> wrote:


The parameter insidesection= helps:


\setupwhitespace[big]

\def\SPACE#1{#1\hskip2em\hbox{}}
\setuphead[section]
[style=\bf,
 after={\blank[big]},
 before={\blank[big,medium]},
 color=walayahgreen,
 alternative=text,
 insidesection=\hskip-1.2em]
 % textcommand=\SPACE]
\setuphead[subsection]
[style=\bf,
 after={\blank[big]},
 before={\blank[big,medium]},
 color=walayahgreen,
 alternative=text,
 insidesection=\hskip-1.2em]
\setuphead[subsubsection]
[style=\bf,
 after={\blank[big]},
 before={\blank[big,medium]},
 color=walayahgreen,
 alternative=text,
 insidesection=\hskip-1.2em]

\define[1]\PARHEAD {{\bf{#1}}}

\starttext
\starttitle[title=Section 1]
\startsection[title=Paragraph 1]
\input ward
\stopsection

\startsection
\PARHEAD{Paragraph 2.} \input ward

\startparagraph
\input ward
\stopparagraph

\startsubsection
\input ward
\startsubsubsection
\input ward
\stopsubsubsection
\stopsubsection
\stopsection

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


Paragraph 1 shows that we cannot use the normal title= mechanism and  
maintain consistent spacing.


Paragraph 2 does not use the \start|stopparagraph mechanism, but the  
succeeding non-numbered paragraph does.


CHALLENGES:

1. See the following:

https://www.dropbox.com/s/wckt0zm0zfpx721/numbered-paragraphs-indent.pdf?dl=0

The first numbered paragraph is not indented, but the second onward is.  
How can we automate this?


2. See attached. Consider the following snippet:

\startsection
\input ward
\startsubsubsection
\input ward
\stopsubsubsection
\stopsection

The paragraph number comes out as 3, but the subsubparagraph as 1. What  
we want is


3 
3.01 

The '0' indicates that there is no subsection. Here is an example:

https://www.dropbox.com/s/gy3e93x7jqt6ivx/numbered-paragraphs-indent-01.pdf?dl=0

How can we automate this?

Thanks in advance for any guidance and pointers.


In addition to the two dropbox links above, see the following:

https://people.umass.edu/klement/tlp/tlp.html#bodytext
https://people.umass.edu/klement/tlp/tlp.pdf

The dropbox links (from Introduction to Hegel by GRG Mure) illustrate a
combination of Wittgenstein numbering with paragraph indentation. So it is
something of a hybrid between sectioning and paragraph numbering.

NOTE: A full implementation of Wittgenstein numbering is not required, and
would probably not be wise except in the context of producing a ConTeXt
edition of the Tractatus (something of zero interest to this writer).
Indeed, Wittgenstein's numbering system is inconsistent or obscure in
places... What we are looking for is something actually sane-)

1. If we take the sectioning approach outlined above, then the challenges
are

i)  indent a section after a title; and
ii) implement something not identical to but in the spirit of wittgenstein
numbers, e.g., where a subsubsection follows a section:

3  % section
3.01   % subsubsection

4  % section
4.1% subsection
4.11   % subsubsection

But this may be difficult to automate except for simple cases.

Something along the lines of the following would be a sufficient (and
easier) first step for the current project, although we may want to
revisit the above for the future:

3  % section
3.0.1   % subsubsection

4  % section
4.1% subsection
4.1.1   % subsubsection

How can we automate this?

2. There may be better approaches than the sectioning model outlined in
the previous message.

Thank you in advance for your help.

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

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

Hi Wolfgang,

On Sun, 06 Aug 2017 03:09:16 -0600, Wolfgang Schuster  
 wrote:



\setupwhitespace[big]
\definelabel[ParagraphNumber][text=Paragraph,closesymbol={\hspace[big]}]
\setupparagraphintro[each][\ParagraphNumber]
\starttext
\section{Section}
\input ward
\input ward
\input ward
\stoptext


Thanks for this. Note:

===
\setupwhitespace[big]

% \definelabel[ParagraphNumber][text=Paragraph,closesymbol={\hspace[big]}]
\definelabel[ParagraphNumber][text=,closesymbol={\hspace[big]}]

\setupparagraphintro[each][\ParagraphNumber]

\starttext

\section{Section}

\input ward

\input ward

\input ward

\stoptext
===

For simple essays, this is sufficient. But see the reply to the list from  
a few hours ago ("Re: [NTG-context] methods for numbered paragraphs (ii)")  
and the two dropbox examples. We want to be able to go further, in the  
spirit of the numbering system used by Ludwig Wittgenstein in the  
Tractatus.


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-05 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 05 Aug 2017 14:08:28 -0600, Idris Samawi Hamid ادريس سماوي حامد  
<idris.ha...@colostate.edu> wrote:



[Sent this a couple of days ago, maybe will get some takers this time -)]

Dear syndicate,

Not sure if there is a canonical way to do numbered paragraphs. In the
following, I use subsections to mimic numbered paragraphs:

===section-intext.tex===
\setuphead[section][style=\bfa,after={\blank[big]},before={\blank[big,medium]},color=walayahblue]
\setuphead[subsection][style=\bf,after={\blank[big]},before={\blank[big,medium]},color=walayahgreen,alternative=text,distance=0.28em]
\setuphead[subsubsection][style=\tf,after={\blank[big]},before={\blank[big,medium]},color=walayahred,alternative=text,distance=0.28em]

\starttext
\startsection[title=Section 1]
\startsubsection
\input ward
\stopsubsection

\startsubsection[title=Paragraph 2]
\input ward
\stopsubsection

\startsubsection
\startparagraph
\input ward
\stopparagraph
\stopsubsection
\stopsection
\stoptext
==

See attached output.

In paragraphs 1 and 2, there is too much distance between the subsection
number (subsection number + title in paragraph 2) and between the text.
The distance parameter is not appropriate here, it is the distance  
*after*

the section head that needs adjustment (even if the text portion of the
head (i.e., the section title) is empty).

Question 1: How do we fix the post-head distance?


The parameter insidesection= helps:


\setupwhitespace[big]

\def\SPACE#1{#1\hskip2em\hbox{}}
\setuphead[section]
   [style=\bf,
after={\blank[big]},
before={\blank[big,medium]},
color=walayahgreen,
alternative=text,
insidesection=\hskip-1.2em]
% textcommand=\SPACE]
\setuphead[subsection]
   [style=\bf,
after={\blank[big]},
before={\blank[big,medium]},
color=walayahgreen,
alternative=text,
insidesection=\hskip-1.2em]
\setuphead[subsubsection]
   [style=\bf,
after={\blank[big]},
before={\blank[big,medium]},
color=walayahgreen,
alternative=text,
insidesection=\hskip-1.2em]

\define[1]\PARHEAD {{\bf{#1}}}

\starttext
\starttitle[title=Section 1]
\startsection[title=Paragraph 1]
\input ward
\stopsection

\startsection
\PARHEAD{Paragraph 2.} \input ward

\startparagraph
\input ward
\stopparagraph

\startsubsection
\input ward
\startsubsubsection
\input ward
\stopsubsubsection
\stopsubsection
\stopsection

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


Paragraph 1 shows that we cannot use the normal title= mechanism and  
maintain consistent spacing.


Paragraph 2 does not use the \start|stopparagraph mechanism, but the  
succeeding non-numbered paragraph does.


CHALLENGES:

1. See the following:

https://www.dropbox.com/s/wckt0zm0zfpx721/numbered-paragraphs-indent.pdf?dl=0

The first numbered paragraph is not indented, but the second onward is.  
How can we automate this?


2. See attached. Consider the following snippet:

\startsection
\input ward
\startsubsubsection
\input ward
\stopsubsubsection
\stopsection

The paragraph number comes out as 3, but the subsubparagraph as 1. What we  
want is


3 
3.01 

The '0' indicates that there is no subsection. Here is an example:

https://www.dropbox.com/s/gy3e93x7jqt6ivx/numbered-paragraphs-indent-01.pdf?dl=0

How can we automate this?

Thanks in advance for any guidance and pointers.

Best wishes
Idris


Paragraph three shows that one apparently cannot mix this sectioning
approach with the \start-stopparagraph mechanism.

Question 2: Is there a way to mix \start-stopparagraph with the above
subsection approach to par numbering?

I suppose that as long as I maintain exactly one paragraph per  
subsection,

then structured output  (xml etc.) should look ok.

Question 3: Is there a wiser way to handle this kind of par numbering in
mkiv?

Thanks in advance!

Idris

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

section-intext.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
___

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

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

[Sent this a couple of days ago, maybe will get some takers this time -)]

Dear syndicate,

Not sure if there is a canonical way to do numbered paragraphs. In the
following, I use subsections to mimic numbered paragraphs:

===section-intext.tex===
\setuphead[section][style=\bfa,after={\blank[big]},before={\blank[big,medium]},color=walayahblue]
\setuphead[subsection][style=\bf,after={\blank[big]},before={\blank[big,medium]},color=walayahgreen,alternative=text,distance=0.28em]
\setuphead[subsubsection][style=\tf,after={\blank[big]},before={\blank[big,medium]},color=walayahred,alternative=text,distance=0.28em]

\starttext
\startsection[title=Section 1]
\startsubsection
\input ward
\stopsubsection

\startsubsection[title=Paragraph 2]
\input ward
\stopsubsection

\startsubsection
\startparagraph
\input ward
\stopparagraph
\stopsubsection
\stopsection
\stoptext
==

See attached output.

In paragraphs 1 and 2, there is too much distance between the subsection
number (subsection number + title in paragraph 2) and between the text.
The distance parameter is not appropriate here, it is the distance *after*
the section head that needs adjustment (even if the text portion of the
head (i.e., the section title) is empty).

Question 1: How do we fix the post-head distance?

Paragraph three shows that one apparently cannot mix this sectioning
approach with the \start-stopparagraph mechanism.

Question 2: Is there a way to mix \start-stopparagraph with the above
subsection approach to par numbering?

I suppose that as long as I maintain exactly one paragraph per subsection,
then structured output  (xml etc.) should look ok.

Question 3: Is there a wiser way to handle this kind of par numbering in
mkiv?

Thanks in advance!

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

section-intext.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
___

[NTG-context] methods for numbered paragraphs

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

Dear syndicate,

Not sure if there is a canonical way to do numbered paragraphs. In the
following, I use subsections to mimic numbered paragraphs:

===section-intext.tex===
\setuphead[section][style=\bfa,after={\blank[big]},before={\blank[big,medium]},color=walayahblue]
\setuphead[subsection][style=\bf,after={\blank[big]},before={\blank[big,medium]},color=walayahgreen,alternative=text,distance=0.28em]
\setuphead[subsubsection][style=\tf,after={\blank[big]},before={\blank[big,medium]},color=walayahred,alternative=text,distance=0.28em]

\starttext
\startsection[title=Section 1]
\startsubsection
\input ward
\stopsubsection

\startsubsection[title=Paragraph 2]
\input ward
\stopsubsection

\startsubsection
\startparagraph
\input ward
\stopparagraph
\stopsubsection
\stopsection
\stoptext
==

See attached output.

In paragraphs 1 and 2, there is too much distance between the subsection
number (subsection number + title in paragraph 2) and between the text.
The distance parameter is not appropriate here, it is the distance *after*
the section head that needs adjustment (even if the text portion of the
head (i.e., the section title) is empty).

Question 1: How do we fix the post-head distance?

Paragraph three shows that one apparently cannot mix this sectioning
approach with the \start-stopparagraph mechanism.

Question 2: Is there a way to mix \start-stopparagraph with the above
subsection approach to par numbering?

I suppose that as long as I maintain exactly one paragraph per subsection,
then structured output  (xml etc.) should look ok.

Question 3: Is there a wiser way to handle this kind of par numbering in
mkiv?

Thanks in advance!

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

section-intext.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] Cambria official typescript (mis)behavior

2017-08-03 Thread Idris Samawi Hamid ادريس سماوي حامد
On Thu, 03 Aug 2017 01:41:42 -0600, Henning Hraban Ramm   
wrote:



Am 2017-08-02 um 23:46 schrieb Aditya Mahajan :

I occasionally experience a similar issue (after an update wrong  
fontface is used, especially with math fonts) and reloading the fonts  
database with --force always fixes the issue for me. So, I have never  
bothered to investigate why the issue comes up in the first place.


Hm, is the general problem with ttc fonts fixed? Some leftover of that?


In the current project, occasionally a change in layout will cause cambria  
regular to change to italic.


mtxrun --script fonts --reload --force

fixes it again, but I have not been able to isolate the issue to a simple  
test file. E.g., on one occasion commenting


% \showframe

turned the document italic, but then after reloading it turned regular  
again and I couldn't repeat the error. So there seems to be a bug  
somewhere, perhaps ttc-related indeed...


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] Cambria official typescript (mis)behavior

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

On Wed, 02 Aug 2017 15:17:07 -0600, Hans Hagen <pra...@wxs.nl> wrote:


On 8/2/2017 11:05 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

On Wed, 02 Aug 2017 14:34:25 -0600, Hans Hagen <pra...@wxs.nl> wrote:


On 8/2/2017 10:21 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,
 There appears to be something awry with type-imp-cambria.mkiv or  
type-imp-dejavu.mkiv. Consider the following:

 ===
\setupbodyfont
   [cambria,12pt]
 \starttext
Test % {\it Test} {\bf Test} {\bi Test}
\stoptext
===
 This produces a pdf with Cambria Italic instead of Cambria Regular.  
Uncommenting the other three options produces the expected results.

 Is this a bug or am I missing something? Awaiting your advice!

it's ok here; it could depend on the cambria on your machine

 Cambria Regular : cambria.ttc
Cambria Italic  : cambriai.ttf
 Inspection shows cambria.ttc is indeed regular.
 The log file says
:
mkiv lua stats  > loaded fonts: 2 files: cambria.ttc, cambriai.ttf
 Updating to "current version: 2017.08.02 18:59" and purging the cache  
doesn't help
 Why is cambriai.ttf being loaded at all? Fresh log (today's beta)  
attached


probably because it's the first 'name' that matches

you can try

cambria-x


=> LM


cambria-y


=> LM


cambria-a


=> LM


as variants ; here i have an official cambria


I only have the one that comes with the latest update to Windows 10

(Never tested Cambria with ConTeXt till a few days ago (\definefont  
worked), and never tested the typescript till last night.)


Aditya's suggestion did something that seems to have fixed it, not sure  
what..


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] Cambria official typescript (mis)behavior

2017-08-02 Thread Idris Samawi Hamid ادريس سماوي حامد
On Wed, 02 Aug 2017 15:15:59 -0600, Aditya Mahajan <adit...@umich.edu>  
wrote:



On Wed, 2 Aug 2017, Idris Samawi Hamid ادريس سماوي حامد wrote:


On Wed, 02 Aug 2017 14:34:25 -0600, Hans Hagen <pra...@wxs.nl> wrote:


On 8/2/2017 10:21 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> Dear gang,
>  There appears to be something awry with type-imp-cambria.mkiv or
>  type-imp-dejavu.mkiv. Consider the following:
>  ===
> \setupbodyfont
>[cambria,12pt]
> \starttext
> Test % {\it Test} {\bf Test} {\bi Test}
> \stoptext
> ===
>  This produces a pdf with Cambria Italic instead of Cambria Regular.
>  Uncommenting the other three options produces the expected results.
>  Is this a bug or am I missing something? Awaiting your advice!
it's ok here; it could depend on the cambria on your machine


Cambria Regular : cambria.ttc
Cambria Italic  : cambriai.ttf

Inspection shows cambria.ttc is indeed regular.

The log file says
:
mkiv lua stats  > loaded fonts: 2 files: cambria.ttc, cambriai.ttf

Updating to "current version: 2017.08.02 18:59" and purging the cache  
doesn't

help


Not sure if it helps, but this is worth a try (note the force key):

mtxrun --script fonts --reload --force


Hmm, now I get

mkiv lua stats  > loaded fonts: 1 files: cambria.ttc

and the pdf file is correct. Thanks, Aditya! (Although I still don't  
understand why there was a problem to begin with!)


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] Cambria official typescript (mis)behavior

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

On Wed, 02 Aug 2017 14:34:25 -0600, Hans Hagen <pra...@wxs.nl> wrote:


On 8/2/2017 10:21 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,
 There appears to be something awry with type-imp-cambria.mkiv or  
type-imp-dejavu.mkiv. Consider the following:

 ===
\setupbodyfont
   [cambria,12pt]
 \starttext
Test % {\it Test} {\bf Test} {\bi Test}
\stoptext
===
 This produces a pdf with Cambria Italic instead of Cambria Regular.  
Uncommenting the other three options produces the expected results.

 Is this a bug or am I missing something? Awaiting your advice!

it's ok here; it could depend on the cambria on your machine


Cambria Regular : cambria.ttc
Cambria Italic  : cambriai.ttf

Inspection shows cambria.ttc is indeed regular.

The log file says
:
mkiv lua stats  > loaded fonts: 2 files: cambria.ttc, cambriai.ttf

Updating to "current version: 2017.08.02 18:59" and purging the cache  
doesn't help


Why is cambriai.ttf being loaded at all? Fresh log (today's beta) attached

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

test-cambria.log
Description: Binary data
___
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] Cambria official typescript (mis)behavior

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

Dear gang,

There appears to be something awry with type-imp-cambria.mkiv or  
type-imp-dejavu.mkiv. Consider the following:


===
\setupbodyfont
  [cambria,12pt]

\starttext
Test % {\it Test} {\bf Test} {\bi Test}
\stoptext
===

This produces a pdf with Cambria Italic instead of Cambria Regular.  
Uncommenting the other three options produces the expected results.


Is this a bug or am I missing something? Awaiting your advice!

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

test-cambria.log
Description: Binary data


test-cambria.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] replace characters with bounding boxes

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

On Thu, 20 Jul 2017 15:05:31 -0600, Hans Hagen <pra...@wxs.nl> wrote:


On 7/20/2017 8:06 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

On Thu, 20 Jul 2017 07:31:00 -0600, Hans Hagen <pra...@wxs.nl> wrote:


On 7/20/2017 3:04 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,
 Given a set body font and text, how does one replace all characters  
of that font in that text with the corresponding rectangular bounding  
boxes?
 Once an answer to the above is spelled out: How does one control the  
width of the lines which make up the bounding boxes?


% \showglyphs

or

\definefontfeature[default][default][boundingbox=yes]

\starttext
 \input sapolsky
\stoptext

 Many thanks, Hans:
 a - Toggling \showglyphs does not have any effect.
 b - Is there a way to make the glyphs disappear and show only the  
boxes?*

 c- Is there a way to make the boxes frames instead backgrounds?
 *\start|stopcolor[white] doesn't work when boundingbox is yes.
Well, it's a tracing option so don't expect miracles and integration  
with other features (like color). I'll add things like


   \definefontfeature[default][default][boundingbox=yes]
   \definefontfeature[default][default][boundingbox=background]
   \definefontfeature[default][default][boundingbox=frame]

   \definefontfeature[default][default][boundingbox={background,empty}]
   \definefontfeature[default][default][boundingbox={frame,empty}]

   \definefontfeature[default][default][boundingbox={frame,red,empty}]

as additional (probably never used) featurecreep but for sure will  
forget to document it etc etc


Thanks Hans. The current development workflow could use an option to see  
the bbox structure without seeing the glyphs (along with \showfontkerns as  
well)... a "geometric" view of the font in action so to speak.


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] replace characters with bounding boxes

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

On Thu, 20 Jul 2017 07:31:00 -0600, Hans Hagen <pra...@wxs.nl> wrote:


On 7/20/2017 3:04 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,
 Given a set body font and text, how does one replace all characters of  
that font in that text with the corresponding rectangular bounding  
boxes?
 Once an answer to the above is spelled out: How does one control the  
width of the lines which make up the bounding boxes?


% \showglyphs

or

\definefontfeature[default][default][boundingbox=yes]

\starttext
 \input sapolsky
\stoptext


Many thanks, Hans:

a - Toggling \showglyphs does not have any effect.

b - Is there a way to make the glyphs disappear and show only the  
boxes?*


c- Is there a way to make the boxes frames instead backgrounds?

*\start|stopcolor[white] doesn't work when boundingbox is yes.

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

[NTG-context] replace characters with bounding boxes

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

Dear gang,

Given a set body font and text, how does one replace all characters of  
that font in that text with the corresponding rectangular bounding boxes?


Once an answer to the above is spelled out: How does one control the width  
of the lines which make up the bounding boxes?


Thank you in advance.

Best wishes
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] how to prevent stupid typos?

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

On Wed, 07 Jun 2017 14:33:05 -0600, Pablo Rodriguez <oi...@gmx.es> wrote:


On 06/07/2017 10:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguez <oi...@gmx.es>  
wrote:



And creating a keyboard shortcut to launch the script automatically
helps a lot.


Scite: Ctrl-0
Notepad++: Ctrl-Shift-0

(new n++ setup for context currently under development)


Where are these setops? I mean, in the past, I tried to add them to
Notepad++ with the help of the wiki and I gave up because I couldn’t
make it work.


Best to forget the old stuff on the wiki... Will make an announcement once  
the new system is ready. It includes a dedicated lexer plugin and some  
other neat things; stay tuned.


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] how to prevent stupid typos?

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

On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguez  wrote:


And creating a keyboard shortcut to launch the script automatically
helps a lot.


Scite: Ctrl-0
Notepad++: Ctrl-Shift-0

(new n++ setup for context currently under development)

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] how to prevent stupid typos?

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

On Wed, 07 Jun 2017 12:11:14 -0600, Pablo Rodriguez  wrote:


(but i have to admit that i normally just run files and redo after
fixing an error, running is fast enough)


My question here isn’t about speed. If a source may load twenty source
files and it actually loads five source files, the problem is having to
check the files individually.


I suppose it wouldn't be too hard for someone with the requisite ability  
to write a script to pipe and run the check on the argument of each \input  
in a main file.


OTOH, \input's can have \input's so it could get unwieldy pretty quick..

As a matter of workflow, I would just check each \input when editing it,  
don't see the need to check them all over and over - but maybe you have  
some huge collaborative project with lots of \inputs frequently changing..


Best wishes
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] how to prevent stupid typos?

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

On Wed, 07 Jun 2017 02:09:48 -0600, Hans Hagen <pra...@wxs.nl> wrote:


On 6/7/2017 7:02 AM, Pablo Rodriguez wrote:

On 06/06/2017 10:56 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

[...]
Would it be any way to make ConTeXt report that \linenote{ hasn’t been
closed?


Just check your file before running it:

mtxrun --autogenerate --script check test.tex

Running this on your example gives

2  grouping error  \starttext This is \linenote{abed  
intended.

   \stoptext   

 Dear Idris,
 many thanks for the advice.
 I’m afraid that it doesn’t report errors in files loaded with the  
\input

command
  %%% contents of file a.tex:
 \starttext
 This is \linenote{error intended
 \stoptext
  %%% contents of file b.tex:
 \starttext
 This only loads a file.
  \input a.tex
 \stoptext
 If I runt "mtxrunjit --autogenerate --script check b.tex", I get the
following message:
  no error
 Is there no way to check also the files loaded by the main source?
i just run that command from the editor (configured under a key) so i  
can use it when editing a file


Same here.

(but i have to admit that i normally just run files and redo after  
fixing an error, running is fast enough)


Again, same here.

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] how to prevent stupid typos?

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

Dear Pablo,

On Tue, 06 Jun 2017 14:02:24 -0600, Pablo Rodriguez  wrote:


Dear list,

I have the following sample:

\starttext
This is \linenote{abed intended.
\stoptext

From which I get the error:

close source> level 2, order 3, name '/home/ousia/untitled.tex'
close source> level 1, order 3, name
'/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

*

tex error   > tex error on line 0 in file : ! Emergency stop

<*> cont-yes.mkiv



End of file on the terminal!

Would it be any way to make ConTeXt report that \linenote{ hasn’t been
closed?


Just check your file before running it:

mtxrun --autogenerate --script check test.tex

Running this on your example gives

2  grouping error  \starttext This is \linenote{abed intended.  
   \stoptext   


-)

Best wishes
Idris


I mean, with a three line source, it is stupid to get this. But in a
longer file, it can be an exhausting task.

The scenario may be worse.

At work I have a system to generate some documents (mainly letters)
automatically. I have to add an option (which I didn’t find the time to
fully implement it).

The system uses ConTeXt and there are about 30 source files. Depending
on the options you need, the main file requires the other files (via
modes and \input commands).

Well, in this context (no pun intended), I get an error such as this:

open source > level 3, order 4, name 'untitled.tex'

But the source isn’t closed. I don’t have the files here, but I don’t
know even how to start searching.

In this second case, how could I get a hint of what is ConTeXt expecting?

May thanks fory your help,


Pablo



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

[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] math font fallback for palatino \cal

2016-08-14 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 14 Aug 2016 13:17:35 -0600, Wolfgang Schuster  
<schuster.wolfg...@gmail.com> wrote:



Idris Samawi Hamid ادريس سماوي حامد <mailto:idris.ha...@colostate.edu>
14. August 2016 um 20:33
Dear gang,

Using pagella (palatino) for a project here. Unfortunately
texgyrepagella-math.otf has a rather unattractive set of \cal caps;
schola, termes, bonum etc. all use the same and much better-looking set.

So I decided to try and define a palatino math set with the \cal caps
from schola (= termes etc.). Succeeded after some trial and error:
attached are the positive results. Others may find the experiment
useful or even worth wikifying; it's a nice fallback exercise.

Maybe there is a better or more up-to-date way to do this: In any
case, feel free to critique the attached.

You can save a few lines for your font setup when you use the
\definefontfamily and \definefallbackfamily commands.

\definefontfamily [palatino_cg] [rm] [TeX Gyre Pagella]
\definefallbackfamily [palatino_cg] [mm] [TeX Gyre Schola Math]
[range={lowercasescript,lowercaseboldscript,uppercasescript,uppercaseboldscript},force=yes]
\definefontfamily [palatino_cg] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[palatino]

\starttext

\m{\cal ABCDEFG \quad \bf ABCDEFG}

\switchtobodyfont[palatino_cg]

\m{\cal ABCDEFG \quad \bf ABCDEFG}

\stoptext


Wonderful, Wolfgang, just wonderful. Lots to learn and explore... And some  
info here:


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

Thanks again!
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] math font fallback for palatino \cal

2016-08-14 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 14 Aug 2016 12:33:53 -0600, Idris Samawi Hamid ادريس سماوي حامد  
<idris.ha...@colostate.edu> wrote:



Dear gang,

Using pagella (palatino) for a project here. Unfortunately  
texgyrepagella-math.otf has a rather unattractive set of \cal caps;  
schola, termes, bonum etc. all use the same and much better-looking set.


So I decided to try and define a palatino math set with the \cal caps  
from schola (= termes etc.). Succeeded after some trial and error:  
attached are the positive results. Others may find the experiment useful  
or even worth wikifying; it's a nice fallback exercise.


Maybe there is a better or more up-to-date way to do this: In any case,  
feel free to critique the attached.


Decided to support lower-case \cal as well;attached.

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

test-math_cg.pdf
Description: Adobe PDF document


test-math_cg.tex
Description: TeX 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] math font fallback for palatino \cal

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

Dear gang,

Using pagella (palatino) for a project here. Unfortunately  
texgyrepagella-math.otf has a rather unattractive set of \cal caps;  
schola, termes, bonum etc. all use the same and much better-looking set.


So I decided to try and define a palatino math set with the \cal caps from  
schola (= termes etc.). Succeeded after some trial and error: attached are  
the positive results. Others may find the experiment useful or even worth  
wikifying; it's a nice fallback exercise.


Maybe there is a better or more up-to-date way to do this: In any case,  
feel free to critique the attached.


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523

test-math_cg.tex
Description: TeX document


test-math_cg.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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] first-setup.bat weirdness II: xetex etc.

2016-07-19 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear syndicate,

As mentioned in my other message, "first-setup.bat weirdness I: cloned  
system" I've now switched to the first-setup.bat way of updating. Two  
pieces of weirdness on the main machine:


1. mtx-context | running command: xetex --ini --etex --8bit  
cont-en.mkii \dump


makes vista complain:

=
xetex.exe - Unable to Locate Component

This application has failed to start because xetex.dll was not found.

=

Pressing OK, xetex crashes and things continue until

2. mtx-context | running command: xetex --ini --etex --8bit  
cont-nl.mkii \dump


Then the same error occurs.

After xetex crashes things continue briefly till first-setup.bat exits.

Everything works fine, except that every now and then the following  
happens when I run a file:


=
This is LuaTeX, Version 0.97.0 (TeX Live 2016/W32TeX)
 system commands enabled.
.
<*>
 cont-yes.mkiv
?
=

A fresh run of first-setup.bat makes the problem go away but it is  
annoying. After getting even more weirdness when cloning to another  
machine -- see "first-setup.bat weirdness I: cloned system" -- it seems  
appropriate to put this one out to the forum as well.


Any explanations and advice would be appreciated. Never had these problems  
using when updating manually... Thanks in advance and


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] first-setup.bat weirdness I: cloned system

2016-07-19 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

In the past I updated to the latest via installing cont-tmf.zip (and  
luatex.exe if needed) manually, but recently I switched to  
first-setup.bat. I got things working on one 64-bit machine (vista), and  
want to set up context on another (windows7), also 64-bit. Normally all I  
need to to do is zip/rar the tree, move it to the second machine, and  
voila, I'm up and running. This time, however, it doesn't work; when I run  
a file I get


=
This is LuaTeX, Version 0.97.0 (TeX Live 2016/W32TeX)
 system commands enabled.
.
<*>
 cont-yes.mkiv
?
=

as well as a complaint from windows7:

=
Assertion failed!

Program: C:\\luatex.exe
File: variable.c
line: 36

Expression: kpse -> program_name
=

What do these two complaints each mean?

After this, I tried running first-setup.bat again on the windows7 machine,  
got the following errors:


=
mtx-context | running command: pdftex --ini --etex --8bit cont-en.mkii  
\dump
warning: c:/ConTeXt/tex/texmf/web2c/texmf.cnf:49: (kpathsea) No cnf value  
on lin

e: OSFONTDIR =.
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/W32TeX)  
(INITEX)

 \write18 enabled.
entering extended mode
! I can't find file `cont-en.mkii'.
<*> cont-en.mkii
 \dump
(Press Enter to retry, or Control-Z to exit)
Please type another input file name:
[:]
mtx-context | running command: pdftex --ini --etex --8bit cont-nl.mkii  
\dump
warning: c:/ConTeXt/tex/texmf/web2c/texmf.cnf:49: (kpathsea) No cnf value  
on lin

e: OSFONTDIR =.
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/W32TeX)  
(INITEX)

 \write18 enabled.
entering extended mode
! I can't find file `cont-nl.mkii'.
<*> cont-nl.mkii
 \dump
(Press Enter to retry, or Control-Z to exit)
Please type another input file name:
=

Since I don't use mkii I ignored these errors and moved on, although both  
files are there in the tree - and I do not get this error on the  
original/vista machine. In any case, when I now run a file I get the same  
two luatex errors as at the beginning of this message.


What's going on here? How do I fix it? Thanks in advance and

Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Sebastian Rathz [sic]

2016-03-18 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

On Fri, 18 Mar 2016 09:12:12 -0600, luigi scarso   
wrote:



http://www.gust.org.pl/r.i.p.-sebastian-rathz-en


[sic, it's Rahtz]

Condolences to Hans Hagen, Taco Hoekwater, and to the entire TeX  
community, especially those who knew or met Sebastian personally.


Peace
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

  1   2   3   4   >