Re: [NTG-context] how to hyphenate SHA512?

2017-07-08 Thread josephcanedo
If I am not mistaken SHA is only hexadecimal digits, so you probably need only 
to have a « language » that hyphenates between any pair of those. Should be 
much simpler I guess, but I do not really know how to add such setting I am 
afraid.

Joseph

De : Pablo Rodriguez
Envoyé le :samedi 8 juillet 2017 08:56
À : ntg-context@ntg.nl
Objet :Re: [NTG-context] how to hyphenate SHA512?

Many thanks for your reply, Joseph.

The underscore I want to use should be placed below the previous
character, such as in (code from Hans):

\startluacode

function document.addfunnyhyphen(tfmdata)
local underscore = utf.byte("_")
local char   = tfmdata.characters[underscore]
if not char then return end
tfmdata.characters[0xFE000]   = {
width= 0,
height   = 0,
depth= 0,
commands = {
{ "right", -char.width },
{ "down", char.depth },
{ "slot", 1, underscore },
}
}
end


utilities.sequencers.appendaction("aftercopyingcharacters",
"after","document.addfunnyhyphen")

\stopluacode

\definehyphenationfeatures
[underscore]
[righthyphenchar="FE000]

\setuphyphenation
[method=traditional]

\sethyphenationfeatures
[underscore]
\starttext
\hsize\zeropoint

hyphenation
\stoptext

Is there no way to define a language that hyphenates any pair of characters?

Many thanks for your help,

Pablo


On 07/07/2017 10:28 PM, josephcan...@gmail.com wrote:
> A probably quick and dirty « solution », which consists in inserting a
> \discretionary node between each digit using some lua code. There are
> mostly likely better solutions for this.
> 
> Joseph
> 
> \startluacode
> 
> function sha(s)
>local out = {}
>for i = 1, s:len() do
>   out[#out + 1] = s:sub(i, i)
>end
>context(table.concat(out, '\\discretionary{_}{}{}'))
> end
> 
> \stopluacode
> 
> \starttext
> 
> \hyphenation
>  
> \ctxlua{sha([[8b2f3c087046c3943ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845cc257a410ab1b914bc399b4293f31c76fc2c73e5be5ea4d329f9e6820984688efec2]])}
> 
> \stoptext
>  
> 
> *De : *Pablo Rodriguez 
> *Envoyé le :*jeudi 6 juillet 2017 12:00
> *À : *mailing list for ConTeXt users 
> *Objet :*[NTG-context] how to hyphenate SHA512?
> 
> Dear list,
> 
> I have the following sample:
> 
> \starttext
> \hsize\zeropoint
> hyphenation
> 
> 8b2f3c087046c3943ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845cc25%
> 7a410ab1b914bc399b4293f31c76fc2c73e5be5ea4d329f9e6820984688efec2
> \stoptext
> 
> I plan to use underscore hyphenation. How can I get the SHA512 string
> hyphenated in any of its points?
> 
> 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
___

___
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 hyphenate SHA512?

2017-07-07 Thread josephcanedo
A probably quick and dirty « solution », which consists in inserting a 
\discretionary node between each digit using some lua code. There are mostly 
likely better solutions for this.
Joseph

\startluacode

function sha(s)
   local out = {}
   for i = 1, s:len() do
  out[#out + 1] = s:sub(i, i)
   end
   context(table.concat(out, '\\discretionary{_}{}{}'))
end

\stopluacode

\starttext
% \hsize\zeropoint
\hyphenation

%%8b2f3c087046c3943ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845cc25%
%%7a410ab1b914bc399b4293f31c76fc2c73e5be5ea4d329f9e6820984688efec2

\ctxlua{sha([[8b2f3c087046c3943ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845cc257a410ab1b914bc399b4293f31c76fc2c73e5be5ea4d329f9e6820984688efec2]])}

\stoptext


De : Pablo Rodriguez
Envoyé le :jeudi 6 juillet 2017 12:00
À : mailing list for ConTeXt users
Objet :[NTG-context] how to hyphenate SHA512?

Dear list,

I have the following sample:

\starttext
\hsize\zeropoint
hyphenation

8b2f3c087046c3943ace0dc4f958ef2138e58a51b40eef6fab6fa1aeb845cc25%
7a410ab1b914bc399b4293f31c76fc2c73e5be5ea4d329f9e6820984688efec2
\stoptext

I plan to use underscore hyphenation. How can I get the SHA512 string
hyphenated in any of its points?

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
___

___
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 use tex.print in ctxlua

2017-03-19 Thread josephcanedo
Hi,

I think you can use tex.write() instead of tex.print() (pretty much the same as 
in lua io functions).
Hope this helps

Joseph

De : Otared Kavian
Envoyé le :dimanche 19 mars 2017 16:31
À : mailing list for ConTeXt users
Objet :[NTG-context] How to use tex.print in ctxlua

Hi,

I would like to print in a text the values of a array computed in a  
\startluacode …. \stopluacode combination.
How can I do it properly? Please have a look at the example below and its 
output, which is not satisfactory because the right parenthesis is separated 
from the number by a space. How can I suppress this unwanted space? 
For instance I get (1, 103 ) instead of (1, 103).

Thanks in advance for any help,
Best regards: OK

%%% begin ctxlua-print.tex
\starttext
\startluacode
n = 6 ;
vecteurX = {} ;
for i = 1,n do
vecteurX[i] = i ;
end
vecteurY = {} ;
for i = 1,n do
vecteurY[i] = 3*vecteurX[i] + 100 ;
end
for i = 1,n do
context("(") 
tex.print(vecteurX[i]) 
context(", ") 
tex.print(vecteurY[i])
tex.print(")")
context.par()
end
\stopluacode
\stoptext
%%% begin ctxlua-print.tex


___
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] Question on "back" key in \blank

2017-02-26 Thread josephcanedo
Thanks Hans for having replied.

My message was a bit confusing, sorry about that. I think the problem is that 
‘back’ (or \blank generally) does not seem to work the same with negative blank 
as it does with positive blank. The following :

\showgrid\setuplayout[grid=both]
\starttext
Title.
\blank[2*line]\blank[back]\blank[line]
Line.
\stoptext

Outputs 1 blank line between Title and Line, so that \blank[2*line] is 
effectively ignored, as expected. But

\showgrid\setuplayout[grid=both]
\starttext
Title.
\blank[2*line]\blank[back]\blank[-line]
Line.
\stoptext

Outputs Title and Line in 2 consecutive lines (instead of being on same line). 
So \blank[2*lines] is effectively ignored as expected but the \blank[-line] is 
also ignored too. Is the latter expected or not ?

Thanks again,
Best regards

Joseph

De : Hans Hagen
Envoyé le :samedi 25 février 2017 21:53
À : ntg-context@ntg.nl
Objet :Re: [NTG-context] Question on "back" key in \blank

On 2/25/2017 7:04 PM, josephcan...@gmail.com wrote:
> Dear list,
>
>
>
> Sorry if question is trivial but I’d like to use « back » key in \blank
> to discard a \blank just before. The following MWE illustrates :
>
>

it goes back when there's something to go back

there is also \blank[disable] to disable the next one

> \starttext
>
>
>
> Title.
>
> \blank[none]
>
> \blank[back, -line] %% I’d expect this one to discard the \blank[none]
> (as if it was not present)
>
> \startalignment[broad, flushright, hanging]Right.\stopalignment
>
>
>
> \stoptext
>
>
>
> I’d expect that Title and Right words to be on the same line, but they
> are not. Did I misunderstood the meaning of ‘back’ key ?
>
> Thanks a lot for help and time,
>
>
>
> Best regards
>
>
>
> Joseph Canedo
>
>
>
>
>
>
>
> ___
> 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
___

___
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] Question on "back" key in \blank

2017-02-25 Thread josephcanedo
Dear list,

Sorry if question is trivial but I’d like to use « back » key in \blank to 
discard a \blank just before. The following MWE illustrates :

\starttext

Title.
\blank[none]
\blank[back, -line] %% I’d expect this one to discard the \blank[none] (as if 
it was not present)
\startalignment[broad, flushright, hanging]Right.\stopalignment

\stoptext

I’d expect that Title and Right words to be on the same line, but they are not. 
Did I misunderstood the meaning of ‘back’ key ? 
Thanks a lot for help and time,

Best regards

Joseph Canedo


___
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] Underful with \startalignment[flushright]

2017-02-21 Thread josephcanedo
Thanks a lot, all, for the hints.
Best regards,
Joseph

De : Hans Hagen
Envoyé le :mardi 21 février 2017 13:06
À : mailing list for ConTeXt users
Objet :Re: [NTG-context] Underful with \startalignment[flushright]

On 2/21/2017 10:45 AM, Henri Menke wrote:
> On 02/20/2017 10:59 PM, josephcan...@gmail.com wrote:
>> Dear list,
>>
>>
>>
>> Could not find any hint on this list on this (minor) problem.
>>
>> When compiling the following simple MWE :
>>
>>
>>
>> \starttext
>>
>> \startalignment[flushright]
>>
>> Foo.
>>
>> \stopalignment
>>
>> \stoptext
>>
>>
>>
>> I get an underful hbox message :
>>
>>
>>
>> Underfull \hbox (badness 1) in paragraph at lines 4--5
>>
>> []\3>modern-designsize-12pt-rm-tf-0--0 Foo.
>>
>>
>>
>> Is there a simple way to avoid the underful message (other than adding a 
>> \hfil before the text) ?
>>
>>
>>
>> \starttext
>>
>> \startalignment[flushright]
>
> \startalignment[flushright,broad]

\dontcomplain also helps but it also hides the possible problem

>>
>> \hfil Foo.
>>
>> \stopalignment
>>
>> \stoptext
>>
>>
>>
>>
>>
>> Many thanks
>>
>>
>>
>> Best regards
>>
>>
>>
>> Joseph Canedo
>>
>>
>>
>>
>>
>> ___
>> 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
> ___
>


-- 

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

[NTG-context] Underful with \startalignment[flushright]

2017-02-20 Thread josephcanedo
Dear list,

Could not find any hint on this list on this (minor) problem.
When compiling the following simple MWE :

\starttext
\startalignment[flushright]
Foo.
\stopalignment
\stoptext

I get an underful hbox message :

Underfull \hbox (badness 1) in paragraph at lines 4--5
 []\3>modern-designsize-12pt-rm-tf-0--0 Foo.

Is there a simple way to avoid the underful message (other than adding a \hfil 
before the text) ? 

\starttext
\startalignment[flushright]
\hfil Foo.
\stopalignment
\stoptext


Many thanks 

Best regards

Joseph Canedo

___
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] Comical error..

2017-02-12 Thread josephcanedo
Re question 2. You can have the list of loaded fonts files from the log file 
produced by context command, nearly the end :

For example from my run :

mkiv lua stats  > loaded fonts: 4 files: dejavusansmono.ttf, 
ebgaramond12-regular.otf, keteryg-medium.ttf, sblgreek.ttf

>From this you can deduce most probably the font file format. 

Please use : 

mtxrun  --script fonts 

To get more information on fonts database context uses.

Hope this helps a bit.
Best

Joseph

De : John Culleton
Envoyé le :dimanche 12 février 2017 03:41
À : ntg-context@ntg.nl
Objet :Re: [NTG-context] Comical error..

On Sat, 11 Feb 2017 21:08:46 +0100
Here is another example from the Wiki
-
 \definefontfamily
[mainface]
[rm]
[TeX Gyre Pagella]
[it={TeX Gyre Cursor-Italic},
 bf={TeX Gyre Adventor-Bold},
 bi={TeX Gyre Termes-BoldItalic}]

\setupbodyfontenvironment
[default]
[em=italic]

\setupbodyfont[mainface]
\starttext
\startTEXpage[offset=1em]
Roman font {\em italic}

\bf Bold font \em bold italic
\stopTEXpage
\stoptext
---
and another
--
setupbodyfont[dejavu]

\setupbodyfontenvironment
 [default]
 [smallsized=1.25,
  mediumsized=1.5,
  largesized=2.0]

\definefontsize[smallsized]
\definefontsize[mediumsized]
\definefontsize[largesized]

\starttext

\setuphead[chapter]   [style=\bflargesized]
\setuphead[section]   [style=\bfmediumsized]
\setuphead[subsection][style=\bfsmallsized]

\chapter   {Whatever $x-1$}
\section   {Whatever $x-1$}
\subsection{Whatever $x-1$}

\input ward
\blank
Whatever $x-1$
\blank

{\itmediumsized This is italic medium sized. $\cos(x) = {\rm
Re}(\exp({\rm i}x))$}

\blank

{\rmmediumsized This is roman medium sized. \crlf
$\cos(x) = {\rm Re}(\exp({\rm i}x))$}

\stoptext

--
Some questions:
1. Where is the basic size of the font family defined in points?
2. In the second example which of the many Dejavu fonts is assumed to
be the starting point? Is it a ttf or a otf version?
3. Can any font family on the system be used or is there a specific
context list?

All answers appreciated of course :<)

 John Culleton
Wexfordpress
Book design and indexing.

___
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] Hanging hyphen in the left margin in Portuguese

2016-10-18 Thread josephcanedo
Hello Marcus

This answer might help : 
http://www.mail-archive.com/ntg-context@ntg.nl/msg59507.html
A bit hard to find as the word used is « potrusion ».
Hope this helps

Best

Joseph


