Re: [NTG-context] Shaded large letters in LMTX

2021-03-02 Thread Garulfo

yep, was wikified here :
https://wiki.contextgarden.net/Cover_Pages#Empty_or_Transparent_letters
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] About baseline alignment in metapost - issue on the wiki ?

2021-01-29 Thread Garulfo

The dlft version doesn't seem to work on the wiki.

A MVE here https://wiki.contextgarden.net/textext_positioning#Test_dlft




Le 29/01/2021 à 09:01, Garulfo a écrit :

To align with the baseline :

thetextext.drt("Hello, World!", (1cm, 5cm)) ;

Also existing :

thetextext.d  (center)
thetextext.dlft   (left)

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

2021-01-29 Thread Garulfo

To align with the baseline :

thetextext.drt("Hello, World!", (1cm, 5cm)) ;

Also existing :

thetextext.d  (center)
thetextext.dlft   (left)
___
If your question is of interest to others as well, please add an 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] A not so short introduction to ConTeXt Mark IV

2021-01-05 Thread Garulfo

Hi all,

I saw that Mojca created a directory
https://github.com/contextgarden/not-so-short-introduction-to-context

Joaquín, if you agree, and if
- you provide me with the spanish + english source codes
- Mojca provide you and me with github write access (garulfogb account)

i could :
1/ push the current code
2/ start to write a github wiki page (+ link on contextgarden) to describe :
- for you : how to update from your own computer (the official source)
- for any user : how to use git to get the source + link to this list 
for discussion.


Does anybody has a guide about "how to set up a documentation 
translation project with git ?".
One requirement will probably to define how propositions are officially 
validated. Does it requires Joaquín to learn how to use git ? Can we 
just work by sending files (or patches) to Joaquín who will update with 
a single git command ?








Le 03/01/2021 à 19:08, Hans Hagen a écrit :

On 1/3/2021 5:42 PM, Mojca Miklavec wrote:

On Sun, 3 Jan 2021 at 15:37, Garulfo wrote:


In oct 2020, a message proposed to create a GitHub/GitLab repository (or
even organization) for this so that anybody can help translating it into
other languages:
https://mailman.ntg.nl/pipermail/ntg-context/2020/099789.html


If you want to see it under
 https://github.com/contextgarden/
just propose the repository name and list the usernames for those who
should initially have access.
also because that would fit well into the plans for a bunch of context 
related repositories


Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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


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

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


Re: [NTG-context] A not so short introduction to ConTeXt Mark IV

2021-01-03 Thread Garulfo
@Joaquín + english translator : many thanks for this great and useful 
contribution to ConTeXt community dev. Impressive.


Being interested into contributing to a french version, what would be 
your prefered way ?


In oct 2020, a message proposed to create a GitHub/GitLab repository (or 
even organization) for this so that anybody can help translating it into 
other languages:

https://mailman.ntg.nl/pipermail/ntg-context/2020/099789.html




Le 03/01/2021 à 11:32, Saša Janiška a écrit :

On Sun, 3 Jan 2021 10:45:00 +0100
Joaquín Ataz López  wrote:

Hiya Joaquín,


It is precisely the members of this list who need no introduction at
all, but it can sometimes be useful to help someone get started with
the fascinating typesetting system that is ConTeXt.


Well, I'm the one who (desperately) need it and I'm delighted. :-D

Thanks a lot for providing such a wonderful "introduction" popularizing 
ConTeXt!!


Sincerely,
Gour



___
If your question is of interest to others as well, please add an 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] drop shadows with metapost/ metafun

2020-12-29 Thread Garulfo
Which process would you advice to add « drop shadows » to any kind of metafun / 
metapost figures like:
picture p;
p := textext("MetaPost is fun!") shifted (10cm,10cm);

My current understanding of the required steps :


1- fill p with the shadow color

2- write it to an external metapost file (with savebuffer ?) ready for png 
export (outputformat := "png »;)

3- with lua, os.execute, and imagemagick prepare the shadow
  - extent the png file with a transparent background, to have room for 
blurring 
  - blur it

4- import this png in context / Metapost (externalfigure), and center it with p 
figure

5- shift it according to the desired shadows distance and angle

6- apply the initial bounding box of p to the shadow, draw the shadow, draw the 
p picture 


Actually, all this seems long and tedious, and contrasts with the already 
existing links between MetaPost / MetaFun and cairo + libpng.

Thanks again for your help.___
If your question is of interest to others as well, please add an 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] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-24 Thread Garulfo

Much more lean now thanks to your feedbacks.

I prefered to "remove the shapes of the letter"
rather than doubling the shading.


Wikified https://wiki.contextgarden.net/Cover_Pages#.22Empty.22_letters





\definecolor [ColorHighA] [h=c4a000]
\definecolor [ColorHighB] [h=602217]
\definecolor [ColorLow] [0.8(white)]

\startMPpage

%-- 



  picture tt ;
  tt := lmt_outline [
kind = "fillup",
text = "\definedfont[name:texgyrepagellabold*default]%
\framed[frame=off,offset=3mm,align=middle,strut=none]
{MetaPost\\is Fun !\\Aujourd'hui\\Today\\*§ 2020 §*}",
] xsized 12cm ;

  path bb ; bb := boundingbox tt;

%-- 



  path pp ; pp := bb enlarged 2cm ;
  fill pp
   withshademethod "linear"
   withshadedirection (2.,0.)
   withshadecolors (\MPcolor{ColorHighA}, \MPcolor{ColorHighB});

%-- 



  picture Paddmissing; Paddmissing := nullpicture;
  picture Pwoletters; Pwoletters := nullpicture;
  numeric testwithin ;

%-- 



  for i within tt :

if stroked i or filled i :
  testwithin :=0;

  for j within tt :
if stroked j or filled j:
  if (((xpart llcorner i) > (xpart llcorner j)) and
  ((ypart llcorner i) > (ypart llcorner j)) and
  ((xpart urcorner i) < (xpart urcorner j)) and
  ((ypart urcorner i) < (ypart urcorner j))) :
  testwithin :=1;
  fi;
fi;
  endfor;

  if testwithin == 1:
addto Paddmissing contour
  (pathpart i)
  withcolor \MPcolor{ColorLow};
  else:
addto Pwoletters contour
  (pathpart i)
  withpostscript "collect";
  fi;

fi ;
  endfor ;

%-- 



  addto Pwoletters contour
bb
withpostscript "evenodd"
withcolor \MPcolor{ColorLow};
  draw Pwoletters ;
  draw Paddmissing ;

\stopMPpage
___
If your question is of interest to others as well, please add an 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] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Garulfo

Thanks Taco,

I made some progress :
https://wiki.contextgarden.net/Talk:Cover_Pages

I now have two additional questions ... ;-)

- How can I deal with "space" characters (because current solution
  requires to explicitly add the ~ character)

- What would be the work to do in order to make this mechanism directly
  usable in metapost / metafun, within \startMPpage \stopMPpage,
  - to avoid switching between \start\stopMPdrawing and TeX
  - to have something like "draw followtext" in mp-blob.mpiv ?



%--

\setuppapersize  [A4]

%--

\def\MyFont{\definedfont[name:%
texgyrepagellabold%
%exo2black%
%agaramondprobold%
*default at 55pt]}

%--

\startluacode

