Re: [NTG-context] Problem with Russian letters in itemize

2017-02-13 Thread Vladimir Lomov
Hello,
** Ulrike Fischer [2017-02-13 14:16:52 +0100]:

> Am Mon, 13 Feb 2017 17:24:19 +0800 schrieb Vladimir Lomov:
> 
>> I'm trying to use Russian (Cyrillic) letters for itemize list but
>> without luck.
> 
> Imho there is no predefined conversion, but you can define your own:
> 
> http://wiki.contextgarden.net/User-Defined_Enumerations 

Thank you, I saw this page but was confused by other page about
Enumerations (http://wiki.contextgarden.net/Enumerations) that mentions
two special examples: Slovenian and Spain (and some alphabetic thing).

I tried to make custom conversion command and it works, but my point was
that I expected that \items will give Russian letters if I use
'\mainlanguage[ru]'. I tried with 'sl' and 'es' and both give special
letters. Still 'ar', 'gr' and 'kr' don't give me other than Latin
letters in \items as I would expect (examples with 'sl' and 'es' work!).

So I conclude that either I'm doing something wrong (in wrong way) or
something still missing in context regarging usage of other alphabets
letters as \items.

---
WBR, Vladimir Lomov

-- 
Science may someday discover what faith has always known.
___
If your question is of interest to others as well, please add an 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] defining bug not setting up blank spaces

2017-02-13 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\defineblank[ab][none]
\starttext
\defineblank[ab][big]
a
\blank[ab]
b
\stoptext

Am I missing something or is there a reason to force the new definition
(instead of the setup) of already defined blank spaces?

I mean, if this isn’t a bug, I don’t see the gain in this behavior.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with Russian letters in itemize

2017-02-13 Thread Jean-Pierre Delange
Hi Vladimir,

You may try the '\definefallbackfamily' command if you are written in another 
language than Russian;
if the whole text is in Cyrillic, I don't have any idea how you can't achieve 
the itemize purpose.
Since I guess you are aware about what kind of font match with cyrillic, there 
is something to clear with the itemizing setting.
If your document is written in another language than English, test this MWE (in 
which I don't understand either why the numbering is not in Russian!) :

definefallbackfamily [mainface] [serif] [AGGaramondCyr] [range=cyrillic] 
\definefontfamily [mainface] [serif] [AGGaramondCyr]
\setupbodyfont[mainface]
\setuplanguage[en,ru][patterns={fr, de, ru}]

\starttext
A sentence in Russian :
Традиционная систематика лишайников оказывается во многом условна и

\startitemize[a]
\item первый
\item второй
\stopitemize

\stoptext


- Mail original -
De: "Ulrike Fischer" 
À: ntg-context@ntg.nl
Envoyé: Lundi 13 Février 2017 14:16:52
Objet: Re: [NTG-context] Problem with Russian letters in itemize

Am Mon, 13 Feb 2017 17:24:19 +0800 schrieb Vladimir Lomov:

> I'm trying to use Russian (Cyrillic) letters for itemize list but
> without luck.

Imho there is no predefined conversion, but you can define your own:

http://wiki.contextgarden.net/User-Defined_Enumerations


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
If your question is of interest to others as well, please add an 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 with \seeindex and two + entries

2017-02-13 Thread Rik

ConTeXters,

An index register entry with two + components does not get set properly. 
With the following example, the text “/see Mmm+Plus/” should be on a 
separate, indented line as “Plus /see Mmm+Plus/” but I see it on the 
first line as “Aaa /see Mmm+Plus/”. When there are zero or one + 
components, all is well.


   \starttext
   \seeindex{Aaa+Plus}{Mmm+Plus}
   \seeindex{Bbb+Plus}{Nnn, Comma}
   \seeindex{Ccc, Comma}{Ooo, Comma}
   \seeindex{Ddd, Comma}{Ppp+Plus}
   Some text.
   \index{Aaa+SecondPlus}
   \index{Bbb+SecondPlus}
   \index{Mmm+Plus}
   \index{Mmm+SecondPlus}
   \index{Ppp+Plus}
   \index{Ppp+SecondPlus}
   \index{Ooo, Comma}
   \index{Nnn, Comma}
   Some more text.
   \page
   \placeindex
   \stoptext


--

Rik

___
If your question is of interest to others as well, please add an 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] frac opentype feature broken by \setbreakpoints[compound]

