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

2016-04-09 Thread Aditya Mahajan

On Sun, 10 Apr 2016, Pablo Rodriguez wrote:


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.

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{}

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

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

[NTG-context] TeX "matrix" command not working since update

2016-04-09 Thread L.S.-Soc

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.



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
___

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

2016-04-09 Thread L.S.-Soc

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.



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

2016-04-09 Thread Jan Tosovsky
On 2016-04-09 Pablo Rodriguez wrote:
> On 04/09/2016 10:51 PM, Alan BRASLAU wrote:
> > On Sat, 9 Apr 2016 22:11:29 +0200 Lukáš Procházka wrote:
> >
> >> Let's have A.tex to be compiled and an existing A.pdf which 
> >> cannot be written into, e.g. due to being open by a viewer.
> >
> > This is only an issue for Windows users...
> 
> As far as I know, this is only an issue for Adobe users...

Especially Adobe Acrobat Reader DC.

When the PDF file is closed in the Reader, a list of recent files is displayed 
instead. The most recent one is selected and its thumbnail is displayed in the 
right pane. From my experience as long as this thumbnail is displayed, the PDF 
file is locked for any modifications (!) Really silly from Adobe developers.

My advice is to either close Reader completely or select another item in the 
recent opened documents.

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-09 Thread Pablo Rodriguez
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
-- 
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] defining a comamnd as variable which behaves as constant

2016-04-09 Thread Pablo Rodriguez
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.

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

2016-04-09 Thread Pablo Rodriguez
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.

Just in case it may 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] Redirect compilation to another .pdf?

2016-04-09 Thread Pablo Rodriguez
On 04/09/2016 10:51 PM, Alan BRASLAU wrote:
> On Sat, 9 Apr 2016 22:11:29 +0200 Lukáš Procházka wrote:
> 
>> Let's have A.tex to be compiled and an existing A.pdf which cannot be
>> written into, e.g. due to being open by a viewer.
> 
> This is only an issue for Windows users...

As far as I know, this is only an issue for Adobe users...

At work, I have SumatraPDF running under Win7 and it reloads the PDF
document when it has been recompiled.


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

2016-04-09 Thread Jan Tosovsky
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?

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

2016-04-09 Thread Alan BRASLAU
On Sat, 9 Apr 2016 22:11:29 +0200
Lukáš Procházka  wrote:

> Let's have A.tex to be compiled and an existing A.pdf which cannot be
> written into, e.g. due to being open by a viewer.

This is only an issue for Windows users...

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
___

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

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

Hello,

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

Let's have A.tex to be compiled and an existing A.pdf which cannot be written 
into, e.g. due to being open by a viewer.

The "context.exe A.tex" fails as the A.pdf cannot be open for writing.

The "context.exe A.tex --result=A2.pdf" fails too, as Ctx tries to write into 
A.pdf (derived from A.tex) first and later tries to rename A.pdf to A2.pdf.

There is a way - "copy /y A.tex A2.tex & context.exe A2.tex" but it has some disadvantages - the 
.log, .tuc etc. will be named A2.log, A2.tuc etc., messages will refer to "A2" rather than to 
"A" etc.

So best seems to me to have an option to tell ConTeXt to produce a .PDF WITH A 
DESIRED NAME from the beginning... Is there a way to do so?

Best regards,

Lukas


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

[NTG-context] Ligature color is not reliable

2016-04-09 Thread Jan Tosovsky
Dear All,

for an illustration I wanted to colorize all ligatures, but the following
method is not reliable for three character ligatures - which ends up black.

While tested with Palatino, it can be simulated even with a default font
(however there are missing ffi and ffl ligatures).

\definefontfamily[palatino][rm][Palatino Linotype][features={default,
quality}]
\setupbodyfont[palatino]

\starttext
Je{\red ff}, the o{\red ffi}ce on the {\red fi}rst {\red fl}oor is o{\red
ffl}ine.
\stoptext

What is happening here? 

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
___

[NTG-context] Increasing the textwidth locally

2016-04-09 Thread joasyannick
Dear Hans, Dear Zichu,

