Re: [NTG-context] RTL section heads

2016-04-10 Thread Mohammad Hossein Bateni
Hans & Wolfgang,

Do you have suggestions here?  How can I get the behavior I want for the
section head numbers?

In fact, the following may be quite relevant.

\usemodule[simplefonts]
\setmainfont[ALM Fixed][features=arabic,range=arabic]

\setupdirections[bidi=global,method=default]
\setupalign[r2l]

\starttext

اعداد ۱، ۲، ۳ و ۴ را در نظر بگیرید.

اعداد 1، 2، 3 و 4 را در نظر بگیرید.

اعداد 1, 2, 3 و 4 را در نظر بگیرید.

\stoptext


I expect the numbers 1, 2, 3 and 4 to appear in the same order from right
to left.  However, the visual order that I observe (regardless of whether I
use Persian digits or English digits, or whether I use Persian or English
commas) is 4, 1, 2, 3 (from left to right).  Is this a bug in the bidi
code?  If so, are there any workarounds?

Thanks,
Hossein

On Fri, Apr 8, 2016 at 5:20 PM, Mohammad Hossein Bateni 
wrote:

> Hi,
>
> This is concerning an RTL text.  I have one chapter and 10 sections under
> that.  My goal is to achieve the following.
> 1) The number 10 should appear correctly with '1' visually to the left of
> '0'.
> 2) The chapter number should visually appear to the right of the section
> number.
> 3) Chapter and section numbers should be separated with a dash.  (This is
> ignored in this email and I will follow up about it in another thread.  To
> get a minimal working example, I also do not try to change the numbers to
> use Persian digits.)
>
> In particular, the headings will be visually something like the following
> (aligned to the right).
> elpmas 1
> txet 1-1
> txet 2-1
> txet 3-1
> ...
> txet 10-1
>
> Here's the first attempt.
>
> %% Attempt 1
> \setupalign[r2l]
>
> \starttext
> \placecontent
>
> \chapter{sample}
> \dorecurse{10}{\section{text}}
> \stoptext
>
> The result is:
> elpmas 1
> txet 1-1
> ...
> txet 01-1
>
>
> Then I add "\setupdirections[bidi=global,method=default]" to the beginning
> and I get the most strange result (number right-aligned but texts
> left-aligned):
> sample1
> text   1.1
> ...
> text 1.10
>
>
> A third attempt gives almost what I want (without period as the separator).
>
> %% Attempt 3
> \setupalign[r2l]
>
> \def\LTR#1{{\lefttoright#1}}
> \def\leftnumbers#1{\LTR{\numbers{#1}}}
> \defineconversion[leftnumbers][\leftnumbers]
> \setuphead[chapter,title,section,subject] [conversion=leftnumbers]
>
> \starttext
> \placecontent
>
> \chapter{sample}
> \dorecurse{10}{\section{text}}
> \stoptext
>
>
> The big problem is that in my RTL documents, I always have the
> setupdirections command, which messes things up here.  (This makes it
> difficult to one section name with English title, which should still be
> typeset on the right-hand side of the page.)  Note that in attempt 2 above,
> there were two issues:
> (1) Text and numbers appeared on the two far ends of the screen instead of
> being close to each other.  This does not happen when I use Farsi text.
> (2) Chapter number appears to the left of section number.
>
>
> %% Attempt 5
> \usemodule[simplefonts]
> \setmainfont[ALM Fixed][features=arabic,range=arabic]
>
> \setupdirections[bidi=global,method=default]
> \setupalign[r2l]
>
> \starttext
> \placecontent
>
> \chapter{نمونه}
> \dorecurse{10}{\section{متن}}
> \stoptext
>
>
> Interestingly the table of contents looks fine if I put the number inside
> an LTR macro; still in the main body, the section heads are typeset
> incorrectly.
>
> %% Attempt 6
> \usemodule[simplefonts]
> \setmainfont[ALM Fixed][features=arabic,range=arabic]
>
> \setupdirections[bidi=global,method=default]
> \setupalign[r2l]
>
> \def\LTR#1{{\lefttoright#1}}
> \def\leftnumbers#1{\LTR{\numbers{#1}}}
> \defineconversion[leftnumbers][\leftnumbers]
> \setuphead[chapter,title,section,subject] [conversion=leftnumbers]
>
> \starttext
> \placecontent
>
> \chapter{نمونه}
> \dorecurse{10}{\section{متن}}
> \stoptext
>
>
> I guess the solution is to get the entire section head number string
> (e.g., 1.10) to have RTL direction, however, each individual number string
> inside (say, 1 or 10) should be written LTR.  How can this be achieved?
>
> The six TeX files (with corresponding PDF outputs) are attached.
>
> BTW this is using ConTeXt ver: 2016.04.01 13:01 MKIV beta fmt: 2016.4.7
> int: english/english, running LuaTeX, Version beta-0.90.0 (TeX Live 2016)
> on Mac OS X.
>
> 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
___

