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


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


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
___


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
___


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

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

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 ادريس سماوي حامد  
 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
___

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

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

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  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-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 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 14:33:05 -0600, Pablo Rodriguez  wrote:


On 06/07/2017 10:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
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)


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
___

[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] replace characters with bounding boxes

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

On Thu, 20 Jul 2017 07:31:00 -0600, Hans Hagen  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
___

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  wrote:


On 7/20/2017 8:06 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

On Thu, 20 Jul 2017 07:31:00 -0600, Hans Hagen  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
___

[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] Cambria official typescript (mis)behavior

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

On Wed, 02 Aug 2017 14:34:25 -0600, Hans Hagen  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
___

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   
wrote:



On Wed, 2 Aug 2017, Idris Samawi Hamid ادريس سماوي حامد wrote:


On Wed, 02 Aug 2017 14:34:25 -0600, Hans Hagen  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 15:17:07 -0600, Hans Hagen  wrote:


On 8/2/2017 11:05 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

On Wed, 02 Aug 2017 14:34:25 -0600, Hans Hagen  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-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
___

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

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

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 ادريس سماوي حامد  
 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
___

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

On Sat, 05 Aug 2017 21:28:30 -0600, Idris Samawi Hamid ادريس سماوي حامد
 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 (ii)

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

On Sun, 06 Aug 2017 13:39:50 -0600, Pablo Rodriguez  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 Sun, 06 Aug 2017 13:49:37 -0600, Pablo Rodriguez  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
___

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

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

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

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


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

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

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

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


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

Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

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

2017-08-08 Thread Idris Samawi Hamid ادريس سماوي حامد
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 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 Tue, 08 Aug 2017 22:14:15 -0600, Idris Samawi Hamid ادريس سماوي حامد  
 wrote:



Wikified by Pablo:

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

And coming soon to a beta near you:

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


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

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


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

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

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

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

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

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

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

\setupwhitespace[line]

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

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

Any further suggestions for improvement?


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


Idris
--
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] 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
___

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

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

Dear Pablo,

On Thu, 16 Nov 2017 10:47:13 -0700, Pablo Rodriguez  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
___

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  wrote:


On 11/16/2017 06:57 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Thu, 16 Nov 2017 10:47:13 -0700, Pablo Rodriguez   
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 ادريس سماوي حامد

On Thu, 16 Nov 2017 11:40:40 -0700, Pablo Rodriguez  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-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
___

[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] Midsentence alias

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

On Sun, 11 Feb 2018 09:56:40 -0700, Hans Hagen  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] 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] Table of contents: style and subject

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

On Sun, 04 Mar 2018 02:47:17 -0700, Hans Hagen  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
___

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
___

[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 plu

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

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

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

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

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

Re: [NTG-context] Conversion of \newcounts

2018-05-19 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 19 May 2018 16:40:13 -0600, Wolfgang Schuster  
 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
___

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

2018-05-20 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 20 May 2018 08:02:46 -0600, Wolfgang Schuster  
 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
___

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

[NTG-context] Breaking ligatures

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

Dear Knights,

What is the canonical way to break a ligature in MkIV? The canonical TeX  
way, e.g.


f{}i

does not work if the feature liga=yes.

The zero-width joiner or non-joiner will do it but that seems ad hoc or  
abusive ;-) since those are really for cursive scripts like Arabic and  
Syriac.


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Breaking ligatures

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

On Wed, 20 Mar 2013 14:22:31 -0600, Hans Hagen  wrote:


quite a claim ... afaik devanagari also needs them


Ah, interesting!

anyhow, just don't enable ligatures if in doubt (some fonts have  
language dependent ligatures) ... it's somewhat arbitrary to have only  
'f' related ligs anyway


On Wed, 20 Mar 2013 14:22:35 -0600, Wolfgang Schuster  
 wrote:



\definefontfeature[liga][liga=yes]
\starttext
fi {\feature[-][liga]fi \feature[+][liga]fi}
\stoptext


This is just for having a control to make sure the test file I'm preparing  
for a \feature wiki entry is actually working right, so naturally I can't  
use \feature for the control :-)


But that is a nifty example, Wolfgang, so I may include that one on the  
wiki too!


Thanks Hans, Wolfgang, and

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] wiki page for \feature

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

Dear gang,

I made a wiki page for \feature et al:

http://wiki.contextgarden.net/Open_Type_Fonts_and_Featuresets_in_MkIV

Towards the end we need a graphical sample of the sample file, but I do  
not know how to do that. See


===
Now let us review the results:

[output/graphic here]
===

I have to move on to other projects so I'm leaving completion and  
improvement to others in the community. Here is the sample file (needs  
latest beta! pdf attached as well) that needs graphical output on the page:


==
\definefontfeature
  [schola-preset]
  [mode=node,script=latn,language=dflt,kern=yes,liga=yes,lnum=yes]

 \starttypescript [serif] [schola-preset] [name]
 \definefontsynonym [Serif]  
[name:texgyreschola-regular.otf][features=schola-preset]

 \stoptypescript

 \starttypescript [serif] [schola-preset] [size]
