[NTG-context] Center two frames

2015-01-13 Thread Fabrice Couvreur
Hi,
I wish the second frame is centered with the first frame. I guess this is
the figure that prevents this. However, even by reducing the value of u, it
does not work.
Best regards,
Fabrice

\definecolor[Border][c=0.00, m=0.00, y=0.00, k=0.25]

\defineframed
   [Myframed]
   [width=0.6\textwidth,
foregroundstyle={\switchtobodyfont[10pt]},
align={high,flushleft},
frame=off,
framecolor=0.625white,
background=borderline,
]

\definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint\par]

\startsetups[table:initialize]
  \setupTABLE[start]
 [align={lohi,right}
 offset=1ex,
 frame=off,
 ]
  \setupTABLE[column][first][width=0.25\textwidth]
  \setupTABLE[column][2][width=0.35\textwidth]
\stopsetups

\starttext

\startuniqueMPgraphic{borderline}
path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
1.2pt ;
\stopuniqueMPgraphic

\defineoverlay[borderline][\uniqueMPgraphic{borderline}]

\placefigure[right,none]{}{
\start
\switchtobodyfont[7pt]
\startMPcode
numeric u;
u=0.7cm;
z0=(0,0) ;
z1=(2.5u,0) ;
z2=(2.5u,2.5u) ;
z3=(0,2.5u) ;
z4=(-0.2u,0) ;
z5=(-0.2u,2.5u) ;
z6=(0,2.7u) ;
z7=(2.5u,2.7u) ;
z8=(1.25u,1.25u) ;
drawdblarrow z4--z5 ;
drawdblarrow z6--z7 ;
fill z0--z1--z2--z3--cycle withcolor green ;
draw z0--z1--z2--z3--cycle ;
label.top("\unit{100 meter}",0.5[z6,z7]) ;
label.lft("\unit{100 meter}",0.5[z4,z5]) ;
\stopMPcode
\stop}
Compléter chacun des algorithmes ci-dessous afin qu'ils affichent en
\unit{square meter}, puis en hectares, la superficie d'un terrain
rectangulaire de longueur $L$ mètres et de largeur $l$ mètres, saisies en
entrée.

\startbuffer
\input knuth
\stopbuffer

\blank[big]
\startmidaligned
\Myframed{\getbuffer}
\stopmidaligned

\startbuffer
\input ward
\stopbuffer

\blank[big]
\startmidaligned
\Myframed{\getbuffer}
\stopmidaligned
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] context -> docx ??

2015-01-13 Thread Marcin Borkowski

On 2015-01-13, at 20:59, Idris Samawi Hamid ادريس سماوي حامد 
 wrote:

> Dear gang,
>
> I'm currently writing a paper with very basic typographical needs:  
> blockquotes, emphasis, bibliography, perhaps a graphic or two. The  
> publisher wants the thing in Word, naturally. The last time I did  
> something like this I set up a markdown document and just exported it to  
> both docx and to context. For simple documents this is at least workable,  
> but I'd prefer to write in context, not markdown.

While I /do/ understand you (it's the same with me, only that I'm more
comfortable with LaTeX), have you considered Org-mode?  It's
similar to markdown (though better IMHO), but it comes with great
support in Emacs.  And you get export to odt "for free".  (Also to
LaTeX, though unfortunately not to ConTeXt; OTOH, writing a ConTeXt
exporter should be fairly easy, and a simple exporter could be done in
a few days - the framework for writing exporters to different formats is
very well done.  Incidentally, there's also a Markdown exporter, so you
could probably get to ConTeXt via markdown).

> Best wishes
> Idris

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
___
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] context -> docx ??

2015-01-13 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

I'm currently writing a paper with very basic typographical needs:  
blockquotes, emphasis, bibliography, perhaps a graphic or two. The  
publisher wants the thing in Word, naturally. The last time I did  
something like this I set up a markdown document and just exported it to  
both docx and to context. For simple documents this is at least workable,  
but I'd prefer to write in context, not markdown.


Now it's been a while since I've experimented with ConTeXt and epub. From  
lightly perusing the list it seems that there has been considerable  
movement on this front. So my question: Has anyone here succeeded in the  
following workflow:


context -> xml -> docx

[perhaps via pandoc]?

If so, do any of you have any samples of such a workflow that work with  
the latest context? Or am I stuck with markdown?


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] What happened to the ePub script?

2015-01-13 Thread Henning Hraban Ramm

Am 2015-01-13 um 20:50 schrieb Hans Hagen :