Re: [NTG-context] Redirect compilation to another .pdf?

2016-04-10 Thread Hans Hagen

On 4/10/2016 9:49 PM, Lukáš Procházka wrote:


- the option "--jobname" is not listed when you type "context.exe" (=
help), so it seems like a "hidden" option;


it's not supported as engine flag


- Suggestion: would it be possible to use "--result=OutputFileName" as
the name for the output stream immediately,
 i.e. not to produce "default PDF file" + rename it to
"OutputFileName" (= --result),
 but to use the "OutputFileName" initially as the output stream?


maybe ... but it has to wait till after tex live code freeze (because it 
demands an extra flag to the engine --output-file


so remind me in a month or so

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/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] Weird background colors in autogenerated index

2016-04-10 Thread Hans Hagen

On 4/10/2016 11:26 PM, Pablo Rodriguez wrote:

On 04/10/2016 11:00 PM, Jan Tosovsky wrote:

On 2016-04-10 Hans Hagen wrote:

On 4/9/2016 11:22 PM, Jan Tosovsky wrote:


since LuaTeXt 0.81 my back-of-the-book index (register) is
with generated strange background colors. The index title
is typeset in yellowish background and the left column of
the last index page has a blue background, see the attachment.

... It was fine in the version 0.80.


no example


I've published both the ConTeXt source and the final PDF here:
http://drifted.in/other/context/


Jan,

here you have the minimal sample:

   \showgrid
   \starttext
   a\index{b}
   \completeindex
   \stoptext

Comment the first line and colors background colors will disappear.

Don’t know whether it is a bug or not, but this is only related to
\showgrid.


indeed, it's tracing related (no bug)


I hope it helps,

Pablo




--

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

Re: [NTG-context] Weird background colors in autogenerated index

2016-04-10 Thread Pablo Rodriguez
On 04/10/2016 11:00 PM, Jan Tosovsky wrote:
> On 2016-04-10 Hans Hagen wrote:
>> On 4/9/2016 11:22 PM, Jan Tosovsky wrote:
>>>
>>> since LuaTeXt 0.81 my back-of-the-book index (register) is 
>>> with generated strange background colors. The index title 
>>> is typeset in yellowish background and the left column of 
>>> the last index page has a blue background, see the attachment.
>>>
>>> ... It was fine in the version 0.80.
>>
>> no example
> 
> I've published both the ConTeXt source and the final PDF here:
> http://drifted.in/other/context/

Jan,

here you have the minimal sample:

  \showgrid
  \starttext
  a\index{b}
  \completeindex
  \stoptext

Comment the first line and colors background colors will disappear.

Don’t know whether it is a bug or not, but this is only related to
\showgrid.

I hope it helps,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Weird background colors in autogenerated index

2016-04-10 Thread Jan Tosovsky
On 2016-04-10 Hans Hagen wrote:
> On 4/9/2016 11:22 PM, Jan Tosovsky wrote:
> >
> > since LuaTeXt 0.81 my back-of-the-book index (register) is 
> > with generated strange background colors. The index title 
> > is typeset in yellowish background and the left column of 
> > the last index page has a blue background, see the attachment.
> >
> > ... It was fine in the version 0.80.
> 
> no example

I've published both the ConTeXt source and the final PDF here:
http://drifted.in/other/context/

Jan

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

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

Re: [NTG-context] Redirect compilation to another .pdf?

2016-04-10 Thread Lukáš Procházka

Hello,

On Sun, 10 Apr 2016 18:07:54 +0200, Aditya Mahajan  wrote:


This should have worked, but for some reason it does not:

context --jobname=shadow main.tex

The output says:

system  > files > jobname 'shadow', input './main', result 'shadow'
.
mkiv lua stats  > result saved in file: shadow.pdf, compresslevel 3,
objectcompresslevel 3