\definebodyfont
 [35.8pt,29.8pt,24.8pt,20.7pt,17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt]
 [rm]
 [tf=Serif sa 1]
 \stoptypescript

 \starttypescript [schola-default]
 \definebodyfontenvironment
  [schola-default]
  [default]
  [interlinespace=2.7ex]
\definetypeface [schola-default] [rm] [serif] [schola-preset]  
[schola-preset] % [default]

 \stoptypescript

 \usetypescript[schola-default]
 \setupbodyfont[schola-default,12pt]

\definefontfeature[f:smallcaps] [smcp=yes]
\definefontfeature[f:thinimacron]   [ss04=yes]
\definefontfeature[f:upsidedown][dlig=yes]


\definefontfeature[f:newstyle]  [onum=no]
\definefontfeature[f:nocaps][smcp=no]
\definefontfeature[f:wideimacron]   [ss04=no]
\definefontfeature[f:rightsideup]   [dlig=no]


\definefontfeature[f:ligatures] [liga=yes]
\definefontfeature[f:noligatures]   [liga=no]

\definefontfeature[f:oldstyle]  [onum=yes,lnum=no]

\definefontfeature[f:oldstyleupsidedown][onum=yes,dlig=yes]
\definefontfeature[f:newstylerightsideup]   [onum=no,dlig=no]

\definefontfeature[f:oldstylewmacron]   [ss04=no,onum=yes]
\definefontfeature[f:newstylesmallcaps] [smcp=yes,onum=no]

\startTEXpage[offset=10pt]

\define\SAMPLE{123 Idrīs ?` !` VA fi}

\SAMPLE\blank

\feature[+][f:oldstyle] \SAMPLE \blank
\feature[more][f:thinimacron]   \SAMPLE \blank
\addfeature[f:upsidedown]   \SAMPLE \blank

\feature[+][f:smallcaps]\SAMPLE \blank
\addfeature[f:wideimacron]  \SAMPLE \blank

\feature[-][f:upsidedown]   \SAMPLE \blank

\feature[=][f:oldstyleupsidedown]\SAMPLE \blank

\feature[!][f:smallcaps]\SAMPLE \blank

\feature[<]  \SAMPLE \blank
\stopTEXpage
==

Thanks and best wishes
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

feature.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] Representing TeX on the web [Off-topic]

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

Dear gang,

My apologies if the answers to the following are already well-known and if  
I'm being completely clueless:


What is the standard way of representing the symbol '\TeX' in html and the  
like?


Related: Is there any movement to have '\TeX' registered as a Unicode  
symbol?


Thanks in advance and

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Representing TeX on the web [Off-topic]

2013-03-31 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 30 Mar 2013 23:34:11 -0600, Arthur Reutenauer  
 wrote:



Related: Is there any movement to have '\TeX' registered as a
Unicode symbol?

 I really hope not.


Why not?

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Representing TeX on the web [Off-topic]

2013-03-31 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sat, 30 Mar 2013 23:34:11 -0600, Arthur Reutenauer  
 wrote:

^^
Time travel ;-)


TEX


On Sun, 31 Mar 2013 00:14:52 -0600, Khaled Hosny   
wrote:




 
 span.TEX {letter-spacing: -0.1em;}
 span.TEX span.E {left: -0.04em; position: relative;top: 0.5ex;}
 
 
  TEX
 



On Sun, 31 Mar 2013 04:45:36 -0600, Philipp Gesang  
 wrote:


  Tstyle="vertical-align:-0.5ex;margin-left:-0.1667em;margin-right:-0.125em;">EX

Maybe add font-family: "CMU Serif" to the style.


Thanks to all of you, Arthur, Khaled, and Phillip, for your quick replies;  
it is greatly appreciated!


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] tikz-cd - commutative diagrams

2013-04-15 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

The tikz module works, as per the attached attached test file. I need some  
commutative diagrams and found something relatively recent and interesting:


http://www.ctan.org/pkg/tikz-cd

But \input'ing the file tikz-cd.tex after the tikz module does not work; I  
get an undefined control sequence for a normal tikz command. I commented  
the LaTeX commands


% \ProvidesPackage{tikz-cd}[2012/12/30 v0.3c Commutative diagrams with  
tikz.]

% \RequirePackage{tikz}[2010/10/13] % pgf version 2.10 required

and the rest is just pgf syntax. What else do I need to do to get this  
working properly? Do I need to place tikz-cd in the pgf tree? If so, where?


In the attached I have not used any code that depends on tikz-cd; comment

\usemodule[tikz-cd]

and the file runs fine. Thanks for any advice and

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

tikz.tex
Description: TeX document


tikz-cd.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
___

Re: [NTG-context] Non-breaking spaces

2013-04-17 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Hans,

These commands are good to know!

On Wed, 17 Apr 2013 07:16:41 -0600, Hans Hagen  wrote:


\narrownobreakspace


