Re: [NTG-context] boxes package exhaust the system memory??

2011-04-25 Thread Joshua Lee
Hi Wolfgang,
Thanks a lot, it works. 

Best regards,
Joshua

On Mon, 25 Apr 2011, Wolfgang Schuster wrote:

> 
> Am 25.04.2011 um 05:00 schrieb Joshua Lee:
> 
> > Hi All,
> > Here's a little file that hang up the system and exhaust the 
> > memory. 
> > \starttext
> > \startMPpage
> > input boxes;
> > boxit a(btex Hello etex);
> > a.c = (0, 0);
> > drawboxed(a);
> > \stopMPpage
> > \stoptext
> 
> 
> \startMPinclusions[+]
> input boxes;
> \stopMPinclusions
> 
> \starttext
> 
> \startMPpage[offset=1ex]
> boxit a(btex Hello etex);
> a.c = (0, 0);
> drawboxed(a);
> \stopMPpage
> 
> \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
> ___

-- 
Joshua Lee
Alpha Networks(Chengdu) Co., LTD
Shanghai Branch

TEL: (86-21)61609650 EXT: 8020
FAX: (86-21)61609650 EXT: 8041
ADD: Suite 301, No.10, 198 Lane, Zhangheng Road,
 ZJ Hi-Tech Park, Shanghai, China 201204

___
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] boxes package exhaust the system memory

2011-04-24 Thread Joshua Lee
Hi All,
Here's a little file that hang up the system and exhaust the 
memory. 
\starttext
\startMPpage
input boxes;
boxit a(btex Hello etex);
a.c = (0, 0);
drawboxed(a);
\stopMPpage
\stoptext

System environment:
 * ConTeXt  ver: 2011.04.13 09:23 MKIV  fmt: 2011.4.19  int:
   english/english
 * Linux amd64

Reproduce Steps:
 * context ex-005.tex
 * The program hang up after following message

system  > begin file ex-005.tex at line 1
metapost> initializing instance 'metafun' using format
'metafun'
metapost> loading 'metafun.mp' (experimental metapost version
two)


Br/JL
-- 
Joshua Lee


___
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] How to add metapost 3rd party modules????

2011-04-20 Thread Joshua Lee
Hi Aditya/All,
Please ignore previous mail, it can works. Thanks a lot. 

BTW, i made the silly mistake. My emacs convert "" into `` in
previous email. 

Best regards,
Joshua

On Wed, 20 Apr 2011, Joshua Lee wrote:

> Hi Aditya,
> Thanks for your reply, I just tested the sample from
> http://wiki.contextgarden.net/MetaObj_and_Labels
> It can not work as well. 
> 
> Best regards,
> Joshua
> 
> On Tue, 19 Apr 2011, Aditya Mahajan wrote:
> 
> > On Wed, 20 Apr 2011, Joshua Lee wrote:
> > 
> > > Hi Mojca,
> > > Thanks for you reply.
> > >
> > > It can found the metauml module after regenerating the database with
> > > luatools --generate
> > > But it run into compiling error. For you convenience, append the
> > > sources for mpost and context.
> > >
> > > joshua@josh-dev ~/tmp $ cat activity.tex
> > >   \startMPinclusions
> > > input metauml;
> > >   \stopMPinclusions
> > >
> > >
> > >   \startMPpage
> > > Activity.A("Learn MetaUML -",
> > >"the MetaPost UML library");
> > > drawObject(A);
> > >   \stopMPpage
> > >
> > >   \stoptext
> > 
> > I don't know the internal details of metaUML, but it could be the same 
> > problem as with MetaObj. See: 
> > http://wiki.contextgarden.net/MetaObj_and_Labels
> > 
> > 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
> > ___
> 



___
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] How to add metapost 3rd party modules????

2011-04-19 Thread Joshua Lee
Hi Aditya,
Thanks for your reply, I just tested the sample from
http://wiki.contextgarden.net/MetaObj_and_Labels
It can not work as well. 

Best regards,
Joshua

On Tue, 19 Apr 2011, Aditya Mahajan wrote:

> On Wed, 20 Apr 2011, Joshua Lee wrote:
> 
> > Hi Mojca,
> > Thanks for you reply.
> >
> > It can found the metauml module after regenerating the database with
> > luatools --generate
> > But it run into compiling error. For you convenience, append the
> > sources for mpost and context.
> >
> > joshua@josh-dev ~/tmp $ cat activity.tex
> > \startMPinclusions
> >   input metauml;
> > \stopMPinclusions
> >
> >
> > \startMPpage
> >   Activity.A("Learn MetaUML -",
> >  "the MetaPost UML library");
> >   drawObject(A);
> > \stopMPpage
> >
> > \stoptext
> 
> I don't know the internal details of metaUML, but it could be the same 
> problem as with MetaObj. See: 
> http://wiki.contextgarden.net/MetaObj_and_Labels
> 
> 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
> ___

-- 
Joshua Lee
Alpha Networks(Chengdu) Co., LTD
Shanghai Branch

TEL: (86-21)61609650 EXT: 8020
FAX: (86-21)61609650 EXT: 8041
ADD: Suite 301, No.10, 198 Lane, Zhangheng Road,
 ZJ Hi-Tech Park, Shanghai, China 201204

___
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] How to add metapost 3rd party modules??

2011-04-19 Thread Joshua Lee
Hi Mojca,
Thanks for you reply. 

It can found the metauml module after regenerating the database with 
luatools --generate
But it run into compiling error. For you convenience, append the
sources for mpost and context.

joshua@josh-dev ~/tmp $ cat activity.tex 
\startMPinclusions
  input metauml;
\stopMPinclusions


\startMPpage
  Activity.A("Learn MetaUML -",
 "the MetaPost UML library");
  drawObject(A);
\stopMPpage

\stoptext

joshua@josh-dev ~/tmp $ cat activity.mp 
input metauml;

beginfig(1);
  Activity.A("Learn MetaUML -",
 "the MetaPost UML library");
  drawObject(A);
endfig;

end


activity.mp works with mpost, but activity.tex failed to compile with
context. 

Any suggestions?

Best regards,
Joshua

On Tue, 19 Apr 2011, Mojca Miklavec wrote:

> On Tue, Apr 19, 2011 at 15:12, Joshua Lee wrote:
> > Hi All,
> > I would like to use metauml modules with context, but context can
> > not find it from ~/texmf/metapost/metauml directory. What the context
> > search path for the 3rd party metapost modules?
> 
> The search path is defined inside texmf/web2c/texmfcnf.lua (variable 
> MPINPUTS).
> 
> Did you run
>luatools --generate
> or
>mktexlsr
> (depending on the mark you use)?
> 
> It works here, but only after I regenerate the database (which should
> not be the case - files in ~/texmf should be searched automatically
> without being present in the database).
> 
> 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
> ___

-- 
Joshua Lee
Alpha Networks(Chengdu) Co., LTD
Shanghai Branch

TEL: (86-21)61609650 EXT: 8020
FAX: (86-21)61609650 EXT: 8041
ADD: Suite 301, No.10, 198 Lane, Zhangheng Road,
 ZJ Hi-Tech Park, Shanghai, China 201204

___
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] How to add metapost 3rd party modules

2011-04-19 Thread Joshua Lee
Hi All,
I would like to use metauml modules with context, but context can 
not find it from ~/texmf/metapost/metauml directory. What the context
search path for the 3rd party metapost modules?

Thanks in advance.
Br/JL

-- 
Joshua Lee

___
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 do you miss in ConTeXt?

2010-03-14 Thread Joshua Lee
Hi Guys,
The verbatim or listings of MKIV sucks. Here's a little sample:

\definetyping[code][numbering=line]
\starttext

\startcode
...
...
\stopcode

\startcode[continue]
...
...
\stopcode

\startcode[start=10]
...
...
\stopcode

\typefile[numbering=file]{test.tex}

\stoptext

It can not work with MKIV that shows.
1  ...
2  ...
10 ...
11 ...
1  ...
2  ...
   \definetyping[code][numbering=line]
   \starttext
   \startcode
   ...
   ...
   \stopcode
   \startcode[continue]
   ...
   ...
   \stopcode
   \startcode[start=10]
   ...
   ...
   \stopcode
   \typefile[numbering=file]{test.tex}
   \stoptext

Best regards,
Joshua

On Mon, 08 Feb 2010, Wolfgang Schuster wrote:

> Hi all,
> 
> ConTeXt has many features but sometimes there is something missing,
> what feature or package do you miss which is already available in
> another TeX system or unavailable in any TeX system?
> 
> 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
___