but no shadow.pdf file is created.


I can fully confirm this behavior;

- the option "--jobname" is not listed when you type "context.exe" (= help), so it seems 
like a "hidden" option;

- but ConTeXt seems to use this option somehow, as
"context.exe --jobname=C A.mkiv"
produces
"system  > files > jobname 'C', input './A.mkiv', result 'C'"
to the console;

- but the result file is still A.pdf.

- Suggestion: would it be possible to use "--result=OutputFileName" as the name 
for the output stream immediately,
i.e. not to produce "default PDF file" + rename it to "OutputFileName" 
(= --result),
but to use the "OutputFileName" initially as the output stream?

I guess I explained why I'd like to use "non-default" PDF stream (to allow 
working with the default PDF file during the compilation)...

Best regards,

Lukas

(BTW: The PdfXChange Viewer has commands open/close PDF file similar to that of 
AR; unlike AR, these commands are still the same as far as I'm using PdfXCh.)


Aditya



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
If your question is of interest to others as well, please add an 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] Redirect compilation to another .pdf?

2016-04-10 Thread Hans Hagen

On 4/10/2016 6:07 PM, Aditya Mahajan wrote:

On Sun, 10 Apr 2016, Lukáš Procházka wrote:


My way is to compile into a "shadow copy" which allow use to view the
document even during its compilation.
Once the compilation is done, I close the .pdf, I move the compiled
"shadow copy" to the well-named .pdf and I open it in a viewer.

So I'm trying find a way to redirect ConTeXt to that "shadow copy"...


This should have worked, but for some reason it does not:

context --jobname=shadow main.tex

The output says:

system  > files > jobname 'shadow', input './main', result 'shadow'
.
mkiv lua stats  > result saved in file: shadow.pdf, compresslevel 3,
objectcompresslevel 3

but no shadow.pdf file is created.


because we do all kind of analysis command line arguments and given 
filenames and then set variables reflecting paths, input filenames, file 
types ... (we could probably do some magic with a specific pdf 
outputfile but i don't like that idea as it's a workaround for a problem 
that should not be there in the first place .. waste of time and energy)


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/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] Redirect compilation to another .pdf?

2016-04-10 Thread Aditya Mahajan

On Sun, 10 Apr 2016, Lukáš Procházka wrote:

My way is to compile into a "shadow copy" which allow use to view the 
document even during its compilation.
Once the compilation is done, I close the .pdf, I move the compiled "shadow 
copy" to the well-named .pdf and I open it in a viewer.


So I'm trying find a way to redirect ConTeXt to that "shadow copy"...


This should have worked, but for some reason it does not:

context --jobname=shadow main.tex

The output says:

system  > files > jobname 'shadow', input './main', result 'shadow'
.
mkiv lua stats  > result saved in file: shadow.pdf, compresslevel 3, 
objectcompresslevel 3


but no shadow.pdf file is created.

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

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

Re: [NTG-context] Weird background colors in autogenerated index

2016-04-10 Thread Hans Hagen

On 4/9/2016 11:22 PM, Jan Tosovsky wrote:

Dear All,

since LuaTeXt 0.81 my back-of-the-book index (register) is generated with
strange background colors. The index title is typeset in yellowish
background and the left column of the last index page has a blue background,
see the attachment.

I've thought I reported it, but it is still there even in 0.95. It was fine
in the version 0.80.

Could this be somehow eliminated?


no example


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

Re: [NTG-context] Protrusion cancellation by index term

2016-04-10 Thread Hans Hagen

On 4/10/2016 12:53 PM, Jan Tosovsky wrote:

On 2016-04-03 Hans Hagen wrote:

On 4/1/2016 9:59 PM, Jan Tosovsky wrote:

On 2016-04-01 Hans Hagen wrote:

On 3/31/2016 10:47 PM, Wolfgang Schuster wrote:

On 2016-03-31 Jan Tosovsky wrote:

I couldn't find any details for that \leftboundary


spac-ver.mkiv:

\unexpanded\def\leftboundary   {\boundary\plusone}
\unexpanded\def\rightboundary  {\boundary\plustwo}


it will instruct the protrusion checker to skip the next or
previous node (e.g. a char or hbox or ...) when looking for
an edge


Thanks for details. So if that worked with plain \hbox should be