If a font does not have U+202F defined, what's the best way to redefine  
this to, say, one half of the current font's regular space U+0020 (with no  
shrinking or stretching of course).


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Non-breaking spaces

2013-04-17 Thread Idris Samawi Hamid ادريس سماوي حامد

On Wed, 17 Apr 2013 07:56:41 -0600, Hans Hagen  wrote:



On 4/17/2013 3:30 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:

Hi Hans,

These commands are good to know!

On Wed, 17 Apr 2013 07:16:41 -0600, Hans Hagen  wrote:


\narrownobreakspace


If a font does not have U+202F defined, what's the best way to redefine
this to, say, one half of the current font's regular space U+0020 (with
no shrinking or stretching of course).


it has nothing to do with fonts ... they are not characters bound to  
glyphs .. independent so to say ... dealt with at another level


In spac-chr.mkiv there is

Line 73: \edef\narrownobreakspace  {\normalUchar"202F}

So in the preamble we have to do something like (spac-hor.mkiv, line 905)

\edef\narrownobreakspace{\penalty\plustenthousand\kern .7ex}

Then I can say, e.g.

\defineactivecharater + {\narrownobreakspace}

و+الباب

(untested, but on my list)

But per the current definition I should be able to define U+"202F as,  
e.g., .7ex in the font and get the same effect, right?


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Non-breaking spaces

2013-04-17 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi,

On Wed, 17 Apr 2013 01:08:30 -0600, H. Özoguz  wrote:


How to make it non-breaking?


See also my reply to Hans, basically you need a

\penalty1

(See TeXBook, page 353, 110)

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Non-breaking spaces

2013-04-17 Thread Idris Samawi Hamid ادريس سماوي حامد

On Wed, 17 Apr 2013 08:51:37 -0600, Hans Hagen  wrote:

\defineactivecharater + {\narrownobreakspace}

و+الباب

(untested, but on my list)



But per the current definition I should be able to define U+"202F as,
e.g., .7ex in the font and get the same effect, right?


why make a character active and let it expand to itself as letter?

normally the font handler never sees that character as there is no  
character -> glyph issue involved


just insert the utf character as-is


Sure, but two motivations:

1) In fine Arabic typesetting this can occur literally dozens of times a  
page, so I need something visible/convenient analogous to tilda/~ (which  
-- I am ashamed to say -- I still use in mkiv)


2) I can't currently "see" "202F in my editor (notepad++) and the current  
syntax-highlighting features don't display it automatically.


(Eventually I have to port the ConTeXt support package for Npp to a  
lexer/plugin where I can define these things explicitly, but first I need  
someone who knows that lexer stuff to help...)


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Non-breaking spaces

2013-04-17 Thread Idris Samawi Hamid ادريس سماوي حامد

[no cc]

On Wed, 17 Apr 2013 09:35:43 -0600, Hans Hagen  wrote:


On 4/17/2013 5:28 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:


(Eventually I have to port the ConTeXt support package for Npp to a
lexer/plugin where I can define these things explicitly, but first I
need someone who knows that lexer stuff to help...)


it would be nice if there was a (say special dejavu mono) that has  
visual appearances for such characters


anyway .. my scite lexer visualizes the spacers


My Npp is from a year ago. I just checked and

http://www.notepad-plus-plus.org/news/notepad-6.2-release-udl2.html

http://udl20.weebly.com/operators.html

So I'll update after the work week is over and see if this new framework  
can accommodate the spacers etc. Then I'll prepare a new ConTeXt support  
package for npp.


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Adobe Garamond Problems with letter combination "fi"

2013-04-26 Thread Idris Samawi Hamid ادريس سماوي حامد

Greetings, Keith, Thomas, and all,

On Fri, 26 Apr 2013 10:43:59 -0600, Thomas A. Schmitz  
 wrote:


if you look at the books of decent publishers, you will see that most of  
them still use ligatures (most American university presses, Oxford and  
Cambridge, German publishers such as Reclam etc.) However, many smaller  
publishers don't give a rat's ass about esthetics, and that's where Word  
comes into play: they have their authors deliver their manuscripts as  
Word files and simply typeset from that, more often than not by  
employing some underpaid and untrained "contractors" in India. Cuts  
costs and makes authors do all the work that publishers used to do in  
the olden days... Taking this as the norm is not a good idea.


The situation Thomas is describing is analogous to what happened 40 years  
ago: When metal-based typesetting started to die out, what came after was  
atrocious but ubiquitous. And that's _exactly_ why Knuth invented TeX!


As a general rule: High-quality typesetting with good fonts and the  
ligatures off is like pouring fine wine into a plastic cup.


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Arabic typesetting, one more

2013-05-11 Thread Idris Samawi Hamid ادريس سماوي حامد

Salaam, Huseyin,

I missed this and other threads, it's been busy here...

On Tue, 07 May 2013 23:35:25 -0600, H. Özoguz  wrote:

But with traditionalarabic it is worse than with arabtype. What could be  
a way to fix this?