De : Marcus Vinicius Mesquita
Envoyé le :lundi 17 octobre 2016 21:17
À : mailing list for ConTeXt users
Objet :[NTG-context] Hanging hyphen in the left margin in Portuguese

Dear list,

In Portuguese many times we have words with one or two explicit hyphens; for 
example: “tornar-nos-emos” (we shall become). When at the end of a line, it
is mandatory to repeat the explicit hyphen both at the end and in the beginning 
of the next line. I managed to do this using:

\definebreakpoints[portuguese]
\definebreakpoint [portuguese] [-] [type=5,left=-,right=-,middle=-]
\setbreakpoints[portuguese]

If I use
\setupalign[hz,hanging]
I get the first hyphen hanging in the right margin.

My question is: How do I manage to have the second hyphen in the beginning of 
the new line also hanging to the left in the left margin?

TIA

Marcus Vinicius

___
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] Issue with \blank halfline and title heads

2016-10-16 Thread josephcanedo
Dear list,

I would like to have a chapter title consisting of 1 line, halfline spacing, 
another set of lines, and another halfline spacing (I use grid=both but same 
issue with grid=yes), but I fail to acheive this. I give a simple MWE that 
shows wanted effect (without heading) which works all fine, followed by sample 
chapter which shows that ‘E’ is above the grid base line (added \showgrid to 
make it visible). Do I need to put the title content in some box ?

Thanks a lot for any hint,
Best regards

Joseph

\showgrid\showstruts
\setuplayout[grid=both]

\definehead[Chapter][subsection]
\setuphead[Chapter][number=no, align=center, style=\tf, before={\blank[none]}, 
after={\blank[none]}, grid=both]

\starttext
\startalignment[center]
\strut E\blank[halfline]A\strut\blank[halfline]
\stopalignment

Paragraph text.

\blank[line]

\startChapter[title={\strut E\blank[halfline]A\strut\blank[halfline]}]

Paragraph text.

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

Re: [NTG-context] Changes in hyphenations with 2016-10-12 beta

2016-10-13 Thread josephcanedo
Great, thanks a lot Hans. Not a big issue (some glues are bit more stretched 
than before here and there, but not to the point to have underfulls), but 
curious to understand.
Best regards

Joseph

De : Hans Hagen
Envoyé le :jeudi 13 octobre 2016 20:51
À : mailing list for ConTeXt users
Objet :Re: [NTG-context] Changes in hyphenations with 2016-10-12 beta

On 10/13/2016 7:37 PM, Pablo Rodriguez wrote:
> On 10/13/2016 11:56 AM, josephcan...@gmail.com wrote:
>> Apparently this difference comes from this change in font-ots.lua near
>> line 603. If I edit the file to put back the discretionary_code
>> argument, the output is same with new beta.
>
> Hi Joseph,
>
> French hyphenation is unknown to me, but I have a different approach.

When messing with disc nodes one can argue if some of then need to 
become discretionary nodes or keep their other type. This change keeps 
it more original (of course one can  argue about it) which has some 
consequence for the number of passes that tex makes (pass without 
hyphenation, pass with hyphenation, pass with hyphenation and stretch)

i plan to makes things a bit more configureable in the alternative 
hyphenator

one can also argue that the first pass can be omitted (i.e. always go 
for the best solution)

>> MWE (well as close to MWE I could write, requires EBGaramond unfortunately).
>>
>> \language[fr]
>
> The document main language is invoked in ConTeXt with:
>
> \mainlanguage[fr]
>
>> \setupalign[hanging, lesshyphenation, hz]
>
> I suspect that if you ask for less hyphenation, you get it.
>
> See my sample:
>
> \mainlanguage[fr]
> \setupalign[lesshyphenation]
> \starttext
> \hyphenatedword{T advint qu'il y eut famine au pays/ oultre la
> premiere famine/ qui fut au temps de Abraham. Et Izahak s'en alla
> vers Abimelech Roy des Philisthins en Gerar}
> \stoptext
>
> \hyphenatedword is your friend here. I get different results if I
> comment the second line (to get normal hyphenation).
>
> I wonder whether this might be causing the issue you’re experiencing.
>
> Just in case it helps,
>
>
> Pablo
>


-- 

-
   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  : 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] Changes in hyphenations with 2016-10-12 beta

2016-10-13 Thread josephcanedo
Apparently this difference comes from this change in font-ots.lua near line 
603. If I edit the file to put back the discretionary_code argument, the output 
is same with new beta.

MWE (well as close to MWE I could write, requires EBGaramond unfortunately).

\language[fr]
\definefontfeature[feat][
  mode=node, ccmp=yes, calt=yes,
  liga=yes, dlig=yes, hlig=yes,
  kern=yes, mark=yes, mkmk=yes,
  onum=yes, pnum=yes, salt=yes,
  script=latn, trep=yes,
  dlig=yes, cv91=yes, ss05=no,
  protrusion=quality, expansion=quality]

\definefontfamily[mainfont][serif][EBGaramond][features=feat]
\setupbodyfont[mainfont, 9pt]

\setupalign[hanging, lesshyphenation, hz]

\starttext

\setbox\scratchbox\vbox{\hsize=8.43cm
T advint qu'il y eut famine au pays/ oultre la premiere famine/ qui fut
 au temps de Abraham. Et Izahak s'en alla vers Abimelech 
Roy des Philisthins en Gerar}\box\scratchbox

\stoptext

De : josephcan...@gmail.com
Envoyé le :jeudi 13 octobre 2016 10:17
À : mailing list for ConTeXt users
Objet :Changes in hyphenations with 2016-10-12 beta

Dear list,

After ugrading to latest beta (to test typesetting with it for now), I noticed 
that some words that used to be hyphenated with previous versions are no longer 
hyphenated in the output, especially when the word break used to happen at a 
ligature (for example ‘st’ or ‘ct’).

I had a quick look to the différences in files in 
tex/texmf-context/tex/context/base directory and I see some changes to font 
handling. 

Is this expected ? Or is there any mechanism to get the old behaviour ? I’ll 
try to build a MWE to show this if that’s required.

Thanks a lot,

Best regards

Joseph Canedo




new.pdf
Description: Adobe PDF document


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

[NTG-context] Changes in hyphenations with 2016-10-12 beta

2016-10-13 Thread josephcanedo
Dear list,

After ugrading to latest beta (to test typesetting with it for now), I noticed 
that some words that used to be hyphenated with previous versions are no longer 
hyphenated in the output, especially when the word break used to happen at a 
ligature (for example ‘st’ or ‘ct’).

I had a quick look to the différences in files in 
tex/texmf-context/tex/context/base directory and I see some changes to font 
handling. 

Is this expected ? Or is there any mechanism to get the old behaviour ? I’ll 
try to build a MWE to show this if that’s required.

Thanks a lot,

Best regards

Joseph Canedo

___
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] \blank[force, halfline] at top page issue

2016-10-01 Thread josephcanedo
Tried the following putting a \vbox before the \blank. There is probably better 
solution for this.

\setuplayout[grid=both]
\showgrid
\starttext
\endgraf\vbox to \lineheight{}\blank[samepage, -halfline]
HalfLine
\blank[halfline]
Text
\page
Text
\endgraf\vbox to \lineheight{}\blank[samepage, -halfline]
HalfLine
\blank[halfline]
Text
\stoptext

De : Marcus Vinicius Mesquita
Envoyé le :vendredi 30 septembre 2016 23:08
À : mailing list for ConTeXt users
Objet :Re: [NTG-context] \blank[force, halfline] at top page issue

Try

\blank[force,halfline,depth]


___
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] \blank[force, halfline] at top page issue

2016-09-30 Thread josephcanedo
Hi Marcus, 

Thanks for the tip, somewhat better in terms of alignment to the grid (but 
there is now larger space before exactly 1 line in excess). Unfortunately if 
the \blank[force, halfine, depth] is not first in page the vertical alignment 
is now wrong, and I do not know if a given \blank will be first or not in the 
page.

Best regards

Joseph Canedo

De : Marcus Vinicius Mesquita
Envoyé le :vendredi 30 septembre 2016 23:08
À : mailing list for ConTeXt users
Objet :Re: [NTG-context] \blank[force, halfline] at top page issue

Try

\blank[force,halfline,depth]


___
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] \blank[force, halfline] at top page issue

2016-09-29 Thread josephcanedo
Dear list,

I think this issue has been already reported (or a similar one 
http://www.mail-archive.com/ntg-context@ntg.nl/msg77729.html) but not resolved.
It seems that if \blank[force, etc … is first in page there is additional 
spacing due to topskip. I’ve checked that this unwanted spacing disappears if 
topskip is set to 0, but I doubt it’s really good idea to mess up with this low 
level TeX setting (or is it good idea ?).

Moreover browsing the spac-ver.* files I noticed the existence of a no_topskip 
mechanism which I guess would allow to remove (in lua code) the topskip glue 
node but there is no way to enable this from \blank command or at least could 
not figure it out. Is there an easy way to enable this no topskip feature ? 
Alternative I found is to use a \vbox etc… but wondered if there were some 
simpler way using \blank.

Thanks,
Best regards

Joseph Canedo

MWE :

\setuplayout[grid=both] % not really needed 
\showgrid

\starttext

\blank[force, halfline]
HalfLine
\blank[halfline]

Text

\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] Size of the last shipped page by Lua?

2016-09-07 Thread josephcanedo
Hi,

There are dimensions related to this :

local paper_width = tex.getdimen('paperwidth')
local paper_height = tex.getdimen('paperheight')

There is also :

tex.pageheight
tex.pagewidth 

Not sure these are always same. Hope this helps,

Regards,

Joseph Canedo

De : Procházka Lukáš Ing.___
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 latest beta?

2016-09-05 Thread josephcanedo
Dear all,

Sounds like  a typo in file 
tex/texmf-context/tex/context/base/mkiv/node-nut.lua line 238

find_tail should be findtail I think.

BTW this new rangedimension function is helpful.

Joseph

De : Pablo Rodriguez___
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] Detecting content out of print/page area ?

2016-08-18 Thread josephcanedo
Dear all,

I was wondering if there were any sort of tool (beyond manual eye inspection) 
in general sense, either printing some warning in log file, or visually in 
output document, or even reading pdf file, that would help determining if for a 
some page there is content that is typeset outside (partially or even worse 
totally) the print/page area. 

If not, could the approach of using a lua function to inspect nodes after 
shipouts task could possibly work (although not very easy to implement maybe) :

local report_check = logs.reporter("user", "check")

function userdata.page_check(head)
   local realpage = tex.getcount('realpageno')
   report_check('Page ' .. realpage)
   -- TODO: code to check stuff is inside print area
   return head, false
end

tasks.appendaction("shipouts", "after", "userdata.page_check")
tasks.enableaction("shipouts", "userdata.page_check")

Many thanks

Best regards

Joseph Canedo

___
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] Tight interline spacing in margin notes ?

2016-08-11 Thread josephcanedo
Dear all,

I use grid to typeset documents, this works all fine in main text, but in 
margin notes it does not seem that interline spacing is as tight. Is there any 
way to get tighter interline spacing in margin notes too ? 

Following simple MWE illustrates the situation

\setuplayout[grid=both]
\setupmargindata[outer][style=\tf]

\starttext

Foo\\
{\tfb Foo} Bar \inouter{Foo\\ {\tfb Foo}\\ Bar}Baz\\
Foo

\stoptext

This is a non sensible MWE where the \tfb here replaces another font with a bit 
taller letters (Hebrew Lamed to name). I tried \smash around these, which works 
but wondered if there was some other solution without using non zero height 
hbox. Also I’d like to avoid to increase the interline spacing if possible.

Thanks a lot for any hint
Best regards

Joseph Canedo
___
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 hyphenation when using patterns={fr,agr}

2016-08-09 Thread josephcanedo
Dear all,

Combining patterns for french and ancien greek languages, I noticed there are 
wrong hyphenations at quote char as shown in following MWE.
Is this expected behavior by using the patterns= key in such a way ?

Using ConTeXt  ver: 2016.08.08 21:28 MKIV beta  fmt: 2016.8.9  int: 
english/English



\setuplanguage[fr][patterns={fr, agr}]
\mainlanguage[fr]

\starttext

\hyphenatedword{l'homme}

\stoptext

-

The above prints : l’-homme

If so, what is the alternative to specify hyphenation in a text containing both 
french and ancient greek (the minority) words.

Thanks a lot for advising,
Best regards

Joseph Canedo

___
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] emergency stretch not taken in account in some cases

2016-07-20 Thread josephcanedo
I think I could figure out the reason of this problem. Actually emergency 
stretch is broken in all cases it seems. In luatex source code I see:


source/texk/web2c/luatexdir/tex/commands.w:primitive_tex("emergencystretch",
 assign_dimen_cmd, dimen_base + emergency_stretch_code, dimen_base);


source/texk/web2c/luatexdir/tex/equivalents.h:#define emergency_stretch_par
 glue_par(emergency_stretch_code)


source/texk/web2c/luatexdir/tex/equivalents.h:#  define glue_par(A)  
equiv(glue_base+(A))


I could be wrong but to me it seems we assign some value to emergency stretch 
“variable” setting using “emergencystretch” command and we use another via 
emergency_stretch_par.


Unfortunately I am not able to build luatex locally on Windows Platform, only 
sync code from SVN repository.


Thanks a lot,


Joseph Canedo





From: schuster.wolfg...@gmail.com
Sent: ‎Tuesday‎, ‎July‎ ‎19‎, ‎2016 ‎12‎:‎10‎ ‎AM
To: ntg-context@ntg.nl








