[NTG-context] feature request for \getspr{}

2012-06-08 Thread Peter Münster
Hi,

It would be nice, if \getspr{} of the m-spreadsheet module could print a
comma instead of a dot as decimal-point.

For now, I use this workaround:

--8---cut here---start-8---
function spreadsheets.get(name,r,c,str)
if name ==  then name = current if name ==  then name = default end 
end
if not str or str ==  then
context(data[name][c][r] or 0)
else
local result = execute(name,r,c,str)
if result then
if type(result) == number then
data[name][c][r] = result
end
if userdata and userdata.spreadsheet_use_comma then
result = tostring(result)
result = result:gsub(%., ,)
end
context(result)
end
end
end
--8---cut here---end---8---

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

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


Re: [NTG-context] Error with EBGaramond-Regular

2012-06-08 Thread Hans Hagen

On 8-6-2012 06:16, Khaled Hosny wrote:

On Thu, Jun 07, 2012 at 06:14:10PM +0200, Hans Hagen wrote:

btw, what are features like cv80 and cv81 supposed to represent?


A relatively new OpenType addition.
http://www.microsoft.com/typography/otspec/features_ae.htm#cv01-cv99


ok, so nothing really special.

Does fontforge already support these Feature Parameters tables? And 
should we do something with them?


Hans

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


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

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


Re: [NTG-context] feature request for \getspr{}

2012-06-08 Thread Hans Hagen

On 8-6-2012 09:38, Peter Münster wrote:

Hi,

It would be nice, if \getspr{} of the m-spreadsheet module could print a
comma instead of a dot as decimal-point.

For now, I use this workaround:

--8---cut here---start-8---
function spreadsheets.get(name,r,c,str)
 if name ==  then name = current if name ==  then name = default end 
end
 if not str or str ==  then
 context(data[name][c][r] or 0)
 else
 local result = execute(name,r,c,str)
 if result then
 if type(result) == number then
 data[name][c][r] = result
 end
 if userdata and userdata.spreadsheet_use_comma then
 result = tostring(result)
 result = result:gsub(%., ,)
 end
 context(result)
 end
 end
end
--8---cut here---end---8---


I've added moduledata.spreadsheets.settings.numberseparator but you have 
to test it after the next upload.


(Typpically oen of those modules that I'd forgotten about.)

Hans

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


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

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


Re: [NTG-context] conditional format of headings

2012-06-08 Thread Jan Pohanka

Far beyond my tex and context skills, but nice :)

regards
Jan

Dne Wed, 06 Jun 2012 14:46:29 +0200 Wolfgang Schuster  
schuster.wolfg...@googlemail.com napsal(a):




Am 05.06.2012 um 10:34 schrieb Jan Pohanka:


Hello,

is it possible to have some conditional format? I mean I'd like to  
have different vertical spacing for \section and \subsection when they  
follows immediately each other and when there is some text between them.


% SectionBlank

\def\DefineSectionBlank
  {\dotripleempty\doDefineSectionBlank}

