Re: [NTG-context] Interlining in a TwoColumns set

2016-08-15 Thread Pablo Rodriguez
On 08/15/2016 10:39 AM, Jean-Pierre Delange wrote:
> Hi Pablo and Wolfgang,
> 
> Many thanks ! The issue concerning a logo image in a TwoColumns document
> is resolved. It was only a matter of file format. I thought (I don't
> know why), that ConTeXt use SVG format. I've converted all my *.svg file
> in PNG and it works fine. Thank you very much for your help.

Hi Jean-Pierre,

well, I think “ConTeXt supports SVG as image format” is a true
statement. It doesn’t support it natively and it needs an external tool
to convert SVG files. But this is a different question.

BTW, if your SVG files contain vectors, I think it is better to convert
them to PDF. Otherwise, vectors will be lost in PNG files.

Just in case it might help,


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

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

Re: [NTG-context] Interlining in a TwoColumns set

2016-08-15 Thread Jean-Pierre Delange

Hi Pablo and Wolfgang,

Many thanks ! The issue concerning a logo image in a TwoColumns document 
is resolved. It was only a matter of file format. I thought (I don't 
know why), that ConTeXt use SVG format. I've converted all my *.svg file 
in PNG and it works fine. Thank you very much for your help.


JP


Le 14/08/2016 à 17:55, Wolfgang Schuster a écrit :

Jean-Pierre Delange 
14. August 2016 um 16:13
About the image on the top right of the TwoColumns doc : it works 
with mill.png image (but not with spider). I guess the 'Logo.svg' is 
too heavy (or something like that).
LuaTeX can only use images in the formats PDF, PNG, JPG, JP2 or JBIG2 
. Graphics which are provided in another format have to be converted 
in one mentioned before, for some formats (e.g. SVG) ConTeXt is able 
to convert them on the fly but you need the required programs (e.g. 
Inkscape for the conversion of SVG to PDF) on your system.


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
___


___
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] Interlining in a TwoColumns set

2016-08-14 Thread Wolfgang Schuster

Jean-Pierre Delange 
14. August 2016 um 16:13
About the image on the top right of the TwoColumns doc : it works with 
mill.png image (but not with spider). I guess the 'Logo.svg' is too 
heavy (or something like that).
LuaTeX can only use images in the formats PDF, PNG, JPG, JP2 or JBIG2. 
Graphics which are provided in another format have to be converted in 
one mentioned before, for some formats (e.g. SVG) ConTeXt is able to 
convert them on the fly but you need the required programs (e.g. 
Inkscape for the conversion of SVG to PDF) on your system.


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] Interlining in a TwoColumns set

2016-08-14 Thread Wolfgang Schuster

Jean-Pierre Delange 
14. August 2016 um 16:06
Hi Pablo,

Many thanks to be patient. I apologize to be a little bit slow minded 
: I presume that the


 \setupexternalfigure[location=default] command

would say that the figure is in the same directory than ConTeXt 
documents (i.e. 'default'). I have requested an external figure in 
*.svg format (Logo.svg), but the print on the top right shows only 
these informations :

name : Logo.svg
file : Logo.svg
state : unknown

By the way, even if my images are loaded in a ConTeXt subdirectory (as 
context\ConTeXt-Documents\Images), in place of default directory, the 
parsing doesn't load the image.

You can set the following keywords for the location key:

  - default: Load images from your TeX installation (needed to load 
ConTeXt’s example graphics)
  - local: Load images in the same folder as your TeX file and 2 folder 
upwards in the path
  - global: Load images in the path provided with the directory key for 
\setupexternalfigure


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] Interlining in a TwoColumns set