josephcan...@gmail.com

18. Juli 2016 um 23:21


Dear all,




In some cases specifying \setupalign[stretch] does not seem to have any effect 
with latest betas (live, 2016.06.20 22:14 version are fine, but 2016.07.18 is 
not), and the output has now overfulls instead of (admitedly a bit large) 
underfulls.




Attached  simple (albeit bit extreme) MWE. Sorry for the relatively large MWE 
but could not figure out how to make it shorter.




emergency_stretch.pdf produced with latest beta (updated with first-setup.bat 
today).

emergency_stretch_ok.pdf produced with 2016.06.20 22:14 version.
I can’t reproduce your problem but justified text isn’t the best option in 
narrow columns.

Below is a simplified version of your code which doesn’t use the parent setting 
from margindata and marginframed setups, there is also no need to set the 
alignment twice and marginframed has no method key (the source is wrong).

\definemargindata
  [InOuter]
  [method=first,
   location=outer,
   margin=margin,
   width=\outermarginwidth,
   style=\tf,
   stack=continue,
   align={normal,hanging,morehyphenation,hz,verytolerant,stretch}]

\definemargindata
  [InInner]
  [method=first,
   location=inner,
   margin=margin, 
   width=\innermarginwidth,
   style=\tf,
   align=outer]

\definemarginframed[InOuter]
\definemarginframed[InInner]

%\setuplayout[width=12cm,rightmargin=4cm]

\starttext

Foo \InOuter{\input knuth } Bar.

\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] emergency stretch not taken in account in some cases

2016-07-19 Thread josephcanedo
Thanks a lot Wolfgang for the simpler code, I’ll replace mine with your 
suggestion, in actual document the margins width are much larger and font 
smaller too.

I use binaries on Win64 platform (installed using command line method: 
first-setup.bat --modules=all):


$ ls -l $(which luatex.dll)
-rwxr-xr-x 1 Jo Administrateurs 9567232 Jul 11 22:29 
/c/ConTeXt/test/tex/texmf-win64/bin/luatex.dll 


$ luatex --version
This is LuaTeX, Version 0.97.0 (TeX Live 2016/W32TeX)


$ context --version
mtx-context | current version: 2016.07.18 16:46





From: schuster.wolfg...@gmail.com
Sent: ‎Tuesday‎, ‎July‎ ‎19‎, ‎2016 ‎12‎:‎10‎ ‎AM
To: ntg-context@ntg.nl








josephcan...@gmail.com

18. Juli 2016 um 23:21


Dear all,




In some cases specifying \setupalign[stretch] does not seem to have any effect 
with latest betas (live, 2016.06.20 22:14 version are fine, but 2016.07.18 is 
not), and the output has now overfulls instead of (admitedly a bit large) 
underfulls.




Attached  simple (albeit bit extreme) MWE. Sorry for the relatively large MWE 
but could not figure out how to make it shorter.




emergency_stretch.pdf produced with latest beta (updated with first-setup.bat 
today).

emergency_stretch_ok.pdf produced with 2016.06.20 22:14 version.
I can’t reproduce your problem but justified text isn’t the best option in 
narrow columns.

Below is a simplified version of your code which doesn’t use the parent setting 
from margindata and marginframed setups, there is also no need to set the 
alignment twice and marginframed has no method key (the source is wrong).

\definemargindata
  [InOuter]
  [method=first,
   location=outer,
   margin=margin,
   width=\outermarginwidth,
   style=\tf,
   stack=continue,
   align={normal,hanging,morehyphenation,hz,verytolerant,stretch}]

\definemargindata
  [InInner]
  [method=first,
   location=inner,
   margin=margin, 
   width=\innermarginwidth,
   style=\tf,
   align=outer]

\definemarginframed[InOuter]
\definemarginframed[InInner]

%\setuplayout[width=12cm,rightmargin=4cm]

\starttext

Foo \InOuter{\input knuth } Bar.

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

[NTG-context] emergency stretch not taken in account in some cases

2016-07-18 Thread josephcanedo
Dear all,


In some cases specifying \setupalign[stretch] does not seem to have any effect 
with latest betas (live, 2016.06.20 22:14 version are fine, but 2016.07.18 is 
not), and the output has now overfulls instead of (admitedly a bit large) 
underfulls.


Attached  simple (albeit bit extreme) MWE. Sorry for the relatively large MWE 
but could not figure out how to make it shorter.


emergency_stretch.pdf produced with latest beta (updated with first-setup.bat 
today).

emergency_stretch_ok.pdf produced with 2016.06.20 22:14 version.


Thanks a lot for any advise.


Best regards


Joseph Canedo

emergency_stretch.pdf
Description: emergency_stretch.pdf


emergency_stretch.tex
Description: emergency_stretch.tex


emergency_stretch_ok.pdf
Description: emergency_stretch_ok.pdf
___
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] 10th ConTeXt meeting update

2016-07-11 Thread josephcanedo
Hi Taco,




I will not be able to go to the Netherlands to assist to these meetings, but it 
is planned to put information, articles on the different presentations please ? 
Especially interested in TUC related one, and for the sake of curiosity about 
the “Snake” justification (wondering if such technique would be usable for 
vertical justification (to add aornments at the end of a page, when there is 
some space due to page break) ?


Many thanks




Best regards


Joseph






From: Taco Hoekwater
Sent: ‎Monday‎, ‎July‎ ‎11‎, ‎2016 ‎12‎:‎02‎ ‎PM
To: ntg-context@ntg.nl





Hi all,


It is high time I sent out some news about the next ConTeXt meeting.

First off, the deadline for early bird payment happened in the middle of my 
vacation. An unfortunate side-effect: I completely forgot to send out a 
reminder to the list! Bad me! 

To make it up to you, we will allow an extra few days of early bird 
registration. All registrations done during the current week will still be 
considered ‘early’, as long as the bank transfer happens at the same time. The 
new cut-off date is therefore Sunday July 17 (I have no desire to update the 
web pages with the new deadline, so just ignore the July 1st date given there).

After that embarrassing disclosure, here is the other information I wanted to 
share:

* As noted before, the meeting will be held in Kalenberg, The Netherlands, from 
Sunday September 25 until Saturday October 1, 2016. Sunday Sep 25 and Saturday 
Oct 1 are the arrival/departure days, the actual meeting will be from Monday to 
Friday.

* The theme of the meeting is “Piece of Cake”

* We have a lot to celebrate: 10 years of meetings, 20 years of ConTeXt 
availability, and 30 years of Pragma ADE.

* The website is here:  http://meeting.contextgarden.net/2016

* The abstracts page has been updated with a dozen or so abstracts provided by 
Hans. Some of those are marked optional, which means the talk may be cancelled 
if there is not enough room in the final program. That is, unless there is 
popular demand. Have a look and see if something catches your interest!

* As always, we are looking for more presentation submissions. Please have pity 
on Hans’ vocal cords and consider giving a talk!

* Those of you who are known participants should have received a welcome 
message from the participants mailing list by now. If you did not get that 
message, something could have gone wrong with your registration, so please 
contact me in that case.


Hoping to see many of you this autumn,

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
___

Re: [NTG-context] Issue with tex.Jhangindent with latest beta 2016-07-08 17:24

2016-07-10 Thread josephcanedo
Thanks a lot Hans.





From: pra...@wxs.nl
Sent: ‎Sunday‎, ‎July‎ ‎10‎, ‎2016 ‎12‎:‎21‎ ‎PM
To: ntg-context@ntg.nl





On 7/9/2016 11:19 PM, josephcan...@gmail.com wrote:
> Dear list,
>
> In some lua code I have in my project, I’ve started getting this error
> when upgrading to latest beta (used to work fine for lots of versions
> for months) :
>
> attempt to perform arithmetic on field 'hangindent' (a nil value)
>
> when using expression: tex.hangindent in lua code.
>
> I am quite sure hangindent is not zero for this paragraph (on purpose).
> Is there a change in way to access hangindent value for a paragraph ?

fixed in next binary


-
   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] Issue with tex.hangindent with latest beta 2016-07-08 17:24

2016-07-09 Thread josephcanedo
Dear list,


In some lua code I have in my project, I’ve started getting this error when 
upgrading to latest beta (used to work fine for lots of versions for months) :


attempt to perform arithmetic on field 'hangindent' (a nil value)


when using expression: tex.hangindent in lua code.


I am quite sure hangindent is not zero for this paragraph (on purpose). Is 
there a change in way to access hangindent value for a paragraph ?


Many thanks


Best regards


Joseph Canedo___
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] disappearing margin text

2016-06-23 Thread josephcanedo
Hi, have you tried putting the \inmargin Inside before= in defineenumeration ? 
Seems to work fine (assuming you want the marginal note on same line as 
question.


Joseph


\defineblock[question]
\hideblocks[question]   


\defineenumeration
[question]
[text=Question, before=\inmargin{margin}] %%
 
\setupblock[question][before=\startquestion,after=\stopquestion]


\setupinmargin[stack=continue]


\starttext


\beginquestion
Text
\endquestion



\beginquestion
Text
\endquestion


\useblocks[question]


\stoptext







Sent from Windows Mail





From: Jan Willem Flamma
Sent: ‎Wednesday‎, ‎June‎ ‎22‎, ‎2016 ‎3‎:‎17‎ ‎PM
To: ntg-context@ntg.nl





Thanks for your reply Marco.

Indeed using different margin text I now see they are overlaid. Using your 
suggestion adds the margin text from Question 2 just underneath the margin text 
from Question 1. 

I would like to position it next to Question 2 because I would like to use this 
feature to indicate question categories.

Regards,
Jan Willem



> On 22 jun. 2016, at 11:52, Jan Willem Flamma  wrote:
> 
> Dear list members
> 
> In the following MWE, the margin text appears at question 1 but not at 
> question 2.
> 
> How is this possible?
> 
> Kind regards,
> Jan Willem
> 
> 
> MWE:
> \defineblock[question]
> \hideblocks[question] 
> 
> \defineenumeration
>[question]
>[text=Question]
> 
> \setupblock[question][before=\startquestion,after=\stopquestion]
> 
> 
> \starttext
> 
> \inmargin{margin}
> \beginquestion
> Text
> \endquestion
> 
> \inmargin{margin}
> \beginquestion
> Text
> \endquestion
> 
> \useblocks[question]
> 
> \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
__
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] Simple font size changes command

2016-06-13 Thread josephcanedo
It is (very) limited to few words only to reproduce how an old Bible I am 
trying to typeset  (words added in the text to ease the understand were printed 
in smaller size).


Thanks a lot

Regards


Joseph





From: Alan BRASLAU
Sent: ‎Monday‎, ‎June‎ ‎13‎, ‎2016 ‎5‎:‎19‎ ‎AM
To: josephcan...@gmail.com
Cc: ntg-context@ntg.nl





On Sun, 12 Jun 2016 16:57:26 +
 wrote:

> I was also a bit surprised with \tf behaviour when used inside
> a scope of another one leading to 2 different sizes in output, as in
> 
> {\tfd Foo {\tfx Bar1}} {\tfx Bar2} Baz.
> 
> For the sake of knowledge I would be interested in knowing if this is
> expected eventually.

Yes, and this appears to me to be the most logical behavior.

By the way, the use of such "low-level" font changes is not very good
style in any case, and should be limited to special cases. In
particular, this will not export well in tagged output to xml, for
example, which is why I suggest the use of styles and "highlight".

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
___

Re: [NTG-context] Simple font size changes command

2016-06-12 Thread josephcanedo
Thanks Alan for the suggestion, I’ll try it. Doing more research I figured out 
that \definefont defined such simple command at the expense of eventually 
repeating the font name and features. 


\definefont[SmallFont][name:EBGaramond*base,xxicentury at \SmallFontSize]  % 
\SmallFont works


I was also a bit surprised with \tf behaviour when used inside a scope of 
another one leading to 2 different sizes in output, as in


{\tfd Foo {\tfx Bar1}} {\tfx Bar2} Baz.


For the sake of knowledge I would be interested in knowing if this is expected 
eventually. 


Thanks a lot


Joseph

 



From: Alan BRASLAU
Sent: ‎Sunday‎, ‎June‎ ‎12‎, ‎2016 ‎5‎:‎19‎ ‎PM
To: josephcan...@gmail.com
Cc: ntg-context@ntg.nl





On Thu, 9 Jun 2016 21:47:07 +
 wrote:

> Dear all,
> 
> 
> In a simple document using only 1 font but with different sizes what
> are the easiest switch commands to change font size locally ? I am
> aware of \tfa, \tfx etc …. but they do not seem to size in absolute
> size but rather relatively to current font size. In the following
> MWE :
> 
> 
> \starttext
> 
> 
> {\tfd Foo {\tfx Bar1}} {\tfx Bar2} Baz.
> 
> 
> \stoptext
> 
> 
> 
> Bar1 is typeset much larger than Bar2.
> 
> 
> I’d look to write something like but don’t know who to get \BigSize
> and \SmallSize defined (and have Bar1 and Bar2 of same size) :
> 
> 
> {\BigSize Foo {\SmallSize Bar1}} {\SmallSize Bar2} Baz. 
> 
> 
> Many thanks for any hint.

Perhaps (untested):

\definealternativestyle [BigFont] [{\setbodyfont [12pt]}]
\definealternativestyle [SmallFont] [{\setbodyfont [8pt]}]
\definehighlight [BigSize] [style=BigFont]
\definehighlight [SmallSize] [style=SmallFont]

