Re: [NTG-context] XML Processing with Verbatim (VIM-Typing)

2015-02-13 Thread Andreas Schneider

Am 12.02.2015 15:44, schrieb Hans Hagen:


so then you have to wikify it (or add it to the t-vim module docu)


You are right ofcourse :-)
Done: http://wiki.contextgarden.net/Verbatim_XML
___
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] XML Processing with Verbatim (VIM-Typing)

2015-02-12 Thread Aditya Mahajan

On Thu, 12 Feb 2015, Hans Hagen wrote:


On 2/11/2015 12:15 PM, Andreas Schneider wrote:

Am 10.02.2015 22:45, schrieb Hans Hagen:


\startluacode
function xml.functions.processJSON(t)
buffers.assign(foo,\\startJSON\n .. tostring(xml.text(t))
.. \n\\stopJSON)
context.getbuffer { foo }
end
\stopluacode

\startxmlsetups xml:json
\pushcatcodetable
\setcatcodetable\ctxcatcodes
\xmlfunction{#1}{processJSON}
\popcatcodetable
\stopxmlsetups

(If needed I can make a better plugin for this ... remind me later
this year.)


t-filter provides a \processfilterbuffer macro. So, in principle,

  \processJSONbuffer[foo]

should have worked, but it did not due to a bug. I have fixed that and 
pushed the latest version to context garden. With this, the following 
should also work (untested)



\startluacode
function xml.functions.processJSON(t)
buffers.assign(foo, tostring(xml.text(t)))
context.processJSONbuffer { foo }
end
\stopluacode

\startxmlsetups xml:json
\xmlfunction{#1}{processJSON}
\stopxmlsetups




That works like a charm!
 From my perspective, no changes are necessary. I personally like some
technical trickery in my ConTeXt code, especially if it's as slim as
your solution. (Mainly because that helps me understand the inner
workings and hopefully makes me find solutions like this on my own :-))


so then you have to wikify it (or add it to the t-vim module docu)


If others also need similar functionality, I can look into adding xml 
processing features or the appropriate lua functions to t-filter.


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
___

Re: [NTG-context] XML Processing with Verbatim (VIM-Typing)

2015-02-12 Thread Hans Hagen

On 2/11/2015 12:15 PM, Andreas Schneider wrote:

Am 10.02.2015 22:45, schrieb Hans Hagen:


\startluacode
function xml.functions.processJSON(t)
buffers.assign(foo,\\startJSON\n .. tostring(xml.text(t))
.. \n\\stopJSON)
context.getbuffer { foo }
end
\stopluacode

\startxmlsetups xml:json
\pushcatcodetable
\setcatcodetable\ctxcatcodes
\xmlfunction{#1}{processJSON}
\popcatcodetable
\stopxmlsetups

(If needed I can make a better plugin for this ... remind me later
this year.)



Thank you very much, Hans!

That works like a charm!
 From my perspective, no changes are necessary. I personally like some
technical trickery in my ConTeXt code, especially if it's as slim as
your solution. (Mainly because that helps me understand the inner
workings and hopefully makes me find solutions like this on my own :-))


so then you have to wikify it (or add it to the t-vim module docu)


So thanks again for that quick and very helpful answer!

Best regards,
Andreas
___

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
___



--

-
  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] XML Processing with Verbatim (VIM-Typing)

2015-02-11 Thread Andreas Schneider

Am 10.02.2015 22:45, schrieb Hans Hagen:


\startluacode
function xml.functions.processJSON(t)
buffers.assign(foo,\\startJSON\n .. tostring(xml.text(t))
.. \n\\stopJSON)
context.getbuffer { foo }
end
\stopluacode

\startxmlsetups xml:json
\pushcatcodetable
\setcatcodetable\ctxcatcodes
\xmlfunction{#1}{processJSON}
\popcatcodetable
\stopxmlsetups

(If needed I can make a better plugin for this ... remind me later this 
year.)




Thank you very much, Hans!

That works like a charm!
From my perspective, no changes are necessary. I personally like some 
technical trickery in my ConTeXt code, especially if it's as slim as 
your solution. (Mainly because that helps me understand the inner 
workings and hopefully makes me find solutions like this on my own :-))


So thanks again for that quick and very helpful answer!

Best regards,
Andreas
___
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] XML Processing with Verbatim (VIM-Typing)

2015-02-10 Thread Andreas Schneider

Hello,

as a few other topics on this Mailing List already discussed, it's not 
(easily?) possible to use \starttyping\stoptyping within XML setups. If 
it was simple verbatim, there would be a few workarounds.
However, I want to provide formatted verbatim (i.e. \startJSON 
\stopJSON, after having \definevimtyping[JSON][syntax=javascript]). That 
typing environment will be further customized (by adding text background 
with border, etc.).


I don't see a simple way to work around this without manually 
typesetting the code highlighting (which I don't want. I simply want 
json{someCode}/json inside the XML file).


Is there anything I can do to make this work? Maybe with preparing a 
buffer? (with Lua?)


Thanks in advance, for any help you can provide :-)

-- Minimal Example:
\usemodule[vim]
\definevimtyping[JSON][syntax=javascript]

\starttext

\startluacode
  function xml.functions.processJSON(t)
lxml.verbatim(t, \\startJSON, \\stopJSON)
  end
\stopluacode

\startbuffer[demo]
test
  description
json{somecode}/json
  /description
/test
\stopbuffer

\startxmlsetups xml:initialize
  \xmlsetsetup{#1}{test|description|json}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\startxmlsetups xml:test
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:description
  %\xmlsetsetup{xml}{json}{xml:*}
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:json
  \xmlfunction{#1}{processJSON}
\stopxmlsetups

\xmlprocessbuffer{main}{demo}{}

\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] XML Processing with Verbatim (VIM-Typing)

2015-02-10 Thread Hans Hagen

On 2/10/2015 5:59 PM, Andreas Schneider wrote:

Hello,

as a few other topics on this Mailing List already discussed, it's not
(easily?) possible to use \starttyping\stoptyping within XML setups. If
it was simple verbatim, there would be a few workarounds.
However, I want to provide formatted verbatim (i.e. \startJSON
\stopJSON, after having \definevimtyping[JSON][syntax=javascript]). That
typing environment will be further customized (by adding text background
with border, etc.).

I don't see a simple way to work around this without manually
typesetting the code highlighting (which I don't want. I simply want
json{someCode}/json inside the XML file).

Is there anything I can do to make this work? Maybe with preparing a
buffer? (with Lua?)



\startluacode
function xml.functions.processJSON(t)
buffers.assign(foo,\\startJSON\n .. tostring(xml.text(t)) 
.. \n\\stopJSON)

context.getbuffer { foo }
end
\stopluacode

\startxmlsetups xml:json
\pushcatcodetable
\setcatcodetable\ctxcatcodes
\xmlfunction{#1}{processJSON}
\popcatcodetable
\stopxmlsetups

(If needed I can make a better plugin for this ... remind me later this 
year.)



Thanks in advance, for any help you can provide :-)

-- Minimal Example:
\usemodule[vim]
\definevimtyping[JSON][syntax=javascript]

\starttext

\startluacode
   function xml.functions.processJSON(t)
 lxml.verbatim(t, \\startJSON, \\stopJSON)
   end
\stopluacode

\startbuffer[demo]
test
   description
 json{somecode}/json
   /description
/test
\stopbuffer

\startxmlsetups xml:initialize
   \xmlsetsetup{#1}{test|description|json}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\startxmlsetups xml:test
   \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:description
   %\xmlsetsetup{xml}{json}{xml:*}
   \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:json
   \xmlfunction{#1}{processJSON}
\stopxmlsetups

\xmlprocessbuffer{main}{demo}{}

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



--

-
  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] ConTeXt gobble my mind

2014-11-07 Thread Pierre-François Bonnefoi
Hello Hans,

thank you for contributing to solve my problem.

I've tried your proposition : how can I get the content of the buffer afterward 
?
I've tried \getbuffer[Slide] with no success on MKIV beta that I've just 
updated.

Does a buffer work only for verbatim content ?

best regards,
Pierre-François.

On 07 Nov 2014, at 12:38, Hans Hagen pra...@wxs.nl wrote:

 
 \starttext
 
 \definebuffer[Slide]
 
 foo
 
 % \skipSlide
 \startSlide
 bla bla bla
 \startyping
 language C code
 \stoptyping
 bla bla bla
 \stopSlide
 
 bar
 
 \stoptext
 
 

-- 
Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr 
http://libpfb.so/
Universite de Limoges, Laboratoire XLIM |   Tel : 06 28 18 03 38
123 av Albert Thomas|  Mrs. Peel, we're needed...
87060 Limoges CEDEX - FRANCE| The Avengers.

___
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] ConTeXt gobble my mind

2014-11-07 Thread Hans Hagen

On 11/7/2014 2:26 PM, Pierre-François Bonnefoi wrote:

Hello Hans,

thank you for contributing to solve my problem.

I've tried your proposition : how can I get the content of the buffer
afterward ?
I've tried \getbuffer[Slide] with no success on MKIV beta that I've just
updated.


\starttext

\definebuffer[Slide]

foo

\startSlide
bla bla bla
\starttyping
language C code
\stoptyping
bla bla bla
\stopSlide

bar

\getbuffer[\thedefinedbuffer{Slide}]

\getSlide

\stoptext



Does a buffer work only for verbatim content ?


no, for everything


best regards,
Pierre-François.

On 07 Nov 2014, at 12:38, Hans Hagen pra...@wxs.nl
mailto:pra...@wxs.nl wrote:



\starttext

\definebuffer[Slide]

foo

% \skipSlide
\startSlide
bla bla bla
\startyping
language C code
\stoptyping
bla bla bla
\stopSlide

bar

\stoptext




--
Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr
mailto:bonne...@unilim.fr http://libpfb.so/
Universite de Limoges, Laboratoire XLIM |   Tel : 06 28 18 03 38
123 av Albert Thomas|  Mrs. Peel, we're needed...
87060 Limoges CEDEX - FRANCE| The Avengers.



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




--

-
  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] ConTeXt gobble my mind

2014-11-07 Thread Pierre-François Bonnefoi
Just before going to bed, I've found a solution with all your help and the help 
of Taco Hoekwater through the ntg mail archive :

\def\startSlide%
{\def\stopSlide{\checkSlide\doif{\getvariable{temp}{publish}}{yes}{\page\getbuffer[Slide]}}%
\dostartbuffer[Slide][startSlide][stopSlide]}

Let me know if it's my philosopher's stone...
I've tried it and it works so far.

No more ugly gobbling, my mind is free.

So depressing problem and so simple and elegant solution...

On 07 Nov 2014, at 16:17, Hans Hagen pra...@wxs.nl wrote:

 On 11/7/2014 2:26 PM, Pierre-François Bonnefoi wrote:
 Hello Hans,
 
 thank you for contributing to solve my problem.
 
 I've tried your proposition : how can I get the content of the buffer
 afterward ?
 I've tried \getbuffer[Slide] with no success on MKIV beta that I've just
 updated.
 
 \starttext
 
 \definebuffer[Slide]
 
 foo
 
 \startSlide
 bla bla bla
 \starttyping
 language C code
 \stoptyping
 bla bla bla
 \stopSlide
 
 bar
 
 \getbuffer[\thedefinedbuffer{Slide}]
 
 \getSlide
 
 \stoptext
 
 
 Does a buffer work only for verbatim content ?
 
 no, for everything
 
 best regards,
 Pierre-François.
 
 On 07 Nov 2014, at 12:38, Hans Hagen pra...@wxs.nl
 mailto:pra...@wxs.nl wrote:
 
 
 \starttext
 
 \definebuffer[Slide]
 
 foo
 
 % \skipSlide
 \startSlide
 bla bla bla
 \startyping
 language C code
 \stoptyping
 bla bla bla
 \stopSlide
 
 bar
 
 \stoptext
 
 
 
 --
 Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr
 mailto:bonne...@unilim.fr http://libpfb.so/
 Universite de Limoges, Laboratoire XLIM |   Tel : 06 28 18 03 38
 123 av Albert Thomas|  Mrs. Peel, we're needed...
 87060 Limoges CEDEX - FRANCE| The Avengers.
 
 
 
 ___
 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
 ___
 
 
 
 -- 
 
 -
  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
 ___

-- 
Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr 
http://libpfb.so/
Universite de Limoges, Laboratoire XLIM |   Tel : 06 28 18 03 38
123 av Albert Thomas|  Mrs. Peel, we're needed...
87060 Limoges CEDEX - FRANCE| The Avengers.

___
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] ANNOUNCEMENT: Arabic-Latin Modern Fixed

2014-08-14 Thread Idris Samawi Hamid ادريس سماوي حامد
[This announcement is dedicated to the 110% recovery and return of our  
visionary and fearless leader Hans Hagen: Three cheers to you, Hans!!!]


Dear gang,

It's my pleasure to announce the release of Arabic-Latin Modern Fixed, a  
monospaced font that extends TeX-Gyre Latin Modern Mono 10 Regular. It has  
been uploaded to CTAN, although I do not know how long it will take for  
the CTAN people to approve and publish it. Eventually it will make it's  
way into the ConTeXt minimals as well. Until then, you may use this  
private link:


https://www.dropbox.com/s/pulgaxshzr5bcmy/almfixed.zip

README.txt is reproduced below. Future plans include both bold and  
proportional versions. Enjoy and


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523

