Re: [NTG-context] Arabic support

2020-09-23 Thread Mohammad Hossein Bateni
Hi Denis,

See this page [https://wiki.contextgarden.net/RTL] which may need some
updating.  I have some more definitions here [
https://github.com/bateni/dabeer/blob/master/texmf-local/tex/context/modules/dabeer/mkiv/p-dabeer.mkiv],
though it's partly to handle differences between Persian and Arabic.

Not all directions are reversed automatically. Beside footnotes, you might
need to do it for tables, columns, pages, headers, footers, registers
(index), etc. I don't recall if sorting was done properly for Arabic
(needed for registers). Some trickery may be needed to get the RTL right
when numbers are involved, say, for enumerations (theorems, lemma, etc.)
and TOC numbering. These are not specific to Arabic, though, and should
surface for Hebrew as well.

Once in a while I run into problems with misoriented parentheses or
quotation marks (specially https://en.wiktionary.org/wiki/%C2%AB_%C2%BB).
This may be due to setupdirection algorithms or a side effect of how some
Context commands work. One needs to document them, so a fix is uploaded.

Depending on what you want to typeset, you may need to change the numerals
(for page numbers, enumerations, figure and table numbers, etc.) as well as
dates, etc.  Some of these are already handled via the \mainlanguage[ar]
command.

Regards,
MHB

On Mon, Sep 21, 2020 at 2:46 AM Denis Maier 
wrote:

> Hi
>
> Just wondering what the current support for Arabic is. Does anyone know?
> My document works fine for Hebrew and I've just added a new fontfallbac:
> \definefallbackfamily[mainface][rm][Scheherazade] [range=arabic,
> force=yes, features=arabic]
>
> Bidi is activated with \setupdirections[bidi=global,method=unicode]
>
> Is that enough for Arabic? Or are there other things I need to take care
> of?
>
> E.g. searching in the mailing-list archive I found this message:
> https://www.mail-archive.com/ntg-context@ntg.nl/msg78573.html
>
>
>  > You have to set the bidi settings again for the footnotes because
>  > the notes mechanism resets many of these setups.
>
>  > \startsetups[note:footnote]
>  > \setupdirections[bidi=global]
>  > \stopsetups
>  >
>  > \setupnote[footnote][setups=note:footnote] % align=righttoleft
>
> Is that still true? Anything else I need to be aware of?
>
> Best,
> Denis
>
> ___
> 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
>
> ___
>
___
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] Problem loading a font

2019-12-23 Thread Mohammad Hossein Bateni
Hi,

Here's a simple MWE:

==
\starttext
Default {\definedfont[ALMFixed]ALM} Default
\stoptext
==

I have the "ALM Fixed" font installed (otf from
https://ctan.org/tex-archive/fonts/almfixed).  I do not see any errors in
the output.  In particular, Context sees the font and the logs contain the
following line:

mkiv lua stats  > loaded fonts: 3 files: almfixed.otf,
latinmodern-math.otf, lmroman12-regular.otf

Yet, the output from lmtx does not display the "ALM" string, though its
place is reserved on the line.  The same file typesets fine with mkiv.

Thanks
--MHB
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2019.12.17 16:30 MKIV beta  fmt: 2019.12.22  int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name '/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name '/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'alm', input './alm', result 'alm'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name './alm.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
backend > xmp > using file '/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 3, name './alm.tex'
close source> level 1, order 3, name 'cont-yes.mkiv'

system  > start used files

system  > text: alm

system  > stop used files


system  > start used files

system  >1: filename=char-prv.lua filetype=tex format=tex foundname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/char-prv.lua fullname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/char-prv.lua usedmethod=otherwise
system  >2: filename=cont-yes.mkiv filetype=tex format=tex foundname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv fullname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv usedmethod=otherwise
system  >3: filename=publ-imp-default.lua filetype=scripts foundname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua fullname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua usedmethod=otherwise
system  >4: filename=cont-new.mkiv filetype=tex foundname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv fullname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv usedmethod=otherwise
system  >5: filename=lang-exc.lua filetype=scripts foundname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua fullname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua usedmethod=otherwise
system  >6: filename=lang-us.lua filetype=scripts foundname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua fullname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua usedmethod=otherwise
system  >7: filename=/home/bateni/ctx-debug/dabeer/tests/alm.tex format=tex foundname=/home/bateni/ctx-debug/dabeer/tests/alm.tex fullname=/home/bateni/ctx-debug/dabeer/tests/alm.tex usedmethod=direct
system  >8: filename=lm.lfg filetype=tex foundname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg fullname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg usedmethod=otherwise
system  >9: filename=lmroman12-regular filetype=otf format=otf foundname=/home/bateni/context-lmtx/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf fullname=/home/bateni/context-lmtx/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=otherwise
system  >   10: filename=latinmodern-math.otf filetype=opentypefonts foundname=/home/bateni/context-lmtx/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf fullname=/home/bateni/context-lmtx/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=otherwise
system  >   11: filename=ALMFixed filetype=otf format=otf foundname=/home/bateni/context-lmtx/tex/texmf/fonts/opentype/public/almfixed/almfixed.otf fullname=/home/bateni/context-lmtx/tex/texmf/fonts/opentype/public/almfixed/almfixed.otf usedmethod=otherwise
system  >   12: filename=lpdf-pdx.xml filetype=tex foundname=/home/bateni/context-lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml 

Re: [NTG-context] ttf font not seen ?

2019-08-26 Thread Mohammad Hossein Bateni
I have had the same problem.  Unlike Mark IV Context, LMTX does not seem to
recognize fonts outside its tree.  Maybe there's some option to tweak with.

The workaround I found was to copy the TTF files under
"{context-lmtx-root}/tex/texmf/fonts/truetype/public/" and run "context
--generate".

If you like to have mtxrun font commands to work properly, you need to
invoke "mtxrun --script font --reload" after that.

Hope this helps.

On Mon, Aug 26, 2019 at 11:09 AM Floris van Manen  wrote:

> using the latest context version luametatex on ubuntu 19.4
>
> system  > ConTeXt  ver: 2019.08.24 22:50 MKIV beta  fmt:
> 2019.8.25  int: english/english
> system  > 'cont-new.mkiv' loaded
>
>
> with the dijkstra.ttf font apparently seen:
>
> $ mtxrun --script fonts --list --all --name dijkstra
> identifierfamilyname   fontname   filename
>   subfont   instances
>
> dijkstra  dijkstra dijkstra   ~/.local/share/fonts/Unknown
> Vendor/TrueType/Dijkstra/Dijkstra_Thin.ttf
> dijkstranormaldijkstra dijkstra   ~/.local/share/fonts/Unknown
> Vendor/TrueType/Dijkstra/Dijkstra_Thin.ttf
> dijkstraregular   dijkstra dijkstra   ~/.local/share/fonts/Unknown
> Vendor/TrueType/Dijkstra/Dijkstra_Thin.ttf
>
>
>
> context will complain that the font is unknown:
>
> selectfont  > The requested font 'dijkstra' has no files for the
> 'tf' alternative, Latin Modern is used instead.
>
>
> I assume i missed a critical step somewhere down the road.
> any hints?
>
> thanks
> Floris
>
>
>
>
> ___
> 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
>
> ___
>
___
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] problems with "pagecomment"

2019-04-27 Thread Mohammad Hossein Bateni
I see.  Thanks for the explanation.

So the following works:

---
\unprotect
\setvalue{startNotes}%
  {\global\settrue\c_page_comment_enabled
   \grabbufferdatadirect{pagecomment}{startpagecomment}{stopNotes}}
\protect
\def\stopNotes{}
--

What does the second argument to \grabbufferdatadirect mean?  Nothing
changes when I modify that.

The point of redefining the pagecomment environment for me was to style it
a bit: add \righttoleft at the beginning, and surround the content in
startstopnarrower.  How can I inject prepend/append to a buffer's content?

The solution I can think of is to use a different buffer
"pagecomment_internal" in the above definition, and then build buffer
"pagecomment" using that.

Thanks,
~MHB

On Sat, Apr 27, 2019 at 1:24 AM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Mohammad Hossein Bateni schrieb am 27.04.2019 um 05:16:
> > Hi,
> >
> > Look at the following MWE:
> >
> >
> > \setuppagecomment[state=start,location=right]
> > %\definestartstop[Notes]
> > %[before=\startpagecomment,after=\stoppagecomment]
> > \def\startNotes{\startpagecomment}
> > \def\stopNotes{\stoppagecomment}
> >
> > \starttext
> > \input knuth
> > \startpagecomment
> > Hello
> > \stoppagecomment
> > \page
> > \input tufte
> > \startNotes
> > Testing
> > \stopNotes
> > \stoptext
> >
> >
> > This snippet does not compile.  Page comments work when I use the
> > commands \startpagecomment and \stoppagecomment directly (like in the
> > first page), but when I invoke via macros (as in the second page),
> > ConTeXt produces errors.
> >
> > What is wrong there?
>
> The pagecomment environment uses the buffer mechanism to store the content
> of the environment but a limitation of buffers is that you can't put
> them into other
> commands because the scan for a certain delimiter, e.g. \stoppagecomment.
>
> Wolfgang
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] problems with "pagecomment"

2019-04-26 Thread Mohammad Hossein Bateni
Hi,

Look at the following MWE:


\setuppagecomment[state=start,location=right]
%\definestartstop[Notes]
%[before=\startpagecomment,after=\stoppagecomment]
\def\startNotes{\startpagecomment}
\def\stopNotes{\stoppagecomment}

\starttext
\input knuth
\startpagecomment
Hello
\stoppagecomment
\page
\input tufte
\startNotes
Testing
\stopNotes
\stoptext


This snippet does not compile.  Page comments work when I use the commands
\startpagecomment and \stoppagecomment directly (like in the first page),
but when I invoke via macros (as in the second page), ConTeXt produces
errors.

What is wrong there?

Thanks!
~MHB
___
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] Isn't the name ConTeXt a bit search-engine unfriendly?

2019-04-19 Thread Mohammad Hossein Bateni
I usually search for "ntg context" instead...

Also searching within "contextgarden" helps sometimes.  If you're looking
for the key/values and syntax of a particular command (without additional
information about the meanings), the most up-to-date reference is at
http://www.pragma-ade.nl/general/qrcs/setup-en.pdf, also available in the
distribution.

On Fri, Apr 19, 2019 at 10:52 AM Exp  wrote:

> Hi,
>
> ConTeXt is great but the pun of the name could cause unnecessary annoyance
> for newbies like me who need to google it a lot.
>
> Not sure if this is the right place to ask but is it possible to rename it
> to, like, ConTeX, in the future?
>
> Cheers,
>
> Exp
>
> ___
> 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
>
> ___
>
___
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] link

2019-04-16 Thread Mohammad Hossein Bateni
Thank you for sharing, Hans!  Aditya always has a bunch of cool tricks.

I did not know about the --ansi flag.  It's not reported by "context
--help".  Are there other "hidden" options? :)

On Sat, Apr 13, 2019 at 11:33 AM Hans Hagen  wrote:

> https://adityam.github.io/context-blog/post/setuptex/
> --
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
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] change in treating errors

2019-04-16 Thread Mohammad Hossein Bateni
Which one is better is certainly subjective :)  Maybe we could get the old
TeX-y behavior via a switch or the other way around?

Alan, allow me to disagree with your assertions, though.  Here are a few
reasons:
1) You could correct a spelling mistake on the prompt (as in original TeX),
although this is rarely done these days.
2) You could use the --nonstopmode or --batchmode to not get the prompt,
and not have the lingering background process (Mac bug?).
3) You could see a collection of errors which might help you in fixing them
altogether without having to run context again and again finding one error
at a time.  (Same thing with compiling a C/C++ code, and getting a list of
many errors at once.)
4) There are many "errors" and "warnings" that context does not stop on.
You could perhaps claim moving on from those is also useless :)  Just to
give some examples: missing modules, fonts, glyphs in fonts, etc.

So let me rephrase my original question:  Is this change in behavior
intended?  If so, is it possible to get the old behavior (specially for
nonstopmode) via some switch?

Thanks a lot,
~~MHB

On Tue, Apr 16, 2019 at 12:28 AM Alan Braslau 
wrote:

> On Mon, 15 Apr 2019 23:11:17 -0400
> Mohammad Hossein Bateni  wrote:
>
> > Hi,
> >
> > ConTeXt used to recover better from errors.  Consider the following file:
> >
> > =
> > \xyz
> > \abc
> >
> > \starttext
> > HELLO
> > \stoptext
> > =
> >
> > Running  ConTeXt  ver: 2019.03.21 21:39 MKIV beta  fmt: 2019.3.26  int:
> > english/english would catch both "Undefined control sequence" errors
> before
> > exiting with the message "mtx-context | fatal error: return code:
> > 256".  (I either press enter to move to the next error, or I use the
> > --nonstopmode option.)
> >
> > Now with ConTeXt  ver: 2019.04.13 17:01 MKIV beta  fmt: 2019.4.15  int:
> > english/english, even when I do not supply the --nonstopmode option,
> > ConTeXt exits abnormally with the same error message right after
> > discovering the first undefined control sequence.  The old "?" TeX prompt
> > allowing once to fix the misspellings, etc. does not appear at all.
> >
> > Has some defaults changed?  Is it possible to get the old behavior?
> >
> > Thanks,
> > ~MHB
>
> I much prefer the new behavior, for the previous prompt was pretty useless
> and there was little point going on without correcting an earlier error.
> Furthermore, the model would often leave a furtive process running in the
> background following a keyboard interrupt (especially on Mac OSX). The new
> process does not do this.
>
> Alan
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] change in treating errors

2019-04-15 Thread Mohammad Hossein Bateni
Hi,

ConTeXt used to recover better from errors.  Consider the following file:

=
\xyz
\abc

\starttext
HELLO
\stoptext
=

Running  ConTeXt  ver: 2019.03.21 21:39 MKIV beta  fmt: 2019.3.26  int:
english/english would catch both "Undefined control sequence" errors before
exiting with the message "mtx-context | fatal error: return code:
256".  (I either press enter to move to the next error, or I use the
--nonstopmode option.)

Now with ConTeXt  ver: 2019.04.13 17:01 MKIV beta  fmt: 2019.4.15  int:
english/english, even when I do not supply the --nonstopmode option,
ConTeXt exits abnormally with the same error message right after
discovering the first undefined control sequence.  The old "?" TeX prompt
allowing once to fix the misspellings, etc. does not appear at all.

Has some defaults changed?  Is it possible to get the old behavior?

Thanks,
~MHB
___
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] textext within ConTeXt

2019-03-03 Thread Mohammad Hossein Bateni
This is quite counterintuitive... It also happens if I define a string
variable, use concatenate operator to set its value, and then finally pass
the string to textext macro.

Is there a way to get around this issue?

On Sun, Mar 3, 2019, 1:13 PM Alan Braslau  wrote:

> On Sun, 3 Mar 2019 12:52:53 -0500
> Mohammad Hossein Bateni  wrote:
>
> > Hi,
> >
> > I can't understand why the following code does not work.  Could someone
> > help me out here?
> >
> > \starttext
> > \startMPpage
> > draw textext("\convertnumber{r}{12}");
> > draw textext("\convertnumber{r}{" & "12" & "}");
> > \stopMPpage
> > \stoptext
> >
> > The first draw statement works perfectly.  But the second one throws out
> > errors and complains as follows:
>
> Because luatex intercepts and processes \convertnumber{r}{
> and tries to pass this result to MP as a string, not the other way around.
>
> Alan
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] textext within ConTeXt

2019-03-03 Thread Mohammad Hossein Bateni
Hi,

I can't understand why the following code does not work.  Could someone
help me out here?

\starttext
\startMPpage
draw textext("\convertnumber{r}{12}");
draw textext("\convertnumber{r}{" & "12" & "}");
\stopMPpage
\stoptext

The first draw statement works perfectly.  But the second one throws out
errors and complains as follows:

.test.tex: ! Missing number, treated as zero






 \number "

  & "12" & "

\romannumerals #1->\clf_romannumerals \numexpr #1

 \relax

 ... draw textext("\convertnumber {r}{" & "12" & "}

  ");

\meta_process_graphic ...currentMPformat }data {#1

  ;}initializations
{\meta_f...

\page_fitting_stop_command ...eter \c!command {#1}

  \page_fitting_stop_normal

Is there a workaround here?  Ultimately I want to replace "12" with a loop
variable in MetaPost.

Thanks,
~MHB
___
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] about the color of sidebar

2019-02-24 Thread Mohammad Hossein Bateni
I have never used the sidebar mechanism, but there is a "rulecolor" option
in setupsidebar.  Maybe that's what you're looking for.

You can look up the commands and their options in "i-context.pdf" file.

On Sun, Feb 24, 2019 at 6:36 PM Jeong Dal  wrote:

> Dear Hans,
>
> 2019. 2. 24. 오후 7:17, ntg-context-requ...@ntg.nl 작성:
>
> On 2/24/2019 12:25 AM, mf wrote:
>
> BTW \startsidebar ... \stopsidebar stopped working too.
>
> i'll upload a fix later today
>
> Hans
>
>
> It is good to know the commnad "\startsidebar … \stopsidebar” because I
> used the same style bar by defining a frame and overlay.
> Here is  a question: Is it possible to change the color of the bar or any
> other options?
> There is no commnad like “\setupsidebar” in the wiki.
>
> Thank you.
>
> Best regards,
>
> Dalyoung
>
> ___
> 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
>
> ___
>
___
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] Define color with calculations

2019-02-18 Thread Mohammad Hossein Bateni
Thanks, Henri!  Works like a charm.

On Sun, Feb 17, 2019 at 11:03 PM Henri Menke  wrote:

> Use Lua.
>
>
> \def\eval#1{\ctxlua{%
> local context = context
> local _ENV = math
> context(#1)
> }}
>
> \definecolor[mycolor][r=\eval{0.5*0.7}]
>
> \starttext
>
> \color[mycolor]{Hello!}
>
> \stoptext
>
>
>
> On 18/02/19 4:37 PM, Mohammad Hossein Bateni wrote:
> > Hi,
> >
> > When I use definecolor, (how) can I use computations in setting the value
> > of a component?  Something like the following...
> >
> > \definecolor[mycolor][r=0.5*0.7]
> >
> > Thanks,
> > ~MHB
> >
> >
> >
> ___
> > 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
> >
> ___
> >
>
>
> ___
> 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
>
> ___
>
___
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] Define color with calculations

2019-02-17 Thread Mohammad Hossein Bateni
Hi,

When I use definecolor, (how) can I use computations in setting the value
of a component?  Something like the following...

\definecolor[mycolor][r=0.5*0.7]

Thanks,
~MHB
___
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] mix two-column and single-column footnotes

2019-02-16 Thread Mohammad Hossein Bateni
Hi,

Is it possible to mix two-column and single-column footnotes?

Here's my use case.  I have two types of footnotes:
1) short one- or two-word terms
2) long descriptions and notes

On some pages there are a lot of "short" footnotes which take up a lot of
space at the bottom of the page.  I'd like to typeset them in 2 or 3
columns.  But then the "long" footnotes had better stay in one column.

See below for desired input and output.

Thanks,
~MHB

Sample input:

\definenote[shortfootnote][...,n=3]
\definenote[longfootnote][...,n=1]
\definenotation[shortfootnote][...]
\definenotation[longfootnote][...]
\starttext
\shortfootnote{short}\shortfootnote{short}\shortfootnote{short}
\longfootnote{This is a long footnote which spans the entire width of the
page.}
\shortfootnote{short}\shortfootnote{short}
\longfootnote{Another "long" footnote.}
\longfootnote{Note that footnotes 5, 6 used only two out of three available
columns.}
\stoptext


Desired output:

__
1 short  2 short   3 short
4 This is a long footnote which spans
the entire width of the page.
5 short  6 short
7 Another "long" footnote.
8 Note that footnotes 5, 6 used only
two out of three available columns.
___
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] 404 error: Not found for first-setup.sh

2019-02-08 Thread Mohammad Hossein Bateni
I ran into the same issue two days ago, where "curl -O" worked while "wget"
did not.

On Fri, Feb 8, 2019 at 1:51 PM Marcus Vinicius Mesquita <
marcusvinicius.mesqu...@gmail.com> wrote:

> Hi, Pablo
>
> Indeed, with curl I was able to download the file. Thank you.
>
> In the wiki page about ConTeXt standalone (
> https://wiki.contextgarden.net/ConTeXt_Standalone), the section about
> single user installation suggests only the wget program, so I got stuck,
> and perhaps we could avoid that for future users.
>
> Regards
>
> Marcus Vinicius
>
> On Fri, Feb 8, 2019, 16:39 Pablo Rodriguez  wrote:
>
>> On 2/8/19 7:02 PM, Marcus Vinicius Mesquita wrote:
>> > Hi, Taco
>> >
>> > I tried again, but the server still answers with a 404 error.
>>
>> Hi Marcus,
>>
>> I have just updated my ConTeXt Suite to its latest beta.
>>
>> And the following command downloads the file (I don’t have wget
>> installed):
>>
>>   $ curl -O http://minimals.contextgarden.net/setup/first-setup.sh
>>
>> Just in case it helps,
>>
>> Pablo
>> --
>> http://www.ousia.tk
>>
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>>
>> ___
>>
>
> ___
> 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
>
> ___
>
___
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] setupdirections RTL bug

2019-02-05 Thread Mohammad Hossein Bateni
Thanks, Hans!

With \setupdirections[bidi=global,method=three], the footers are placed
correctly.  But the *left* footer still does not get RTL treatment.  Adding
\setupdirections[bidi=global,method=three] inside startsetups does not help.

Method three has this "bug": a word with ZWNJ gets the long direction.  For
example, if I have A+ZWNJ+B (logical), visually I should get "B+ZWNJ+A" but
I don't.  It works correctly with SPC in place of ZWNJ.

On Tue, Feb 5, 2019 at 7:30 AM Hans Hagen  wrote:

> On 2/5/2019 12:36 AM, Mohammad Hossein Bateni wrote:
> > Hello,
> >
> > This is perhaps /related/ to what Alan Bowen reported.  Not the same,
> > since I don't get compilation errors.
> use method "three"
>
> (I'll add "unicode" method which will take the latest version.)
>
> Hans
>
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] setupdirections RTL bug

2019-02-04 Thread Mohammad Hossein Bateni
Hello,

This is perhaps *related* to what Alan Bowen reported.  Not the same, since
I don't get compilation errors.

Here's a MWE.  See explanation of bad behavior below.


\setupdirections[bidi=global,method=one]

\definefont[Ar][dejavusans*arabic]

\setupfootertexts[\setups{L}][\setups{R}]


\startsetups L

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

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

\Ar%left

چپ

\stopsetups

\startsetups R

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

\Ar%right

راست

\stopsetups


\starttext

Test

\stoptext