2017-02-13 Thread MF
Hello list,
I found an interference between the "frac" opentype feature and
\setbreakpoints[compound], which make the former fail when you have a
numerator more than 2 digit wide.

I found it with Adobe Garamond Premier Pro: with
\setbreakpoints[compound], when the fraction had a 3-digit (or more)
numerator, the denominator stayed high as the numerator (like a
superscript).

Here I replaced Garamond Premier Pro with the freely available "Lato"
font, to let you reproduce the problem.
The outcome is different, but still erroneous:
\setbreakpoints[compound] makes ConTeXt ignore the "frac" feature at
all.

Please try this:

\definefontfeature[frac][frac=yes]
\definefontfamily[default][rm][lato][features=frac]
\setupbodyfont[default,rm,11pt]

\setbreakpoints[compound]

\starttext

\addff{frac} 1/3, 1/100, 1/1000, {\setbreakpoints[reset]1633/100},
2345/12.

\stoptext

A workaround is a local \setbreakpoints[reset] limited to the fraction.

Best regards,
Massi
___
If your question is of interest to others as well, please add an 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 table operation in lua-ConTeXt

2017-02-13 Thread Jeong Dal
Dear Henri, Hans, Procházka,

Thank you for the answers.
It is what I want, and I can complete my code.

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

Re: [NTG-context] Problem with Russian letters in itemize

2017-02-13 Thread Ulrike Fischer
Am Mon, 13 Feb 2017 17:24:19 +0800 schrieb Vladimir Lomov:

> I'm trying to use Russian (Cyrillic) letters for itemize list but
> without luck.

Imho there is no predefined conversion, but you can define your own:

http://wiki.contextgarden.net/User-Defined_Enumerations


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

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

2017-02-13 Thread Peter Rolf
Am 11.02.2017 um 01:25 schrieb Hans Hagen:
> On 2/10/2017 2:56 PM, Peter Rolf wrote:
>> Hi,
>>
>> I tried to set some PDF boxes properly, but no luck (setupcanvas).
>> After searching the mailing archive from 2015 I found this (broken)
>> example. Is this still the official method to set the crop|trim|bleed
>> boxes?
> 
> controlled by:
> 
> \setupinteractionscreen
>[width=max,height=max]
>

Thanks for the pointer. Kind of works now, but the height calculation
seems to be broken. The crop-|trimbox height is smaller than the defined
paper height. If I disable the mechanism (comment
\setupinteractionscreen) I get the correct sizes (paper on printpaper).

As always the real world example is too big and complex, I attached a
smaller one (but with the same sizes).


ps:

For all interested, here is the link to that table (best viewed on a UHD
monitor).
https://spideroak.com/browse/share/indiego/public/Titanfall2/

There's still a bug in the (combined) table header on page one, which
inserts an unwanted extra column. Checked the numbers several times, no
error found on my side. Currently I use the extra column as right frame,
wanted to add one anyway. First attempts to make a minimal example
failed, seems to be more complex (need to also add fonts, table
content?). Will report back when done.


> to be wikified
>

aye

>> -
>> \showframe
>>
>> \setuplayout
>>[location=middle,
>> width=middle,
>> height=middle,
>> cropoffset=auto,
>> trimoffset=1bp,
>> bleedoffset=2bp,
>> artoffset=2bp]
>>
>>  \setupbackend
>>[level=0]
>>
>> \starttext
>>
>> \definepapersize[TestA][width=100bp,height=200bp]
>> \definepapersize[TestB][width=150bp,height=250bp]
>>
>> \setuppapersize[TestA][TestB]
>>
>> test
>>
>> \stoptext
>> -
>>
>> ConTeXt version 2017.01.27 gives
>>
>> [..]
>> 10 0 obj
>> <> 250]/CropBox [ 0 0 150 250 ] /TrimBox [ 0 0 150 250 ]/Parent 13 0 R>>
>> endobj
>> [..]
>>
>>
>>
>> One additional note. The Mediabox precision seems to be 5 now (and not
>> 4). Taken from my latest table using TeXpage (/MediaBox[0 0 1655.39105
>> 969.22291]). The precision value for the other boxes should be adjusted
>> to avoid rounding problems (?Box < MediaBox).
>>
>> [lpdf-mis.lua]
>> [..]
>> -- temp hack: the mediabox is not under our control and has a precision
>> of 4 digits
>>
>> local factor  = number.dimenfactors.bp
>> local f_value = formatters["%0.4F"]
>> [..]
>>
>>
>> Not in a hurry, fix (or advice) is welcome at any time :D
>>
>>
>> Best wishes,  Peter
>>
>>
>>
>> ___
>>
>> If your question is of interest to others as well, please add an 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
>> ___
>>
>>
> 
> 