\BigSize{Foo \SmallSize{Bar1}} \SmallSize{Bar2} Baz.___
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] Simple font size changes command

2016-06-09 Thread josephcanedo
Dear all,


In a simple document using only 1 font but with different sizes what are the 
easiest switch commands to change font size locally ? I am aware of \tfa, \tfx 
etc …. but they do not seem to size in absolute size but rather relatively to 
current font size. In the following MWE :


\starttext


{\tfd Foo {\tfx Bar1}} {\tfx Bar2} Baz.


\stoptext



Bar1 is typeset much larger than Bar2.


I’d look to write something like but don’t know who to get \BigSize and 
\SmallSize defined (and have Bar1 and Bar2 of same size) :


{\BigSize Foo {\SmallSize Bar1}} {\SmallSize Bar2} Baz. 


Many thanks for any hint.


Best regards


Joseph Canedo___
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] Package esvect and Context

2016-06-06 Thread josephcanedo
Hi Fabrice,


Have you tried \vec command ?


\startformula


\vec{AB} = \vec{AC} + \vec{CB}


\stopformula


Best regards


Joseph





From: Fabrice Couvreur
Sent: ‎Saturday‎, ‎June‎ ‎4‎, ‎2016 ‎9‎:‎12‎ ‎AM
To: ntg-context@ntg.nl





Hello everyone,
When I used LaTeX, I was writing the vectors with esvect package.
Is there an equivalent with Context ?
Fabrice

https://www.ctan.org/tex-archive/macros/latex/contrib/esvect/___
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] Allow for hyphenation in 'firstline' ConTeXt feature ?

2016-05-29 Thread josephcanedo
Yes, I probably should have written ‘Would it be time consuming etc… ?’ :-)

In any case, I had a try to the test file, and it works very well.


Thanks for your very swift reply.


Best regards


Joseph Canedo





From: pra...@wxs.nl
Sent: ‎Sunday‎, ‎May‎ ‎29‎, ‎2016 ‎5‎:‎18‎ ‎PM
To: ntg-context@ntg.nl





On 5/29/2016 11:40 AM, josephcan...@gmail.com wrote:
> Dear all,
>
> I use the nifty ‘firstline’ feature ConTeXt offers (using a larger font
> size, line mode, 1 line only) and I notice that the last word of the
> first line is never hyphenated even if doing so could reduce underful in
> the first line. From typo-fln.lua it looks like that’s expected as the
> decision to break the first line happens only at nodes which are not
> glyphs, disc_nodes or kern nodes. There is a comment saying it could be
> added some option to handle disc nodes. I’d be happy to add such option
> but do not have enough knowledge in nodes manipulation in luatex,
> especially those related to hyphenation. Would it be very difficult to
> add such option please ?

depends on what one finds 'difficult' ... by now i can probably do most 
i want at that level in which difficult is replace by 'just takes time'; 
also, one needs to keep in mind that trickery like this also needs to 
cooperate with other mechanisms

i'll send you a file to test (no beta as i'm cleaning up some display math)

> I post a MWE showing some extreme non real non sensible case, to double
> check that hyphenation is never performed.
>
> \definefirstline[FirstLine][alternative=line, style=\tfd] % exegerate size
>
> \starttext
>
> % exagerated case as MWE
>
> \setfirstline[FirstLine] A few words larger
> largestwordwordlongwordthatcouldbehyphenated bar bar.
> A few words larger largest word word foo bar word bar bar. A few words
> larger largest
> word word foo bar word bar bar. A few words larger largest word word foo
> bar word bar bar.
>
> \stoptext
>
> Thanks a lot,
>
> Best regards
>
> Joseph Canedo
>
>
>
> ___
> 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
> ___
>


-- 

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

[NTG-context] Allow for hyphenation in 'firstline' ConTeXt feature ?

2016-05-29 Thread josephcanedo
Dear all,


I use the nifty ‘firstline’ feature ConTeXt offers (using a larger font size, 
line mode, 1 line only) and I notice that the last word of the first line is 
never hyphenated even if doing so could reduce underful in the first line. From 
typo-fln.lua it looks like that’s expected as the decision to break the first 
line happens only at nodes which are not glyphs, disc_nodes or kern nodes. 
There is a comment saying it could be added some option to handle disc nodes. 
I’d be happy to add such option but do not have enough knowledge in nodes 
manipulation in luatex, especially those related to hyphenation. Would it be 
very difficult to add such option please ?


I post a MWE showing some extreme non real non sensible case, to double check 
that hyphenation is never performed.


\definefirstline[FirstLine][alternative=line, style=\tfd] % exegerate size


\starttext


% exagerated case as MWE


\setfirstline[FirstLine] A few words larger 
largestwordwordlongwordthatcouldbehyphenated bar bar. 
A few words larger largest word word foo bar word bar bar. A few words larger 
largest 
word word foo bar word bar bar. A few words larger largest word word foo bar 
word bar bar.


\stoptext



Thanks a lot,


Best regards


Joseph Canedo

test_firstline.pdf
Description: test_firstline.pdf
___
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] win64 : luatex is not recognize as an internal command

2016-05-24 Thread josephcanedo
Hello Jean Pierre,


Have you added C:\context\tex\texmf-win64\bin (or whatever dir you installed 
ConTeXt) directory to PATH env variable ? 

Best regards


Joseph Canedo





From: Jean-Pierre Delange
Sent: ‎Tuesday‎, ‎May‎ ‎24‎, ‎2016 ‎5‎:‎57‎ ‎PM
To: ntg-context@ntg.nl






Dear list,

I am currently testing and experimenting such things as a brand new 
installation (Context Process 0.63 2016.05.22 15:18) on a Windows x64 computer.
I have made a new installation of ConTeXt Standalone (with TeXWorks), 
downloading the *.zip file, etc.

1) Download the context-mswin.zip in C:\[...]\Documents;
2) mkdir 'context' => cd 'context'
3) Unzip it and launch context-setup.bat in the new C:\[...]Documents\context
4) Then, go to \context\tex and launch 'setuptex';
5) Then again, cd \context\tex\texmf-win64\bin and do : 'context --generate', 
and 'context --make'.

As a result, the compilation after context --generate is 0,988 s. (and much 
more than 1 sec with 'context --make' command, which needs usually more than 30 
sec. to compile) and after context --make I obtain a \dumpdump message with 
this cryptic sentence (in French) : 'luatex' is not recognized as an internal 
or external command, an executable program or a command file.

And when I try to do this :
\ starttext
\startsection[title={Testing ConTeXt}]
This is my {\em first} ConTeXt document.
\stopsection
\stoptext

Here is the result : mtx-context | fatal error: no return code, message: 
luatex: No such file or directory

I have missed something ... but what is it ?
I am deeply sorry to bother you with this question, but I don't clearly see 
when, where and what I have missed. Maybe I'm tired ...
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 with margin notes with stack=yes (or =continue)

2016-05-13 Thread josephcanedo
Dear all,


Sorry for replying to my own post, but is there a solution to fix this issue 
please ? Or any problem to reproduce it ? This makes the stacked margin notes 
almost unusable as with several ones one same page the last ones drift outside 
bottom of the page. 


Many thanks

Best regards


Joseph Canedo





From: josephcan...@gmail.com
Sent: ‎Friday‎, ‎May‎ ‎6‎, ‎2016 ‎6‎:‎49‎ ‎PM
To: ntg-context@ntg.nl





Dear all,




Using ConTeXt  ver: 2016.05.01 09:52 MKIV beta, I see that marginal notes 
(using \inouter for example) are put 1 or more lines below expected when using 
stack= option. A simple MWE follows.




\setupmargindata[outer][stack=yes] % or =continue
\starttext




Foo \inouter{note}*bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar 
Foo bar 
Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar 
Foo bar Foo bar Foo bar Foo bar Foo \inouter{note}*bar Foo bar Foo bar Foo bar 
Foo bar
Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar
Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo \inouter{note}*bar Foo bar 
Foo bar 




\stoptext





I’ve checked with ConTeXt Live that the problem does not happen on the current 
version of ConTeXt (marginal notes are on same line as the location in text).




Many thanks for advising,

Best regards




Joseph Canedo___
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] Issue with margin notes with stack=yes (or =continue)

2016-05-06 Thread josephcanedo
Dear all,


Using ConTeXt  ver: 2016.05.01 09:52 MKIV beta, I see that marginal notes 
(using \inouter for example) are put 1 or more lines below expected when using 
stack= option. A simple MWE follows.


\setupmargindata[outer][stack=yes] % or =continue
\starttext


Foo \inouter{note}*bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar 
Foo bar 
Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar 
Foo bar Foo bar Foo bar Foo bar Foo \inouter{note}*bar Foo bar Foo bar Foo bar 
Foo bar
Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar
Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo \inouter{note}*bar Foo bar 
Foo bar 


\stoptext



I’ve checked with ConTeXt Live that the problem does not happen on the current 
version of ConTeXt (marginal notes are on same line as the location in text).


Many thanks for advising,

Best regards


Joseph Canedo___
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] Are nested sections possible?

2016-03-11 Thread josephcanedo
Hello,


Normally for this purpose you’d use subsection, subsubsection etc … I guess.



Best regards


Joseph





From: m...@silentumbrella.com
Sent: ‎Friday‎, ‎March‎ ‎11‎, ‎2016 ‎9‎:‎08‎ ‎AM
To: ntg-context@ntg.nl





Greetings,

Is it possible to have

\starttext

\startchapter
Hey a chapter!
\startsection
something.one
\startsection
someting.one.one
\startsection
something.one.one.one
\stopsection
\stopsection
\stopsection


\stopchapter

\stoptext

render as:

1. Hey a chapter!
1.1 something.one
1.1.1 something.one.one
1.1.1.1 something.one.one.one

Thanks,
Mica

___
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 \inouter and text justification

2016-01-22 Thread josephcanedo
Dear list,


The problem with margin notes and main text justification being wrong in some 
lines when using stack=continue is still present with latest beta mtx-context   
  | current version: 2016.01.18 22:21 


This can be verified with the test stacking-002.tex in test suite or with MWE I 
posted earlier.


Just wanted to know if fixing this problem was planned for next “stable” 
version or if that feature is somewhat deprecated ? This problem does not occur 
with current “stable” ConTeXt version.


Many thanks for any hint,


Joseph





From: josephcan...@gmail.com
Sent: ‎Tuesday‎, ‎December‎ ‎15‎, ‎2015 ‎9‎:‎58‎ ‎PM
To: ntg-context@ntg.nl






Is this problem a hard limitation from (lua)TeX ? or simply some bug in ConTeXt 
?

The problem with main text justification is not present with “stable” version 
of ConTeXt, so my guess is that’s a regression in beta.




I initially used stack=yes but despite the name in some cases the notes fail to 
stack and overlapped. 




Thanks a lot,




Joseph





From: josephcan...@gmail.com
Sent: ‎Friday‎, ‎December‎ ‎11‎, ‎2015 ‎9‎:‎03‎ ‎PM
To: ntg-context@ntg.nl





Thanks Wolfgang for alternative proposal.

I had a try with your sample and it seems the margin notes stay stacked but not 
nearby the line I insert them in the text, which is what I

am looking for. Is there a way to achieve this using notes ?




Otherwise I assume that there is a bug with \ininner \inouter then ? 




Also I noticed there is a \ininnermargin, but I was curious to know what’s the 
difference with \ininner.




Thanks a lot




Joseph





From: Wolfgang Schuster
Sent: ‎Friday‎, ‎December‎ ‎11‎, ‎2015 ‎1‎:‎13‎ ‎PM
To: ntg-context@ntg.nl








josephcan...@gmail.com

10. Dezember 2015 um 11:04


Dear all,




Another problem appears if using both \inouter and \ininner to have notes in 
both sides. Apparently when doing so the stack=continue does not work any 
longer. I see margin notes overlapping and not being stacked.




If the “left note” is removed the right side notes are stacked properly again.




Is there any solution to avoid the previous problem and this one please ? 
Are notes a alternative for you?

\startsetups[marginnotes]
\startframed[width=max,height=max,align=high,strut=no]
\placenotes[marginnote][before=,after=,rule=off]
\stopframed
\stopsetups

\setuptexttexts[margin][][\directsetup{marginnotes}]

\definenote   [marginnote][criterium=page]
\setupnotation[marginnote][number=no]

\starttext

\dorecurse{100}{\input ward\expanded{\marginnote{This is note \recurselevel}} }

\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] hebrew

2016-01-17 Thread josephcanedo
For fonts I found this site : http://www.opensiddur.org.

In particular http://opensiddur.org/tools/fonts/


Hope this helps a bit


Joseph Canedo





From: Meer, Hans van der
Sent: ‎Saturday‎, ‎January‎ ‎16‎, ‎2016 ‎2‎:‎56‎ ‎PM
To: ntg-context@ntg.nl





I need to typeset the letters of the hebrew alfabet. What font? What letters to 
type?

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] Problem with \inouter and text justification

2015-12-15 Thread josephcanedo

Is this problem a hard limitation from (lua)TeX ? or simply some bug in ConTeXt 
?

The problem with main text justification is not present with “stable” version 
of ConTeXt, so my guess is that’s a regression in beta.


I initially used stack=yes but despite the name in some cases the notes fail to 
stack and overlapped. 




Thanks a lot,




Joseph