1. The right footer is placed over the left footer.
2. There's no problem if I replace the RTL text of right footer with an LTR
text.
3. Left footer's text does not get proper RTL treatment.  Perhaps *this* is
the change of behavior introduced in the past year.  My guess is that RTLed
footers are moved to the other side.
4. If I use bidi=local or bidi=on in the preamble, RTL treatment is applied
to neither footer.  I can't seem to turn on RTL via setupdirections inside
the (left) footer.  How does one do that?

Thanks,
MHB
___
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] inline textbackgrounds across linebreaks

2019-01-15 Thread Mohammad Hossein Bateni
I guess it works fine for me on beta 2019.01.07 16:10.

On Tue, Jan 15, 2019 at 8:37 AM Taco Hoekwater  wrote:

> Hi,
>
> Quick explanation: I am trying to implement the concept of the HTML 
> tag,
> which is supposed to be like a font switch, but doing underlining. I have
> a
> bunch of french clients, and this is a requirement I cannot get around.
> French
> officials _love_ underlining and uppercasing :(
>
> Because of its flexibility, I try to use text backgrounds, but that seems
> to
> only work when the text does not break across lines: when on one line, the
> background starts and stops at the right spot, great! But if there is a
> line
> break, then it underlines complete lines, even for the first and last line.
>
> Is there any way to have underlining + line breaks behave correctly?
> (perhaps not using text backgrounds at all?)
>
> My current code is attached.
>
> Best wishes,
> Taco
>
>
> ___
> 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
>
> ___


s.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] How to configure context command in Emacs

2018-10-24 Thread Mohammad Hossein Bateni
I have a hacky solution, which I haven't tested in a while.

Make a shell script called "mycontext" somewhere in the PATH.  Include the
following in it:

#!/bin/bash

. ~/context/tex/setuptex

context $@

Make it executable.  And then use "mycontext" as the TeX command inside
emacs.  For example, you can refer to AucTeX's documentation for that.

On Wed, Oct 24, 2018 at 10:08 AM luigi scarso 
wrote:

>
>
> On Wed, Oct 24, 2018 at 3:30 PM Jan U. Hasecke <
> juh+ntg-cont...@mailbox.org> wrote:
>
>> Hello,
>>
>> I hope there are some Emacs users out there. ;-)
>>
>> I can use emacs with context-mode when I start the program like this:
>>
>> . ~/context/tex/setuptex ; emacs &
>>
>> I could not find a way to set this in my emacs init file. Neither of the
>> ways described here worked for me:
>>
>> https://www.emacswiki.org/emacs/ExecPath
>>
>> I set this in .bashrc:
>>
>> if [-f ~/context/tex/setuptex ]; then
>>. ~/context/tex/setuptex
>> fi
>>
>> to always have context available in a shell and in emacs if I start it
>> from bash.
>>
>> Starting Emacs via the start menu of Gnome results in an Emacs that does
>> not know ConTeXt.
>>
>> I found some hints how to source .bashrc in emacs but this only affects
>> the emacs shell not the command calling from within AucTeX.
>>
>> Has anyone found a solution for this?
>>
>> juh
>>
>>
>> not a solution for your problem (I manually run setuptex when I open an
> emacs shell)
> but I guess that looking at
> https://www.gnu.org/software/auctex/
> can help.
>
> --
> luigi
>
> ___
> 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
>
> ___
___
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] contextbeta moved or server down?

2018-09-07 Thread Mohammad Hossein Bateni
works for me.  I have macbook pro (mid 2015) running High Sierra 10.13.6.
I guess, you should try to ping or traceroute to contextgarden.net from
terminal.  the IP is different for www.contextgarden.net, which is probably
what the browser looks for.

On Fri, Sep 7, 2018 at 10:43 AM Hans van der Meer  wrote:

> Not here. I copied your call into Terminal and it gave the same timeout as
> before.
>
> My system is a MacPro (2017), could it have a special setting in the
> tailored software? Anywhere someone with the same machine who can test this?
>
> Otherwise, can I download ‘manually’ a package and then install (howto?).
>
> On 7 Sep 2018, at 16:34, Wolfgang Schuster <
> wolfgang.schuster.li...@gmail.com> wrote:
>
> Hi Hans,
>
> I can download first-setup.sh without problems.
>
>
> $ rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
> first-setup.sh
>
> sent 38 bytes  received 4826 bytes  3242.67 bytes/sec
> total size is 4715  speedup is 0.97
>
>
> Wolfgang
>
>
> Hans van der Meer schrieb am 07.09.18 um 16:25:
>
> Clicking on  contextgarden.net brings up the garden in the browser. The
> site therefore is reachable from here.
>
> I guess then, the problem is in the rsync. I am afraid I known next to
> nothing about rsync.
>
> It would be nice if someone with an Apple Macintosh will try the same.
> Maybe it is something in the system here (running MacOSX High Sierra
> 10.13.6) and I would be glad/unhappy to know if that is the case.
>
> On 7 Sep 2018, at 15:37, Taco Hoekwater  wrote:
>
> Hi Hans,
>
> The garden server is working for me as well, but I am on the same IP as
> Mojca
> at the moment, so that is probably to be expected.
>
> Can you connect to contextgarden.net in *any* way from where you are?
> There could be some issue with the internet routing from your machine
> to contextgarden.net, or it could be a firewall blockade somewhere
> in between. The machine itself is definitely running.
>
> Best wishes,
> Taco
>
> On 7 Sep 2018, at 13:13, Hans van der Meer  wrote:
>
> Still not working. this is the full script, I didn’t change the rsync line
> since last time it ran ok:
>
> echo "start download and install of contextbeta"
> rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
> chmod a+x first-setup.sh
> mkdir tex
> sh ./first-setup.sh --engine=luatex --context=beta >first-setup.log
> #sh ./first-setup.sh --context=current >first-setup.log
> #sh ./first-setup.sh --context=date >first-setup.log
>
> # link to command reference
> cp -p -v tex/texmf-context/doc/context/documents/general/qrcs/setup-en.pdf
> ~/Desktop/Context\ Commands.pdf
> rm ~/Desktop/Context\ Manuals
> ln -s -v /tex/texmf-context/doc/context/documents/general/manuals Context\
> Manuals
> mv Context\ Manuals ..
>
> # link to mkiv source
> rm mkiv_base
> ln -s -v tex/texmf-context/tex/context/base/mkiv mkiv_base
>
> exit
>
> And this is the full output of a run, put the rsync data in red:
>
> 4 context-47: contextbeta
> start download and install of contextbeta
> rsync: failed to connect to contextgarden.net: Operation timed out (60)
> rsync error: error in socket IO (code 10) at
> /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52/rsync/clientserver.c(106)
> [receiver=2.6.9]
> chmod: first-setup.sh: No such file or directory
> mkdir: tex: File exists
> sh: ./first-setup.sh: No such file or directory
> cp: tex/texmf-context/doc/context/documents/general/qrcs/setup-en.pdf: No
> such file or directory
> rm: /Users/hansm/Desktop/Context Manuals: No such file or directory
> Context Manuals -> /tex/texmf-context/doc/context/documents/general/manuals
> mkiv_base -> tex/texmf-context/tex/context/base/mkiv
> 4 context-47:
>
>
> On 7 Sep 2018, at 11:50, Mojca Miklavec 
> wrote:
>
> On Fri, 7 Sep 2018 at 11:11, Hans van der Meer  wrote:
>
>
> This used to give me the latest contextbeta:
> rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
>
> Today I get this error
> start download and iinstall of contextbeta
> rsync: failed to connect to contextgarden.net: Operation timed out (60)
>
> Is the garden down or have the sources been moved since my last access
> this June?
> At least this link is still active at the moment:
> http://wiki.contextgarden.net
>
>
> While wiki.contextgarden.net is running on a different server than the
> distribution, there hasn't been any change recently and the
> installation works for me.
>
> Mojca
>
> ___
> 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
>
> ___
>
>
> met vriendelijke groet
> dr. Hans van der 

Re: [NTG-context] bidi in footnotes

2018-06-21 Thread Mohammad Hossein Bateni
I believe, you would need the setups, even if you had set up typescripts.
For some reason, the environments for footnotes and marginnotes are
different from that of the main content's.

I got this solution from Wolfgang/Hans two years ago, so I suppose it's the
officially recommended way.

I do not know how heavy setupdirections is, but this method, I guess,
applies that command *once per page*.  It might be too much, but it's the
price you pay for correct bidi formatting.  For example, I hate to see that
I need to babysit page numbers (LTR) within Farsi text (RTL) in headers but
that's life.

‪On Thu, Jun 21, 2018 at 8:22 AM ‫Idris Samawi Hamid ادريس سماوي حامد‬‎ <
idris.ha...@colostate.edu> wrote:‬

> Salaam, Mohammad Hossein, Otared,
>
> On Wed, 20 Jun 2018 15:27:56 -0600, Mohammad Hossein Bateni
>  wrote:
>
> > \startsetups[bidi:footnotes]
> > \setupdirections[bidi=on]
> > \stopsetups
> > \setupnotes[footnote][setups=bidi:footnotes]
>
> On Wed, 20 Jun 2018 22:31:05 -0600, Otared Kavian 
> wrote:
>
> > % begin test-bidi-footnote.tex
> > \setupdirections[bidi=global]
> > \startsetups[bidi:footnotes]
> > \setupdirections[bidi=on]
> > \definedfont[file:almfixed.otf*arabic at 14pt]
> > \stopsetups
> > \setupnotes[footnote][setups=bidi:footnotes]
> >
> > \starttext
> > \definedfont[file:almfixed.otf*arabic at 14pt]
> > Test امتحان test
> > \startfootnote
> > Test امتحان test
> > \stopfootnote{}
> > \stoptext
> > % end test-bidi-footnote.tex
>
> Many thanks. Question: Is this use of setups now the "official" or
> preferred way to handle footnote typography options? On the surface, it
> appears to be overkill. For the declaration
>
> \setupdirections[bidi=global]
>
> shouldn't that mean that bidi is applied, well, globally?
>
> For \definedfont the behavior is less surprising, since that is obviously
> a local command. But is setups the official way to globalize the command
> (aside from typescripts or simplefonts)?
>
> Best wishes
> Idris
>
> >> On 20 Jun 2018, at 23:22, ⁨Idris Samawi Hamid ادريس سماوي حامد⁩
> >> <⁨idris.ha...@colostate.edu⁩> wrote:
> >>
> >> Dear gang,
> >>
> >> In the attached/following example, bidi is not applied in the footnote:
> >>
> >> \setupdirections[bidi=global]
> >>
> >> \starttext
> >> \definedfont[file:almfixed.otf*arabic at 14pt]
> >> Test امتحان test
> >> \startfootnote
> >> \definedfont[file:almfixed.otf*arabic at 14pt]
> >> Test امتحان test
> >> \stopfootnote{}
> >> \stoptext
> >>
> >> Is there something else that I need to do? Thanks in advance!
> >>
> >> [Also: Is there a way to not have to declare \definedfont twice?]
>
>
> --
> Idris Samawi Hamid, Professor
> Department of Philosophy
> Colorado State University
> Fort Collins, CO 80512
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] bidi in footnotes

2018-06-20 Thread Mohammad Hossein Bateni
maybe something like this would help:

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

but I did not test it now.

‪On Wed, Jun 20, 2018 at 5:26 PM ‫Idris Samawi Hamid ادريس سماوي حامد‬‎ <
idris.ha...@colostate.edu> wrote:‬

> Dear gang,
>
> In the attached/following example, bidi is not applied in the footnote:
>
> \setupdirections[bidi=global]
>
> \starttext
> \definedfont[file:almfixed.otf*arabic at 14pt]
> Test امتحان test
> \startfootnote
> \definedfont[file:almfixed.otf*arabic at 14pt]
> Test امتحان test
> \stopfootnote{}
> \stoptext
>
> Is there something else that I need to do? Thanks in advance!
>
> [Also: Is there a way to not have to declare \definedfont twice?]
>
> 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
>
> ___
___
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] roadmap

2018-05-17 Thread Mohammad Hossein Bateni
Fabrice,

Accepting the caveats Hans pointed out for problematic spacing and some
issues with references, you might find [
https://github.com/bateni/rawsteps-mkiv] useful.  I ported RawSteps to MkIV
and have used it in a few presentations.  The version on github might be
buggy, but a good start if you really insist on using RawSteps.

On Thu, May 17, 2018 at 9:07 AM Hans Hagen  wrote:

> On 5/16/2018 9:14 PM, Fabrice L wrote:
> > Dear all,
> >
> >  > - Check what additional features users want (miss) and decide to what
> > extent and with what priority we will put effort in this.
> >
> > As asked, I add a wish to the list...
> >
> > One feature which I depend a lot on is to be able to do animations: I
> > actually use the Raw Steps module, by David Munger (dated from 2006),
> > which still worked, but in MKII only. This is essential for me for my
> > teaching and talks. During teaching, I have designed courses notes in
> > ConText using a lot modes of context: the notes are different for
> > the teacher, are available in two formats for the students (paper and
> > for completion on tablets), and there is a last version for use in the
> > class by me. In class, this is essential for me that the material is
> > presented by steps, otherwise students have a tendency to not listen, or
> > to not try to solve a problem is the solution is already on the screen.
> > I can not use the animation tools available in ConTexT using javascript,
> > since I use to show notes in class an iPad, and I use the stylus to fill
> > blanks present in the notes (which work great by the way !).
> > The facility to use modes in the courses notes like this have convinced
> > several of my colleagues to use ConTeXt for their teaching needs.
> >
> > Following threads on this list on animations, my understanding is that
> > Hans is not a great supporter of the method of animations in the Raw
> > Steps module, for technical reasons.
> >
> > I have switch to MKIV for others documents, but I'm still on MKII for
> > this reason for my courses notes, which are 90% one my needs in TeX.
> > Fabrice.
> A few remarks:
>
> (1) The mkiv approach uses not that much javascript actually, it uses
> layers that get turned on and off and it has a simplicity that i like,
> also because there is no interference with repetition (e.g. of
> references) cq. are no side effects (like bad spacing). Unfortunately
> layers are hardly supported and the trivial javascript to control some
> aspects of viewing neither. (Luigi and I have been thinking of adding
> lua to a mupdf based viewer ... maybe we should pick up that thread.)
>
> (2) Steps i.e. repetitive content has the problem that one then needs to
> make sure references get flushes only ones which also demands care by
> the user, and spacing not be influenced too badly by redoing chunks.
> This is why I made some explicit steppers (there are some in the mkiv
> part as s-present* files).
>
> I can give it some thought but it's not that trivial to do it right
> (according to my specs).
>
> Hans
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
___
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] Installing a specific version of context

2018-04-24 Thread Mohammad Hossein Bateni
I don't think it's possible to do off-the-shelf.  The following is what I
used to do to run some tests:
1) Install the latest beta.
2) Clone to the mirror on Github [
https://github.com/contextgarden/context-mirror]
3) Sync the cloned repository to an older date
4) Replace the tex folder in context installation with the content of the
repository
5) Make the format files

It worked for me when I did my tests.  (I wanted to see when a particular
functionality had changed/broke.)

However, this is not perfect.  Because the LuaTeX and the other binaries
will be latest, not the versions specific to the date you requested.

On Tue, Apr 24, 2018 at 6:56 AM, N. Raghavendra 
wrote:

> I would like to install the version of context dated 2017.11.14.  How
> can one do this?  I tried
>
> sh first-setup.sh --context=2017.11.14
>
> but it produces errors like
>
> rsync: change_dir "/current/context/2017.11.14" (in minimals) failed: No
> such file or directory (2)
>
> I'd appreciate suggestions about this.
>
> Thanks,
> Raghu.
>
> --
> N. Raghavendra , http://www.retrotexts.net/
> Harish-Chandra Research Institute, http://www.hri.res.in/
> 
> ___
> 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
> 
> ___
___
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] next beta

2017-06-13 Thread Mohammad Hossein Bateni
this looks really cool and useful!  thanks a lot, Hans!

On Tue, Jun 13, 2017 at 10:46 AM, Hans Hagen  wrote:

> On 6/13/2017 1:18 PM, Mathias Schickel wrote:
>
>>
>> Am 12.06.2017 um 18:17 schrieb Hans Hagen :
>>>
>>> On 6/12/2017 5:56 PM, Mathias Schickel wrote:
>>>
 Hi Hans,
 if I get it right this means that you provide a mechanism that brakes
 formulas automatically across several lines? I appreciate this very much!
 Thank you for including this into the next beta!
 Would it be possible to do something like that for breaking long
 formulas across pages (or is that maybe included in the new mechanism)?

>>> that's more complex and interferes with other aspects so maybe later
>>>
>>
>> Okay, that would be really great. Maybe a semi-automatic breaking across
>> pages could be doable. The AMS package for LaTeX implements something like
>> that. If you write \allowbreak (I am not absolutely sure if this is the
>> true command, but it is something like that) at a line of an equation with
>> multiple lines the typesetting algorithm knows that the formula can be
>> broken across pages at that point.
>> If something like that could be done in ConTeXt it would be really great.
>> At present it is somewhat complicated to handle equations with many lines
>> since you have to typeset the text and check if everything fits. If you
>> could mark certain lines of an equation to be allowed to be broken at the
>> end of a page, working with multiple line equations would be much easier
>> and faster.
>>
> attached what will be provided ... experimental for a while (not in the
> mood now for harder stuff)
>
> Hans
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
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] Typescript/fallbacks problem

2017-05-27 Thread Mohammad Hossein Bateni
Hans and Otared, thanks a lot for your attention.  I do appreciate your
time.

Otared:

The fallback was called "dejavudefault" on my machine when I was testing
it.  I changed the name in the email, to make the lines shorter, but
apparently I missed some instances—sorry—and that made it to the version I
uploaded also.

Hans:

I'm really sorry for wasting your time with these low-quality fonts... but
unfortunately these are among the few open-source Farsi fonts, and they are
simple enough to be extendible.  The font designer is not a professional,
but accepts bug reports, suggestions, etc.  So I spend some time finding
issues and fixing/reporting them.

Could you explain a bit about the "identifying as a math font" part?  What
is the sign of that?  To fix it, should I remove all the math-related
fields in the font?  Was the math thing only in the regular font or also in
bold?  Because I noticed the problem only in the regular shape.

On Sat, May 27, 2017 at 7:34 AM, Hans Hagen  wrote:

> On 5/27/2017 11:39 AM, Otared Kavian wrote:
>
>> Hi Mohammad Hossein,
>>
>> Your report is beyond my knowledge, but I would like to ask you a
>> question about the setup of fallback fonts: why are you referring to «
>> dejavudef » in the commands such as
>>
>>   \definefontsynonym [SahelBd]   [SahelBold][features={arabic,
>> tlig},fallbacks=dejavudef]
>>
>> while you have defined before « dejavudefault » (and not « dejavudef »)
>> in:
>>
>> \definefontfallback[dejavudefault][dejavusans]
>> [range=generalpunctuation,check=yes,force=no]
>>
> indeed. but on top of that, the font reports itself as a math font so that
> confuses the fallback mechanism (we have fundamental different approaches
> for math and text fonts) ... i'll try to deal with it but to some extend
> consider spending time on crappy fonts a bit of a waste
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
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] Typescript/fallbacks problem

2017-05-25 Thread Mohammad Hossein Bateni
The following email had large attachments (more than 100K).  I uploaded
everything here:
http://mhbateni.com/context/bug-04/

On Thu, May 25, 2017 at 11:40 PM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hello Hans,
>
> I'm going to explain a strange problem which came about, as far as I can
> tell, in beta 2017.04.27 01:00.  The same beta had introduced some other
> issues with fallbacks, which you fixed already.  Thanks a lot for that!
>
> I am now using the latest beta, version 2017.05.25 12:50.  Unfortunately I
> don't know what is going on precisely.  Here is a sort-of-minimal
> non-working example.
>
>
> %
>
> \definefontfeature[slanted][slant=.4]
>
>
> \starttypescript [serif][sahel][name]
>
>   \resetfontfallback [dejavudefault]
>
>   \definefontfallback[dejavudefault][dejavusans]
> [range=generalpunctuation,check=yes,force=no]
>
> %
>
>   \definefontsynonym [SahelReg][Sahel][features={arabic,
> tlig},fallbacks=dejavudef]
>
> %% NOTE 1
>
> %  \definefontsynonym [SahelReg] [Sahel][features={arabic,tlig}]
>
>   \definefontsynonym [SahelBd]   [SahelBold][features={arabic,
> tlig},fallbacks=dejavudef]
>
>   \definefontsynonym [SahelIt] [Sahel][features={arabic,tlig,
> slanted},fallbacks=dejavudef]
>
>   \definefontsynonym [SahelBdIt] [SahelBold][features={arabic,
> tlig,slanted},fallbacks=dejavudef]
>
> %
>
>   \definefontsynonym [Serif] [SahelReg]
>
>   \definefontsynonym [SerifBold] [SahelBd]
>
>   \definefontsynonym [SerifItalic] [SahelIt]
>
>   \definefontsynonym [SerifBoldItalic] [SahelBdIt]
>
> \stoptypescript
>
>
> \starttypescript [math] [modern] [name]
>
> \definefontsynonym [MathRoman] [name:modern] [features=math\mathsizesuffix]
>
> \stoptypescript
>
>
> \starttypescript [myfont]
>
> \definetypeface [myfont][rm] [serif][sahel] [default]
>
> %% NOTE 2
>
> \definetypeface [myfont][mm] [math] [modern][default]
>
> \stoptypescript
>
>
> \setupbodyfont[myfont,rm]
>
> %% NOTE 3
>
> %\definedfont[Serif]
>
>
> \def\Sample{{\lefttoright Salam} {\righttoleft سلام} }
>
>
> \starttext
>
> rm:\Sample
>
> {\bf bf:\Sample}
>
> {\it it:\Sample}
>
> {\bi bi:\Sample}
>
>
> %% NOTE 4
>
> \definedfont[SahelReg]\Sample
>
> \definedfont[Serif]\Sample
>
>
> \stoptext
> %
>
>
> *Background*:
>
> Commenting/uncommenting some of the lines produces three outputs, only one
> of which seems correct to me.  I have attached the three.  Betas before
> 4/27 always produced the correct solution.
>
> I am using a free open-source Farsi font, whose English glyphs come from
> Open Sans font.  I am attaching the specific versions of the Farsi font to
> reproduce the same results.
> [https://github.com/rastikerdar/sahel-font]
> [https://github.com/google/fonts/tree/master/apache/opensans]
>
>
> *Explanation*:
>
> Compiling the MWE above produces wrong-1.pdf in recent betas.  The serif
> font has not been set up properly on the first line of output.  Instead the
> default Latin Modern has been used, which looks different and misses the
> Farsi glyphs.
>
> Strangely there is nothing wrong with the second line of text, which shows
> Serif and SahelReg fonts are both set up just fine.  See "NOTE 4" in the
> MWE.
>
> Replacing the line above "NOTE 1" with the line below it—i.e., if I remove
> the fallbacks for definition of SahelReg—generates correct.pdf as output.
> I get the same correct output if uncomment the line below "NOTE 3," which
> should be a no-op in my opinion.  Notice that setting the fallback for
> bold, italic and bold italic has not caused any issues.  It's only the
> serif itself that's acting up weirdly.
>
> Finally when I comment the math definition below "NOTE 2," I get
> wrong-2.pdf as output.  Here everything seems okay except that the serif on
> the first line—but strangely not on the second line—misses the Arabic
> features: the letters are not joined.
>
>
> I spent quite some time investigating the changes to the GitHub
> repository on 4/27, to pinpoint what might have caused this issue, but my
> efforts didn't go anywhere.  I hope you can spot the issue.
>
>
> Thanks a lot for your attention!
> —MHB
>
>
>
___
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] Formula numbers in RTL mode

2017-05-25 Thread Mohammad Hossein Bateni
For the record, here is my solution until the issue is fixed for RTL.

\setupformula[distance=0pt]

This causes the formula numbers to be at the proper place for left/right as
well as LTR/RTL.  It prevents some custom placement of the formula number,
which I do not care about.

—MHB

On Mon, May 15, 2017 at 11:09 PM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hi Hans,
>
> I recall something like this was reported a few months back, and you said
> you were reworking math alignment mechanisms at the time.  Now that you're
> getting ready for the Tex Live version, I want to bring attention to this
> issue once again, in the hope of getting it resolved.
>
> Formula numbers are not placed at the far end when in RTL.  Here is a MWE:
>
>
> \starttext
>
> \input knuth
>
> \placeformula
> \startformula
> E = mc^2.
> \stopformula
>
> \righttoleft
>
> \placeformula
> \startformula
> E = mc^2.
> \stopformula
>
> \stoptext
>
>
> Attached is the result from context version 2017.05.14 19:09.   Using
> \setupformula[location=left] gives similar results with directions swapped:
> output is as desired in LTR but slightly off the edge in RTL.
>
> Thanks,
> MHB
>
___
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] Formula numbers in RTL mode