2016-08-14 Thread Pablo Rodriguez
On 08/14/2016 04:06 PM, Jean-Pierre Delange wrote:
> Hi Pablo,
> 
> Many thanks to be patient. I apologize to be a little bit slow minded : 
> I presume that the
> 
>   \setupexternalfigure[location=default] command
> 
> would say that the figure is in the same directory than ConTeXt
> documents (i.e. 'default'). I have requested an external figure in *.svg
> format (Logo.svg), but the print on the top right shows only these
> informations :
> name : Logo.svg
> file : Logo.svg
> state : unknown
> 
> By the way, even if my images are loaded in a ConTeXt subdirectory
> (as context\ConTeXt-Documents\Images), in place of default directory,
> the parsing doesn't load the image.

Hi Jean-Pierre,

the default directory is tex/texmf-context/tex/context/sample/common
from ConTeXt Standalone.

If you have the file in the same directory than your text source file,
you don’t need any setup for the external figure.

To solve the issue (after fixing it, you might investigate it further),
please, copy the file Logo.svg to the same directory where you have your
ConTeXt source file.

Compile the document and it should work (provided that you have Inkscape
installed on your system).

Please, let us know whether this basic approach works.


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

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

Re: [NTG-context] Interlining in a TwoColumns set

2016-08-14 Thread Jean-Pierre Delange
About the image on the top right of the TwoColumns doc : it works with 
mill.png image (but not with spider). I guess the 'Logo.svg' is too 
heavy (or something like that).



Le 14/08/2016 à 13:47, Pablo Rodriguez a écrit :

On 08/13/2016 12:45 PM, Jean-Pierre Delange wrote:

Thank you very much Wolfgang ! With Pablo help, I can manage this flyer.
But how to insert a logo on the top right ?

Jean-Pierre,

I included it in the sample. Here you have it again:

 \setupexternalfigure[location=default]

 \definelayer[logo_layer][state=start]

 \setlayer[logo_layer][preset=lefttop, y=.01\paperheight,
 x=.82\paperwidth]{\externalfigure[spider][height=0.2\textwidth]}

 \setupbackgrounds[page][background={logo_layer}]

 \starttext

 \dorecurse{5}{\input knuth\par}
 \stoptext

Or is there any issue with the sample? At least, the spider should be
placed in the top right corner of the first page. To have it in all
pages, replace "state=start" with "state=repeat".

If this isn’t what you need, please let us know how the logo should be
placed.


Pablo


___
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] Interlining in a TwoColumns set

2016-08-14 Thread Jean-Pierre Delange

Hi Pablo,

Many thanks to be patient. I apologize to be a little bit slow minded : 
I presume that the


 \setupexternalfigure[location=default] command

would say that the figure is in the same directory than ConTeXt documents (i.e. 
'default'). I have requested an external figure in *.svg format (Logo.svg), but 
the print on the top right shows only these informations :
name : Logo.svg
file : Logo.svg
state : unknown

By the way, even if my images are loaded in a ConTeXt subdirectory (as 
context\ConTeXt-Documents\Images), in place of default directory, the parsing 
doesn't load the image.


Le 14/08/2016 à 13:47, Pablo Rodriguez a écrit :

On 08/13/2016 12:45 PM, Jean-Pierre Delange wrote:

Thank you very much Wolfgang ! With Pablo help, I can manage this flyer.
But how to insert a logo on the top right ?

Jean-Pierre,

I included it in the sample. Here you have it again:

 \setupexternalfigure[location=default]

 \definelayer[logo_layer][state=start]

 \setlayer[logo_layer][preset=lefttop, y=.01\paperheight,
 x=.82\paperwidth]{\externalfigure[spider][height=0.2\textwidth]}

 \setupbackgrounds[page][background={logo_layer}]

 \starttext

 \dorecurse{5}{\input knuth\par}
 \stoptext

Or is there any issue with the sample? At least, the spider should be
placed in the top right corner of the first page. To have it in all
pages, replace "state=start" with "state=repeat".

If this isn’t what you need, please let us know how the logo should be
placed.


Pablo


___
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] Interlining in a TwoColumns set