\def\doDefineSectionBlank[#1][#2][#3]#4%
  {\edef\CurrentSection{#1}%
   \setvalue{#1:#2:\ifthirdargument\the\dimexpr#3\relax\fi}{#4}}

\def\SectionBlank#1#2%
  {\edef\CurrentSection{#1}%
   
\executeifdefined{#1:#2:\LastSectionBlankSignal}{\executeifdefined{#1:#2:\the\dimexpr\zeropoint\relax}{\getvalue{#1:#2:

\let\LastSectionBlankSignal\zeropoint

\EveryPar{\let\LastSectionBlankSignal\zeropoint}

\def\SectionBlankSignal
  {\setevalue{LastSectionBlankSignal}{\the\dimexpr\csname\CurrentSection  
Signal\endcsname\relax}}


% Heading

\newsignal\PartSignal

\DefineSectionBlank [Part] [before] {\blank[force,48pt]}
\DefineSectionBlank [Part] [after]  {\blank[15pt]\SectionBlankSignal}

\setuphead
  [Part]
  [before=\SectionBlank{Part}{before},
after=\SectionBlank{Part}{after}]

\newsignal\ChapterSignal

\DefineSectionBlank [Chapter] [before] [\PartSignal]  
{\blank[\the\dimexpr 12pt*200/100-6pt\relax]}
\DefineSectionBlank [Chapter] [before]
{\blank[\the\dimexpr 12pt*200/100\relax]}
\DefineSectionBlank [Chapter] [after] 
{\blank[\the\dimexpr 12pt*150/100\relax]\SectionBlankSignal}


\setuphead
  [chapter]
  [before=\SectionBlank{Chapter}{before},
after=\SectionBlank{Chapter}{after}]

\newsignal\SectionSignal

\DefineSectionBlank [Section] [before] [\PartSignal] 
{\blank[\the\dimexpr 12pt*175/100\relax]}
%\DefineSectionBlank [Section] [before] [\ChapterSignal]  
{\blank[\the\dimexpr 12pt*175/100-3pt\relax]}
\DefineSectionBlank [Section] [before] [\ChapterSignal]  
{\blank[\the\dimexpr 12pt*175/100+2cm\relax]}
\DefineSectionBlank [Section] [before]   
{\blank[\the\dimexpr 12pt*175/100\relax]}
\DefineSectionBlank [Section] [after]
{\blank[\the\dimexpr 12pt*133/100\relax]\SectionBlankSignal}


\setuphead
  [section]
  [before=\SectionBlank{Section}{before},
after=\SectionBlank{Section}{after}]

\starttext

\chapter{Chapter 1}

\section{Section 1.1}

\chapter{Chapter 2}

text

\section{Section 2.1}

\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] Error with EBGaramond-Regular

2012-06-08 Thread Khaled Hosny
On Fri, Jun 08, 2012 at 09:40:22AM +0200, Hans Hagen wrote:
 On 8-6-2012 06:16, Khaled Hosny wrote:
 On Thu, Jun 07, 2012 at 06:14:10PM +0200, Hans Hagen wrote:
 btw, what are features like cv80 and cv81 supposed to represent?
 
 A relatively new OpenType addition.
 http://www.microsoft.com/typography/otspec/features_ae.htm#cv01-cv99
 
 ok, so nothing really special.
 
 Does fontforge already support these Feature Parameters tables? And
 should we do something with them?

I'm not sure, but AFAIK our snapshot of FontForge predates all that
stuff.

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

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


[NTG-context] directory structure

2012-06-08 Thread Jan Pohanka

Hello,

here's next of my newbie questions.
I have a template for some sort of documents, lets say a report in one  
file as an environment. It contains also a definition for a footer with an  
image. I'd like to have the image on some other path than documents  
together with the template so I have to use \setupexternalfigures, but is  
it possible to specify a path independently of the env file and document  
file location. I mean some kind of global variable $TEMPLATES_DIR.


Is it also possible to set some global path, where context will search the  
env files and not to use the full path in document file? Is enviroment  
good aproach to define templates? I have read Han's document about project  
structure, but it does something a bit different I think.



template file in some directory on the system:
\startenvironment myreport
...
\setupexternalfigures[directory=???]
\setupfootertexts[{\externalfigure[mypic]}]
...
\stopenvironment


document file in some other directory:
\enviroment myreport

\starttext
\stoptext

best regards
Jan

--
Tato zpráva byla vytvořena převratnou poštovní aplikací Opery:  
http://www.opera.com/mail/

___
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] feature request for \getspr{}

2012-06-08 Thread Peter Münster
On Fri, Jun 08 2012, Hans Hagen wrote:

 I've added moduledata.spreadsheets.settings.numberseparator but you have to
 test it after the next upload.

Tested. Thanks!

Just a minor comment: \setupspreadsheet[numberseparator=,] would be
nicer than
\ctxlua{moduledata.spreadsheets.settings.numberseparator = ,}

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

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


[NTG-context] reading from standard input

2012-06-08 Thread stdin | Alexandre Leray

Hi,

I was wondering if there was a way to make context read from stdin 
instead of reading from a file?


cat /path/to/src.tex | context --result=/path/to/result.pdf

I'd like to do something like this in python:

def generate_pdf(self):

src = 
\starttext
\section[éléments-de-transmission]{Éléments de transmission}

Un module dans lequel une communauté temporaire d'étudiants et
d'enseignants s'exerce à mettre en situation des réflexions et des
moments de transmission en interrogeant sans cesse la question de
l'enseignement. La configuration des enseignants est variable selon
les situations. Les situations seront mises en place en semaine 
A et B
selon l'emploi du temps. Chaque nouvelle situation invente sa 
méthode.

\stoptext

cmd = 'context --result=/tmp/result.pdf'
p1 = subprocess.Popen(cmd.split( ), stdout=subprocess.PIPE, 
stdin=subprocess.PIPE)

(stdout, stderr) = p1.communicate(stdin=src)


Thanks,

Alex

--
Alexandre Leray
media  graphic design
http://stdin.fr | http://osp.constantvzw.org/
rue Gallaitstraat 80
1030 Bruxelles
+32 (0)4 87 04 70 30

___
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] reading from standard input

2012-06-08 Thread Hans Hagen

On 8-6-2012 14:21, stdin | Alexandre Leray wrote:

Hi,

I was wondering if there was a way to make context read from stdin
instead of reading from a file?

 cat /path/to/src.tex | context --result=/path/to/result.pdf

I'd like to do something like this in python:

 def generate_pdf(self):

 src = 
 \starttext
 \section[éléments-de-transmission]{Éléments de transmission}

 Un module dans lequel une communauté temporaire d'étudiants et
 d'enseignants s'exerce à mettre en situation des réflexions et des
 moments de transmission en interrogeant sans cesse la question de
 l'enseignement. La configuration des enseignants est variable selon
 les situations. Les situations seront mises en place en semaine
A et B
 selon l'emploi du temps. Chaque nouvelle situation invente sa
méthode.
 \stoptext
 
 cmd = 'context --result=/tmp/result.pdf'
 p1 = subprocess.Popen(cmd.split( ), stdout=subprocess.PIPE,
stdin=subprocess.PIPE)
 (stdout, stderr) = p1.communicate(stdin=src)



you can use the standard tex input readers (\read) as well as io.read 
when you're in lua


Hans


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


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

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


Re: [NTG-context] reading from standard input

2012-06-08 Thread Aditya Mahajan

On Fri, 8 Jun 2012, stdin | Alexandre Leray wrote:


Hi,

I was wondering if there was a way to make context read from stdin instead of 
reading from a file?


   cat /path/to/src.tex | context --result=/path/to/result.pdf

I'd like to do something like this in python:

   def generate_pdf(self):

   src = 
   \starttext
   \section[éléments-de-transmission]{Éléments de transmission}

   Un module dans lequel une communauté temporaire d'étudiants et
   d'enseignants s'exerce à mettre en situation des réflexions et des
   moments de transmission en interrogeant sans cesse la question de
   l'enseignement. La configuration des enseignants est variable selon
   les situations. Les situations seront mises en place en semaine A et 
B
   selon l'emploi du temps. Chaque nouvelle situation invente sa 
méthode.

   \stoptext
   
   cmd = 'context --result=/tmp/result.pdf'
   p1 = subprocess.Popen(cmd.split( ), stdout=subprocess.PIPE, 
stdin=subprocess.PIPE)

   (stdout, stderr) = p1.communicate(stdin=src)



You can try context --pipe --result=/tmp/result.pdf but that only runs the 
document once, so cross referencings, TOC, etc won't work correctly. The 
other options is to write to a file, and then run context --purgeall 
--result=/tmp/result.pdf filename; this will run the document appropriate 
number of times, and then delete the temp files, leaving only the .tex and 
the .pdf file.


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

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

[NTG-context] Indenting problems

2012-06-08 Thread Bill Meahan
I can't seem to get indenting to work. I've tried various combinations 
of \setupindenting, \indenting and \indent to no avail. My latest try 
looks like this:


\setuppapersize[letter][letter]

\setuplayout
  [  backspace=0.10\paperwidth,
 width=0.60\paperwidth,
   rightmargin=0.20\paperwidth,
footer=0pt,
  topspace=0.10\paperheight,
height=0.80\paperheight]

\setuppagenumbering[alternative=doublesided]

\setupbackgrounds[text][rightmargin][frame=on,rulethickness=0.05pt]

\setuplabeltext[en][chapter=Chapter ]

\define[2]\ChapterCommand
  {\inright[][align=middle]{#1}%
   \midaligned{#2}}

\setuphead
  [chapter]
  [command=\ChapterCommand,
   after=\hairline\blank,
   header=empty,
   textstyle=\cgd,
   numberstyle=\sca]

\definefontfeature[smallcaps][smallcaps][onum=yes]

\definetypeface[mainface][rm][serif]  [pagella] [default]
\definetypeface[mainface][ss][sans]   [modern]  [default]
\definetypeface[mainface][cg][calligraphy][chorus]  [default]
\definetypeface[mainface][mm][math]   [palatino][default]

\setupbodyfont[mainface]

\setupindenting[next]


\starttext %\showframe

\indenting[small]
\startchapter[title=Knuth]
\input /usr/home/wwm/LoremIpsum.tex
%\dorecurse{10}{\input knuth\par}
\stopchapter

\startchapter[title=Zapf]
\dorecurse{10}{\input zapf\par}
\stopchapter

\stoptext

(Yes, this is an expanded version of Wolfgang's example from yesterday.)

This is LuaTeX, Version beta-0.70.2-2012052318 (TeX Live 2012)
ConTeXt  ver: 2012.05.29 00:12 MKIV  fmt: 2012.6.7  int: english/english
i386-FreeBSD 9.0
--
Bill Meahan K8QN

The pessimist complains about the wind;
 the optimist expects it to change;
 the realist adjusts the sails.

-- William Arthur Ward

This message is digitally signed with an X.509 certificate
to prove it is from me and has not been altered since it was sent.



smime.p7s
Description: S/MIME Cryptographic Signature
___
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] Indenting problems

2012-06-08 Thread Aditya Mahajan

On Fri, 8 Jun 2012, Bill Meahan wrote:


\setupindenting[next]


\setupindenting[next,yes]

See 
http://wiki.contextgarden.net/Indentation#Setting_up_indentation_for_the_whole_document


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

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


Re: [NTG-context] Indenting problems

2012-06-08 Thread Aditya Mahajan

On Fri, 8 Jun 2012, Aditya Mahajan wrote:


On Fri, 8 Jun 2012, Bill Meahan wrote:


\setupindenting[next]


\setupindenting[next,yes]


Sorry, that should be

\setupindenting[medium, next, yes]

See 
http://wiki.contextgarden.net/Indentation#Setting_up_indentation_for_the_whole_document


(The above page is not completely clear on this).

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

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


Re: [NTG-context] reading from standard input

2012-06-08 Thread stdin | Alexandre Leray

Thank you,

I will try this!

Alex

On 08/06/2012 15:31, Aditya Mahajan wrote:

On Fri, 8 Jun 2012, stdin | Alexandre Leray wrote:


Hi,

I was wondering if there was a way to make context read from stdin 
instead of reading from a file?


   cat /path/to/src.tex | context --result=/path/to/result.pdf

I'd like to do something like this in python:

   def generate_pdf(self):

   src = 
   \starttext
   \section[éléments-de-transmission]{Éléments de transmission}

   Un module dans lequel une communauté temporaire d'étudiants et
   d'enseignants s'exerce à mettre en situation des réflexions et 
des

   moments de transmission en interrogeant sans cesse la question de
   l'enseignement. La configuration des enseignants est variable 
selon
   les situations. Les situations seront mises en place en 
semaine A et B
   selon l'emploi du temps. Chaque nouvelle situation invente sa 
méthode.

   \stoptext
   
   cmd = 'context --result=/tmp/result.pdf'
   p1 = subprocess.Popen(cmd.split( ), stdout=subprocess.PIPE, 
stdin=subprocess.PIPE)

   (stdout, stderr) = p1.communicate(stdin=src)



You can try context --pipe --result=/tmp/result.pdf but that only runs 
the document once, so cross referencings, TOC, etc won't work 
correctly. The other options is to write to a file, and then run 
context --purgeall --result=/tmp/result.pdf filename; this will run 
the document appropriate number of times, and then delete the temp 
files, leaving only the .tex and the .pdf file.


Aditya


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

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


--
Alexandre Leray
media  graphic design
http://stdin.fr | http://osp.constantvzw.org/
rue Gallaitstraat 80
1030 Bruxelles
+32 (0)4 87 04 70 30

___
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] Indenting problems

2012-06-08 Thread Bill Meahan

On 06/08/2012 10:20, Aditya Mahajan wrote:

On Fri, 8 Jun 2012, Aditya Mahajan wrote:


On Fri, 8 Jun 2012, Bill Meahan wrote:


\setupindenting[next]


\setupindenting[next,yes]


Sorry, that should be

\setupindenting[medium, next, yes]



Yep, found that out before I got a chance to read your second note.

Thanks so much!


--
Bill Meahan K8QN

The pessimist complains about the wind;
 the optimist expects it to change;
 the realist adjusts the sails.

-- William Arthur Ward

This message is digitally signed with an X.509 certificate
to prove it is from me and has not been altered since it was sent.



smime.p7s
Description: S/MIME Cryptographic Signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] \externalfigure shows text alongside the picture

2012-06-08 Thread Alfredo Catalina
I am using \externalfigure to show a picture at the desired scale. Instead
of providing a number for the width parameter I have made a definition with
\def. When I run in mkiv this I get the text 4t alongside the picture.

\def\DesignSize#1{3.5cm/4*#1}%
\starttext
\externalfigure[hacker.jpg][width=\DesignSize{4}]
\stoptext

In mkii is perfect.

I've also tried

\define[1]\DesignSize{3.5cm/4*#1}

with the same result.
___
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] \externalfigure shows text alongside the picture

2012-06-08 Thread Wolfgang Schuster

Am 08.06.2012 um 17:10 schrieb Alfredo Catalina:

 I am using \externalfigure to show a picture at the desired scale. Instead of 
 providing a number for the width parameter I have made a definition with 
 \def. When I run in mkiv this I get the text 4t alongside the picture.
  
 \def\DesignSize#1{3.5cm/4*#1}%
 \starttext
 \externalfigure[hacker.jpg][width=\DesignSize{4}]
 \stoptext
  
 In mkii is perfect.
  
 I've also tried
  
 \define[1]\DesignSize{3.5cm/4*#1}
  
 with the same result.

\define[1]\DesignSize{\the\dimexpr3.5cm/4*#1\relax}

Wolfgang

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

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


[NTG-context] LuaLaTeX + fontspec: cannot compare documents with Acrobat

2012-06-08 Thread Jörg Weber
(This is an issue I originally posted here: 
http://tex.stackexchange.com/questions/58760/lualatex-fontspec-cannot-compare-documents-with-acrobat
 and I cross-posted on the LuaTeX User Mailing list)



I use the option compare documents in Adobe Acrobat Pro a lot to highlight 
changes between revisions. What I just noticed is, if I compile a simple 
document such as the one below with LuaLaTeX + fontspec, Acrobat is unable to 
perform the comparison, giving a unspecific error message (cannot compare 
document...). Compiling the same document without fontspec allows the 
comparison, as does XeLaTeX + fontspec.



I tried with TeX Live 2012 and the current MikTeX, without success. Ulrike 
Fischer suggested \usepackage{luaotfload} \font\test=Arial \pagestyle{empty} 
and \test after \begin{document} instead of fontspec, but the error remains. 
Does anyone know what is going on and of a possible fix?



\documentclass{article}

\usepackage{fontspec}

\usepackage{lipsum}



\begin{document}



\lipsum



\end{document}



Best,

Jörg

___
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] LuaLaTeX + fontspec: cannot compare documents with Acrobat

2012-06-08 Thread Aditya Mahajan

On Fri, 8 Jun 2012, Jörg Weber wrote:


(This is an issue I originally posted here: 
http://tex.stackexchange.com/questions/58760/lualatex-fontspec-cannot-compare-documents-with-acrobat
 and I cross-posted on the LuaTeX User Mailing list)



I use the option compare documents in Adobe Acrobat Pro a lot to highlight changes 
between revisions. What I just noticed is, if I compile a simple document such as the one below 
with LuaLaTeX + fontspec, Acrobat is unable to perform the comparison, giving a unspecific error 
message (cannot compare document...). Compiling the same document without fontspec 
allows the comparison, as does XeLaTeX + fontspec.



I tried with TeX Live 2012 and the current MikTeX, without success. 
Ulrike Fischer suggested \usepackage{luaotfload} \font\test=Arial 
\pagestyle{empty} and \test after \begin{document} instead of fontspec, 
but the error remains. Does anyone know what is going on and of a 
possible fix?


Do you know what happens if you try with a simple ConTeXt document with 
opentype fonts?


\setupbodyfont[palatino]
\starttext
Hello world
\stoptext

Compile with context filename

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

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

Re: [NTG-context] LuaLaTeX + fontspec: cannot compare documents with Acrobat

2012-06-08 Thread Hans Hagen

On 8-6-2012 17:26, Jörg Weber wrote:

(This is an issue I originally posted here:
http://tex.stackexchange.com/questions/58760/lualatex-fontspec-cannot-compare-documents-with-acrobat
and I cross-posted on the LuaTeX User Mailing list)

I use the option compare documents in Adobe Acrobat Pro a lot to
highlight changes between revisions. What I just noticed is, if I
compile a simple document such as the one below with LuaLaTeX +
fontspec, Acrobat is unable to perform the comparison, giving a
unspecific error message (cannot compare document...). Compiling the
same document without fontspec allows the comparison, as does XeLaTeX +
fontspec.

I tried with TeX Live 2012 and the current MikTeX, without success.
Ulrike Fischer suggested \usepackage{luaotfload} \font\test=Arial
\pagestyle{empty} and \test after \begin{document} instead of fontspec,
but the error remains. Does anyone know what is going on and of a
possible fix?

\documentclass{article}

\usepackage{fontspec}

\usepackage{lipsum}

\begin{document}

\lipsum

\end{document}


I can't process that here. This is a easier test:

\nopdfcompression

\setupbodyfont[dejavu]

\startTEXpage[offset=10pt]
a % a
\stopTEXpage

Even such a minimal document cannot be compared. I have no clue how the 
compare is supposed to work but if a simple 'a' vs 'aa' document does 
not work while the files preflight ok it's probably an acrobat issue.


Hans

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


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

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


[NTG-context] [OT] git-annex: a new option for ConTeXt distribution (kickstarter campaign ends in 4 days)

2012-06-08 Thread Mojca Miklavec
Hello,

a few days ago I ran across this:

http://www.kickstarter.com/projects/joeyh/git-annex-assistant-like-dropbox-but-with-your-own?ref=category
and made a symbolic contribution.

However, this project could become one of the convenient options to
distribute ConTeXt, in the sense that it would probably allow sparse
checkouts from git, and we could have one huge git repository and with
some basic scripting on the client side (in the same way as it is done
now with rsync), user could choose to download just MKIV or just the
basic fonts in contrast to a huge collection of fonts that might end
up in that big repository. Basically, git could replace rsync (the
rsync way could stay; this would just add an extra option). At least
that is my understanding, but I admit that I don't have the full
picture in front of my eyes and I would actually be grateful for the
second opinion from other ([not necessarily] git) experts here.

The reason why I'm writing is that by donating the following amounts,
one might be able to ask for additional features if/when needed:

100 $
Help set my priorities for which features are the most important. I
aim to make the git-annex assistant please you right out of the box by
supporting exactly what you need.

250 $
Be my beta tester for the git-annex assistant. You will influence the
project throughout, and will set my priorities for which features are
the most important.

and if this really becomes an important way to distribute ConTeXt, we
could either make some kind of group donation of a few volunteers,
or consider using part of ConTeXt Group funds (as ConTeXt Group was
established exactly for the reason to fund projects that are important
to the community). If that can help ConTeXt users switch to older
version more easily, the requested amounts for funding are more than
reasonable.

This is what the author has answered to one of my question about how I
could let user select which modules to install (module = a collection
of fonts, a collection of mkii-only related files, engine-related
files etc.) out of the whole distribution:



I can think of a few ways to handle the checkout of a specific set of
modules with git-annex.

If there's a text file manifest listing the files in each module, then
something like:

git annex get $(cat 1.manifest 3.manifest 7.manifest ...)

Better, put each module into its own git branch. Then the user can
merge in the branches for modules they want. This has the advantage
that the only files they'll have visible in their git repository will
be for the selected modules.

git merge module/1 module/3 module/7; git annex get

Users would want to do that after every git pull, presumably, so
probably a shell script would be called for.



What I didn't ask is whether Mac or other non-linux systems would also
be supported. Windows seems to be feasible, but not is not guaranteed
to happen:
If I'm funded for a year ($20k), I will spend at least one month
of it in Windows purgatory, making the port happen. No guarantees of
success on this one!
(he is missing less that $1k for that goal though).


---

Actually, my original idea/suggestion was actually slightly different
and would probably not need any additional software to be installed,
but would not necessary be in scope of this project. I'm still looking
for a way to have a smarter rsync server, so that I could use
something like
rsync -av rsync://contextgarden.net/suite/context/@tag:2013.12.13T12:13
texmf-context/
and rsync would then serve files from a particular branch/tag/sha of a
git repository, without the need to have different version of


The biggest problem with everything is that I'm somehow narrow-sided.
I need someone to help me think a bit out of the box and get a broader
picture. To help me decide if one of the above options (patching rsync
server or being beta testers for git-annex) would make sense.

Of course anyone is invited to make his/her own donation to git-annex
independent of whether or not it will make sense for us to use it, but
if there is a consensus that it would be worth using it for the
distribution, we could combine our donations or make a donation from
ConTeXt Group to become the official beta testers.

Mojca

(PS: It is not ready yet and I've been promising it for way too long
already, but the first change that I will do to the distribution will
be the ability to use both current approach as well as a git
repository (without the option to exclude stuff), so that if something
breaks in the middle of a project after ConTeXt update, it will be
trivial to go back in time to any given version of ConTeXt  matching
LuaTeX  fonts. At the moment going back in time requires at least a
bit of creativity, for example fetching the latest working version of
ConTeXt from existing unofficial Git repository etc.)
___
If your question is of interest to others as 

Re: [NTG-context] [OT] git-annex: a new option for ConTeXt distribution (kickstarter campaign ends in 4 days)

2012-06-08 Thread Mojca Miklavec
 Actually, my original idea/suggestion was actually slightly different
 and would probably not need any additional software to be installed,
 but would not necessary be in scope of this project. I'm still looking
 for a way to have a smarter rsync server, so that I could use
 something like
    rsync -av rsync://contextgarden.net/suite/context/@tag:2013.12.13T12:13
 texmf-context/
 and rsync would then serve files from a particular branch/tag/sha of a
 git repository, without the need to have different version of

(I'm sorry for the incomplete paragraph.)

I wanted to say that this would allow switching to an arbitrary
version/date of distribution via rsync without having to provide all
those files as flat files on the server. Providing 700 unzipped
version of ConTeXt on the server is definitely not feasible, but the
.git repository of that only consumes 33 MB.

Mojca
___
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] LuaLaTeX + fontspec: cannot compare documents with Acrobat

2012-06-08 Thread Jörg Weber
Hans' MWE is not comparable, but Aditya's example (with 
\setupbodyfont[palatino]) compares just fine!


-Ursprüngliche Nachricht-
Von: Hans Hagen [mailto:pra...@wxs.nl] 
Gesendet: Freitag, 8. Juni 2012 16:57
An: mailing list for ConTeXt users
Cc: Jörg Weber
Betreff: Re: [NTG-context] LuaLaTeX + fontspec: cannot compare documents with 
Acrobat

On 8-6-2012 17:26, Jörg Weber wrote:
 (This is an issue I originally posted here:
 http://tex.stackexchange.com/questions/58760/lualatex-fontspec-cannot-
 compare-documents-with-acrobat and I cross-posted on the LuaTeX User 
 Mailing list)

 I use the option compare documents in Adobe Acrobat Pro a lot to 
 highlight changes between revisions. What I just noticed is, if I 
 compile a simple document such as the one below with LuaLaTeX + 
 fontspec, Acrobat is unable to perform the comparison, giving a 
 unspecific error message (cannot compare document...). Compiling the 
 same document without fontspec allows the comparison, as does XeLaTeX 
 + fontspec.

 I tried with TeX Live 2012 and the current MikTeX, without success.
 Ulrike Fischer suggested \usepackage{luaotfload} \font\test=Arial 
 \pagestyle{empty} and \test after \begin{document} instead of 
 fontspec, but the error remains. Does anyone know what is going on and 
 of a possible fix?

 \documentclass{article}

 \usepackage{fontspec}

 \usepackage{lipsum}

 \begin{document}

 \lipsum

 \end{document}

I can't process that here. This is a easier test:

\nopdfcompression

\setupbodyfont[dejavu]

\startTEXpage[offset=10pt]
 a % a
\stopTEXpage

Even such a minimal document cannot be compared. I have no clue how the compare 
is supposed to work but if a simple 'a' vs 'aa' document does not work while 
the files preflight ok it's probably an acrobat issue.

Hans

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




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

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


Re: [NTG-context] LuaLaTeX + fontspec: cannot compare documents with Acrobat

2012-06-08 Thread Jörg Weber
Some further testing showed that the simple document with palatino compares 
fine, but with dejavu it is not comparable. With XeLaTeX, setting palatino as 
the main font, still does not work.

-Original Message-
From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On Behalf 
Of Jörg Weber
Sent: Friday, June 08, 2012 5:17 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] LuaLaTeX + fontspec: cannot compare documents with 
Acrobat

Hans' MWE is not comparable, but Aditya's example (with 
\setupbodyfont[palatino]) compares just fine!


-Ursprüngliche Nachricht-
Von: Hans Hagen [mailto:pra...@wxs.nl]
Gesendet: Freitag, 8. Juni 2012 16:57
An: mailing list for ConTeXt users
Cc: Jörg Weber
Betreff: Re: [NTG-context] LuaLaTeX + fontspec: cannot compare documents with 
Acrobat

On 8-6-2012 17:26, Jörg Weber wrote:
 (This is an issue I originally posted here:
 http://tex.stackexchange.com/questions/58760/lualatex-fontspec-cannot-
 compare-documents-with-acrobat and I cross-posted on the LuaTeX User 
 Mailing list)

 I use the option compare documents in Adobe Acrobat Pro a lot to 
 highlight changes between revisions. What I just noticed is, if I 
 compile a simple document such as the one below with LuaLaTeX + 
 fontspec, Acrobat is unable to perform the comparison, giving a 
 unspecific error message (cannot compare document...). Compiling the 
 same document without fontspec allows the comparison, as does XeLaTeX
 + fontspec.

 I tried with TeX Live 2012 and the current MikTeX, without success.
 Ulrike Fischer suggested \usepackage{luaotfload} \font\test=Arial 
 \pagestyle{empty} and \test after \begin{document} instead of 
 fontspec, but the error remains. Does anyone know what is going on and 
 of a possible fix?

 \documentclass{article}

 \usepackage{fontspec}

 \usepackage{lipsum}

 \begin{document}

 \lipsum

 \end{document}

I can't process that here. This is a easier test:

\nopdfcompression

\setupbodyfont[dejavu]

\startTEXpage[offset=10pt]
 a % a
\stopTEXpage

Even such a minimal document cannot be compared. I have no clue how the compare 
is supposed to work but if a simple 'a' vs 'aa' document does not work while 
the files preflight ok it's probably an acrobat issue.

Hans

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




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

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


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

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


Re: [NTG-context] LuaLaTeX + fontspec: cannot compare documents with Acrobat

2012-06-08 Thread Hans Hagen

On 8-6-2012 18:17, Jörg Weber wrote:

Hans' MWE is not comparable, but Aditya's example (with 
\setupbodyfont[palatino]) compares just fine!


The page streams look trivial so that cannot be the issue ...

BT
/F1 11.955168 Tf 1 0 0 1 10.3611 10.5304 Tm [00440044]TJ
ET

BT
/F1 11.955168 Tf 1 0 0 1 10.3611 10.5304 Tm [0044]TJ
ET

... given that aditya's example work it might be a font issue.

Hans

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


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

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


[NTG-context] first-setup.sh

2012-06-08 Thread Andy Thomas
Hi all,

after a lot of confusion I discovered that first-setup.sh is not Andy-proof. If 
there is a broken internet connection, the update lua process works and pushes 
the rsync error message very quickly out of the terminal. I propose to change 
the rsync line to

rsync -rlptv rsync://contextgarden.net/minimals/setup/$platform/bin . || { echo 
Cannot reach the repository; exit 1; }

Andy

P.S. Someone already did the same to the ruby error message, it is copied a 
second time at the end.
___
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] first-setup.sh

2012-06-08 Thread Mojca Miklavec
On Fri, Jun 8, 2012 at 6:40 PM, Andy Thomas wrote:
 Hi all,

 after a lot of confusion I discovered that first-setup.sh is not Andy-proof. 
 If there is a broken internet connection, the update lua process works and 
 pushes the rsync error message very quickly out of the terminal. I propose to 
 change the rsync line to

 rsync -rlptv rsync://contextgarden.net/minimals/setup/$platform/bin . || { 
 echo Cannot reach the repository; exit 1; }

Thank you, that makes sense, I'll change it.

But I believe that some similar safeguards might be needed in the lua
script (there is a slight chance that this would go through and the
calls in lua script wouldn't).

Mojca
___
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] first-setup.sh

2012-06-08 Thread Mojca Miklavec
On Fri, Jun 8, 2012 at 6:47 PM, Mojca Miklavec wrote:
 On Fri, Jun 8, 2012 at 6:40 PM, Andy Thomas wrote:
 Hi all,

 after a lot of confusion I discovered that first-setup.sh is not Andy-proof. 
 If there is a broken internet connection, the update lua process works and 
 pushes the rsync error message very quickly out of the terminal. I propose 
 to change the rsync line to

 rsync -rlptv rsync://contextgarden.net/minimals/setup/$platform/bin . || { 
 echo Cannot reach the repository; exit 1; }

 Thank you, that makes sense, I'll change it.

 But I believe that some similar safeguards might be needed in the lua
 script (there is a slight chance that this would go through and the
 calls in lua script wouldn't).

Also, if the file doesn't exist on the server (if you change a letter
in path or if platform would be removed from supported one for
example), it doesn't stop. I didn't try to investigate if there is an
easy way around that.

Also keep in mind that users need to update the original script
(currently still called first-setup.sh) manually.

Mojca
___
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] back-up.lua; mtx-epub.lua