2017-05-15 Thread Mohammad Hossein Bateni
Hi Hans,

I recall something like this was reported a few months back, and you said
you were reworking math alignment mechanisms at the time.  Now that you're
getting ready for the Tex Live version, I want to bring attention to this
issue once again, in the hope of getting it resolved.

Formula numbers are not placed at the far end when in RTL.  Here is a MWE:


\starttext

\input knuth

\placeformula
\startformula
E = mc^2.
\stopformula

\righttoleft

\placeformula
\startformula
E = mc^2.
\stopformula

\stoptext


Attached is the result from context version 2017.05.14 19:09.   Using
\setupformula[location=left] gives similar results with directions swapped:
output is as desired in LTR but slightly off the edge in RTL.

Thanks,
MHB


1.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] mathdigits no longer works

2017-05-15 Thread Mohammad Hossein Bateni
Thanks, Hans!  It seems to work in the latest beta.

On Mon, May 15, 2017 at 5:36 AM, Hans Hagen <pra...@wxs.nl> wrote:

> On 5/15/2017 5:37 AM, Mohammad Hossein Bateni wrote:
>
>> The version
>> in tex/texmf-context/tex/context/fonts/mkiv/type-imp-mathdigits.mkiv is
>> a typescript.  Here is a simpler version using defintfontfamily and
>> definefallbackfamily, which doesn't work in the recent beta (but worked
>> well back in January).
>>
>>
>> \definefontfamily [minionmath] [rm] [Minion Pro]
>> \definefallbackfamily [minionmath] [mm] [dejavusansmono]
>> [range=digitsextendedarabicindic,offset=digitsnormal]
>> \definefallbackfamily [minionmath] [mm] [dejavusansmono]
>> [range=digitsextendedarabicindic,offset=digitsbold,tf=style:bold]
>> \definefontfamily [minionmath] [mm] [TeX Gyre Pagella Math]
>>
>> \startttext
>>
>> \switchtobodyfont[minionmath]
>>
>> \startformula
>> {\tf xyz} xyz {\bf xyz} {\bi xyz}, 2+3, {\bf 2+3}
>> \stopformula
>>
>> \stoptext
>>
>>
>> With beta version 2017.01.17 17:37 it used to work and change the digits
>> to Indic inside math.  With beta version 2017.04.27 01:00, the digits do
>> not change to Indic.  However, everything in math changes to
>> dejavusansmono (bold, because that was the last fallback definition?).
>>
>
> there has been some fixes in the math fallbacks recently so only report
> issues that fail in the *latest* garden version
>
> Hans
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
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] mathdigits no longer works

2017-05-15 Thread Mohammad Hossein Bateni
Dear Otared, what is the small modification you mentioned?  Could you share
the code you shared to get this output in the latest beta?

On Mon, May 15, 2017 at 3:27 AM, Otared Kavian <ota...@gmail.com> wrote:

> Hi Mohammad Hossein,
>
> I don’t get what you expected to obtain in your message, but typesetting
> your example code (with a small modification) I get the attached PDF file,
> which seems correct to me.
> I am using ConTeXt  version 2017.05.12 22:40 MKIV beta, with LuaTeX
> version 1.0.4 on MacOS 10.12.5.
>
> Best regards: Otared K.
>
>
>
>
>
>
> > On 15 May 2017, at 05:37, Mohammad Hossein Bateni <bat...@gmail.com>
> wrote:
> >
> > The version in 
> > tex/texmf-context/tex/context/fonts/mkiv/type-imp-mathdigits.mkiv
> is a typescript.  Here is a simpler version using defintfontfamily and
> definefallbackfamily, which doesn't work in the recent beta (but worked
> well back in January).
> >
> >
> > \definefontfamily [minionmath] [rm] [Minion Pro]
> > \definefallbackfamily [minionmath] [mm] [dejavusansmono] [range=
> digitsextendedarabicindic,offset=digitsnormal]
> > \definefallbackfamily [minionmath] [mm] [dejavusansmono] [range=
> digitsextendedarabicindic,offset=digitsbold,tf=style:bold]
> > \definefontfamily [minionmath] [mm] [TeX Gyre Pagella Math]
> >
> > \startttext
> >
> > \switchtobodyfont[minionmath]
> >
> > \startformula
> > {\tf xyz} xyz {\bf xyz} {\bi xyz}, 2+3, {\bf 2+3}
> > \stopformula
> >
> > \stoptext
> >
> >
> > With beta version 2017.01.17 17:37 it used to work and change the
> digits to Indic inside math.  With beta version 2017.04.27 01:00, the
> digits do not change to Indic.  However, everything in math changes to
> dejavusansmono (bold, because that was the last fallback definition?).
> >
> > On Fri, May 12, 2017 at 7:34 PM, Mohammad Hossein Bateni <
> bat...@gmail.com> wrote:
> > Hi,
> >
> > The example for replacing Arabic numerals by Indic digits inside math
> used to work (at least) until version 2017.01.17 17:37.
> >
> > tex/texmf-context/tex/context/fonts/mkiv/type-imp-mathdigits.mkiv
> >
> > Now in version 2017.04.27 01:00, this does not produce the desired
> output: it's all "Latin" digits.
> >
> > Has something changed regarding fontfallback definitions?
> >
> > Thanks,
> > MHB
> >
> > 
> ___
> > 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
> > 
> ___
>
>
> 
> ___
> 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
> 
> ___
>
___
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] mathdigits no longer works

2017-05-14 Thread Mohammad Hossein Bateni
The version in tex/texmf-context/tex/context/fonts/mkiv/type-imp-mathdigits.mkiv
is a typescript.  Here is a simpler version using defintfontfamily and
definefallbackfamily, which doesn't work in the recent beta (but worked
well back in January).


\definefontfamily [minionmath] [rm] [Minion Pro]
\definefallbackfamily [minionmath] [mm] [dejavusansmono]
[range=digitsextendedarabicindic,offset=digitsnormal]
\definefallbackfamily [minionmath] [mm] [dejavusansmono]
[range=digitsextendedarabicindic,offset=digitsbold,tf=style:bold]
\definefontfamily [minionmath] [mm] [TeX Gyre Pagella Math]

\startttext

\switchtobodyfont[minionmath]

\startformula
{\tf xyz} xyz {\bf xyz} {\bi xyz}, 2+3, {\bf 2+3}
\stopformula

\stoptext


With beta version 2017.01.17 17:37 it used to work and change the digits to
Indic inside math.  With beta version 2017.04.27 01:00, the digits do not
change to Indic.  However, everything in math changes to dejavusansmono
(bold, because that was the last fallback definition?).

On Fri, May 12, 2017 at 7:34 PM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hi,
>
> The example for replacing Arabic numerals by Indic digits inside math used
> to work (at least) until version 2017.01.17 17:37.
>
> tex/texmf-context/tex/context/fonts/mkiv/type-imp-mathdigits.mkiv
>
> Now in version 2017.04.27 01:00, this does not produce the desired output:
> it's all "Latin" digits.
>
> Has something changed regarding fontfallback definitions?
>
> Thanks,
> MHB
>
___
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] mathdigits no longer works

2017-05-12 Thread Mohammad Hossein Bateni
Hi,

The example for replacing Arabic numerals by Indic digits inside math used
to work (at least) until version 2017.01.17 17:37.

tex/texmf-context/tex/context/fonts/mkiv/type-imp-mathdigits.mkiv

Now in version 2017.04.27 01:00, this does not produce the desired output:
it's all "Latin" digits.

Has something changed regarding fontfallback definitions?

Thanks,
MHB
___
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] getting the glyph of a character

2017-05-01 Thread Mohammad Hossein Bateni
MetaPost's documentation mentions that glyph operator works on Adobe Type 1
fonts.  Does it also work with OpenType fonts when used from within LuaTeX
and CONTEXT?

On Mon, May 1, 2017 at 7:36 PM, Jeong Dal  wrote:

> Dear all,
>
> First of all, the sample code is working under the ConTeXt
> beta(standalone) installed in my notebook.
> I am very sorry to send mails of false result.
>
> I found the file “lm-ec.map” installed in the ConTeXt beta(standalone),
> and I don’t know why it was not working in the iMac. I have to check the
> installation.
>
> However, I’d like to know how to make map files of the fonts in the system
> for which the map file is not provided?
>
> Thank you for reading.
>
> Best regards,
>
> Dalyoung
>
>
> \startbuffer[outline]
> fontmapfile "=lm-ec.map";
> %beginfig(56);
> picture q;
> path p;
> interim ahlength := 12bp;
> interim ahangle := 25;
> q := glyph “E" of "ec-lmr10" scaled .2;
> %draw q;
>  for item within q:
>   p := pathpart item;
>   draw p withcolor (.6,.9,.6)
>   withpen pencircle scaled 1.5;
> endfor
> \stopbuffer
>
> \starttext
> \processMPbuffer[outline]
> \stoptext
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
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] Wrong redirection in contextgarden.net

2017-04-29 Thread Mohammad Hossein Bateni
yeah, I've had this problem awhile too.

On Sat, Apr 29, 2017 at 3:47 AM, Nicola  wrote:

> For a while now, when I connect to contextgarden.net, I get redirected
> to wiki.contextgarden.net// (note the double slash). Is it just me, or
> something to be fixed in the web site?
>
> Nicola
>
> 
> ___
> 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/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
___
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] Context Journal Articles

2017-04-25 Thread Mohammad Hossein Bateni
Hi,

According to the following website, "Proceedings 9° ConTeXt meeting,
Nasbinals, France, 2015 (PDFs will become available in March 2017)."
http://articles.contextgarden.net/journal/

It's not April :)  Is anyone planning to upload the PDFs?

Thanks,
Hossein
___
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] closesymbol on same line as displayed formula

2017-03-21 Thread Mohammad Hossein Bateni
What has changed, Otared, is that Hans reimplemented inner workings of
displayed formulas and in particular its alignment mechanisms, I suppose.
A few months back he had issued warnings that certain things may break
there.
—Hossein

On Tue, Mar 21, 2017 at 2:51 AM, Mikael P. Sundqvist 
wrote:

> On Mon, Mar 20, 2017 at 11:46 PM, Aditya Mahajan 
> wrote:
> > On Mon, 20 Mar 2017, Mikael P. Sundqvist wrote:
> >
> >> On Tue, Mar 14, 2017 at 7:23 PM, Mikael P. Sundqvist 
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I'm bringing up an old question on placing the qedsymbol, or
> >>> closesymbol as it is also called. This was previously discussed in
> >>> https://mailman.ntg.nl/pipermail/ntg-context/2014/079807.html and the
> >>> purpose of this post is to ask if there is any solution to the problem
> >>> now. Looking at the file below (output is attached), when the proof
> >>> ends with a displayed formula, the closesymbol is located one row
> >>> down. I want it to be (flushright) on the same line as the displayed
> >>> formula.
> >>>
> >>> If I use \placeclosesymbol the closesymbol is indeed put on the
> >>> correct line, but not flushright.
> >>>
> >>> Any ideas? I'm willing to use some command like \placeclosesymbol in
> >>> the occations when the proof ends with a displayed formula.
> >>>
> >>> /Mikael
> >>>
> >>> \defineenumeration[proof][
> >>> number=no,
> >>> text=Proof,
> >>> headstyle={\it},
> >>> alternative=serried,
> >>> width=fit,
> >>> closesymbol={$\square$},
> >>> ]
> >>>
> >>> \starttext
> >>>
> >>> \startproof
> >>> This is a short proof.
> >>> \stopproof
> >>>
> >>> \startproof
> >>> This is another short proof, ending with the formula
> >>> \startformula
> >>> 1+1=2.
> >>> \stopformula
> >>> \stopproof
> >>>
> >>> \startproof
> >>> This is another short proof, ending with the formula
> >>> \startformula
> >>> 1+1=2.\placeclosesymbol
> >>> \stopformula
> >>> \stopproof
> >>>
> >>>
> >>>
> >>> \startproof
> >>> This is a rather advanced proof, ending with formulas
> >>> \startformula
> >>> \startalign
> >>> \NC 1+1 \NC = 2,\NR
> >>> \NC 2+2 \NC = 4.\NR
> >>> \stopalign
> >>> \stopformula
> >>> \stopproof
> >>>
> >>> \startproof
> >>> This is a rather advanced proof, ending with formulas
> >>> \startformula
> >>> \startalign
> >>> \NC 1+1 \NC = 2,\NR
> >>> \NC 2+2 \NC = 4.\placeclosesymbol\NR
> >>> \stopalign
> >>> \stopformula
> >>> \stopproof
> >>>
> >>> \stoptext
> >>
> >>
> >> Partly shameful bump.
> >>
> >> Is it even possible? (It is using LaTeX and the \qedhere command)
> >>
> >> Could I provide more information?
> >
> >
> > What is the expected output when the last formula has an equation number?
> >
> > 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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> > 
> ___
>
> Thank you Aditya and Otared for showing some interest in this question.
>
> I agree with you Aditya that a closesymbol could interfere with an
> equation number, and I think that one should try hard to reword the
> proof (or what it could be) to avoid that problem. In my current case
> it is calculus examples, and some of them naturally ends with a simple
> calculation, and none has an equation number.
>
> As Otared points out, there was a working solution for a while (even
> though it may have been an ugly hack with eqno), so I guess it is
> somehow doable. And the closesymbol and closecommand keys are there...
> I just don't know how to code a working solution (say, not taking care
> of the problem with equation numbers)...
>
> /Mikael
> 
> ___
> 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
> 
> ___
>
___
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] which command would give the same effect as \pause in beamer ?

2017-02-27 Thread Mohammad Hossein Bateni
I once ported RawSteps to MkIV but have not touched it in a while (and
probably won't have time to anytime soon).  Ten months ago, it used to work
almost fine.

https://github.com/bateni/rawsteps-mkiv

On Mon, Feb 27, 2017 at 12:00 PM, Otared Kavian  wrote:

> Hi,
>
> If you use mkii you can still use RawSteps, but in mkiv it does not work
> properly and should be rewritten.
> However, as Hans indicates, one can use \startsetp and friends, as shown
> in the example presentations found in your directory
> texmf/doc/context/presentations
>
> Best regrads: OK
>
> On 27 Feb 2017, at 15:53, kaddour kardio  wrote:
>
> http://wiki.contextgarden.net/RawSteps is it still relevant dear Hans ?
>
> On Mon, Feb 27, 2017 at 3:37 PM, Hans Hagen  wrote:
>
>> On 2/27/2017 1:16 PM, dam...@thiriet.web4me.fr wrote:
>>
>>> Hello,
>>>
>>>
>>> I have been switching to conTEXt to prepare some of my teaching stuff. I
>>> have read the context ref manual, the wiki and browsed the web, but
>>> couldn't find anything related to so-called overlays in beamer (I justed
>>> greped mail archives for 2015–2017).
>>> What would be the conTEXt way to have a list or whatever else displayed
>>> in a slide in such a way that point 2 is hidden until you press space, and
>>> so on.
>>> In beamer, you would make it this way
>>>
>>> \begin{frame}
>>>\begin{itemize}
>>>   \item 1
>>>   \pause
>>>   \item 2
>>>   \pause
>>>  \item 3
>>> \end{frame}
>>>
>>> Or even better,
>>>
>>> \begin{frame}
>>>\begin{itemize}[<+->]
>>>   \item 1
>>>   \item 2
>>>  \item 3
>>> \end{frame}
>>>
>>> I read about \starthiding and \stophiding in the manual, but as far as I
>>> understand, this is not exactly what I am looking for.
>>> I don't think postponing would help either.
>>>
>>> Any suggestion will be welcome. I am using texlive 2015 version (nothing
>>> newer is available yet in OpenBSD).
>>> Have a nice day,
>>>
>>
>> texmf/doc/context/presentations
>>
>> has examples ... you can have steps (pre-stepwise)
>>
>> Hans
>>
>>
>> -
>>   Hans Hagen | PRAGMA ADE
>>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
>> -
>>
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> 
>> ___
>>
>
>
>
> --
> Dr YAHYAOUI Mohamed Kaddour, cardiologue.Clinique EL ABRAR.
> 
> ___
> 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
> 
> ___
>
>
>
> 
> ___
> 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
> 
> ___
>
___
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] Algorithmic, Floats and line numbers.

2016-10-27 Thread Mohammad Hossein Bateni
How does one reset the counter then?  Normally one would like it to start
from 1 within each algorithmic block.  But definelabel seems to have bytext
and bysection options only.

On Wed, Oct 26, 2016 at 2:00 PM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Javier M Mora 
> 24. Oktober 2016 um 14:37
> Hi, I'm trying to use Algorithmic module with floating and line numbering.
>
> In the first attempt, I get the "code" with lines numbered. But isn't
> floating.
>
> In the second one, line numbers disappear inside the floating block.
>
>
> Two questions:
>
> * How can I get line numbers inside floating block?
>
> You can’t use them in floats unless you add a frame around the content,
> e.g.
>
> \startplacealgorithm
> \startframedtext
> \startlinenumbering
> ...
> \stoplinenumbering
> \stopframedtext
> \stopplacealgorithm
>
> * In algorithms, I think it has more sense to number only "logical" lines.
> The second state is so long that wraps into another line. Is it possible to
> number only logical lines?
>
> Not with linenumbering, what you need is counter which is inserted at the
> begin of each line.
>
> \definelabel[algorithmicline][text=,alternative=inleft]
>
> \definelines[algorithmic][command=\algorithmicline]
>
> \setuplayout[width=4cm]
>
> \showframe[text][text]
>
> \starttext
>
> \startalgorithmic
> text
> text text text text text text text text text text text text
> text
> \stopalgorithmic
>
> \stoptext
>
> Wolfgang
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
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] ConTeXt Garden Articles Site

2016-10-13 Thread Mohammad Hossein Bateni
This is great news and the effort is much appreciated!

On Thu, Oct 13, 2016 at 10:31 AM, Taco Hoekwater  wrote:

> Hi all,
>
> At the recent 10th ConTeXt meeting, we also had the 6th members meeting
> of the ConTeXt Group.
>
> The ConTeXt Group uses the annual members meeting to keep track of the
> activities that are deployed by and for our members as well as ConTeXt
> users in general.
>
> One item on the agenda this year was the Electronic publication of the
> CG Journal. The assembly agreed that in the future we would publish the
> table of contents of the CG Journal as quickly as possible, and the
> PDFs of actual articles therein six months after appearance of the
> printed version of an issue.
>
> The table of contents of the 2016 journal issue is still undecided at
> this moment, we have to wait and see how many articles we will actually
> receive before the deadline of November 15.
>
> The PDFs of the 2015 journal issue will become available in March 2017,
> because it was released on paper during the 10th meeting.
>
> But the PDFs of previous issues’ articles can now be downloaded from:
>
>   http://articles.contextgarden.net/journal
>
> While setting up this new site, I purposely used /journal for the
> CG Journal, so that there is room for other articles from other
> sources besides the ConTeXt Group.
>
> If you have written an article --or know of an article by someone else—
> that you believe would be interesting to add to the site, please send
> me an email message with the details and (link to) the PDF. But note
> that we will only consider articles that can technically and legally be
> hosted on articles.contextgarden.net itself (no external links).
>
> Best wishes,
>
> Taco
>
> --
> The item(s) mentioned in this message are only part of the activities
> undertaken by the ConTeXt Group. The ConTeXt Group is a non-profit
> organisation set up for and by ConTeXt users, with its purpose being
> promoting and facilitating the use of the ConTeXt typesetting
> system developed by Pragma ADE.
>
> We can always use more volunteers and members, so please think about
> joining in! See http://group.contextgarden.net/ for more information.
>
>
> 
> ___
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> 
> ___
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] cannot update to latest beta

2016-10-11 Thread Mohammad Hossein Bateni
Phillip,

The bitbucket mirror has not gotten updated since September 24.  Is there a
misconfiguration?

—MHB

On Thu, Sep 22, 2016 at 4:01 PM, Taco Hoekwater  wrote:

> Hi Pablo,
>
> > Op 22 sep. 2016 om 20:53 heeft Pablo Rodriguez  het
> volgende geschreven:
> >
> >> On 09/21/2016 11:26 PM, Philipp Gesang wrote:
> >> ·
> >>
> >>> Dear list,
> >>>
> >>> although latest beta seems to be from 2016.09.20 21:12, I get updated
> to
> >>> beta from 2016.09.12 18:27 when I run:
> >>
> >> The official download still has the 2016.09.12 timestamp:
> >> http://pragma-ade.nl/download-2.htm How did you get that other
> >> date? I hope the git mirror isn’t scraping the wrong page ;)
> >
> > Philipp,
> >
> > I know that there is a new beta reading the metadata from
> > http://www.pragma-ade.com/general/qrcs/setup-en.pdf.
> >
> > Here is the revealing field:
> >
> >Creator:ConTeXt - 2016.09.22 10:48
>
> True, this means there exists a new version of context somewhere. But what
> you do not know is that there is a third context release state. Besides
> 'current' and 'beta' there is also 'latest'.
>
> 'Latest' contains experimental and/or in development code that needs to be
> shared for further testing or development. The easiest way for Hans to do
> that is to upload a new version to the website, and whenever any version of
> context is uploaded, the qrcs are uploaded as well.
>
> An easier and safer way to check for a new context release is to browse
> through the 'download' section of the Pragma website, which is always
> auto-updated in the release process. Or just run first-setup whenever you
> feel like it ;)
>
> Best wishes,
> Taco
>
>
> >
> > When a new beta is realeased, this is the easiest way for me to know.
> >
> > But probably Hans is busy with the ConTeXt Meeting next week and he
> > didn’t upload the beta.
> >
> > Many thanks for your help,
> >
> > Pablo
> > --
> > http://www.ousia.tk
> > 
> ___
> > If your question is of interest to others as well, please add an entry
> to the Wiki!
> >
> > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> > webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> > archive  : http://foundry.supelec.fr/projects/contextrev/
> > wiki : http://contextgarden.net
> > 
> ___
>
> 
> ___
> 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
> 
> ___
>
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] How to use "fontsampler example" with Persian font

2016-10-11 Thread Mohammad Hossein Bateni
This seems to not belong in the ConTeXt mailing list.  You'd be better off
asking it on Stack Exchange or on luatex mailing list.  The short answer is
it depends on the "format file" (and perhaps the LaTeX packages) you're
using.  Most probably, you either use "plain" or "latex", and then you
should see how they generate the page numbers and define a macro that
provides the Persian numbers, etc.  See how XePersian package handles it.
 (Search for \pagenumbering.)

On Mon, Oct 10, 2016 at 11:44 PM, Mingranina Gingranina <
mingran...@gmail.com> wrote:

> Dear Wolfgang
>  Hello,
>
> First of all, let me thank you very much for your informative answer.
>
> On 10/10/16, Wolfgang Schuster  wrote:
> >> Mingranina Gingranina 
> >> 7. Oktober 2016 um 17:41
> >> Dear Mohammad,
> >> Hi,
> >>
> >> Thank you very much for your reply. I forgot to mention that I had
> >> modified the fontsampler codes so that I can use it in ConTeXt with
> >> Dabeer module.
> > 1. What is Dabeer?
>
> It is a module for Persian typesetting in ConTeXt. Please see:
> https://github.com/bateni/dabeer
>
> >
> > 2. You can access the list of known fonts with the "fonts.names.list"
> > function:
> >
> > \setuppapersize[A4,landscape]
> >
> > \starttext
> >
> > \startluacode
> >
> > local fontlist = fonts.names.list("",true,true)
> >
> > context.starttabulate({"|l|l|"})
> > for fontname, fontentry in next, fontlist do
> >  context.NC()
> >  context(fontentry["rawname"])
> >  context.NC()
> >  context(fontentry["filename"])
> >  context.NC()
> >  context.NR()
> > end
> > context.stoptabulate()
> >
> > \stopluacode
> >
> > \stoptext
> >> However, inspired by your reply I could get it to work in LuaTeX but
> >> not in ConTeXt with Dabeer module.
> >>
> >> Are there any other set of features that I can test?
> > ConTeXt inludes a few modules which can be used to show font information
> > (search for s-fonts-*.mkiv|mkvi and s-math-*.mkiv|mkvi), below is a
> > example from s-fonts-tables.mkiv:
> >
> > \usemodule[fonts-tables]
> >
> > \setupbodyfont[pagella]
> >
> > \starttext
> > \showfonttables[title={TeX Gyre Pagella}]
> > \stoptext
>
> I am a novice in LuaTeX and ConTeXt and to learn these I tried to
> modify FontSampler code (http://wiki.luatex.org/index.php/Fontsampler)
> to get a sample of Persian fonts in a directory hierarchy too.
>
> BTW, at the moment my problem with LuaTeX is that the page numbering
> is in english. Do you know how to change the page numbering to Persian
> in LuaTeX?
>
>  Thanks,
>  Mingranina
> 
> ___
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> 
> ___
>
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Slides/material from the Context User Meeting

2016-10-09 Thread Mohammad Hossein Bateni
On Thu, Oct 6, 2016 at 4:08 PM, Henning Hraban Ramm <te...@fiee.net> wrote:

> Am 2016-10-06 um 18:16 schrieb Mohammad Hossein Bateni <bat...@gmail.com>:
>
> > If I recall correctly someone mentioned on the list that you typically
> collect the slides during the meeting.  Would it be possible to share them
> if you have done so this year?
>
> An important part are the updated and added manuals, have a look at
> http://www.pragma-ade.com/overview.htm
>
> LuaTeX 1.0.0 is announced and distributed.
>
> Minimals contain a new cowfont (with colorable backgrounds) and some
> (most? all?) of the manuals.
>
> Oh, and the new interface files (texmf-context/tex/context/interface)!
>

I guess, I was following these gradually as they were happening but I was
thinking maybe other material from the meeting could be shared.  That's why
I mentioned the slides of the talks.

> In general, is there any material related to the meeting that unlucky
> non-participants can access?  I mean, besides the group photo that's up on
> the website :)
>

The bitbucket mirror has not been updated since September 24.  Is that
normal or the result of some configuration mismatch?
___
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] How to use "fontsampler example" with Persian font

2016-10-07 Thread Mohammad Hossein Bateni
In ConTeXt, use \definedfont[font-name*arabic] instead of the following two
commands:

\font\myfont=blah blah
\myfont

On Fri, Oct 7, 2016 at 11:41 AM, Mingranina Gingranina <mingran...@gmail.com
> wrote:

>  Dear Mohammad,
>  Hi,
>
>  Thank you very much for your reply. I forgot to mention that I had
> modified the fontsampler codes so that I can use it in ConTeXt with
> Dabeer module.
>
>  However, inspired by your reply I could get it to work in LuaTeX but
> not in ConTeXt with Dabeer module.
>
>  Are there any other set of features that I can test?
>
>  Thanks,
>  Mingranina
>
> On 10/7/16, Mohammad Hossein Bateni <bat...@gmail.com> wrote:
> > The following works for me:
> >
> > \input luaotfload.sty
> > \font \myfont =
> > file:HM_XNiloofar.ttf:language=dflt;script=arab;
> ccmp=yes;init=yes;medi=yes;fina=yes;rlig=yes
> > \myfont Salam
> >
> > \pardir TRT
> > \textdir TRT
> > سلام
> > حسن
> > \bye
> >
> >
> > On Fri, Oct 7, 2016 at 7:19 AM, Mohammad Hossein Bateni <
> bat...@gmail.com>
> > wrote:
> >
> >> I don't know much about fontsampler but the commands you list here are
> >> mostly irrelevant.  My guess is you will need to set the features in the
> >> font to get proper shaping.  A good set of features that should do the
> >> trick is called "arabic".
> >>
> >> When loading the font, you should do something like the following, but I
> >> have not tried it myself.
> >>
> >> \font\myfont=file:font.otf:language=dflt;script=arab;
> >> ccmp=yes;init=yes;medi=yes;fina=yes;rlig=yes
> >>
> >> —MHB
> >>
> >>
> >> On Fri, Oct 7, 2016 at 7:01 AM, Mingranina Gingranina <
> >> mingran...@gmail.com> wrote:
> >>
> >>> Dear All,
> >>>  Hello,
> >>>
> >>>  I am trying to use "fontsampler example" with Persian fonts (please
> >>> see below or "http://wiki.luatex.org/index.php/Fontsampler;
> >>>  for fontsampler codes).
> >>>  The problem is that Persian words apears as a string of separate
> >>> glyphs, for example I get "ح‌س‌ن" instead of "حسن".
> >>>  Do I have to use commands like the followings inside \directlua or
> >>> tex.tprint to fix the problem? If yes, how can I do that?
> >>>
> >>> \installlanguage [fa][default=pe,date=\longjalalidatefmt]
> >>> \mainlanguage[fa]
> >>>
> >>> \definefontfeature[tlig][tlig=yes]
> >>> \definefontfeature[slanted][slant=.2]
> >>> \definefontfeature[dlang][language=dflt]
> >>> \definefontfeature[flang][language=far]
> >>>
> >>> Thanks
> >>> Mingranina
> >>>
> >>>
> >>> fontsampler.tex
> >>> 
> >>> =
> >>> \input luaotfload.sty
> >>> \overfullrule 0pt
> >>> \font\mono = {file:lmmono8-regular.otf} at 6pt
> >>> \parindent 0pt
> >>>
> >>> \def \samplestring {Sphinx of black quartz, judge my vow. 1234567890
> >>> äÄöÖüÜ ß !"§\$\%\&()=?}
> >>>
> >>> \directlua{
> >>>   dofile("fontsampler.lua")
> >>>   fontsampler(arg[2])
> >>> }
> >>>
> >>> \bye
> >>> 
> >>> =
> >>> End Of fontsampler.tex
> >>>
> >>>
> >>> fontsampler.lua
> >>> 
> >>> =
> >>> function dirtree(dir)
> >>>   assert(dir and dir ~= "", "directory parameter is missing or empty")
> >>>   if string.sub(dir, -1) == "/" then
> >>> dir=string.sub(dir, 1, -2)
> >>>   end
> >>>
> >>>   local function yieldtree(dir)
> >>> for entry in lfs.dir(dir) do
> >>>   if not entry:match("^%.") then
> >>> entry=dir.."/"..entry
> >>>   if not lfs.isdir(entry) then
> >>> coroutine.yield(entry,lfs.attributes(entry))
> >>>   end
> >>>   if lfs.isdir(entry) then
> >>> yieldt

Re: [NTG-context] How to use "fontsampler example" with Persian font

2016-10-07 Thread Mohammad Hossein Bateni
The following works for me:

\input luaotfload.sty
\font \myfont =
file:HM_XNiloofar.ttf:language=dflt;script=arab;ccmp=yes;init=yes;medi=yes;fina=yes;rlig=yes
\myfont Salam

\pardir TRT
\textdir TRT
سلام
حسن
\bye


On Fri, Oct 7, 2016 at 7:19 AM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> I don't know much about fontsampler but the commands you list here are
> mostly irrelevant.  My guess is you will need to set the features in the
> font to get proper shaping.  A good set of features that should do the
> trick is called "arabic".
>
> When loading the font, you should do something like the following, but I
> have not tried it myself.
>
> \font\myfont=file:font.otf:language=dflt;script=arab;
> ccmp=yes;init=yes;medi=yes;fina=yes;rlig=yes
>
> —MHB
>
>
> On Fri, Oct 7, 2016 at 7:01 AM, Mingranina Gingranina <
> mingran...@gmail.com> wrote:
>
>> Dear All,
>>  Hello,
>>
>>  I am trying to use "fontsampler example" with Persian fonts (please
>> see below or "http://wiki.luatex.org/index.php/Fontsampler;
>>  for fontsampler codes).
>>  The problem is that Persian words apears as a string of separate
>> glyphs, for example I get "ح‌س‌ن" instead of "حسن".
>>  Do I have to use commands like the followings inside \directlua or
>> tex.tprint to fix the problem? If yes, how can I do that?
>>
>> \installlanguage [fa][default=pe,date=\longjalalidatefmt]
>> \mainlanguage[fa]
>>
>> \definefontfeature[tlig][tlig=yes]
>> \definefontfeature[slanted][slant=.2]
>> \definefontfeature[dlang][language=dflt]
>> \definefontfeature[flang][language=far]
>>
>> Thanks
>> Mingranina
>>
>>
>> fontsampler.tex
>> 
>> =
>> \input luaotfload.sty
>> \overfullrule 0pt
>> \font\mono = {file:lmmono8-regular.otf} at 6pt
>> \parindent 0pt
>>
>> \def \samplestring {Sphinx of black quartz, judge my vow. 1234567890
>> äÄöÖüÜ ß !"§\$\%\&()=?}
>>
>> \directlua{
>>   dofile("fontsampler.lua")
>>   fontsampler(arg[2])
>> }
>>
>> \bye
>> 
>> =
>> End Of fontsampler.tex
>>
>>
>> fontsampler.lua
>> 
>> =
>> function dirtree(dir)
>>   assert(dir and dir ~= "", "directory parameter is missing or empty")
>>   if string.sub(dir, -1) == "/" then
>> dir=string.sub(dir, 1, -2)
>>   end
>>
>>   local function yieldtree(dir)
>> for entry in lfs.dir(dir) do
>>   if not entry:match("^%.") then
>> entry=dir.."/"..entry
>>   if not lfs.isdir(entry) then
>> coroutine.yield(entry,lfs.attributes(entry))
>>   end
>>   if lfs.isdir(entry) then
>> yieldtree(entry)
>>   end
>>   end
>> end
>>   end
>>
>>   return coroutine.wrap(function() yieldtree(dir) end)
>> end
>>
>>
>> function fontsampler( dir )
>>   for entry in dirtree(dir) do
>> if entry:match(".otf","-4") then
>>   tex.tprint({[[\mono ]]},{-2,entry},{[[
>> (]]},{-2,fontloader.info(entry).fontname},{[[)\par\penalty
>> 1\font\sample={file:]]},{-2,entry},{[[} at
>> 12pt\sample\samplestring\par\penalty 1\vrule width \hsize height
>> 0.25pt depth 0pt\par]]})
>> end
>>   end
>> end
>> 
>> =
>> End Of fontsampler.lua
>> 
>> ___
>> 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/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> 
>> ___
>
>
>
___
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] How to use "fontsampler example" with Persian font

2016-10-07 Thread Mohammad Hossein Bateni
I don't know much about fontsampler but the commands you list here are
mostly irrelevant.  My guess is you will need to set the features in the
font to get proper shaping.  A good set of features that should do the
trick is called "arabic".

When loading the font, you should do something like the following, but I
have not tried it myself.

\font\myfont=file:font.otf:language=dflt;script=arab;ccmp=yes;init=yes;medi=yes;fina=yes;rlig=yes

—MHB

On Fri, Oct 7, 2016 at 7:01 AM, Mingranina Gingranina 
wrote:

> Dear All,
>  Hello,
>
>  I am trying to use "fontsampler example" with Persian fonts (please
> see below or "http://wiki.luatex.org/index.php/Fontsampler;
>  for fontsampler codes).
>  The problem is that Persian words apears as a string of separate
> glyphs, for example I get "ح‌س‌ن" instead of "حسن".
>  Do I have to use commands like the followings inside \directlua or
> tex.tprint to fix the problem? If yes, how can I do that?
>
> \installlanguage [fa][default=pe,date=\longjalalidatefmt]
> \mainlanguage[fa]
>
> \definefontfeature[tlig][tlig=yes]
> \definefontfeature[slanted][slant=.2]
> \definefontfeature[dlang][language=dflt]
> \definefontfeature[flang][language=far]
>
> Thanks
> Mingranina
>
>
> fontsampler.tex
> 
> =
> \input luaotfload.sty
> \overfullrule 0pt
> \font\mono = {file:lmmono8-regular.otf} at 6pt
> \parindent 0pt
>
> \def \samplestring {Sphinx of black quartz, judge my vow. 1234567890
> äÄöÖüÜ ß !"§\$\%\&()=?}
>
> \directlua{
>   dofile("fontsampler.lua")
>   fontsampler(arg[2])
> }
>
> \bye
> 
> =
> End Of fontsampler.tex
>
>
> fontsampler.lua
> 
> =
> function dirtree(dir)
>   assert(dir and dir ~= "", "directory parameter is missing or empty")
>   if string.sub(dir, -1) == "/" then
> dir=string.sub(dir, 1, -2)
>   end
>
>   local function yieldtree(dir)
> for entry in lfs.dir(dir) do
>   if not entry:match("^%.") then
> entry=dir.."/"..entry
>   if not lfs.isdir(entry) then
> coroutine.yield(entry,lfs.attributes(entry))
>   end
>   if lfs.isdir(entry) then
> yieldtree(entry)
>   end
>   end
> end
>   end
>
>   return coroutine.wrap(function() yieldtree(dir) end)
> end
>
>
> function fontsampler( dir )
>   for entry in dirtree(dir) do
> if entry:match(".otf","-4") then
>   tex.tprint({[[\mono ]]},{-2,entry},{[[
> (]]},{-2,fontloader.info(entry).fontname},{[[)\par\penalty
> 1\font\sample={file:]]},{-2,entry},{[[} at
> 12pt\sample\samplestring\par\penalty 1\vrule width \hsize height
> 0.25pt depth 0pt\par]]})
> end
>   end
> end
> 
> =
> End Of fontsampler.lua
> 
> ___
> 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
> 
> ___
___
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] Slides/material from the Context User Meeting

2016-10-06 Thread Mohammad Hossein Bateni
Hello Mojca,

If I recall correctly someone mentioned on the list that you typically
collect the slides during the meeting.  Would it be possible to share them
if you have done so this year?

In general, is there any material related to the meeting that unlucky
non-participants can access?  I mean, besides the group photo that's up on
the website :)

Who's in charge of the "proceedings," by the way?  When will that be sent
to members of the ConTeXt User Group?

Thanks,
~MHB
___
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] Bug in \not\in?

2016-09-18 Thread Mohammad Hossein Bateni
Hi,

When using \not\in in math, the two symbols do not overlap as they should.
Am I missing something?


\starttext
$v\not\in S$.
\stoptext


I am using 2016.09.12 18:27 beta on Linux with LuaTeX Version 0.98.3 (TeX
Live 2017/dev).

Thanks,
~MHB
___
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] Problems with indexing (+feature requests)

2016-08-27 Thread Mohammad Hossein Bateni
This is great, Wolfgang!

On Mon, Aug 22, 2016 at 5:06 AM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Mohammad Hossein Bateni <bat...@gmail.com>
> 22. August 2016 um 10:49
> Same problem, item (6) of email below, observed with arabtype font.  See
> attached.  MWE follows.
>
> \definefontfamily [myfamily] [serif] [arabictypesetting] [features=arabic]
> \setupbodyfont[myfamily]
> \setupalign[r2l]
> \setupdirections[bidi=global,method=two]
>
> \setupmixedcolumns[register][direction=reverse]
>
> When you have a font with large ascender/descender you can increase the
> linespacing (line key) or change the height/depth (height and depth keys)
> values for \strut.
>
> \startsetups[register:interlinespace]
> \setupinterlinespace[height=0.6,depth=0.4,line=3.2ex]
> \stopsetups
>
> \setupmixedcolumns
>   [index]
>   [direction=reverse,
>setups=register:interlinespace]
>
> Wolfgang
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> 
> ___
>
___
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] another font loading error

2016-08-22 Thread Mohammad Hossein Bateni
Wolfgang,

thanks for looking into it!

does this mean there is some bug in CONTEXT/LuaTeX font loading or
something wrong with the font?  i looked at the history on bitbucket mirror
and the problem seems to have started when we moved from 2016-08-11 14:00:00
 to 2016-08-15 22:45:00.

the offending lines in tex/context/base/mkiv/font-ots.lua (line 3762) has

kerns={
 [1705]={
  [2]={ 0, 0, -290, 0 },
 },
 [1707]={
  [2]={ 0, 0, -290, 0 },
 },
 [1711]={
  [2]={ 0, 0, -290, 0 },
 },
 [64400]={
  [2]={ 0, 0, -290, 0 },
 },
 [64404]={
  [2]={ 0, 0, -290, 0 },
 },
 [64469]={
  [2]={ 0, 0, -290, 0 },
 },
 [65243]={
  [2]={ 0, 0, -290, 0 },
 },
 [983071]={
  [2]={ 0, 0, -290, 0 },
 },
}

and with k, v = 1705, { 0, 0, -290, 0 }, we want to dereference v[1][3],
which leads to an error.  prior to this change, the code was looking up
v[3] (which would result in nil but no further dereferencing to cause an
error).  i checked that this part of the table was the same with the
previous version (from 08-08).

—MHB

On Mon, Aug 22, 2016 at 11:45 AM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Mohammad Hossein Bateni <bat...@gmail.com>
> 22. August 2016 um 17:01
> Hello,
>
> After the upgrade to latest beta (from 08.08 21:28), I cannot load many of
> my Persian fonts (one uploaded here <http://mhbateni.com/context/bug-03/>
> for testing).  It works on "current" without any issues but not on "beta".
> Find an MWE as well as the error message below.  (I did test on a fresh
> standalone version as well.)
>
>
> \starttext
> \definedfont[HMXNiloofar*arabic]
> Salam
> \stoptext
>
>
> When I change the value from the "hasspacekerns" variable (after deleting
> hm-xniloofar.tmc) in hm-xniloofar.tma from true to false the font is loaded
> without errors.
>
>
> hm-xniloofar.tma (line 7147 ff):
>
>  ["properties"]={
>   ["hascolor"]=false,
>   ["hasitalics"]=false,
>   ["hasspacekerns"]=true,
>  },
>
>
> Wolfgang
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> 
> ___
>
___
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] another font loading error

2016-08-22 Thread Mohammad Hossein Bateni
Hello,

After the upgrade to latest beta (from 08.08 21:28), I cannot load many of
my Persian fonts (one uploaded here 
for testing).  It works on "current" without any issues but not on "beta".
Find an MWE as well as the error message below.  (I did test on a fresh
standalone version as well.)


\starttext
\definedfont[HMXNiloofar*arabic]
Salam
\stoptext


...ext/tex/texmf-context/tex/context/base/mkiv/font-ots.lua:3764: attempt
to index field '?' (a nil value)
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/font-ots.lua:3764: in
function 'action'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1407: in
function 'initializefeatures'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:263: in
function 'setfeatures'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:557: in
function 'otftotfm'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:566: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:565>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:316: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:492: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:418: in
function 'read'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1175: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1062>

1 \starttext
2 >>  \definedfont[HMXNiloofar*arabic]
3 Salam
4 \stoptext
5


Thanks!
—MHB
___
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] Problems with indexing (+feature requests)

2016-08-22 Thread Mohammad Hossein Bateni
Same problem, item (6) of email below, observed with arabtype font.  See
attached.  MWE follows.

\definefontfamily [myfamily] [serif] [arabictypesetting] [features=arabic]
\setupbodyfont[myfamily]
\setupalign[r2l]
\setupdirections[bidi=global,method=two]

\setupmixedcolumns[register][direction=reverse]
\setupregister[index][
  before=,after=,

  command=\MyCommand,
  alternative=b,
  color=red,
]

\def\MyCommand#1{#1}

%\def\MyCommand#1{\inframed[frame=no]{#1}}  % this fixes the problem

\showboxes

\starttext
\index{آب}
\index{عذر}
\index[تک]{TEX}
testing
\placeindex
\stoptext


any insights about other items in the previous email?