% dimens are taken from the final tables (TEXpage)
\newdimen\tableAwidth
\newdimen\tableAheight
\tableAwidth= 1655.39105bp
\tableAheight= 969.22291bp
\definepapersize[tableA][width=\tableAwidth, height=\tableAheight]

\newdimen\tableBwidth
\newdimen\tableBheight
\tableBwidth= 698.65893bp
\tableBheight= 489.67048bp
\definepapersize[tableB][width=\tableBwidth, height=\tableBheight]
 

\definelayout[tableA]
  [location=middle,
   width=middle,
   height=middle,
   paper=tableA,
%   clipoffset=0mm,
%   horoffset=0mm,
%   veroffset=0mm,
   cropoffset=auto,
   trimoffset=2bp,
   bleedoffset=3mm,
   marking=on,
   backspace=0mm,
%   bottom=0mm,
%   bottomdistance=0mm,
   bottomspace=0mm,
   cutspace=0mm,
   footer=0mm,
   footerdistance=0mm,
   header=0mm,
   headerdistance=0mm,
   leftedge=0mm,
   leftedgedistance=0mm,
   leftmargin=0mm,
   leftmargindistance=0mm,
   margin=0mm,
   rightedge=0mm,
   rightedgedistance=0mm,
   rightmargin=0mm,
   rightmargindistance=0mm,
   textdistance=0mm,
   textmargin=0mm,
%   top=0mm,
%   topdistance=0mm,
   topspace=0mm,
  ]

\definelayout[tableB]
  [location=middle,
   width=middle,
   height=middle,
   paper=tableB,
   clipoffset=0bp,
   cropoffset=auto,
   trimoffset=2bp,
   bleedoffset=3mm,
   marking=on,
   backspace=0mm,
%   bottom=0mm,
%   bottomdistance=0mm,
   bottomspace=0mm,
   cutspace=0mm,
   footer=0mm,
   footerdistance=0mm,
   header=0mm,
   headerdistance=0mm,
   leftedge=0mm,
   leftedgedistance=0mm,
   leftmargin=0mm,
   leftmargindistance=0mm,
   margin=0mm,
   rightedge=0mm,
   rightedgedistance=0mm,
   rightmargin=0mm,
   rightmargindistance=0mm,
   textdistance=0mm,
   textmargin=0mm,
%   top=0mm,
%   topdistance=0mm,
   topspace=0mm,
  ]


\setupbackend % check the pdfbox sizes with scite
   [level=0]


% trigger for pdfboxes (disable to see printpaper)
\setupinteractionscreen[width=max,height=max]

\setuppapersize[tableA][A1,landscape]%
   

[NTG-context] Problem with Russian letters in itemize

2017-02-13 Thread Vladimir Lomov
Hello,

I'm trying to use Russian (Cyrillic) letters for itemize list but
without luck.

This is small example to show a problem:

-- 8< -
\mainlanguage[ru]
\setupbodyfont[cambria]
% \setupbodyfont[computer-modern-unicode]
% \setupbodyfont[dejavu]

\starttext

\startitemize[a]
\item первый
\item второй
\stopitemize
\stoptext
-- 8< -

Compilation (typesetting) of the example by context (curr. ver.
2017.01.27) gives a PDF file with Latin letters.

According to 'language-mkiv.pdf' (found in
texmf-context/doc/context/documents/general/manuals)

  The \type{alphabetic} converter adapts to the current main language.
  When a language has no special alphabet, the regular 26 characters are
  used.

the use of Latin letters is expected behaviour if current language has
not special alphabet. But Russian alphabet (based on Cyrillic) has
differences with Latin one. Did I face a bug or I misunderstand the
documentation and I have to use (add?) another command to obtain Russian
letters for item?