function document.outlinepaths(character)
local chardata  = fonts.hashes.characters[true] -- by unicode
local shapedata = fonts.hashes.shapes[true] -- by index
local c = chardata[character]
if c and c.index and shapedata then
local shapeglyphs = shapedata.glyphs or { }
local glyph   = shapeglyphs[c.index]
if glyph and (glyph.segments or glyph.sequence) then
local units  = shapedata.units or 1000
local factor = 100/units
return fonts.metapost.paths(glyph,factor)
end
end
return { }
end

function document.defineoutline(char,target)
local outlines = document.outlinepaths(char)
local nofpaths = #outlines
context("\\startMPdrawing")     -- ADDED by 
garulfo

context("path %s[] ;",target)
context("numeric %sn ; %sn := %s ;",target,target,nofpaths)
for i=1,nofpaths do
context("%s[%i] := %s ; ",target,i,outlines[i])
end
context("\\stopMPdrawing")  -- ADDED by 
garulfo

end

\stopluacode

%--

\def\mpdefineoutlines#1#2{\ctxlua{document.defineoutline(\number`#1,"#2")}}

%--

\def\EmptyLetters#1%
{%
\resetMPdrawing
\MPtoks={}
%
\startMPdrawing
  picture pic[], pictA ;
  numeric wid[], len[], pos[], n ;
  wid[0] := len[0] := pos[0] := n := 0 ;
  numeric scaling;
  path pictB , frame ;
  pair shiftB ;
  picture monImageA; monImageA := nullpicture;
  picture monImageB; monImageB := nullpicture;
  color colorframe;  colorframe := 0.6white;
%
\stopMPdrawing
%
\MyFont\handletokens#1\with\whatever
%
\startMPdrawing
  frame :=  unitsquare
  xscaled ( (xpart urcorner monImageB - xpart llcorner 
monImageB) + 5mm )
  yscaled ( (ypart urcorner monImageB - ypart llcorner 
monImageB) + 5mm );

  frame := frame shifted (center monImageB - center frame);
  addto monImageB contour
frame
withpostscript "evenodd"
withcolor transparent (1,1.,colorframe);
  draw monImageB ;
  draw monImageA ;
\stopMPdrawing
%
\MPdrawingdonetrue
\getMPdrawing}

%--