2012-06-08 Thread Andy Thomas
Hello all,

I am thinking about the best way to implement the cover image for the epub. 
This is a mandatory requirement to work properly. The cover image is not 
necessarily present in the pdf version of the document and it might be the only 
item where that is true. So I tried to sort out the options.

1) Always take cover.png in the current directory; not very elegant
2) add cover={…} to \setupinteraction; hijacks the pdf interaction macro
3) add a \setupepub; might be overkill, but maybe more options are added later 
4) ?

Then, the image is taken, renamed and copied in the image folder and finally a 
html page containing the cover is created. This part is straightforward.

It would be great, if someone could come up with an elegant idea how to add the 
cover image file that is compatible with the context style.

Andy

On Jun 7, 2012, at 2:48 PM, Henning Hraban Ramm wrote:

 Am 2012-06-07 um 00:00 schrieb Andy Thomas:
 
 Hello all,
 I do not know, how many people are using the epub export, but here are two 
 more changes in order to achieve a valid epub file with information from the 
 context source:
 
 Since I need ePub for my current project (even if th eprint version is much 
 more important), I’m very grateful for your enhancements! I hope they end up 
 in the distro ASAP.
 
 
 Greetlings, Hraban
 ---
 http://www.fiee.net/texnique/
 http://wiki.contextgarden.net
 https://www.cacert.org (I'm an assurer)
 
 ___
 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] first-setup.sh

