Re: [NTG-context] Converting normal font into bold

2013-11-25 Thread Hans Hagen

On 11/25/2013 12:34 AM, H. Özoguz wrote:

Thanks, that works fine:

\definefont[arabicamiri][file:amiri-regular.ttf*arabic at 15pt]
\definefont[arabicuth][file:UthmanicHafs1Ver09.ttf*arabic at 17pt]
\def\eoa#1{#1\char06DD}
\starttext
\setupalign[r2l]
\arabicuth لأَفَبِهَـٰذَا ٱلْحَدِيثِ أَنتُم مُّدْهِنُونَ ﴿٨١﴾\eoa
\stoptext


Now I could locate the error in ConText better, see this code and the
mistake, which occurs:

\definefont[arabicuth][file:UthmanicHafs1Ver09.ttf*arabic at 17pt]
\define[1]\eoa{#1\char06DD}
\starttext
\setupalign[r2l]
\arabicuth

إِنَّ ٱلَّذِينَ كَفَرُوا سَوَآءٌ عَلَيْهِمْ ءَأَنذَرْتَهُمْ أَمْ لَمْ 
تُنذِرْهُمْ لَا يُؤْمِنُونَ ﴿٦﴾\blank

إِنَّ ٱلَّذِينَ كَفَرُوا سَوَآءٌ عَلَيْهِمْ ءَأَنذَرْتَهُمْ أَمْ لَمْ 
تُنذِرْهُمْ لَا يُؤْمِنُونَ ﴿٦٦﴾
\stoptext

(I have attached the compiled PDF).

The first aya, with a single one-digit number is not regonized
correctly, but the second is (with a two-digit-number). Why?


i tried to reproduce your issue but gave up because of the fact that 
it's unclear what (version) of the font is used ... you switched from 10 
to 09 and in 09 i see no 'big circular thing' so your version is 
different from the one i donwload ... so, i cannot even be certain that 
the font is okay ... so if you want to test:


- make sure that you use fonts consistently
- make sure we know where to get that version of the font
- make sure that corel draw (or whatever) is using the same font

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Converting normal font into bold

2013-11-25 Thread Khaled Hosny
On Sun, Nov 24, 2013 at 10:18:47PM +0100, H. Özoguz wrote:
 It is my believe that Unicode has the wrong properties for Arabic
 standalone Hamza; in short you should just type a regular Hamza in the
 middle of the word and it will get positioned correctly. Placing a
 combining Hamza over a Tatweel to “fake” it is wrong IMO. So in Amiri
 you just type “بِءَايَٰتِ” and voilà, every thing is rendered correctly (the
 same is true for the small Alef).
 
 Yes, that works. But the direct way works with Uhtmanic1HafsVer9:
 
 \definefont[arabicamiri][file:amiri-regular.ttf*arabic at 15pt]
 \definefont[arabicuth][file:UthmanicHafs1Ver09.ttf*arabic at 17pt]
 \starttext
 \setupalign[r2l]
 \arabicamiri بِـَٔايَـٰتِ
 \blank
 \arabicuth بِـَٔايَـٰتِ
 \stoptext

I consider this wrong input so it is not supported by Amiri; the Hamza
in بءايت is exactly the same Hamza in ءايت prefixed with ب, so the same
Unicode character should be used in both, and Amiri goes to a great
length to support this. Using a combing Hamza (which is a different
Hamza) over a Tatweel is just a hack to emulate the same effect that you
get “natively” with Amiri, I may support it in the future, but it is not
a priority. If you read Arabic, the Amiri manual describes the proper
Unicode sequences to input some of the Quranic marks that people get
confused about because of the messiness of this area in Unicode (I
should translate the manual to English, but time is always an issue).

 
 To be honest, in Corel Draw UthmanicHafs is the perfect font for my purpose
 - at least in CorelDraw - e.g.: The ayat-numbers are printed as a
 unicode-symbol, not as numbers (perfect, because ConTeXt has problems with
 the direction with arabic numbers, they are mirrored in ConTeXt).
 
 But it is only perfect in CorelDraw, in ConTeXt some things are not
 recognized correctly, as I mentioned. E.g. this one:
 
 \definefont[arabicamiri][file:amiri-regular.ttf*arabic at 15pt]
 \definefont[arabicuth][file:UthmanicHafs1Ver09.ttf*arabic at 17pt]
 \starttext
 \setupalign[r2l]
 \arabicuth لِّلْمُتَّقِينَ ﴿٢﴾
 \stoptext
 
 If I put the same arabic into CorelDraw, it prints a nice Unicode-Symbol for
 the number - see the JPG I have attached here, screenshot from CorelDraw,
 but ConTeXt ignores the brackets and prints just a verys small number. There
 are some problems like this. Are they easy to fix, or is this problem deeply
 involved?

This seems like a font hack, the proper way to input the Aya mark is
what Ondřej describes in his reply.

Regards,
Khaled
___
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] large delimiters for equation