Thank you very much,

All the best,
Joas


___
If your question is of interest to others as well, please add an 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] Increasing the textwidth locally

2016-04-09 Thread Zhichu Chen

Dear Joas,

On 04/09/2016 08:47 PM, joasyann...@gmail.com wrote:


Dear everyone,

I am looking for a functionality similar to the \adjustwidth command 
in LaTeX ables to reduce or increase the \textwidth locally. I know 
that ConTeXt has \startnarrower, which reduces the \textwidth. But how 
to increase it?



\startnarrower[-1*left,-2*right]
...
\stopnarrower

surprise...


All the best,

Joas



___
If your question is of interest to others as well, please add an 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
___



--
Best regards,
ℤhichu ℂhen

Shanghai Institute of Applied Physics
No. 2019, Jialuo Road
Jiading, Shanghai, P.R.China
Tel: +86-21-39194888

___
If your question is of interest to others as well, please add an 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] Increasing the textwidth locally

2016-04-09 Thread Hans Hagen

On 4/9/2016 2:47 PM, joasyann...@gmail.com wrote:

Dear everyone,

I am looking for a functionality similar to the \adjustwidth command in
LaTeX ables to reduce or increase the \textwidth locally. I know that
ConTeXt has \startnarrower, which reduces the \textwidth. But how to
increase it?


\starttext
\input ward
\startnarrower[-2*right]
\input ward
\stopnarrower
\input ward
\stoptext


-
  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] unwanted head behavior

2016-04-09 Thread Zhichu Chen

Dear Hans,


On 04/07/2016 06:31 PM, Hans Hagen wrote:
\def\currentsectioncountervalue 
{\clf_depthnumber\numexpr\thenamedheadlevel\currenthead\relax}
%def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\currenthead+\minusone\relax} 

\def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\previoushead\relax} 



\let\previoushead\empty

\def\strc_sectioning_handle_page_nop
  {\edef\p_continue{\headparameter\c!continue}%
   \ifx\p_continue\v!yes
 \ifx\currenthead\previoushead % not really needed
\strc_sectioning_check_layout
 \else\ifnum\previoussectioncountervalue=\zerocount
\strc_sectioning_check_layout
 \else\ifnum\currentsectioncountervalue>\zerocount
\strc_sectioning_check_layout
 \fi\fi\fi
   \else
 \strc_sectioning_check_layout
   \fi
   \globallet\previoushead\currenthead}

\def\strc_sectioning_handle_page_yes
  {\ifconditional\c_strc_sectioning_ignore_page
 \setfalse\c_strc_sectioning_ignore_page
   \else
 % beware, these numbers are not yet know here
 \strc_sectioning_handle_page_nop
 \edef\p_aligntitle{\headparameter\c!aligntitle}%
 \ifx\p_aligntitle\v!float
 \ifconditional\c_strc_sectioning_auto_break
   \vspacing[\v!samepage-\currentheadlevel]%
 \fi
 \headparameter\c!before\relax
 \indent
 \else
 \page_otr_command_flush_side_floats
 \ifconditional\c_strc_sectioning_auto_break
   \vspacing[\v!samepage-\currentheadlevel]%
 \fi
 \headparameter\c!before\relax
 \fi
 \global\c_strc_sectioning_preceding_level\currentheadlevel
   \fi
   \globallet\previoushead\currenthead}

but it really needs testing with other cases
Tested and confirmed working in my project and this MWE. Thanks for the 
work.




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



--
Best regards,
ℤhichu ℂhen

Shanghai Institute of Applied Physics
No. 2019, Jialuo Road
Jiading, Shanghai, P.R.China
Tel: +86-21-39194888

___
If your question is of interest to others as well, please add an 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] Increasing the textwidth locally

2016-04-09 Thread joasyannick
Dear everyone,

I am looking for a functionality similar to the \adjustwidth command in LaTeX 
ables to reduce or increase the \textwidth locally. I know that ConTeXt has 
\startnarrower, which reduces the \textwidth. But how to increase it?

All the best,
Joas





___
If your question is of interest to others as well, please add an 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
___