[NTG-context] How to add line number to verbatim typefile?

2010-01-21 Thread Joshua Lee
Hi all,
Here's a little sample named test.tex, 

 \starttext
 \setuptyping[file][numbering=line]
 
 \typefile[start=1,step=1]{test.tex}
 
 \stoptext

But, it does not shows the line number, any questions about the code snippet, 
thanks. 

BR/JL
___
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] The problem with structure of heads in MkIV

2009-12-29 Thread Joshua Lee
Hi Yanrui,
How about the attached sample?

Best regards,
Joshua

On Wed, 30 Dec 2009, Yanrui Li wrote:

> hi all,
> 
> For  example:
> 
> 
> \starttext
> 
> \placelist[part,chapter,section,subsection][criterium=all]
> 
> \part{first}
>   \chapter{alpha}
> \section{a}
> \section{b}
>   \subsection{x}
>   \subsection{y}
>   \chapter{beta}
> 
> \part{second}
>   \chapter{gamma}
> \section{a}
> \section{b}
>   \subsection{x}
>   \subsection{y}
>   \chapter{delta}
> 
> \stoptext
> 
> 
> how to get the following head structure in MkIV ?
> 
> Part 1  first
> 
> 1 alpha
>   1.1 a
>   1.2 b
>  1.2.1 x
>  1.2.2 y
> 2 beta
> 
> Part 2  second
> 
> 3 gamma
>   3.1 a
>   3.2 b
> 3.2.1 x
> 3.2.2 y
> 4 delta
> 
> -- 
> Best regards,
> 
> Li Yanrui

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


-- 
Joshua Lee
Alpha Networks(Chengdu) Co., LTD
Shanghai Branch

TEL: (86-21)61609650 EXT: 8020
FAX: (86-21)61609650 EXT: 8041
ADD: Suite 301, No.10, 198 Lane, Zhangheng Road,
 ZJ Hi-Tech Park, Shanghai, China 201204



test.tex
Description: TeX 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] How to use metauml in ConTeXt

2009-12-01 Thread Joshua Lee
Hi Renaud,
Thanks, I'll have a try.

Best regards,
Joshua

On Tue, 01 Dec 2009, Renaud AUBIN wrote:

> >>>>> "Joshua" == Joshua Lee  writes:
> 
> Joshua> Hi All, Is there any way to use metauml from ConTeXt?
> Joshua> http://thor.info.uaic.ro/~ogh/lop/
> 
> Joshua> BTW, is there any ConTeXt modules to write uml sequence diagram
> Joshua> similar to http://code.google.com/p/pgf-umlsd ?
> 
> Joshua> Thanks in advance.
> 
> Joshua> Best regards, Joshua
> 
> 
> Hi Joshua,
> 
> There we use the following chain:
> - Edit UML diagrams with bouml (a really really great tool to design and
>   for reverse engineering… )
> - Export to SVG (take care of the font with qt-config if you want some
>   consistency within your final pdf)
> - SVG to PDF conversion with inkscape (command line + fonts embedding
>   option if needed)
> - just use the PDF as another external figure…
> 
> I'll check tomorrow if I have succeeded to optimize the fonts embedding
> (this point has annoyed me a lot)…
> 
> From my POV, MetaUML is not adapted to a real production environment
> (except at pure design stage)…
> 
> Worth give à try to bouml -> pdf
> Your UML diagrams should look great with a few bouml/fonts/qt-config
> configuration.
> 
> 
> Renaud
> ___
> 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
> ___

-- 
Joshua Lee
Alpha Networks(Chengdu) Co., LTD
Shanghai Branch

TEL: (86-21)61609650 EXT: 8020
FAX: (86-21)61609650 EXT: 8041
ADD: Suite 301, No.10, 198 Lane, Zhangheng Road,
 ZJ Hi-Tech Park, Shanghai, China 201204

___
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] How to use metauml in ConTeXt

2009-12-01 Thread Joshua Lee
Hi luigi,
Please refer to http://edutechwiki.unige.ch/en/MetaUML for the example,
thanks. There's the metauml package from texlive-metapost, i'm not sure 
how to use it in ConTeXt.

Best regards,
Joshua

On Tue, 01 Dec 2009, luigi scarso wrote:

> On Tue, Dec 1, 2009 at 7:10 AM, Joshua Lee  wrote:
> > Hi All,
> > Is there any way to use metauml from ConTeXt?
> > http://thor.info.uaic.ro/~ogh/lop/
> Do you have a simple example ?
> 
> -- 
> luigi
> ___
> 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
> ___________

-- 
Joshua Lee
Alpha Networks(Chengdu) Co., LTD
Shanghai Branch

TEL: (86-21)61609650 EXT: 8020
FAX: (86-21)61609650 EXT: 8041
ADD: Suite 301, No.10, 198 Lane, Zhangheng Road,
 ZJ Hi-Tech Park, Shanghai, China 201204

___
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] How to use metauml in ConTeXt

2009-11-30 Thread Joshua Lee
Hi All,
Is there any way to use metauml from ConTeXt? 
http://thor.info.uaic.ro/~ogh/lop/

BTW, is there any ConTeXt modules to write uml sequence diagram 
similar to http://code.google.com/p/pgf-umlsd ?

Thanks in advance.

Best regards,
Joshua

___
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] section numbers

2009-10-19 Thread Joshua Lee
Hi Alan,
Try attached example.tex.

Best regards,
Joshua

On Mon, 19 Oct 2009, Alan BRASLAU wrote:

> Hello,
> 
> I did not understand that this be the answer to the question,
> but, of course, I cannot contradict he who posted the question
> in the beginning. However, I understood that Thomas still wanted
> chapters to be numbered, but that sections be numbered independently.
> 
> In my case, I have been struggling to have parts numbered
> (I, II, III, IV) and to have chapters numbered independently
> (1, 2, 3, 4, ...), such as:
> 
> Part I
>  Chapter 1
>  Chapter 2
> Part II
>  Chapter 3
>  Chapter 4
> Part III
>  Chapter 5
> 
> For this, I have
> 
> \setuplabeltext[chapter=Chapter ] % By default, blank when using \part
> \doifmodeelse{mkiv}{
> \setupstructureheads[sectionsegments=2:100]
> \setupstructurehead[part][resetnumber=no,placehead=yes]
> }{ % mkii
> \setuplist[chapter,section,subsection,subsubsection][partnumber=no]
> }
> 
> but this is not quite right (works fine in mkii):
> - the parts are not numbered
> - the chapters are numbered 1, 2, 1, 2, 1, ...
> 
> I have not yet figured this out (another problem kept me from
> using mkiv on this problem, resolved only recently).
> 
> Alan
> 
> On Monday 19 October 2009 16:28:10 Thomas A. Schmitz wrote:
> > On Oct 19, 2009, at 4:10 PM, Wolfgang Schuster wrote:
> > > \setuphead
> > >  [section]
> > >  [sectionsegments=3:100] % show only the numbers for level 3
> > > (=section) till 100 (subsubsub...section)
> > >
> > > Wolfgang
> > 
> > Thank you Wolfgang, that does it! At the risk of sounding like a
> > crybaby: would one of the two people who have understood how the new
> > structure code works please add some documentation somewhere? Just
> > imagine what would happen if Hans and Wolfgang were struck by
> > lightning on the same day :-)
> > 
> > Thanks, and all best
> > 
> > Thomas
> ___
> 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
> ___

-- 
Joshua Lee
Alpha Networks(Chengdu) Co., LTD
Shanghai Branch

TEL: (86-21)61609650 EXT: 8020
FAX: (86-21)61609650 EXT: 8041
ADD: Suite 301, No.10, 198 Lane, Zhangheng Road,
 ZJ Hi-Tech Park, Shanghai, China 201204



example.tex
Description: TeX 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
___


[NTG-context] How to disable the hypernation in verbatim environment

2009-10-13 Thread Joshua Lee
Hi All,
The hypernation in verbatim environment will break the keywords of the
input source code, for example, it break the C language statement. I
googling the wiki of ConTeXt site and find that
http://wiki.contextgarden.net/Verbatim_with_line_breaks#Why_German_is_a_relatively_easy_language
 
demonstrate the usage. But it does not works now, attached files are the sample 
and output.  
Thanks in advance.

BR/JL
Joshua
%
% BREAK is a special pretty handler that auto-wraps lines
% to fit the current hsize.

\gdef\BREAKsetspecials%
  {\dorecurse{256}{\setpretty\numexpr \recurselevel-1\relax=10 }}

\gdef\BREAKsethandlers%
  {\installprettyhandler 10 \BREAKtypeone  }