==README.txt==
Typeface Family: Arabic-Latin Modern
Font: Arabic-Latin Modern Fixed
Style: Regular
Version: 0.92
Author: Idris Samawi Hamid
Date: August 5, 2014

License:

Arabic-Latin Modern Fixed is licensed under the GUST Font License with one  
important adjustment: It is requested, as well as legally *required*, that  
derived works be distributed only after changing the names of the fonts  
comprising this work.


http://www.gust.org.pl/projects/e-foundry/licenses/GUST-FONT-LICENSE.txt/view

Contains:

http://www.ctan.org/tex-archive/fonts/doc/almfixed-dtk.pdf
http://www.ctan.org/tex-archive/fonts/ps;
http://www.ctan.org/tex-archive/fonts/tt;

Some notes, in no particular order:

1. For more extensive documentation, examples, and background; see  
almfixed-dtk.pdf.


2. The final version number (per any future fixes, maintenance etc.) is  
intended to be Version 1.10.


3. Arabic-Latin Modern Fixed is an extension of TeX-Gyre Latin Modern Mono  
10 Regular. Every glyph and opentype feature of the Latin Modern Mono has  
been retained, with minor improvements. On the other hand, we have changed  
the vertical metrics of the font. Although the Arabic script is designed  
to use the same x-size as Latin Modern Mono, the former script needs  
greater ascender and descender space. And there are cases (such as certain  
kinds of academic assignment and definitely mixed Latin and Arabic text)  
where Latin can use the extra vertical space as well. Otherwise, only the  
vertical metrics prevents this from being a drop-in replacement for Latin  
Modern Mono . Of course one can always set the vertical metrics in TeX to  
match LM Mono.


4. Every Arabic glyph in each Unicode-code block is supported (up to  
Unicode 7.0): Arabic, Arabic Supplement, Arabic Extended, Arabic  
Presentation-Forms A, and Arabic Presentation-Forms B.


5. This is a totally original design, using the Knuthian letters as  
inspiration. Indeed, virtually all Arabic characters were developed on the  
foundation of a study of the Latin Modern Mono letters 'l', 'r', and 'c'.  
In other words, this is a genuine extension of the original Knuthian  
design to an authentic and culturally authentic Arabic typing font.


6. There are two versions of the font: ps and tt. The Type~1 version is  
for print applications (and usually the default for TeX). The TrueType  
version is for on-screen applications such as text editors. Hinting in the  
tt version is much better for on-screen, at least on Microsoft Windows.


7. The most unique feature of Arabic-Latin Modern is in its treatment of  
vowels and diacritics. Each vowel and diacritic (ALM Fixed contains a  
total of 68 such glyphs) can now be edited horizontally within any text  
editor or processor. I believe this is the very first opentype Arabic font  
ever to have this capability. Editing complex Arabic texts will now be  
much easier to input and to proofread.


8. At least 12 additional format characters are included; see  
almfixed-dtk.pdf for details. Also designed a glyph representation for  
U+00A0 (no-break space), as well as U+25CC (dotted circle).


9. Arabic-Latin Modern Mono will be a boon to scholars, academics, coder  
editors, and anyone who wants to manage the entry of the wide array of  
Unicode Arabic text for editing, verbatim, or other purposes.

==
___
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] Typesetting file names with ~

2014-07-30 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

which is the best way to typeset text (aka file names) containing tilde so that 
the tilde be visible?

I guess there is a something like (inline) verbatim mode which makes ~ (and 
maybe % $ etc.) visible...

I need to typeset e.g.

d:/Lukas/~/abc.def

and I'd like avoid translating ~ into e.g. \textasciitilde.

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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] Typesetting file names with ~

2014-07-30 Thread Tomas Hala
Hi Lukáš,

I know these two ways:

\hyphenatedurl{d:/xx/~/yyy}
\type{d:/xx/~/yyy}

Cheers,

Tom


Wed, Jul 30, 2014 ve 02:09:43PM +0200 Procházka Lukáš Ing. - Pontex s. r. o. 
napsal(a):
# Hello,
# 
# which is the best way to typeset text (aka file names) containing tilde so 
that the tilde be visible?
# 
# I guess there is a something like (inline) verbatim mode which makes ~ (and 
maybe % $ etc.) visible...
# 
# I need to typeset e.g.
# 
# d:/Lukas/~/abc.def
# 
# and I'd like avoid translating ~ into e.g. \textasciitilde.
# 
# Best regards,
# 
# Lukas
# 
# 
# -- 
# Ing. Lukáš Procházka [mailto:l...@pontex.cz]
# Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
# Bezová 1658
# 147 14 Praha 4
# 
# Tel: +420 241 096 751
# Fax: +420 244 461 038
# 
___
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] bug in \setuptagging?

2014-05-31 Thread Pablo Rodriguez
On 05/31/2014 12:49 PM, Hans Hagen wrote:
 On 5/31/2014 8:30 AM, Pablo Rodriguez wrote:
 [...]
 If I disable \setuptagging, output is fine. But with \setuptagging
 enabled, the typing environment doesn’t display multiple lines.

 Am I doing something wrong or have I hit a bug?
 
 The space in verbatim is defined differently because otherwise it can 
 get lost in the export; you can experiment with:
 
 \appendtoks
  \unexpanded\def\obeyedspace{\hskip\zeropoint\char32\hskip\zeropoint}%
 \to \everyenableelements

Many thanks for your reply, Hans.

I’m afraid I cannot make it work even with the minimal sample:

\setuppapersize[A6]
\setuptagging[state=start]
\setuptyping[margin=yes,align={right,broad}]
\appendtoks
 \unexpanded\def\obeyedspace{\hskip\zeropoint\char32\hskip%
   \zeropoint}%
\to \everyenableelements
\starttext
\starttyping
\setuptyping[margin=yes, align={right,broad}]
\stoptyping
\stoptext

Since I’m not familiar with \appendtoks, I don’t know whether I applied
it right.

Is your code applied right in the sample above?

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
___


Re: [NTG-context] bug in \setuptagging?

2014-05-31 Thread Wolfgang Schuster

Am 31.05.2014 um 13:37 schrieb Pablo Rodriguez oi...@gmx.es:

 On 05/31/2014 12:49 PM, Hans Hagen wrote:
 On 5/31/2014 8:30 AM, Pablo Rodriguez wrote:
 [...]
 If I disable \setuptagging, output is fine. But with \setuptagging
 enabled, the typing environment doesn’t display multiple lines.
 
 Am I doing something wrong or have I hit a bug?
 
 The space in verbatim is defined differently because otherwise it can 
 get lost in the export; you can experiment with:
 
 \appendtoks
 \unexpanded\def\obeyedspace{\hskip\zeropoint\char32\hskip\zeropoint}%
 \to \everyenableelements
 
 Many thanks for your reply, Hans.
 
 I’m afraid I cannot make it work even with the minimal sample:
 
\setuppapersize[A6]
\setuptagging[state=start]
\setuptyping[margin=yes,align={right,broad}]
\appendtoks
 \unexpanded\def\obeyedspace{\hskip\zeropoint\char32\hskip%
   \zeropoint}%
\to \everyenableelements
\starttext
\starttyping
\setuptyping[margin=yes, align={right,broad}]
\stoptyping
\stoptext
 
 Since I’m not familiar with \appendtoks, I don’t know whether I applied
 it right.
 
 Is your code applied right in the sample above?

1. I think you have to redefined the \doverbatimspace command.

\appendtoks
   \unexpanded\def\doverbatimspace{\hskip\zeropoint\char32\hskip\zeropoint}%
\to \everyenableelements

2. You have to put this code block *before* \setuptagging.

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
___


Re: [NTG-context] unwanted extra space in type definition

2014-05-26 Thread Wolfgang Schuster

Am 26.05.2014 um 18:00 schrieb Pablo Rodriguez oi...@gmx.es:

 Dear list,
 
 I have the following sample:
 
\definetype[TeXcode][option=TEX]
\def\arg#1{\TeXcode{{#1}}}
\starttext
\arg{\em\de Textsatzsystem}
 
\TeXcode{{\em\de Textsatzsystem}}
\stoptext
 
 I don’t know what is wrong defined in \arg that inserts an extra space
 after \em?

You can’t do this form a definition for a verbatim command because TeX has its 
own rules
for such a situation (search for a description about catcodes), when you want a 
copy of
\TeXcode add

\definetype[arg][TeXcode]

to your document.

BTW: \arg is a predefined command and you should avoid to redefine 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
___


Re: [NTG-context] unwanted extra space in type definition

2014-05-26 Thread Pablo Rodriguez
On 05/26/2014 06:08 PM, Wolfgang Schuster wrote:
 Am 26.05.2014 um 18:00 schrieb Pablo Rodriguez:
\def\arg#1{\TeXcode{{#1}}}
 [...]
 I don’t know what is wrong defined in \arg that inserts an extra space
 after \em?
 
 You can’t do this form a definition for a verbatim command because TeX has 
 its own rules
 for such a situation (search for a description about catcodes), when you want 
 a copy of
 \TeXcode add
 
 \definetype[arg][TeXcode]
 
 to your document.
 
 BTW: \arg is a predefined command and you should avoid to redefine it

Many thanks for your reply, Wolfgang.

Is there no way that I have the already predefined \arg with colored
contents (braces included)?

Even with defining another command, the problem is that left and right
aren’t covered by option=TEX.

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
___


[NTG-context] How to place a verbatim environment in the text such that the following paragraph is not indented?

2014-05-07 Thread Thomas Möbius
Dear list,

how do I place a verbatim environment in the text such that the
following paragraph is not indented?  I expect the environment to
behave the same as the formula-environment. How can I achieve this?

--- minimal example ---

\starttext

\setupindenting[1.3em]
\setupindenting[yes]

\definetyping
[R]
[options=R,
style={\ss},
before={\startframedtext
[width=.975\makeupwidth,
frame=off,
bottomframe=on,
topframe=on,
background=screen,
backgroundscreen=.95]},
after={\stopframedtext},
bodyfont=9pt,
margin=1.3em]

\input ward

You can use the following syntax
\startR
f - function(x) x^2
\stopR
to define a function. (Begging of line should not be indented.)

\input ward

Have a look at
\startformula
f(x) = x^2
\stopformula
where $f$ is a function. (No indent as expected.)

\input ward
\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] How to place a verbatim environment in the text such that the following paragraph is not indented?

2014-05-07 Thread Wolfgang Schuster

Am 07.05.2014 um 12:46 schrieb Thomas Möbius kont...@thomasmoebius.de:

 Dear list,
 
 how do I place a verbatim environment in the text such that the
 following paragraph is not indented?  I expect the environment to
 behave the same as the formula-environment. How can I achieve this?

Add “indentnext=auto” to your \definetyping setups.

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
___


Re: [NTG-context] How can I use Aditya filter module within XML?

2014-03-28 Thread Aditya Mahajan

On Thu, 27 Mar 2014, Xan wrote:


Hi,

Is it possible to use

paragraph \startmarkdown bla... \stopmarkdown /paragraph

With my code (xmlflush) the start/stopmarkdown is printed without 
interpretation.


I have never tried the xml mechanism, so I am not sure whether the filter 
module works or not. If either the verbatim or the buffer mechanisms work, 
then the filter module should work. If not, it might be possible to create 
something like


\xmlflushfilter[...options...]{...body...}

but I will need to look into the xml mechnaism in detail to see how to 
code that.


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
___


Re: [NTG-context] confusion about expansion

2014-03-12 Thread Wolfgang Schuster

Am 12.03.2014 um 15:51 schrieb Lars Huttar lars_hut...@sil.org:

 This gets rid of the error, but it seems to prevent any expansion of the
 content of \CurrentUser, because the page head now literally looks like
 this:


You can try to print the string in verbatim mode:

  \def\CurrentUser{\cldcommand{sprint(tex.vrbcatcodes,os.resultofwhoami)}}

  \def\Markname{Compiled \date by \CurrentUser\ \LUATEX +\ConTeXt\ 
\contextversion.}

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
___

Re: [NTG-context] confusion about expansion

2014-03-12 Thread Lars Huttar
On 3/12/2014 11:06 AM, Wolfgang Schuster wrote:

 Am 12.03.2014 um 15:51 schrieb Lars Huttar lars_hut...@sil.org
 mailto:lars_hut...@sil.org:

 This gets rid of the error, but it seems to prevent any expansion of the
 content of \CurrentUser, because the page head now literally looks like
 this:

 You can try to print the string in verbatim mode:

  
 \def\CurrentUser{\cldcommand{sprint(tex.vrbcatcodes,os.resultofwhoami)}}

   \def\Markname{Compiled \date by \CurrentUser\ \LUATEX +\ConTeXt\
 \contextversion.}


That did it. Thank you!
Lars

___
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] Macro expansion inside \type

2014-01-09 Thread Aditya Mahajan

On Fri, 10 Jan 2014, Devendra Ghate wrote:


Hello Everyone,

Consider the following MWE:

\define\author{Devendra Ghate}
\starttext
\type{\author}
\stoptext

As mentioned on the wiki, this doesn't expand `\author` but rather
prints it as it is. However, I would like `\author` to be expanded
before it is typeset.


Type is for verbatim material. If you want monospaced fonts, use 
\mono{\author}.


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
___


Re: [NTG-context] Wrong spaces in verbatim mode with Consolas

2013-09-18 Thread Hans Hagen