From: josephcan...@gmail.com
Sent: ‎Friday‎, ‎December‎ ‎11‎, ‎2015 ‎9‎:‎03‎ ‎PM
To: ntg-context@ntg.nl





Thanks Wolfgang for alternative proposal.

I had a try with your sample and it seems the margin notes stay stacked but not 
nearby the line I insert them in the text, which is what I

am looking for. Is there a way to achieve this using notes ?




Otherwise I assume that there is a bug with \ininner \inouter then ? 




Also I noticed there is a \ininnermargin, but I was curious to know what’s the 
difference with \ininner.




Thanks a lot




Joseph





From: Wolfgang Schuster
Sent: ‎Friday‎, ‎December‎ ‎11‎, ‎2015 ‎1‎:‎13‎ ‎PM
To: ntg-context@ntg.nl








josephcan...@gmail.com

10. Dezember 2015 um 11:04


Dear all,




Another problem appears if using both \inouter and \ininner to have notes in 
both sides. Apparently when doing so the stack=continue does not work any 
longer. I see margin notes overlapping and not being stacked.




If the “left note” is removed the right side notes are stacked properly again.




Is there any solution to avoid the previous problem and this one please ? 
Are notes a alternative for you?

\startsetups[marginnotes]
\startframed[width=max,height=max,align=high,strut=no]
\placenotes[marginnote][before=,after=,rule=off]
\stopframed
\stopsetups

\setuptexttexts[margin][][\directsetup{marginnotes}]

\definenote   [marginnote][criterium=page]
\setupnotation[marginnote][number=no]

\starttext

\dorecurse{100}{\input ward\expanded{\marginnote{This is note \recurselevel}} }

\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] Problem with \inouter and text justification

2015-12-11 Thread josephcanedo
Thanks Wolfgang for alternative proposal.

I had a try with your sample and it seems the margin notes stay stacked but not 
nearby the line I insert them in the text, which is what I

am looking for. Is there a way to achieve this using notes ?


Otherwise I assume that there is a bug with \ininner \inouter then ? 


Also I noticed there is a \ininnermargin, but I was curious to know what’s the 
difference with \ininner.


Thanks a lot


Joseph





From: Wolfgang Schuster
Sent: ‎Friday‎, ‎December‎ ‎11‎, ‎2015 ‎1‎:‎13‎ ‎PM
To: ntg-context@ntg.nl








josephcan...@gmail.com

10. Dezember 2015 um 11:04


Dear all,




Another problem appears if using both \inouter and \ininner to have notes in 
both sides. Apparently when doing so the stack=continue does not work any 
longer. I see margin notes overlapping and not being stacked.




If the “left note” is removed the right side notes are stacked properly again.




Is there any solution to avoid the previous problem and this one please ? 
Are notes a alternative for you?

\startsetups[marginnotes]
\startframed[width=max,height=max,align=high,strut=no]
\placenotes[marginnote][before=,after=,rule=off]
\stopframed
\stopsetups

\setuptexttexts[margin][][\directsetup{marginnotes}]

\definenote   [marginnote][criterium=page]
\setupnotation[marginnote][number=no]

\starttext

\dorecurse{100}{\input ward\expanded{\marginnote{This is note \recurselevel}} }

\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] Problem with \inouter and text justification

2015-12-10 Thread josephcanedo
Dear all,


Another problem appears if using both \inouter and \ininner to have notes in 
both sides. Apparently when doing so the stack=continue does not work any 
longer. I see margin notes overlapping and not being stacked.


If the “left note” is removed the right side notes are stacked properly again.


Is there any solution to avoid the previous problem and this one please ? 

Thanks


Best regards


Joseph Canedo





From: josephcan...@gmail.com
Sent: ‎Tuesday‎, ‎December‎ ‎8‎, ‎2015 ‎11‎:‎03‎ ‎PM
To: ntg-context@ntg.nl





Dear all,




I am trying to add margin notes and for some reason I do not understand when 
having them in the main text, the main text which normally would be fully 
justified (without notes) is now aligned to left, but right side is erratic. I 
attach a simple MWE showing this.




If you disable the notes uncommenting the no op versions of \R and \N macros 
the text is perfectly justified. 




Any hint on what I am doing wrong or some solution to avoid this please?




Another question would be how to make the margin content always aligned to left 
please (even if the used margin is the left one) ? 




Many thanks




Best regards




Joseph Canedo

margin_mwe.tex
Description: margin_mwe.tex
___
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 with \inouter and text justification

2015-12-08 Thread josephcanedo
Dear all,


I am trying to add margin notes and for some reason I do not understand when 
having them in the main text, the main text which normally would be fully 
justified (without notes) is now aligned to left, but right side is erratic. I 
attach a simple MWE showing this.


If you disable the notes uncommenting the no op versions of \R and \N macros 
the text is perfectly justified. 


Any hint on what I am doing wrong or some solution to avoid this please?


Another question would be how to make the margin content always aligned to left 
please (even if the used margin is the left one) ? 


Many thanks


Best regards


Joseph Canedo

margin_mwe.tex
Description: margin_mwe.tex
___
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] Fill up "bottom" space of page with some content

2015-12-03 Thread josephcanedo
Hi Thangalin,





Thanks a lot for replying,




Sure, I attach 2 mwe’s. First one (fill_mwe.tex) shows a “lettrine” + paragraph 
cut in bottom of 1st page (not desirable).




To fix this problem I add \setpenalties\clubpenalties{5}{1} to make sure 
the 6 first lines of paragraph are all together (5 lines for lettrine + 1 line 
to cover down the “lettrine”). This is shown in fill2_mwe.tex. There is another 
problem if the paragraph is too short (less than 5-6 lines) as the next 
paragraph will overlap with the figure, but that’s another story.




Now of course, in the bottom of the page 1 there is a large space and I would 
like to insert some decorative item. But my problem is that I do not know how 
to write some logic to insert this decorative stuff only if the title of 
Section 2 is moved to second page (if it is not, ie the section 1 is shorter, 
the section 2 title and beginning would follow in page 1). I was hoping there 
was a possibility to have some “filling” function that’s called if the page has 
still some space (I remember there is a setting called \setuplayout[line] that 
arranges to do this with the lines in the page.)




Hope this clarifies a bit,




Best regards




Joseph





From: Thangalin
Sent: ‎Thursday‎, ‎December‎ ‎3‎, ‎2015 ‎9‎:‎27‎ ‎PM
To: ntg-context@ntg.nl





Hi Joseph,

Mind posting a minimum working example to illustrate what you're
trying to accomplish?
___
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
___

fill_mwe.tex
Description: fill_mwe.tex


fill2_mwe.tex
Description: fill2_mwe.tex
___
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] Fill up "bottom" space of page with some content

2015-12-02 Thread josephcanedo
Dear all,


I wondered if there was a way to fill up the bottom of the page with some 
content (an image, some decorative pattern …) to avoid large blank space in 
page (given some limits, ie more than 2 lines of space is left blank).


By bottom of page I mean remaining space that could have been filled with text 
but given there was a page break it’s left blank. I saw some similar posts 
(relative to Fleuron) but the difficulty is that the amount of remaining space 
in the page is not easy to calculate, for example when having graphics, large 
drop caps that trigger a page break.


Hoping my question is clear enough.


Thanks for any hint


Best regards


Joseph Canedo___
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 on headings and text around them

2015-11-24 Thread josephcanedo
Hans,


Thanks for replying, Actually I realise the problem is with column break (was a 
bit late when I wrote my message, sorry for this).


I prepared a small example + output I get.


I am not saying the output is necessarly bad, but I’d like to know how to avoid 
the paragraph being broken and the 4 empty lines in the first column (at least 
in the example), or know what I am doing wrong. It looks like there is some 
setting “attaching” the last 2 lines of paragraph to the next section heading.




Thanks




Best regards




Joseph




$ context --version




mtx-context | ConTeXt Process Management 0.62
mtx-context |
mtx-context | main context file: 
c:/ConTeXt/0.85/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2015.11.19 19:13





From: Hans Hagen
Sent: ‎Tuesday‎, ‎November‎ ‎24‎, ‎2015 ‎1‎:‎52‎ ‎PM
To: ntg-context@ntg.nl





On 11/23/2015 11:16 PM, josephcan...@gmail.com wrote:
> Dear all,
>
> In some text I am typesetting I noticed that the text following a
> section was always starting on same page (which is all fine), but in
> some cases the text preceding the section heading was also finishing on
> same page, ie the last paragraph before the section heading was broken
> in previous page, say N lines on previous page and 2 in the page in
> which the section starts (I have \widowpenalty1 that’s probably why
> there are 2 lines in new page), even if there is space in the previous
> page for the 2 lines (there are even 3 blank lines at the end of the page).
>
> Apparently I could solve this “problem”, adding some 0 penalty:
>
> \definevspacing[BeforeHeading][penalty:0]
>
> \def\BeforeBook{\blank[BeforeHeading, line]} % was
> \def\BeforeBook{\blank[line]} which seems to avoid breaking page between
> text before heading and heading itself
>
> \setuphead[section][before=\BeforeBook]
>
> My question is simply, is that a correct way to fix the problem, or is
> that just “luck” this fixes the issue ?

you need to make a (minimal) example that shows the issue


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

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

section_mwe.tex
Description: section_mwe.tex


section_mwe.pdf
Description: section_mwe.pdf
___
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] Question on headings and text around them

2015-11-23 Thread josephcanedo
Dear all,


In some text I am typesetting I noticed that the text following a section was 
always starting on same page (which is all fine), but in some cases the text 
preceding the section heading was also finishing on same page, ie the last 
paragraph before the section heading was broken in previous page, say N lines 
on previous page and 2 in the page in which the section starts (I have 
\widowpenalty1 that’s probably why there are 2 lines in new page), even if 
there is space in the previous page for the 2 lines (there are even 3 blank 
lines at the end of the page).


Apparently I could solve this “problem”, adding some 0 penalty:


\definevspacing[BeforeHeading][penalty:0]


\def\BeforeBook{\blank[BeforeHeading, line]} % was 
\def\BeforeBook{\blank[line]} which seems to avoid breaking page between text 
before heading and heading itself


\setuphead[section][before=\BeforeBook]


My question is simply, is that a correct way to fix the problem, or is that 
just “luck” this fixes the issue ?


Thanks a lot,


Best regards


Joseph Canedo___
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] Issue with initial (new beta)

2015-11-20 Thread josephcanedo
Dear all,


First of all, thanks for new beta. It fixes the initial feature (in previous 
beta there were not typeset at all).


But while testing (a bit somewhat extreme example to push the limits) I came up 
with some initial letter hanging in the footer (page 3). Not sure the issue is 
linked with mixedcolumns but could not reproduce in plain vanilla environment. 

Also I noticed that if the paragraph is too short the initial overwrites the 
next paragraph(s) (to reproduce simply comment out the mixedcolumns).


MWE:


\starttext


\startmixedcolumns[balance=yes]
  \dorecurse{10}{ \setupinitial[location=text, n=4] \placeinitial \input{ward} 
\setupinitial[location=text, n=6] \placeinitial \input{knuth} }
\stopmixedcolumns


\stoptext



Admitedly this example has lots of lettrines. I added some \testcolumn to fix 
that, but now some columns are not balanced (page 3)


\starttext


\startmixedcolumns[balance=yes]
  \dorecurse{10}{ \setupinitial[location=text, n=4] \testcolumn[4] 
\placeinitial \input{ward} \setupinitial[location=text, n=6] \testcolumn[6] 
\placeinitial \input{knuth} }
\stopmixedcolumns


\stoptext



I was wondering if there were any settings to try more “aggressive” balancing 
(in the example here it might be difficult). or an alternative way to let the 
initial not hang into the footer that might be more “balanced” friendly. 


Many thanks for any hint,


Best regards


Joseph___
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] Best way to prevent wrong column/page break with par starting with \starthanging

2015-11-19 Thread josephcanedo
Dear all,




I am using \starthanging to implement dropcaps (with small pdf files). I use 
this Inside mixedcolumns (2 columns).


I’d like to know if there is a better way than \testcolumn[N], N being the 
number of lines of the dropcap, to prevent the location of dropcap being cut 
between end of column/page and beginning of next. Tried \keeplinestogether{N} 
instead but it does not work in all cases.


That question was mainly to see if there were any possibility to avoid some 
blank lines at end of some columns (ie not balanced in given page). 


Thanks a lot


Best regards


Joseph___
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] "Trial typesetting" in ConTeXt / lua ?

2015-11-19 Thread josephcanedo
I’ll try this in a minute. Thanks a million. 

Another bit of complexity, if I have some words in different font (only a few 
of them), should I call tohbox for these separately and “chain” the different 
hboxes together ? For example the idea is to “emulate” for instance: 


The second line has a word typeset in {\tfx smaller } size.


Thanks a lot again for your help,


Best regards,


Joseph





From: Hans Hagen
Sent: ‎Thursday‎, ‎November‎ ‎19‎, ‎2015 ‎8‎:‎11‎ ‎PM
To: ntg-context@ntg.nl





On 11/19/2015 5:16 PM, josephcan...@gmail.com wrote:
> Attached simple MWE. The second line has no ligatures/ no glyph
> substitution/ kern

use this ...

\startluacode
 userdata = userdata or { }

 if not nodes.typesetters.tohbox then
 function nodes.typesetters.tohbox(...)
 local list = nodes.typesetters.tonodes(...)
 local head = nodes.processors.hpack_filter(list)
 local hbox = node.hpack(head)
 return hbox
 end
 end

 function userdata.typeset(text)
 node.write((nodes.typesetters.tohbox(text)))
 end