2013-11-25 Thread Roger Mason

Hello,

I'd like to have delimiters that match the height of the fraction in an 
expression like this:


\startformula
  c\Delta T = t\big{(} \frac{c}{v_s} - \frac{c}{v_f} \big{)}.
\stopformula

I looked in the docs and tried a few likely solutions without luck.

Please accept my apologies if this is documented eleswhere.

Thanks,
Roger
___
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] large delimiters for equation

2013-11-25 Thread Aditya Mahajan

Hello,

I'd like to have delimiters that match the height of the fraction in an 
expression like this:


\startformula
 c\Delta T = t\big{(} \frac{c}{v_s} - \frac{c}{v_f} \big{)}.
\stopformula

I looked in the docs and tried a few likely solutions without luck.


\left( \frac \right)

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] pstrics module again

2013-11-25 Thread DesdeChaves
Dear sirs

The pstrics module don't work anymore. I tried to run this simple code but
I found a lot of errors.

\usemodule[pstric]
\starttext
\startPSTRICKS
\pspicture(0,0)(20,20)
\psline(0,0)(20,20)
\psline(1,1)(10,10)
\endpspicture
\stopPSTRICKS
\stoptext


This module is no longer supported?
There is still any hope of being able to use pstric and some of its
extensions (pst-spectra, for example)?

Thanks a lot

Sorry for my persistence about pstrics module.

Thanks a lot

Jorge
___
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] pstrics module again

2013-11-25 Thread Aditya Mahajan

On Mon, 25 Nov 2013, DesdeChaves wrote:


Dear sirs

The pstrics module don't work anymore. I tried to run this simple code but
I found a lot of errors.

\usemodule[pstric]
\starttext
\startPSTRICKS
\pspicture(0,0)(20,20)
\psline(0,0)(20,20)
\psline(1,1)(10,10)
\endpspicture
\stopPSTRICKS
\stoptext


It appears that pstrick files are no longer part of the standalone 
distribution, but if you copy a bunch of files, then the above example 
does work.



This module is no longer supported?
There is still any hope of being able to use pstric and some of its
extensions (pst-spectra, for example)?


This is what I did.

1. Compile the file. You get an error that some pstrick file is missing. 
Locate that file in the texlive directory and copy it to the current 
directory.


2. Repeat until you get an error that \ifx! is not a valid control 
sequence.


3. Run `grep ifx! *.tex` and change all the \ifx!#1 to \ifx !#1.

4. Then you get an error that colo-rgb is missing. Copy colo-rgb.mkii to 
the current directory as colo-rgb.tex.


5. Then you get a error message the some .pro file is missing. Find that 
file from the texlive directory and copy it to the current directory. 
Repeat until all errors are resolved.


Finally you'll get the correct output.