> On 1/13/2015 2:57 PM, Henning Hraban Ramm wrote:
> 
>> mtx-epub| copying coverpage 'giraffe.pdf' to 
>> 'solo-export/giraffe.pdf'...texmf/tex/texmf-context/scripts/context/lua/mtx-epub.lua:557:
>>  bad argument #1 to 'gsub' (string expected, got nil)
>> 
>> 
>> I’ll investigate further tomorrow.
> 
> i'll intercept the missing image

Thanks, but the image isn’t missing!?

Greetlings, Hraban
---
http://www.fiee.net
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
___

Re: [NTG-context] What happened to the ePub script?

2015-01-13 Thread Hans Hagen

On 1/13/2015 2:57 PM, Henning Hraban Ramm wrote:


mtx-epub| copying coverpage 'giraffe.pdf' to 
'solo-export/giraffe.pdf'...texmf/tex/texmf-context/scripts/context/lua/mtx-epub.lua:557:
 bad argument #1 to 'gsub' (string expected, got nil)


I’ll investigate further tomorrow.


i'll intercept the missing image

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] What happened to the ePub script?

2015-01-13 Thread Henning Hraban Ramm
Am 2015-01-13 um 15:58 schrieb Hans Hagen :

> the whole generation of epub was cleanup up (already a while ago)

I know, but it seems I have to recreate my whole workflow again.

> just use:
> 
> \setupbackend[export=yes]
> 
> all happens in dedicated sub directories now
> 
> -export
> -epub
> 
> also, there have been some changes in the output (more detail in sectioning 
> and so i.e. chains and levels) ... just look at the files produced
> 
> there is also div based output

Didn’t have enough time to look into everything in detail, but if I just run 
the epub script after the context run, it fails:


$ mtxrun --script epub --make solo

resolvers   | caching | skipping 'files' for 'home:texmf' from 
'/Users/hraban/Library/texmf/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
 (version mismatch)
mtx-epub| using specification file 'solo-export/solo-pub.lua'
mtx-epub| the 'mudraw' binary is not present
mtx-epub| using cover page 'giraffe.pdf'
mtx-epub| copying coverpage 'giraffe.pdf' to 
'solo-export/giraffe.pdf'...texmf/tex/texmf-context/scripts/context/lua/mtx-epub.lua:557:
 bad argument #1 to 'gsub' (string expected, got nil)


I’ll investigate further tomorrow.

Greetlings, Hraban
---
http://www.fiee.net
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
___

Re: [NTG-context] What happened to the ePub script?

2015-01-13 Thread Hans Hagen

On 1/13/2015 7:45 AM, Henning Hraban Ramm wrote:

Hi,
with the latest betas, the ePub script doesn’t work anymore.
Regardless with which file I call it, I get only:


the whole generation of epub was cleanup up (already a while ago)


$ mtxrun --script mtx-epub --make solo

resolvers   | caching | skipping 'files' for 'home:texmf' from 
'/Users/hraban/Library/texmf/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
 (version mismatch)
mtx-epub| unknown specificaton file for 'solo'


Previously, you didn’t need to call it with any specification file, but only 
with a plain ConTeXt file like


\setupbackend[
export=export.xml,xhtml=yes,
]
\setupexport[
firstpage={koe.png},
]
\settaggedmetadata[
author={Hraban},
]


\starttext

\startchapter[title={Chapter One}]

\startsection[title={Section One}]

\input tufte

\stopsection

\startsection[title={Section Two}]

\input knuth

\externalfigure[koe][width=\textwidth]

\stopsection

\stopchapter

\stoptext


An export.specification file was previously created by the script, I don’t know 
(anymore) for what. Calling the script with one of those also doesn’t do 
anything.


just use:

\setupbackend[export=yes]

all happens in dedicated sub directories now

-export
-epub

also, there have been some changes in the output (more detail in 
sectioning and so i.e. chains and levels) ... just look at the files 
produced


there is also div based output

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] "someone who can fix can fix"

2015-01-13 Thread Hans Hagen

On 1/13/2015 8:07 AM, Henning Hraban Ramm wrote:

Hi again,

I’m trying to get my invoice setup working again.

The error message is:

close source> 3 > 12 > invoicefunctions.tex

tex error   > error on line 75 in file virtual://buffer.608>letter.1: ! 
This can't happen (linebreak_tail)


\spac_vspacing_yes_indeed ...>\ifmmode \else \par
   \ctxcommand {vspacing("#1"...
l.75 \blank[2*big]




I'm broken. Please show this to someone who can fix can fix



I don’t know where to start looking, I guess it’s something with the letter 
module.
The same files used to work at least until November 2014 and stopped somewhen 
end of 2014.

So far I failed to cook up a minimal example, I’ll gladly prepare one if you 
can point me to something that might be the cause.


it's around one of the \blank usage cases

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