\stopluacode

i'll add tohbox to the core


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
__
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] "Trial typesetting" in ConTeXt / lua ?

2015-11-19 Thread josephcanedo
Attached simple MWE. The second line has no ligatures/ no glyph substitution/ 
kern


Using: ConTeXt  ver: 2015.10.09 21:28 MKIV beta  fmt: 2015.11.1


Thanks


Best regards


Joseph





From: josephcan...@gmail.com
Sent: ‎Wednesday‎, ‎November‎ ‎18‎, ‎2015 ‎10‎:‎36‎ ‎PM
To: ntg-context@ntg.nl





> are you sure that you defined that font and that it's the current font?

I’ll double check my code and may I send you a MWE if I can still not see the 
ligatures and stuff. I’ll try also with new beta (have not installed yet)  just 
in case.




> just put stuff in vboxes and loop over that; at the tex end with calls to lua



Not sure I follow what you mean, sorry about this. I am quite a newbie in 
ConTeXt and in TeX more generally.




Thanks




Joseph





From: Hans Hagen
Sent: ‎Wednesday‎, ‎November‎ ‎18‎, ‎2015 ‎10‎:‎22‎ ‎PM
To: ntg-context@ntg.nl





On 11/18/2015 9:49 PM, josephcan...@gmail.com wrote:
> Hi Hans
>
> First of all, thanks a lot for replying.
>
> I tried your suggestion and it does not seem to work at least for fancy
> features in EB Garamond (historical liguratures and other features).
> I also tried to pass the hbox to tex.linebreak() and got assertion
> failure in luatex.

are you sure that you defined that font and that it's the current font?

> Is there any code snippet available to show the full process in lua code
> (I mean up to shipping the result nodes to the page) ?

no ... thousands of lines spread over many files

> To give some background, I’d like to compute a parshape for some
> paragraphs for which I’d like some special shape. I thought that one
> idea was to build up the lua nodes from text (which has some occasional
> words with  smaller or different font style), compute the width of text
> to figure out a first guess for parshape and then iterate on linebreak
> with different parshape settings to refine the first guess.

just put stuff in vboxes and loop over that; at the tex end with calls 
to lua

Hans


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

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

hpack_mwe.tex
Description: hpack_mwe.tex


hpack_mwe.pdf
Description: hpack_mwe.pdf
___
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] "Trial typesetting" in ConTeXt / lua ?

2015-11-18 Thread josephcanedo
Hi Hans


First of all, thanks a lot for replying.


I tried your suggestion and it does not seem to work at least for fancy 
features in EB Garamond (historical liguratures and other features).

I also tried to pass the hbox to tex.linebreak() and got assertion failure in 
luatex. 


Is there any code snippet available to show the full process in lua code (I 
mean up to shipping the result nodes to the page) ?


To give some background, I’d like to compute a parshape for some paragraphs for 
which I’d like some special shape. I thought that one idea was to build up the 
lua nodes from text (which has some occasional words with  smaller or different 
font style), compute the width of text to figure out a first guess for parshape 
and then iterate on linebreak with different parshape settings to refine the 
first guess.


Thanks a lot,


Best regards


Joseph





From: Hans Hagen
Sent: ‎Wednesday‎, ‎November‎ ‎18‎, ‎2015 ‎2‎:‎46‎ ‎AM
To: ntg-context@ntg.nl





On 11/17/2015 9:15 AM, josephcan...@gmail.com wrote:
> Hello,
>
> I was wondering if someone could have some hints on this question,
> anyway, I found the function mknodes() from luaTeX wiki and
> nodes.handlers.characters(head) function in ConTeXt (as it seems that
> node.ligaturing(head) and node.kerning(head) do not seem to do anything).
>
> It seems to work fine (ligatures and font features) expect the kerning.
> Does someone know how to perform the kerning as well ?

I'm not sure if i understand your issue.

traditional ligaturing and kerning is applied when a node list has fonts 
using basemode

\starttext

\startluacode

 local hbox = nodes.typesetters.hpack("Hello World!")

 context("%p",hbox.width)

 nodes.flush_list(hbox)

\stopluacode

\stoptext


> Best regards
>
> Joseph Canedo
>
> *From:* josephcan...@gmail.com 
> *Sent:* ‎Saturday‎, ‎November‎ ‎14‎, ‎2015 ‎11‎:‎16‎ ‎AM
> *To:* ntg-context@ntg.nl 
>
> Dear all,
>
> Is it possible in ConTeXt within lua code to do “trial typesetting” (not
> sure that’s best name for what I would like to achieve) ? By this I mean
> store some input (with text and macros) in some buffer and do what
> ConTeXt does normally (parsing, create nodes …) but instead of shipping
> the nodes to line breaking algorithm and to the page output, only
> retrieve the nodes and after discard them. This is to get an estimate of
> the total text width within a paragraph (to calculate some shape on the
> paragraph).

you can assemble a list of characters and then do an hpack on them

> I browsed the lua code from http://source.contextgarden.net/
> 
>  but
> I do not dare to use too low level lua functionality.
>
> Many thanks for any hint (even a pointer to lua function).
>
> Best regards
>
> Joseph Canedo
>
>
>
>
> ___
> 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
> ___
>


-- 

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
__
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] "Trial typesetting" in ConTeXt / lua ?

2015-11-18 Thread josephcanedo
> are you sure that you defined that font and that it's the current font?

I’ll double check my code and may I send you a MWE if I can still not see the 
ligatures and stuff. I’ll try also with new beta (have not installed yet)  just 
in case.


> just put stuff in vboxes and loop over that; at the tex end with calls to lua



Not sure I follow what you mean, sorry about this. I am quite a newbie in 
ConTeXt and in TeX more generally.


Thanks


Joseph





From: Hans Hagen
Sent: ‎Wednesday‎, ‎November‎ ‎18‎, ‎2015 ‎10‎:‎22‎ ‎PM
To: ntg-context@ntg.nl





On 11/18/2015 9:49 PM, josephcan...@gmail.com wrote:
> Hi Hans
>
> First of all, thanks a lot for replying.
>
> I tried your suggestion and it does not seem to work at least for fancy
> features in EB Garamond (historical liguratures and other features).
> I also tried to pass the hbox to tex.linebreak() and got assertion
> failure in luatex.

are you sure that you defined that font and that it's the current font?

> Is there any code snippet available to show the full process in lua code
> (I mean up to shipping the result nodes to the page) ?

no ... thousands of lines spread over many files

> To give some background, I’d like to compute a parshape for some
> paragraphs for which I’d like some special shape. I thought that one
> idea was to build up the lua nodes from text (which has some occasional
> words with  smaller or different font style), compute the width of text
> to figure out a first guess for parshape and then iterate on linebreak
> with different parshape settings to refine the first guess.

just put stuff in vboxes and loop over that; at the tex end with calls 
to lua

Hans


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
__
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] "Trial typesetting" in ConTeXt / lua ?

2015-11-17 Thread josephcanedo
Hello,




I was wondering if someone could have some hints on this question, anyway, I 
found the function mknodes() from luaTeX wiki and 
nodes.handlers.characters(head) function in ConTeXt (as it seems that 
node.ligaturing(head) and node.kerning(head) do not seem to do anything).


It seems to work fine (ligatures and font features) expect the kerning. Does 
someone know how to perform the kerning as well ?




Best regards


Joseph Canedo






From: josephcan...@gmail.com
Sent: ‎Saturday‎, ‎November‎ ‎14‎, ‎2015 ‎11‎:‎16‎ ‎AM
To: ntg-context@ntg.nl





Dear all,




Is it possible in ConTeXt within lua code to do “trial typesetting” (not sure 
that’s best name for what I would like to achieve) ? By this I mean store some 
input (with text and macros) in some buffer and do what ConTeXt does normally 
(parsing, create nodes …) but instead of shipping the nodes to line breaking 
algorithm and to the page output, only retrieve the nodes and after discard 
them. This is to get an estimate of the total text width within a paragraph (to 
calculate some shape on the paragraph).




I browsed the lua code from http://source.contextgarden.net/ but I do not dare 
to use too low level lua functionality.




Many thanks for any hint (even a pointer to lua function).




Best regards




Joseph Canedo___
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] "Trial typesetting" in ConTeXt / lua ?

2015-11-17 Thread josephcanedo
Just in case it is of interest (and assuming this won’t change in future 
versions), after digging again in lua code I replaced 
nodes.handlers.characters(head) with


local proc = nodes.tasks.actions('processors') -- not sure finalizers tasks are 
needed ?
head = proc(head)




before passing returned head to linebreak:


local vbox, info = tex.linebreak(head, {})


node.write(vbox)


and it shows kern in ouput, apparently identical to vanilla typesetting.


Joseph





From: josephcan...@gmail.com
Sent: ‎Tuesday‎, ‎November‎ ‎17‎, ‎2015 ‎9‎:‎15‎ ‎AM
To: ntg-context@ntg.nl





Hello,




I was wondering if someone could have some hints on this question, anyway, I 
found the function mknodes() from luaTeX wiki and 
nodes.handlers.characters(head) function in ConTeXt (as it seems that 
node.ligaturing(head) and node.kerning(head) do not seem to do anything).




It seems to work fine (ligatures and font features) expect the kerning. Does 
someone know how to perform the kerning as well ?




Best regards




Joseph Canedo






From: josephcan...@gmail.com
Sent: ‎Saturday‎, ‎November‎ ‎14‎, ‎2015 ‎11‎:‎16‎ ‎AM
To: ntg-context@ntg.nl





Dear all,




Is it possible in ConTeXt within lua code to do “trial typesetting” (not sure 
that’s best name for what I would like to achieve) ? By this I mean store some 
input (with text and macros) in some buffer and do what ConTeXt does normally 
(parsing, create nodes …) but instead of shipping the nodes to line breaking 
algorithm and to the page output, only retrieve the nodes and after discard 
them. This is to get an estimate of the total text width within a paragraph (to 
calculate some shape on the paragraph).




I browsed the lua code from http://source.contextgarden.net/ but I do not dare 
to use too low level lua functionality.




Many thanks for any hint (even a pointer to lua function).




Best regards




Joseph Canedo___
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] "Trial typesetting" in ConTeXt / lua ?

2015-11-14 Thread josephcanedo
Dear all,


Is it possible in ConTeXt within lua code to do “trial typesetting” (not sure 
that’s best name for what I would like to achieve) ? By this I mean store some 
input (with text and macros) in some buffer and do what ConTeXt does normally 
(parsing, create nodes …) but instead of shipping the nodes to line breaking 
algorithm and to the page output, only retrieve the nodes and after discard 
them. This is to get an estimate of the total text width within a paragraph (to 
calculate some shape on the paragraph).


I browsed the lua code from http://source.contextgarden.net/ but I do not dare 
to use too low level lua functionality.


Many thanks for any hint (even a pointer to lua function).


Best regards


Joseph Canedo___
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] How to scale an external figure from lua ?

2015-11-09 Thread josephcanedo
Dear all,


I am trying to write some lua code that loads some pdf file and scales it. I 
have the following code (got from previous question here to get number of pages 
from a pdf and from source files).


 local figure = figures.push { name = filename, scale = N } -- scale value does 
not seem to be taken in account
 assert(figure, 'Could not load figure from file ' .. filename)
 figures.identify()
 figures.check()
 figures.dummy() -- needed ?
 figures.scale() -- how to pass the scaling factor ?
 local d = figures.done()
 print('Scales ' .. figure.status.xscale .. ' ' .. figure.status.yscale) -- 
outputs Scales 1 1
 figures.pop()




Hoping that’s possible to do in lua code and my questions are not too dumb 
(still a beginner in ConTeXt).




Many thanks for your help,


Best regards


JC___
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 scale an external figure from lua ?

2015-11-09 Thread josephcanedo
More precisely, I would like to get width and height of the scaled figure 
Inside lua code, to perform some checks.

Thanks again


Joseph





From: josephcan...@gmail.com
Sent: ‎Monday‎, ‎November‎ ‎9‎, ‎2015 ‎10‎:‎12‎ ‎PM
To: ntg-context@ntg.nl





Dear all,




I am trying to write some lua code that loads some pdf file and scales it. I 
have the following code (got from previous question here to get number of pages 
from a pdf and from source files).




 local figure = figures.push { name = filename, scale = N } -- scale value does 
not seem to be taken in account
 assert(figure, 'Could not load figure from file ' .. filename)
 figures.identify()
 figures.check()
 figures.dummy() -- needed ?
 figures.scale() -- how to pass the scaling factor ?
 local d = figures.done()
 print('Scales ' .. figure.status.xscale .. ' ' .. figure.status.yscale) -- 
outputs Scales 1 1
 figures.pop()






Hoping that’s possible to do in lua code and my questions are not too dumb 
(still a beginner in ConTeXt).




Many thanks for your help,




Best regards




JC___
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 issue with EBGaramond / firstline / mixedcolumns

2015-11-08 Thread josephcanedo
Dear all,


Trying to use EB Garamond font Inside mixed columns + use firstline  feature 
(to make it larger) I get an empty line in output between first line and the 
rest of paragraph. If I comment the line containing \setupbodyfont and use 
default font the problem disappears (even with larger \tfa ratios well above 2).


The problem seems only to happen when first line contains letters with space 
hanging below line base (like g or p for example).