So it seems that if pstricks is added back to the minimals (so that errors 
in step 1 and 5 don't happen), then it should be straightforward to get it 
to work with context. (Just load the file with the correct catcode regime, 
so that ! is a other character, and the error in step 2-3 will not 
happen). THe error in step 3 is easy to fix by editing m-pstricks.


Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Converting (a not so) normal font into bold

2013-11-25 Thread Hans Hagen

On 11/25/2013 12:20 PM, H. Özoguz wrote:

i tried to reproduce your issue but gave up because of the fact that
it's unclear what (version) of the font is used ... you switched from 10
to 09 and in 09 i see no 'big circular thing' so your version is
different from the one i donwload ... so, i cannot even be certain that
the font is okay ... so if you want to test:

- make sure that you use fonts consistently
- make sure we know where to get that version of the font
- make sure that corel draw (or whatever) is using the same font


You are right, sorry to annoy you here, some chaos in my place ...

So, to clear all questions: for this min-example (which is at the moment
my last unsolved problem with this font) I used this font:
http://fonts.qurancomplex.gov.sa/download/UthmanicHafs1Ver09Font.zip

And yes, Corel Draw uses this font, too.

BUT: There might me some issue with this font relating this
end-of-aya-symbol, independent from ConTeXt. See the attached JPG, which
is the output of CorelDraw, if I input exactly the same arabic code,
like in my example.
You see in the picture a different behaviour between the one-digit and
two-digit numbers aswell. But it is a different behaviour from ConText,
the symbol is used, but the brackets are not replaced.

Can you reproduce it now?


yes, but calling this a normal font is somewhat over-the-top

(1) the left/right () are not part of the lookup, and they are not even 
in the font: imo they should be, and also be part of the lookup then


(2) you cannot expect other digits to work well as *all* become 
ornamented, so the font is only useable for special purposes (for which 
it might lack other niceties)


(3) the arabic number * n are mapped onto a ligature (lots of them are 
available in the font, upto a certain number)


(4) so, also a single digit is a ligature and (mostly because i have all 
kinds of tracing depending on cases, i never expected that one to happen 
so it was not done at all)


At least I now see the odd cases and keep an eye on them. It's also 
another demo that traditional font terminology - like 'ligature' - in 
opentype usage / implementation is rather useless.


I uploaded a beta that fixes the 
single-substitution-disguised-as-ligature but be aware of the fact that 
it's a somewhat weird font so watch your input.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] pstrics module again

2013-11-25 Thread Herbert Voss

Am 25.11.2013 19:55, schrieb Aditya Mahajan:


This is what I did.

1. Compile the file. You get an error that some pstrick file is missing.
Locate that file in the texlive directory and copy it to the current
directory.

2. Repeat until you get an error that \ifx! is not a valid control
sequence.

3. Run `grep ifx! *.tex` and change all the \ifx!#1 to \ifx !#1.


why does ConTeXt needs the space before the !  ??

Herbert

___
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] Converting (a not so) normal font into bold

2013-11-25 Thread Hans Hagen

On 11/25/2013 8:18 PM, Hans Hagen wrote:


yes, but calling this a normal font is somewhat over-the-top

(1) the left/right () are not part of the lookup, and they are not even
in the font: imo they should be, and also be part of the lookup then

(2) you cannot expect other digits to work well as *all* become
ornamented, so the font is only useable for special purposes (for which
it might lack other niceties)

(3) the arabic number * n are mapped onto a ligature (lots of them are
available in the font, upto a certain number)

(4) so, also a single digit is a ligature and (mostly because i have all
kinds of tracing depending on cases, i never expected that one to happen
so it was not done at all)

At least I now see the odd cases and keep an eye on them. It's also
another demo that traditional font terminology - like 'ligature' - in
opentype usage / implementation is rather useless.

I uploaded a beta that fixes the
single-substitution-disguised-as-ligature but be aware of the fact that
it's a somewhat weird font so watch your input.


test code:

\starttext