\newcount\BREAKcharcounter
\newcount\BREAKmaxcharcount

\def\BREAKtypeone#1%
  {\advance\BREAKcharcounter 1
   \ifnum\BREAKcharcounter > \BREAKmaxcharcount
  \hfil\break
  \BREAKcharcounter=1
   \fi
   \getpretty{#1}}

\def\BREAKsetcounters%
  {\setbox\scratchbox=\hbox{0}%
   \BREAKmaxcharcount=\hsize
   \divide\BREAKmaxcharcount \wd\scratchbox
   \def\flushrestofverbatimline{\BREAKcharcounter=0 }%
   \BREAKcharcounter=0 }

\gdef\setupprettyBREAKtype%
  {\def\prettyidentifier{BREAK}%
   \BREAKsetcounters
   \BREAKsethandlers
   \BREAKsetspecials}

\installprettytype [BREAK] [BREAK]


\starttext
\framed
   [width=8cm,
align=flushleft,
strut=no]{%
\setuptyping[option=BREAK]
\starttyping
Hottentottenstottertrottelmutterlattengitterkotterbeutelratenattentater
\stoptyping
}
\stoptext



sample.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] The header/footer settings compared to fancyhdr

2009-10-04 Thread Joshua Lee
Hi Thomas,
Thanks, the frametext is an elegant way. ConTeXt is worth taking more
time to study.

Best regards,
Joshua

On Sun, 04 Oct 2009, Thomas A. Schmitz wrote:

> 
> On Oct 3, 2009, at 5:58 PM, Joshua Lee wrote:
> 
> >Hi Thomas,
> >Sorry about that, attach the pdf file for the result. ConTeXt should
> >have the capability to implement the similar effect, but i can not
> >find
> >it from the wiki or mailing list.
> >
> >Best regards,
> >Joshua
> 
> Here is something similar to what you have in your example (and
> compared to your LaTeX code, I find the ConTeXt way of coding this
> wonderfully simple and elegant):
> 
> \startsetups[header]
>   \framed[width=\textwidth,frame=off,bottomframe=on,align=right]
> {\rlap{\headnumber[chapter] \getmarking[chapter]}
>  \hfill
>  \pagenumber
>  \hfill
>  \llap{\externalfigure[cow][height=1cm]}}
> \stopsetups
> 
> \startsetups[footer]
>   \framed[width=\textwidth,frame=off,topframe=on,align=center]
> {{\bf Copyright 2009, My Company} \\ Blablabla}
> \stopsetups
> 
> \setupheadertexts[\setups{header}]
> 
> \setupfootertexts[\setups{footer}]
> 
> \starttext
> 
> \chapter{One}
> 
> Hello World
> 
> \stoptext
> 
> The main reference is the file
> http://www.pragma-ade.com/general/manuals/cont-eni.pdf , you want to
> read the sections on headers and footers and on framing (\framed is
> one of the most powerful and versatile commands in ConTeXt).
> 
> HTH
> 
> Thomas
> ___
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

-- 
Joshua Lee
Alpha Networks(Chengdu) Co., LTD
Shanghai Branch

TEL: (86-21)61609650 EXT: 8020
FAX: (86-21)61609650 EXT: 8041
ADD: Suite 301, No.10, 198 Lane, Zhangheng Road,
 ZJ Hi-Tech Park, Shanghai, China 201204

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] The header/footer settings compared to fancyhdr

2009-10-03 Thread Joshua Lee
Hi All,
How to setup the complicated header/footer compared to LaTeX fancyhdr
package? For example, how to use change line from the header/footer like
follow LaTeX code?

 \pagestyle{fancy}
 \headheight 35pt
 \fancyhf{} %delete current setting of header and footer
 \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
 \renewcommand{\headrulewidth}{1pt}
 \renewcommand{\footrulewidth}{0.6pt}
 \lhead{\bfseries \rightmark}
 \chead{\textbf{\thepage}}%
 \rhead{\usebox{\mylogo}}
 \lfoot{}
 \cfoot{
 \begin{tabular}{c}
 \textbf{Copyright 2009, My Company}\\
 \small{You are free to copy, distribute, display, and perform the work}\\
 \end{tabular}}%
 \rfoot{}


Thanks in advance.

Best regards,
Joshua


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to reset the chapter number