Traditional Arabic is a uniscribe-compliant font, but not a fully opentype  
font. Uniscribe also supports older, pre-unicode protocols. In other  
words, TraditionalArabic is platform-dependent. So unless M$ has updated  
it in a recent OS, it will not work in ConTeXt MkIV. Since XeTeX uses the  
local libraries, then mkii/xetex on windows might work.


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] font trickery

2013-05-14 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Hans,

On Tue, 14 May 2013 12:01:36 -0600, Hans Hagen  wrote:

I'm on-and-off working on the more technical font manual and in the  
process also check some old code i've laying around (deciding on what to  
include and not). I'm also revising the tracer styles.


Which makes me wonder: are there specific additional features that one  
would like to see in context (mkiv only of course) with respect to font  
support?


This may be beyond the scope of your current plans, but worth considering:  
It would be nice to have a mechanism where we can override/add opentype  
gsub and gpos features. Early on in the history of luatex we once had a  
mechanism that did this using FontForge's version of Adobe Feature Files.  
From what I understand, the AFF syntax is finally mature and supports all  
lookup types:


http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html

Or maybe we have our own syntax in lua, goodies etc. Anyway, a way to  
control/override opentype gsub and gpos behavior would be interesting.  
Even if a total controller is too ambitious/unwieldy, just being able to  
do a few basic gsub/gpos tricks may be useful for, e.g., bugs in the font.


Anyway, something to think about.

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] font trickery

2013-05-15 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Georg,

On Wed, 15 May 2013 00:09:22 -0600, Georg Duffner   
wrote:



I’d prefer to stay with the AFF syntax which is well established.


I wonder if the latest, virtually frozen FontForge supports the current  
AFF syntax or still uses an earlier version. Before AFF was complete  
George added the missing functionality but Adobe did not accept his  
additions. The former luatex support was probably based on George's  
modifications to the AFF syntax.


Hans and Taco know better, but I suppose a newer implementation of AFF in  
mkiv could be done in lua without touching the binary.


But anyway, this may very well be beyond Hans' current plans for font  
trickery, but it's fun to discuss possibilities.


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] \textwidth vs local

2013-05-17 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Is there a \dimen variable for the local key for the width of a text  
column? Take a look at the attached pdf: Clearly local is different from  
\textwidth and \makeupwidth.


=
\starttext
\framed[width=\textwidth,frame=on]{\type{\textwidth}}
\framed[width=\makeupwidth,frame=on]{\type{\makeupwidth}}
\framed[width=local,frame=on]{\type{local}}

\startitemize
\item \framed[width=\textwidth,frame=on]{\type{\textwidth}}
\framed[width=\makeupwidth,frame=on]{\type{\makeupwidth}}
\item \framed[width=local,frame=on]{\type{local}}
\stopitemize
\stoptext
=

I'm working on a macro that depends on the local width and I need to be  
able to do work with fractions of the local width, e.g.


\framed[width=0.9\localwidth]{local width}

Thanks in advance for any advice and

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

local.pdf
Description: Adobe PDF document


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

Re: [NTG-context] \textwidth vs local

2013-05-17 Thread Idris Samawi Hamid ادريس سماوي حامد

This is an *immense* help... Thanks a million!!

Best wishes
Idris

On Fri, 17 May 2013 17:08:15 -0600, Hans Hagen  wrote:


\showframe
 \startbuffer
\setlocalhsize
\dontleavehmode\framed[width=\hsize]  
{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\hsize  
}} \par
\dontleavehmode\framed[width=\localhsize]  
{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\localhsize  
}} \par
\dontleavehmode\framed[width=\textwidth]  
{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\textwidth   
}} \par
\dontleavehmode\framed[width=\makeupwidth]{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\makeupwidth}}  
\par
\dontleavehmode\framed[width=local]  
{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{local}} 
\par

\dontleavehmode\blackrule[width=\hsize]   \par
\dontleavehmode\blackrule[width=\localhsize]  \par
\dontleavehmode\blackrule[width=\textwidth]   \par
\dontleavehmode\blackrule[width=\makeupwidth] \par
\dontleavehmode\ruledhbox to \hsize  {x\hss x} \par
\dontleavehmode\ruledhbox to \localhsize {x\hss x} \par
\dontleavehmode\ruledhbox to \textwidth  {x\hss x} \par
\dontleavehmode\ruledhbox to \makeupwidth{x\hss x} \par
\stopbuffer
 \starttext
 \startitemize
\startitem
\getbuffer
\stopitem
\stopitemize
 \getbuffer
 \stoptext



--
Professor Idris Samawi Hamid
Department 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] font trickery

2013-05-17 Thread Idris Samawi Hamid ادريس سماوي حامد

On Fri, 17 May 2013 17:55:10 -0600, Hans Hagen  wrote:

indeed. however the biggest challenge in patching a font runtime is  
where to inject the patches in the look up sequence ...


Indeed, I was thinking exactly the same thing! It needs some thought...  
The simplest and safest idea may be to stack user-defined gsub lookups  
after, and only after, the gsub lookups in the font are complete. Ditto  
for gpos.


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Commutative diagrams in tikz-cd: for wiki