2016-08-14 Thread Pablo Rodriguez
On 08/13/2016 12:45 PM, Jean-Pierre Delange wrote:
> Thank you very much Wolfgang ! With Pablo help, I can manage this flyer.
> But how to insert a logo on the top right ?

Jean-Pierre,

I included it in the sample. Here you have it again:

\setupexternalfigure[location=default]

\definelayer[logo_layer][state=start]

\setlayer[logo_layer][preset=lefttop, y=.01\paperheight,
x=.82\paperwidth]{\externalfigure[spider][height=0.2\textwidth]}

\setupbackgrounds[page][background={logo_layer}]

\starttext

\dorecurse{5}{\input knuth\par}
\stoptext

Or is there any issue with the sample? At least, the spider should be
placed in the top right corner of the first page. To have it in all
pages, replace "state=start" with "state=repeat".

If this isn’t what you need, please let us know how the logo should be
placed.


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

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

Re: [NTG-context] Interlining in a TwoColumns set

2016-08-13 Thread Jean-Pierre Delange
Thank you very much Wolfgang ! With Pablo help, I can manage this flyer. 
But how to insert a logo on the top right ?



Le 13/08/2016 à 08:52, Wolfgang Schuster a écrit :

Pablo Rodriguez 
12. August 2016 um 17:21
Interline spacing is set in an unorthodox way (to put it fine), but
there is no "setups" key for \setupparagraphs (or it doesn’t work).

Let us know whether you find more issues.

You can apply setups with the inner key:

\defineparagraphs[TwoColumns][n=2,align=verytolerant]

\startsetups[TwoColumns]
  \setupinterlinespace[line=5ex]
\stopsetups

\setupparagraphs[TwoColumns:2][inner=\directsetup{TwoColumns}]

\starttext

\startTwoColumns
\input knuth
\TwoColumns
\input tufte
\stopTwoColumns

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


___
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] Interlining in a TwoColumns set

2016-08-13 Thread Jean-Pierre Delange

Dear Pablo,

In order to understand which issues I was confronting to, I gave the 
whole stuff. I apologize if I have trespassed some rules I ought to know.


The only issue that matters is the place of the 
\setupinterlinespace[line=somenumber]command to manage the second 
column. Anyway, I'll try your sample.


Thank you very much for your help.

JP


Le 12/08/2016 à 17:21, Pablo Rodriguez a écrit :

On 08/12/2016 03:50 PM, Jean-Pierre Delange wrote:

Dear List,

In order to help somebody who wants to improve a kind presentation of
his own, I have set the sample below.

Dear Jean-Pierre,

we are happy to help, but samples should be minimal.

Otherwise, the sample should be fixed first (to have something to play
with).

Sorrym I tried to compile your sample, but even the simple clipboard
copy and paste adds extra blank lines to the code.


I am confronting to 2 issues :

1. In the second column it would be fine if one could play with the
interlining. But where to put this command :
\setupinterlinespace[line=2.8ex]}] which allow to define interlines
inside the 2nd column ?

Do you want a different interline space in the second column?


2. The Logo.svg picture (in /Images/Logo.svg within context repertory)
doesn't print : 'state: unknown'; is it an issue caused by a layer
definition ?

You have to set it (see sample below).


% Select language

\mainlanguage[fr]
\language[fr]

\mainlanguage also selects the language for the document. The second
command isn’t required.


% Normal A4 size paper

\setuppapersize[A4][A4]

Well, this is the default paper size in ConTeXt. No need to select it.


\setupcolors[state=start]

I’d say this is not required (at least, I had to stop colors to get rid
of them in one document).


\definelayer[logo_layer]