Also, it is possible that I incorrectly use 'setupbodyfont' but I tested
all cases shown above and they work fine, expect the fact that 'cambria'
case gives me italic variant of font while 'computer-modern-unicode' and
'dejavu' use "roman" font.

Thank you in advance, Vladimir Lomov

-- 
Trying to define yourself is like trying to bite your own teeth.
-- Alan Watts
___
If your question is of interest to others as well, please add an 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 table operation in lua-ConTeXt

2017-02-13 Thread Procházka Lukáš Ing .

Hello,

tables in Lua are "shared" - there is one copy until you "deep copy" one to 
another.

Se  comments bellow -

On Mon, 13 Feb 2017 06:50:38 +0100, Jeong Dal  wrote:


Dear all,

It may be a slight off topic.
In the following example, I copied a table “m” to “tempM”, and remove the last 
row of tempM.
Then the output is “ 2, 2”
I checked the contents of tempM and m and found that they are same even though 
I didn’t touch m.
I want to remove the last row of tempM while keeping the table m untouched.
Please tell me how to do it.

Thank you.
Best regards,

Dalyoung

\startbuffer[test]
\startluacode
 m = {{0, 2, 4},{2, 3 , 4}, {2, 2, -6}}
local tempM = {} -- OK, 'tempM' and 'm' are different tables - try 
'print(tempM, m)' - you'll get two addresses

tempM = m -- Now, 'tempM' and 'm' will point to the same table - "the 'm' table"

-- The original 'tempM' table will be forgotten and removed during next garbage 
collection as there is no other reference to it
-- ('tempM' starts pointing to 'm', too)

table.remove(tempM) -- Will remove from one
context(#tempM, “, ” , #m) -- Obviously - both table point to the same object, 
try again 'print(tempM, m)'
\stopluacode
\stopbuffer

\starttext
getbuffer[test]
\stoptext


Best regards,

Lukas


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

Tel: +420 241 096 751 (+420 720 951 172)
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] about table operation in lua-ConTeXt

2017-02-13 Thread Hans Hagen

On 2/13/2017 6:50 AM, Jeong Dal wrote:

Dear all,

It may be a slight off topic.
In the following example, I copied a table “m” to “tempM”, and remove the last 
row of tempM.
Then the output is “ 2, 2”
I checked the contents of tempM and m and found that they are same even though 
I didn’t touch m.
I want to remove the last row of tempM while keeping the table m untouched.
Please tell me how to do it.


\startbuffer[test]
\startluacode
local t1 = {{0, 2, 4},{2, 3 , 4}, {2, 2, -6}}
local t2 = t1 -- t2 points to t1
local t3 = table.copy(t1)

table.remove(t3)

context.tocontext(t1)
context.tocontext(t2)
context.tocontext(t3)

\stopluacode
\stopbuffer

\starttext
\getbuffer[test]
\stoptext




Thank you.
Best regards,

Dalyoung

\startbuffer[test]
\startluacode
 m = {{0, 2, 4},{2, 3 , 4}, {2, 2, -6}}
local tempM = {}

tempM = m
table.remove(tempM)
context(#tempM, “, ” , #m)
\stopluacode
\stopbuffer

\starttext
getbuffer[test]
\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
___




--

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

Re: [NTG-context] about table operation in lua-ConTeXt

2017-02-13 Thread Henri Menke
On 02/13/2017 06:50 AM, Jeong Dal wrote:
> Dear all,
> 
> It may be a slight off topic.
> In the following example, I copied a table “m” to “tempM”, and remove the 
> last row of tempM.
> Then the output is “ 2, 2”
> I checked the contents of tempM and m and found that they are same even 
> though I didn’t touch m.
> I want to remove the last row of tempM while keeping the table m untouched.
> Please tell me how to do it.
> 
> Thank you.
> Best regards,
> 
> Dalyoung
> 
> \startbuffer[test]
> \startluacode
>  m = {{0, 2, 4},{2, 3 , 4}, {2, 2, -6}}
> local tempM = {}
> 
> tempM = m

Do a deep copy
tempM = table.copy(m)

> table.remove(tempM)
> context(#tempM, “, ” , #m)
> \stopluacode
> \stopbuffer
> 
> \starttext
> getbuffer[test]
> \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
___