2009-09-21 Thread Joshua Lee
Hi Wolfgang,
It works, thanks for your quick response.

Best regards,
Joshua

On Mon, 21 Sep 2009, Wolfgang Schuster wrote:

> 
> Am 21.09.2009 um 17:40 schrieb Joshua Lee:
> 
> > Hi Derek,
> > I write a little example, there's still a little issue. The chapter
> > number start with 1 for part II, how to make it continue from part I.
> 
> \definestructureresetset[default][0,0][1]
> 
> \setuphead[part][sectionresetset=default]
> 
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________

-- 
Joshua Lee
Alpha Networks(Chengdu) Co., LTD
Shanghai Branch

TEL: (86-21)61609650 EXT: 8020
FAX: (86-21)61609650 EXT: 8041
ADD: Suite 301, No.10, 198 Lane, Zhangheng Road,
 ZJ Hi-Tech Park, Shanghai, China 201204

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to reset the chapter number

2009-09-21 Thread Joshua Lee
Hi Derek,
I write a little example, there's still a little issue. The chapter
number start with 1 for part II, how to make it continue from part I.
Thanks.


Best regards,
Joshua

On Sat, 19 Sep 2009, Derek CORDEIRO wrote:

> On Sat, Sep 19, 2009 at 4:13 PM, Joshua Lee  wrote:
> 
> > Hi Guys,
> > Here's a little example,
> >  \setupcolors[state=start]
> >
> 
> \setuphead[chapter][sectionsegments=2:100]
> 
> 
> >  \starttext
> >
> >  \completecontent
> >  \part{First Part}
> >  \chapter{First Chapter}
> >  \chapter{Second Chapter}
> >  \part{Second Part}
> >  \chapter{Third Chapter}
> >  \chapter{Chapter 4}
> >  \stoptext
> >
> > I would like to show the chapter number 1,2,3,4.. instead of
> > 1.1,1.2,2.1,2.2 .. how to do it?
> >
> >
> 
> Read http://www.opensubscriber.com/message/ntg-context@ntg.nl/12416208.html

> ___
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___


-- 
Joshua Lee
Alpha Networks(Chengdu) Co., LTD
Shanghai Branch

TEL: (86-21)61609650 EXT: 8020
FAX: (86-21)61609650 EXT: 8041
ADD: Suite 301, No.10, 198 Lane, Zhangheng Road,
 ZJ Hi-Tech Park, Shanghai, China 201204



example.pdf
Description: Adobe PDF document
\setuphead[part][resetnumber=no,placehead=yes,conversion=R]
\setuphead[chapter,section,subsection][resetnumber=no,placehead=yes,sectionsegments=2:100]
\starttext
\part{part one}
\chapter{chapter one}
\section{section one}
\section{section two}
\chapter{chapter two}
\section{section one}
\section{section two}
\part{part two}
\chapter{chapter three}
\section{section one}
\section{section two}
\chapter{chapter four}
\section{section one}
\section{section two}
\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] How to reset the chapter number

2009-09-19 Thread Joshua Lee
Hi Guys,
Here's a little example,
 \setupcolors[state=start]
 \starttext
 
 \completecontent
 \part{First Part}
 \chapter{First Chapter}
 \chapter{Second Chapter}
 \part{Second Part}
 \chapter{Third Chapter}
 \chapter{Chapter 4}
 \stoptext

I would like to show the chapter number 1,2,3,4.. instead of 1.1,1.2,2.1,2.2 .. 
how to do it? 

Thanks.

Best regards,
Joshua


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] The simpleslides can not output '--'

2009-09-07 Thread joshua lee
Hi All,
Attached is the simple test file for the simpleslides which can not output
'--', any idea? Thanks.

-- 
Best Regards,
Joshua


test.tex
Description: TeX document


test.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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] acroread shows error msg 'Could not find the XObject named 'Fm1'

2008-12-02 Thread joshua lee
It works, thank you.

On Tue, Dec 2, 2008 at 4:26 PM, Hans Hagen <[EMAIL PROTECTED]> wrote:

> joshua lee wrote:
>
>> Hi All,
>> Attached file is the sample test file which can not be viewed by acroread,
>> any advice?
>>
>
> move \starttext to the right place, above the \startstandardmakeup;
> otherwise resouces are not flushed the right way
>
>
>
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
> | www.pragma-pod.nl
> -
>



-- 
Best Regards,
Joshua
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___