2013-05-25 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

With a couple of modifications I got tikz-cd (a package to make  
commutative diagrams for categories and toposes etc. by Florêncio Neves)  
working in mkiv:


http://texdoc.net/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf

It depends on the tikz module, already supported in mkiv.

The tikz-cd module is attached, and here is a sample file:

===
\usemodule[tikz]
\usetikzlibrary{commute}

\starttext
\starttikzcd %[ampersand replacement=\&]
A \arrow{rd} \arrow[yshift=0.5ex]{r}{\phi} \& B \\
\& C
\stoptikzcd

\starttikzcd %[ampersand replacement=\&]
A
\arrow[yshift=1.5ex]{r}
\arrow[yshift=0.0ex]{r}
\& B \arrow[xshift=0.7ex]{d} \arrow[xshift=-0.7ex]{d} \\
\& C
\stoptikzcd
\stoptext
===

A couple of things:

1 I had to comment out line 396 of pgfsys-pdftex.def in the tikz module,  
or else I'd get an undefined control sequence. It's not needed anyway  
since that's pdftex.


2 In tikzlibrarycommute.code.tex, line 395 I had to add the option

ampersand replacement=\&

to avoid a TeX error. So you'll have to use '\&' instead of '&' for matrix  
arrays.


3 Some LaTeX-specific stuff is commented, and support is added for

\starttikzcd \stoptikzcd

so we get a ConTeXt environment.


I'm hoping someone can volunteer to place this on the wiki, perhaps even  
set it up on the modules page, with an indication of its proper place in  
the texmf-modules tree etc.


Any other improvements will also be appreciated. Enjoy!

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

tikzlibrarycommute.code.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
___

Re: [NTG-context] Font problems

2013-05-31 Thread Idris Samawi Hamid ادريس سماوي حامد

Salaam, Huseyn,

On Fri, 31 May 2013 07:24:20 -0600, H. Özoguz  wrote:

With the font file "maddina.ttf" I have the same problems. But this font  
is clearly not broken, you can download it here:  
http://www.searchfreefonts.com/free/quran-madina.htm (or see attachment  
of this mail).



But is the problem here?


It's not an opentype font. It's not even a unicode font; it uses an ASCII  
encoding. Just type in 'abcdefg' in the preview on the website and you get  
arabic letters. The font was made in 1994 and depends on whatever software  
it was made for at the time.


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Font problems

2013-05-31 Thread Idris Samawi Hamid ادريس سماوي حامد

Salaam Huseyin,

If you have not done so already, you can also try the Quran fonts listed  
at the bottom of this page:


http://al-quran.info/page/about

Scheherazade you are already familiar with. I have not done much testing  
of the others but they are all OT I believe.


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Hebrew vowel placement in ConTeXt.

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

Greetings, Michael,

On Mon, 17 Jun 2013 10:15:11 -0600, Michael Ash   
wrote:



Is there a standard way to send unicode text to this list?


Your Unicode text came through perfectly:


\textdir TRT
\hebrew
לָכֵן חַכּוּ־לִי נְאֻם־יְהוָה לְיוֹם קוּמִי לְעַד כִּי מִשְׁפָּטִי  
לֶאֱסֹף גּוֹיִם לְקָבְצִי מַמְלָכוֹת לִשְׁפֹּךְ עֲלֵיהֶם זַעְמִי כֹּל  
חֲרוֹן אַפִּי כִּי בְּאֵשׁ קִנְאָתִי תֵּאָכֵל כָּל־הָאָרֶץ׃

\stoptext


Maybe the encoding of your browser/mail-client needs to be set to  
"Unicode" ("Automatic" usually works too).


For high-level text-direction control, you may experiment with

\righttoleft
\lefttoright

as well as

\setupdirections[bidi=global]
\setupdirections[bidi=local]

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Hebrew vowel placement in ConTeXt.

2013-06-17 Thread Idris Samawi Hamid ادريس سماوي حامد
On Mon, 17 Jun 2013 10:31:12 -0600, Michael Ash   
wrote:


Also it's typesetting fine in ConTeXt except for the vowel placement.   
Any suggestions there?  Thank you again.


You probably need the opentype features activated. Ezra has two features  
from what I can tell, so try something like this (totally untested):


\definefontfeature
   [silezra]
   [mode=node,language=dflt,script=hbr,
mark=yes,ccmp=yes]

\definedfont[EzraSIL*silezra at 14pt]לָכֵן

For mark and ccmp see

http://www.microsoft.com/typography/otspec/featurelist.htm

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Typesetting Classical Arabic Poetry

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

Hi JR,

On Fri, 23 Aug 2013 15:12:54 -0600, J. R. Schmid  wrote:


for better or worse, I'm trying to typeset Arabic poetry in ConTeXt


For better :-)

after having become fed up with LaTeX for a variety of reasons. Arabic  
script itself is not a problem and I already love how easy it is to use  
whatever font you like and how clean ConTeXt seems to be in its design.