\def\whatever#1%
  {\appendtoks#1\to\MPtoks
   \setbox\MPbox=\hbox{\MyFont\the\MPtoks}%
   %
   \startMPdrawing
 n := n + 1 ; len[n] := \the\wd\MPbox ;
   \stopMPdrawing
   %
   \mpdefineoutlines{M}{MaLettre}
   %
   \startMPdrawing
   pictA := textext.drt("\MyFont M") ;
   pictB := MaLettre[1];
   scaling := bbheight pictA / bbheight pictB;
   \stopMPdrawing
   %
   \doifinstringelse{~}{#1}{}{%HOW TO PROPERLY COPE 
WITH SPACES ?

   \mpdefineoutlines{#1}{MyGlyph}
   %
   \startMPdrawing
 string sb; sb := "i";
 pic[n] := textext.drt("\MyFont\setstrut\strut#1") ;
 %
 shiftB := - llcorner pic[n];
 pic[n] := pic[n] shifted shiftB ;
 %
 wid[n] := abs(xpart urcorner pic[n] - xpart llcorner pic[n]) ;
 pos[n] := len[n]-wid[n] ;
 %
 addto monImageB contour
   ((MyGlyph[1] scaled scaling)
   shifted ( (pos[n],0) +  shiftB))
   withpostscript "collect";
 %
 if MyGlyphn > 1 :
for ind=2 upto MyGlyphn :
if (((xpart llcorner MyGlyph[ind]) > (xpart llcorner 
MyGlyph[1])) and
((ypart llcorner MyGlyph[ind]) > (ypart llcorner 
MyGlyph[1])) and
((xpart urcorner MyGlyph[ind]) < (xpart urcorner 
MyGlyph[1])) and
((ypart urcorner MyGlyph[ind]) < (ypart urcorner 
MyGlyph[1]))) :

%
addto monImageA contour
  (MyGlyph[ind] scaled scaling)
  shifted ( (pos[n],0) +  shiftB)
  withcolor transparent (1,1.,colorframe);
else :
addto monImageB contour
  (

[NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-21 Thread Garulfo

Hi,


* I try to "remove the paths of text" from a metapost pictures to let
  the background visible.

* Using
  https://mailman.ntg.nl/pipermail/ntg-context/2018/thread.html#92725

* I was able to get the following with one glyph (MVE code below)

  https://wiki.contextgarden.net/images/d/d2/test_extract_glyphs.pdf


2 questions:

1/ for some fonts (e.g. dejavu vs latin modern) the "encompassing" path
   of the B glyph can switch from B[1] to B[Bn]. Is there a trick to
   identify which id match with "the encompassing" path ?

2/ now, I would like to do the same, but for text... a kind of
   derivative of "textext" or "outlinetext".
   Would you please give me some guidelines ?
does it already exist ?
should I use something like \handletokens, \scantokens ?
do you have examples where I can get inspiration ?


Thanks again for your help,
Garulfo


%==




\starttext

%--

\startluacode

function document.outlinepaths(character)
local chardata  = fonts.hashes.characters[true] -- by unicode
local shapedata = fonts.hashes.shapes[true] -- by index
local c = chardata[character]
if c and c.index and shapedata then
local shapeglyphs = shapedata.glyphs or { }
local glyph   = shapeglyphs[c.index]
if glyph and (glyph.segments or glyph.sequence) then
local units  = shapedata.units or 1000
local factor = 100/units
return fonts.metapost.paths(glyph,factor)
end
end
return { }
end

function document.defineoutline(char,target)
local outlines = document.outlinepaths(char)
local nofpaths = #outlines
context("path %s[] ;",target)
context("numeric %sn ; %sn := %s ;",target,target,nofpaths)
for i=1,nofpaths do
context("%s[%i] := %s ; ",target,i,outlines[i])
end
end

\stopluacode

%--

\def\mpdefineoutlines#1#2{\ctxlua{document.defineoutline(\number`#1,"#2")}}

%--

\startMPpage

numeric dimA ; dimA := 20cm;

path pathbackground ;
pathbackground :=  unitsquare scaled dimA ;
fill pathbackground withshademethod "linear" withshadedirection(0,1) 
withshadecolors (red,blue);


%--

\mpdefineoutlines{B}{B}

%--

numeric dimB  ; dimB := 2cm;
numeric vratio ; vratio := 2;

path frame ;
frame :=  unitsquare
  xscaled (dimA - 2 * dimB)
  yscaled (dimA / vratio)
  shifted (dimB , (dimA - (dimA / vratio))/2 );

%--

pair shift ; shift := center frame;
numeric scal ; scal := (0.9) * (10cm / (bbheight B[1])) ;

picture monImageB; monImageB := nullpicture;
addto monImageB contour
  (B[1] shifted (- center B[1]) scaled scal)
  shifted shift
  withpostscript "collect";

addto monImageB contour
  frame
  withpostscript "evenodd";

for i=2 upto Bn :
  addto monImageB contour
(B[i] shifted (- center B[1]) scaled scal)
shifted shift;
endfor ;

%--

draw monImageB withcolor white;

\stopMPpage

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

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


[NTG-context] A link to an example of poster build with ConTeXt

2020-12-19 Thread Garulfo

Hi,

it's really fun to play with ConTeXt and MetaPost / Metafun to build 
posters (color, fonts, alignment, scaling, randomized geometry).


Thanks to the ConTeXt team to make it easy.

PDF:

https://salsa.debian.org/zleap-guest/libreplanet2021/-/raw/master/ConTeXt_version/poster_libreplanet_2021.pdf

Source code:

https://salsa.debian.org/zleap-guest/libreplanet2021/-/blob/master/README.md
___
If your question is of interest to others as well, please add an 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] \framed command: (strange ?) difficulty to control the interlinespace between the first and the second line

2020-11-16 Thread Garulfo

Hi,

with a simple application of \framed, see MWE below, the space between 
the first line and the second line doesn't match with the others (gap is 
bigger).


I get similar results:
- with my computer and live.contextgarden.net
- with context 2019.03.21 and 2020.11.08


1. Is it the expected behavior ?
2. What is the recommended way to benefit from the functionnalities of
   \framed but without this effect ?


Many thanks again for your support.



== MWE =

\setupbodyfont[sans, 16pt]

\starttext

\framed[align=flushleft,offset=0pt,frame=off,foregroundcolor=darkred]
{\WORD\tfb
Ce titre est trop long pour ce
Ce titre est trop long pour ce
Ce titre est trop long pour ce
Ce titre est trop long pour ce}

\blank[big]
\startalignment[flushleft]
{\WORD\tfb
Ce titre est trop long pour ce
Ce titre est trop long pour ce
Ce titre est trop long pour ce
Ce titre est trop long pour ce}
\stopalignment

\blank[big]
\vbox{\raggedright\WORD\tfb
Ce titre est trop llong pour ce
Ce titre est trop llong pour ce
Ce titre est trop llong pour ce
Ce titre est trop llong pour ce}

\blank[big]
\ruledvtop{\raggedright\WORD\tfb
Ce titre est trop llong pour ce
Ce titre est trop llong pour ce
Ce titre est trop llong pour ce
Ce titre est trop llong pour ce}

\blank[big]
\framed[offset=0pt,frame=off,foregroundcolor=darkgreen]
{\ruledvtop{\raggedright\WORD\tfb
Ce titre est trop llong pour ce
Ce titre est trop llong pour ce
Ce titre est trop llong pour ce
Ce titre est trop llong pour ce}}

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

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


Re: [NTG-context] How to reproduce a particular head/title style (reformat)

2020-11-15 Thread Garulfo

Hi,

finally I made some progress and uploaded files to the wiki in "Reports 
and articles" Samples section 
(https://wiki.contextgarden.net/Sample_documents)


Initial PDF document:
> 
https://www.hautconseilclimat.fr/wp-content/uploads/2020/10/hcc_rapport_maitriser-lempreinte-carbone-de-la-france-1.pdf 



ConTeXt output :
> 
https://wiki.contextgarden.net/images/4/45/2020_hcc_rapport_maitriser-l-empreinte-carbone-de-la-france.pdf


ConTeXt input files (build with pdftotext > markdown > pandoc > manual 
work and inkscape):
> 
https://wiki.contextgarden.net/images/4/45/2020_hcc_rapport_maitriser-l-empreinte-carbone-de-la-france.pdf


Any feedback is welcome (even if source code is not really clean)

I learned a lot, and I definitely recommend such an exercise for 
document design with ConTeXt :

- take a PDF file with a design you appreciate
- extract the content
- try to reproduce the design with ConTeXt



I would like to learn "how to ConTeXt" complex titles styles like the 
one seen in the following document:

- https://wiki.contextgarden.net/images/f/f1/Screenshot_20201103_220818.png
- source document: 
https://www.hautconseilclimat.fr/wp-content/uploads/2020/10/hcc_rapport_maitriser-lempreinte-carbone-de-la-france-1.pdf 



1. doublesided document
 
2. on both side, section title are underlined by a red rule, always 
"left aligned" in the text area, shifted to the right by the same 
distance than it is done for the text of the title, which ends at the 
right border of the page


3. on the left page : section title are overlined by a "second red 
rule", which starts "left aligned" in the text area, and goes across the 
whole page width


4. on the right page : the "second red rule" starts from the left border 
of the page, and terminates at the end of the text area

___
If your question is of interest to others as well, please add an 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] How to reproduce a particular head/title style (reformat)

2020-11-03 Thread Garulfo

Hi,



I would like to learn "how to ConTeXt" complex titles styles like the 
one seen in the following document:




- https://wiki.contextgarden.net/images/f/f1/Screenshot_20201103_220818.png

- source document: 
https://www.hautconseilclimat.fr/wp-content/uploads/2020/10/hcc_rapport_maitriser-lempreinte-carbone-de-la-france-1.pdf




Please, what would be a preferred way ?



- overlay ?

- overlay and layer ?
- \setuphead with before/after ?

- \setupfloat[bleedfigure] and \placebleedfigure{}{\blackrule}





I try to describe the specification here :



1. doublesided document


2. on both side, section title are underlined by a red rule, always 
"left aligned" in the text area, shifted to the right by the same 
distance than it is done for the text of the title, which ends at the 
right border of the page



3. on the left page : section title are overlined by a "second red 
rule", which starts "left aligned" in the text area, and goes across the 
whole page width



4. on the right page : the "second red rule" starts from the left border 
of the page, and terminates at the end of the text area





A last detail (very nice, but can be forgotten because I suppose it will 
involve more complex stuff) : the "second red rule" from the left 
page... it continues a little bit on the right page.






Thanks a lot for any help !















___
If your question is of interest to others as well, please add an 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] How to reproduce a particular head/title style

2020-11-03 Thread Garulfo

  
  
Hi,

I would like to learn "how to ConTeXt" complex titles styles like
  the one seen in the following document:


  https://wiki.contextgarden.net/images/f/f1/Screenshot_20201103_220818.png
  original document:
https://www.hautconseilclimat.fr/wp-content/uploads/2020/10/hcc_rapport_maitriser-lempreinte-carbone-de-la-france-1.pdf

Please, what would be a preferred way ?

  overlay ? 
  
  \setuphead with before/after ? 
  
  \setupfloat[bleedfigure] and \placebleedfigure{}{\blackrule}



I try to describe the specification here :


  doublesided document
  on both side, section title are underlined by a red rule,
always "left aligned" in the text area, shifted to the right by
the same distance than it is done for the text of the title,
which ends at the right border of the page
  
  on the left page : section title are overlined by a "second
red rule", which starts "left aligned" in the text area, and
goes across the whole page width
  on the right page : the "second red rule" starts from the left
border of the page, and terminates at the end of the text area

Last detail (very nice, but can be forgotten because I suppose it
will involve more complex stuff) : the "second red rule" from the
left page... it continues a little bit on the right page.


Thanks a lot for any help !







  
  
  

  

___
If your question is of interest to others as well, please add an 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] issue with current latest (2020.07.20)

2020-07-20 Thread Garulfo
I don't know if there is link with this thread, but after update I get 
the following with "context --make" or "context --make fr"


resolvers   > lua > unknown file 'mult-fmt.lua'
error loading file: mult-fmt.lua (aborting)resolvers   | formats |


Le 20/07/2020 à 18:58, Hans Hagen a écrit :

On 7/20/2020 5:11 PM, Pablo Rodriguez wrote:

On 7/20/20 3:41 PM, Hans Hagen wrote:

On 7/20/2020 3:01 PM, Pablo Rodriguez wrote:

Dear list,

with current latest (LuaTeX 2.06 20200717 + ConTeXt MkIV 2020.07.20
10:48), I cannot open luametatex.pdf (its SHA256 reads
cff8b660b65f4f8c121c170bcd59545c5467a7db02614da137e622ef1c5f3964).

Acrobat for Linux complains about malformed document and Evince doesn’t
display anything. Latest mupdf-gl complains about broken xref (mupdf
complains too):

    error: cannot recognize xref format
    warning: trying to repair broken xref
    warning: repairing PDF document

I experience issues in Windows with current latest:

  \starttext
  \input zapf
  \stoptext

The output PDF document opens in SumatraPDF fine. But in Acrobat DC, no
character is displayed.

can you check again


Many thanks for your fast reply, Hans.

Acrobat DC in Windows displays characters fine.


(Here I only test with summatra and occasionally with acrobat reader or 
some old acrobat prof.)



luametatex.pdf cannot be opened with Evince, Acrobat for Linux or xpdf
(e45c09ed2055fab7e8de40fa5f99da4ce46e6849f306a57ac34d99487e025049).
mupdf-gl has to repair the xref.


can you check again ... i reverted something (not xref related) that 
according to the spec should be ok but it doesn't surprise me that some 
viewers don't like it (i'll look into it another time)