\showotfcomposition{file:uthmanichafs1ver09.ttf*arabic}{r2l}{١}   \page
\showotfcomposition{file:uthmanichafs1ver09.ttf*arabic}{r2l}{١ ١} \page
\showotfcomposition{file:uthmanichafs1ver09.ttf*arabic}{r2l}{١١}  \page

% \usemodule[fonts-coverage]
% \showfontcomparison[list=file:uthmanichafs1ver09.ttf]

\stoptext

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Intermediate format

2013-11-25 Thread Jan Tosovsky
On 2013-11-25 Hans Hagen wrote:
 On 11/24/2013 8:32 PM, Jan Tosovsky wrote:
 
  is it possible to get the complete representation of the layout that
  is processed in the luatex PDF generator?
 
  I mean coordinations of individual text boxes, their dimensions etc.
 
  Actually, I'd like to retrieve the page number and vertical position
  of my object with a specific id (reference) to be able to perform PDF
  post-processing.
 
 \starttext
 
  we are here: \setposition{crap}(\MPx{crap},\MPy{crap})
 
 \stoptext

Thanks! Looks promising, Actually I'd like to print it into a log or
somewhere else, not into the document itself. But I need also the page
number. Every record should be ideally in the form: ID;page-number;Y-coord.

  Is DVI way to go? How can I get it in MkIV? 

I've found that luatex can optionally output DVI [1], but I cannot find any
ConTeXt commandline switch to change the output format from PDF to something
else...

Thanks, Jan

___
[1]
http://tex.stackexchange.com/questions/42216/which-tex-programs-produce-dvi-
output


___
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] pstrics module again

2013-11-25 Thread Aditya Mahajan

On Mon, 25 Nov 2013, Herbert Voss wrote:


Am 25.11.2013 19:55, schrieb Aditya Mahajan:


This is what I did.

1. Compile the file. You get an error that some pstrick file is missing.
Locate that file in the texlive directory and copy it to the current
directory.

2. Repeat until you get an error that \ifx! is not a valid control
sequence.

3. Run `grep ifx! *.tex` and change all the \ifx!#1 to \ifx !#1.


why does ConTeXt needs the space before the !  ??


ConTeXt has two catcode regimes: the standard catcode regime and the 
unprotected catcode regime.


In the unprotected catcode regime, !, _, and @ are also letters. This is 
done so that one can use csnames such as \c!width, \!!plusone, etc. 
(Similar to \makeatletter in LaTeX).


I haven't looked at the actual code, but I am guessing that at some place, 
the following code is being called:


\unprotect
\input pstricks
\protect

and therefore when ConTeXt sees \ifx!#1 it thinks that \ifx! is a csname. 
Adding a space after \ifx avoids that.


As I said in my previous message, this is easy to fix at ConTeXt end 
defining an appropriate catcode regime before inputing pstricks.


So, the pstricks package does not need to be changed, but the ConTeXt code 
that is calling the package needs to be adapted.


Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] pstrics module again

2013-11-25 Thread Herbert Voss

Am 25.11.2013 21:25, schrieb Aditya Mahajan:


\unprotect
\input pstricks
\protect

and therefore when ConTeXt sees \ifx!#1 it thinks that \ifx! is a
csname. Adding a space after \ifx avoids that.

As I said in my previous message, this is easy to fix at ConTeXt end
defining an appropriate catcode regime before inputing pstricks.

So, the pstricks package does not need to be changed, but the ConTeXt
code that is calling the package needs to be adapted.


ok, understood.

thanks,
Herbert
___
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] Intermediate format

2013-11-25 Thread Aditya Mahajan

On Mon, 25 Nov 2013, Jan Tosovsky wrote:


On 2013-11-25 Hans Hagen wrote:

On 11/24/2013 8:32 PM, Jan Tosovsky wrote:


is it possible to get the complete representation of the layout that
is processed in the luatex PDF generator?

