Re: [NTG-context] Add new unit to \unit comand

2013-10-06 Thread Wolfgang Schuster

Am 03.10.2013 um 14:19 schrieb Giuseppe Fierro :

> Hi,
> I'm a civil engineer and I like to use ConTeXt to write my report etc.
> As engineer i use a lot of units in my writing and the \unit command works 
> nice with this.
> 
> What I need is a new unit, a quadratic unit like this:
> Area Moment of Inertia - Metric units mm4 cm4 m4
> 
> This kind of units are quite common in civil engineer.
> 
> This is an example of what i want in ConTeXt
> 
> \starttext
>  \unit{230.00 m^2}
> 
>  \unit{230.00 m^3}
> 
>  \unit{230.00 m^4}
> \stoptext

\starttext

\unit{230.00 square meter}

\unit{230.00 cubic meter}

\unit{230.00 quadratic meter}

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

[NTG-context] \definetype[xxx][linebreaks=yes, breakpoints=name]

2013-10-06 Thread Peter Münster
Hi,

Is it already possible to define a new \type{} command that allows
linebreaks and perhaps also a breakpoint set?

If not, here my feature request: something like
\definetype[xxx][linebreaks=yes, breakpoints=compound]

TIA,
-- 
   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] TEXpage produces wrong bounding box with rotated images

2013-10-06 Thread Marco Patzer
Hi,

when rotation is used, the TEXpage bounding box is incorrect. Angles
multiples of 90° are correct, however. It looks like a bug. Example:

\setupexternalfigures [location=default]
\starttext
  \startTEXpage
\externalfigure [hacker] [orientation=44]
  \stopTEXpage
  \startTEXpage
\externalfigure [hacker] [orientation=46]
  \stopTEXpage
\stoptext

Marco


signature.asc
Description: Digital 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] Sectioning from 0?

2013-10-06 Thread Lukáš Procházka

On Fri, 04 Oct 2013 16:53:58 +0200, Mari Voipio  wrote:


On Fri, Oct 4, 2013 at 5:11 PM, Peter Münster  wrote:

\startsection[ownnumber=123, title=A]
bla
\stopsubsection


?


That was a typo, I guess; it should have been:

\startsubsection[ownnumber=123,title=A]
  bla
\stopsubsection

Lukas



(They should be a pair, shouldn't they? Just in case somebody tries to
cut-and-paste the code...)

Mari



___
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] passvariable(); path problem

2013-10-06 Thread Hans Hagen

On 10/6/2013 3:05 PM, Peter Rolf wrote:


Thanks for the explanation. I think I have understood the scheme (but I
might be wrong, because this doesn't help me with my example).

Where is the starting point['20 20'] in the returned example path? Same
is true for the first control point ['20 190.34']. Either I'm missing
something, or the returned path data is incomplete.


you get just the value of the path variable in your mp code, not a ps or 
whatever representation and in mp a path has just points so the starting 
point is the x y of the first point


-
  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] scope and grouping in flowchart

2013-10-06 Thread Peter Münster
Hi,

Why is the \getvariable not in the same grouping level as the
\setvariables here:

--8<---cut here---start->8---
\usemodule[chart]
\startFLOWchart[test]
  \startFLOWcell
\setvariables[test][test=test]
\text{\getvariable{test}{test}} % no text!
  \stopFLOWcell
\stopFLOWchart
\starttext
\FLOWchart[test]
\stoptext
--8<---cut here---end--->8---

Workaround: \setgvariables[test][test=test]

TIA for any explanation,
-- 
   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] on the xcorresp module

2013-10-06 Thread Pablo Rodríguez
Dear Hans,

I’m very interested in using ConTeXt to generate the correspondence at work.

I have seen the xcorresp module documentation and I wonder whether it is
under development or not.

Thanks,


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] passvariable(); path problem

2013-10-06 Thread Peter Rolf
Am 06.10.2013 00:37, schrieb Hans Hagen:
> On 10/5/2013 5:52 PM, Peter Rolf wrote:
>> I played around with it, but I have problems to understand the format of
>> the returned path.
>>
>> Example:
>> % 
>> \setuppagenumber[state=stop]
>>
>> \starttext
>> \nopdfcompression
>>
>> \startMPpage
>>path p;
>>p:= (20,20){up} .. {down}(200,100);
>>passvariable("path",p);
>>draw p ;
>> \stopMPpage
>>
>> \ctxlua{inspect{metapost.variables["path"]}}
>> \stoptext
>> % ---
>>
>> The PDF code of the path is (mainly)
>>
>> 20.00 20.00 m
>> 20.00 190.342880 200.00 184.016693 200.00 100.00 c
>>
>> "path" contains
>>
>> table={
>>   {
>>{ 200, 100, 200, 184.0167, 200, 100 },
>>   },
>> }
>>
>> The end point and the second control point are the same, as in the PDF
>> code. But how do I calculate the starting point and the first control
>> point from the returned values?
> 
> something
> 
> local prev = nil
> for i=1,#path do
> local current = path[i]
> if not prev then
> print(current[1],current[2],"m")
> else
> print(prev[5],prev[6],prev[3],prev[4],current[1],current[2],"c")
> end
> prev = current
> end
> -- close last to first if needed
> 
>> And is the type of operation (line, curve,..) given by the number of
> values?
> 
> by analyzing using thresholds (one can just use "c" always, as "l" is an
> optimization)
> 
> Hans
> 

Thanks for the explanation. I think I have understood the scheme (but I
might be wrong, because this doesn't help me with my example).

Where is the starting point['20 20'] in the returned example path? Same
is true for the first control point ['20 190.34']. Either I'm missing
something, or the returned path data is incomplete.


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] image vertical positioning in xtable

2013-10-06 Thread Hans Hagen

On 10/6/2013 10:51 AM, Peter Münster wrote:

On Sun, Oct 06 2013, Pablo Rodríguez wrote:


I have the following sample that places the image below the text in the
same cell:

   \startxcell image \externalfigure[cow.pdf][height=.5em]
   \stopxcell


Perhaps a bug?


--8<---cut here---start->8---
\setupexternalfigures[location=default]
\starttext
X\externalfigure[cow.pdf][frame=on, height=5mm]X
X\externalfigure[cow.pdf][frame=on, height=2mm]X
\stoptext
--8<---cut here---end--->8---

indeed, fixed in next beta (side effect of optimization)

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] image vertical positioning in xtable

2013-10-06 Thread Peter Münster
On Sun, Oct 06 2013, Pablo Rodríguez wrote:

> I have the following sample that places the image below the text in the
> same cell:
>
>   \startxcell image \externalfigure[cow.pdf][height=.5em]
>   \stopxcell

Perhaps a bug?

--8<---cut here---start->8---
\setupexternalfigures[location=default]
\starttext
X\externalfigure[cow.pdf][frame=on, height=5mm]X
X\externalfigure[cow.pdf][frame=on, height=2mm]X
\stoptext
--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
___

[NTG-context] image vertical positioning in xtable

2013-10-06 Thread Pablo Rodríguez
Dear list,

I have the following sample that places the image below the text in the
same cell:

\starttext
\startxtable
  \startxrow
  \startxcell This is an \stopxcell
  \startxcell image \externalfigure[cow.pdf][height=.5em]
  \stopxcell
  \stopxrow
\stopxtable
\stoptext

How can the image be on the same base as the text? I mean, not below the
text.

Many thanks for your 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
___