I can open the file in an ubuntu viewer but I'm not sure what it uses 
under the hood (don't care much either as a viewer is kind of an 
abstraction for the user).

  Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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


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

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


Re: [NTG-context] french translation of ConTeXt interface - progress (v3)

2020-07-19 Thread Garulfo
And, if it makes sense for ConTeXt's community to use it as a "new" or 
an "updated" french interface, I may try to produce a 40~50 pages 
documentation for the basics commands (during 2020 S2):


or even better, I will try to use Paul + Taco + Wolfgang documentation 
framework through the wiki.

___
If your question is of interest to others as well, please add an 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] french translation of ConTeXt interface - progress (v3)

2020-07-19 Thread Garulfo

file name can be confusing, it's not yet complete

TypeNames   TranslationsAchievement 
commands3962954 24%
constants   841 708 84%
elements26  25  DONE
setupstrings135 56  41%
variables   1330680 51%
6294242339%


Following your feedbacks, I will update it and improve its consistency.

As you advised, I will try first to complete constants and variables 
(keys/values) during July and August.


And, if it makes sense for ConTeXt's community to use it as a "new" or 
an "updated" french interface, I may try to produce a 40~50 pages 
documentation for the basics commands (during 2020 S2):


• \starttext
• \startchapter, \startsection, \starttitle, \startsubject,
\setuphead,  \completecontent
• \em, \bf, \cap,
• \startitemize, \startitem,  \starthead,
• \placefigure, \externalfigure,
• \placetable, \starttable,\starttabulate, \setupTABLE, \bTABLE
• \index, \completeindex
• \setuplayout, \setupfootertexts et \setupheadertexts
• \definedescription, \defineenumeration
• \at, \in


Anyway, thanks again for your support.


Le 19/07/2020 à 22:55, Hans Hagen a écrit :

On 7/19/2020 8:27 PM, Garulfo wrote:


file: mult-def.lua.complet

i'll have a look at it

Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

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


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

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


Re: [NTG-context] french translation of ConTeXt interface - progress (v3)

2020-07-19 Thread Garulfo

@Pablo Rodriguez

Thanks, and indeed behavior changes with the following commands:

\configurertête[section,chapitre,sujet]
   [couleur=couleurtitre,
indenterensuite=oui]

\configurerflottant[indenterensuite=oui]

\configurerformule[indenterensuite=oui]


___
If your question is of interest to others as well, please add an 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] french translation of ConTeXt interface - progress (v3)

2020-07-19 Thread Garulfo

Thanks a lot !!

I'm beginning to be able to typeset some simple example without any 
struggle.


https://wiki.contextgarden.net/File:modele_bonjour_le_monde.pdf

The input file is attached in this mail.

I have only one remaining issue with this example: the indentation.
Despite \setupindenting[medium, yes], the paragraphs are not 
systematically indented, and I don't really understand the pattern 
behind it.


The point is also visible on the original english version
https://wiki.contextgarden.net/File:Hello-world.pdf



Le 19/07/2020 à 15:13, Wolfgang Schuster a écrit :

Garulfo schrieb am 19.07.2020 um 13:23:


Hi Wolfgang,

still working on the translation... (Hans pointed out the 
possibilities due to the support of UTF-8, which are just great for 
french language)


zip: https://wiki.contextgarden.net/File:MWE_test_itemize_french.zip

I have difficulties with a simple example
file: MWE_test_itemize_french.tex

% interface=fr
\configurerdétailler[style=gras]
\débuttexte
\débutdétailler[a]
\élément Texte premiere
\élément Texte second
\findétailler
\fintexte

It works properly with "minimal" modifications of mult-def.lua
file: mult-def.lua.initial+diffminimalsetupitemize
https://wiki.contextgarden.net/File:MWE_test_itemize_french.zip

but with a more complete mult-def.lua
file: mult-def.lua.complet

I get "The control sequence at the end of the top line of your error 
message was never \def'ed. You can just continue as I'll forget about 
whatever was undefined."


Could you please help me find my way around: what do I need to pay 
attention to so that my other modifications don't break the whole 
mechanism?


Everything works as expected but you have set a string for the endsetup 
element which has become part of your \setupitemize command.



Setup commands are created in the following way:

 +  + 

this creates in your case the command

\configurerdétaillerfinconfigurer


As you don't want this leave the value of endsetup empty.

Wolfgang
% interface=fr