2012-06-08 Thread Aditya Mahajan

On Fri, 8 Jun 2012, Mojca Miklavec wrote:


Also keep in mind that users need to update the original script
(currently still called first-setup.sh) manually.


FWIW, I updated the PKGBUILD for arch linux: 
https://aur.archlinux.org/packages.php?ID=30398


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

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


Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-08 Thread Aditya Mahajan

Hello all,

I am thinking about the best way to implement the cover image for the epub. 
This is a mandatory requirement to work properly. The cover image is not 
necessarily present in the pdf version of the document and it might be the only 
item where that is true. So I tried to sort out the options.

1) Always take cover.png in the current directory; not very elegant
2) add cover={…} to \setupinteraction; hijacks the pdf interaction macro
3) add a \setupepub; might be overkill, but maybe more options are added later
4) ?


\setupbackend[coverimage={}]

Backends other than epub can safely ignore the directive.

In one of your earlier threads, you had talked about taking title, author, 
etc from setupinteraction. It might be better to take then from 
\setupbackend as well (will work for both epub and xhtml backends, perhaps 
also for xml).


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

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

Re: [NTG-context] LuaLaTeX + fontspec: cannot compare documents with Acrobat

2012-06-08 Thread Aditya Mahajan

On Fri, 8 Jun 2012, Jörg Weber wrote:

Some further testing showed that the simple document with palatino 
compares fine, but with dejavu it is not comparable. With XeLaTeX, 
setting palatino as the main font, still does not work.


ConTeXt uses TeX Gyre Pagella rather than true Palatino. That might be a 
source of difference.


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

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

Re: [NTG-context] \externalfigure shows text alongside the picture

2012-06-08 Thread Alfredo Catalina
Great! Thanks Wolfgang!

On 8 Jun 2012 17:16, Wolfgang Schuster schuster.wolfg...@googlemail.com
wrote:


 Am 08.06.2012 um 17:10 schrieb Alfredo Catalina:

  I am using \externalfigure to show a picture at the desired scale.
Instead of providing a number for the width parameter I have made a
definition with \def. When I run in mkiv this I get the text 4t alongside
the picture.
 
  \def\DesignSize#1{3.5cm/4*#1}%
  \starttext
  \externalfigure[hacker.jpg][width=\DesignSize{4}]
  \stoptext
 
  In mkii is perfect.
 
  I've also tried
 
  \define[1]\DesignSize{3.5cm/4*#1}
 
  with the same result.

 \define[1]\DesignSize{\the\dimexpr3.5cm/4*#1\relax}

 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] feature request for \getspr{}

2012-06-08 Thread Hans Hagen

On 8-6-2012 12:21, Peter Münster wrote:

On Fri, Jun 08 2012, Hans Hagen wrote:


I've added moduledata.spreadsheets.settings.numberseparator but you have to
test it after the next upload.


Tested. Thanks!

Just a minor comment: \setupspreadsheet[numberseparator=,] would be
nicer than
\ctxlua{moduledata.spreadsheets.settings.numberseparator = ,}


next beta


\setupspreadsheet
  [test]
  [period={{\bf\middlered .}},
   comma={{\bf\middlegreen ,}},
   split=yes]

\startspreadsheettable[test]
   \startrow
 \startcell  123456.78 \stopcell
 \startcell 1234567.89 \stopcell
 \startcell A[1] + B[1] \stopcell
   \stoprow
\stopspreadsheettable


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


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

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


Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-08 Thread Hans Hagen

On 8-6-2012 20:25, Aditya Mahajan wrote:

Hello all,

I am thinking about the best way to implement the cover image for the
epub. This is a mandatory requirement to work properly. The cover
image is not necessarily present in the pdf version of the document
and it might be the only item where that is true. So I tried to sort
out the options.

1) Always take cover.png in the current directory; not very elegant
2) add cover={…} to \setupinteraction; hijacks the pdf interaction macro
3) add a \setupepub; might be overkill, but maybe more options are
added later
4) ?


