Re: [NTG-context] \starttyping font changes when option=color

2015-04-09 Thread Wolfgang Schuster

> Am 09.04.2015 um 14:02 schrieb robin.kirk...@csiro.au:
> 
> Folks,
> 
> Switching the option to “color” in \setuptyping has the effect of resetting 
> the font from typewriter (constant width) to paragraph font (if you uncomment 
> it in the following MWE).
> 
> I don’t see why that should be. Is it a bug or can someone explain?

You select syntax highlighting for a language which doesn’t exist.

> My intent was to use syntax colourisation for code snippets.

When you want to highlight TeX code use “option=TEX” and for Lua code use 
“option=LUA”.

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] \starttyping font changes when option=color

2015-04-09 Thread Robin.Kirkham
Folks,

Switching the option to “color” in \setuptyping has the effect of resetting the 
font from typewriter (constant width) to paragraph font (if you uncomment it in 
the following MWE).

I don’t see why that should be. Is it a bug or can someone explain?

My intent was to use syntax colourisation for code snippets.

Thanks, Robin


\setupcolors[state=start]

%\setuptyping[typing][option=color]

\starttext
Normal text
\starttyping
Typing text
\stoptyping
\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] \starttyping while processing XML causing error

2014-03-28 Thread Xan
On Fri, 28 Mar 2014 09:56:12 +0100
Hans Hagen  ha escrit:

> On 3/28/2014 9:13 AM, Xan wrote:
> >> On 3/27/2014 9:46 AM, Xan wrote:
> >>> \starttext
> >>>
> >>> A
> >>> \xmlprocessfile{demo}{./dades.xml}{}
> >>> B
> >>> \stoptext
> >>
> >> \startxmlsetups xml:demo:code
> >> \blank
> >> \start \ttx
> >>   \xmlverbatim{#1}
> >> \stop
> >> \blank
> >> \stopxmlsetups
> >
> > First of all, thank you very much, Hans.
> >
> > But why can't I use
> >
> > \defineframedtext[framedcode][strut=yes,offset=2mm,width=7cm,align=right]
> >
> > \definetyping[code][numbering=line,bodyfont=small,before={\startframedcode},after={\stopframedcode}]
> >
> > \setuplinenumbering[location=intext]
> > \setuptyping[option=color]
> >
> >
> > startxmlsetups xml:demo:codi
> >\blank
> >\startcode\xmlverbatim{#1}\stopcode
> >\blank
> > \stopxmlsetups
> >
> 
> different catcode regimes
> 
> > How can I achieve this results? (numbering line and color basically)
> 
> \startlinenumbering
> 
> etc

Many thanks.

But  \setuplinenumbering[location=intext,prefix=codi] seems to have no effect in

\startxmlsetups xml:demo:codi
\blank
\startlinenumbering\xmlverbatim{#1}\stoplinenumbering
   \blank
\stopxmlsetups

the numbers seems that always are inmargin.

Thanks,
Xan.
___
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] \starttyping while processing XML causing error

2014-03-28 Thread Xan

> 
> > How can I achieve this results? (numbering line and color basically)
> 
> \startlinenumbering
> 
> etc
> 
How can I disable hyphenize and wrap large lines?

Thanks,
Xan.
___
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] \starttyping while processing XML causing error

2014-03-28 Thread Xan
I can circumvent it with

\defineframedtext[framedcode][strut=yes,width=local,align=flushleft,frame=off]


\startxmlsetups xml:demo:codi
  \blank
  \startframedcode
  \startlinenumbering\xmlverbatim{#1}\stoplinenumbering
  \stopframedcode
  \blank
\stopxmlsetups

Xan.
___
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] \starttyping while processing XML causing error

2014-03-28 Thread Hans Hagen

On 3/28/2014 9:13 AM, Xan wrote:

On 3/27/2014 9:46 AM, Xan wrote:

\starttext

A
\xmlprocessfile{demo}{./dades.xml}{}
B
\stoptext


\startxmlsetups xml:demo:code
\blank
\start \ttx
  \xmlverbatim{#1}
\stop
\blank
\stopxmlsetups


First of all, thank you very much, Hans.

But why can't I use

\defineframedtext[framedcode][strut=yes,offset=2mm,width=7cm,align=right]

\definetyping[code][numbering=line,bodyfont=small,before={\startframedcode},after={\stopframedcode}]

\setuplinenumbering[location=intext]
\setuptyping[option=color]


startxmlsetups xml:demo:codi
   \blank
   \startcode\xmlverbatim{#1}\stopcode
   \blank
\stopxmlsetups



different catcode regimes


How can I achieve this results? (numbering line and color basically)


\startlinenumbering

etc

-
  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] \starttyping while processing XML causing error

2014-03-28 Thread Xan
> On 3/27/2014 9:46 AM, Xan wrote:
> > \starttext
> >
> > A
> > \xmlprocessfile{demo}{./dades.xml}{}
> > B
> > \stoptext
> 
> \startxmlsetups xml:demo:code
>\blank
>\start \ttx
>  \xmlverbatim{#1}
>\stop
>\blank
> \stopxmlsetups

First of all, thank you very much, Hans.

But why can't I use

\defineframedtext[framedcode][strut=yes,offset=2mm,width=7cm,align=right]

\definetyping[code][numbering=line,bodyfont=small,before={\startframedcode},after={\stopframedcode}]

\setuplinenumbering[location=intext]
\setuptyping[option=color]


startxmlsetups xml:demo:codi
  \blank
  \startcode\xmlverbatim{#1}\stopcode
  \blank
\stopxmlsetups


How can I achieve this results? (numbering line and color basically)

Thanks,
Xan
___
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] \starttyping while processing XML causing error

2014-03-27 Thread Hans Hagen

On 3/27/2014 9:46 AM, Xan wrote:

\starttext

A
\xmlprocessfile{demo}{./dades.xml}{}
B
\stoptext


\startxmlsetups xml:demo:code
  \blank
  \start \ttx
\xmlverbatim{#1}
  \stop
  \blank
\stopxmlsetups



--

-
  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] \starttyping while processing XML causing error

2014-03-27 Thread Xan
Hi,

I have this minimal example:

1) Tasques.context:

\environment ./entorn-xml

\starttext

A
\xmlprocessfile{demo}{./dades.xml}{}
B
\stoptext


2) entorn-xml.tex:

\startxmlsetups xml:demo:base
  \xmlsetsetup{demo}{*}{-}
  \xmlsetsetup{demo}{things|code|}{xml:demo:*}
\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:things
  \xmlflush{#1}
\stopxmlsetups


%TODO: startcode: http://www.ntg.nl/pipermail/ntg-context/2012/064750.html
\startxmlsetups xml:demo:code
  \bigskip
  \startlines\xmlflush{#1}\stoplines
\stopxmlsetups


3) dades.xml:



  
  [root@serviedre ~]# pacman -Syu
:: Synchronizing package databases...
 core 193.0 KiB  50.0K/s 00:04 [##] 100%
 extra2037.1 KiB   166K/s 00:12 
[##] 100%
 community   2.2 MiB   374K/s 00:06 
[##] 100%
 alarm  55.6 KiB   242K/s 00:00 
[##] 100%
 aur64.0 KiB   288K/s 00:00 
[##] 100%
:: Starting full system upgrade...
warning: linux-sun4i: ignoring package upgrade (3.4.79-1 => 3.4.79-2)
warning: linux-sun4i-headers: ignoring package upgrade (3.4.79-1 => 3.4.79-2)
 there is nothing to do
  




When I compile tasques.context, all is ok, but when I substitute the 
\startlines \stoplines with \starttyping \stoptyping context never ends.

Is that a bug? 
I just found [this](http://www.ntg.nl/pipermail/ntg-context/2012/064750.html), 
but really no solution. Since 2012 I suppose many things are changed so I ask.

Why doesn't it work?

Thanks in advance,
Xan.

___
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] starttyping environment again

2013-04-30 Thread jinki jung
Hi

This issued is answered from other place.
The cause of the ragged output was bodyfont.
I was using a specific font for my own language by "\setupbodyfont[unfonts]".
Commenting out and using
default fonts gave me correct output.

Jung, Jinki

>
> I am using context 0.6 under W7. I have problem with starttyping command.
> Somehow, it is not giving me same as I key in. Two examples are give here
> to explain my problem.  Please see ">>>". Any help will be appreciated
> much.
>
> Jung, Jinki
>
>
> \starttyping
>
> LDPREM
> ---   -
> AT1L D P 7 1 1 0 1 A 2 7 4 R E M 0 1 1
> AT2L D P 7 1 2 0 1 A 2 7 4 R E M 0 2 1
> AC1L D P 7 1 0 0 1 A 2 7 1 R E M 1 0 1
>   -- --- --- --    --- - --- --
>  ||   |  |  |   |||  |
>  ||   |  |  |   |||  |
>  ||   |  for extension  |   |||  for extension
>  ||   serial|   ||serial
>  |area  |   |   REM
> ZZZ |   area
>ABC
>
>  +- Module
>  |
>  |   +- serial
>  |  /
>  --  ---
>   A  2  0  0  M  0  0  0  0
>  -  
>   | |
>   | +-+
>  AERA2|
>   |
> AREA  +---  71 : F2 Production
> 72 : F2 Storage to AT7
> 73 : F1 BCR to AT7
> 74 : MBC common
> 75 : AT7 to ANtty
> 3C : MBC common
> \stoptyping
>
> ==
>
> output looks as follow. please notice wrong alignment.
>
> LDPREM
> ---   -
> TT1L D P 7 1 1 0 1 A 2 7 4 R E M 0 1 1
> TT2L D P 7 1 2 0 1 A 2 7 4 R E M 0 2 1
> TC1L D P 7 1 0 0 1 A 2 7 1 R E M 1 0 1
>   -- --- --- --    --- - --- --  >
"---" get smaller ?
>  ||   |  |  |   |||  |
>  ||   |  |  |   |||  |
>  ||   |  for extension  |   ||  |  for
extension 
>  ||   serial|   ||serial
>  |area|   |   REM   =
> ZZZ |   area=
>ABC  =
>
>  +- Module
>  |
>  |   +- serial
>  |  /
>  --  ---  ===>>> "---"
get smaller ?
>   A  2  0  0  M  0  0  0  0
>-  
>   | |
>   | +-+
>  AERA2|
> | =>>>
> AREA  +---  71 : F2 Production
>   72 : F2 Storage to AT7   >>>
>   73 : F1 BCR to AT7   >>>
>   74 : MBC common  >>>
>   75 : AT7 to ANtty>>>
>   3C : MBC common >>>
>
>
___
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] starttyping environment again

2013-04-29 Thread Wolfgang Schuster

Am 29.04.2013 um 11:20 schrieb jinki jung :

> Hi there, 
> 
> I am using context 0.6 under W7. I have problem with starttyping command. 
> Somehow, it is not giving me same as I key in. Two examples are give here 
> to explain my problem.  Please see ">>>". Any help will be appreciated 
> much.

I can’t reproduce this, send a working example which demonstrates it.

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] starttyping environment again

2013-04-29 Thread jinki jung
Hi there,


I am using context 0.6 under W7. I have problem with starttyping command.

Somehow, it is not giving me same as I key in. Two examples are give here

to explain my problem.  Please see ">>>". Any help will be appreciated
much.


Jung, Jinki




\starttyping

LDPREM

---   -

AT1L D P 7 1 1 0 1 A 2 7 4 R E M 0 1 1

AT2L D P 7 1 2 0 1 A 2 7 4 R E M 0 2 1

AC1L D P 7 1 0 0 1 A 2 7 1 R E M 1 0 1

  -- --- --- --    --- - --- --

 ||   |  |  |   |||  |

 ||   |  |  |   |||  |

 ||   |  for extension  |   |||  for extension

 ||   serial|   ||serial

 |area  |   |   REM

ZZZ |   area

   ABC


 +- Module

 |

 |   +- serial

 |  /

 --  ---

  A  2  0  0  M  0  0  0  0

 -  

  | |

  | +-+

 AERA2|

  |

AREA  +---  71 : F2 Production

72 : F2 Storage to AT7

73 : F1 BCR to AT7

74 : MBC common

75 : AT7 to ANtty

3C : MBC common


\stoptyping

==

output looks as follow. please notice wrong alignment.


LDPREM

---   -

TT1L D P 7 1 1 0 1 A 2 7 4 R E M 0 1 1

TT2L D P 7 1 2 0 1 A 2 7 4 R E M 0 2 1

TC1L D P 7 1 0 0 1 A 2 7 1 R E M 1 0 1

  -- --- --- --    --- - --- --  >
"---" get smaller ?

 ||   |  |  |   |||  |

 ||   |  |  |   |||  |

 ||   |  for extension  |   ||  |  for
extension 

 ||   serial|   ||serial

 |area|   |   REM   =

ZZZ |   area=

   ABC  =


 +- Module

 |

 |   +- serial

 |  /

 --  ---  ===>>> "---" get
smaller ?

  A  2  0  0  M  0  0  0  0

   -  

  | |

  | +-+

 AERA2|

| =>>>

AREA  +---  71 : F2 Production

  72 : F2 Storage to AT7   >>>

  73 : F1 BCR to AT7   >>>

  74 : MBC common  >>>

  75 : AT7 to ANtty>>>

  3C : MBC common >>>
___
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] starttyping/stoptyping broken?

2012-01-16 Thread mathew
On Sat, Jan 14, 2012 at 04:37, Hans Hagen  wrote:
> this related to the buffer bug (still no new beta as i'm redoing some font
> code and have not much time today)

OK. Is there some convenient way to revert to the last known good
version of standalone ConTeXt?

I ended up installing the Ubuntu package, which was confused by my
standalone install until I deleted that. Then I had to mess with
OSFONTDIR to get my fonts working again. I then got the error (noted
on the mailing list before) involving

   ! Math error: parameter \Umathquad\displaystyle is not set.

which as you probably recall, is caused by

   font with asked name 'lmmath' is not found using lookup 'file'
   unknown font lmmath, loading aborted

when trying to use a custom typescript that doesn't have a math font,
and \startitemize.

There is a Ubuntu package lmodern which claims to be OpenType versions
of Latin Modern, and it's installed as a dependency when installing
Ubuntu's ConTeXt package, but it only includes LMMathSymbols,
LMMathExtension and LMMathItalic, none of which seem acceptable to
ConTeXt as lmmath.

After struggling with *that* for a while, I found the easiest solution
was to go to 
http://www.gust.org.pl/projects/e-foundry/lm-math/download/index_html
and download the latest lmmath, rename it as lmmath.otf and install it
in my personal ~/.fonts.

Noting all this here as searching the mailing list and Google hadn't
pointed me at that solution. Is there a better one?


mathew
--
http://www.pobox.com/~meta/>
___
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] starttyping/stoptyping broken?

2012-01-14 Thread Hans Hagen

On 14-1-2012 00:40, mathew wrote:

Just this minute updated via wget
http://minimals.contextgarden.net/setup/first-setup.sh and running
first-setup.sh, getting errors trying to use \starttyping/\stoptyping.

--- example file ---

\starttext
\startframedtext[width=5.5cm]
\starttyping
Line 1
Line 2
Line 3
\stoptyping
\stopframedtext
\stoptext

--- output ---
This is LuaTeX, Version beta-0.70.1-2011051923 (rev 4277)
  \write18 enabled.
(test2.tex

ConTeXt  ver: 2012.01.12 11:03 MKIV  fmt: 2012.1.13  int: english/english

(/usr/local/context/tex/texmf-context/tex/context/base/cont-new.mkiv)
(test2.top){/usr/local/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
(/usr/local/context/tex/texmf-context/tex/context/base/type-otf.mkiv){/usr/local/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/local/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
! Missing } inserted.

  1
  2 \starttext
  3 \startframedtext[width=5.5cm]
  4 \starttyping
  5 Line 1
  6 Line 2
  7 Line 3
  8>>   \stoptyping
  9 \stopframedtext
10 \stoptext
11






this related to the buffer bug (still no new beta as i'm redoing some 
font code and have not much time today)


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
___


[NTG-context] starttyping/stoptyping broken?

2012-01-13 Thread mathew
Just this minute updated via wget
http://minimals.contextgarden.net/setup/first-setup.sh and running
first-setup.sh, getting errors trying to use \starttyping/\stoptyping.

--- example file ---

\starttext
\startframedtext[width=5.5cm]
\starttyping
Line 1
Line 2
Line 3
\stoptyping
\stopframedtext
\stoptext

--- output ---
This is LuaTeX, Version beta-0.70.1-2011051923 (rev 4277)
 \write18 enabled.
(test2.tex

ConTeXt  ver: 2012.01.12 11:03 MKIV  fmt: 2012.1.13  int: english/english

(/usr/local/context/tex/texmf-context/tex/context/base/cont-new.mkiv)
(test2.top){/usr/local/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
(/usr/local/context/tex/texmf-context/tex/context/base/type-otf.mkiv){/usr/local/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/local/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
! Missing } inserted.

 1
 2 \starttext
 3 \startframedtext[width=5.5cm]
 4 \starttyping
 5 Line 1
 6 Line 2
 7 Line 3
 8 >>  \stoptyping
 9 \stopframedtext
10 \stoptext
11


}

   \endgroup
\stoppacked ...level =\plusone \ifvmode \endgroup
  \fi \fi \global \advance
\...
\dostoptyping #1->\stoppacked
  \typingparameter \c!after
\useindentnextparame...
l.8 \stoptyping

--- end output ---


mathew
-- 
http://www.pobox.com/~meta/>
___
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] starttyping

2006-02-06 Thread Hans Hagen
Taco Hoekwater wrote:
> Hans van der Meer wrote:
>   
>> Found something annoying with \starttyping...\stoptyping.
>>
>> I wanted side by side two framed texts in verbatim, one of them one  
>> line longer than the other.
>> Of course they should align there lines.
>>
>> To accomplish this I put a blank line at the end of the shortest text.
>> Alas, \starttyping does not honor a blank line at the end, although  
>> it does honors blank lines inbetween.
>> I am inclined to call this a bug.
>> 
>
> I agree, but only when \obeyemptylines is in effect (i have documents
> that depend on that auto-dropping of trailing empty lines in other
> cases). So my patch proposal is:
>
>\def\presetemptylastverbatimline%
>{\ifcase \verbatimstatus \or \or  \or \doflushverbatimline
> \else \kern \zeropoint \doverbatimnobreak \doflushverbatimline \fi
> %TH the next \kern is new
> \kern \zeropoint }
>
>\def\obeyemptylines%
>{\let\donextemptyverbatimline\doemptyverbatimline
> %TH the next reassignment is new
> \let\presetlastverbatimline\presetemptylastverbatimline  }
>
> You have to add an \obeyemptylines command in your document(s), of
> course.
>   

we can add such an option, but

- how does it behave at page boundaries (extra kern)
- when typing files

so, we need a way to configure it per environment

also, this patch does not honour the first empty lines

how about a slight variation (taco's patch + another one + modes):

\unprotect

% vervalt: \donextemptyverbatimline

\chardef\verbatimemptylinemode\zerocount

\def\presetemptyverbatimline
  {\ifcase\verbatimstatus
 \global\chardef\verbatimstatus\plusone
   \or
\ifcase\verbatimemptylinemode\or\or
  \doemptyverbatimline
\fi
   \or
\ifcase\verbatimemptylinemode\else
  \doemptyverbatimline
\fi
   \or
 \doflushverbatimline
 \global\let\savedverbatimline\empty
 \doemptyverbatimline
 \global\chardef\verbatimstatus\plustwo
   \else
 \kern\zeropoint
 \doverbatimnobreak
 \doflushverbatimline
 \global\let\savedverbatimline\empty
 \doemptyverbatimline
 \global\chardef\verbatimstatus\plustwo
   \fi}

\def\presetlastverbatimline
  {\ifcase \verbatimstatus
   \or
   \or
   \or
 \doflushverbatimline
   \else
 \kern \zeropoint
 \doverbatimnobreak
 \doflushverbatimline
   \fi
\ifcase\verbatimemptylinemode\or\else
   \kern \zeropoint
\fi }

\def\obeyemptylines
  {\chardef\verbatimemptylinemode\plusone}

\def\obeyallemptylines
  {\chardef\verbatimemptylinemode\plustwo}

\obeyemptylines
\obeyallemptylines

\showgrid \setuplayout[grid=yes]

\starttext

xxx
\starttyping



1test

test


test
\stoptyping
xxx
\starttyping
2test
test
test

\stoptyping
xxx

\starttyping
3test
test
test




\stoptyping
xxx
\starttyping
test

test

test

test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


test


\stoptyping


\stoptext


Hans

-- 

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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] starttyping

2006-02-06 Thread Hans Hagen
Hans van der Meer wrote:
> Found something annoying with \starttyping...\stoptyping.
>
> I wanted side by side two framed texts in verbatim, one of them one  
> line longer than the other.
> Of course they should align there lines.
>
> To accomplish this I put a blank line at the end of the shortest text.
> Alas, \starttyping does not honor a blank line at the end, although  
> it does honors blank lines inbetween.
> I am inclined to call this a bug.
>   
no, it's on purpose and therefore a feature
> Below a minimal example showing the blank line in between but not the  
> one at the end.
> The ContextWiki site gives the same result.
>
> \starttext
> \startframedtext[strut=no,offset=0pt]
> \starttyping
> before blank line
>
> after blank line
> blank line follows
>
> \stoptyping
> \stopframedtext
> \stoptext
>   
just add a \blank or \crlf after the typing 

Hans 

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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] starttyping

2006-02-04 Thread Taco Hoekwater
Hans van der Meer wrote:
> Found something annoying with \starttyping...\stoptyping.
> 
> I wanted side by side two framed texts in verbatim, one of them one  
> line longer than the other.
> Of course they should align there lines.
> 
> To accomplish this I put a blank line at the end of the shortest text.
> Alas, \starttyping does not honor a blank line at the end, although  
> it does honors blank lines inbetween.
> I am inclined to call this a bug.

I agree, but only when \obeyemptylines is in effect (i have documents
that depend on that auto-dropping of trailing empty lines in other
cases). So my patch proposal is:

   \def\presetemptylastverbatimline%
   {\ifcase \verbatimstatus \or \or  \or \doflushverbatimline
\else \kern \zeropoint \doverbatimnobreak \doflushverbatimline \fi
%TH the next \kern is new
\kern \zeropoint }

   \def\obeyemptylines%
   {\let\donextemptyverbatimline\doemptyverbatimline
%TH the next reassignment is new
\let\presetlastverbatimline\presetemptylastverbatimline  }

You have to add an \obeyemptylines command in your document(s), of
course.

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] starttyping

2006-02-04 Thread Hans van der Meer
Found something annoying with \starttyping...\stoptyping.

I wanted side by side two framed texts in verbatim, one of them one  
line longer than the other.
Of course they should align there lines.

To accomplish this I put a blank line at the end of the shortest text.
Alas, \starttyping does not honor a blank line at the end, although  
it does honors blank lines inbetween.
I am inclined to call this a bug.

Below a minimal example showing the blank line in between but not the  
one at the end.
The ContextWiki site gives the same result.

\starttext
\startframedtext[strut=no,offset=0pt]
\starttyping
before blank line

after blank line
blank line follows

\stoptyping
\stopframedtext
\stoptext

yours sincerely,
dr. H. van der Meer



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \starttyping

2005-12-16 Thread Wolfgang Zillig
Sometimes the solution is too simple! I don't know why I did'nt find
that solution imediately!

Thanks

Wolfgang

Zitat von Tobias Burnus <[EMAIL PROTECTED]>:

> Hello,
> 
> Wolfgang Zillig wrote:
> > I wan't to typset some programming code \starttyping code
> \stoptyping 
> > works perfect. But is there a way to use directly the input of a
> file?
> \typefile ?
> 
> Tobias
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \starttyping

2005-12-16 Thread Tobias Burnus

Hello,

Wolfgang Zillig wrote:
I wan't to typset some programming code \starttyping code \stoptyping 
works perfect. But is there a way to use directly the input of a file?

\typefile ?

Tobias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \starttyping

2005-12-16 Thread Tobias Burnus

Hello,

Wolfgang Zillig wrote:
I wan't to typset some programming code \starttyping code \stoptyping 
works perfect. But is there a way to use directly the input of a file?

\typefile ?

Tobias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \starttyping

2005-12-16 Thread Wolfgang Zillig

Hello,

I wan't to typset some programming code \starttyping code \stoptyping 
works perfect. But is there a way to use directly the input of a file? 
When I use \starttyping

\input file.m
\stoptyping

I get the line \input file.m displayed. I think there is an easy way to 
get this problem solved but it will not get into my head.


Many thanks

Wolfgang
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context