% Document "Bonjour tout le monde!" pour le système de composition ConTeXt
%
% === Histoire ===
% 2020-07-18  Garulfo 
% * Passage en français
% 2006-12-29  Sanjoy Mahajan  
% * Création
%
% Ce document est du domaine public (pas de droits d'auteur).

%===

\configurercouleurs[état=activé]   % sinon le document est en liveau de gris

\définircouleur[couleurtitre][r=0.80,b=0.1,g=0.1]

% Métadata du document
\configurerinteraction[état=activé,% rendre les liens hypertextes actifs
  titre={Bonjour le monde!},
  soustitre={Un modèle ConTeXt},
  auteur={Garulfo},
  motclé={modèle ConTeXt}]

% urls utiles
\utiliserURL[courriel-auteur][mailto:a.u.t...@quelque.part][][a.u.t...@quelque.part]
\utiliserURL[wiki]   [http://wiki.contextgarden.net][][wiki \ConTeXt\ ]
\utiliserURL[garulfo][mailto:garu...@azules.eu] [][garu...@azules.eu]

% Composition format A4, impression format A4
\configurertaillepapier[A4][A4]
\configurermiseenpage
  [ espacehaut=2cm,
espacearrière=2.5cm,
entête=24pt,
pdp=36pt,
hauteur=milieu,
largeur=milieu]

% Décommenté ma migne suivant pour visualier la mise en page
% \montrercadre


% en-tête et pied de page

\configurerpdp[style=\italique]
\configurertextespdp[\date \hfill Modèle \ConTeXt]
\configurernumérotationpage[emplacement={entête,droite}, style=gras]

\configurerpolicedecorps[11pt] % 12pt par défaut

\configurertête[section,chapitre,sujet][couleur=couleurtitre]

\configurertête[section,sujet][style={\ss\bfa},
  avant={\grandespace\grandespace}, après={}]

\configurertête[chapitre][style={\ss\bfd}]

\configurertête[titre][style={\ss\bfd},
  avant={\begingroup\configurerpolicedecorps[14pt]},
  après={\lignegauche{\ss\tfa A. U. Teur $\langle$\de[courriel-auteur]$\rangle$}
\grandespace\grandespace\endgroup}]

\configurerdétailler[entre={}, style=gras]

% configurer l'espacement inter-paragraphes
\configurerespaceblanc[moyen]

% Commenter la ligne suivante pour ne pas indenter les paragraphes
\configurerindentation[oui, moyen, toujours]

\langueprincipale[fr]
\langue[fr]

\configureraligner[tolerant]

\débuttampon[tuftefr]
Nous nous  épanouissons dans les  mondes de l'information  - des mondes  épais -
grâce  à notre  merveilleuse  et quotidienne  capacité  à sélectionner,  éditer,
isoler,  structurer,   mettre  en   évidence,  regrouper,   jumeler,  fusionner,
harmoniser,  synthétiser, concentrer,  organiser,  condenser, réduire,  réduire,
choisir, catégoriser, cataloguer, classer, énumérer, résumer, scanner, examiner,
idéaliser,   isoler,  discriminer,   distinguer,  cribler,   mettre  en   boîte,
sélectionner, trier, intégrer, mélanger,  Inspecter, filtrer, regrouper, sauter,
lisser,  en  morceaux,  moyenner,  approximer,  regrouper,  agréger,  délimiter,
résumer, détailler,  passer en revue,  plonger, feuilleter, parcourir,  j

Re: [NTG-context] french translation of ConTeXt interface - progress (v3)

2020-07-19 Thread Garulfo


Hi Wolfgang,

still working on the translation... (Hans pointed out the possibilities 
due to the support of UTF-8, which are just great for french language)


zip: https://wiki.contextgarden.net/File:MWE_test_itemize_french.zip

I have difficulties with a simple example
file: MWE_test_itemize_french.tex


% interface=fr
\configurerdétailler[style=gras]
\débuttexte
\débutdétailler[a]
\élément Texte premiere
\élément Texte second
\findétailler
\fintexte

It works properly with "minimal" modifications of mult-def.lua
file: mult-def.lua.initial+diffminimalsetupitemize
https://wiki.contextgarden.net/File:MWE_test_itemize_french.zip

but with a more complete mult-def.lua
file: mult-def.lua.complet

I get "The control sequence at the end of the top line of your error 
message was never \def'ed. You can just continue as I'll forget about 
whatever was undefined."




Could you please help me find my way around: what do I need to pay 
attention to so that my other modifications don't break the whole mechanism?



Thank you again for your patience
___
If your question is of interest to others as well, please add an 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] french translation of ConTeXt interface - progress (v3)

2020-07-18 Thread Garulfo

> @Garulfo: Do you have a special use case in mind, or do you do this
> for fun?

"for fun" isn't quite right, although there's probably some truth to it.
Actually, translating 6,300 keywords isn't fun, and it's even worst when 
you don't really master the material behind...


The point is that I am sad to not be able to offer the use of ConTeXt 
(such a great piece of software) to friends and childrens.

And ConTeXt complexity or ConTeXt documentation are not the first hurdles.

When you start with a new software, a new methodology, having first to 
struggle with vocabulary in a foreign language is definitively a (BIG) 
thorn in your side (in fact, usually you just don't start).


Many popular softwares offer multi-language early in their development 
(netscape / firefox, scratch, wordpress, krita...).
ConTeXt did it, the infrastructure is ready, the translations exist, at 
least partially or at an early stage.


And when I started to use it, I thought that it could easily be improved 
and updated without requiring any Tex / Lua skills.


One remark : I was wrong, I spend hours to put all the content (from 
mult-def and context-en.xml) in a simple csv table and building 
quick scripts to put it back in mult-def.




> With our small developer and user base we struggle enough with keeping
> documentation current.

Struggle likely appears about not-so-trivial needs.

It's a shame not to use it in Italian / Russian / Chinese / French 
etc... for a letter, for a 10 to 20 pages report, for an internal note.


All the more so as the software allows it. The point is that the 
interface just deserves a minimal update and documentation, and that, as 
you point it, the small developer and user base doesn't have time to do it.





___
If your question is of interest to others as well, please add an 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] french translation of ConTeXt interface - progress (v3)

2020-07-14 Thread Garulfo


Hi,

a "early-alpha-version" of updated setup-fr.pdf
https://wiki.contextgarden.net/File:setup-fr.pdf

with the associated mult-def.lua.
https://wiki.contextgarden.net/File:20_output_mult-def_garulfo.zip

Any feedback will be welcome.

To developers : what priorities, in terms of categories,
would you advise for the translation ?

%-

Progress:

TYPE TOTALDONE
commands  3962 94324%
constants  841 70884%
elements26  26   100%
setupstrings   135  5742% = 100% other are { ( |...
variables 1329 63248%

  6293236638%


CATEGORYTOTALDONE
alignment   1639256%
attribute23 2 9%
background  1587145%
bibliography1482014%
buffer   301653%
catcode  22 418%
characters   59   0%
colors  1083230%
conditional  59   0%
counter 3117223%
float 1   0%
fonts   453   22449%
graphics2478836%
language2237333%
layout  1737946%
lua  42 1 2%
mathematics 3694211%
nan 650   57288%
None   1269   118 9%
pdf 2289943%
references   804253%
rules854553%
structure   892   56764%
symbols 1101917%
system3   0%
tables  1033231%
verbatim 221777%
whitespace  1073028%
xml 155 9 6%

   6293  236638%




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

2020-07-01 Thread Garulfo

Great ! Many thanks.

Le 01/07/2020 à 17:57, Taco Hoekwater a écrit :

Hi all,

Today I updated the ConText behind wiki.contextgarden.net, 
live.contextgarden.net and source.contextgarden.net to the current latest: 
2020.06.30 17:30.

* The wiki’s  tag now defaults to “lmtx” mode, and you can switch back 
to “mkiv“ using the  “mode” attribute. The “mkii” mode is no longer working.
* The wiki’s  now supports the latest ConText as well, and I added 
support for all the “system-level” commands. Also the colors have changed a little 
and generated commands now have a link back to generating command.

* the live website always run lmtx.

* the source website’s software has been improved a little as well; I have 
updated the documentation page accordingly.

Happy TeXing,
Taco


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

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


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

2020-06-30 Thread Garulfo



The cause for the missing translations is this line in x-setups-basics.mkiv
 replace('cd:instances/cd:constant', 'value', variables)
which works only when the instances are listed in the command entry like this
 
 ...
 
 
 
 
which is never the case because I load the entries with cd:resolve like here:
 
 
 

 
 ...
 
 
 
 


Thanks a lot Wolfgang for the explanations.

A remaining question, due to the fact that I am not sure to understand 
all the implications:
Is there some hope to find a solution to also translate the "cd:resolve" 
entries for the setup-xx.pdf files ? or does it mean that such a request 
is not compatible with the basic structure of the data / of the 
translation process ?


Thanks again, for your help and for your time.
___
If your question is of interest to others as well, please add an 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] Translation of ConTeXt interface

2020-06-30 Thread Garulfo

Hi Alan,

i will not forget your remark, I don't remember why I get to such a 
translation. Maybe after working on translation and consistency between 
these ~2000 keywords...


For "corps" and "fonte", it will be easy to change (there is not a lot 
of tags)


If you agree, when I will have something "working", I will submit it to 
you, in order to get your feedback (just a 10 to 15 minutes overview can 
enable to catch the major issues)




Le 27/06/2020 à 18:18, Alan Braslau a écrit :

fonte ? (police)
principale ? (corps)
...

Alan

On 26/06/20 16:04, Garulfo wrote:



Math. I get the following error :

fonts  > preloading latin modern fonts (second stage)
fonts  > defining > font with asked name 'fichier' is not found 
using lookup 'file'

fonts  > defining > unknown font 'fichier', loading aborted

I suppose that due to the translation of "file" to "fichier".
It's OK when I switch back to
- setupstrings    cd:file ==> file
You can translate these string because they are only used in the 
command list to provide the texts which are shown in uppercase 
letter, e.g. NUMBER.

- variables file    ==> file
Constants (\c!...) and variables (\v!...) can be changed, only 
parameters which use the form \s!... have to be english in all cases 
(saves memory and improves performance).
How can I translate the variable "file" into fichier, without 
messing with fonts (and maybe other file related functions)
There shouldn't be a problem with fonts because they use \s!file or 
\s!name which aren't translated (unless you made the mistake and have 
\c!file in your typescripts). It's possible there is a bug somewhere 
but you have to provide a minimal example.


My understanding:

I translated \setupbodyfont into \configurerfonteprincipale.

But I didn't specify any font in the input file.

As soon as I specified \configurerfonteprincipale[pagella,10pt] in the 
input file, font messages "'fichier' is not found" disappear.


Is there an additionnal thing to do in order to enable the loading of 
a default math font, without any font specification, but still with 
translations of "file" into "fichier" ?



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

2020-06-28 Thread Garulfo
Do you think it would be easy to change the current behavior ? do you want me 
to try to propose a workaround ? I am not so familiar with mkiv files, but I 
can try.


> Le 27 juin 2020 à 19:16, Wolfgang Schuster 
>  a écrit :
> 
> Garulfo schrieb am 27.06.2020 um 19:00:
>> Hi Wolfgang,
>> 
>> Did you manage to have a look at the previous message
>> Fri Jun 26 23:38:48 CEST 202023
>> https://mailman.ntg.nl/pipermail/ntg-context/2020/098596.html
>> 
>> It contains two MWE :
>> 
>> 1/ mult-def.lua.test1_figure.diff
>> 
>> 2/ mult-def.lua.test2_itemize.diff + test2_itemize.tex
>> 
>> (not about the font issue, but the two others)
> 
> The cause for the missing translations is this line in x-setups-basics.mkiv
> 
> replace('cd:instances/cd:constant', 'value', variables)
> 
> which works only when the instances are listed in the command entry like this
> 
> 
> ...
> 
> 
> 
> 
> 
> which is never the case because I load the entries with cd:resolve like here:
> 
> 
> 
> 
> 
> 
> ...
> 
> 
> 
> 
> 
> Wolfgang
> 

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

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


Re: [NTG-context] Translation of ConTeXt interface

2020-06-27 Thread Garulfo

Hi Wolfgang,

Did you manage to have a look at the previous message
Fri Jun 26 23:38:48 CEST 202023
https://mailman.ntg.nl/pipermail/ntg-context/2020/098596.html

It contains two MWE :

1/ mult-def.lua.test1_figure.diff

2/ mult-def.lua.test2_itemize.diff + test2_itemize.tex


(not about the font issue, but the two others)






Le 27/06/2020 à 12:02, Wolfgang Schuster a écrit :

Garulfo schrieb am 27.06.2020 um 00:04:
How can I translate the variable "file" into fichier, without 
messing with fonts (and maybe other file related functions)
There shouldn't be a problem with fonts because they use \s!file or 
\s!name which aren't translated (unless you made the mistake and have 
\c!file in your typescripts). It's possible there is a bug somewhere 
but you have to provide a minimal example.