What is giving me trouble, though, is the face that traditionally,  
poetry needs to be typeset in two columns. Using an English poem for an  
example, it'd look a little bit like this:


 Said Rich Accetta-Evans:

   1 My  poem  delights  me2 My   poem   is   mine
   3 It is like fresh bread4 When I bake it myself
   5 It   is  like  my  son6 The  day  he was born
   [...]

This is to be read in the order of the numbers, so "columns" or  
"simplecolumns" won't work (I think).


I have an experimental/rudimentary module that does this. It needs some
work to get, e.g., better widths for automatic typesetting in the
high-level code (tracking the dynamic \hsize in ConTeXt) but you are
welcome to try it. See the attached module and test file.



The second problem is the way in which Arabic needs to be justified,  
namely not by adjusting the space between words, but instead by  
adjusting the connecting line between letters:


قال أبو الطيب أحمد بن الحسين المتنبّي

   أنـا الـذي نـظر الأعمى إلـى أدبي  وأسمعـت كـلماتــي مـن به صمم
   كم تـطلبون لـنا عيبًـا فــيعجزكم  ويكره المجد ما تأتـون والكرم
   ما أبعـد العيب والنقصان عن شرفي  أنا الثّريا وذان الشيب والهرم
   [...]

I couldn't find any info on either of these two questions through the  
documentation or through Google (although I might have been looking for  
the wrong keywords). Any comments are appreciated! :-)


I'm hoping that this will be implemented in the coming months. Hans and I
have done work on the general case -- involving very advanced
font-features -- but not so much on the simple case -- involving
insertions of tatweel. That may seem counter-intuitive, usually the simple
comes before the complex ;-)

Let me know how things work, and you can write me off-list.

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

arabic-poem.tex
Description: TeX document


hemistiches.tex
Description: TeX document


arabic-poem.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] zero-width joiners etc

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

Dear gang,

Does anyone here remember how to toggle Unicode control characters like  
the zero-width joiners, non-joiners etc? For example, some fonts map the  
control character to a symbol but we usually don't want that symbol  
showing up in normal text output. I know there is (used to be?) a switch  
in MkIV for toggling this but can't find it.


(BTW: I miss the searchable mail archives on the ConTeXt Garden...)

Thanks and Best Wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] zero-width joiners etc

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

On Thu, 29 Aug 2013 13:09:22 -0600, Hans Hagen  wrote:


\setcharacterstripping[1]
 (experimental code ... probably never used)


It works and thanks!!

Idris
--
Professor Idris Samawi Hamid
Department 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] Arabic and Latin hemistiches

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

Dear gang,

Re: Arabic poetry thread:

Hans has just implemented high-level support for hemistiches and caesuras  
(using here the technical names for the style of poetry structure used in  
Arabic and other classical literature).


http://en.wikipedia.org/wiki/Hemistich
http://en.wikipedia.org/wiki/Caesura

With the latest beta, run the attached file. The module m-hemistich.mkiv  
also has a demo inside.


For Arabic, note the tatweel across columns (only manual for now). The  
separator option with \hemistiches is probably more useful for Latin and  
Greek classical literature etc where the separator occurs on every line;  
the \hemistichescaesura option is probably more useful for Arabic where  
there are only occasional connectors across columns.


Could one of you kindly add a page with this info to the wiki? Much thanks  
and enjoy!


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

test-hemistiches.pdf
Description: Adobe PDF document


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

Re: [NTG-context] Arabic and Latin hemistiches

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

On Thu, 29 Aug 2013 19:07:48 -0600, J. R. Schmid  wrote:

That's what I understood from the ConTeXt Standalone wiki page, and also  
why I'm so confused about this - my Standalone installation is brand  
new, and I started it roughly 3 hours after Hans' post about the new  
module. I just ran first-setup.bat again, but it still doesn't find the  
module.

 Is there a separate source/repository/etc. that needs to be specified?


Look here (where the beginning of the path may be different on your
machine/OS):

C:\ConTeXt\tex\texmf-context\tex\context\base

If m-hemistich.mkiv is there, you have updated the distribution. If not,
you have not updated the distribution.

Another way: Look at a log file from any run and look at the date to
verify that you have updated. Here's mine:

ConTeXt  ver: 2013.08.26 16:41

If you have an older date, you need to update.

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] ConTeXt in the cloud

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

Dear gang,

Since I work with context at both my home and my work machines, I'm  
thinking of moving my context tree to dropbox and just keeping that one  
tree updated. Have any of you tried something like this, and are there any  
unforeseen issues that could arise?


Or are there any other thoughts about running ConTeXt as a personal cloud  
application?


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Kashide in ConTeXt

2013-09-11 Thread Idris Samawi Hamid ادريس سماوي حامد

Salaam, Vafa,On Tue, 10 Sep 2013 09:34:23 -0600, Vafa Khalighi  wrote:it is about stretching words.It can be done manually, of course, by just manual insertions of U+0640. Did you mean something else by 'manual'?As for automatic, it is in the pipeline and my hope is it will be done by Spring if not earlier.Best wishesIdris-- Professor Idris Samawi HamidDepartment of PhilosophyColorado State UniversityFort 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] Bug in inframed