As well using columnset does not show the problem and using grid=verytolerant 
as well.


Attached MWE + output.


Many thanks

Best regards


Joseph Canedo

mwe_mixedcolumns.pdf
Description: mwe_mixedcolumns.pdf


mwe_mixedcolumns.tex
Description: mwe_mixedcolumns.tex
___
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 using markings

2015-11-04 Thread josephcanedo
Dear all,


Digging a bit Inside lua code I could find a way to use internal structures 
(namely structures.marks.fetched, structures.lists.ordered.section and 
structures.lists.cached) to get the output I would like. I guess that’s not 
really recommended to use internal structures from lua code ? Happy to paste 
some initial crude implementation here if anyone is interested.


Thanks

Best regards


Joseph Canedo





From: josephcan...@gmail.com
Sent: ‎Tuesday‎, ‎November‎ ‎3‎, ‎2015 ‎10‎:‎43‎ ‎PM
To: ntg-context@ntg.nl





Dear all,




I would like to display in page header the number of first and last subsection 
that starts on a given page (ie the title of those appear on that page 
regardless their content). For this I tried using 

\fetchmarking[subsectionnumber][][top] and 
\fetchmarking[subsectionnumber][][bottom]




but it does not give me the expected results if (it seems) the page does not 
start immediately with a new subsection (ie there is text of subsection 
starting from previous page). In the example below in page 2 I’d like to have 
1.4 - 1.6, but top marking equals to 1.3 in this case. In the other pages top 
marking contains expected number (well the number I’d like to print).




I guess there is some logic to use using previous, top and first markings but I 
fail to understand what it could be.




Many thanks




Best regards




Joseph Canedo___
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 using markings

2015-11-03 Thread josephcanedo
Dear all,


I would like to display in page header the number of first and last subsection 
that starts on a given page (ie the title of those appear on that page 
regardless their content). For this I tried using 

\fetchmarking[subsectionnumber][][top] and 
\fetchmarking[subsectionnumber][][bottom]


but it does not give me the expected results if (it seems) the page does not 
start immediately with a new subsection (ie there is text of subsection 
starting from previous page). In the example below in page 2 I’d like to have 
1.4 - 1.6, but top marking equals to 1.3 in this case. In the other pages top 
marking contains expected number (well the number I’d like to print).


I guess there is some logic to use using previous, top and first markings but I 
fail to understand what it could be.


Many thanks


Best regards


Joseph Canedo___
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] \fetchmark broken despite change in strc-mar.mkiv with fix

2015-11-01 Thread josephcanedo
Dear all,


From strc-mar.mkiv I see another function called \fetchmarking with is also 
expandable as says comment:


% also fully expandable but here we have: [name][range][method]


It seems to give correct marking if I use empty [] for range parameter. But I 
do not understand what “range” means and how to use it ? Could not find any 
reference of this \fetchmarking function from wiki, nor mailing list nor 
tex.stackexchange.org.


Many thanks

Best regards


Joseph Canedo





From: josephcan...@gmail.com
Sent: ‎Saturday‎, ‎October‎ ‎31‎, ‎2015 ‎11‎:‎46‎ ‎PM
To: ntg-context@ntg.nl





Dear all,




I saw that \fetchmark command broken and applied the (small) change as 
explained in http://www.mail-archive.com/dev-context%40ntg.nl/msg02349.html but 
the command is still giving wrong marks in headers. Is there any other fix or 
should I run some command after having modified the strc-mar.mkiv file ?

I need to use \fetchmark in a if command and I understand \getmarking is not 
usable for this.




Many thanks

Best regards




Joseph Canedo___
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] More ebgaramond issues (newotf, finding fonts and kerning)

2015-11-01 Thread josephcanedo
Tried locally on W8.1/64 and otherwise same ConTeXt and EBGaramond files I see 
similar issues (expect maybe kerning is done with new otf loading).






 


Sent from Windows Mail





From: Rik Kabel
Sent: ‎Monday‎, ‎November‎ ‎2‎, ‎2015 ‎3‎:‎10‎ ‎AM
To: ntg-context@ntg.nl




Three problems with ebgaramond.
With the new otf loading facility, kerning is not done.

With the new otf loading facility, the regular 8pt face is not found. If one is 
changing font size via \tfxx, the font size is not changed. If one is changing 
font size via \switchbodyfont[8pt], Latin Modern 8pt is substituted.
With the oldotf module loaded kerning is as expected for the 12pt regular face, 
the 8pt regular face, and the 8pt italic face. The 12pt italic face, however, 
is not kerned.


%\usemodule[oldotf]% uncomment to see previous otf handling
\showfontkerns
\setupbodyfont[ebgaramond]
\def\Test{Vowel Tavern Tomato {\it Vowel Tavern Tomato}\par}
\starttext
\Test
{\tfxx
\Test}
\switchtobodyfont[8pt]
\Test
\stoptext


This was tested on W10/64 using ConTeXt  ver: 2015.10.09 21:28 MKIV beta  fmt: 
2015.11.1  int: english/english, with EBGaramond files version 0.016 (April 
2014) installed in C:\Windows\Fonts. Same results with luajittex (This is 
LuajitTeX, Version beta-0.80.0 (TeX Live 2015/W32TeX) (rev 5238)) and luatex 
(This is LuaTeX, Version beta-0.81.1 (TeX Live 2015/W32TeX) (rev 5442)).


Is this a problem with my font installation, or is it a general problem?


-- 
Rik

test4_newotf.pdf
Description: test4_newotf.pdf


test4.pdf
Description: test4.pdf
___
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] \fetchmark broken despite change in strc-mar.mkiv with fix

2015-10-31 Thread josephcanedo
Dear all,


I saw that \fetchmark command broken and applied the (small) change as 
explained in http://www.mail-archive.com/dev-context%40ntg.nl/msg02349.html but 
the command is still giving wrong marks in headers. Is there any other fix or 
should I run some command after having modified the strc-mar.mkiv file ?

I need to use \fetchmark in a if command and I understand \getmarking is not 
usable for this.


Many thanks

Best regards


Joseph Canedo___
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] \setfirstline for headings/titles ?

2015-10-29 Thread josephcanedo
Came up with some solution using lua, probably not the most elegant one but 
seems to work. Attached below in case it’s of any interest for anyone.


\setupheads[
  align=center]


\startluacode
  userdata = userdata or {}


  userdata.test = function(n)
 local breakline = n:find([[\\]])
 local modified
 if breakline then
modified = [[{\tfa ]] .. n:sub(1, breakline + 1) .. '}' .. 
n:sub(breakline + 2)
 else
modified = [[{\tfa ]] .. n .. '}'
 end
 context(modified)
  end


\stopluacode


\define[1]\MyCmd{\ctxlua{userdata.test('\luaescapestring{#1}')}}


\setuphead[subject][style=\tf,
  deeptextcommand=\MyCmd]


\starttext


\startsubject[title={A very very very long title for subject\\
we know will not fit in single line of output but\\
 A very very very long title for subject we know will not fit\\
 in single line of output}]


Some text.


\stoptext





From: josephcan...@gmail.com
Sent: ‎Wednesday‎, ‎October‎ ‎28‎, ‎2015 ‎7‎:‎19‎ ‎PM
To: ntg-context@ntg.nl





Hello all,




Perhaps a more meaningful example, actually I explicitly break lines Inside 
title text.




\setuphead[subject][align=center]




\starttext




\startsubject[title={First title line\\ \tf eventual second line}] % second 
line same size as normal text Howto ?




Some text here




\stopsubject




\stoptext






I tried with \tf but it does not change the size of text in the title after it. 
(In LaTeX I used \normalsize)




Is there any solution that would allow to type:




\startsubject[title={First title line\\ eventual second line}] 




and output second line in smaller text than the first one (without adding any 
font modifier in the title if possible) ?




Many thanks for any help

Best regards




Joseph



From: josephcan...@gmail.com
Sent: ‎Tuesday‎, ‎October‎ ‎27‎, ‎2015 ‎1‎:‎29‎ ‎PM
To: ntg-context@ntg.nl





Dear all,




Still playing with \setfirstline, I was wondering how to apply it for headings 
as well ? Naive sample below does not work for the subject title, most probably 
because headings/titles have different processing than normal paragraphs.




\definecolumnset[TwoColumns][n=2]




\definefirstline[bbigline][alternative=line,
  style=\tfa]




\starttext




\startcolumnset [TwoColumns]




\startsubject[title={\setfirstline[bbigline] A very very very long title for 
subject we know will not fit in single line of output}] % first line with 
different style as in the text below ?




\setfirstline[bbigline] Some paragraph content here. First line should be 
printed bigger than rest of lines.




\stopsubject




\stopcolumnset




\stoptext




Thanks a lot,

Best regards




Joseph Canedo___
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] \setfirstline for headings/titles ?

2015-10-28 Thread josephcanedo
Hello all,


Perhaps a more meaningful example, actually I explicitly break lines Inside 
title text.


\setuphead[subject][align=center]


\starttext


\startsubject[title={First title line\\ \tf eventual second line}] % second 
line same size as normal text Howto ?


Some text here


\stopsubject


\stoptext




I tried with \tf but it does not change the size of text in the title after it. 
(In LaTeX I used \normalsize)


Is there any solution that would allow to type:


\startsubject[title={First title line\\ eventual second line}] 


and output second line in smaller text than the first one (without adding any 
font modifier in the title if possible) ?


Many thanks for any help

Best regards


Joseph



From: josephcan...@gmail.com
Sent: ‎Tuesday‎, ‎October‎ ‎27‎, ‎2015 ‎1‎:‎29‎ ‎PM
To: ntg-context@ntg.nl





Dear all,




Still playing with \setfirstline, I was wondering how to apply it for headings 
as well ? Naive sample below does not work for the subject title, most probably 
because headings/titles have different processing than normal paragraphs.




\definecolumnset[TwoColumns][n=2]




\definefirstline[bbigline][alternative=line,
  style=\tfa]




\starttext




\startcolumnset [TwoColumns]




\startsubject[title={\setfirstline[bbigline] A very very very long title for 
subject we know will not fit in single line of output}] % first line with 
different style as in the text below ?




\setfirstline[bbigline] Some paragraph content here. First line should be 
printed bigger than rest of lines.




\stopsubject




\stopcolumnset




\stoptext




Thanks a lot,

Best regards




Joseph Canedo___
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] \setfirstline Inside columns environment does not seem to work

2015-10-27 Thread josephcanedo
Seems to work fine with columnsets:


\setupbodyfont[pagella]


\definecolumnset[TwoColumns][n=2]


\starttext


\startcolumnset [TwoColumns]


\setupindenting[medium,yes]
\setupalign[tolerant]


\definefirstline
[fancy]
[alternative=line,
style=\tfd]


\setfirstline[fancy] \input tufte \par
\setfirstline[fancy] \input ward \par
\setfirstline[fancy] \input knuth \par
\setfirstline[fancy] \input bryson \page


\definefirstline
[fancy]
[alternative=word,
color=darkblue,
style=bold,
n=2]


\setfirstline[fancy] \input tufte \par
\setfirstline[fancy] \input ward \par
\setfirstline[fancy] \input knuth \par
\setfirstline[fancy] \input bryson \page


\stopcolumnset


\stoptext






From: josephcan...@gmail.com
Sent: ‎Monday‎, ‎October‎ ‎26‎, ‎2015 ‎3‎:‎03‎ ‎PM
To: ntg-context@ntg.nl





Dear all,




I would like to use the first line specific style magic but I cannot make it to 
work within 2 column text. I give a simple example (I’ve modified from previous 
post example on this list). Is that expected ? If you uncomment the 
\startcolumns and \stopcolumns below, the first line style disappears (both 
bigger font line and dark blue 2 first words).




I use standalone ConTeXt (installed 1 week ago or so).




$ context --version




mtx-context | ConTeXt Process Management 0.62
mtx-context |
mtx-context | main context file: 
c:/ConTeXt/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2015.10.09 21:28




Thanks

Best

Joseph Canedo




\setupbodyfont[pagella]




\starttext




% \startcolumns[n=2]




\setupindenting[medium,yes]
\setupalign[tolerant]




\definefirstline
[fancy]
[alternative=line,
style=\tfd]




\setfirstline[fancy] \input tufte \par
\setfirstline[fancy] \input ward \par
\setfirstline[fancy] \input knuth \par
\setfirstline[fancy] \input bryson \page




\definefirstline
[fancy]
[alternative=word,
color=darkblue,
style=bold,
n=2]




\setfirstline[fancy] \input tufte \par
\setfirstline[fancy] \input ward \par
\setfirstline[fancy] \input knuth \par
\setfirstline[fancy] \input bryson \page




% \stopcolumns




\stoptext

test1.pdf
Description: test1.pdf
___
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] Dropcaps in ConTeXt

2015-10-27 Thread josephcanedo
Dear all,





I try to typeset some text with dropcaps which are pdf files in a 2 column 
text. I came up with 3 possibilities as shown in the sample below (attached 
D1.pdf). So far best solution seems to use the lettrine module, but I wondered 
if it would be possible to cope with the issue with figure and text overlapping 
if the first paragraph is very short (ie avoid using \\) ? Had a look to 
lettrine module source and wondered where I could find some documentation on 
the low level ConTeXt commands used in there ? For example to amend the code to 
avoid Lines= and use the actual figure size.


Sample follows:


\definecolumnset[TwoColumns][n=2]


\usemodule[lettrine]


\starttext