[state=start] is to be added here (see
http://wiki.contextgarden.net/Layers#State). Right after your closing
bracket.

And here you have a shorter sample:

 \mainlanguage[fr]

 \defineparagraphs[TwoColumns][n=2, align={hz,hanging}]
 \setupparagraphs[TwoColumns][1][width=200pt]
 \setupparagraphs[TwoColumns][2]
 [style={\setupinterlinespace[line=5ex]}]

 \setupexternalfigure[location=default]

 \definelayer[logo_layer][state=start]

 \setlayer[logo_layer][preset=lefttop, y=.01\paperheight,
 x=.82\paperwidth]{\externalfigure[spider][height=0.2\textwidth]}

 \setupbackgrounds[page][background={logo_layer}]

 \starttext

 \dorecurse{5}{\startTwoColumns

 \input knuth

 \TwoColumns

 \input tufte
 \stopTwoColumns}
 \stoptext

Interline spacing is set in an unorthodox way (to put it fine), but
there is no "setups" key for \setupparagraphs (or it doesn’t work).

Let us know whether you find more issues.

I hope it helps,


Pablo


___
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] Interlining in a TwoColumns set

2016-08-13 Thread Wolfgang Schuster

Pablo Rodriguez 
12. August 2016 um 17:21
Interline spacing is set in an unorthodox way (to put it fine), but
there is no "setups" key for \setupparagraphs (or it doesn’t work).

Let us know whether you find more issues.

You can apply setups with the inner key:

\defineparagraphs[TwoColumns][n=2,align=verytolerant]

\startsetups[TwoColumns]
  \setupinterlinespace[line=5ex]
\stopsetups

\setupparagraphs[TwoColumns:2][inner=\directsetup{TwoColumns}]

\starttext

\startTwoColumns
\input knuth
\TwoColumns
\input tufte
\stopTwoColumns

\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] Interlining in a TwoColumns set

2016-08-12 Thread Pablo Rodriguez
On 08/12/2016 03:50 PM, Jean-Pierre Delange wrote:
> Dear List,
> 
> In order to help somebody who wants to improve a kind presentation of
> his own, I have set the sample below.

Dear Jean-Pierre,

we are happy to help, but samples should be minimal.

Otherwise, the sample should be fixed first (to have something to play
with).

Sorrym I tried to compile your sample, but even the simple clipboard
copy and paste adds extra blank lines to the code.

> I am confronting to 2 issues :
> 
> 1. In the second column it would be fine if one could play with the
> interlining. But where to put this command :
> \setupinterlinespace[line=2.8ex]}] which allow to define interlines
> inside the 2nd column ?

Do you want a different interline space in the second column?

> 2. The Logo.svg picture (in /Images/Logo.svg within context repertory)
> doesn't print : 'state: unknown'; is it an issue caused by a layer
> definition ?

You have to set it (see sample below).

> % Select language
> 
> \mainlanguage[fr]
> \language[fr]

\mainlanguage also selects the language for the document. The second
command isn’t required.

> % Normal A4 size paper
> 
> \setuppapersize[A4][A4]

Well, this is the default paper size in ConTeXt. No need to select it.

> \setupcolors[state=start]

I’d say this is not required (at least, I had to stop colors to get rid
of them in one document).

> \definelayer[logo_layer]

[state=start] is to be added here (see
http://wiki.contextgarden.net/Layers#State). Right after your closing
bracket.

And here you have a shorter sample:

\mainlanguage[fr]

\defineparagraphs[TwoColumns][n=2, align={hz,hanging}]
\setupparagraphs[TwoColumns][1][width=200pt]
\setupparagraphs[TwoColumns][2]
[style={\setupinterlinespace[line=5ex]}]

\setupexternalfigure[location=default]

\definelayer[logo_layer][state=start]

\setlayer[logo_layer][preset=lefttop, y=.01\paperheight,
x=.82\paperwidth]{\externalfigure[spider][height=0.2\textwidth]}

\setupbackgrounds[page][background={logo_layer}]

\starttext

\dorecurse{5}{\startTwoColumns

\input knuth

\TwoColumns

\input tufte
\stopTwoColumns}
\stoptext

Interline spacing is set in an unorthodox way (to put it fine), but
there is no "setups" key for \setupparagraphs (or it doesn’t work).

Let us know whether you find more issues.

I hope it helps,


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

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

Re: [NTG-context] Interlining in a TwoColumns set

2016-08-12 Thread Jean-Pierre Delange

Dear List,

In order to help somebody who wants to improve a kind presentation of 
his own, I have set the sample below.

I am confronting to 2 issues :

1. In the second column it would be fine if one could play with the 
interlining. But where to put this command : 
\setupinterlinespace[line=2.8ex]}] which allow to define interlines 
inside the 2nd column ?