I mean coordinations of individual text boxes, their dimensions etc.

Actually, I'd like to retrieve the page number and vertical position
of my object with a specific id (reference) to be able to perform PDF
post-processing.


\starttext

 we are here: \setposition{crap}(\MPx{crap},\MPy{crap})

\stoptext


Thanks! Looks promising, Actually I'd like to print it into a log or
somewhere else, not into the document itself. But I need also the page
number. Every record should be ideally in the form: ID;page-number;Y-coord.


\setposition{id}
\message{id:\MPp{id};\MPy{id};\MPx{id}}

should work (untested). Then you can parse the log file.

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Intermediate format

2013-11-25 Thread Hans Hagen

On 11/25/2013 9:07 PM, Jan Tosovsky wrote:

On 2013-11-25 Hans Hagen wrote:

On 11/24/2013 8:32 PM, Jan Tosovsky wrote:


is it possible to get the complete representation of the layout that
is processed in the luatex PDF generator?

I mean coordinations of individual text boxes, their dimensions etc.

Actually, I'd like to retrieve the page number and vertical position
of my object with a specific id (reference) to be able to perform PDF
post-processing.


\starttext

  we are here: \setposition{crap}(\MPx{crap},\MPy{crap})

\stoptext


Thanks! Looks promising, Actually I'd like to print it into a log or
somewhere else, not into the document itself. But I need also the page
number. Every record should be ideally in the form: ID;page-number;Y-coord.


Is DVI way to go? How can I get it in MkIV?


I've found that luatex can optionally output DVI [1], but I cannot find any
ConTeXt commandline switch to change the output format from PDF to something
else...


indeed, no dvi ... it doesn't pay off to spend time on making all 
backend functionality multi-mode


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Intermediate format

2013-11-25 Thread Jan Tosovsky
On 2013-11-25 Aditya Mahajan wrote:
  On 11/24/2013 8:32 PM, Jan Tosovsky wrote:
 
  is it possible to get the complete representation of the layout
  that is processed in the luatex PDF generator?
 
  I mean coordinations of individual text boxes, their dimensions
  etc.
 
  Actually, I'd like to retrieve the page number and vertical
  position of my object with a specific id (reference) to be able 
  to perform PDF post-processing.
 
 
 \setposition{id}
 \message{id:\MPp{id};\MPy{id};\MPx{id}}
 
 should work (untested). Then you can parse the log file.

This is coool!

Is there any documentation to all this stuff? I cannot find anything in Wiki
or User Guide...

Jan

___
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] Converting (a not so) normal font into bold

2013-11-25 Thread H. Özoguz

test code:

\starttext

  \showotfcomposition{file:uthmanichafs1ver09.ttf*arabic}{r2l}{١}   \page
  \showotfcomposition{file:uthmanichafs1ver09.ttf*arabic}{r2l}{١ ١} \page
  \showotfcomposition{file:uthmanichafs1ver09.ttf*arabic}{r2l}{١١}  \page

  % \usemodule[fonts-coverage]
  % \showfontcomparison[list=file:uthmanichafs1ver09.ttf]

\stoptext


Thank you very much, Hans! Now all issues with this font are solved (new 
issues within my actual project will surely follow, but no font-issues, 
I hope).
I have to say once more, that I never had experienced before a such fast 
and competent software-support, that is at least as valuable as the 
software itself is!


To your comments: Ok, yes, it is not a really normal font. It is 
specially designed for typesetting the holy quran (which is really no 
easy work). And there is so absolutely no problem that ALL numbers are 
mapped to ligatures - there are no digits in the text of the holy quran 
:) (all numbers are written out at that time).


Thanks again!
Huseyin
___
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] large delimiters for equation

2013-11-25 Thread Roger Mason

Thanks Aditya.

Roger

On 11/25/2013 12:21 PM, Aditya Mahajan wrote:


\left( \frac \right)

Aditya


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Intermediate format