My understanding:

I translated \setupbodyfont into \configurerfonteprincipale.

But I didn't specify any font in the input file.

As soon as I specified vpagella,10pt] in the input file, font messages 
"'fichier' is not found" disappear.


Is there an additionnal thing to do in order to enable the loading of 
a default math font, without any font specification, but still with 
translations of "file" into "fichier" ?


I'm unable to reproduce the error.

I added the "configurerfonteprincipale" to mult-def.lua and can use it 
in your itemize test document without problems.


It helps to have a example which produces the error and your complete 
mult-def.lua file.


Also helpful is to add \tracingall (or just \tracingmacros=2) before 
\configurerfonteprincipale to get more informations what's happening 
with the command.


Wolfgang


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

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


Re: [NTG-context] Translation of ConTeXt interface

2020-06-26 Thread Garulfo



Math. I get the following error :

fonts  > preloading latin modern fonts (second stage)
fonts  > defining > font with asked name 'fichier' is not found using 
lookup 'file'

fonts  > defining > unknown font 'fichier', loading aborted

I suppose that due to the translation of "file" to "fichier".
It's OK when I switch back to
- setupstrings    cd:file ==> file
You can translate these string because they are only used in the command 
list to provide the texts which are shown in uppercase letter, e.g. NUMBER.

- variables file    ==> file
Constants (\c!...) and variables (\v!...) can be changed, only 
parameters which use the form \s!... have to be english in all cases 
(saves memory and improves performance).
How can I translate the variable "file" into fichier, without messing 
with fonts (and maybe other file related functions)
There shouldn't be a problem with fonts because they use \s!file or 
\s!name which aren't translated (unless you made the mistake and have 
\c!file in your typescripts). It's possible there is a bug somewhere but 
you have to provide a minimal example.


My understanding:

I translated \setupbodyfont into \configurerfonteprincipale.

But I didn't specify any font in the input file.

As soon as I specified \configurerfonteprincipale[pagella,10pt] in the 
input file, font messages "'fichier' is not found" disappear.


Is there an additionnal thing to do in order to enable the loading of a 
default math font, without any font specification, but still with 
translations of "file" into "fichier" ?


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

2020-06-26 Thread Garulfo
So, I'm still doing something wrong, because changing the translation 
of "figure" in "mult-def.lua" (in the part "variables"), only affect :

1- command "\startfigure    \stopfigure"
2- "figure" in "\setuppageinjection" > alternative = figure buffer...
You have to provide your modified mult-def.lua file, otherwise there is 
no way to check what's wrong.


Patch file : mult-def.lua.test1_figure.diff

context --make fr
context --interface=fr --global --result=setup-fr x-setups-overview.mkiv

Then the pdf file shows
- \demarrefigurefr as expected (p62)
but
- \placefigure instead of \placefigurefr (p190)
- \demarreplacefigure  instead of \demarreplacefigurefr (p72)


the translation of the variable "itemize" has no impact on the 
setup-fr.pdf file produced
But, I just found that if I actually use the translated commands in a 
test.tex file, it just works.

Same as above, provide your translations.


Patch file : mult-def.lua.test2_itemize.diff
Input file : test2_itemize.tex

context --make fr
context --interface=fr --global --result=setup-fr x-setups-overview.mkiv
context test2_itemize.tex

setup-fr.pdf shows "\debutitemize  ... \finitemize" page 41
instead of "\debutlister   ... \finlister"

but the input file, with "\debutlister   ... \finlister", works great.

There shouldn't be a problem with fonts because they use \s!file or 
\s!name which aren't translated (unless you made the mistake and have 
\c!file in your typescripts). It's possible there is a bug somewhere but 
you have to provide a minimal example.