On 9/17/2013 6:33 PM, Wolfgang Schuster wrote:

Hi,

the Consolas font produces proportional spaces even with “features=none”.

\starttypescript [mono] [consolas]
 \setups[font:fallback:mono]
 \definefontsynonym [Mono]   [file:consolas]   
[features=none]
 \definefontsynonym [MonoBold]   [file:consolasbold]   
[features=none]
 \definefontsynonym [MonoItalic] [file:consolasitalic] 
[features=none]
 \definefontsynonym [MonoBoldItalic] [file:consolasbolditalic] 
[features=none]
\stoptypescript

\definetypeface [mainface] [rm] [serif] [modern]   [default]
\definetypeface [mainface] [tt] [mono]  [consolas] [default]
%\definetypeface [mainface] [tt] [mono]  [modern]   [default]

\setupbodyfont[mainface]

\starttext
\starttyping
a b  cd
x  y  z
\stoptyping
\stoptext


are we talking about the same font?

\starttypescript [mono] [consolas]
\setups[font:fallback:mono]
\definefontsynonym [Mono]   [file:consola]  [features=none]
\definefontsynonym [MonoBold]   [file:consolab] [features=none]
\definefontsynonym [MonoItalic] [file:consolai] [features=none]
\definefontsynonym [MonoBoldItalic] [file:consolaz] [features=none]
\stoptypescript

\definetypeface [mainface] [rm] [serif] [modern]   [default]
\definetypeface [mainface] [tt] [mono]  [consolas] [default]

\setupbodyfont[mainface]

\showglyphs

\starttext
\starttyping
a b  cd
x  y  z
\stoptyping
\stoptext

looks ok here


-
  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] Wrong spaces in verbatim mode with Consolas

2013-09-18 Thread Wolfgang Schuster

Am 18.09.2013 um 09:50 schrieb Hans Hagen pra...@wxs.nl:

 On 9/17/2013 6:33 PM, Wolfgang Schuster wrote:
 Hi,
 
 the Consolas font produces proportional spaces even with “features=none”.
 
 \starttypescript [mono] [consolas]
 \setups[font:fallback:mono]
 \definefontsynonym [Mono]   [file:consolas]   
 [features=none]
 \definefontsynonym [MonoBold]   [file:consolasbold]   
 [features=none]
 \definefontsynonym [MonoItalic] [file:consolasitalic] 
 [features=none]
 \definefontsynonym [MonoBoldItalic] [file:consolasbolditalic] 
 [features=none]
 \stoptypescript
 
 \definetypeface [mainface] [rm] [serif] [modern]   [default]
 \definetypeface [mainface] [tt] [mono]  [consolas] [default]
 %\definetypeface [mainface] [tt] [mono]  [modern]   [default]
 
 \setupbodyfont[mainface]
 
 \starttext
 \starttyping
 a b  cd
 x  y  z
 \stoptyping
 \stoptext
 
 are we talking about the same font?


I used the files which came with my office installation where the spaces are 
wrong
(see attachment) but when I use the files from your example the text looks ok.

Wolfgang


consolas.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] Wrong spaces in verbatim mode with Consolas

2013-09-18 Thread Hans Hagen

On 9/18/2013 4:11 PM, Wolfgang Schuster wrote:


Am 18.09.2013 um 09:50 schrieb Hans Hagen pra...@wxs.nl:


On 9/17/2013 6:33 PM, Wolfgang Schuster wrote:

Hi,

the Consolas font produces proportional spaces even with “features=none”.

\starttypescript [mono] [consolas]
 \setups[font:fallback:mono]
 \definefontsynonym [Mono]   [file:consolas]   
[features=none]
 \definefontsynonym [MonoBold]   [file:consolasbold]   
[features=none]
 \definefontsynonym [MonoItalic] [file:consolasitalic] 
[features=none]
 \definefontsynonym [MonoBoldItalic] [file:consolasbolditalic] 
[features=none]
\stoptypescript

\definetypeface [mainface] [rm] [serif] [modern]   [default]
\definetypeface [mainface] [tt] [mono]  [consolas] [default]
%\definetypeface [mainface] [tt] [mono]  [modern]   [default]

\setupbodyfont[mainface]

\starttext
\starttyping
a b  cd
x  y  z
\stoptyping
\stoptext


are we talking about the same font?



I used the files which came with my office installation where the spaces are 
wrong
(see attachment) but when I use the files from your example the text looks ok.


i have no clue

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] Wrong spaces in verbatim mode with Consolas

2013-09-17 Thread Wolfgang Schuster
Hi,

the Consolas font produces proportional spaces even with “features=none”.

\starttypescript [mono] [consolas]
\setups[font:fallback:mono]
\definefontsynonym [Mono]   [file:consolas]   
[features=none]
\definefontsynonym [MonoBold]   [file:consolasbold]   
[features=none]
\definefontsynonym [MonoItalic] [file:consolasitalic] 
[features=none]
\definefontsynonym [MonoBoldItalic] [file:consolasbolditalic] 
[features=none]
\stoptypescript

\definetypeface [mainface] [rm] [serif] [modern]   [default]
\definetypeface [mainface] [tt] [mono]  [consolas] [default]
%\definetypeface [mainface] [tt] [mono]  [modern]   [default]

\setupbodyfont[mainface]

\starttext
\starttyping
a b  cd
x  y  z
\stoptyping
\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
___


Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Aditya Mahajan

On Thu, 5 Sep 2013, Hans Hagen wrote:


On 9/4/2013 11:20 AM, Hans Hagen wrote:


you get a representation in xml indeed, but not verbatim, but as close
as possible to the genaric (parent) structure elements in context


probably the most straightforward xhtml export is file with only

div class=section ...
div class=... ...
   div
/div

i.e. only divs and spans


How easy is it to create a new export format. IIRC, context keeps track of 
the entire document tree, and flushes the XML output only at the end. Is 
it possible to make this pluggable so that users can write their own 
transformers (in lua) on how the document tree can be written. This will 
enable more output formats (opendocument and (shudder) latex).


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
___


Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Hans Hagen

On 9/4/2013 11:20 AM, Hans Hagen wrote:


you get a representation in xml indeed, but not verbatim, but as close
as possible to the genaric (parent) structure elements in context


probably the most straightforward xhtml export is file with only

div class=section ...
div class=... ...
div
/div

i.e. only divs and spans


-
  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] EPUB XHTML Format

2013-09-05 Thread Hans Hagen

On 9/5/2013 7:22 PM, Aditya Mahajan wrote:

On Thu, 5 Sep 2013, Hans Hagen wrote:


On 9/4/2013 11:20 AM, Hans Hagen wrote:


you get a representation in xml indeed, but not verbatim, but as close
as possible to the genaric (parent) structure elements in context


probably the most straightforward xhtml export is file with only

div class=section ...
div class=... ...
   div
/div

i.e. only divs and spans


How easy is it to create a new export format. IIRC, context keeps track
of the entire document tree, and flushes the XML output only at the end.
Is it possible to make this pluggable so that users can write their own
transformers (in lua) on how the document tree can be written. This will
enable more output formats (opendocument and (shudder) latex).


sure, but first i want to clean up some code (it's rather complex) ... 
in principle there is a document tree so one can plug into that; 
alternatively one can load the xml tree and mess with that (probably 
easier if we provide some styles for it)


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] EPUB XHTML Format

2013-09-04 Thread Hans Hagen

On 9/4/2013 3:19 AM, Thangalin wrote:

Hi,

The attached t.tex file produces the attached t.xhtml file. I have
looked at the following documents:

  * http://en.wikipedia.org/wiki/EPUB#Open_Publication_Structure_2.0..1
http://en.wikipedia.org/wiki/EPUB#Open_Publication_Structure_2.0.1
  * http://en.wikipedia.org/wiki/DTBook
  * http://www.idpf.org/epub/20/spec/OPS_2.0.1_draft.htm
  * http://www.w3.org/TR/xhtml11/doctype.html
  * http://www.w3.org/TR/html5/sections.html

It seems that the macros in t.tex are being written out as XML elements,
verbatim. It is my understanding that these XML elements, however, do
not conform to the minimal content models associated with XHTML 1.1.


you get a representation in xml indeed, but not verbatim, but as close 
as possible to the genaric (parent) structure elements in context


of course we could alternatively export all as div 
class=tag-subtag-... but i don't like that too much; html itself is 
not rich enough for our purpose



What needs to happen to take a minimal ConTeXt file (such as the
attached) to produce a minimum viable EPUB that:

  * Generates XHTML headers (including !DOCTYPE and html...)


not needed as we're 'standalone'


  * Produces images as img tags, rather than float tags.


the css can deal with them (info is written to files for that)

the only real problematic thing is hyperlinks as css has no provision 
for that so there's an option to inject a...



  * Uses typical XHTML tags for body elements (e.g., ol for ordered
lists).


xhtml has no typical tags .. it's xml + css (or xslt) ... unfortunately 
browsers have messed up html so much (extensions, too tolerant support 
for unmatched tags, different rendering models) that xhtml never really 
took off


the export of context is in fact just xml, and by tagging it as xhtml we 
can apply css to it; but if someone has a workflow for producing epub an 
option if to postprocess that xml file into whatever epub one wants 
(i.e. the export is generic and carries as much info as possible)



Ideally, I would like to do something such as:

  * context t.tex
  * mtxrun --script epub --make t.specification

to generate an EPUB that passes validation of epubcheck
http://code.google.com/p/epubcheck/wiki/Library, with an output XHTML
file that more closely matches the XHTML specification.


Everytime we look into epub there's another issue ... it's not a 
standard but reversed engineered application mess (happen soften with 
xml: turn some application data structures into xml and call it a standard)


I only tested (long ago already) with some firefox plugin (i don't have 
a recent epub device, only an old firts generation one which is dead 
slow, never relly used, probably broken by now) and i refuse to buy a 
new one till resolution is decent (and i only want generic devices, not 
something bound to some shop)



How can I help?


by testing

as i have no real use/demand for epub it's not something i look into on 
a daily basis


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] EPUB XHTML Format

2013-09-03 Thread Thangalin
Hi,

The attached t.tex file produces the attached t.xhtml file. I have looked
at the following documents:

   - http://en.wikipedia.org/wiki/EPUB#Open_Publication_Structure_2.0.1
   - http://en.wikipedia.org/wiki/DTBook
   - http://www.idpf.org/epub/20/spec/OPS_2.0.1_draft.htm
   - http://www.w3.org/TR/xhtml11/doctype.html
   - http://www.w3.org/TR/html5/sections.html

It seems that the macros in t.tex are being written out as XML elements,
verbatim. It is my understanding that these XML elements, however, do not
conform to the minimal content models associated with XHTML 1.1.

What needs to happen to take a minimal ConTeXt file (such as the attached)
to produce a minimum viable EPUB that:

   - Generates XHTML headers (including !DOCTYPE and html...)
   - Produces images as img tags, rather than float tags.
   - Uses typical XHTML tags for body elements (e.g., ol for ordered
   lists).

Ideally, I would like to do something such as:

   - context t.tex
   - mtxrun --script epub --make t.specification

to generate an EPUB that passes validation of
epubcheckhttp://code.google.com/p/epubcheck/wiki/Library,
with an output XHTML file that more closely matches the XHTML specification.

How can I help?

Kind regards.


t.tex
Description: TeX document


t.xhtml
Description: application/xhtml


epub-errors.log
Description: Binary data
___
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] Making font smaller in \starttyping environment?

2013-08-31 Thread Wolfgang Schuster

Am 31.08.2013 um 18:35 schrieb Mari Voipio mari.voi...@iki.fi:

 Hello,
 
 I know I should be able to do it (and think I've done it once upon a
 time), but how do I change the font size just for \tt and for
 \starttyping \stoptyping environment?
 
 I have no problems with the font used, I just want my typed text to be
 a tad smaller (like \tfx for that font).
 
 Once again I feel very bewildered in the font land…

When you want a smaller size for the monospaced font you can use the rscale
key from \definetypeface.

\definetypeface [mainface] [rm] [serif] [modern] [default]
\definetypeface [mainface] [tt] [mono]  [modern] [default] [rscale=0.95]

\starttext
Serif text and {\tt monospaced text.}
\stoptext


The font (and also the font size) for the verbatim block could be changed with
the \setuptyping command, e.g.

  \setuptyping[bodyfont=11pt]

or

  \setuptyping[style=small]

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
___


Re: [NTG-context] Inserting verbatim text in a figure and framed.

2013-07-31 Thread john Culleton
On Tue, 30 Jul 2013 23:03:32 +0200
Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 30.07.2013 um 21:30 schrieb Peter Münster pmli...@free.fr:
 
  On Tue, Jul 30 2013, john Culleton wrote:
  
  Here is my code so far. I want to show a file in verbatim form. It
  compiles but here is no frame around the text and there is no
  caption.
  
  Hi,
  
  this works here:
  
  --8---cut here---start-8---
  \starttext
  \startbuffer[ex1]
  \typefile[]{test.tex}
  \stopbuffer
  \placefigure[here][fig:ex1]
  {Example 1}
  {\framed{\externalfigure[ex1.buffer][width=.75\textwidth]}}
  \stoptext
  --8---cut here---end---8---
 
 Why do you use a buffer?
 
 \starttext
 \startplacefigure[reference=fig:ex1,title=Example 1]
   \framed[align=flushleft,width=.75\textwidth]{\typefile{test.tex}}
 \stopplacefigure
 \stoptext
 
 Wolfgang
 