—MHB

On Wed, Aug 17, 2016 at 10:48 PM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hello,
>
> For a few days I have been playing with registers to generate an RTL
> index.  Beside sorting, I ran into the following.
>
> 1) How can I get the index section using \subject?  In some styles, I do
> not want to see the section number.
>
> 2) How can I get the Persian comma used instead of the English comma in
> page numbers and also before "see also"?  The first one I can fix by a hack
> but not the second one: defining a custom pagecommand that sets \
> registerpageseparatorsymbol to the Persian comma!  There is a TODO
> comment in strc-reg.mkiv that the comma customization has been planned.
>
> 3) In RTL registers, if an entry starts with an LTR char, the order of
> index entry and page number will be incorrect.  We had similar issues with
> section headings before.  I can "fix" this by setting pagestyle=\zwnj, but
> is there a more principled way to handle this?  See the MWE below.
>
> 4) Is there a way to define the style of "see also" different from
> pagestyle?  What if I want to distinguish "see also" from the actual entry
> this is referring to?
>
> 5) Currently I use \setupmixedcolumns[register][direction=reverse] to get
> the two-column register in the correct order.  What if I have two index
> registers, one for RTL and another for LTR?  Is there a way to set the
> direction key for a specific register?
>
> 6) In a two-column Persian index, using almost any (non-mono) font, some
> letter headings (those extending significantly below the baseline) end up
> with extra space below.  See attached PDF and the MWE.  (I could not
> reproduce this with DejaVuSans or ALM Fixed.)
>
>
> \definefontfamily [myfamily] [serif] [Scheherazade] [features=arabic]
> \setupbodyfont[myfamily]
> \setupalign[r2l]
> \setupdirections[bidi=global,method=two]
>
> \setupmixedcolumns[register][direction=reverse]
> \setupregister[index][
>   before=,after=,
>
>   command=\MyCommand,
>   alternative=b,
>   color=red,
> ]
>
> \def\MyCommand#1{#1}
>
> %\def\MyCommand#1{\inframed[frame=no]{#1}}  % this fixes the problem
>
> \showboxes
>
> \starttext
> \index{آب}
> \index{عذر}
> \index[تک]{TEX}
> testing
> \placeindex
> \stoptext
>
>
> Some of the setups are to refute suspected causes.  Notice that using
> \inframed fixes the problem.
>
> Thanks,
> Hossein
>


i.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] Problem loading font KFGQPC Uthman Taha Naskh font

2016-08-21 Thread Mohammad Hossein Bateni
awesome!  thanks, Wolfgang!

On Sun, Aug 21, 2016 at 12:17 PM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Mohammad Hossein Bateni <bat...@gmail.com>
> 21. August 2016 um 18:06
> While \definefontfamily method works, I can't get the \definedfont method
> to work.
>
>
> \setupalign[r2l]
> % this works
>
> %\definefontfamily[mainfont][rm][KFGQPC Uthman Taha
> Naskh][features=arabic]
>
> %\setupbodyfont[mainfont]
>
>
> \starttext
>
> \definedfont[KFGQPCUthmanTahaNaskh*arabic]
>
> سلام
>
> \stoptext
>
> When you don’t set a method ConTeXt looks for a file with the given name
> which is equal to
>
> \definedfont[file:uthmantn1wer10*arabic] ...
>
> where I told ConTeXt to use the file method, another method which can be
> used is the name
> method which can be used like this
>
> \definedfont[name:kfgqpcuthmantahanaskh*arabic] ...
>
> Wolfgang
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> 
> ___
>
___
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] Problem loading font KFGQPC Uthman Taha Naskh font

2016-08-21 Thread Mohammad Hossein Bateni
While \definefontfamily method works, I can't get the \definedfont method
to work.


\setupalign[r2l]
% this works

%\definefontfamily[mainfont][rm][KFGQPC Uthman Taha Naskh][features=arabic]

%\setupbodyfont[mainfont]


\starttext

\definedfont[KFGQPCUthmanTahaNaskh*arabic]

سلام

\stoptext



It complains that the font is not found.

fonts   > defining > font with asked name 'KFGQPCUthmanTahaNaskh'
is not found using lookup 'file'
fonts   > defining > unknown font 'KFGQPCUthmanTahaNaskh', loading
aborted
fonts   > defining > unable to define 'KFGQPCUthmanTahaNaskh' as
'thedefinedfont--0'

On Sun, Aug 21, 2016 at 11:49 AM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> remaking the format produced no change but removing those files from the
> cache did solve the problem.
>
> thanks a lot!
>
> On Sun, Aug 21, 2016 at 9:59 AM, Wolfgang Schuster <
> schuster.wolfg...@gmail.com> wrote:
>
>> Mohammad Hossein Bateni <bat...@gmail.com>
>> 21. August 2016 um 12:53
>> Hello,
>>
>> The code snippet at the end used to work a few months ago when I reported
>> a rendering bug.  But now the font does not load and I see the following
>> error.  (It's not an issue with simplefonts because
>> \definedfont[KFGQPCUthmanTahaNaskh*arabic] does not work either.  the
>> font is published here
>> <http://fonts.qurancomplex.gov.sa/wp-content/uploads/2012/06/UthmanTN1-Ver10.zip>
>> .
>>
>> Remake the format (context --make en) or delete the font entries
>> (uthmantn1-ver10.tma|tmc) in the cache 
>> ($TEXMF/texmf-cache/luatex-cache/context//fonts/otl/).
>> Please try both suggestions and report which of them helped.
>>
>> BTW: The simplefonts module has been replaced with the \definefontfamily
>> command (different syntax but included in the core).
>>
>>  begin example
>> \definefontfamily[testfont][rm][KFGQPC Uthman Taha
>> Naskh][features=arabic]
>>
>> \setupbodyfont[testfont]
>>
>> \starttext
>> ...
>> \stoptext
>>  end example
>>
>> Wolfgang
>>
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> 
>> ___
>>
>
>
___
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] Problem loading font KFGQPC Uthman Taha Naskh font

2016-08-21 Thread Mohammad Hossein Bateni
remaking the format produced no change but removing those files from the
cache did solve the problem.

thanks a lot!

On Sun, Aug 21, 2016 at 9:59 AM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Mohammad Hossein Bateni <bat...@gmail.com>
> 21. August 2016 um 12:53
> Hello,
>
> The code snippet at the end used to work a few months ago when I reported
> a rendering bug.  But now the font does not load and I see the following
> error.  (It's not an issue with simplefonts because 
> \definedfont[KFGQPCUthmanTahaNaskh*arabic]
> does not work either.  the font is published here
> <http://fonts.qurancomplex.gov.sa/wp-content/uploads/2012/06/UthmanTN1-Ver10.zip>
> .
>
> Remake the format (context --make en) or delete the font entries
> (uthmantn1-ver10.tma|tmc) in the cache ($TEXMF/texmf-cache/luatex-
> cache/context//fonts/otl/). Please try both suggestions and report
> which of them helped.
>
> BTW: The simplefonts module has been replaced with the \definefontfamily
> command (different syntax but included in the core).
>
>  begin example
> \definefontfamily[testfont][rm][KFGQPC Uthman Taha Naskh][features=arabic]
>
> \setupbodyfont[testfont]
>
> \starttext
> ...
> \stoptext
>  end example
>
> Wolfgang
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> 
> ___
>
___
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] Problem loading font KFGQPC Uthman Taha Naskh font

2016-08-21 Thread Mohammad Hossein Bateni
Hello,

The code snippet at the end used to work a few months ago when I reported a
rendering bug.  But now the font does not load and I see the following
error.  (It's not an issue with simplefonts because
\definedfont[KFGQPCUthmanTahaNaskh*arabic] does not work either.  the font
is published here
<http://fonts.qurancomplex.gov.sa/wp-content/uploads/2012/06/UthmanTN1-Ver10.zip>
.


close source> 3 > 4 >
/Users/bateni/context/tex/texmf-modules/tex/context/third/simplefonts/t-simplefonts.mkiv

lua error   > lua error on line 4 in file /private/tmp/test-q.tex:

...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: bad
argument #2 to '__div' (invalid replacement value)
stack traceback:
[C]: in function '__div'
...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: in
function 'splitter'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:159: in
function 'addfeature'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:730: in
function 'enhancer'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1269: in
function 'enhance'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1291: in
function 'apply'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:246: in
function 'load'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:538: in
function 'otftotfm'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:566: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:565>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:304: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:492: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:418: in
function 'read'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1172: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1059>
(...tail calls...)

 1 \setuppapersize[A5]
 2
 3 \usemodule[simplefonts]
 4 >>  \setmainfont[KFGQPC Uthman Taha Naskh][features=arabic,range=arabic]
 5 \setcharacterstripping[1]
 6 \setupinterlinespace[line=7ex]
 7
 8 \setupdirections[bidi=on,method=one]
 9 \setupalign[r2l]
10
11
12 \starttext
13
14 \tfb


Thanks,
~MHB
On Sat, Apr 30, 2016 at 1:06 PM, Hans Hagen <pra...@wxs.nl> wrote:

> On 4/29/2016 12:00 PM, Mohammad Hossein Bateni wrote:
>
>> Actually the MWE may help:
>>
>> \usemodule[simplefonts]
>> \setmainfont[KFGQPC Uthman Taha Naskh][features=arabic,range=arabic]
>> \setcharacterstripping[1]
>>
>> \setupdirections[bidi=on,method=one]
>> \setupalign[r2l]
>>
>> \starttext
>> \tfb
>>
>> الْحَمْدُ
>>
>> \stoptext
>>
>
> i made a fix but as i'm on a very slow line i'm not sure when an update is
> on the garden
>
> Hans
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | 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/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> 
> ___
>
___
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 font rendering?

2016-08-21 Thread Mohammad Hossein Bateni
attachments uploaded here:
http://mhbateni.com/context/bug-02/

On Sun, Aug 21, 2016 at 6:09 AM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hello,
>
> I may be doing something wrong but see the difference at the end of the
> first line in the PDF (produced from CONTEXT) and the corresponding
> rendering in Chrome.
>
> I observe this issue whenever there is a U+08F0 (or U+08F1 or U+08F2).
> The two sides of this diacritic sign are not joined.
>
> The other issue is with small gaps in between some letters and/or bad
> connection points.  See the second and third lines in the PDF.
>
> Thanks,
> MHB
>
___
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] Question about \startcombination \stopcombination

2016-08-18 Thread Mohammad Hossein Bateni
Hans,

This is very good point.  Is it an exception for start/start/combination or
a more general difference?  In fact, what are the differences between \X{y}
and \startX y\stopX?  A while back I ran into some weird issues and I
figured that the latter inserts an \endgraf or something like that in the
end.  Is that right?

Thanks,
~MHB

On Thu, Aug 18, 2016 at 2:15 PM, Fabrice Couvreur <
fabrice1.couvr...@gmail.com> wrote:

> Hi Hans
> Thank you, I do not know.
> Fabrice
>
> 2016-08-18 19:46 GMT+02:00 Hans Hagen :
>
>> On 8/18/2016 7:12 PM, Fabrice Couvreur wrote:
>>
>>> Hello,
>>> The use of \startcombination ... \stopcombination does not work with my
>>> environment, I do not get all framed but only two and four
>>> Thank you
>>> Fabrice
>>>
>>> #
>>> \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
>>>
>>> \defineframedtext
>>>   [MyFrame]
>>>   [before={\blank},
>>>after={\blank},
>>>frame=off,
>>>background=MyFrame,
>>>width=6cm,
>>>height=fit,
>>>style=small]
>>>
>>> \startuseMPgraphic{MyFrame}
>>>  path b;
>>>  picture p;
>>>  p := textext.rt("\tfx\white\framedtextparameter{Title}");
>>>  p := p shifted (2BodyFontSize,OverlayHeight-ypart center
>>> p+.25ExHeight);
>>>  b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
>>>  fill OverlayBox withcolor \MPcolor{MyColorA};
>>>  fill b withcolor darkred ;
>>>  draw p;
>>>  setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
>>> \stopuseMPgraphic
>>>
>>> \defineoverlay
>>>   [MyFrame]
>>>   [\useMPgraphic{MyFrame}]
>>>
>>> \starttext
>>>
>>> \startlinecorrection[blank]
>>> \startmidaligned
>>> \startcombination[2*2]
>>> {\startMyFrame[Title=ALGO A]
>>>  One
>>>  \stopMyFrame}{}
>>> {\startMyFrame[Title=ALGO B]
>>> Two
>>> \stopMyFrame}{}
>>> {\startMyFrame[Title=ALGO C]
>>> Three
>>> \stopMyFrame}{}
>>> {\startMyFrame[Title=ALGO D]
>>> Four
>>> \stopMyFrame}{}
>>> \stopcombination
>>> \stopmidaligned
>>> \stoplinecorrection
>>>
>>> \stoptext
>>> #
>>>
>>
>> \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
>>
>> \defineframedtext
>>   [MyFrame]
>>   [frame=off,
>>background=MyFrame,
>>width=6cm,
>>height=fit,
>>style=small]
>>
>> \startuseMPgraphic{MyFrame}
>> path b;
>> picture p;
>> p := textext.rt("\tfx\white\framedtextparameter{Title}");
>> p := p shifted (2BodyFontSize,OverlayHeight-ypart center
>> p+.25ExHeight);
>> b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
>> fill OverlayBox withcolor "MyColorA" ;
>> fill b withcolor darkred ;
>> draw p ;
>> setbounds currentpicture to boundingbox currentpicture enlarged 2mm ;
>> \stopuseMPgraphic
>>
>> \defineoverlay
>>   [MyFrame]
>>   [\useMPgraphic{MyFrame}]
>>
>> \starttext
>>
>> \startcombination[2*2]
>> {\MyFrame[Title=ALGO A]{One}}   {}
>> {\MyFrame[Title=ALGO B]{Two}}   {}
>> {\MyFrame[Title=ALGO C]{Three}} {}
>> {\MyFrame[Title=ALGO D]{Four}}  {}
>> \stopcombination
>>
>> \stoptext
>>
>> the start/stop variant ignores the width
>>
>> -
>>   Hans Hagen | PRAGMA ADE
>>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
>> -
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> 
>> ___
>
>
>
> 
> ___
> 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
> 
> ___
>
___
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] Problems with indexing (+feature requests)

2016-08-17 Thread Mohammad Hossein Bateni
Hello,

For a few days I have been playing with registers to generate an RTL
index.  Beside sorting, I ran into the following.

1) How can I get the index section using \subject?  In some styles, I do
not want to see the section number.

2) How can I get the Persian comma used instead of the English comma in
page numbers and also before "see also"?  The first one I can fix by a hack
but not the second one: defining a custom pagecommand that sets
\registerpageseparatorsymbol
to the Persian comma!  There is a TODO comment in strc-reg.mkiv that the
comma customization has been planned.

3) In RTL registers, if an entry starts with an LTR char, the order of
index entry and page number will be incorrect.  We had similar issues with
section headings before.  I can "fix" this by setting pagestyle=\zwnj, but
is there a more principled way to handle this?  See the MWE below.

4) Is there a way to define the style of "see also" different from
pagestyle?  What if I want to distinguish "see also" from the actual entry
this is referring to?

5) Currently I use \setupmixedcolumns[register][direction=reverse] to get
the two-column register in the correct order.  What if I have two index
registers, one for RTL and another for LTR?  Is there a way to set the
direction key for a specific register?

6) In a two-column Persian index, using almost any (non-mono) font, some
letter headings (those extending significantly below the baseline) end up
with extra space below.  See attached PDF and the MWE.  (I could not
reproduce this with DejaVuSans or ALM Fixed.)


\definefontfamily [myfamily] [serif] [Scheherazade] [features=arabic]
\setupbodyfont[myfamily]
\setupalign[r2l]
\setupdirections[bidi=global,method=two]

\setupmixedcolumns[register][direction=reverse]
\setupregister[index][
  before=,after=,

  command=\MyCommand,
  alternative=b,
  color=red,
]

\def\MyCommand#1{#1}

%\def\MyCommand#1{\inframed[frame=no]{#1}}  % this fixes the problem

\showboxes

\starttext
\index{آب}
\index{عذر}
\index[تک]{TEX}
testing
\placeindex
\stoptext


Some of the setups are to refute suspected causes.  Notice that using
\inframed fixes the problem.

Thanks,
Hossein


bug.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] Bug in CONTEXT/LuaTeX or just buggy font

2016-08-10 Thread Mohammad Hossein Bateni
On Wed, Aug 10, 2016 at 11:03 AM, Hans Hagen <pra...@wxs.nl> wrote:

> On 8/9/2016 10:41 PM, Mohammad Hossein Bateni wrote:
>
>> Hello,
>>
>> I have a bunch of simple fonts for Arabic/Persian.  These fonts lack
>> Latin characters, etc., so I use fallbacks to work with them.
>>
>> I just noticed that \high does not work with them, and have not been
>> able to pinpoint the issue.  See the MWE below.
>>
>>
>> \starttypescript [serif][samim][name]
>>   \definefontsynonym[Serif][Samim]
>> \stoptypescript
>>
>> \definetypeface [myfont][rm] [serif][samim][default]
>> \setupbodyfont [myfont]
>>
>> \starttext
>> %\definedfont[Samim*arabic]
>> ۱۲۳\high{۴}۵۶.
>> \stoptext
>>
>>
>> I am using Persian digits because the font lacks Latin digits as I
>> mentioned.  If I use the \definedfont approach, I don't see the
>> character ۴ (argument of \high) at all.  With the typescript approach,
>> the same character /is/ typeset but is /not/ raised; it appears on the
>> baseline but with smaller size.
>>
>> Any ideas why this is happening?  Could it be that some parameters, for
>> instance, \exheight are not properly set/read for this font?  Actually,
>> I looked at the non-math fontdimens in syst-fnt.mkiv, and everything
>> except \slantperpoint (expected) and \exheight (awkward) is non-zero.  I
>> don't know where \exheight comes from—perhaps from the height of glyph
>> for 'x', which the font lacks—however, \emheight is 12pt, although the
>> font also lacks a glyph for 'm'.
>>
>> I am also attaching the font in case that helps.
>>
>
> Normally one sets up a proper bodyfont (and environment if needed) while
> you use just a simple font switch and that one is unrelated to any other
> font setting.
>