\setupbackend[coverimage={}]

Backends other than epub can safely ignore the directive.


better is

\setupexport

(actually, we do have \setupdocument which makes een more sense:

(1) take from setupdocument
(2) if empty take from setupexport
(3) otherwise take from setupinteraction


In one of your earlier threads, you had talked about taking title,
author, etc from setupinteraction. It might be better to take then from
\setupbackend as well (will work for both epub and xhtml backends,
perhaps also for xml).


Indeed, I realized that this morning but had not time to look into it 
yet. The interaction title is normally a simplified one used for 
referencing or document info.


Hans

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


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

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


Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-08 Thread Hans Hagen

On 8-6-2012 20:08, Andy Thomas wrote:


I am thinking about the best way to implement the cover image for the epub. 
This is a mandatory requirement to work properly. The cover image is not 
necessarily present in the pdf version of the document and it might be the only 
item where that is true. So I tried to sort out the options.


filter the first page of the pdf and convert it to svg or png (which is 
what I did a couple of times)


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


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

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


Re: [NTG-context] first-setup.sh

2012-06-08 Thread Hans Hagen

On 8-6-2012 18:54, Mojca Miklavec wrote:

On Fri, Jun 8, 2012 at 6:47 PM, Mojca Miklavec wrote:

On Fri, Jun 8, 2012 at 6:40 PM, Andy Thomas wrote:

Hi all,

after a lot of confusion I discovered that first-setup.sh is not Andy-proof. If 
there is a broken internet connection, the update lua process works and pushes 
the rsync error message very quickly out of the terminal. I propose to change 
the rsync line to

rsync -rlptv rsync://contextgarden.net/minimals/setup/$platform/bin . || { echo 
Cannot reach the repository; exit 1; }