2013-11-25 Thread Hans Hagen

On 11/25/2013 9:54 PM, Jan Tosovsky wrote:

On 2013-11-25 Aditya Mahajan wrote:

On 11/24/2013 8:32 PM, Jan Tosovsky wrote:


is it possible to get the complete representation of the layout
that is processed in the luatex PDF generator?

I mean coordinations of individual text boxes, their dimensions
etc.

Actually, I'd like to retrieve the page number and vertical
position of my object with a specific id (reference) to be able
to perform PDF post-processing.




\setposition{id}
\message{id:\MPp{id};\MPy{id};\MPx{id}}

should work (untested). Then you can parse the log file.


This is coool!

Is there any documentation to all this stuff? I cannot find anything in Wiki
or User Guide...


probably all over the place, but the metafun manual is one of them

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ToC - right-alignment of roman numerals

2013-11-25 Thread Hans Hagen

On 11/24/2013 10:49 PM, Jan Tosovsky wrote:

On 2013-11-18 Jan Tosovsky wrote:

On 2013–06–03 Jan Tosovsky wrote:
in fresh MkIV I use the following commands for building ToC, but I
have no idea how to align the label (roman numeral) to the right.


I am almost there, but things get complicated when chapters are
combined with preface/index titles without numbering and thus aligned
improperly:

\setupcombinedlist[content][list=chapter, alternative=c]
\setupcombinedlist[chapter][
distance=1em,
width=1cm,

numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]

\starttext
\completecontent

\startfrontmatter
\chapter{Preface}text
\stopfrontmatter

\startbodymatter
\chapter{Chapter}text\index{primary}
\stopbodymatter

\startbackmatter
\completeindex
\stopbackmatter

\stoptext

Is there any way how to indent these non-numbered titles so that they
start where the chapter title starts?


I've fixed it by applying a margin to everything and setting a negative width 
to the numbers (distance = -width):

\setupcombinedlist[chapter][
distance=0.5cm,
width=-0.5cm,
margin=2cm,
numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]

I don't know exactly why it works, but it works :-)



\setupcombinedlist
  [content]
  [list=chapter,
   alternative=c]

\setuplist
  [chapter]
  [aligntitle=yes,
   distance=1em,
   width=1cm]

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Intermediate format

2013-11-25 Thread Aditya Mahajan

On Mon, 25 Nov 2013, Jan Tosovsky wrote:


On 2013-11-25 Aditya Mahajan wrote:

On 11/24/2013 8:32 PM, Jan Tosovsky wrote:


is it possible to get the complete representation of the layout
that is processed in the luatex PDF generator?

I mean coordinations of individual text boxes, their dimensions
etc.

Actually, I'd like to retrieve the page number and vertical
position of my object with a specific id (reference) to be able
to perform PDF post-processing.




\setposition{id}
\message{id:\MPp{id};\MPy{id};\MPx{id}}

should work (untested). Then you can parse the log file.


This is coool!

Is there any documentation to all this stuff? I cannot find anything in Wiki
or User Guide...


Not really. See http://tex.stackexchange.com/a/125486/323 (and its edit 
history) to see a usage of some more of these features.


Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ToC - right-alignment of roman numerals