Understood, I am going to check.
--- mult-def.lua.initial	2020-06-26 10:40:39.0 +0200
+++ mult-def.lua	2020-06-26 14:21:55.598929654 +0200
@@ -13522,7 +13522,7 @@
["cs"]="obrazek",
["de"]="abbildung",
["en"]="figure",
-   ["fr"]="figure",
+   ["fr"]="figurefr",
["it"]="figura",
["nl"]="figuur",
["pe"]="شکل",
--- mult-def.lua.initial	2020-06-26 10:40:39.0 +0200
+++ mult-def.lua	2020-06-26 23:16:25.039895542 +0200
@@ -5444,7 +5444,7 @@
["cs"]="starttext",
["de"]="starttext",
["en"]="starttext",
-   ["fr"]="demarretexte",
+   ["fr"]="debuttexte",
["it"]="iniziatesto",
["nl"]="starttekst",
["pe"]="شروع‌متن",
@@ -5846,7 +5846,7 @@
["cs"]="stoptext",
["de"]="stoptext",
["en"]="stoptext",
-   ["fr"]="stoppetexte",
+   ["fr"]="fintexte",
["it"]="terminatesto",
["nl"]="stoptekst",
["pe"]="پایان‌متن",
@@ -10758,7 +10758,7 @@
["cs"]="start",
["de"]="start",
["en"]="start",
-   ["fr"]="demarre",
+   ["fr"]="debut",
["it"]="inizia",
["nl"]="start",
["pe"]="شروع",
@@ -10792,7 +10792,7 @@
["cs"]="stop",
["de"]="stop",
["en"]="stop",
-   ["fr"]="stoppe",
+   ["fr"]="fin",
["it"]="termina",
["nl"]="stop",
["pe"]="پایان",
@@ -11861,7 +11861,7 @@
["cs"]="start",
["de"]="start",
["en"]="start",
-   ["fr"]="demarre",
+   ["fr"]="debut",
["it"]="inizia",
["nl"]="start",
["pe"]="شروع",
@@ -11871,7 +11871,7 @@
["cs"]="stop",
["de"]="stop",
["en"]="stop",
-   ["fr"]="stoppe",
+   ["fr"]="fin",
["it"]="termina",
["nl"]="stop",
["pe"]="پایان",
@@ -14398,7 +14398,7 @@
["cs"]="polozka",
["de"]="pos",
["en"]="item",
-   ["fr"]="element",
+   ["fr"]="elem",
["it"]="elemento",
["nl"]="som",
["pe"]="آیتم",
@@ -14407,7 +14407,7 @@
   ["itemize"]={
["cs"]="vycet",
["de"]="aufzaehlung",
-   ["en"]="itemize",
+   ["en"]="lister",
["fr"]="lister",
["it"]="elenco",
["nl"]="opsomming",
@@ -16505,7 +16505,7 @@
["cs"]="start",
["de"]="start",
["en"]="start",
-   ["fr"]="demarre",
+   ["fr"]="debut",
["it"]="inizia",
["nl"]="start",
["pe"]="شروع",
@@ -16529,7 +16529,7 @@
["cs"]="stop",
["de"]="stop",
["en"]="stop",
-   ["fr"]="stoppe",
+   ["fr"]="fin",
["it"]="termina",
["nl"]="stop",
["pe"]="پایان",
% interface=fr
\debuttexte
texte avant
\debutlister
\elem premier
\elem second
\finlister
texte ensuite
\fintexte 
___
If your question is of interest to others as well, please add an 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] Translation of ConTeXt interface

2020-06-26 Thread Garulfo

Thanks a lot Wolfang for your answer.
I have 5 additional questions... sorry.

---

>>  \placeFLOAT   becomes \placerFLOAT
>>  \startplaceFLOAT  becomes \debutplacerFLOAT
>>  \placerchemical   becomes \placerchemical
>>  \startplacerchemical  becomes \debutplacerchemical
>\placefigure is a combination of the element "place" (\e!place) and the
> variable "figure" (\v!figure)
>\startplacefigure is a combination of the elements "start" (\e!start)
>and "place" (\e!place) and the variable "figure" (\v!figure.)

So, I'm still doing something wrong, because changing the translation of 
"figure" in "mult-def.lua" (in the part "variables"), only affect :


1- command "\startfigure\stopfigure"
2- "figure" in "\setuppageinjection" > alternative = figure buffer...

---

I get another difficulty with \startitemize and \stopitemize

the translation of the variable "itemize" has no impact on the 
setup-fr.pdf file produced with :


context --interface=fr --global --result=setup-fr x-setups-overview.mkiv

But, I just found that if I actually use the translated commands in a 
test.tex file, it just works.


% interface=fr
\debuttexte
\debutlister
\elem first
\elem second
\finlister
\fintexte

What should I do in order to have a setup-fr.pdf file that shows the 
translations actually available ?


---

With the translation of the command textwidth, I can use
"largeur=0.5\largeurtexte" (cool !)

But this command is not listed in setup-fr.pdf.
Is there a way to add these basic commands to setup-fr.pdf ?

---

Math. I get the following error :

fonts  > preloading latin modern fonts (second stage)
fonts  > defining > font with asked name 'fichier' is not found using 
lookup 'file'

fonts  > defining > unknown font 'fichier', loading aborted

I suppose that due to the translation of "file" to "fichier".
It's OK when I switch back to
- setupstrings  cd:file ==> file
- variables file==> file

How can I translate the variable "file" into fichier, without messing 
with fonts (and maybe other file related functions)


---

> Delimited command are problematic (especially when they change
> catcodes), e.g. \startluacode use \stopluacode as hard coded delimiter
> for the environment. While it is easy to create a synonym for
> \startluacode this isn't the case for \stopluacode because the
> environment always look for \stopluacode as stopper and alternative
> names are ignored.

\startsection \stopsection   and \startformula \stopformula seem OK.

How can I identify the delimited commands that should not be translated 
in order to avoid this issue.


---
Thanks again

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

2020-06-25 Thread Garulfo

Hi,

If I understand, the translation file mult-def.lua provides 5 families
for translations:
1- commands
2- constants
3- variables
4- elements (prefix or suffix of commands) like
   - \completeREGISTER and \completeindex
    
   - \startmakeup and \stopmakeup
  ^^  ^^
5- setupstrings, to describe the syntaxe and the type of the arguments


1/ I don't understand how to impact, for example, FLOAT and chemical in:

 \placeFLOAT   becomes \placerFLOAT
 \startplaceFLOAT  becomes \debutplacerFLOAT
 \placerchemical   becomes \placerchemical
 \startplacerchemical  becomes \debutplacerchemical

2/ I don't understand the following

RUN OK:

% interface=fr
\debuttexte
\debutsection[titre=test] This is a test \finsection
\codelua{context("Foo Bar 1")}
\fintexte

DOESNT RUN
% interface=fr
\debuttexte
\debutsection[titre=test] This is a test \finsection
\debutcodelua  context("Foo Bar 2") \fincodelua
\fintexte

with:
tex error   > error not related to input file:
tex error   >   tex: ?
tex error   >   lua: ?
tex error   >   mps: -
mtx-context | fatal error: return code: 256


I suppose that some complementary modifications may be required with
\start \stop and lua


Once again, thanks a lot for your support.


Le 24/06/2020 à 23:35, Hans Hagen a écrit :