2013-09-12 Thread Idris Samawi Hamid ادريس سماوي حامد

Salaam,

On Thu, 12 Sep 2013 06:09:46 -0600, H. Özoguz  wrote:

I found the following bug in \inframed, getting problems with inframing  
arabic words, try the following example


\definefont[arab][name:arial*arabic at 18pt]
\define[1]\awort{{\hbox{\setupalign[r2l]\arab#1}}}
\starttext
\awort{بِالصَّالِحِينَ}\blank
\awort{\inframed{بِالصَّالِحِينَ}}
\stoptext

You see the difference: The inframed has right-shifted vocalizations. Is  
that easy to fix?


Try this:

\definefont[arab][name:arial*arabic at 18pt]
\define[1]\awort{{\hbox{\setupalign[r2l]\arab#1}}}
\starttext
\awort{بِالصَّالِحِينَ}\blank
\awort{\inframed[align=r2l]{بِالصَّالِحِينَ}}
\stoptext

\inframed needs alignment!

Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] ConTeXt epub workflow

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

Dear gang,

I have an urgent project that needs three outputs: pdf, epub, and kindle.  
The formatting needs are pretty basic. In your experience:


What is the recommended, more efficient workflow for this sort of thing?  
Should I start with markdown and then generate context and epub (then  
convert epub=>kindle I presume)? Or does one context file with pdf and  
epub outputs work well? Many years ago I did some documents in ConTeXt  
with both print and screen pdfs from a single source. Can we do the latter  
in ConTeXt now? Does anyone have any examples?


According to

http://wiki.contextgarden.net/epub

There is no support for graphics in ConTeXt epub output. Are there  
workarounds?


In any case, all advice for an efficient workflow for this project will be  
greatly appreciated!


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] ConTeXt epub workflow

2014-07-02 Thread Idris Samawi Hamid ادريس سماوي حامد
On Wed, 02 Jul 2014 15:12:10 -0600, Idris Samawi Hamid ادريس   سماوي حامد  
 wrote:


What is the recommended, more efficient workflow for this sort of thing?  
Should I start with markdown and then generate context and epub (then  
convert epub=>kindle I presume)? Or does one context file with pdf and  
epub outputs work well? Many years ago I did some documents in ConTeXt  
with both print and screen pdfs from a single source. Can we do the  
latter in ConTeXt now?



Er, Can we do the *former* in ConTeXt? Viz., generate both pdf and epub  
from a single source.


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department 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] Whitespace within framedtexts

2014-07-13 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

How do we activate/control whitespace (and indenting) within framed texts?  
The following seems to fail:


==
\setupframedtexts
[frame=off,
location=middle,
before={\blank[medium]\setupwhitespace[medium]},
after={\blank[medium]}]

\setupwhitespace[medium]
\setupindenting[yes,medium,first]

\starttext
\input knuth

\startframedtext
\input knuth
\stopframedtext

\input knuth
\stoptext
==

See attached. Thanks in advance and

Best wishes
Idris
--
Idris Samawi Hamid, Professor
Department 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] Whitespace within framedtexts

2014-07-13 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 13 Jul 2014 16:35:32 -0600, Idris Samawi Hamid ادريس   سماوي حامد  
 wrote:



See attached.


Attached

--

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

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

Re: [NTG-context] Whitespace within framedtexts

2014-07-13 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 13 Jul 2014 16:46:00 -0600, Aditya Mahajan   
wrote:




On Jul 13, 2014, at 6:35 PM, Idris Samawi Hamid ادريس   سماوي حامد  
 wrote:


Dear gang,

How do we activate/control whitespace (and indenting) within framed  
texts? The following seems to fail:


==
\setupframedtexts
[frame=off,
location=middle,
before={\blank[medium]\setupwhitespace[medium]},
after={\blank[medium]}]

\setupwhitespace[medium]
\setupindenting[yes,medium,first]

\starttext
\input knuth

\startframedtext
\input knuth
\stopframedtext

\input knuth
\stoptext
==

See attached. Thanks in advance


Untested: try indenting=yes for indentation. For white space, enclose  
the settings in a startsetups...stopsetups, and then use the setups=...  
key for framedtext.


Thanks Aditya. indenting=yes was a bust but the following works:

\startsetups[framedwhitespace]
\setupwhitespace[medium]
\setupindenting[yes,medium,first]
\stopsetups

Thanks again and best wishes
Idris
--

Idris Samawi Hamid, Professor
Department 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] ANNOUNCEMENT: Arabic-Latin Modern Fixed

2014-08-14 Thread Idris Samawi Hamid ادريس سماوي حامد
[This announcement is dedicated to the 110% recovery and return of our  
visionary and fearless leader Hans Hagen: Three cheers to you, Hans!!!]


Dear gang,

It's my pleasure to announce the release of Arabic-Latin Modern Fixed, a  
monospaced font that extends TeX-Gyre Latin Modern Mono 10 Regular. It has  
been uploaded to CTAN, although I do not know how long it will take for  
the CTAN people to approve and publish it. Eventually it will make it's  
way into the ConTeXt minimals as well. Until then, you may use this  
private link:


https://www.dropbox.com/s/pulgaxshzr5bcmy/almfixed.zip

README.txt is reproduced below. Future plans include both bold and  
proportional versions. Enjoy and


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

==README.txt==
Typeface Family: Arabic-Latin Modern
Font: Arabic-Latin Modern Fixed
Style: Regular
Version: 0.92
Author: Idris Samawi Hamid
Date: August 5, 2014

License:

Arabic-Latin Modern Fixed is licensed under the GUST Font License with one  
important adjustment: It is requested, as well as legally *required*, that  
derived works be distributed only after changing the names of the fonts  
comprising this work.


http://www.gust.org.pl/projects/e-foundry/licenses/GUST-FONT-LICENSE.txt/view

Contains:

http://www.ctan.org/tex-archive/fonts/doc/almfixed-dtk.pdf
http://www.ctan.org/tex-archive/fonts/ps;
http://www.ctan.org/tex-archive/fonts/tt;

Some notes, in no particular order:

1. For more extensive documentation, examples, and background; see  
almfixed-dtk.pdf.


2. The final version number (per any future fixes, maintenance etc.) is  
intended to be Version 1.10.


3. Arabic-Latin Modern Fixed is an extension of TeX-Gyre Latin Modern Mono  
10 Regular. Every glyph and opentype feature of the Latin Modern Mono has  
been retained, with minor improvements. On the other hand, we have changed  
the vertical metrics of the font. Although the Arabic script is designed  
to use the same x-size as Latin Modern Mono, the former script needs  
greater ascender and descender space. And there are cases (such as certain  
kinds of academic assignment and definitely mixed Latin and Arabic text)  
where Latin can use the extra vertical space as well. Otherwise, only the  
vertical metrics prevents this from being a drop-in replacement for Latin  
Modern Mono . Of course one can always set the vertical metrics in TeX to  
match LM Mono.


4. Every Arabic glyph in each Unicode-code block is supported (up to  
Unicode 7.0): Arabic, Arabic Supplement, Arabic Extended, Arabic  
Presentation-Forms A, and Arabic Presentation-Forms B.


5. This is a totally original design, using the Knuthian letters as  
inspiration. Indeed, virtually all Arabic characters were developed on the  
foundation of a study of the Latin Modern Mono letters 'l', 'r', and 'c'.  
In other words, this is a genuine extension of the original Knuthian  
design to an authentic and culturally authentic Arabic typing font.


6. There are two versions of the font: ps and tt. The Type~1 version is  
for print applications (and usually the default for TeX). The TrueType  
version is for on-screen applications such as text editors. Hinting in the  
tt version is much better for on-screen, at least on Microsoft Windows.


7. The most unique feature of Arabic-Latin Modern is in its treatment of  
vowels and diacritics. Each vowel and diacritic (ALM Fixed contains a  
total of 68 such glyphs) can now be edited horizontally within any text  
editor or processor. I believe this is the very first opentype Arabic font  
ever to have this capability. Editing complex Arabic texts will now be  
much easier to input and to proofread.


8. At least 12 additional format characters are included; see  
almfixed-dtk.pdf for details. Also designed a glyph representation for  
U+00A0 (no-break space), as well as U+25CC (dotted circle).


9. Arabic-Latin Modern Mono will be a boon to scholars, academics, coder  
editors, and anyone who wants to manage the entry of the wide array of  
Unicode Arabic text for editing, verbatim, or other purposes.

==
___
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] Using TABLE in a definition etc.

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