2013-11-25 Thread Jan Tosovsky
On 2013-11-25 Hans Hagen wrote:
 On 11/24/2013 10:49 PM, Jan Tosovsky wrote:
  On 2013-11-18 Jan Tosovsky wrote:
  On 2013–06–03 Jan Tosovsky wrote:
 
  in fresh MkIV I use the following commands for building ToC, but I
  have no idea how to align the label (roman numeral) to the right.
 
  I am almost there, but things get complicated when chapters are
  combined with preface/index titles without numbering and thus
  aligned improperly:
 
  \setupcombinedlist[content][list=chapter, alternative=c]
  \setupcombinedlist[chapter][
  distance=1em,
  width=1cm,
 
 numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
  ]
 
  \starttext
  \completecontent
 
  \startfrontmatter
  \chapter{Preface}text
  \stopfrontmatter
 
  \startbodymatter
  \chapter{Chapter}text\index{primary}
  \stopbodymatter
 
  \startbackmatter
  \completeindex
  \stopbackmatter
 
  \stoptext
 
  Is there any way how to indent these non-numbered titles so that
  they start where the chapter title starts?
 
  I've fixed it by applying a margin to everything and setting a
  negative width to the numbers (distance = -width):
 
  \setupcombinedlist[chapter][
  distance=0.5cm,
  width=-0.5cm,
  margin=2cm,
 
 numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
  ]
 
  I don't know exactly why it works, but it works :-)
 
 
 \setupcombinedlist
[content]
[list=chapter,
 alternative=c]
 
 \setuplist
[chapter]
[aligntitle=yes,
 distance=1em,
 width=1cm]
 

Thanks for this alternative, but I am getting something different. Desired 
output can be produced with this code:

\setuphead[chapter][conversion=Romannumerals]
%\setupheadnumber[chapter][48] % this is ignored when a preface is defined
\setupcombinedlist[content][alternative=c]
\setupcombinedlist[chapter][
   distance=1em,
   width=-1em,
   margin=15mm,
   numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]

\starttext
\completecontent

\startfrontmatter
\chapter{Preface}
\stopfrontmatter

\startbodymatter
\chapter{Chapter1}
\chapter{Chapter2}
\chapter{Chapter3}
\chapter{Chapter4}
\stopbodymatter

\stoptext
If there is a less cumbersome method, thanks for sharing.

Jan

___
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] pstrics module again

2013-11-25 Thread DesdeChaves
I d'ont know how to fix the picture size.
No errors at all, but the figure size isn't correct.

\usemodule[pstric]

\starttext


Hydrogen spectrum

\startPSTRICKS
\input pst-spectra.tex
\input pstricks-add.tex
\pspicture(0,-2.5)(\textwidth,1.6)
\psspectrum[element=H, emission](0,0)(\textwidth,1.5)
\rput(2,1){Hydrogen spetrum}
\endpspicture
\stopPSTRICKS




\stoptext