Possibly Peter used it because I used it. I used it because the
example I followed in The Manual used a buffer. As it happens his
example works better. My example1.tex is knuth.tex with two minor
modifications. His version with the buffer reduces the size of
the Knuth text to fit the frame. Your version wraps the text instead on
each line. For my purposes the facsimile representation is better.
 

However thanks to both for adding to my education. Unfortunately I
forget things as fast as I learn them these days. It is not
Alzheimer's disease but just plain oldtimers disease.  

John Culleton
___
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] Inserting verbatim text in a figure and framed.

2013-07-31 Thread Wolfgang Schuster

Am 31.07.2013 um 16:42 schrieb john Culleton j...@wexfordpress.com:

 Possibly Peter used it because I used it. I used it because the
 example I followed in The Manual used a buffer. As it happens his
 example works better. My example1.tex is knuth.tex with two minor
 modifications. His version with the buffer reduces the size of
 the Knuth text to fit the frame. Your version wraps the text instead on
 each line. For my purposes the facsimile representation is better.

My solution reduces the available space for the text but when you load
the buffer with \externalfigure context scales the content to the given width.

You can get the same effect with the \scale command, another way is to
change the font size for the verbatim block with 
\typefile[bodyfont=small]{filename}
or \typefile[bodyfont=8pt]{filename}.

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] Inserting verbatim text in a figure and framed.

2013-07-30 Thread john Culleton
Here is my code so far. I want to show a file in verbatim form. It
compiles but here is no frame around the text and there is no caption.

\startbuffer[ex1]
\typefile[]{example1.tex}
\stopbuffer

\placefigure[here][fig:ex1]
{Example 1}
{\externalfigure[ex1.buffer][width=.75\textwidth]}
--

I am following the example at the foot of page 303 in the manual.
Any suggestions?

John Culleton

___
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] Inserting verbatim text in a figure and framed.

2013-07-30 Thread Peter Münster
On Tue, Jul 30 2013, john Culleton wrote:

 Here is my code so far. I want to show a file in verbatim form. It
 compiles but here is no frame around the text and there is no caption.

Hi,

this works here:

--8---cut here---start-8---
\starttext
\startbuffer[ex1]
\typefile[]{test.tex}
\stopbuffer
\placefigure[here][fig:ex1]
{Example 1}
{\framed{\externalfigure[ex1.buffer][width=.75\textwidth]}}
\stoptext
--8---cut here---end---8---

ConTeXt version: 2013.05.28 00:36

-- 
   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] Inserting verbatim text in a figure and framed.

2013-07-30 Thread Wolfgang Schuster

Am 30.07.2013 um 21:30 schrieb Peter Münster pmli...@free.fr:

 On Tue, Jul 30 2013, john Culleton wrote:
 
 Here is my code so far. I want to show a file in verbatim form. It
 compiles but here is no frame around the text and there is no caption.
 
 Hi,
 
 this works here:
 
 --8---cut here---start-8---
 \starttext
 \startbuffer[ex1]
 \typefile[]{test.tex}
 \stopbuffer
 \placefigure[here][fig:ex1]
 {Example 1}
 {\framed{\externalfigure[ex1.buffer][width=.75\textwidth]}}
 \stoptext
 --8---cut here---end---8---

Why do you use a buffer?

\starttext
\startplacefigure[reference=fig:ex1,title=Example 1]
  \framed[align=flushleft,width=.75\textwidth]{\typefile{test.tex}}
\stopplacefigure
\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
___


Re: [NTG-context] Inserting verbatim text in a figure and framed.

2013-07-30 Thread Peter Münster
On Tue, Jul 30 2013, Wolfgang Schuster wrote:

 Am 30.07.2013 um 21:30 schrieb Peter Münster pmli...@free.fr:

 \startbuffer[ex1]
 \typefile[]{test.tex}
 \stopbuffer

 Why do you use a buffer?

Copy + paste ... ;)  (brain was somewhere else... ;)

-- 
   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] bug in \type?

2013-07-27 Thread Pablo Rodríguez
Dear list,

using the latest beta (it also happens with ConTeXt from TL 2013), I
don’t get the space in \type{\em #1}.

Here you have a minimal sample that shows the difference with other
verbatim commands:

\starttext
\type{\em #1}

\arg{\em #1}

\starttyping\em #1\stoptyping
\stoptext

Is this a bug in \type or am I missing something?

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
___


Re: [NTG-context] Indentation in floats

2013-06-03 Thread Wolfgang Schuster

Am 03.06.2013 um 16:59 schrieb Marco Patzer home...@lavabit.com:

 Hi,
 
 how to disable indentation inside floats without using \noindenting
 each time?
 
 \setupindenting [yes, medium]
 \starttext
 \input ward
 
 \startplacefigure
  foo\par bar
 \stopplacefigure
 
 \startplacefigure
  alpha\par beta
 \stopplacefigure
 
 \startplacefigure
  \noindenting
  a manual\par\tex{noindenting}\par works
 \stopplacefigure
 
 \input ward
 \stoptext

There is no key for \setupfloat the disable the indentation because floats are 
only
a container for other objects, e.g. figures or tables. For text objects like 
verbatim
text indentation has to be part of the object and in your case you should use a
environment which has a option for this.

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
___


Re: [NTG-context] Indentation in floats

2013-06-03 Thread Marco Patzer
On 2013–06–03 Wolfgang Schuster wrote:

  how to disable indentation inside floats without using \noindenting
  each time?
  […]

 There is no key for \setupfloat the disable the indentation because floats 
 are only
 a container for other objects, e.g. figures or tables. For text objects like 
 verbatim
 text indentation has to be part of the object and in your case you should use 
 a
 environment which has a option for this.

I use the algorithmic environment. Using

  \setupalgorithmic [before=\noindenting]

works. Maybe you can consider adding this as default, since I don't
think it ever makes sense to use indentation within this
environment.

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
___

[NTG-context] Window with scroll function

2013-05-30 Thread seasoul
Dear All,

For presenting codes, verbatim environment is suitable. But different with
documents,  it is better to present the code in one slide when making
presentation.Is it possible to make a scroll window like in many websites?

Thanks.
___
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] python parse/formatter example on the wiki

2013-05-11 Thread Wolfgang Schuster

Am 11.05.2013 um 16:22 schrieb seasoul bioseas...@gmail.com:

 I was trying the example of writing a parse/formatter under Verbatim text.
 
 The python formatter runs successfully. But when I compile the text file with 
 all the definitions included,  an error occurs.
 
 
 inserted text
 }
 to be read again
 \endgroup
 \buff_verbatim_type_block_verbatim_indeed ...ines
 \dostoptagged \csname #2\e...
 
 
 It could be implemented forcefully, but definitely not an excuse to ignore 
 this error.

You have to change the color settings from

  {\color[…]…}

to

  \color[…]{…}

because the command expects the text as argument.

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
___


Re: [NTG-context] python parse/formatter example on the wiki

2013-05-11 Thread seasoul
Yes, it is solved.



On Sun, May 12, 2013 at 12:48 AM, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:


 Am 11.05.2013 um 16:22 schrieb seasoul bioseas...@gmail.com:

  I was trying the example of writing a parse/formatter under Verbatim
 text.
 
  The python formatter runs successfully. But when I compile the text file
 with all the definitions included,  an error occurs.
 
 
  inserted text
  }
  to be read again
  \endgroup
  \buff_verbatim_type_block_verbatim_indeed ...ines
  \dostoptagged \csname #2\e...
 
 
  It could be implemented forcefully, but definitely not an excuse to
 ignore this error.

 You have to change the color settings from

   {\color[…]…}

 to

   \color[…]{…}

 because the command expects the text as argument.

 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

 ___




-- 
Yours Sincerely
Ba Te
___
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] Apparent error in wiki example

2013-02-26 Thread john Culleton
 I copied verbatim the example found here:
http://wiki.contextgarden.net/Simple_Typescript_Example

This line caused an error:
\setupencoding[default=uc]

When I commented it out the doc ran fine.


-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at http://www.booklocker.com/books/4055.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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Apparent error in wiki example

2013-02-26 Thread Philipp Gesang
Hi John!

···date: 2013-02-26, Tuesday···from: john Culleton···

  I copied verbatim the example found here:
 http://wiki.contextgarden.net/Simple_Typescript_Example
 
 This line caused an error:
 \setupencoding[default=uc]

These are instructions for MkII (and PostScript Type 1 fonts).
You are most likely running MkIV (with an Open Type version of
your font). How to write a typescript for OpenType Fonts is
explained in the manual:

  http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf

Btw. are you aware of Termes, which is an updated version of
Nimbus? It also comes bundled with and configured for Context.
Try

  \setupbodyfont[termes,10pt]
  \starttext whatever \stoptext

Regards
Philipp


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpVE24mJ_3Pb.pgp
Description: PGP 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] Apparent error in wiki example

2013-02-26 Thread john Culleton
On Tue, 26 Feb 2013 19:33:03 +0100
Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de wrote:

 Hi John!
 
 ···date: 2013-02-26, Tuesday···from: john Culleton···
 
   I copied verbatim the example found here:
  http://wiki.contextgarden.net/Simple_Typescript_Example
  
  This line caused an error:
  \setupencoding[default=uc]
 
 These are instructions for MkII (and PostScript Type 1 fonts).
 You are most likely running MkIV (with an Open Type version of
 your font). How to write a typescript for OpenType Fonts is
 explained in the manual:
 
   http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf
 
 Btw. are you aware of Termes, which is an updated version of
 Nimbus? It also comes bundled with and configured for Context.
 Try
 
   \setupbodyfont[termes,10pt]
   \starttext whatever \stoptext
 
 Regards
 Philipp
 
 


Thanks for your help. I just spotted another somewhat comic error.
The typescript for Sans calls roman fonts and the typescript for
Roman calls sans fonts. 

Sometimes even good old Homer nods
-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at http://www.booklocker.com/books/4055.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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Simple question: how do I get the filename in the footer

2013-01-22 Thread Gerben Wierda
On 20 Jan 2013, at 22:32, Aditya Mahajan wrote:

 On Sun, 20 Jan 2013, Gerben Wierda wrote:
 
 You can add the \nonknuthmode to your document which makes _ and ^ normal 
 characters for text mode.
 
 Is that limited to a {}-scope? And more importantly, that catches ^ and _, 
 but what about whitespace etc. Isn;t there a true verbatim that I can use on 
 a macro like \currentcomponent? Something along the lines of 
 \verbatimexpand{\currentcomponent}?
 
 Untested: \filename{\currentcomponent}

Works. When outside a component (e.g. index) it defaults to the string 'text'.

Thanks,

G

 
 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] Simple question: how do I get the filename in the footer

2013-01-20 Thread Gerben Wierda
On 20 Jan 2013, at 18:34, Wolfgang Schuster wrote:

 
 Am 20.01.2013 um 18:06 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 On 20 Jan 2013, at 16:09, Philipp Gesang wrote:
 
 ···date: 2013-01-20, Sunday···from: Gerben Wierda···
 
 On 20 Jan 2013, at 12:57, Philipp Gesang wrote:
 
 Hi Gerben,
 
 ···date: 2013-01-20, Sunday···from: Gerben Wierda···
 
 how do I get the filename (full path not needed) in the footer
 of my document? I want it there while writing the book and remove
 it in the final stages. I am using MKII (TeXLive 2011 still)
 
 if the name of the main file suffices, then the TeX command
 \jobname is what you are looking for.
 
 Thanks but that is not the one. Because I use the standard project setup, 
 and the job is always to typeset the file prd_book.tex, but I want the 
 chapter file names (e.g. chapter1.tex) in the footer.
 
 So, prd_book contains:
 
 \startbodymatter
 \component chapter1
 \component chapter2
 \component chapter3
 \stopbodymatter
 
 And I want chapter1.tex (maybe full path) in the footer.
 
 If the component identifier matches the file name (e.g. if you
 use the asterisk instead of a name), you can use
 \currentcomponent. So the main file foo.tex would look like:
 
  \setuppagenumbering[location=]
  %% footer:main file-component file
  \setupfootertexts[pagenumber][{\jobname-\currentcomponent}]
  \startproduct *
\input ward \page
\component bar
  \stopproduct
 
 And bar.tex:
 
  \startcomponent *
\input knuth \page
  \stopcomponent
 
 Hi Philipp,
 
 that runs into the problem that the file name might contain characters that 
 TeX does not like, e.g. underscore. Is there a command to catch that?
 
 You can add the \nonknuthmode to your document which makes _ and ^ normal 
 characters for text mode.

Is that limited to a {}-scope? And more importantly, that catches ^ and _, but 
what about whitespace etc. Isn;t there a true verbatim that I can use on a 
macro like \currentcomponent? Something along the lines of 
\verbatimexpand{\currentcomponent}?

G

 
 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
___


Re: [NTG-context] Simple question: how do I get the filename in the footer

2013-01-20 Thread Aditya Mahajan

On Sun, 20 Jan 2013, Gerben Wierda wrote:


You can add the \nonknuthmode to your document which makes _ and ^ normal 
characters for text mode.


Is that limited to a {}-scope? And more importantly, that catches ^ and 
_, but what about whitespace etc. Isn;t there a true verbatim that I can 
use on a macro like \currentcomponent? Something along the lines of 
\verbatimexpand{\currentcomponent}?


Untested: \filename{\currentcomponent}

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
___