Dear gang,

I'm trying to setup a definition that uses a natural table and could use  
some guru help. Here is what I have so far:


===
\def\Glyphbox{%
\setupframed[frame=off,align=middle,offfset=none]
\framed{\cbox{
\bTABLE[align=middle]
\bTR \bTD \gulistan#1 \fontchar{#2} \eTD \eTR
\bTR \bTD #1 \eTD \eTR
\bTR \bTD #3 \eTD \eTR
\eTABLE
}}
}
==

Some issues:

1. '#' is probably active and being used in the internals, so of course I  
can't directly use it as an argument parameter. How do I work around it?


2. The '#1' at the end of '\gulistan' is meant to complete the name of a  
defined font, then that same parameter is used as a name in the next row.  
Am I doing this correctly? I.e., can I use an argument parameter to finish  
off a command like this? [Yes, my low level TeX is really quite rusty].


3. Once this table is defined correctly it will be used in a larger table,  
e.g.


==
\bTABLE
\bTR \bTD \Glyphbox{}{}{} \eTD \bTD  \Glyphbox{}{}{} \eTD \eTR
\bTR \bTD \Glyphbox{}{}{} \eTD \bTD  \Glyphbox{}{}{} \eTD \eTR
\eTABLE
==

with arguments appropriately filled.

Thanks in advance for any and all advice, 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
___


  1   2   3   4   >