2. The Logo.svg picture (in /Images/Logo.svg within context repertory) 
doesn't print : 'state: unknown'; is it an issue caused by a layer 
definition ?


Thanks for your advices.
JP

% Select language

\mainlanguage[fr]

\language[fr]


% Setup PDF metadata

\setupinteraction

[state=start,

color=colour_link,

click=yes,

contrastcolor=colour_link,

focus=standard, % Clicking an inter-document hyperlink by default 
switches to "fit page" mode. Override.


openaction={FitWidth,ToggleViewer},

title={Anciens et Modernes},

style=normal,

subtitle={Anciens et Modernes},

author=Adeimantos ,

keyword={philosophy, history, political philosophy}]


% Turn off page numbering

\setuppagenumbering[location=]


% Normal A4 size paper

\setuppapersize[A4][A4]


% Setup margins

\setuplayout[

backspace=10mm,

width=190mm,

topspace=5mm,

header=0mm,

footer=5mm,

footerdistance=0mm,

bottomdistance=10mm,

height=280mm]

%\showframe


% For coloured output

\setupcolors[state=start]


% Font setup


% Font to use

\definefontfamily [main_font] [rm] [titillium] [features={default,quality}]

\definefontfamily [main_font] [mm] [TeX Gyre Pagella]

\setupbodyfont[main_font]


% URL macros and setups


% Usage: \href{http://www.someurl.com}{Text}

\def\href#1#2{\useURL[#2][{#2}][][{#1}]\goto{\url[#2]}[url(#1)]}

\def\ahref#1{\href{#1}{<#1>}}

\def\fullahref#1{\href{#1}{#1}}

\def\mailto#1{\useURL[#1][mailto:#1][][#1]\from[{#1}]}

\def\MailTo#1#2{\useURL[#1][mailto:#1][][#2]\from[{#1}]}


% Style

\setupurl

[color=none,

style=normal]


% Setup two columns

\defineparagraphs[TwoColumns][n=2, align={hz,hanging}]

\setupparagraphs[TwoColumns][1][width=200pt]


% Setup stretching tolerance...

\setuptolerance[verytolerant,stretch]


\setupcolors[state=start]


% The elements of the letterhead are defined as layers. This first layer

% contains the logo; you'll have to supply an image file yourself.

\definelayer[logo_layer]

\setlayer[logo_layer][preset=lefttop,y=.01\paperheight,x=.82\paperwidth]

{\externalfigure[Images/Logo.svg][][height=0.2\textwidth]}


% Activate all layers for this page...

\setupbackgrounds[page][background={logo_layer}]


% Start document body...

\starttext


% Header...

{\switchtobodyfont[40pt] Anciens et Modernes \crlf}

\blackrule[height=0.6mm,width=0.83\textwidth]


% Dateline...

{\bf Présentation}\crlf

\currentdate[dd,{~},m,{~},year]


% Headline...

\blank

\framed[align=middle,width=200mm,height=13mm,frame=off]

{

\bf \switchtobodyfont[15pt]

{\bf Philosophie politique.}

}


\startTwoColumns

\startlines

{\bf Contact Information}

Adeimantos

Le Manoir

F - 18190 Chavannes

adeiman...@free.fr


{\bf Édition}

Livres, articles


{\bf Dévelopement}

Prototype


{\bf Année de création}

2012


{\bf Financements privés}

\$0


\stoplines


\TwoColumns

\input tufte


\stopTwoColumns


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