Re: [NTG-context] verbatim boxes

2012-11-26 Thread Wolfgang Schuster

Am 26.11.2012 um 21:42 schrieb Erik Margraf erik.marg...@gmail.com:

 Dear List,
 
 is there a Context function/macro which enables me to set
 a box with verbatim file input. I.e. something
 similar to :
 
 \setbox\scratchbox\hbox{\verbatimfileinput{FileName}}


You have to use a \vbox because a \hbox would put everything in a single line.

The important question is why do you want to store the text in a box.

When you plan to frame the text something like this can be used:

\definetyping
  [framedfile]
  [file]
  [before={\startframedtext[width=max]},
after=\stopframedtext]

\starttext
\typefile[framedfile]{knuth.tex}
\stoptext

To store text and reuse it buffers are the best tool:

\startbuffer[ward]
The Earth, as a habitat for animal life, is in old age and
has a fatal illness. Several, in fact. It would be happening
whether humans had ever evolved or not. But our presence is
like the effect of an old-age patient who smokes many packs
of cigarettes per day – and we humans are the cigarettes.
\stopbuffer

\starttext

\typebuffer[ward]

\getbuffer[ward]

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


Re: [NTG-context] verbatim boxes

2012-11-26 Thread Wolfgang Schuster

Am 26.11.2012 um 23:06 schrieb Erik Margraf erik.marg...@gmail.com:

 I thought a box would be the best to use it in connection with the
 FunnyFrame of the Metafun manual page 137. In particular
 I wanted to set the the Frametitle with the contents of a file.
 (The actual contents of the file should be short enough to fit
 in the title frame) Actually the definition of FrameTitle uses a \hbox …

It puts the “title” (in the example Zapf (…)”) in the box and not the text.

The text itself for the frame is put in a framedtext environment.

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] typefile with absolute path to file

2012-11-20 Thread Erik Margraf
Dear List,

a question about \typefile{}.
I tried to use \typefile{ /with/an/absolute/path/to/some_file }  and failed
Message in the log: Verbatim some_file not found. Also tried with
no path at all, assuming it will take the file from the current directory.
Same result.

Do I miss something? Should this work? Or, if not, how can I achieve
this effect (typefile
with absolute path to a file. btw. on a Linux system)

I'm aware of a similar message thread to this list from May 25th, this year.
But I didn't feel that it speaks against my comprehension of \typefile ...

Thanks!

Erik
___
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] typefile with absolute path to file

2012-11-20 Thread Aditya Mahajan



Dear List,

a question about \typefile{}.
I tried to use \typefile{ /with/an/absolute/path/to/some_file }  and failed
Message in the log: Verbatim some_file not found. Also tried with
no path at all, assuming it will take the file from the current directory.
Same result.

Do I miss something? Should this work? Or, if not, how can I achieve
this effect (typefile
with absolute path to a file. btw. on a Linux system)


\starttext
\typefile{\jobname.tex}
\typefile{/tmp/test.tex}
\stoptext

work with ConTeXt MkIV  2012.11.16.

However, I can confirm that

\typefile{/usr/bin/pdf2ps} does not work with context minimals on 
archlinux, although the texmfcnf.lua file says:


[system.outputmode]= restricted,
[system.inputmode] = any,

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
___


Re: [NTG-context] typefile with absolute path to file

2012-11-20 Thread Erik Margraf
Hi,

Thanks Aditya!

I tried this again with

\starttext
   \typefile{/tmp/xxx.tex}
\stoptext

and could trace what's going on ... (not even /tmp/xxx.tex worked)

The lines below is the trace output belonging to /tmp/xxx

stat(tmp/xxx.tex, 0x7fff5dc73d90) = -1 ENOENT (No such file or directory)
stat(../tmp/xxx.tex, 0x7fff5dc73d90)  = -1 ENOENT (No such file or directory)
stat(../../tmp/xxx.tex, 0x7fff5dc73d90) = -1 ENOENT (No such file or
directory)
stat(tmp/xxx.tex.tex, 0x7fff5dc73d90) = -1 ENOENT (No such file or directory)
stat(../tmp/xxx.tex.tex, 0x7fff5dc73d90) = -1 ENOENT (No such file
or directory)
stat(../../tmp/xxx.tex.tex, 0x7fff5dc73d90) = -1 ENOENT (No such
file or directory)

I could verify that tmp/xxx.tex is actually found!
current version: 2012.11.16 23:51
Anything I can do about that?  (I guess I can work with relative paths
below - tested this ...)

Context Version: current version: 2012.11.16 23:51
System: Debian 3.2.32-1 x86_64 GNU/Linux

regards
Erik

On Tue, Nov 20, 2012 at 4:25 PM, Aditya Mahajan adit...@umich.edu wrote:

 Dear List,

 a question about \typefile{}.
 I tried to use \typefile{ /with/an/absolute/path/to/some_file }  and
 failed
 Message in the log: Verbatim some_file not found. Also tried with
 no path at all, assuming it will take the file from the current directory.
 Same result.

 Do I miss something? Should this work? Or, if not, how can I achieve
 this effect (typefile
 with absolute path to a file. btw. on a Linux system)


 \starttext
 \typefile{\jobname.tex}
 \typefile{/tmp/test.tex}
 \stoptext

 work with ConTeXt MkIV  2012.11.16.

 However, I can confirm that

 \typefile{/usr/bin/pdf2ps} does not work with context minimals on archlinux,
 although the texmfcnf.lua file says:

 [system.outputmode]= restricted,
 [system.inputmode] = any,

 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] New module: crossref

2012-11-04 Thread Wolfgang Schuster

Am 02.11.2012 um 00:28 schrieb Zenlima p...@zenlima.eu:

 @Philipp
 I like to put into a public vcs like github. I think it should be
 something general for all modules (maybe a github like installation on
 contextgarden?

There was discussion about this in a small group but we never came
to a conclusion because everyone has it’s own habits how to organize
module files and where to store it, e.g. a few people use github, others
use bitbucket etc.

 @Philipp and Wolfgang
 Is there any quick to understand doc for s-mod?

All normal code and also normal comments (lines beginning with %)
are printed as normal verbatim code.

When you want examples and text to explain it just add “%D” at the
begin of each line. When you need a module (even the module you’re
documenting) or other definitions add “%M” at the begin of the line.
For comments and other texts (e.g. the license text) which shouldn’t
appear in the output use “%C” at the begin of the line.

You can use nearly any command for the documentation as you do
in a regular document.

You can find a example for a documented module below.

 @Wolfgang
 I did not understood your helpers example. Maybe you can show me a
 point where it would make sense in this crossref module?


Take a look at the MkII and MkIV version of my fancybreak module

MkII: http://bit.ly/YErXvF
MkIV: http://bit.ly/WmtlWf

One difference in both modules are the names for the macros but this
of no importance for now. The big difference between both is that I have
to create the \definefancybreak, \setupfancybreak and \fancybreakparameter
commands for MkII myself while in MkIV the \installcommandhandler
creates all three commands with a single line of code. This command
in MkIV is one of the helpers I mean.

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
___


Re: [NTG-context] verbatim text: \type, \tex and co.

2012-09-28 Thread Hans Hagen

On 27-9-2012 22:49, Alan Braslau wrote:

Hello,

Can someone indicate how to typeset
$L_{α+β}$
as verbatim text?
(\arg{} doesn't help here...)

Furthermore, I suppose that typesetting Greek characters verbatim
depends also upon which \tt font is being used.


\setupbodyfont[dejavu]

\starttext

\starttyping
$L_{α+β}$
\stoptyping

\stoptext

-
  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] verbatim text: \type, \tex and co.

2012-09-28 Thread Alan BRASLAU
On Fri, 28 Sep 2012 10:43:48 +0200
Hans Hagen pra...@wxs.nl wrote:

 On 27-9-2012 22:49, Alan Braslau wrote:
  Hello,
 
  Can someone indicate how to typeset
  $L_{α+β}$
  as verbatim text?
  (\arg{} doesn't help here...)
 
  Furthermore, I suppose that typesetting Greek characters verbatim
  depends also upon which \tt font is being used.  
 
 \setupbodyfont[dejavu]
 
 \starttext
 
 \starttyping
 $L_{α+β}$
 \stoptyping
 
 \stoptext

Also, \type{$L_{α+β}$}

I thought that I saw that somewhere before! :)

Alan
___
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] verbatim text: \type, \tex and co.

2012-09-27 Thread Alan Braslau
Hello,

Can someone indicate how to typeset
$L_{α+β}$
as verbatim text?
(\arg{} doesn't help here...)

Furthermore, I suppose that typesetting Greek characters verbatim
depends also upon which \tt font is being used.

Alan
___
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] verbatim text: \type, \tex and co.

2012-09-27 Thread Aditya Mahajan