taken rather as coincidence?

a hbox becomes one node so that one node is ignored



I found a nasty drawback of this method. If that hbox is used, the first 
paragraph is not evaluated correctly and considered as the second one. When 
indentation is enabled, the first paragraph after the title is not usually 
indented, but now it is. Additionaly, even if indenting is disabled, there is a 
bigger distance between title and the following para.

\setupindenting[yes, 2em]

\starttext

\section{The first section}\index{the first section}

The first para.\par
The second para.

\section{The second section}\leftboundary\hbox{\index{the second section}}

The first para.\par
The second para.

\stoptext


I could eventually avoid inserting that 'index' tweak into titles, but this is 
another exception which an end-user should keep in mind ..and.. I hate 
exceptions ;-)

Any idea?


everything protrusion is an exception

\unexpanded\def\myindex#1%
  {\dontleavehmode
   \ifcase\normalprotrudechars\else\leftboundary\hbox\fi
   {\index{#1}}}

might work (untested) given that protrusion is off in the title

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/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] Redirect compilation to another .pdf?

2016-04-10 Thread Hans Hagen

On 4/9/2016 11:47 PM, Pablo Rodriguez wrote:

On 04/09/2016 10:11 PM, Lukáš Procházka wrote:

Hello,

is there a way to tell ConTeXt to generate a .pdf named othe
instead of the name derived from file to be compiled?


Hi Lukáš,

this wuld be the way to do it:

context source.tex --result=output

I’m not sure it may work with Adobe, since it compiles source.pdf and
then it moves to output.pdf

BTW, ---auto may achieve what you intend. I have never used it.


there is code actually that will close the acrobat document but that api 
is different per version of acrobat and even between reader and 
professional so when again that happened i gave up on acrobat as 
previewer and switched to sumatrapdf


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/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] Protrusion cancellation by index term

2016-04-10 Thread Jan Tosovsky
On 2016-04-03 Hans Hagen wrote:
> On 4/1/2016 9:59 PM, Jan Tosovsky wrote:
> > On 2016-04-01 Hans Hagen wrote:
> >> On 3/31/2016 10:47 PM, Wolfgang Schuster wrote:
>  On 2016-03-31 Jan Tosovsky wrote:
> 
>  I couldn't find any details for that \leftboundary
> >>>
> >>> spac-ver.mkiv:
> >>>
> >>> \unexpanded\def\leftboundary   {\boundary\plusone}
> >>> \unexpanded\def\rightboundary  {\boundary\plustwo}
> >>
> >> it will instruct the protrusion checker to skip the next or
> >> previous node (e.g. a char or hbox or ...) when looking for
> >> an edge
> >
> > Thanks for details. So if that worked with plain \hbox should be
> taken rather as coincidence?
> 
> a hbox becomes one node so that one node is ignored
> 

I found a nasty drawback of this method. If that hbox is used, the first 
paragraph is not evaluated correctly and considered as the second one. When 
indentation is enabled, the first paragraph after the title is not usually 
indented, but now it is. Additionaly, even if indenting is disabled, there is a 
bigger distance between title and the following para.

\setupindenting[yes, 2em]

\starttext

\section{The first section}\index{the first section}

The first para.\par
The second para.

\section{The second section}\leftboundary\hbox{\index{the second section}}

The first para.\par
The second para.

\stoptext


I could eventually avoid inserting that 'index' tweak into titles, but this is 
another exception which an end-user should keep in mind ..and.. I hate 
exceptions ;-)

Any idea?

Thanks, Jan

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

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

Re: [NTG-context] TeX "matrix" command not working lately

2016-04-10 Thread



Am 10.04.2016 um 12:39 schrieb Pablo Rodriguez:

On 04/10/2016 11:45 AM, L.S.-Soc&Gam wrote:

[...]
I checked my version and it is the very same as yours.
Can you maybe give me the code that you tested, to create a matrix, so I
can copy paste and test it?
Because I entered a simple matrix again and still the finished pdf only
shows empty braces

Hi Sebastian,

I copied and pasted your code adding \starttext...\stoptext:

 \starttext
 \startformula
 S=\left(\matrix{
   \sigma_x & \tau_{xy} & \tau_{xz} \cr
   \tau_{yx} & \sigma_y & \tau_{yz} \cr
 \tau_{zx} & \tau_{zy} & \sigma_z \cr
 }\right)_{xyz}
 \stopformula
 \stoptext