2013/11/25 DesdeChaves desdecha...@gmail.com

  radical solution

  Download and unpack the PSTRicks-TDS.tar to a directory
  cp ./PSTricks-TDS/tex/generic/*/*.tex .
  perl -pi.back -e 's/\ifx!#1/\ifx !#1/g;' *.tex
  rm -rf *.back
  cp /usr/local/texlive/2013/texmf-dist/tex/context/base/colo-rgb.mkii
 ./colo-rgb.tex
  run context

  change in m-pstric.* files ps2pdf to pstopdf

 tanks a lot

 Jorge


 2013/11/25 Herbert Voss herbert.v...@fu-berlin.de

 Am 25.11.2013 21:25, schrieb Aditya Mahajan:


  \unprotect
 \input pstricks
 \protect

 and therefore when ConTeXt sees \ifx!#1 it thinks that \ifx! is a
 csname. Adding a space after \ifx avoids that.

 As I said in my previous message, this is easy to fix at ConTeXt end
 defining an appropriate catcode regime before inputing pstricks.

 So, the pstricks package does not need to be changed, but the ConTeXt
 code that is calling the package needs to be adapted.


 ok, understood.

 thanks,
 Herbert

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




 --
 Atentamente

 DesdeChaves




-- 
Atentamente

DesdeChaves
___
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] pstrics module again

2013-11-25 Thread Aditya Mahajan

On Mon, 25 Nov 2013, DesdeChaves wrote:


I d'ont know how to fix the picture size.
No errors at all, but the figure size isn't correct.


Confirmed.


\usemodule[pstric]

\starttext

Hydrogen spectrum

\startPSTRICKS
\input pst-spectra.tex
\input pstricks-add.tex
\pspicture(0,-2.5)(\textwidth,1.6)
\psspectrum[element=H, emission](0,0)(\textwidth,1.5)
\rput(2,1){Hydrogen spetrum}
\endpspicture
\stopPSTRICKS

\stoptext


The proper interface is

\usemodule[pstricks]

\usePSTRICKSmodule[pst-add]
\usePSTRICKSmodule[pst-spectra]

When you run the above file, ConTeXt creates the following temp file:

\starttext
\pushcatcodetable
\setcatcodetable\texcatcodes
\usemodule[pstric]
\readfile{pst-add}{}{}
\readfile{pst-spectra}{}{}
\popcatcodetable
\startTEXpage
\hbox\bgroup
\ignorespaces
\pspicture(0,-2.5)(\textwidth,1.6)
\psspectrum[element=H, emission](0,0)(\textwidth,1.5)
\rput(2,1){Hydrogen spetrum}
\endpspicture
\removeunwantedspaces
\egroup
\obeydepth % temp hack as we need to figure this out
\stopTEXpage
\stoptext

runs mtxrun --script texexec %s --once --dvips filename
and then runs ps2pdf inputname outputname

but that generates the file with the wrong size. dvips gives the following 
error message:


' TeX output 2013.11.25:1841' - test-pstricks-0001.ps
Page 1 may be too complex to print
dvips: no match for special paper size found; using default

(and that is the reason for the wrong paper size).

It has been years since I used dvips, so I don't remember how to correct 
that. Basically, the bug is with the following file:


\starttext
\startTEXpage
  What will happen now
\stopTEXpage
\stoptext

Process using mtxrun --script test --dvips and then ps2pdf and the 
resulting pdf file has the wrong bounding box.


Aditya

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] pstrics module again

2013-11-25 Thread Aditya Mahajan

On Mon, 25 Nov 2013, Aditya Mahajan wrote:

It has been years since I used dvips, so I don't remember how to correct 
that. Basically, the bug is with the following file:


\starttext
\startTEXpage
 What will happen now
\stopTEXpage
\stoptext

Process using mtxrun --script test --dvips and then ps2pdf and the 
resulting pdf file has the wrong bounding box.


The file processes correctly (but in landscape orientation) when using 
pstopdf, so it is just a bug of ps2pdf.


The header of the ps file is:

%!PS-Adobe-2.0
%%Creator: dvips(k) 5.993 Copyright 2013 Radical Eye Software
%%Title: test.dvi
%%CreationDate: Mon Nov 25 18:43:15 2013
%%Pages: 1
%%PageOrder: Ascend
%%Orientation: Landscape
%%BoundingBox: 0 0 15 117
%%DocumentFonts: LMRoman12-Regular
%%EndComments
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -u +original-base -u +original-ams-base -u
%+ +original-public-lm -u +lm-ec -u +lm-math -u +lm-rm -u
%+ +original-ams-euler test
%DVIPSParameters: dpi=600
%DVIPSSource:  TeX output 2013.11.25:1843
%%BeginProcSet: tex.pro 0 0
%!

Why is dvips adding Orientation: Landscape in the header?
___
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] Calculating with variables

2013-11-25 Thread H. Özoguz

Hello there,

I am new in variables in ConTeXt, so I tried the the following example 
of two font-sizes wich should have a ratio of 0.7:


\setvariables[fontsize][bigsize=17pt]
\setvariables[fontsize][smallsize=0.7\getvariable{fontsize}{size}]

\definefont[big][name:arial at \getvariable{fontsize}{bigsize}]
\definefont[small][name:arial at \getvariable{fontsize}{smallsize}]

\starttext
\big Dies ist ein großer Text.\blank
\small Dies ist ein kleiner Text.
\stoptext

That does not work, what is the correct syntax?

[Second question about this will be much more involving I think ... :), 
but I will give it his own thread].


Thanks.
Huseyin
___
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
___