Can someone indicate how to typeset
$L_{α+β}$
as verbatim text?
(\arg{} doesn't help here...)


Untested:

\type{...} should work. (Definitely did work a couple of months ago).


Furthermore, I suppose that typesetting Greek characters verbatim
depends also upon which \tt font is being used.


CM Unicode has a good coverage of greek characters in typewriter font.

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
___

[NTG-context] Wiki example compilation failure

2012-09-03 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

maybe the known problem with the wiki and the current Ctx versions.

The following code:


\setuppapersize[A5]

\starttext
\definedelimitedtext[mydt]
\setupdelimitedtext[mydt][left=\leftguillemot,right=\rightguillemot]

\quotation{Clancy of the Overflow}, by Banjo Paterson

\startmydt
  And an answer came directed in a manner unexpected, and I
  think the same was written with a thumbnail dipped in tar;
  't was his shearing-mate who wrote it, and verbatim I will quote it:
  \quotation{Clancy's gone to Queensland droving, and we don't know where he 
are.}
\stopmydt
\stoptext


is successfully compiled by the current Ctx version whilst the same example on 
http://wiki.contextgarden.net/Command/setupdelimitedtext is not.

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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 write two or three single hyphens?

2012-05-31 Thread Wolfgang Schuster

Am 31.05.2012 um 11:16 schrieb Jan Pohanka:

 Hello,
 
 describing linux file permissions I would like to write rwx--
 As I expected the hyphens are converted to two long dashes (excuse me if I 
 missed the correct name), so I tried something like this 
 rwx{-}{-}{-}{-}{-}{-} or rwx{}-{}-{}-{}-{}-{}- which works in latex, but in 
 context I'm still getting the long dashes. How can I prevent this conversion, 
 please?

\definehighlight[filepermission][style=\setff{none}]

\starttext

Verbatim: \type{rwx--}

Highlight: \filepermission{rwx--}

\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 and ligatures

2012-05-31 Thread Wolfgang Schuster
Hi,

are ligatures etc. supposed to be active in verbatim commands? In the default 
\type command they are only disabled because \tt has “features=none” in the 
typescripts but since this isn’t the case for serif and sans you get ligatures.

\definetype[test][style=\rm]

\starttext
\type{fi -- ---}
\test{fi -- ---}
\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
___


Re: [NTG-context] \definetype and ligatures

2012-05-31 Thread Hans Hagen

On 31-5-2012 11:41, Wolfgang Schuster wrote:

Hi,

are ligatures etc. supposed to be active in verbatim commands? In the default 
\type command they are only disabled because \tt has “features=none” in the 
typescripts but since this isn’t the case for serif and sans you get ligatures.

\definetype[test][style=\rm]

\starttext
\type{fi -- ---}
\test{fi -- ---}
\stoptext


one could disable features with the style key (or maybe at some point we 
can have an extra key for that



-
  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] \definetype and ligatures

2012-05-31 Thread Wolfgang Schuster

Am 31.05.2012 um 12:38 schrieb Hans Hagen:

 On 31-5-2012 11:41, Wolfgang Schuster wrote:
 Hi,
 
 are ligatures etc. supposed to be active in verbatim commands? In the 
 default \type command they are only disabled because \tt has “features=none” 
 in the typescripts but since this isn’t the case for serif and sans you get 
 ligatures.
 
 \definetype[test][style=\rm]
 
 \starttext
 \type{fi -- ---}
 \test{fi -- ---}
 \stoptext
 
 one could disable features with the style key (or maybe at some point we can 
 have an extra key for that

How about a “features” key which is passed to \setfontfeature?

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] \xmlcontext inoperative?

2012-05-09 Thread Meer, H. van der
Loaded xml with: xmlinclude{problem}{include}{file}

Then called up parts of its contents through a setup:
\startxmlsetups xam:define:get
% The definition is the one with content.
\xmldoiftext{#1}{.}{
  \foundtrue
  \xmlflush{#1}
  \xmlcontext{#1}{.}
}
\stopxmlsetups

The strange thing is that the \xmlflush typesets verbatim the contents of the 
node called up:

math version=2.0 xmlns=http://www.w3c.org/mathml; apply eq/ ci f(x) 
/ci apply plus/ ci 1 /ci apply power/ ci x /ci ci 4 /ci 
/apply apply power/ ci x /ci ci 7 /ci /apply /apply /apply 
/math

but, to my surprise the \xmlcontext{#1}{.} lets it disappear completely. So 
does \xmlflushcontext{#1}. In other parts of the program \xmlcontext does what 
it should do, thus the mkvi format seems ok.

What could have happened? Some detrimental effect of the \xmlinclude?

Hans van der Meer



___
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] \xmlcontext inoperative?

2012-05-09 Thread Meer, H. van der
By accident I found something that seems to work.
With \xmlregistereddocumentsetups{#1}{#1} put before the \xmlflush{#1} ConTeXt 
processing resumes on the node.
What I do not understand however, is why \xmlcontext does not work in general.
Is it possible to have the \xmlregistereddocumentsetups action put in somewhere 
or in such a way that \xmlflush and friends always succeed? I did not 
understand enough of the code to fully grasp what is is is not happening.

On 9 mei 2012, at 14:53, Meer, H. van der wrote:

Loaded xml with: xmlinclude{problem}{include}{file}

Then called up parts of its contents through a setup:
\startxmlsetups xam:define:get
% The definition is the one with content.
\xmldoiftext{#1}{.}{
  \foundtrue
  \xmlflush{#1}
  \xmlcontext{#1}{.}
}
\stopxmlsetups

The strange thing is that the \xmlflush typesets verbatim the contents of the 
node called up:

math version=2.0 xmlns=http://www.w3c.org/mathml; apply eq/ ci f(x) 
/ci apply plus/ ci 1 /ci apply power/ ci x /ci ci 4 /ci 
/apply apply power/ ci x /ci ci 7 /ci /apply /apply /apply 
/math

but, to my surprise the \xmlcontext{#1}{.} lets it disappear completely. So 
does \xmlflushcontext{#1}. In other parts of the program \xmlcontext does what 
it should do, thus the mkvi format seems ok.

What could have happened? Some detrimental effect of the \xmlinclude?

Hans van der Meer
___
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] \xmlcontext inoperative?

2012-05-09 Thread Hans Hagen

On 9-5-2012 14:53, Meer, H. van der wrote:

Loaded xml with: xmlinclude{problem}{include}{file}

Then called up parts of its contents through a setup:
\startxmlsetups xam:define:get
% The definition is the one with content.
\xmldoiftext{#1}{.}{
   \foundtrue
   \xmlflush{#1}
   \xmlcontext{#1}{.}
}
\stopxmlsetups

The strange thing is that the \xmlflush typesets verbatim the contents of the 
node called up:

math version=2.0 xmlns=http://www.w3c.org/mathml;  apply  eq/  ci  f(x)/ci  apply  plus/  ci  1/ci  apply  power/  ci  x/ci  
ci  4/ci  /apply  apply  power/  ci  x/ci  ci  7/ci  /apply  /apply  /apply  /math

but, to my surprise the \xmlcontext{#1}{.} lets it disappear completely. So 
does \xmlflushcontext{#1}. In other parts of the program \xmlcontext does what 
it should do, thus the mkvi format seems ok.

What could have happened? Some detrimental effect of the \xmlinclude?


there is (if i remember right) an issue with the root node of an include 
that I need to look into (but not now as I need to be careful with 
compatibility)



-
  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] Buffers vs. \def

2012-04-18 Thread Hans Hagen

On 18-4-2012 11:48, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

a question - I'm just curious:

What is advantage (or maybe intension) of using buffers over \def?


better test with

\startlines
test
test
\stoplines

also, bufferes can be flushed verbatim, as tex, as ... while macros are 
sort of frozen.


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] Rotating externalfigure

2012-03-29 Thread Malte Stien
Wolfgang,

Interesting. I was able to reproduce the problem with your verbatim minimal 
example:

  \starttext
  \input knuth
  \placefigure[left]{Cow}{\externalfigure[cow][frame=on, scale=500, 
orientation=90]} \input knuth
  \input knuth
  \stoptext

I have uploaded the result here:

  http://www.sendspace.com/file/rmbsrj

The cow gets rotated but protrudes the frame at the top overlaying the text. 
Just in case it is relevant, here is my context version:

  ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2011.12.6  int: english/english

Thank you for looking into this.
Regards,
Malte.


On 29/03/2012, at 19:51, ntg-context-requ...@ntg.nl wrote:

 Send ntg-context mailing list submissions to
   ntg-context@ntg.nl
 
 To subscribe or unsubscribe via the World Wide Web, visit
   http://www.ntg.nl/mailman/listinfo/ntg-context
 or, via email, send a message with subject or body 'help' to
   ntg-context-requ...@ntg.nl
 
 You can reach the person managing the list at
   ntg-context-ow...@ntg.nl
 
 When replying, please edit your Subject line so it is more specific
 than Re: Contents of ntg-context digest...
 
 
 Today's Topics:
 
   1. Re: Rotating externalfigure (Wolfgang Schuster)
   2. Removing the quotes from the results of the referencelinks
  (Jaroslav Hajtmar)
   3. Re: Removing the quotes from the results of the  reference
  links (Wolfgang Schuster)
   4. Re: Removing the quotes from the results of the reference
  links (Alan BRASLAU)
   5. Re: Removing the quotes from the results of the  reference
  links (Steffen Wolfrum)
   6. Re: Removing the quotes from the results of the reference
  links (Hans Hagen)
   7. Re: Removing the quotes from the results of the reference
  links (Mojca Miklavec)
   8. Re: Removing the quotes from the results of the reference
  links (Hans Hagen)
 
 
 --
 
 Message: 1
 Date: Thu, 29 Mar 2012 08:37:03 +0200
 From: Wolfgang Schuster schuster.wolfg...@googlemail.com
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Rotating externalfigure
 Message-ID: 5b98fda3-dd52-47ab-8e5c-ce2b8dca2...@googlemail.com
 Content-Type: text/plain; charset=windows-1252
 
 
 Am 29.03.2012 um 01:07 schrieb Malte Stien:
 
 Hi all,
 
 I am trying to rotate a figure on a page. I believe it should work as 
 follows:
 
 \placefigure[left]{Some figure 
 caption}{\externalfigure[some-figure-caption][orientation=90]}
 
 ...and the figure does indeed get rotated, but the bounding box appears to 
 be incorrect. The figure ends up being far too small and actually overlays 
 the text above it. I found a couple of posts on the mailing list from years 
 ago regarding this, where people seemed to have related issues.
 
 Is there a solution to this? Should this work or am I doing something wrong? 
 I could rotate the figure in the source application, but that is not ideal.
 
 Do you have a example because I can?t reproduce it with this example.
 
 \starttext
 
 \input knuth
 
 \placefigure[left]{Cow}{\externalfigure[cow][frame=on,scale=500,orientation=90]}
  \input knuth
 
 \input knuth
 
 \stoptext
 
 Wolfgang
 
 --
 
 Message: 2
 Date: Thu, 29 Mar 2012 08:50:06 +0200
 From: Jaroslav Hajtmar hajt...@gyza.cz
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: [NTG-context] Removing the quotes from the results of the
   reference   links
 Message-ID: 4f74061e.7000...@gyza.cz
 Content-Type: text/plain; charset=ISO-8859-2; format=flowed
 
 Hello all,
 I can not find a way to remove the quotes from the results of the 
 reference link
 Can someone help?
 
 Thanx
 Jaroslav Hajtmar
 
 Here is minimal example:
 
 
 \starttext
 
 \section[first]{First}
 
 \subsection[second]{Second}
 
 \input tufte
 
 \in{(see section}{ \about[second] at page \at[second])}[second].
 
 
 \stoptext
 
 
 
 
 
 --
 
 Message: 3
 Date: Thu, 29 Mar 2012 08:55:17 +0200
 From: Wolfgang Schuster schuster.wolfg...@googlemail.com
 To: hajt...@gyza.cz, mailing list for ConTeXt users
   ntg-context@ntg.nl
 Subject: Re: [NTG-context] Removing the quotes from the results of the
   reference links
 Message-ID: 6fe579fe-6e5b-457e-b311-495fd89f5...@googlemail.com
 Content-Type: text/plain; charset=us-ascii
 
 
 Am 29.03.2012 um 08:50 schrieb Jaroslav Hajtmar:
 
 Hello all,
 I can not find a way to remove the quotes from the results of the reference 
 link
 Can someone help?
 
 Use \getreference[title][second] to print the title of the heading.
 
 Wolfgang
 
 --
 
 Message: 4
 Date: Thu, 29 Mar 2012 09:11:34 +0200
 From: Alan BRASLAU alan.bras...@cea.fr
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Removing the quotes from the results of the
   reference links
 Message-ID: 20120329091134.66da5...@sole.extra.cea.fr
 Content-Type: text/plain; charset=US-ASCII

Re: [NTG-context] Rotating externalfigure

2012-03-29 Thread Hans Hagen

On 29-3-2012 12:31, Malte Stien wrote:

Wolfgang,

Interesting. I was able to reproduce the problem with your verbatim minimal 
example:

   \starttext
   \input knuth
   \placefigure[left]{Cow}{\externalfigure[cow][frame=on, scale=500, 
orientation=90]} \input knuth
   \input knuth
   \stoptext

I have uploaded the result here:

   http://www.sendspace.com/file/rmbsrj

The cow gets rotated but protrudes the frame at the top overlaying the text. 
Just in case it is relevant, here is my context version:

   ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2011.12.6  int: english/english


given that mkiv is under development, that's a bit old version

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] xml--verbatim in error?

2012-03-21 Thread Meer, H. van der
I found something that might be an error in the current xml-processing. 
In the following minimal example een Undefined control sequence error occurs 
for the \xmldisplayverbatim and \xmlinlineverbatims. The \xmlverbatim doesn't.

\startxmldisplayverbatim ...\doinitializeverbatim 
  \beginofverbatimlines 

\startbuffer[test-1]
?xml version=1.0 encoding=UTF-8?
myroot
  textbuffer[test-1] contents/text
/myroot
\stopbuffer

\startxmlsetups load:setups
  \xmlsetsetup{\xmldocument}{myroot|text}{load:*}
\stopxmlsetups\xmlregistersetup{load:setups}

\startxmlsetups load:myroot
  \writestatus{TEST}{loading myroot node = #1 = \xmlname{#1}}
%  \xmlverbatim{#1}{text}\par
  \xmldisplayverbatim{#1}{text}\par
%  \xmlinlineverbatim{#1}{text}\par
\stopxmlsetups

\startxmlsetups load:text
\writestatus{TEST}{node = #1 = \xmlname{#1}}
\xmlflush{#1}
\stopxmlsetups

\enabletrackers[lxml.loading]
\setuppapersize[S5][S5]
\starttext
\xmlprocessbuffer{myroot}{test-1}{}
\stoptext


Hans van der Meer



___
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] [beta] background behaviour

2012-02-09 Thread Philipp Gesang
Hi,

in yesterday’s Context, text backgrounds between floats cover the
highlighted text (text is still there, but behind the color
layer). In the below example, removing any of the floats has
different consequences:

·

\definetextbackground[verbatim] [
  background=color,
  backgroundcolor=green,
  location=paragraph,
]

\starttext

\placefigure[2*hang,left]{}{test} %%% comment me
\input knuth

\starttextbackground[verbatim]
foo bar
\stoptextbackground

\placefigure[here]{}{test} %%% comment me

\stoptext

·

(There appear to be further issues with text backgrounds but I
had a hard time getting a lock on this one already ...)

Regards
Philipp



pgp65gpUTEjH1.pgp
Description: PGP 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] Syntax highlighting for C-code

2012-01-15 Thread Wolfgang Schuster

Am 13.01.2012 um 12:00 schrieb Richard Weickelt:

 Hi,
 
 I've tried to include some C-code into my document, but failed to enable 
 syntax highlighting.
 
 Tested on: linux-64, context-2011.05.18 (same with the beta) stand-alone mkIV
 
 1) \starttyping[option=C] just prints verbatim text. There seems to be no 
 formatter for C out of the box.

There is no formatter for C code in MkIV but when you write one send the file 
to Hans and he can include it in the distribution.

 2) t-vim did not work. It failed somewhere (unknown command sequence 
 \installspacehandler) on loading (\usemodule[vim])
 
 3) http://wiki.contextgarden.net/Verbatim_text
 I tried to download pret-c and put it into the modules folder, but writing 
 \installprettytype[C][C] failed, because it's not known (in mkIV).

MkII and MkIV have different implementation to format source code.

 4) mkII does not complain to exec \installprettytype[C][C], but this does not 
 change anything either. \starttyping[option=C] seems to call a (maybe 
 builtin?) formatter, but I could not get colors to work.


The following is MkII only. There are two ways to have formatted C code, the 
first is to define a C environment with \definetype[C][option=C] and then you 
can put the code between \startC and \stopC, the second is to use the normal 
typing environment and pass “option=C” as argument. To get colors in your code 
you have to enable them first with \setupcolors[state=start].

% engine=pdftex

\setupcolors[state=start]

\definetyping[C][option=C]

\starttext

\startC
#includestdio.h
 
int main()
{
   printf(Hello World\n);
   return 0;
}
\stopC

\blank[2*line]

\starttyping[option=C]
#includestdio.h
 
int main()
{
   printf(Hello World\n);
   return 0;
}
\stoptyping

\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] Syntax highlighting for C-code

2012-01-14 Thread Richard Weickelt

Hi,

I've tried to include some C-code into my document, but failed to enable 
syntax highlighting.


Tested on: linux-64, context-2011.05.18 (same with the beta) stand-alone mkIV

1) \starttyping[option=C] just prints verbatim text. There seems to be no 
formatter for C out of the box.


2) t-vim did not work. It failed somewhere (unknown command sequence 
\installspacehandler) on loading (\usemodule[vim])


3) http://wiki.contextgarden.net/Verbatim_text
I tried to download pret-c and put it into the modules folder, but writing 
\installprettytype[C][C] failed, because it's not known (in mkIV).


4) mkII does not complain to exec \installprettytype[C][C], but this does 
not change anything either. \starttyping[option=C] seems to call a (maybe 
builtin?) formatter, but I could not get colors to work.


I'm also lost in the documentation, because there are many places talking 
about syntax-highlighting. Does this thing work for anybody or is ist just 
my installation?


Thanks
Richard
___
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] processing style inside verbatim in XML

2011-10-24 Thread Hans Hagen

On 21-10-2011 22:18, Mojca Miklavec wrote:

Hello,

Is there any simple way to typeset the following example properly in ConTeXt?

I have an example of text that has to obey lines and spaces, but I
would like to apply some color to make it more readable. The
attachment contains an example of HTML which displays fine in my
browser, and it should look similar with ConTeXt.

I have problems with literal typesetting ofspan class=...  (that
should have applied style instead), but maybe I only have wrong
settings in my parser.

When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I
cannot color the numbers. When I use, according to Wolfgang's
suggestion,

\startxmlsetups pre
\setuplines[style=mono,space=yes]
\startlines
\xmlflush{#1}
\stoplines
\stopxmlsetups

then all the spaces are eaten up by XML parser (or somewhere else), so
that I don't get the desired result. Any ideas about this?

I'm also sending a self-contained example with \setuplines which
doesn't really work in the desired way.


The next beta will provide two extra flushers. The following patch to 
your example seems to work ok then.


\startxmlsetups all:html
\xmlsetsetup{main}{head|h1|pre|span}{*}
\stopxmlsetups

\xmlmapval{span}{n}{\bf\red}

\startxmlsetups span
\start
\xmlval{span}{\xmlatt{#1}{class}}{}
\xmlflush{#1}
\stop
\stopxmlsetups

\startxmlsetups pre
\start \tttf
   %\xmlflush{#1}
   %\xmlflushlinewise{#1}
\xmlflushspacewise{#1}
\stop
\stopxmlsetups

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] processing style inside verbatim in XML

2011-10-21 Thread Mojca Miklavec
Hello,

Is there any simple way to typeset the following example properly in ConTeXt?

I have an example of text that has to obey lines and spaces, but I
would like to apply some color to make it more readable. The
attachment contains an example of HTML which displays fine in my
browser, and it should look similar with ConTeXt.

I have problems with literal typesetting of span class=... (that
should have applied style instead), but maybe I only have wrong
settings in my parser.

When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I
cannot color the numbers. When I use, according to Wolfgang's
suggestion,

\startxmlsetups pre
\setuplines[style=mono,space=yes]
\startlines
\xmlflush{#1}
\stoplines
\stopxmlsetups

then all the spaces are eaten up by XML parser (or somewhere else), so
that I don't get the desired result. Any ideas about this?

I'm also sending a self-contained example with \setuplines which
doesn't really work in the desired way.

Thank you very much,
Mojca








. h y p h e n a t i o n .
-
   1n a
   1t i o
 2i o
h e2n
h e n5a t
h e n a4
  h y3p h
n2a t
o2n
-
. h y3p h e2n5a4t2i o2n.





hyp.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] Exporting verbatim text

2011-10-15 Thread Hans Hagen

On 15-10-2011 05:29, Aditya Mahajan wrote:

Hi,

In the vim module, I use vim to generate TeX code that looks roughly as

~~~
\SYN[Type]{public} \SYN[Type]{static} \SYN[Type]{void}
main\SYN[javaParen]{(}String args\SYN[javaParen]{)} \{
System.out.println\SYN[javaParen]{(}\SYN[Constant]{Hello
World}\SYN[javaParen]{)} ;
\}
~~~

When generating pdf output, I simply set appropriate catcodes so that
the line breaks and leading white spaces are significant. However, when
exporting to xml, leading white space is ignored while line break is
translated to break/. How can I export in such a way that leading
white spaces are preserved (and ideally no break/ is generated, but I
can deal with that using CSS).


brrr .. catcodes ... can't you wrap lines in a macro and tag spaces too? 
in principle you should be able to use some of of the regular typing 
wrapping code for that but anything other than catcoded characters will 
do (also, keep in mind that people might want to pass the generated code 
around as arguments in which case catcodes can create a mess


\setupbackend[export=yes]

\starttext

\startlines
\zwnj \char32\char32\char32 test \char32 test test
\zwnj \char32\char32 test \char32 test test
\zwnj \char32 test \char32 test test
test \char32 test test
\stoplines

\stoptext



-
  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] Exporting verbatim text

2011-10-15 Thread Aditya Mahajan

On Sat, 15 Oct 2011, Hans Hagen wrote:


On 15-10-2011 05:29, Aditya Mahajan wrote:

Hi,

In the vim module, I use vim to generate TeX code that looks roughly as

~~~
\SYN[Type]{public} \SYN[Type]{static} \SYN[Type]{void}
main\SYN[javaParen]{(}String args\SYN[javaParen]{)} \{
System.out.println\SYN[javaParen]{(}\SYN[Constant]{Hello
World}\SYN[javaParen]{)} ;
\}
~~~

When generating pdf output, I simply set appropriate catcodes so that
the line breaks and leading white spaces are significant. However, when
exporting to xml, leading white space is ignored while line break is
translated to break/. How can I export in such a way that leading
white spaces are preserved (and ideally no break/ is generated, but I
can deal with that using CSS).


brrr .. catcodes ... can't you wrap lines in a macro and tag spaces too?


I can, but I went out of the way to ensure that I do not have to do that. 
I dislike formatters that add macros for newlines and spaces:


http://randomdeterminism.wordpress.com/2011/06/06/clean-tex-output/

in principle you should be able to use some of of the regular typing 
wrapping code for that but anything other than catcoded characters will 
do (also, keep in mind that people might want to pass the generated code 
around as arguments in which case catcodes can create a mess


Agreed. But this is for syntax highlighting, so I have to mess with 
catcodes anyways. My code wail fail if it is passed as an argument to some 
other macro, but so does \starttyping ... \stoptyping. (Maybe I will 
provice a \process...buffer to take care of that).



\setupbackend[export=yes]

\starttext

\startlines
\zwnj \char32\char32\char32 test \char32 test test
\zwnj \char32\char32 test \char32 test test
\zwnj \char32 test \char32 test test
test \char32 test test
\stoplines

\stoptext


I really do not want to produce such output. I'll see if I can abuse the 
visualizer code and create a null grammer that just adds new line and 
space tags.


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
___


[NTG-context] Exporting verbatim text

2011-10-14 Thread Aditya Mahajan

Hi,

In the vim module, I use vim to generate TeX code that looks roughly as

~~~
  \SYN[Type]{public} \SYN[Type]{static} \SYN[Type]{void} 
main\SYN[javaParen]{(}String args\SYN[javaParen]{)} \{
System.out.println\SYN[javaParen]{(}\SYN[Constant]{Hello 
World}\SYN[javaParen]{)} ;

  \}
~~~

When generating pdf output, I simply set appropriate catcodes so that
the line breaks and leading white spaces are significant. However, when 
exporting to xml, leading white space is ignored while line break is 
translated to break/. How can I export in such a way that leading white 
spaces are preserved (and ideally no break/ is generated, but I can deal 
with that using CSS).


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
___


[NTG-context] Blank lines inside verbatim environment

2011-09-28 Thread Jaroslav Hajtmar

Hello ConTEXist.

I know that this probably is no reason, but can be in an environment 
\starttyping ... \stoptyping turn on, which will each blank line in the 
statement reflect? I want put in the presentation in this environment, a 
direct numbers of blank lines. The larger number of empty lines is 
replaced by a single blank line (for obvious reasons). I tried to 
experiment with the settings \setuptyping, but without success.


Thanx Jaroslav Hajtmar



Here is my minimal example :

\definetyping[mytyping][color=blue, style=type, option=, blank=line, 
space=fixed]%


\starttext

\startmytyping
1. line
2. line



5. line

7. line




12. line
\stopmytyping

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


[NTG-context] colon in lucida math

2011-09-25 Thread Meer, H. van der
I get the impression there is something wrong with typesetting math with the 
lucida setup in ConTeXt. I find that the \colon is not printed. Below is a 
minimal example. See the colon in the first formula that is absent in the 
second.

Perhaps someone is willing to check if this is ConTeXt in general or my own 
setup in particular. In both cases I will be pleased with a remedy.

Hans van der Meer

\setuppapersize [A6][A6]
\starttext
\start
\setupbodyfont[lmodern]
Using: \verbatim{\setupbodyfont[lmodern]}\par
$K\colon\quad A\cdots Z$\par
\stop
\start
\setupbodyfont[lucida]
Using: \verbatim{\setupbodyfont[lucida]}\par
$K\colon\quad A\cdots Z$\par
\stop
\stoptext



test.pdf
Description: test.pdf
___
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] Verbatim in framed text

2011-09-22 Thread Felix Ingram
 -- Forwarded message --
 From: Wolfgang Schuster schuster.wolfg...@googlemail.com
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Date: Wed, 21 Sep 2011 13:09:42 +0200
 Subject: Re: [NTG-context] Verbatim in framed text

 Am 20.09.2011 um 17:50 schrieb Felix Ingram:

 Some of my verbatim lines are overflowing the framed text box I'm
 putting them in. I see that I could define a pretty printer to handle
 this but I came up with the following:


 \starttext
 \startframedtext[middle][width=.8\textwidth]
 \startframedtext[left][frame=off, width=.6\textwidth]
 \starttyping
 import x
 from x import y
 for z in b:
    print dfdg
 Some text
 Some text
 Some text
 Some text
 Some really long text Some really long text Some really long text Some
 really long text Some really longtextSomereallylong text Some really
 long text Some really long text Some really long text Some really long
 text Some really long text
 \stoptyping
 \stopframedtext
 \stopframedtext
 \stoptext


 This works but seems like cheating.

 Is there a better third way I could try, or could someone point to a
 mkiv pretty printer example I could study?

 Change the alignment of the verbatim text with 
 “\setuptyping[align=flushleft]”.

This has helped unless I have some particularly long words towards the
right of the frame. I will use a combination of flushleft plus some
pre-processing.

Thanks for the help,

Felix
___
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] Verbatim in framed text

2011-09-22 Thread Wolfgang Schuster

Am 22.09.2011 um 12:54 schrieb Felix Ingram:

 -- Forwarded message --
 From: Wolfgang Schuster schuster.wolfg...@googlemail.com
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Date: Wed, 21 Sep 2011 13:09:42 +0200
 Subject: Re: [NTG-context] Verbatim in framed text
 
 Am 20.09.2011 um 17:50 schrieb Felix Ingram:
 
 Some of my verbatim lines are overflowing the framed text box I'm
 putting them in. I see that I could define a pretty printer to handle
 this but I came up with the following:
 
 
 \starttext
 \startframedtext[middle][width=.8\textwidth]
 \startframedtext[left][frame=off, width=.6\textwidth]
 \starttyping
 import x
 from x import y
 for z in b:
print dfdg
 Some text
 Some text
 Some text
 Some text
 Some really long text Some really long text Some really long text Some
 really long text Some really longtextSomereallylong text Some really
 long text Some really long text Some really long text Some really long
 text Some really long text
 \stoptyping
 \stopframedtext
 \stopframedtext
 \stoptext
 
 
 This works but seems like cheating.
 
 Is there a better third way I could try, or could someone point to a
 mkiv pretty printer example I could study?
 
 Change the alignment of the verbatim text with 
 “\setuptyping[align=flushleft]”.
 
 This has helped unless I have some particularly long words towards the
 right of the frame. I will use a combination of flushleft plus some
 pre-processing.

You can use “align={flushleft,broad}” which get sometimes better result with 
ragged text.

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
___


Re: [NTG-context] Verbatim in framed text

2011-09-21 Thread Wolfgang Schuster

Am 20.09.2011 um 17:50 schrieb Felix Ingram:

 Some of my verbatim lines are overflowing the framed text box I'm
 putting them in. I see that I could define a pretty printer to handle
 this but I came up with the following:
 
 
 \starttext
 \startframedtext[middle][width=.8\textwidth]
 \startframedtext[left][frame=off, width=.6\textwidth]
 \starttyping
 import x
 from x import y
 for z in b:
print dfdg
 Some text
 Some text
 Some text
 Some text
 Some really long text Some really long text Some really long text Some
 really long text Some really longtextSomereallylong text Some really
 long text Some really long text Some really long text Some really long
 text Some really long text
 \stoptyping
 \stopframedtext
 \stopframedtext
 \stoptext
 
 
 This works but seems like cheating.
 
 Is there a better third way I could try, or could someone point to a
 mkiv pretty printer example I could study?

Change the alignment of the verbatim text with “\setuptyping[align=flushleft]”.

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] Verbatim in framed text

2011-09-20 Thread Felix Ingram
Some of my verbatim lines are overflowing the framed text box I'm
putting them in. I see that I could define a pretty printer to handle
this but I came up with the following:


\starttext
\startframedtext[middle][width=.8\textwidth]
\startframedtext[left][frame=off, width=.6\textwidth]
\starttyping
import x
from x import y
for z in b:
print dfdg
Some text
Some text
Some text
Some text
Some really long text Some really long text Some really long text Some
really long text Some really longtextSomereallylong text Some really
long text Some really long text Some really long text Some really long
text Some really long text
\stoptyping
\stopframedtext
\stopframedtext
\stoptext


This works but seems like cheating.

Is there a better third way I could try, or could someone point to a
mkiv pretty printer example I could study?

Many thanks,

Felix
___
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] Typesetting in verbatim

2011-09-08 Thread Thomas Friedrich
Hi,

I am having problems typing  when typesetting code within a
\definetyping environment.

I hope someone might be able to give me a hint.  My code looks as
follows:

\definetyping
   [Haskell]
   [ option=commands,
 before={\startframedtext[width=\makeupwidth,
   frame=off,bottomframe=on,topframe=on,
   background=screen,backgroundscreen=.90]},
 after={\stopframedtext},
 bodyfont=9pt,
 margin=1.5em]

\startHaskell
main = foo = bar
\stopHaskell

Whenever ConTeXt comes across  anywhere in the text, it just doesn't
typeset anything.  So in the above case, I get the output:

main = foo = bar

Thanks for you help!

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
___


Re: [NTG-context] Typesetting in verbatim

2011-09-08 Thread Aditya Mahajan

On Wed, 7 Sep 2011, Thomas Friedrich wrote:


Hi,

I am having problems typing  when typesetting code within a
\definetyping environment.

I hope someone might be able to give me a hint.  My code looks as
follows:

\definetyping
  [Haskell]
  [ option=commands,
before={\startframedtext[width=\makeupwidth,
  frame=off,bottomframe=on,topframe=on,
  background=screen,backgroundscreen=.90]},
after={\stopframedtext},
bodyfont=9pt,
margin=1.5em]

\startHaskell
main = foo = bar
\stopHaskell

Whenever ConTeXt comes across  anywhere in the text, it just doesn't
typeset anything.  So in the above case, I get the output:

main = foo = bar


Confirmed.  are eaten in MkII but everything works fine with MkIV. My 
guess is because of automatic ligatures for . My usual trick for 
disabling such ligatures in MkII is


\usetypescript [modern] [texnansi]
\setupbodyfont [modern]

but that does not work in this case. There were some discussions in the 
past about disabling ligatures in typewriter font, but I don't remember 
the exact solution.


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
___


Re: [NTG-context] Typesetting in verbatim

2011-09-08 Thread Wolfgang Schuster

Am 08.09.2011 um 09:55 schrieb Aditya Mahajan:

 On Wed, 7 Sep 2011, Thomas Friedrich wrote:
 
 Hi,
 
 I am having problems typing  when typesetting code within a
 \definetyping environment.
 
 I hope someone might be able to give me a hint.  My code looks as
 follows:
 
 \definetyping
  [Haskell]
  [ option=commands,
before={\startframedtext[width=\makeupwidth,
  frame=off,bottomframe=on,topframe=on,
  background=screen,backgroundscreen=.90]},
after={\stopframedtext},
bodyfont=9pt,
margin=1.5em]
 
 \startHaskell
 main = foo = bar
 \stopHaskell
 
 Whenever ConTeXt comes across  anywhere in the text, it just doesn't
 typeset anything.  So in the above case, I get the output:
 
 main = foo = bar
 
 Confirmed.  are eaten in MkII but everything works fine with MkIV. My guess 
 is because of automatic ligatures for . My usual trick for disabling such 
 ligatures in MkII is
 
\usetypescript [modern] [texnansi]
\setupbodyfont [modern]
 
 but that does not work in this case. There were some discussions in the past 
 about disabling ligatures in typewriter font, but I don't remember the exact 
 solution.

No, the culprit is “option=commands which gobbles “”.

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
___


Re: [NTG-context] Typesetting in verbatim

2011-09-08 Thread Thomas Friedrich
Am Donnerstag, den 08.09.2011, 09:59 +0200 schrieb Wolfgang Schuster:
 Am 08.09.2011 um 09:55 schrieb Aditya Mahajan:
 
  On Wed, 7 Sep 2011, Thomas Friedrich wrote:
  
  Hi,
  
  I am having problems typing  when typesetting code within a
  \definetyping environment.
  
  I hope someone might be able to give me a hint.  My code looks as
  follows:
  
  \definetyping
   [Haskell]
   [ option=commands,
 before={\startframedtext[width=\makeupwidth,
   frame=off,bottomframe=on,topframe=on,
   background=screen,backgroundscreen=.90]},
 after={\stopframedtext},
 bodyfont=9pt,
 margin=1.5em]
  
  \startHaskell
  main = foo = bar
  \stopHaskell
  
  Whenever ConTeXt comes across  anywhere in the text, it just doesn't
  typeset anything.  So in the above case, I get the output:
  
  main = foo = bar
  
  Confirmed.  are eaten in MkII but everything works fine with MkIV. My 
  guess is because of automatic ligatures for . My usual trick for 
  disabling such ligatures in MkII is
  
 \usetypescript [modern] [texnansi]
 \setupbodyfont [modern]
  
  but that does not work in this case. There were some discussions in the 
  past about disabling ligatures in typewriter font, but I don't remember the 
  exact solution.
 
 No, the culprit is “option=commands which gobbles “”.
 
 Wolfgang

You are absolutely right, Wolfgang.  When removing the option=commands
from the definition, the  won't get eaten.  (Thanks!)  However, my
whole code consists of things such as

\startHaskell
  main = f1 /BTEX$\circ$/ETEX  f2 = hey
\stopHaskell

How comes that the  are gobbled?  Even worse, something like

\startHaskell
  foo = bar = print 
\stopHaskell

won't even compile.  It doesn't like .

Question: Is there a way to replace the  and  strings in
the typesetting environment by something else?  Or another work around?

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


___
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] Typesetting in verbatim

2011-09-08 Thread luigi scarso
On Thu, Sep 8, 2011 at 10:39 AM, Thomas Friedrich i...@suud.de wrote:

 Question: Is there a way to replace the  and  strings in
 the typesetting environment by something else?  Or another work around?

maybe
\startHaskell
foo = bar =/BTEX/ETEX print
foo = bar =/BTEX$$/ETEX print
\stopHaskell


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

Re: [NTG-context] Typesetting in verbatim

2011-09-08 Thread Thomas Friedrich
Am Donnerstag, den 08.09.2011, 10:57 +0200 schrieb luigi scarso:
 On Thu, Sep 8, 2011 at 10:39 AM, Thomas Friedrich i...@suud.de wrote:
 
  Question: Is there a way to replace the  and  strings in
  the typesetting environment by something else?  Or another work around?
 
 maybe
 \startHaskell
 foo = bar =/BTEX/ETEX print
 foo = bar =/BTEX$$/ETEX print
 \stopHaskell
 
 
 -- 
 luigi

For anyone who's interested, I
will do the following now:

\startHaskell
foo /BTEX{\tt \!=}/ETEX  bar
foo /BTEX\!=/ETEX  bar
bar /BTEX{\tt =\!}/ETEX  foo
bar /BTEX=\!/ETEX  foo
\stopHaskell

looks pretty nice, although it isn't really what I intended
at the start.

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
___


Re: [NTG-context] Typesetting in verbatim

2011-09-08 Thread Hans Hagen

On 8-9-2011 10:39, Thomas Friedrich wrote:


won't even compile.  It doesn't like .

Question: Is there a way to replace the  and strings in
the typesetting environment by something else?  Or another work around?


this is because   is considered grouping

just use mkiv

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] \type{} in bold mode

2011-08-31 Thread Wolfgang Schuster

Am 30.08.2011 um 16:29 schrieb Peter Münster:

 Hello,
 
 When the current font-switch is bold, I would like the verbatim text
 inside \type{} to respect the bold mode. What is the right way to teach
 \type{} to automatically use bold or not?

\setuptype[style=mono] % default: “style=\tt\tf”

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] \type{} in bold mode

2011-08-30 Thread Peter Münster
Hello,

When the current font-switch is bold, I would like the verbatim text
inside \type{} to respect the bold mode. What is the right way to teach
\type{} to automatically use bold or not?

Example:

\starttext
\section{Problem:}
{not bold, \type{not bold, ok} // \bf bold, \type{should be bold too}}
\section{Workaround:}
{not bold, \type{not bold, ok} // \bf bold, {\tt is bold too}}
\stoptext

TIA for any help!

-- 
   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] arbitrary tex-code in xml?

2011-08-22 Thread Thomas A. Schmitz

Hi all,

must be the heat here in Germany - I'm all out of ideas, and I have no 
example yet. Maybe someone can help: is it possible to define an xml 
setup that will run arbitrary tex code? Something like this (obviously 
pseudo-code):


in a TeX file MyInputs.tex which will be loaded at runtime, I have:

\startTEXbuffer[mybuffer]
  \color[red]{Hello World!}
\stopTEXbuffer

in the xml, I have

gettexbuffermybuffer/gettexbuffer

and in the setups

\input MyInputs

\startxmlsetups xml:gettexbuffer
  \getTEXbuffer[\xmlflush{#1}]
\stopxmlsetups

I tried with simple \startbuffer[mybuffer] ... \getbuffer[mybuffer], but 
the result is that the TeX code is typeset verbatim, not processed 
(problem of catcodes?). Any takers before I pull myself together and try 
to come up with an example?


Thanks!

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
___


[NTG-context] Line length limitation of typing block?

2011-08-16 Thread Vladimir Lomov
Hi.

Please consider the following two examples:

file name=exa-feat1.tex
\setupbackend[export=yes]
\definetyping[EXAMPLE][escape=yes]

\starttext

This is an example with \quotation{long} verbatim text.
Why context fails to compile the file? Is there a method to process this file?

\startEXAMPLE
This is a short verbatim line

This this this this this this very very very very very very long long long long 
long long line line line line line line
\stoptext

\stoptext
/file

file name=exa-feat2.tex
\setupbackend[export=yes]
\definetyping[EXAMPLE][escape=yes]

\starttext

This is an example with \quotation{long} verbatim text.
The version without buffer fails.

\startbuffer[ex1]
This is a short verbatim line

This this this this this this very very very very very very long long long long 
long long line line line line line line
\stopbuffer

\startEXAMPLE
/BTEX\getbuffer[ex1]/ETEX
\stopEXAMPLE

\stoptext
/file

context (mkiv) fails to compile first file (error:
output name=exa-feat1.tex
Runaway argument?
This this this this this this very ve\ETC.
! File ended while scanning use of \dododowithbuffer.

system   tex  error on line 0 in file : File ended while
scanning use of \dododowithbuffer ...

empty file

inserted text 
\par 
* ./exa-feat1.tex 
\stoptext
?
/output
)

Seems that there is a limitation on line length in typing block, then
how to process a file with such line?

The second example compiles well but the long is splitted. How to avoid
this? (Adding ',space=fixed' to '\definetyping' doesn't help.)


P.S. Sorry two questions in one topic.

---
TIA, Vladimir Lomov

-- 
The wages of sin are death; but after they're done taking out taxes,
it's just a tired feeling:
___
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 prevent line split in typing block when using custom command?

2011-08-16 Thread Vladimir Lomov
Hi.

Consider the following two example files:

- 8 

file name=exa-feat1.tex
\setupbackend[export=yes]
\definetyping[EXAMPLE][escape=yes]

\starttext

This is an example with \quotation{long} verbatim text.
Why context complians? Is there a method to process this file?

\startEXAMPLE
This is a short verbatim line

This this this this this this very very very very very very long long long long 
long long line line line line line line
\stopEXAMPLE

\stoptext
/file

- 8 

file name=exa-feat3.tex
\setupbackend[export=yes]
\definetyping[EXAMPLE][escape=yes]
\definestartstop[important][style=bold]

\starttext

This is an example with \quotation{long} verbatim text.
Why context fail to compile this example? Is there a method to process it?

\startEXAMPLE
This is a short verbatim line

This this this this this this very very very very very very 
/BTEX\important{long long long long}/ETEX long long line line line line line 
line
\stopEXAMPLE

\stoptext
/file

- 8 


In first case the long line is not splitted, in second case the line is
splitted. How to prevent line splitting?


---
TIA, Vladimir Lomov

-- 
Q:  How many surrealists does it take to change a light bulb?
A:  Two, one to hold the giraffe, and the other to fill the bathtub
with brightly colored machine tools.

[Surrealist jokes just aren't my cup of fur.  Ed.]
___
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 prevent line split in typing block when using custom command?

2011-08-16 Thread Wolfgang Schuster

Am 16.08.2011 um 14:05 schrieb Vladimir Lomov:

 Hi.
 
 Consider the following two example files:
 
 […]
 
 \definetyping[EXAMPLE][escape=yes]
 \definestartstop[important][style=bold]
 
 \starttext
 
 This is an example with \quotation{long} verbatim text.
 Why context fail to compile this example? Is there a method to process it?
 
 \startEXAMPLE
 This is a short verbatim line
 
 This this this this this this very very very very very very 
 /BTEX\important{long long long long}/ETEX long long line line line line line 
 line
 \stopEXAMPLE
 
 \stoptext
 
 In first case the long line is not splitted, in second case the line is
 splitted. How to prevent line splitting?

Use a nonbreakable space in the escaped text, i.e. “long~long”.

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

2011-07-26 Thread Hans Hagen

Hi,

As it happened that I needed to print a readme.markdown file, the new 
beta now has a new extra:


  context --extra=markdown readme.markdown

For some options see:

  context --extra=markdown --help

It will never look real good, but it's better than printing verbatim.

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
___


<    1   2   3   4   5   6   7   8   >