Thanks!  But what does a `proper' bodyfont contain beside defining rm, ss,
tt and mm for 'myfont' above (with regular, bold, italic, and bolditalic)?
The above was a MWE but in my real example I am setting up these things
that I mentioned in a larger typescript.  How can I modify the font or the
typescript definitions (or the environment) to get \exheight right?


>
> I'll add two new commands: \sx and \sxx so that you can say:
>
> \setuplow [style=\sx]
> \setuphigh[style=\sx]
>

 If I do this, this will not get attached to the font; right?  For
instance, if I define two bodyfonts 'myfonta' and 'myfontb', and switch
between them in the document, then I have to stick to these two setups if
one font, say 'myfonta', is problematic.  Is that correct?

for such cases. However, as these are derived relative scales they are
> normally not compatible with \tx and txx sizes.
>
> Hans
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> 
> ___
___
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] Bug in CONTEXT/LuaTeX or just buggy font

2016-08-09 Thread Mohammad Hossein Bateni
Hello,

I have a bunch of simple fonts for Arabic/Persian.  These fonts lack Latin
characters, etc., so I use fallbacks to work with them.

I just noticed that \high does not work with them, and have not been able
to pinpoint the issue.  See the MWE below.


\starttypescript [serif][samim][name]
  \definefontsynonym[Serif][Samim]
\stoptypescript

\definetypeface [myfont][rm] [serif][samim][default]
\setupbodyfont [myfont]

\starttext
%\definedfont[Samim*arabic]
۱۲۳\high{۴}۵۶.
\stoptext


I am using Persian digits because the font lacks Latin digits as I
mentioned.  If I use the \definedfont approach, I don't see the character ۴
(argument of \high) at all.  With the typescript approach, the same
character *is* typeset but is *not* raised; it appears on the baseline but
with smaller size.

Any ideas why this is happening?  Could it be that some parameters, for
instance, \exheight are not properly set/read for this font?  Actually, I
looked at the non-math fontdimens in syst-fnt.mkiv, and everything except
\slantperpoint (expected) and \exheight (awkward) is non-zero.  I don't
know where \exheight comes from—perhaps from the height of glyph for 'x',
which the font lacks—however, \emheight is 12pt, although the font also
lacks a glyph for 'm'.

I am also attaching the font in case that helps.

Thanks,
Hossein


Samim.ttf
Description: application/font-ttf
___
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] Changing decimals points to Persian ones via font features

2016-08-08 Thread Mohammad Hossein Bateni
Thanks, Hans!

I see; this does work except for the trouble of annotating with \digits
macro.  Would it be possible if I wrote a processor in Lua to do the work?

nodes.tasks.appendaction ("processors", "before", "fix_persian_mathperiod")

Can I find out if a node is inside math?  If I look at the corresponding
font, how can I find out if this is a math font or not?


I take it that in math fonts, kerning does not work, either?  In my case,
the Persian decimal separator usually has a part below the baseline that
extends to the left, and because all (Persian) digits are above the
baseline, I get an ugly space in the middle.  If kerning is not possible at
all, I can try to change the dimensions of Persian decimal separator symbol
because the kern is always necessary.  Is it possible to change the
dimensions of the symbol or is that also fixed and unchangeable?

Thanks a lot!
—MHB



On Mon, Aug 8, 2016 at 10:44 AM, Hans Hagen <pra...@wxs.nl> wrote:

> On 8/2/2016 9:54 PM, Mohammad Hossein Bateni wrote:
>
>> Could the problem be because math fonts use mode=base instead of
>> mode=node?  Or is it because in math fonts, the digits and/or full-stop
>> have different codes?
>>
>
> math fonts are defined and then don't change i.e. they are quite static
> and all juggling with individual symbols of sequences is done using
> predictable methods
>
> —MHB
>>
>> On Mon, Aug 1, 2016 at 9:46 AM, Mohammad Hossein Bateni
>> <bat...@gmail.com <mailto:bat...@gmail.com>> wrote:
>>
>> Dear list,
>>
>> I want to add a customized font feature to the math font, to
>> automatically change the decimal point (unicode 0x2E) to the
>> Arabic/Farsi version (unicode 0x66B).  This will go well with the
>> mapping from Latin digits to Farsi digits (done in a sample with
>> mathdigits fallback).
>>
>> For instance, I want to code in $123.45$ and get a result like
>> ۱۲۳٫۴۵.  However, I do not want to simply map 0x2E to 0x66B, because
>> then "full stop" outside a number will also change.  In particular,
>> I'd like to have the mapping only when full-stop is preceded and
>> succeeded by a digit.  This will, among other things, leave the
>> end-of-equation periods unchanged.
>>
>> Here is how I tried to achieve it.
>>
>>
>> \startluacode
>> digits = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39
>> }
>> -- 0x66B instead of 0x2F gives an error!
>> replacements = { [0x002E] = { 0x2F } }
>> fonts.handlers.otf.addfeature {
>>   name = "mpf",
>>   type = "chainsubstitution",
>>   lookups = { {
>> type = "multiple",
>> data = replacements,
>>   } },
>>   data = {
>> rules = {
>>   {
>> current = { { 0x002E } },
>> after   = { digits },
>> before  = { digits },
>> lookups = { 1 },
>>   }
>> }
>>   }
>> }
>> \stopluacode
>>
>> \definefontfeature[mathperiod][mpf=yes]
>>
>> \resetfontfallback [mathdigits]
>> %\definefontfallback[mathdigits][dejavusansmono][digitsexten
>> dedarabicindic][check=yes,force=yes,offset=digitsnormal]
>>
>> \definefontsynonym
>> [MathRoman][name:modern][features={math\mathsizesuffix,mathp
>> eriod},goodies=lm-math,fallbacks=mathdigits]
>>
>> \starttext
>> $123.45.$
>>
>> 123.45.
>>
>> \addff{mathperiod}
>> 123.45.
>> \stoptext
>>
>>
>> Though this font feature works outside math, it does not seem to
>> have any effect within the math font.  Why is that?  Can we add font
>> feature to the math font?  Are the character codes different?
>>
>> Notice that I could not get it to work, so I commented out the
>> fallback for Persian digits, to make things simpler.  To get the
>> proof of concept, I am trying to change period to forward slash (see
>> below).
>>
>> Is the syntax I use for having two features in \defontfontsynonym
>> correct?  Actually, I did try with only mathperiod and it does not
>> work, either.
>>
>> When I change 0x2F (slash) to 0x066B in "replacements", I get an
>> error as follows.
>>
>>
>> fonts   > otf chain > feature 'mpf', type
>> 'gsub_contextchain', chain lookup 'mpf': rule 1 matches at char
>> U+0002E (period) for (1,1,

Re: [NTG-context] Error in loading font Samim

2016-08-07 Thread Mohammad Hossein Bateni
Please ignore my last message.  It seems to be working fine now.  Probably
a bad setup on my part.  I will ping again if I run into the same issue
again.

On Sun, Aug 7, 2016 at 10:12 PM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hello,
>
> I believe this worked fine in June's beta but now gives an error.
>
>
> \starttext
> \definedfont[Samim]
> سلام
> \stoptext
>
>
> I got the font originally from here
> <https://github.com/rastikerdar/samim-font/releases/download/v0.11.0/samim-font-v0.11.0.zip>,
> but then removed the MATH table because it was causing an error at the time
> to get the attached version.
>
> Now the above code gives the following error:
>
>
> ...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: bad
> argument #2 to '__div' (invalid replacement value)
> stack traceback:
> [C]: in function '__div'
> ...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: in
> function 'splitter'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:159: in
> function 'addfeature'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:730: in
> function 'enhancer'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1269: in
> function 'enhance'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1291: in
> function 'apply'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:246: in
> function 'load'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:538: in
> function 'otftotfm'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:566: in
> function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:565>
> (...tail calls...)
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:304: in
> function 'loadfont'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:492: in
> function 'loadfont'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:418: in
> function 'read'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1172: in
> function <...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.
> lua:1059>
>
>
> Could you advise me on how to get over this issue?  As far as I know, the
> font lacks Latin characters and is restricted to the Arabic/Farsi
> characters.  In a more complicated example, I used dejavusans as fallback
> but the above MWE seemed fine, as far as I remember.
>
> Thanks,
> MHB
>
>
>
>
___
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] Error in loading font Samim

2016-08-07 Thread Mohammad Hossein Bateni
Hello,

I believe this worked fine in June's beta but now gives an error.


\starttext
\definedfont[Samim]
سلام
\stoptext


I got the font originally from here
,
but then removed the MATH table because it was causing an error at the time
to get the attached version.

Now the above code gives the following error:


...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: bad
argument #2 to '__div' (invalid replacement value)
stack traceback:
[C]: in function '__div'
...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: in
function 'splitter'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:159: in
function 'addfeature'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:730: in
function 'enhancer'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1269: in
function 'enhance'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1291: in
function 'apply'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:246: in
function 'load'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:538: in
function 'otftotfm'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:566: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:565>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:304: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:492: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:418: in
function 'read'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1172: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1059>


Could you advise me on how to get over this issue?  As far as I know, the
font lacks Latin characters and is restricted to the Arabic/Farsi
characters.  In a more complicated example, I used dejavusans as fallback
but the above MWE seemed fine, as far as I remember.

Thanks,
MHB


Samim.ttf
Description: application/font-ttf
___
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] OTF feature for a math font

2016-08-05 Thread Mohammad Hossein Bateni
Dear Hans & Wolfgang,

I resolved some of the minor issues.  But the main question still stands.
Is it possible to add an OTF feature to the math font?  In the very simple
case, I want to change any sequence like "1.2" to "1/2".  My feature (see
below) works for text fonts but not in math mode.

Thanks,
MHB

On Tue, Aug 2, 2016 at 3:54 PM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Could the problem be because math fonts use mode=base instead of
> mode=node?  Or is it because in math fonts, the digits and/or full-stop
> have different codes?
> —MHB
>
> On Mon, Aug 1, 2016 at 9:46 AM, Mohammad Hossein Bateni <bat...@gmail.com>
> wrote:
>
>> Dear list,
>>
>> I want to add a customized font feature to the math font, to
>> automatically change the decimal point (unicode 0x2E) to the Arabic/Farsi
>> version (unicode 0x66B).  This will go well with the mapping from Latin
>> digits to Farsi digits (done in a sample with mathdigits fallback).
>>
>> For instance, I want to code in $123.45$ and get a result like ۱۲۳٫۴۵.
>> However, I do not want to simply map 0x2E to 0x66B, because then "full
>> stop" outside a number will also change.  In particular, I'd like to have
>> the mapping only when full-stop is preceded and succeeded by a digit.  This
>> will, among other things, leave the end-of-equation periods unchanged.
>>
>> Here is how I tried to achieve it.
>>
>>
>> \startluacode
>> digits = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 }
>> -- 0x66B instead of 0x2F gives an error!
>> replacements = { [0x002E] = { 0x2F } }
>> fonts.handlers.otf.addfeature {
>>   name = "mpf",
>>   type = "chainsubstitution",
>>   lookups = { {
>> type = "multiple",
>> data = replacements,
>>   } },
>>   data = {
>> rules = {
>>   {
>> current = { { 0x002E } },
>> after   = { digits },
>> before  = { digits },
>> lookups = { 1 },
>>   }
>> }
>>   }
>> }
>> \stopluacode
>>
>> \definefontfeature[mathperiod][mpf=yes]
>>
>> \resetfontfallback [mathdigits]
>> %\definefontfallback[mathdigits][dejavusansmono][
>> digitsextendedarabicindic][check=yes,force=yes,offset=digitsnormal]
>>
>> \definefontsynonym [MathRoman][name:modern][
>> features={math\mathsizesuffix,mathperiod},goodies=lm-math,
>> fallbacks=mathdigits]
>>
>> \starttext
>> $123.45.$
>>
>> 123.45.
>>
>> \addff{mathperiod}
>> 123.45.
>> \stoptext
>>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] \typescriptthree within the optional argument of \definefontsynonym

2016-08-04 Thread Mohammad Hossein Bateni
awesome!  that's perfect, Wolfgang!
—MHB

On Thu, Aug 4, 2016 at 9:43 AM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Mohammad Hossein Bateni <bat...@gmail.com>
> 4. August 2016 um 15:24
> Hello Hans,
>
> Suppose you have a typescript as follows.
>
> \starttypescript [first] [MyFont] [GoodieOne,GoodieTwo]
>   \definefontsynonym [Serif] [\typescripttwo] [goodies=\typescriptthree]
> \stoptypescript
>
> Using macros \typescriptX (for X=one, two, and three) works in the first
> and second arguments in \definefontsynonym but not in the optional
> argument.  This seems to be because the optional argument is not expanded.
> Is this a bug or a feature?
>
> What I want to do was have a set of "fixes" (correcting kern issues, etc.)
> for a collection of fonts.  I can either put these in separate goodie files
> or feature sets (the latter being what I was trying but not in the sample
> above), and write generic typescripts that would load any of the fonts with
> its associated fixes.
>
> While I can use sans/serif/mono in the first argument, and name of the
> font in the second argument (to be mapped appropriately using
> \typescriptprefix to nmemonic name and real font name), the third
> (optional) argument of \definefontsynonym does not expand immediately,
> hence I'll end up with "undefined" \typescriptthree when it will be used.
>
> You can try to expand the value of \typescripthree with
>
> \starttypescript[...][...][...]
> \expanded{\definefontsynonym[...][...][goodies=\typescriptthree]}
> \expanded{\definefontsynonym[...][...][goodies=\typescriptthree]}
> \stoptypescript
>
> or
>
> \starttypescript[...][...][...]
> \startexpanded
> \definefontsynonym[...][...][goodies=\typescriptthree]
> \definefontsynonym[...][...][goodies=\typescriptthree]
> \stopexpanded
> \stoptypescript
>
> Wolfgang
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> 
> ___
>
___
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] \typescriptthree within the optional argument of \definefontsynonym

2016-08-04 Thread Mohammad Hossein Bateni
Hello Hans,

Suppose you have a typescript as follows.

\starttypescript [first] [MyFont] [GoodieOne,GoodieTwo]
  \definefontsynonym [Serif] [\typescripttwo] [goodies=\typescriptthree]
\stoptypescript

Using macros \typescriptX (for X=one, two, and three) works in the first
and second arguments in \definefontsynonym but not in the optional
argument.  This seems to be because the optional argument is not expanded.
Is this a bug or a feature?

What I want to do was have a set of "fixes" (correcting kern issues, etc.)
for a collection of fonts.  I can either put these in separate goodie files
or feature sets (the latter being what I was trying but not in the sample
above), and write generic typescripts that would load any of the fonts with
its associated fixes.

While I can use sans/serif/mono in the first argument, and name of the font
in the second argument (to be mapped appropriately using \typescriptprefix
to nmemonic name and real font name), the third (optional) argument of
\definefontsynonym does not expand immediately, hence I'll end up with
"undefined" \typescriptthree when it will be used.

Best,
Hossein
___
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] Changing decimals points to Persian ones via font features

2016-08-02 Thread Mohammad Hossein Bateni
Could the problem be because math fonts use mode=base instead of
mode=node?  Or is it because in math fonts, the digits and/or full-stop
have different codes?
—MHB

On Mon, Aug 1, 2016 at 9:46 AM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Dear list,
>
> I want to add a customized font feature to the math font, to automatically
> change the decimal point (unicode 0x2E) to the Arabic/Farsi version
> (unicode 0x66B).  This will go well with the mapping from Latin digits to
> Farsi digits (done in a sample with mathdigits fallback).
>
> For instance, I want to code in $123.45$ and get a result like ۱۲۳٫۴۵.
> However, I do not want to simply map 0x2E to 0x66B, because then "full
> stop" outside a number will also change.  In particular, I'd like to have
> the mapping only when full-stop is preceded and succeeded by a digit.  This
> will, among other things, leave the end-of-equation periods unchanged.
>
> Here is how I tried to achieve it.
>
>
> \startluacode
> digits = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 }
> -- 0x66B instead of 0x2F gives an error!
> replacements = { [0x002E] = { 0x2F } }
> fonts.handlers.otf.addfeature {
>   name = "mpf",
>   type = "chainsubstitution",
>   lookups = { {
> type = "multiple",
> data = replacements,
>   } },
>   data = {
> rules = {
>   {
> current = { { 0x002E } },
> after   = { digits },
> before  = { digits },
> lookups = { 1 },
>   }
> }
>   }
> }
> \stopluacode
>
> \definefontfeature[mathperiod][mpf=yes]
>
> \resetfontfallback [mathdigits]
> %\definefontfallback[mathdigits][dejavusansmono][digitsextendedarabicindic][check=yes,force=yes,offset=digitsnormal]
>
> \definefontsynonym
> [MathRoman][name:modern][features={math\mathsizesuffix,mathperiod},goodies=lm-math,fallbacks=mathdigits]
>
> \starttext
> $123.45.$
>
> 123.45.
>
> \addff{mathperiod}
> 123.45.
> \stoptext
>
>
> Though this font feature works outside math, it does not seem to have any
> effect within the math font.  Why is that?  Can we add font feature to the
> math font?  Are the character codes different?
>
> Notice that I could not get it to work, so I commented out the fallback
> for Persian digits, to make things simpler.  To get the proof of concept, I
> am trying to change period to forward slash (see below).
>
> Is the syntax I use for having two features in \defontfontsynonym
> correct?  Actually, I did try with only mathperiod and it does not work,
> either.
>
> When I change 0x2F (slash) to 0x066B in "replacements", I get an error as
> follows.
>
>
> fonts   > otf chain > feature 'mpf', type 'gsub_contextchain',
> chain lookup 'mpf': rule 1 matches at char U+0002E (period) for (1,1,1)
> chars, lookuptype 'gsub_multiple'
>
> error: ...ext/tex/texmf-context/tex/context/base/mkiv/font-ots.lua:1232:
> attempt to index field '?' (a nil value)
>
> tex error   > tex error on line 1 in file
> /Users/bateni/farsitex/context/bostan/examples/mathfa/1.tex: ?
>
> \page ->\par
>  \dosingleempty \page_breaks_process
> \strc_pagenumbers_flush_final_page ...\else \page
>
> [\p_strc_pagenumbers_page ...
> \dostoptext ...\strc_pagenumbers_flush_final_page
>   \page \the
> \everystoptext ...
> l.1 \dostoptext
>
> \clf_stoptext ->\luafunction \16>>clf_stoptext
>
> l.46 \stoptext
>
>
>
> Best,
> MHB
>
___
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] \mainlanguage[pe]

2016-08-01 Thread Mohammad Hossein Bateni
Is there a trick to get over this issue?  Until a conversion mechanism like
what you suggested (\currentdate[persian->day,space,month,persian->month])
is implemented, can I somehow achieve a similar result, perhaps in a not so
clean way?

Can one reduce the result of \currentdate to a simple number by stripping
the additional stuff that is there?  Similarly, can I force \currentdate to
expand or is it a fundamental implementation limitation?

Can I access day, month and year values in Lua, to run some if statements,
etc.?  For instance, if it is the first day of April, change the font of
the document or something like that.

—MHB

On Thu, Jul 7, 2016 at 7:32 PM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Mohammad Hossein Bateni <bat...@gmail.com>
> 7. Juli 2016 um 16:31
> Thanks, Wolfgang!
>
> BTW why doesn't the following work?  it gives the 'missing number' error.
>
> % \mainlanguage[en]
> \romannumerals{\currentdate[day]}
>
> 1. The \currentdate command isn’t expandable and is therefore not expanded
> when you use it as argument for another command.
>
> 2. The \romannumerals commands expects a number as argument but
> \currentdate returns more than a simple number.
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
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 columns in Natural Tables

2016-08-01 Thread Mohammad Hossein Bateni
Nice!  I also was looking for this feature a while back.  Is this going to
correspond to 'm' or 'M'?

On Mon, Aug 1, 2016 at 1:59 PM, Hans Hagen  wrote:

> On 7/31/2016 5:09 PM, Henri Menke wrote:
>
>> Dear list,
>>
>> with the old tabulate macros there was the possibility to format columns
>> as math (m for inline, M for display).  Is there any possibility to typeset
>> cells in math mode in Natural Tables?  This way, the hyphen would be
>> rendered as minus and spacing around relation and binary operators would be
>> consistent (example below).
>>
>> Cheers, Henri
>>
>> ---
>>
>> \starttext
>>
>> \starttabulate[|m|]
>>   \NC -4.11\%<0.02\% \NC\NR
>> \stoptabulate
>>
>> %\setupTABLE[???]
>> \startTABLE
>>   \NC -4.11\%<0.02\% \NC\NR
>> \stopTABLE
>>
>> \stoptext
>>
>
> a bit tricky but a next version will have
>
> \setupTABLE[c][1][style=math]
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
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] Changing decimals points to Persian ones via font features

2016-08-01 Thread Mohammad Hossein Bateni
Dear list,

I want to add a customized font feature to the math font, to automatically
change the decimal point (unicode 0x2E) to the Arabic/Farsi version
(unicode 0x66B).  This will go well with the mapping from Latin digits to
Farsi digits (done in a sample with mathdigits fallback).

For instance, I want to code in $123.45$ and get a result like ۱۲۳٫۴۵.
However, I do not want to simply map 0x2E to 0x66B, because then "full
stop" outside a number will also change.  In particular, I'd like to have
the mapping only when full-stop is preceded and succeeded by a digit.  This
will, among other things, leave the end-of-equation periods unchanged.

Here is how I tried to achieve it.


\startluacode
digits = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 }
-- 0x66B instead of 0x2F gives an error!
replacements = { [0x002E] = { 0x2F } }
fonts.handlers.otf.addfeature {
  name = "mpf",
  type = "chainsubstitution",
  lookups = { {
type = "multiple",
data = replacements,
  } },
  data = {
rules = {
  {
current = { { 0x002E } },
after   = { digits },
before  = { digits },
lookups = { 1 },
  }
}
  }
}
\stopluacode

\definefontfeature[mathperiod][mpf=yes]

\resetfontfallback [mathdigits]
%\definefontfallback[mathdigits][dejavusansmono][digitsextendedarabicindic][check=yes,force=yes,offset=digitsnormal]

\definefontsynonym
[MathRoman][name:modern][features={math\mathsizesuffix,mathperiod},goodies=lm-math,fallbacks=mathdigits]

\starttext
$123.45.$

123.45.

\addff{mathperiod}
123.45.
\stoptext


Though this font feature works outside math, it does not seem to have any
effect within the math font.  Why is that?  Can we add font feature to the
math font?  Are the character codes different?

Notice that I could not get it to work, so I commented out the fallback for
Persian digits, to make things simpler.  To get the proof of concept, I am
trying to change period to forward slash (see below).

Is the syntax I use for having two features in \defontfontsynonym correct?
Actually, I did try with only mathperiod and it does not work, either.

When I change 0x2F (slash) to 0x066B in "replacements", I get an error as
follows.


fonts   > otf chain > feature 'mpf', type 'gsub_contextchain',
chain lookup 'mpf': rule 1 matches at char U+0002E (period) for (1,1,1)
chars, lookuptype 'gsub_multiple'

error: ...ext/tex/texmf-context/tex/context/base/mkiv/font-ots.lua:1232:
attempt to index field '?' (a nil value)

tex error   > tex error on line 1 in file
/Users/bateni/farsitex/context/bostan/examples/mathfa/1.tex: ?

\page ->\par
 \dosingleempty \page_breaks_process
\strc_pagenumbers_flush_final_page ...\else \page
  [\p_strc_pagenumbers_page
...
\dostoptext ...\strc_pagenumbers_flush_final_page
  \page \the \everystoptext
...
l.1 \dostoptext

\clf_stoptext ->\luafunction \16>>clf_stoptext

l.46 \stoptext



Best,
MHB
___
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] \mainlanguage[pe]

2016-07-07 Thread Mohammad Hossein Bateni
Thanks, Wolfgang!

BTW why doesn't the following work?  it gives the 'missing number' error.

% \mainlanguage[en]
\romannumerals{\currentdate[day]}

On Thu, Jul 7, 2016 at 10:02 AM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Mohammad Hossein Bateni <bat...@gmail.com>
> 7. Juli 2016 um 10:53
> Wolfgang & Hans,
>
> In customizing the date, is there a way to use a number converter on day
> and year?  In particular, I'd like to apply persiandecimals conversion on
> them.
>
> You can only change the numbers for the day (see below, I used greek to
> demonstrate it) but it could be done better (e.g.
> \currentdate[persian->day,space,month,persian->month] with "->" as
> separator for the conversion and keyword).
>
> %% begin example
> \installlanguage[fa][state=start]
>
> \defineconversion[fa][day][α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ]
>
> \setupbodyfont[pagella]
>
> \starttext
>
> \currentdate[day]
>
> \language[fa]
>
> \currentdate[day]
>
> \stoptext
> %% end example
>
> (I have a similar question regarding \currentime.)
>
> Not possible at the moment.
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
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] \mainlanguage[pe]

2016-07-07 Thread Mohammad Hossein Bateni
While you're at it, could you also add something like jday, jmonth, jmm,
jyear, etc. to use the Jalali calendar instead of the Gregorian?  I see
that the—commented—conversion code exists in core-con.lua.  I am willing to
provide test cases for the conversion.

Thanks!
—MHB

On Thu, Jul 7, 2016 at 4:53 AM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Wolfgang & Hans,
>
> In customizing the date, is there a way to use a number converter on day
> and year?  In particular, I'd like to apply persiandecimals conversion on
> them.  (I have a similar question regarding \currentime.)
>
> Thanks!
> —Hossein
>
> On Wed, Jul 6, 2016 at 2:30 PM, Wolfgang Schuster <
> schuster.wolfg...@gmail.com> wrote:
>
>> Mohammad Hossein Bateni <bat...@gmail.com>
>> 6. Juli 2016 um 20:02
>> Hello,
>>
>> This was lost in the other thread, so I'm starting a fresh one dedicated
>> to the question.
>>
>> 1) \showinstalledlanguages does not show pe/persian/fa or anything like
>> that but it has several arabic variants.  was this dropped in MkIV or was
>> there never a persian language environment even in MkII?  I thought there
>> were translated labels for Farsi somewhere.
>> 2) In the following MWE, ad-hoc hyphenation using \- works and leads to
>> hyphenation.  However, specifying the pattern at the beginning does not
>> have any effect.  Am I missing something?
>>
>>
>> \usemodule[simplefonts]
>> \setmainfont[dejavusans][features=arabic,range=arabic]
>> \setupalign[r2l]
>> \showframe
>> \hyphenation{سازمان‌-دهی}
>>
>> \starttext
>>
>> %% The above pattern is not used here and the long word moves into the
>> margin.
>> \dorecurse{14}{سلام }
>> سازمان‌دهی
>> مناسب.
>>
>> %% It does work here, though.
>> \dorecurse{14}{سلام }
>> سازمان\-دهی
>> مناسب.
>>
>> \stoptext
>>
>>
>> How can one create a new language?  The languages manual
>> <http://www.pragma-ade.nl/general/manuals/languages-mkiv.pdf> suggests
>> that this is possible.  Does that mean I need to send the request to
>> Hans/Wolfgang to create the new entry or can one do so dynamically?  Beside
>> the issue of sorting in indices, etc.—which I will get to in due
>> time—having an entry for language pe/persian seems to be necessary to
>> *properly* use \setuplabeltext, etc.  Is that correct?
>>
>> You can create a new language (and synonyms for it) with the
>> \installlanguage command, below is a slightly modified version of the
>> arabic entry. You can change the values for leftquotation etc. and send the
>> result to Hans.
>>
>> % this goes into mult-sys.mkiv
>>
>> \definesystemconstant {persian} \definesystemconstant {fa}
>>
>> % this goes into lang-def.mkiv
>>
>> \installlanguage
>>   [\s!fa]
>>   [\c!spacing=\v!broad,
>>\c!leftsentence=\emdash,
>>\c!rightsentence=\emdash,
>>\c!leftsubsentence=\emdash,
>>\c!rightsubsentence=\emdash,
>>\c!leftquote=\upperleftsinglesixquote,
>>\c!rightquote=\upperrightsingleninequote,
>>\c!leftquotation=\upperleftdoublesixquote,
>>\c!rightquotation=\upperrightdoubleninequote,
>>\c!date={\v!day,\space,\v!month,\space,\v!year}]
>>
>> \installlanguage [\s!persian] [\s!fa]
>>
>> \installlanguage[\s!fa-ir][\c!default=\s!fa]
>>
>>
>> The default labels for the languages are stored in lang-txt.lua, you can
>> add entries for persian and send the modified file to Hans.
>>
>> Wolfgang
>>
>>
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>>
>> ___
>>
>
>
___
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] \mainlanguage[pe]

2016-07-07 Thread Mohammad Hossein Bateni
Wolfgang & Hans,

In customizing the date, is there a way to use a number converter on day
and year?  In particular, I'd like to apply persiandecimals conversion on
them.  (I have a similar question regarding \currentime.)

Thanks!
—Hossein

On Wed, Jul 6, 2016 at 2:30 PM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Mohammad Hossein Bateni <bat...@gmail.com>
> 6. Juli 2016 um 20:02
> Hello,
>
> This was lost in the other thread, so I'm starting a fresh one dedicated
> to the question.
>
> 1) \showinstalledlanguages does not show pe/persian/fa or anything like
> that but it has several arabic variants.  was this dropped in MkIV or was
> there never a persian language environment even in MkII?  I thought there
> were translated labels for Farsi somewhere.
> 2) In the following MWE, ad-hoc hyphenation using \- works and leads to
> hyphenation.  However, specifying the pattern at the beginning does not
> have any effect.  Am I missing something?
>
>
> \usemodule[simplefonts]
> \setmainfont[dejavusans][features=arabic,range=arabic]
> \setupalign[r2l]
> \showframe
> \hyphenation{سازمان‌-دهی}
>
> \starttext
>
> %% The above pattern is not used here and the long word moves into the
> margin.
> \dorecurse{14}{سلام }
> سازمان‌دهی
> مناسب.
>
> %% It does work here, though.
> \dorecurse{14}{سلام }
> سازمان\-دهی
> مناسب.
>
> \stoptext
>
>
> How can one create a new language?  The languages manual
> <http://www.pragma-ade.nl/general/manuals/languages-mkiv.pdf> suggests
> that this is possible.  Does that mean I need to send the request to
> Hans/Wolfgang to create the new entry or can one do so dynamically?  Beside
> the issue of sorting in indices, etc.—which I will get to in due
> time—having an entry for language pe/persian seems to be necessary to
> *properly* use \setuplabeltext, etc.  Is that correct?
>
> You can create a new language (and synonyms for it) with the
> \installlanguage command, below is a slightly modified version of the
> arabic entry. You can change the values for leftquotation etc. and send the
> result to Hans.
>
> % this goes into mult-sys.mkiv
>
> \definesystemconstant {persian} \definesystemconstant {fa}
>
> % this goes into lang-def.mkiv
>
> \installlanguage
>   [\s!fa]
>   [\c!spacing=\v!broad,
>\c!leftsentence=\emdash,
>\c!rightsentence=\emdash,
>\c!leftsubsentence=\emdash,
>\c!rightsubsentence=\emdash,
>\c!leftquote=\upperleftsinglesixquote,
>\c!rightquote=\upperrightsingleninequote,
>\c!leftquotation=\upperleftdoublesixquote,
>\c!rightquotation=\upperrightdoubleninequote,
>\c!date={\v!day,\space,\v!month,\space,\v!year}]
>
> \installlanguage [\s!persian] [\s!fa]
>
> \installlanguage[\s!fa-ir][\c!default=\s!fa]
>
>
> The default labels for the languages are stored in lang-txt.lua, you can
> add entries for persian and send the modified file to Hans.
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
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] \mainlanguage[pe]

2016-07-06 Thread Mohammad Hossein Bateni
Hello,

This was lost in the other thread, so I'm starting a fresh one dedicated to
the question.

1) \showinstalledlanguages does not show pe/persian/fa or anything like
that but it has several arabic variants.  was this dropped in MkIV or was
there never a persian language environment even in MkII?  I thought there
were translated labels for Farsi somewhere.
2) In the following MWE, ad-hoc hyphenation using \- works and leads to
hyphenation.  However, specifying the pattern at the beginning does not
have any effect.  Am I missing something?


\usemodule[simplefonts]
\setmainfont[dejavusans][features=arabic,range=arabic]
\setupalign[r2l]
\showframe
\hyphenation{سازمان‌-دهی}

\starttext

%% The above pattern is not used here and the long word moves into the
margin.
\dorecurse{14}{سلام }
سازمان‌دهی
مناسب.

%% It does work here, though.
\dorecurse{14}{سلام }
سازمان\-دهی
مناسب.

\stoptext


How can one create a new language?  The languages manual
 suggests that
this is possible.  Does that mean I need to send the request to
Hans/Wolfgang to create the new entry or can one do so dynamically?  Beside
the issue of sorting in indices, etc.—which I will get to in due
time—having an entry for language pe/persian seems to be necessary to
*properly* use \setuplabeltext, etc.  Is that correct?

Thanks a lot!
—MHB
___
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] \linedir in latest beta

2016-07-05 Thread Mohammad Hossein Bateni
Hello Hans & Wolfgang,

I just updated to the recent beta: 2016.07.01 16:28
Is that the latest version or is there something wrong with the update
mechanism?

In any case, most my Farsi tests are broken now and the culprit seems to be
\linedir.  Here is MWE:


\setuphead[section][numberstyle=\righttoleft]
\starttext
\section{SALAM}
\stoptext


The error looks like the following:

Undefined control sequence

\spac_directions_righttoleft_hmode ...ip \linedir
  TRT\relax \else
\scratchsk...
\righttoleft ...spac_directions_righttoleft_hmode
  \fi
\dousecurrentstyleparameter ...rentstyleparameter
  \fi \fi
\useheadstyleandcolor ...usecurrentstyleparameter
  \fi \edef
\currentcolorpar...
\strc_rendering_initialize_style_and_color_display ...
  \relax \ifconditional
\fon...
\headnumbercontent ...!numberstyle \c!numbercolor
  \ifcsname
\currentheadhash...
...
l.14 \section{SALAM}


—MHB
___
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] web site

2016-07-05 Thread Mohammad Hossein Bateni
is the server down?

i can't connect to pragma-ade.nl or contextgarden.net or
minimals.contextgarden.net.  all refuse my connection.

On Sun, Jul 3, 2016 at 5:25 AM, Hans Hagen  wrote:

> Hi,
>
>
> for those accessing the website (for updates) best use prgama-ade.nl
> instead of pragma-ade.com
>
> Hans
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
___
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] \pushbackground for header/footer

2016-07-03 Thread Mohammad Hossein Bateni
Hi,

Can one use {push,pop}background to save/restore backgrounds for
header*text and/or footer*text areas?  I'm trying to typeset a document
where one page has a special background, which I set using
\setupbackgrounds[header][text][background=color,backgroundcolor=gray].
Can I go back to the default setting afterwards or do I need to specify it
explicitly.  I know I can save whatever I put in \setupbackgrounds[page]
using \pushbackground[page] and \popbackground.  I could not get it to work
with header/footer.

\setupcolors[state=start]
\showframe
\setupbackgrounds[header][text][background=color,backgroundcolor=yellow]

\starttext

One
\page

%\pushbackground[page]

\pushbackground[header][text]
\setupbackgrounds[header][text][background=color,backgroundcolor=gray]

Two
\page
\popbackground

Three
\stoptext


Thanks,
MHB
___
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] hz in MkIV

2016-07-03 Thread Mohammad Hossein Bateni
Hi,

In MkIV, the syntax for using hz seems to have changed from
\setupfonthandling to \setupfontexpansion (similarly for protrusion).  What
is the equivalent of the following?  Is this feature supported in MkIV and
LuaTeX?  I tried changing/adding entries to
fonts.expansions.vectors.quality (and .default) to no apparent avail.


\startfonthandling [hz]
  \defineadjustfactor A .5
  \defineadjustfactor B .7
  \defineadjustfactor C .7
  ...
\stopfonthandling


In any case, I'm happy that hz works for Arabic/Farsi despite some warnings
suggesting the contrary (
https://mailman.ntg.nl/pipermail/ntg-context/2008/029765.html).  It does
make certain Farsi texts look better, however, support for tatweel/kashida
would be ideal.  In fact, I was trying to see if I could somehow get it to
work, building on top of hz.  Hans, do you have any suggestions for this?
Would this be feasible and/or worth trying?

I once converted Vafa Khalighi's XeTeX-based code to Lua but ran into
several setbacks.  (The idea is to insert a sequence of
(ZWJ,\nobreak,stretchable leader,\nobreak,ZWJ) between certain character
pairs that join one another.)  Here are some of the issues I faced:
1) This could not be turned off and on within a paragraph because I was
hooking into processors.before action.
2) The mechanism for some (all?) center alignments (including default
figure captions) interferes with what I was hacking (or, to be more
precise, it's the other way around) and causes unnecessary use of tatweel
in those settings.
3) Later I noticed that the added sequence did not inherit many properties
(like font style or color).
4) The optimum values for the stretches I put in depend on the context,
particularly because some environments manipulate \spaceskip for other
reasons.

Sorry for the mumbling.  I can explain more if anyone is interested in
helping to improve this functionality.  Attached is what I have now.

Thanks,
MHB


p-dabeer-kashida.mkiv
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] RTL bug in textbackground

2016-07-03 Thread Mohammad Hossein Bateni
Hello,

When using \definetextbackground in RTL setting, the boundaries are not
determined correctly (both for location=paragraph and location=text) and
colors gets messed up.

Here a sort-of-minimal example adapted from details.pdf.  Is there any
particular keys I should use in RTL to fix the issue?


\setupcolors[state=start]
\definecolor[infogray][s=0.5]
\definecolor[textgray][s=0.8]

\definetextbackground[intro]
 [backgroundcolor=infogray,
   backgroundoffset=.25cm,
   offset=.5cm,
   frame=on,framecolor=red,
   location=paragraph,
   color=white]

\definetextbackground[subintro]
 [backgroundcolor=textgray,
   backgroundoffset=0pt,
   offset=0pt,
   frame=off,
   location=text,
   color=blue]

\starttext

\starttextbackground[intro]
A rather common way to draw attention to a passage, is to add
a background. In this chapter we will therefore discuss how
to enhance your document with \starttextbackground [subintro]
colorful areas that either or not follow the shape of your
paragraph. \stoptextbackground\ Be warned: this chapter has
so many backgrounds that you should consider wearing sunglasses.
\stoptextbackground

\blank[3*big]

\righttoleft
\starttextbackground[intro]
A rather common way to draw attention to a passage, is to add
a background. In this chapter we will therefore discuss how
to enhance your document with \starttextbackground [subintro]
colorful areas that either or not follow the shape of your
paragraph. \stoptextbackground\ Be warned: this chapter has
so many backgrounds that you should consider wearing sunglasses.
\stoptextbackground
\stoptext


Thanks,
MHB
___
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] Husayni font

2016-06-02 Thread Mohammad Hossein Bateni
the goodies file is there but the actual font is not in the distribution
and I think is still not ready for release.

On Thu, Jun 2, 2016 at 8:18 AM, Jean-Pierre Delange 
wrote:

> Hello dear fellows,
>
> On Stack Exchange a ConTeXt user is looking for the Arabic husayni.ttf
> font, which was build by Prof. Idris Samawi Hamid and included in "goodies"
> ConTeXt by Hans Hagen. It appears, according to this link :
> http://texdoc.net/texmf-dist/tex/context/fonts/husayni.lfg, that this
> font is available in "goodies" with ConTeXt Standalone...
>
> The question is : why - even after setting fonts export
> OSFONTDIR="/usr/local/share/fonts;$HOME/.fonts/Library" and a 'mtxrun
> --scripts fonts --reload' command - no known husayni font seems to be
> available ?
>  Did I miss something ?
> Thanks,
> JP
>
>
>
> ___
> 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
>
> ___
___
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] issue in the wiki

2016-05-29 Thread Mohammad Hossein Bateni
The version on the wiki is the stable version from mid 2015.
On May 29, 2016 12:36 PM, "Pablo Rodriguez"  wrote:

> Dear list,
>
> modifying http://wiki.contextgarden.net/Command/hrule#Example, I added
> an "\hrule height .25in".
>
> I’m afraid that this command make all rules vanish in the final document.
>
> The same source compiles fine with latest beta (2016.05.22 15:18) on my
> laptop.
>
> Is there anything that I’m missing or have i hit a bug?
>
> Many thanks for your help,
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
___
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] command reference not searchable

2016-05-19 Thread Mohammad Hossein Bateni
It is searchable on my El Capitan laptop here.  I used the file in the
directory and did not run context to generate it if that's what you did.

On Thu, May 19, 2016 at 3:59 PM, Jean-Pierre Delange 
wrote:

> Hi fellows ConTeXt users,
>
> I think the issue comes from Mac OS X PDF reader installation. On Windows,
> one can pass the following command:
> context --extra=setups --overview cont-en.xml which print a PDF file
> (ConTeXt Extra) very searchable. I didn't try to go further with others xml
> files which source are here :
>
> http://source.contextgarden.net/scripts/context/stubs/unix/mtxrun?search=from
> JP
>
> - Mail original -
> De: "Hans van der Meer" 
> À: "NTG ConTeXt" 
> Envoyé: Jeudi 19 Mai 2016 17:00:06
> Objet: [NTG-context] command reference not searchable
>
> The command reference in file i-context.pdf is highly useful, but that
> document is not searchable, neither with Preview nor Adobe Reader. Files
> luatex.pdf, xml-mkiv.pdf for example are searchable. It would be nice if
> the command reference can be searched too, because for now looking up a
> command needs a lot of page skipping. Can this be done? I would very much
> appreciate it.
>
> Hans van der Meer
>
>
>
>
>
> ___
> 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
>
> ___
>
> ___
> 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
>
> ___
>
___
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 commands

2016-05-18 Thread Mohammad Hossein Bateni
This document is pretty handy and I did not know about it.  Thanks!

On Wed, May 18, 2016 at 9:04 AM, Meer, Hans van der 
wrote:

>
> > On 18 May 2016, at 14:39, Hans Hagen  wrote:
> >
> > On 5/18/2016 2:09 PM, Meer, Hans van der wrote:
> >> What is the latest edition of "ConTeXt commands"? The one I have here
> is dated July 1,2015. It is missing some commands however: \setupnotes to
> name an example.
> >>
> >> I find it a very handy document, but alas it is not standard in the
> contextbeta distribution as for example the LuaTeX manual in latest
> editiion is.
> >> Otherwise, where is it to be found? It seems absent from the
> Contextgarden homepage.
> >
> > search for i-context.pdf
> >
>
> Found it, but wouldn't have looked for the pdf in the mkiv-sources
> directory.
> May I express the wish that it will be standard located in
> "tex/texmf-context/doc/context/documents/general/manuals" where the other
> ones are? Then I need one symbolic link only "to find them all" (for the
> Tolkien fans )
>
> Hans van der Meer
>
>
>
>
>
> ___
> 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
>
> ___
>
___
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] RTL-related bug in \startcolumns

2016-05-12 Thread Mohammad Hossein Bateni
Hello Hans,

This bug exists in the latest beta, version 2016.05.12 23:49.  Am I doing
something wrong or is something really strange going on?  I see the
following among the logs, which seems correct to me.

structure > sectioning > section @ level 3 : 0.0.1 -> First
structure > sectioning > section @ level 3 : 0.0.2 -> Second

I am surprised that the numbering is reverse; could this be due to the
direction=left option?  Then, what is the right option to use for
right-to-left columns?

Thanks,
~MHB

On Sat, Apr 30, 2016 at 5:50 PM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hello,
>
> In RTL text, I use direction=left to mirror the columns.  I just noticed
> that surprisingly section numbering will not be correct.  See the MWE
> below, where I get "2 First" at the top of the right column and then "1
> Second" in the middle of the left column.  The correct numbering should be
> "1 First" and "2 Second."
>
> \starttext
> \startcolumns[n=2,direction=left]
> \section{First}
> \input knuth
>
> \section{Second}
> \input ward
> \stopcolumns
> \stoptext
>
> Produced using context version 2016.04.27 10:18.
>
> Thanks!
> —MHB
>
___
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] [OT] Full-width justification (xkcd)

2016-05-09 Thread Mohammad Hossein Bateni
I once converted part of the xepersian package dealing with Kashida to
ConTeXt (on LuaTeX).  Being a newcomer, the result wasn't that great,
though it did work for many situations.  In a couple of weeks, I will have
time to clean it up a bit and share with anyone who's interested.

—MHB

On Mon, May 9, 2016 at 11:15 AM, Alan BRASLAU  wrote:

> On Mon, 9 May 2016 10:51:23 +0200
> Hans Hagen  wrote:
>
> > > Wasn't in obvious that I was joking?
> > > (Even though deep down I feared someone would reply with "here it
> > > is".)
> >
> > well, its more like challenging us (in fact i remember messing a bit
> > with this fill-to-end-of-line-with-rules stuff that you see in ugly
> > official documents but then decided that lawyers should use
> > justification instead)
>
> It would be a better exercise to compose one's text in verse using
> words that fill all lines nicely eliminating entirely the need for
> justification. Maybe this should be an exercise for the upcoming
> Context meeting?
>
> My entry will consist entirely of four-letter words...
>
> Alan
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
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] Autogenerating a module's documentation

2016-05-01 Thread Mohammad Hossein Bateni
Hello list,

Has anyone managed to generate documentation for lua files recently?
According to wiki/Module , something
like the following should work:

context --ctx=x-ldx core-con.lua

But it only produces core-con.lua.prep and not the PDF file.  In fact, it
seems to work on the prep file and compile a core-con.lua.prep.prep which
escapes even the XML tags of the prep file.  Probably some switch changed
and the ctx file was not updated, so it just doesn't know how to deal with
the prep file properly?

On the other hand, the command to get PDF documentation out of TeX files
does work and produces (albeit with some errors at times) the final
documentation.

context --ctx=s-mod core-con.mkiv

Thanks!
—MHB
___
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] RTL \definedescriptions

2016-05-01 Thread Mohammad Hossein Bateni
Hello Hans,

I looked more into this and have now "fixed" everything but the
margin-related alternatives.  In the attached file, I have redefined one
macro and two setups from strc-con.mkvi.  These involve changing three
\vtop's to \autodirvtop's as well as changing left and flushleft to right
and flushright (and the other way around) depending on paragraph direction.

Now it is possible to get the exact mirror behavior for RTL/LTR if one sets
headalign properly.  I tested it on alternatives in {left, right, top,
serried, hanging} and with hang=x option.

I have run into a dilemma, though.  Sometimes left and right retain their
meanings in LTR and RTL and sometimes they mean opposite things.  I mean,
alternative=left in RTL acts *similarly* to alternative=right in LTR;
however, headalign=left sort of has the same meaning in LTR and RTL.  This
sometimes becomes confusing in setting the macro/setup parameters.  Is
there a simple philosophy here?

—MHB

On Sun, May 1, 2016 at 11:53 AM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hans & Wolfgang,
>
> I'm updating the RTL page <http://wiki.contextgarden.net/RTL>.  The
> version used on the wiki, apparently the stable version from texlive 2015,
> does certain things differently.  When using alternative=serried, the last
> line of the paragraph has incorrect alignment.  This is not the case in the
> beta version.
>
> On the other hand, with bidi algorithm turned on, the wiki context places
> the head on the right if I use alternative=top, only when the text is in
> Persian.  In the beta, the situation is more stable but incorrect: it
> places the head on the left-hand side no matter what.
>
> —MHB
>
> On Thu, Apr 28, 2016 at 9:22 PM, Mohammad Hossein Bateni <bat...@gmail.com
> > wrote:
>
>> Hello Hans and Wolfgang,
>>
>> I tried different options in \definedescription and compared LTR and RTL
>> behavior.  There are certain inconsistencies/bugs in the RTL setting.
>> Attached you can see a TeX file and the resulting PDF, trying different
>> options.  The first two pages consider different parameters in the LTR
>> setting and then the same come in the RTL environment.
>>
>> In the following I use alt instead of alternative.
>>
>> Here are the issues I noticed:
>>
>> 1) Why isn't the head text consistently mirrored in the RTL environment?
>> It happens only in alt=serried.
>>
>> 2) Option hang=2 produces a strange result for RTL.  The hanging part
>> appears on the opposite side of the head text, which somehow pushes the
>> head text outside the text area.
>>
>> 3) Option alt=top for RTL still puts the head text on the left-hand side.
>>
>> 4) I expect the LTR and RTL versions of the same settings to mirror one
>> another, but they do not.   Although LTR/alt=left and RTL/alt=right look
>> pretty similar (and so do LTR/alt=right and RTL/alt=left), but these pairs
>> do not mirror one another.  In particular, there is some space to the right
>> of the head text in LTR/alt=right, while there is none to the left of
>> LTR/alt=left.  The same thing shows in the margin alternatives where the
>> distance between the head text and the body is different in RTL and LTR.
>>
>> —MHB
>>
>
>


p-dabeer-patch-strc-con.mkiv
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] RTL \definedescriptions

2016-05-01 Thread Mohammad Hossein Bateni
Hans & Wolfgang,

I'm updating the RTL page <http://wiki.contextgarden.net/RTL>.  The version
used on the wiki, apparently the stable version from texlive 2015, does
certain things differently.  When using alternative=serried, the last line
of the paragraph has incorrect alignment.  This is not the case in the beta
version.

On the other hand, with bidi algorithm turned on, the wiki context places
the head on the right if I use alternative=top, only when the text is in
Persian.  In the beta, the situation is more stable but incorrect: it
places the head on the left-hand side no matter what.

—MHB

On Thu, Apr 28, 2016 at 9:22 PM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hello Hans and Wolfgang,
>
> I tried different options in \definedescription and compared LTR and RTL
> behavior.  There are certain inconsistencies/bugs in the RTL setting.
> Attached you can see a TeX file and the resulting PDF, trying different
> options.  The first two pages consider different parameters in the LTR
> setting and then the same come in the RTL environment.
>
> In the following I use alt instead of alternative.
>
> Here are the issues I noticed:
>
> 1) Why isn't the head text consistently mirrored in the RTL environment?
> It happens only in alt=serried.
>
> 2) Option hang=2 produces a strange result for RTL.  The hanging part
> appears on the opposite side of the head text, which somehow pushes the
> head text outside the text area.
>
> 3) Option alt=top for RTL still puts the head text on the left-hand side.
>
> 4) I expect the LTR and RTL versions of the same settings to mirror one
> another, but they do not.   Although LTR/alt=left and RTL/alt=right look
> pretty similar (and so do LTR/alt=right and RTL/alt=left), but these pairs
> do not mirror one another.  In particular, there is some space to the right
> of the head text in LTR/alt=right, while there is none to the left of
> LTR/alt=left.  The same thing shows in the margin alternatives where the
> distance between the head text and the body is different in RTL and LTR.
>
> —MHB
>
___
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] RTL-related bug in \startcolumns

2016-04-30 Thread Mohammad Hossein Bateni
Hello,

In RTL text, I use direction=left to mirror the columns.  I just noticed
that surprisingly section numbering will not be correct.  See the MWE
below, where I get "2 First" at the top of the right column and then "1
Second" in the middle of the left column.  The correct numbering should be
"1 First" and "2 Second."

\starttext
\startcolumns[n=2,direction=left]
\section{First}
\input knuth

\section{Second}
\input ward
\stopcolumns
\stoptext

Produced using context version 2016.04.27 10:18.

Thanks!
—MHB
___
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] Problem with Quran KFGQPC Uthman Taha Naskh font

2016-04-29 Thread Mohammad Hossein Bateni
Actually the MWE may help:

\usemodule[simplefonts]
\setmainfont[KFGQPC Uthman Taha Naskh][features=arabic,range=arabic]
\setcharacterstripping[1]

\setupdirections[bidi=on,method=one]
\setupalign[r2l]

\starttext
\tfb

الْحَمْدُ

\stoptext

—MHB

On Fri, Apr 29, 2016 at 5:52 AM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Thanks, Hans!  The problem is *almost* fixed in the latest beta, version:
> 2016.04.27 10:18.  I didn't think something had changed in the past two
> weeks; that's why I hadn't tried with the latest version.
>
> There is only one word where I notice bad placement of diacritics when
> using CONTEXT.  Compare this
> <http://mhbateni.com/context/bug-01/word-context.png> and this
> <http://mhbateni.com/context/bug-01/word-chrome.png>.
>
> BTW context gave the following "warning" about not being able to access
> the data.  Is that because it was the first run of a new installation?
>
> system  > lua > compiling
>> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma'
>> into
>> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tmc'
>> system  > lua > dumping
>> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma'
>> into
>> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tmc'
>> stripped
>> fonts   > names > accessing the data table failed
>
>
> —MHB
>
> On Fri, Apr 29, 2016 at 4:42 AM, Hans Hagen <pra...@wxs.nl> wrote:
>
>> On 4/29/2016 5:01 AM, Mohammad Hossein Bateni wrote:
>>
>>> The attachments in the email below were too big for the list (>100KB).
>>> I uploaded them here <http://mhbateni.com/context/bug-01/>.
>>>
>>> On Thu, Apr 28, 2016 at 10:20 PM, Mohammad Hossein Bateni
>>> <bat...@gmail.com <mailto:bat...@gmail.com>> wrote:
>>>
>>> Hi,
>>>
>>> I am not sure whether I'm missing certain features in the font
>>> definition or whether there is actually some bug in how CONTEXT or
>>> LuaTeX for that matter handles this font.  It might as well be that
>>> there is something wrong with the font
>>> <http://fonts.qurancomplex.gov.sa/?page_id=608>, though I doubt
>>> that.
>>>
>>> Attached is my simple test program and the PDF output, which is
>>> annotated to show the problems.  You can compare with the reference
>>> PNG file I generated via rendering in Chrome.  I hope you can see
>>> the annotations where I have pointed out the incorrect typesetting,
>>> otherwise you can compare the two outputs to notice the difference:
>>> for the most part, some diacritics that are not placed in the right
>>> location (both vertically and horizontally).
>>>
>>> I am using Mac OS X with CONTEXT current version: 2016.04.13 16:46.
>>>
>>
>> can you check the context + beta from the contextgarden?
>>
>>
>> -
>>   Hans Hagen | PRAGMA ADE
>>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>   tel: 038 477 53 69 | 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
>>
>> ___
>
>
>
___
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] Problem with Quran KFGQPC Uthman Taha Naskh font

2016-04-29 Thread Mohammad Hossein Bateni
Thanks, Hans!  The problem is *almost* fixed in the latest beta, version:
2016.04.27 10:18.  I didn't think something had changed in the past two
weeks; that's why I hadn't tried with the latest version.

There is only one word where I notice bad placement of diacritics when
using CONTEXT.  Compare this
<http://mhbateni.com/context/bug-01/word-context.png> and this
<http://mhbateni.com/context/bug-01/word-chrome.png>.

BTW context gave the following "warning" about not being able to access the
data.  Is that because it was the first run of a new installation?

system  > lua > compiling
> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma'
> into
> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tmc'
> system  > lua > dumping
> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma'
> into
> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tmc'
> stripped
> fonts   > names > accessing the data table failed


—MHB

On Fri, Apr 29, 2016 at 4:42 AM, Hans Hagen <pra...@wxs.nl> wrote:

> On 4/29/2016 5:01 AM, Mohammad Hossein Bateni wrote:
>
>> The attachments in the email below were too big for the list (>100KB).
>> I uploaded them here <http://mhbateni.com/context/bug-01/>.
>>
>> On Thu, Apr 28, 2016 at 10:20 PM, Mohammad Hossein Bateni
>> <bat...@gmail.com <mailto:bat...@gmail.com>> wrote:
>>
>> Hi,
>>
>> I am not sure whether I'm missing certain features in the font
>> definition or whether there is actually some bug in how CONTEXT or
>> LuaTeX for that matter handles this font.  It might as well be that
>> there is something wrong with the font
>> <http://fonts.qurancomplex.gov.sa/?page_id=608>, though I doubt that.
>>
>> Attached is my simple test program and the PDF output, which is
>> annotated to show the problems.  You can compare with the reference
>> PNG file I generated via rendering in Chrome.  I hope you can see
>> the annotations where I have pointed out the incorrect typesetting,
>> otherwise you can compare the two outputs to notice the difference:
>> for the most part, some diacritics that are not placed in the right
>> location (both vertically and horizontally).
>>
>> I am using Mac OS X with CONTEXT current version: 2016.04.13 16:46.
>>
>
> can you check the context + beta from the contextgarden?
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | 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
>
> ___
___
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] Problem with Quran KFGQPC Uthman Taha Naskh font

2016-04-28 Thread Mohammad Hossein Bateni
The attachments in the email below were too big for the list (>100KB).  I
uploaded them here <http://mhbateni.com/context/bug-01/>.

On Thu, Apr 28, 2016 at 10:20 PM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hi,
>
> I am not sure whether I'm missing certain features in the font definition
> or whether there is actually some bug in how CONTEXT or LuaTeX for that
> matter handles this font.  It might as well be that there is something
> wrong with the font <http://fonts.qurancomplex.gov.sa/?page_id=608>,
> though I doubt that.
>
> Attached is my simple test program and the PDF output, which is annotated
> to show the problems.  You can compare with the reference PNG file I
> generated via rendering in Chrome.  I hope you can see the annotations
> where I have pointed out the incorrect typesetting, otherwise you can
> compare the two outputs to notice the difference: for the most part, some
> diacritics that are not placed in the right location (both vertically and
> horizontally).
>
> I am using Mac OS X with CONTEXT current version: 2016.04.13 16:46.
>
> Thanks,
> MHB
>
___
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] RTL \definedescriptions

2016-04-28 Thread Mohammad Hossein Bateni
Hello Hans and Wolfgang,

I tried different options in \definedescription and compared LTR and RTL
behavior.  There are certain inconsistencies/bugs in the RTL setting.
Attached you can see a TeX file and the resulting PDF, trying different
options.  The first two pages consider different parameters in the LTR
setting and then the same come in the RTL environment.

In the following I use alt instead of alternative.

Here are the issues I noticed:

1) Why isn't the head text consistently mirrored in the RTL environment?
It happens only in alt=serried.

2) Option hang=2 produces a strange result for RTL.  The hanging part
appears on the opposite side of the head text, which somehow pushes the
head text outside the text area.

3) Option alt=top for RTL still puts the head text on the left-hand side.

4) I expect the LTR and RTL versions of the same settings to mirror one
another, but they do not.   Although LTR/alt=left and RTL/alt=right look
pretty similar (and so do LTR/alt=right and RTL/alt=left), but these pairs
do not mirror one another.  In particular, there is some space to the right
of the head text in LTR/alt=right, while there is none to the left of
LTR/alt=left.  The same thing shows in the margin alternatives where the
distance between the head text and the body is different in RTL and LTR.

—MHB


test-d.pdf
Description: Adobe PDF document


test-d.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] right to left direction for itemize columns

2016-04-28 Thread Mohammad Hossein Bateni
I have resumed working on the RTL issues and have updated this page
<http://wiki.contextgarden.net/RTL> on the context garden.  All
improvements and comments are welcome.

In addition, I am putting together a set of useful macros and settings for
Persian typesetting and releasing it on github
<https://github.com/bateni/dabeer>.  Perhaps, once I am happy with certain
things, I can ask Hans to consider including some parts as patches in
ConTeXt itself.

On Thu, Apr 28, 2016 at 10:10 AM, Otared Kavian <ota...@gmail.com> wrote:

> Dear Mohammad-Hossein,
>
> After updating my installation of ConTeXt indeed I see that the order of
> the columns is correct. (The version I have now is
> 2016.04.27 10:18 MKIV beta  fmt: 2016.4.28
> and the previous one was version2016.04.22 09:10).
>
> Somehow I did not notice the February change you mention in your message,
> and in any case my installation was probably not really up to date.
>
> Best regards: OK
> PS: I am sorry for having changed your first name, and I apologize for
> that…
>
>
> > On 28 Apr 2016, at 09:55, Mohammad Hossein Bateni <bat...@gmail.com>
> wrote:
> >
> > Dear Otared,
> >
> > Your example works perfectly fine for me using version: 2016.04.13 16:46.
> Perhaps, you're using an older version of CONTEXT.  There was a patch in
> February enabling this.  See the output of my run attached.
> >
> > —Hossein
> >
> > P.S.  My name is Mohammad *Hossein*, not Mohammad Reza :)
> >
> >
> >
> > On Thu, Apr 28, 2016 at 12:41 AM, Otared Kavian <ota...@gmail.com>
> wrote:
> > Hi Mohammad Reza,
> >
> > I tried your example, but it seems to me that the way the columns are
> presented when writing Right-to-Left is still incorrect. In the following
> example one should have the column containing the lines « First » and «
> Second » to the right of the column containing « Third » and « Fourth ».
> >
> > I don’t know if there is already a way to tell ConTeXt to do it in the
> right way, or Hans has to look into the righttoleft mechanism.
> > The same issue appears in the table mechanism.
> >
> > By the way, the option
> >   [direction=reverse]
> > seems to have no effect at all in Right-to-Left environment.
> >
> > %%% begin example-RtoL-reverse.tex
> > \usemodule[simplefonts]
> > \setmainfont[ALM Fixed][features=arabic,range=arabic]
> >
> > \setupdirections[bidi=global,method=two]
> > \setupalign[righttoleft]
> >
> > \starttext
> > آزمایش نوشتن از راست به چپ
> >
> > \startitemize[columns,two][direction=reverse]
> > \item First
> > \item Second
> > \item Third
> > \item Fourth
> > \stopitemize
> >
> > آزمایش نوشتن از راست به چپ
> > \startitemize[columns,two][direction=reverse]
> >
> > \startitem
> > یک
> > \stopitem
> >
> > \startitem
> > دو
> > \stopitem
> >
> > \startitem
> > سه
> > \stopitem
> >
> >
> > \startitem
> > چهار
> > \stopitem
> > \stopitemize
> > \stoptext
> > %%% end example-RtoL-reverse.tex
> >
> > Best regards: OK
> >
> >> On 27 Apr 2016, at 23:22, Mohammad Hossein Bateni <bat...@gmail.com>
> wrote:
> >>
> >> I actually figured out that one can use the following:
> >>
> >> \startitemize[columns,two][direction=reverse]
> >> \item first
> >> \item second
> >> \item third
> >> \stopitemize
> >>
> >> On Wed, Apr 27, 2016 at 10:06 AM, Mohammad Hossein Bateni <
> bat...@gmail.com> wrote:
> >> Wolfgang,
> >>
> >> Did you imply in the email below that a new key or something was added
> to \startitemize setups?  I mean, using \setupmixedcolumns works fine but
> is it possible to do this in each \startitemize individually?
> >>
> >> Thanks,
> >> Hossein
> >>
> >> On Mon, Feb 22, 2016 at 4:43 AM, Wolfgang Schuster <
> schuster.wolfg...@gmail.com> wrote:
> >>> Bou Salim 21. Februar 2016 um 13:26
> >>> I have posted  a question in tex stack exchange
> >>> Customize right to left list in context
> >>>
> >>> My aim is to obtain right to left  items arranged  in  multi-column,
> if I use
> >>> \startitemize [s,columns,three] [margin=1em]
> >>> the result is three column where first column start from left side of
> page, but I want it to start from right side of page.
> >>>
> >>> I 

Re: [NTG-context] right to left direction for itemize columns

2016-04-28 Thread Mohammad Hossein Bateni
Dear Otared,

Your example works perfectly fine for me using version: 2016.04.13 16:46.
Perhaps, you're using an older version of CONTEXT.  There was a patch in
February enabling this.  See the output of my run attached.

—Hossein

P.S.  My name is Mohammad *Hossein*, not Mohammad Reza :)



On Thu, Apr 28, 2016 at 12:41 AM, Otared Kavian <ota...@gmail.com> wrote:

> Hi Mohammad Reza,
>
> I tried your example, but it seems to me that the way the columns are
> presented when writing Right-to-Left is still incorrect. In the following
> example one should have the column containing the lines « First » and «
> Second » to the right of the column containing « Third » and « Fourth ».
>
> I don’t know if there is already a way to tell ConTeXt to do it in the
> right way, or Hans has to look into the righttoleft mechanism.
> The same issue appears in the table mechanism.
>
> By the way, the option
> [direction=reverse]
> seems to have no effect at all in Right-to-Left environment.
>
> %%% begin example-RtoL-reverse.tex
> \usemodule[simplefonts]
> \setmainfont[ALM Fixed][features=arabic,range=arabic]
>
> \setupdirections[bidi=global,method=two]
> \setupalign[righttoleft]
>
> \starttext
> آزمایش نوشتن از راست به چپ
>
> \startitemize[columns,two][direction=reverse]
> \item First
> \item Second
> \item Third
> \item Fourth
> \stopitemize
>
> آزمایش نوشتن از راست به چپ
> \startitemize[columns,two][direction=reverse]
>
> \startitem
> یک
> \stopitem
>
> \startitem
> دو
> \stopitem
>
> \startitem
> سه
> \stopitem
>
>
> \startitem
> چهار
> \stopitem
> \stopitemize
> \stoptext
> %%% end example-RtoL-reverse.tex
>
> Best regards: OK
>
> On 27 Apr 2016, at 23:22, Mohammad Hossein Bateni <bat...@gmail.com>
> wrote:
>
> I actually figured out that one can use the following:
>
> \startitemize[columns,two][direction=reverse]
> \item first
> \item second
> \item third
> \stopitemize
>
> On Wed, Apr 27, 2016 at 10:06 AM, Mohammad Hossein Bateni <
> bat...@gmail.com> wrote:
>
>> Wolfgang,
>>
>> Did you imply in the email below that a new key or something was added to
>> \startitemize setups?  I mean, using \setupmixedcolumns works fine but is
>> it possible to do this in each \startitemize individually?
>>
>> Thanks,
>> Hossein
>>
>> On Mon, Feb 22, 2016 at 4:43 AM, Wolfgang Schuster <
>> schuster.wolfg...@gmail.com> wrote:
>>
>>> Bou Salim <salimcol...@gmail.com>
>>> 21. Februar 2016 um 13:26
>>> I have posted  a question in tex stack exchangeCustomize right to left
>>> list in context
>>> <http://tex.stackexchange.com/questions/294627/customize-right-to-left-list-in-context/294631?noredirect=1#comment713701_294631>
>>> My aim is to obtain right to left  items arranged  in  multi-column, if
>>> I use
>>> \startitemize [s,columns,three] [margin=1em]
>>> the result is three column where first column start from left side of
>>> page, but I want it to start from right side of page.
>>>
>>> I can use \startcolumns[direction=left]\startitemize \item First \item
>>> Second \item Third \stopitemize \stopcolumns
>>> but I think it look better if there is a key direction=left for the
>>> \startitemize environment such as used in columns environment.
>>>
>>> The underlying columns mechanism has a reverse option for the direction
>>> key. I sent a patch to the dev list which allows a direst setting of the
>>> direction value with the \startitemize command.
>>>
>>> \starttext
>>>
>>> \startitemize[columns,three]
>>> \dorecurse{9}{\item Entry \recurselevel}
>>> \stopitemize
>>>
>>> \blank[3*line]
>>>
>>> \setupmixedcolumns[itemgroupcolumns][direction=reverse]
>>>
>>> \startitemize[columns,three]
>>> \dorecurse{9}{\item Entry \recurselevel}
>>> \stopitemize
>>>
>>> \stoptext
>>>
>>> Wolfgang
>>>
>>>
>>> ___
>>> If your question is of interest to others as well, please add an entry
>>> to the Wiki!
>>>
>>> maillist : ntg-context@ntg.nl /
>>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>>> archive  : http://foundry.supelec.fr/projects/contextrev/
>>> wiki : http://contextgarden.net
>>>
>>> ___

Re: [NTG-context] right to left direction for itemize columns

2016-04-27 Thread Mohammad Hossein Bateni
I actually figured out that one can use the following:

\startitemize[columns,two][direction=reverse]
\item first
\item second
\item third
\stopitemize

On Wed, Apr 27, 2016 at 10:06 AM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Wolfgang,
>
> Did you imply in the email below that a new key or something was added to
> \startitemize setups?  I mean, using \setupmixedcolumns works fine but is
> it possible to do this in each \startitemize individually?
>
> Thanks,
> Hossein
>
> On Mon, Feb 22, 2016 at 4:43 AM, Wolfgang Schuster <
> schuster.wolfg...@gmail.com> wrote:
>
>> Bou Salim <salimcol...@gmail.com>
>> 21. Februar 2016 um 13:26
>> I have posted  a question in tex stack exchangeCustomize right to left
>> list in context
>> <http://tex.stackexchange.com/questions/294627/customize-right-to-left-list-in-context/294631?noredirect=1#comment713701_294631>
>> My aim is to obtain right to left  items arranged  in  multi-column, if I
>> use
>> \startitemize [s,columns,three] [margin=1em]
>> the result is three column where first column start from left side of
>> page, but I want it to start from right side of page.
>>
>> I can use \startcolumns[direction=left]\startitemize \item First \item
>> Second \item Third \stopitemize \stopcolumns
>> but I think it look better if there is a key direction=left for the
>> \startitemize environment such as used in columns environment.
>>
>> The underlying columns mechanism has a reverse option for the direction
>> key. I sent a patch to the dev list which allows a direst setting of the
>> direction value with the \startitemize command.
>>
>> \starttext
>>
>> \startitemize[columns,three]
>> \dorecurse{9}{\item Entry \recurselevel}
>> \stopitemize
>>
>> \blank[3*line]
>>
>> \setupmixedcolumns[itemgroupcolumns][direction=reverse]
>>
>> \startitemize[columns,three]
>> \dorecurse{9}{\item Entry \recurselevel}
>> \stopitemize
>>
>> \stoptext
>>
>> Wolfgang
>>
>>
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>>
>> ___
>>
>
>
___
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] right to left direction for itemize columns

2016-04-27 Thread Mohammad Hossein Bateni
Wolfgang,

Did you imply in the email below that a new key or something was added to
\startitemize setups?  I mean, using \setupmixedcolumns works fine but is
it possible to do this in each \startitemize individually?

Thanks,
Hossein

On Mon, Feb 22, 2016 at 4:43 AM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Bou Salim 
> 21. Februar 2016 um 13:26
> I have posted  a question in tex stack exchangeCustomize right to left
> list in context
> 
> My aim is to obtain right to left  items arranged  in  multi-column, if I
> use
> \startitemize [s,columns,three] [margin=1em]
> the result is three column where first column start from left side of
> page, but I want it to start from right side of page.
>
> I can use \startcolumns[direction=left]\startitemize \item First \item
> Second \item Third \stopitemize \stopcolumns
> but I think it look better if there is a key direction=left for the
> \startitemize environment such as used in columns environment.
>
> The underlying columns mechanism has a reverse option for the direction
> key. I sent a patch to the dev list which allows a direst setting of the
> direction value with the \startitemize command.
>
> \starttext
>
> \startitemize[columns,three]
> \dorecurse{9}{\item Entry \recurselevel}
> \stopitemize
>
> \blank[3*line]
>
> \setupmixedcolumns[itemgroupcolumns][direction=reverse]
>
> \startitemize[columns,three]
> \dorecurse{9}{\item Entry \recurselevel}
> \stopitemize
>
> \stoptext
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
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] Server is up again

2016-04-27 Thread Mohammad Hossein Bateni
Awesome!  Thanks, Taco!

On Wed, Apr 27, 2016 at 6:03 AM, Taco Hoekwater <t...@elvenkind.com> wrote:

> Hi,
>
> > On 27 Apr 2016, at 10:52, Mohammad Hossein Bateni <bat...@gmail.com>
> wrote:
> >
> > Thanks, Mojca!
> >
> > This may be off-topic but may be fixable easily while you're at it.  The
> source browser on the website does not work properly: it looks like the
> index is not up to date with the new directory structure after the
> separation of MkII and MkIV code.  For instance, if I search for "sort" in
> source.contextgarden.net, the following appears among the top results.
> >
> >
> http://source.contextgarden.net/tex/context/patterns/lang-es.lua?search=sort
> >
> > Following the link produces "Internal Error - please restart the
> application!" perhaps because the file has now moved to
> tex/context/patterns/mkiv/lang-es.lua in the CONTEXT tree.
>
> No, that was not it.
>
> It turns out that source browser assumed that the sources were 7-bit
> US-ASCII encoded, anything else produced an exception. I’ve changed
> it to use and accept UTF-8 instead, and now all seems fine again.
>
> Best wishes,
> Taco
>
>
> ___
> 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
>
> ___
>
___
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   >