My guess is that the different results may be related to the OS.

I’m on Linux 32bit using luatex-0.90.0. As far as I know, Windows is
provided with luatex-0.95.0.

This might be the cause of the different results. But it is only my
guess. If this is the cause, you may have found a bug in luatex-0.95.0.

I hope it helps,

Pablo


A good point you've made there. I copied the code from above into a 
whole new document and compiled it. The result are *empty braces*.
That's interesting. So you might be right on the LuaTeX version 
difference issue. Anyway, Wolfgang's way works as well so I am going to 
use that technique for now. But this shouldn't be left standing like 
this I think.


Greetings, Sebastian
___
If your question is of interest to others as well, please add an 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] TeX "matrix" command not working lately

2016-04-10 Thread Pablo Rodriguez
On 04/10/2016 11:45 AM, L.S.-Soc&Gam wrote:
> [...] 
> I checked my version and it is the very same as yours.
> Can you maybe give me the code that you tested, to create a matrix, so I 
> can copy paste and test it?
> Because I entered a simple matrix again and still the finished pdf only 
> shows empty braces

Hi Sebastian,

I copied and pasted your code adding \starttext...\stoptext:

\starttext
\startformula
S=\left(\matrix{
  \sigma_x & \tau_{xy} & \tau_{xz} \cr
  \tau_{yx} & \sigma_y & \tau_{yz} \cr
\tau_{zx} & \tau_{zy} & \sigma_z \cr
}\right)_{xyz}
\stopformula
\stoptext

My guess is that the different results may be related to the OS.

I’m on Linux 32bit using luatex-0.90.0. As far as I know, Windows is
provided with luatex-0.95.0.

This might be the cause of the different results. But it is only my
guess. If this is the cause, you may have found a bug in luatex-0.95.0.

I hope it helps,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Redirect compilation to another .pdf?

2016-04-10 Thread Lukáš Procházka

Hello,

thanks for the tip,

the issue here is that I'm not using AR but PdfXChange Viewer (and yes, there 
is also at least SumetraPPDF and Foxit Reader).

I don't use --autopdf as it closes the .pdf as soon as the compilation is to 
start.

My way is to compile into a "shadow copy" which allow use to view the document 
even during its compilation.
Once the compilation is done, I close the .pdf, I move the compiled "shadow 
copy" to the well-named .pdf and I open it in a viewer.

So I'm trying find a way to redirect ConTeXt to that "shadow copy"...

Best regards,

Lukas (and yes, WinXP)


On Sun, 10 Apr 2016 00:02:24 +0200, Pablo Rodriguez  wrote:


On 04/09/2016 11:47 PM, Pablo Rodriguez wrote:

On 04/09/2016 10:11 PM, Lukáš Procházka wrote:

Hello,

is there a way to tell ConTeXt to generate a .pdf named othe
instead of the name derived from file to be compiled?

[...]
BTW, ---auto may achieve what you intend. I have never used it.


Sorry, the option is --autopdf, not --auto.

Pablo



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
If your question is of interest to others as well, please add an 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] wrong beta version number?

2016-04-10 Thread Pablo Rodriguez
On 04/10/2016 11:41 AM, Mojca Miklavec wrote:
> On 10 April 2016 at 11:34, Pablo Rodriguez wrote:
>> [...]
>> Is the version number wrong or does the Linux 32bit distribution have a
>> previous version?
> 
> It has to do with server problems.
> 
> I might try to prepare an alternative setup until the problems get fixed.

Hi Mojca,

if this is related to the server problem, then this is fine for me. I
can wait until the issue gets fixed.

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
___

Re: [NTG-context] defining a comamnd as variable which behaves as constant

2016-04-10 Thread Wolfgang Schuster

Pablo Rodriguez 
10. April 2016 um 00:00
Dear list,

I have the following document:

\mainlanguage[es]
\starttext
\startTEXpage[offset=1em]
\dorecurse{27}%
{\def\abcd{\convertnumber{a}{\recurselevel}}%
\dorecurse{27}%
{\abcd\convertnumber{a}{\recurselevel} }\par}
\stopTEXpage
\stoptext

I want to test all lowercase-letter pairs in Spanish.

Excuse me for my missing programming notions. For the sample above, I
would need a command that behaves as a variable when defined, but as a
constant when invoked.

