Re: [NTG-context] installing metauml in context

2010-07-09 Thread Kevin D. Robbins
Hi all,

I am also interested in using MetaUML with ConTeXt mkiv. I tried compiling
the attached test-metauml.tex with the versions (I updated today):

MTXrun | main context file:
/opt/context/beta/tex/texmf-context/tex/context/base/context.tex
MTXrun | current version: 2010.06.23 12:45

and

This is LuaTeX, Version beta-0.60.2-2010070309

I get the result in the attached test-metauml.pdf, still with the wrong
alignment.

I also tried building the MetaUML graphic in a separate test-metauml.mp file
using "mpost -mem=mpost.mem test-metauml.mp" (I changed the default font in
metauml_defaults.mp to cmtt12) and the left alignment was correct, but the
background boxes were no longer wide enough so that the text overran the box
background.

Kevin

On Mon, May 17, 2010 at 3:12 PM, Hans Hagen  wrote:

> On 17-5-2010 8:49, Shiv Shankar Dayal wrote:
>
>> Hi all,
>>
>> Thanks a lot for this help. I tried again with modifications and it is
>> working
>> with wrong alignment. I am tried using simplefonts like
>>
>
> also in the latest beta?
>
>
> -
>  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
>
> ___
>


test-metauml.tex
Description: TeX document


test-metauml.pdf
Description: Adobe PDF document
___
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] installing metauml in context

2010-05-17 Thread Hans Hagen

On 17-5-2010 8:49, Shiv Shankar Dayal wrote:

Hi all,

Thanks a lot for this help. I tried again with modifications and it is working
with wrong alignment. I am tried using simplefonts like


also in the latest beta?

-
  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] installing metauml in context

2010-05-17 Thread Shiv Shankar Dayal
Hi all,

Thanks a lot for this help. I tried again with modifications and it is working
with wrong alignment. I am tried using simplefonts like

\usemodule[simplefonts,vim,mathml]
\setmainfont[LucidaStd]
\setmonofont[CourierNew]

If I add the above code then it overrides Hanss' suggestion but still
the alignment
is wrong. I am going to try more fonts to get the alignment right.

> \startMPinclusions
>    string metauml_defaultFont            ; metauml_defaultFont     :=
> "\truefontname{Serif}" ;
>    string metauml_defaultFontOblique     ; metauml_defaultFontOblique     :=
> "\truefontname{SerifItalic}" ;
>    string metauml_defaultFontBold        ; metauml_defaultFontBold     :=
> "\truefontname{SerifBold}" ;
>    string metauml_defaultFontBoldOblique ; metauml_defaultFontBoldOblique :=
> "\truefontname{SerifBoldItalic}" ;
>
>    input metauml;
> \stopMPinclusions
>
> At least prevents the error but alignment is weird. Some pseudo typesetting
> is going on and the quality is suboptimal then (after all mp just pastes
> glyphs then). Take this:
>
> Class.A ("Point") ("+x: int", "+y: int") ();
>
> It's probably no big deal for the author to support pictures instead of
> strings
>
> Class.A ("Point") (btex +x: int etex, "+y: int") ();
>
> Class.A ("Point") (textext("+x: int"), "+y: int") ();
>
> It's probabaly already possible somehow but i have no time to look into the
> code in detail now.
>
> 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
> -
>



-- 
Best regards,
Shiv Shankar Dayal
___
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] installing metauml in context

2010-05-15 Thread Hans Hagen

On 15-5-2010 5:08, Shiv Shankar Dayal wrote:

Hi,


I am running ConTeXt mark IV. I need to use metauml for my work.
However, I could not get it installed. Please help. The install file
which comes with it does not work for context.


more info needed .. test file and so

Hans


Sorry about this. Following is from a file for which I took the code from
mailing list itself.


Sorry to bother you  people. It is a pain to waste time like this.
Since metaobj works
with context I will extend and use it to draw UML diagrams. I just
thought that since
it is mentioned as a package at contextgarden I was hoping that it
will work out of the
box.


\startMPinclusions
string metauml_defaultFont; metauml_defaultFont 
:= "\truefontname{Serif}" ;
string metauml_defaultFontOblique ; metauml_defaultFontOblique 
:= "\truefontname{SerifItalic}" ;
string metauml_defaultFontBold; metauml_defaultFontBold 
:= "\truefontname{SerifBold}" ;
string metauml_defaultFontBoldOblique ; 
metauml_defaultFontBoldOblique := "\truefontname{SerifBoldItalic}" ;


input metauml;
\stopMPinclusions

At least prevents the error but alignment is weird. Some pseudo 
typesetting is going on and the quality is suboptimal then (after all mp 
just pastes glyphs then). Take this:


Class.A ("Point") ("+x: int", "+y: int") ();

It's probably no big deal for the author to support pictures instead of 
strings


Class.A ("Point") (btex +x: int etex, "+y: int") ();

Class.A ("Point") (textext("+x: int"), "+y: int") ();

It's probabaly already possible somehow but i have no time to look into 
the code in detail now.


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] installing metauml in context

2010-05-14 Thread Taco Hoekwater


Hi,

The attached file runs without errors for me in mkiv (latest beta,
 2010.05.14 15:26 MKIV). However, note the following:

1. I had to add loading of 8r-base.map for the rptmr font
2. The placement of the text strings is wrong (probably related)

Best wishes,
Taco

Shiv Shankar Dayal wrote:

Hi,


I am running ConTeXt mark IV. I need to use metauml for my work.
However, I could not get it installed. Please help. The install file
which comes with it does not work for context.

more info needed .. test file and so

Hans


Sorry about this. Following is from a file for which I took the code from
mailing list itself.

\chapter{Diameter Finite State Machine}
The state machine of the diameter base protocol implementation will observer
following state machine.
\startMPinclusions
input metauml;
\stopMPinclusions
\startuseMPgraphic{xx}

save A;
save B;
Class.A("Point")
   ("+x: int",
"+y: int") ();

Class.B("Circle")
   ("radius: int")
   ("+getRadius(): int",
"+setRadius(r: int):void");

topToBottom(45)(A, B);

drawObjects(A, B);

clink(aggregationUni)(A, B);

\stopuseMPgraphic

\placefigure[here][fig:xx]{xx}{\useMPgraphic{xx}}

This is included in starttext block.

For verbosity I am also giving you some errors.

 Isolated expression.

   (
<*>  save A; save B; Class.A(
 "Point") ("+x: int", "+y: int") (); Class.B("Ci...

! Extra tokens will be flushed.

   (
<*>  save A; save B; Class.A(
 "Point") ("+x: int", "+y: int") (); Class.B("Ci...


Class.B

! Isolated expression.

Best regards,
Shiv Shankar Dayal
___
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
___




meta.tex
Description: TeX document


meta.pdf
Description: Adobe PDF document
___
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] installing metauml in context

2010-05-14 Thread Shiv Shankar Dayal
Hi,

>>> I am running ConTeXt mark IV. I need to use metauml for my work.
>>> However, I could not get it installed. Please help. The install file
>>> which comes with it does not work for context.
>>
>> more info needed .. test file and so
>>
>> Hans
>
> Sorry about this. Following is from a file for which I took the code from
> mailing list itself.

Sorry to bother you  people. It is a pain to waste time like this.
Since metaobj works
with context I will extend and use it to draw UML diagrams. I just
thought that since
it is mentioned as a package at contextgarden I was hoping that it
will work out of the
box.

-- 
Best regards,
Shiv Shankar Dayal
___
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] installing metauml in context

2010-05-14 Thread Shiv Shankar Dayal
Hi,

>> I am running ConTeXt mark IV. I need to use metauml for my work.
>> However, I could not get it installed. Please help. The install file
>> which comes with it does not work for context.
>
> more info needed .. test file and so
>
> Hans

Sorry about this. Following is from a file for which I took the code from
mailing list itself.

\chapter{Diameter Finite State Machine}
The state machine of the diameter base protocol implementation will observer
following state machine.
\startMPinclusions
input metauml;
\stopMPinclusions
\startuseMPgraphic{xx}

save A;
save B;
Class.A("Point")
   ("+x: int",
"+y: int") ();

Class.B("Circle")
   ("radius: int")
   ("+getRadius(): int",
"+setRadius(r: int):void");

topToBottom(45)(A, B);

drawObjects(A, B);

clink(aggregationUni)(A, B);

\stopuseMPgraphic

\placefigure[here][fig:xx]{xx}{\useMPgraphic{xx}}

This is included in starttext block.

For verbosity I am also giving you some errors.

 Isolated expression.

   (
<*>  save A; save B; Class.A(
 "Point") ("+x: int", "+y: int") (); Class.B("Ci...

! Extra tokens will be flushed.

   (
<*>  save A; save B; Class.A(
 "Point") ("+x: int", "+y: int") (); Class.B("Ci...

>> Class.B
! Isolated expression.

Best regards,
Shiv Shankar Dayal
___
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] installing metauml in context

2010-05-14 Thread Hans Hagen

On 14-5-2010 11:43, Shiv Shankar Dayal wrote:


I am running ConTeXt mark IV. I need to use metauml for my work.
However, I could not get it installed. Please help. The install file
which comes with it does not work for context.


more info needed .. test file and so

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
___