On 6/24/2020 11:01 PM, Garulfo wrote:

Hi,

I try to update and to fill the french content of mult-def.lua.

Currently, I have an updated "mult-def.lua" file. 3 questions :

1/ which commands should be executed in order to make the new local
    interface effective with context


context --make fr

btw, top lines of files can have % interface=fr


2/ which commands should be executed in order to build a local version
    of setup-fr.pdf


context --interface=fr --global --result=mysetup x-setups-overview.mkiv


3/ many commands in setup-fr.pdf are not documented in mult-def.lua
    where does the additionnal translations should come from ?

users who know the language

Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

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

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


[NTG-context] French interface - previous message = wrong title

2020-06-24 Thread Garulfo

Hi,

I try to update and to fill the french content of mult-def.lua.

Currently, I have an updated "mult-def.lua" file. 3 questions :

1/ which commands should be executed in order to make the new local
   interface effective with context

2/ which commands should be executed in order to build a local version
   of setup-fr.pdf

3/ many commands in setup-fr.pdf are not documented in mult-def.lua
   where does the additionnal translations should come from ?

Thanks a lot for your precious help.
___
If your question is of interest to others as well, please add an 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] Checking for singlesided/doublesided at run-time

2020-06-24 Thread Garulfo

Hi,

I try to update and to fill the french content of mult-def.lua.

Currently, I have an updated "mult-def.lua" file. 3 questions :

1/ which commands should be executed in order to make the new local
   interface effective with context

2/ which commands should be executed in order to build a local version
   of setup-fr.pdf

3/ many commands in setup-fr.pdf are not documented in mult-def.lua
   where does the additionnal translations should come from ?

Thanks a lot for your precious help.

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

2020-06-07 Thread Garulfo

Hi all,

New source browser is nice ! Thanks a lot.

After level 1 (Main Page / Download and Install / Documentation / 
Mailing lists), I mostly finished a review of level 2 (and some level 3) 
pages.


Several tweaks all over the place like:

- Fonts: full update for newcomers,
- Try to be responsive "enough" for smartphone
- More homogeneous style / theme
- Old Content category and tag pages, update dead links
- Layout:
  - do the todo, like merging content of paper setup + paper sizes pages
  - complete the flow with imposition
  - rework the "Further reading section", add PDF links and so on
- Programming & DB:
  - Gather "Calling Lua from TeX" and "Calling TeX from Lua"
(section +links) in a same page
- Tools:
  - segregate "core tools" and "additional tools"
  - highlight existence of mtxrun and context scripts pages
- Remove former "manually made links bar" at the top of the pages
  current structure should be enough now have an easier understanding of
  the wiki structure.

Thanks for your help Taco, Hans, Aditya, Hraban, Tomáš.

I hope that this will help to improve the reception of users and their 
willingness to contribute.


Bye.
___
If your question is of interest to others as well, please add an 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] Wiki - Proposal to update the Welcome page

2020-05-23 Thread Garulfo



1/ Concerning the Manuals Page
   - As proposed, "obsolete banners" are added to thumbnails  of the
 oldest manuals.

Looks good. A few minor comments:
I haven't tested it, but the natural tables in context examples (in 
Sec 3.6) should still work with latest versions.
The "context rehab for amsmath addicts" should be in math (or 
sciences) rather than tables. (This reminds me, I should update that 
reference).


Both corrections are made, thanks for your help.



   - About providing zips of manuals per topics: maybe we could just
 add a index.html in the distribution structure, to provide the
 user with a browsing system similar to the wiki's one.
   - If the admistrators wish, I can now replace the current page.


One concern that I have is how easy it is to navigate the page on the 
phone. Currently, it does not really work on the phone. Is there some 
way to make it more responsive?


Thanks again, of primary importance.

Should be far better now (quickly checked on two smartphones, one 
android and one ios)




2/ After  the Manuals,  please find a proposal for the Welcome Page,
   which is probably trickier
   - https://wiki.contextgarden.net/Main_Page_TempProposal
   - https://wiki.contextgarden.net/Main_Page (the current)
   - 4 objectives :
1/ do something more visual, reduce the amount of text,
Some of us prefer text. What was earlier a one step process for me (go 
to home page, search for keyword, go to page), is now a two step 
process. But I agree that the new proposed layout is more friendly to 
new users and support it.


Yes, I suspected that the current version had advantages as a result of 
past iterations.


It would be interesting to identify the links that people want to access 
in one step. We can list them in 
https://wiki.contextgarden.net/Talk:Main_Page_TempProposal, and I will 
try to find ways to integrate them.




2/ provide a fairly comprehensive overview with less than 15
   topics,
    3/ but hold in one (big) screen,
This looks more reasonable on the phone. The 2nd half of the page 
looks okay, but the first half still looks weird (too narrow and long 
columns). Perhaps there is a way to may it a bit more responsive on 
the phone.


See above, should be far better now.



4/ avoid redundancies on the Welcome Page,
5/ match both the Wiki's structure & the Manuals' structure.

Again, depending on  your feedbacks, I would be happy to improve it.

It's built from scripts  ==>  not too hard now to reorder, to adapt.
You should also document your work flow somewhere (perhaps the talk 
page of the same page or a dedicated page on the wiki). That is useful 
for long term maintainability of the wiki.


Done: two zip files are uploaded, with link and brief description in the 
Talk zone of the respective pages.



___
If your question is of interest to others as well, please add an 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] Wiki - Proposal to update the Welcome page

2020-05-22 Thread Garulfo

Hi all,

thanks for your encouraging feedbacks.

1/ Concerning the Manuals Page
   - As proposed, "obsolete banners" are added to thumbnails  of the
 oldest manuals.
   - About providing zips of manuals per topics: maybe we could just
 add a index.html in the distribution structure, to provide  the
 user with a browsing system similar to the wiki's one.

   - If the admistrators wish, I can now replace the current page.


2/ After  the Manuals,  please find a proposal for the Welcome Page,
   which is probably trickier

   - https://wiki.contextgarden.net/Main_Page_TempProposal
   - https://wiki.contextgarden.net/Main_Page (the current)

   - 4 objectives :
1/ do something more visual, reduce the amount of text,
2/ provide a fairly comprehensive overview with less than 15
   topics,
3/ but hold in one (big) screen,
4/ avoid redundancies on the Welcome Page,
5/ match both the Wiki's structure & the Manuals' structure.

Again, depending on  your feedbacks, I would be happy to improve it.

It's built from scripts  ==>  not too hard now to reorder, to adapt.


Best
___
If your question is of interest to others as well, please add an 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] Proposal to update the "Manuals" wiki page

2020-05-19 Thread Garulfo

Hi,

I hope you're all doing well.

Please, you will find a proposal to update the Manuals page on the wiki:
https://wiki.contextgarden.net/ManualsGallery

2 objectives:
1/ to make something more visual, to help the user identify the 
different documents, their organization, their date of release.

2/ to gather all the updated documents in one place

Sources were :
- http://www.pragma-ade.com/overview.htm
- https://wiki.contextgarden.net/Manuals, and wiki snippets here and there.
- https://github.com/hmenke/context-examples/blob/master/GUIDE.md

Depending on your comments, and if there is an interest, I would be 
happy to improve it (correct errors, change document segmentation, 
better colors choice, additional data such as authors, number of pages).


It's mainly built from cvs table + script.

Finally, if you approve this update, I can arrange to clean up some 
pages of the wiki about the manuals.



Best,







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