Is there any way to achieve that without using counters? Sorry if there
is too much nonsense in the previous paragraph. But I need to know how
to do it for another example too.
You can use Lua to create a list of all character combinations. The 
convert function
takes three argument, the first is the conversion method, the second the 
conversion
value and the third the language (optional and only used by certain 
conversion methods).



\starttext

\startluacode
for i = 1,27 do
for j = 1,27 do
context(converters.convert("a",i,"es"))
context(converters.convert("a",j,"es"))
context.par()
end
end
\stopluacode

\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] TeX "matrix" command not working lately

2016-04-10 Thread



Am 10.04.2016 um 11:45 schrieb Wolfgang Schuster:

L.S.-Soc&Gam 
10. April 2016 um 02:33
Hi guys,

i've already searched the mailing list for this but i still am having 
a problem while trying to create a matrix.

my code looks like this:

\startformula
S=\left(*\matrix**{*
  \sigma_x *&* \tau_{xy} *&* \tau_{xz} *\cr*
  \tau_{yx} *&* \sigma_y *&* \tau_{yz} *\cr*
\tau_{zx} *&* \tau_{zy} *&* \sigma_z *\cr*
*}*\right)_{xyz}
\stopformula

But since a few days, there are only empty braces after compilation. 
The funny thing is, i worked already. but i've updated context at 
least once since (only 5 days ago, betas included) and since then 
after compiling there are only empty braces. When i enter


\startformula
S=\left(
1234
\right)_{xyz}
\stopformula

the 1234 shows fine between the braces. so it seems to have to do 
with \matrix command in some way...
i don't know any alternative way to create a matrix. any help would 
be appreciated.
Your code works fine here but I suggest to use ConTeXt’s own matrix 
environment.


\starttext

\startformula
S =\startmathmatrix[left=\left(,right=\right)]
\NC \sigma_{x} \NC \tau_{xy}  \NC \tau_{xz}  \NR
\NC \tau_{yx}  \NC \sigma_{y} \NC \tau_{yz}  \NR
\NC \tau_{zx}  \NC \tau_{zy}  \NC \sigma_{z} \NR
\stopmathmatrix_{xyz}
\stopformula

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


Hi Wolfgang,

danke, your way works. Still I am a little bit confused why my previous 
(plain tex) matrix works for you guys but not for me, since it worked a 
few days ago. i hope that I am not missing anything here like for 
example that i forgot to define anything in the beginning.

So only for the record: my context version is 2016.04.01 13:01.
If anybody wants to research deeper into this, i can provide logs, texs 
and pdfs.


Thanks a lot,

Sebastian
___
If your question is of interest to others as well, please add an 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] TeX "matrix" command not working lately

2016-04-10 Thread Wolfgang Schuster

L.S.-Soc&Gam 
10. April 2016 um 02:33
Hi guys,

i've already searched the mailing list for this but i still am having 
a problem while trying to create a matrix.

my code looks like this:

\startformula
S=\left(*\matrix**{*
  \sigma_x *&* \tau_{xy} *&* \tau_{xz} *\cr*
  \tau_{yx} *&* \sigma_y *&* \tau_{yz} *\cr*
\tau_{zx} *&* \tau_{zy} *&* \sigma_z *\cr*
*}*\right)_{xyz}
\stopformula

But since a few days, there are only empty braces after compilation. 
The funny thing is, i worked already. but i've updated context at 
least once since (only 5 days ago, betas included) and since then 
after compiling there are only empty braces. When i enter


\startformula
S=\left(
1234
\right)_{xyz}
\stopformula

the 1234 shows fine between the braces. so it seems to have to do with 
\matrix command in some way...
i don't know any alternative way to create a matrix. any help would be 
appreciated.
Your code works fine here but I suggest to use ConTeXt’s own matrix 
environment.


\starttext

\startformula
S =\startmathmatrix[left=\left(,right=\right)]
\NC \sigma_{x} \NC \tau_{xy}  \NC \tau_{xz}  \NR
\NC \tau_{yx}  \NC \sigma_{y} \NC \tau_{yz}  \NR
\NC \tau_{zx}  \NC \tau_{zy}  \NC \sigma_{z} \NR
\stopmathmatrix_{xyz}
\stopformula

\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] TeX "matrix" command not working lately

2016-04-10 Thread



Am 10.04.2016 um 11:39 schrieb Pablo Rodriguez:

On 04/10/2016 02:33 AM, L.S.-Soc&Gam wrote:

Hi guys,

i've already searched the mailing list for this but i still am having a
problem while trying to create a matrix.
my code looks like this:

\startformula
S=\left(*\matrix**{*
   \sigma_x *&* \tau_{xy} *&* \tau_{xz} *\cr*
   \tau_{yx} *&* \sigma_y *&* \tau_{yz} *\cr*
 \tau_{zx} *&* \tau_{zy} *&* \sigma_z *\cr*
*}*\right)_{xyz}
\stopformula

But since a few days, there are only empty braces after compilation. The
funny thing is, i worked already. but i've updated context at least once
since (only 5 days ago, betas included) and since then after compiling
there are only empty braces. When i enter

Hi Sebastian,

matrices seem to work fine here (using beta tagged as 2016.04.01 13:01
[see my previous message to the list]).

If you allow me some suggestions, I think it may be worth considering
the following when dealing with betas:

1. Always give the beta version, otherwise it may be impossible in some
cases to know whether something behaves as expected or not.

2. Always backup your previous beta before upgrading it. New betas can
contain bugs or unexpected features and you may want to stick to your
old beta while things are fixed.

Just in case it helps,

Pablo


Hi Pablo,

I checked my version and it is the very same as yours.
Can you maybe give me the code that you tested, to create a matrix, so I 
can copy paste and test it?
Because I entered a simple matrix again and still the finished pdf only 
shows empty braces


Sebastian

___
If your question is of interest to others as well, please add an 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] wrong beta version number?

2016-04-10 Thread Mojca Miklavec
On 10 April 2016 at 11:34, Pablo Rodriguez  wrote:
> Hans,
>
> I have just updated the latest version from the ConTeXt Suite and it
> contains:
>
>\edef\contextversion{2016.04.01 13:01}
>
> Is the version number wrong or does the Linux 32bit distribution have a
> previous version?

It has to do with server problems.

I might try to prepare an alternative setup until the problems get fixed.

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

Re: [NTG-context] defining a comamnd as variable which behaves as constant

2016-04-10 Thread Pablo Rodriguez
On 04/10/2016 07:17 AM, Aditya Mahajan wrote:
> On Sun, 10 Apr 2016, Pablo Rodriguez wrote:
>> [...]
>> Is there any way to achieve that without using counters? Sorry if there
>> is too much nonsense in the previous paragraph. But I need to know how
>> to do it for another example too.
> 
> \edef\abcd{}

Thank you very much for your reply, Aditya.

I have seen \edef for years, but I didn’t know what it actually was.

Many thanks again 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
___

Re: [NTG-context] TeX "matrix" command not working lately

2016-04-10 Thread Pablo Rodriguez
On 04/10/2016 02:33 AM, L.S.-Soc&Gam wrote:
> Hi guys,
> 
> i've already searched the mailing list for this but i still am having a
> problem while trying to create a matrix.
> my code looks like this:
> 
> \startformula
> S=\left(*\matrix**{*
>   \sigma_x *&* \tau_{xy} *&* \tau_{xz} *\cr*
>   \tau_{yx} *&* \sigma_y *&* \tau_{yz} *\cr*
> \tau_{zx} *&* \tau_{zy} *&* \sigma_z *\cr*
> *}*\right)_{xyz}
> \stopformula
> 
> But since a few days, there are only empty braces after compilation. The
> funny thing is, i worked already. but i've updated context at least once
> since (only 5 days ago, betas included) and since then after compiling
> there are only empty braces. When i enter

Hi Sebastian,

matrices seem to work fine here (using beta tagged as 2016.04.01 13:01
[see my previous message to the list]).

If you allow me some suggestions, I think it may be worth considering
the following when dealing with betas:

1. Always give the beta version, otherwise it may be impossible in some
cases to know whether something behaves as expected or not.

2. Always backup your previous beta before upgrading it. New betas can
contain bugs or unexpected features and you may want to stick to your
old beta while things are fixed.

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

[NTG-context] wrong beta version number?

2016-04-10 Thread Pablo Rodriguez
Hans,

I have just updated the latest version from the ConTeXt Suite and it
contains:

   \edef\contextversion{2016.04.01 13:01}

Is the version number wrong or does the Linux 32bit distribution have a
previous version?

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
___