\startcolumnset [TwoColumns]


\placefigure[left,none]{}{\externalfigure[D1.pdf]} % how to have left side 
figure with text wrapping around it ?
This is a first paragraph.


\input tufte


\starthanging{\externalfigure[D1.pdf]}
This is a first paragraph.\\ % how to have \par here ?
\input tufte
\stophanging


\lettrine[Image=yes, Lines=4, Nindent=0pt, Findent=0.5em]{D1.pdf} % avoid Lines 
and use actual figure size ?
This is a first paragraph.\\ % how to have \par here ?
\input tufte


\stopcolumnset


\stoptext



Thanks

Regards


Joseph Canedo

D1.pdf
Description: D1.pdf
___
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] \setfirstline for headings/titles ?

2015-10-27 Thread josephcanedo
Dear all,


Still playing with \setfirstline, I was wondering how to apply it for headings 
as well ? Naive sample below does not work for the subject title, most probably 
because headings/titles have different processing than normal paragraphs.


\definecolumnset[TwoColumns][n=2]


\definefirstline[bbigline][alternative=line,
  style=\tfa]


\starttext


\startcolumnset [TwoColumns]


\startsubject[title={\setfirstline[bbigline] A very very very long title for 
subject we know will not fit in single line of output}] % first line with 
different style as in the text below ?


\setfirstline[bbigline] Some paragraph content here. First line should be 
printed bigger than rest of lines.


\stopsubject


\stopcolumnset


\stoptext


Thanks a lot,

Best regards


Joseph Canedo___
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] \setfirstline Inside columns environment does not seem to work

2015-10-26 Thread josephcanedo
Dear all,


I would like to use the first line specific style magic but I cannot make it to 
work within 2 column text. I give a simple example (I’ve modified from previous 
post example on this list). Is that expected ? If you uncomment the 
\startcolumns and \stopcolumns below, the first line style disappears (both 
bigger font line and dark blue 2 first words).


I use standalone ConTeXt (installed 1 week ago or so).


$ context --version


mtx-context | ConTeXt Process Management 0.62
mtx-context |
mtx-context | main context file: 
c:/ConTeXt/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2015.10.09 21:28


Thanks

Best

Joseph Canedo


\setupbodyfont[pagella]


\starttext


% \startcolumns[n=2]


\setupindenting[medium,yes]
\setupalign[tolerant]


\definefirstline
[fancy]
[alternative=line,
style=\tfd]


\setfirstline[fancy] \input tufte \par
\setfirstline[fancy] \input ward \par
\setfirstline[fancy] \input knuth \par
\setfirstline[fancy] \input bryson \page


\definefirstline
[fancy]
[alternative=word,
color=darkblue,
style=bold,
n=2]


\setfirstline[fancy] \input tufte \par
\setfirstline[fancy] \input ward \par
\setfirstline[fancy] \input knuth \par
\setfirstline[fancy] \input bryson \page


% \stopcolumns


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

[NTG-context] Question on how to simple numbered sections or other headings

2015-10-25 Thread josephcanedo
Hello all,


I have an another newbie ConTeXt user question (very powerful but the learning 
curve is a bit steep at least for me ). Sorry if this is documented in the 
Wiki but could not find an example to do this. 


I would like to have text splitted in chapters (or sections) with some title, 
which I can do fine and have these divided in sections (or subsections) whose 
title is just for example: Chapitre 1, Chapitre 2, … ie a simple label + a 
counter after it.


How can I do this please ? I tried using \setupheads[number=no] to not print 
the number at left side of title but this makes \structurenumber or 
\headnumber[section] empty.


Basically what is a way to have (for example): 


Chapitre 1


instead of


1 Chapitre


Many thanks


Best regards


Joseph Canedo___
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 on how to simple numbered sections or other headings

2015-10-25 Thread josephcanedo
Yes, that’s correct. I guess command= attribute kind of replaces the “default” 
processing for the head ? Because when I use it the “align = center” does not 
seem to be taken in account.

Thanks a lot


Joseph






Sent from Windows Mail





From: Thomas A. Schmitz
Sent: ‎Sunday‎, ‎October‎ ‎25‎, ‎2015 ‎5‎:‎32‎ ‎PM
To: ntg-context@ntg.nl





Is that what you're looking for?


\define[2]\MyChapterTitle%
{#2: #1}

\setuphead[chapter]
   [command=\MyChapterTitle]

\starttext

\startchapter [title=Some Title]

Some text.

\stoptext

When you define a command, #1 is your chapter/section/whatever number, 
#2 is your title.

(For future reference: please make minimal examples when asking a question.)

Thomas
___
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] Question on how to simple numbered sections or other headings

2015-10-25 Thread josephcanedo
Thanks a lot, very concise. I was wondering if the \stopchapter (or more 
generally \stop) were needed ? In my document I write in some instances:


\startsubsection 


Bla bla 


\startsubsection 


etc ….


and it seems to work fine (but perhaps pure luck or is the \startsubsection 
implictly ends the previous one).


Best regards

Joseph






Sent from Windows Mail





From: Alan BRASLAU
Sent: ‎Sunday‎, ‎October‎ ‎25‎, ‎2015 ‎6‎:‎00‎ ‎PM
To: josephcan...@gmail.com
Cc: ntg-context@ntg.nl





Easier:

\setuplabeltext [chapter=Chapitre ] % with trailing space; blank by default
\starttext

 \startchapter
   Some text.
 \stopchapter

 \startchapter
   Some more text.
 \stopchapter

\stoptext


Alan


On Sun, 25 Oct 2015 17:32:30 +0100
"Thomas A. Schmitz"  wrote:

> Is that what you're looking for?
> 
> 
> \define[2]\MyChapterTitle%
> {#2: #1}
> 
> \setuphead[chapter]
>[command=\MyChapterTitle]
> 
> \starttext
> 
> \startchapter [title=Some Title]
> 
> Some text.
> 
> \stoptext
> 
> When you define a command, #1 is your chapter/section/whatever
> number, #2 is your title.
> 
> (For future reference: please make minimal examples when asking a
> question.)
> 
> Thomas___
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] Obtaining features from EBGaramond font in ConTeXt

2015-10-23 Thread josephcanedo
Thanks Rik,


I’ll install standalone ConTeXt along TexLive then.

Is there any place I could find docs on \definecharacterspacing command please 
? Could not find any occurrence on the Wiki.

Many thanks


Best regards


Joseph






Sent from Windows Mail





From: Rik Kabel
Sent: ‎Friday‎, ‎October‎ ‎23‎, ‎2015 ‎4‎:‎23‎ ‎PM
To: ntg-context@ntg.nl





On 2015-10-23 03:44, josephcan...@gmail.com wrote:



Hello all,




Wondered if you could figure out what I did wrong with specifying the font.

Asked question on TexExchange.org already, with samples.




http://tex.stackexchange.com/questions/274471/obtaining-features-from-ebgaramond-font-in-context




I use texlive 2015 on Windows 8.1




Many thanks,




Best regards




Joseph Canedo




First, some small changes to your example. Remove the enableregime directive; 
ConTeXt MKIV, which you appear to be using, does not use this. It is from 
ConTeXt MKII. Next, modify the definefontfeature and definefontfamily commands 
as shown. (The default features for the font are in the file 
type-imp-ebgaramond.mkiv.) That should be it to get started.

\language[fr] % french hyphenation

\definefontfeature[myfeatures][ss02=yes,cv01=yes,cv03=yes,ss05=yes,cv91=yes]

\definefontfamily[mainfont][serif][EBGaramond][features={default,myfeatures}]
\setupbodyfont[mainfont, 8pt]

\starttext

session
univers
Que
Quelconque
Joseph
¶

\stoptext


TL15 has problems with EBGaramond. The best you will get is:

 

With a more recent standalone version, you will get:

 

If you are setting older texts, you may also want to take advantage of 
ConTeXt’s ability to automatically provide space before large punctuation 
characters using the definecharacterspacing command.

One other note. Character variant 01 (cv01) is a very dull sword. The rules for 
the use of long-ſ are much too complex for it to handle. For a good overview of 
the issues, see Andrew West’s article in the TUGboat at 
https://www.tug.org/TUGboat/tb32-1/tb100west.pdf. In my opinion you are better 
off learning to insert it as needed in the text.

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

[NTG-context] Error when installing context standalone

2015-10-23 Thread josephcanedo
Hello all,


I got the installation zip file following instructions found in: 
http://wiki.contextgarden.net/ConTeXt_Standalone#Windows

Unzipped in C:\ConTeXt directory (brand new an empty).


Started command: first-setup.bat --context=current --modules=all


After a couple of minutes: I get:


! LuaTeX error c:/ConTeXt/tex/texmf-context/tex/context/base/node-shp.lua:58: ta
ble index is nil
stack traceback:
c:/ConTeXt/tex/texmf-context/tex/context/base/node-shp.lua:58: in 
function 'code'
c:/ConTeXt/tex/texmf-context/tex/context/base/util-lua.lua:84: in 
function 'loadedluacode'
c:/ConTeXt/tex/texmf-context/tex/context/base/luat-env.lua:104: in 
function 'luafilechunk'
c:/ConTeXt/tex/texmf-context/tex/context/base/luat-cod.lua:45: in 
function 'registercode'
[\directlua]:1: in main chunk.
\registerctxluafile ...ua.registercode("#1","#2")}


l.21 \registerctxluafile{node-shp}{1.001}


?


and the installation process stops at lua prompt.


I’ve checked that luatex.exe is the one Inside C:\ConTeXt\ tex subdirectory. 
(C:\ConTeXt\tex\texmf-win64\bin). It’s slightly strange it uses 64 bits exe 
because I downloaded 
http://minimals.contextgarden.net/setup/context-setup-mswin.zip


Any hints please ? I am using Windows 8.1.

Thanks


Best regards


Joseph Canedo___
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] Obtaining features from EBGaramond font in ConTeXt

2015-10-23 Thread josephcanedo
At the moment, I use “\,” between word and question marks. Also “~” between 
word and “:”. I guess the \definecharacterspacing is more flexible and 
transparent from text input point of view (only write normal space). IIRC both 
\, and ~ also avoids line breaking at their location. Is there a way to specify 
this too please ?




Thanks a lot for your valuable help,


Joseph




Sent from Windows Mail





From: Rik Kabel
Sent: ‎Friday‎, ‎October‎ ‎23‎, ‎2015 ‎9‎:‎49‎ ‎PM
To: ntg-context@ntg.nl





On 2015-10-23 15:19, josephcan...@gmail.com wrote:




Is there any place I could find docs on \definecharacterspacing command please 
? Could not find any occurrence on the Wiki.

The best description I have seen of it is in Wolfgang’s message on the mailing 
list at http://www.mail-archive.com/ntg-context%40ntg.nl/msg77942.html (or 
http://www.ntg.nl/pipermail/ntg-context/2015/081569.html if you prefer 
pipermail navigation). Basically, define the spacings you want with 
\definecharacterspacing[myspacing][…][…=…,…=…] and put them in play with 
\setcharacterspacing[myspacing]. Do it within a group to have it apply only 
within that group, or apply it globally.

Sorry, no help here for the installation issue.

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

Re: [NTG-context] Error when installing context standalone

2015-10-23 Thread josephcanedo
Works all fine (also used win64.zip file) if I do not specify --context=current.

Thanks

Joseph






Sent from Windows Mail





From: josephcan...@gmail.com
Sent: ‎Friday‎, ‎October‎ ‎23‎, ‎2015 ‎9‎:‎28‎ ‎PM
To: ntg-context@ntg.nl





Hello all,




I got the installation zip file following instructions found in: 
http://wiki.contextgarden.net/ConTeXt_Standalone#Windows

Unzipped in C:\ConTeXt directory (brand new an empty).




Started command: first-setup.bat --context=current --modules=all




After a couple of minutes: I get:




! LuaTeX error c:/ConTeXt/tex/texmf-context/tex/context/base/node-shp.lua:58: ta
ble index is nil
stack traceback:
c:/ConTeXt/tex/texmf-context/tex/context/base/node-shp.lua:58: in 
function 'code'
c:/ConTeXt/tex/texmf-context/tex/context/base/util-lua.lua:84: in 
function 'loadedluacode'
c:/ConTeXt/tex/texmf-context/tex/context/base/luat-env.lua:104: in 
function 'luafilechunk'
c:/ConTeXt/tex/texmf-context/tex/context/base/luat-cod.lua:45: in 
function 'registercode'
[\directlua]:1: in main chunk.
\registerctxluafile ...ua.registercode("#1","#2")}




l.21 \registerctxluafile{node-shp}{1.001}




?




and the installation process stops at lua prompt.




I’ve checked that luatex.exe is the one Inside C:\ConTeXt\ tex subdirectory. 
(C:\ConTeXt\tex\texmf-win64\bin). It’s slightly strange it uses 64 bits exe 
because I downloaded 
http://minimals.contextgarden.net/setup/context-setup-mswin.zip




Any hints please ? I am using Windows 8.1.

Thanks




Best regards




Joseph Canedo___
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] Obtaining features from EBGaramond font in ConTeXt

2015-10-23 Thread josephcanedo
Hello all,


Wondered if you could figure out what I did wrong with specifying the font.

Asked question on TexExchange.org already, with samples.


http://tex.stackexchange.com/questions/274471/obtaining-features-from-ebgaramond-font-in-context


I use texlive 2015 on Windows 8.1


Many thanks,


Best regards


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