Thank you, that makes sense, I'll change it.

But I believe that some similar safeguards might be needed in the lua
script (there is a slight chance that this would go through and the
calls in lua script wouldn't).


Also, if the file doesn't exist on the server (if you change a letter
in path or if platform would be removed from supported one for
example), it doesn't stop. I didn't try to investigate if there is an
easy way around that.

Also keep in mind that users need to update the original script
(currently still called first-setup.sh) manually.


Maybe this is then the right time to do the renaming:

fetch-context

or so, as an update is not a first

Hans


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


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

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


Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-08 Thread Hans Hagen

On 8-6-2012 23:28, Andy Thomas wrote:

Thank you for the suggestions. I will try to implement it, but might need until 
Sunday.


- I've added some keys to \setupexport:

  author
  title
  subtitle
  firstpage (also new key in mult)
  lastpage  (aso new key in mult)

- The title, subtitle and author inherit from \setupinteraction which 
already inherits from \setupdocument (metadata namespace).


- In mtx-epub these variables are picked up (from the epub job 
specification) and firstpage / lastpage are added to the images list.


Nothing has been checked and the firstpage/lastpage image names have to 
be pushed into some epub metadata blob I guess but that's for you to 
figure out in mtx-epub. It's probably best to assume that the images are 
present and suitable for epub.


Hans

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


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

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


Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-08 Thread Aditya Mahajan

On Sat, 9 Jun 2012, Hans Hagen wrote:


On 8-6-2012 23:28, Andy Thomas wrote:
Thank you for the suggestions. I will try to implement it, but might need 
until Sunday.


- I've added some keys to \setupexport:

 author
 title
 subtitle
 firstpage (also new key in mult)
 lastpage  (aso new key in mult)

- The title, subtitle and author inherit from \setupinteraction which already 
inherits from \setupdocument (metadata namespace).


I never realized that there was a \setupdocument!

This might be the best way to have a document title in ConTeXt:

\startsetups document:start
 
 code to typeset document title
 
\stopsetups

\setupdocument
[title={...},
 author={...},
 date={...},
]

\startdocument

\stopdocument

rather than the different custom solutions that are floating around.

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

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