ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Olivier Binda <olivier.binda@wanadoo.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Struggling with ConTeXt
Date: Tue, 21 Aug 2012 00:27:33 +0200	[thread overview]
Message-ID: <5032B9D5.6080003@wanadoo.fr> (raw)
In-Reply-To: <alpine.LNX.2.02.1208021137070.4717@ybpnyubfg.ybpnyqbznva>

Many thanks for the enlightening answers.

The explanations about xml solved question 1 and \startmatrix\stopmatrix 
solved question 4.

I'm now crunching xml input and handling it half in lua and half in tex 
(and I'm verry happy about it).

I'm still struggling with a few points though (with context standalone 
beta on ubuntu):

3) I'm flowing text around mathematical text with graphic ornaments 
(overlay) but the bounding box from metapost (red) and from TeX (black) 
on the following minimal example aren't the same which produce all kinds 
of "flowing text" issues.
is there a way/an option for framedtexts with overlay to get the max 
width/height size of the main content + overlays ?


\startusableMPgraphic{myFrame}
   numeric o, l, m ; path a, b ; pair c ;
   picture d; d = textext.rt(\MPstring{Content}) ;
   draw (unitsquare xyscaled (OverlayWidth,OverlayHeight) shifted 
(-OverlayWidth/2,-OverlayHeight/2)) withpen pencircle scaled 1pt 
withcolor green;
   draw (d enlarged 2cm) withcolor red withpen pencircle scaled 2pt;
    draw boundingbox currentpicture withpen pencircle scaled .1mm dashed 
evenly withcolor blue ;
\stopusableMPgraphic

\defineoverlay[myOverlay][\useMPgraphic{myFrame}]
\defineframedtext[myStatement][frame=off]
\setupframedtexts[myStatement][backgroundcolor=lightgray,background=myOverlay,width=\textwidth,autowidth=force]
\starttext
\framed[fit]{\startmyStatement
TEST
\stopmyStatement}
\stoptext


3b) I found a dirty workaround by making metapost draw the texts and the 
graphics (through mpstring) but then, i can't embed graphics in my 
Tex-text.
Is there a way to have graphics inside MPstrings that goes inside metapost ?



About question 2, Context doesn't produce svg okey...but tikz and 
metapost can produce svg.
So, is there a ConteXt setup/systems calls/a  (simple or not) workaround 
to make metapost/tikz produce svg files ?
Like some script that I could run on my snipets ?

I would really like to produce svg from my metapost/tikz pictures



Best regards,
Olivier

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


  parent reply	other threads:[~2012-08-20 22:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02 15:29 Olivier Binda
2012-08-02 15:43 ` Aditya Mahajan
2012-08-02 15:47   ` Aditya Mahajan
2012-08-03  6:35   ` Olivier Binda
2012-08-03 10:10     ` Hans Hagen
2012-08-03 14:50       ` Sietse Brouwer
2012-08-03 16:14         ` Hans Hagen
2012-08-05  9:35         ` Thomas A. Schmitz
2012-08-20 22:27   ` Olivier Binda [this message]
2012-08-22  4:54     ` Aditya Mahajan
2012-08-22  8:21       ` Olivier Binda
2012-08-22  8:42         ` Aditya Mahajan
2012-08-22 10:31           ` Olivier Binda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5032B9D5.6080003@wanadoo.fr \
    --to=olivier.binda@wanadoo.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).