[NTG-context] ConTeXt - LaTeXt - ODT?

2011-07-19 Thread Cecil Westerhof
I another thread I talked about my problems with converting my ConTeXt file
to an editable format. In principal going the xhtml way seemed best.

But yesterday I got talking with someone in the train. He told me that it
was possible to convert ConTeXt to LaTeXt and LaTeXt to an ODT file. This
could solve my problem. Was this person correct? If yes, how would I do
this?

-- 
Cecil Westerhof
___
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 - LaTeXt - ODT?

2011-07-19 Thread Martin Schröder
2011/7/19 Cecil Westerhof cldwester...@gmail.com:
 was possible to convert ConTeXt to LaTeXt and LaTeXt to an ODT file. This

LaTeX - ODT: tex4ht

Best
   Martin
___
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] beta

2011-07-19 Thread Hans Hagen

On 18-7-2011 10:31, Aditya Mahajan wrote:

On Thu, 14 Jul 2011, Aditya Mahajan wrote:


On Wed, 13 Jul 2011, Hans Hagen wrote:


- Typing gets frontstripped with the number of spaces in front of
\stoptyping so that one can have nicely formatted input like:


Great. Recently I had added a similar functionality to t-vim using the
key 'trimspaces=on|off'. I'll change that to 'frontstripped' to be
consistent with the core.


There is no option frontstripped. buff-ver does have a 'strip' option,
but looking at the corresponding lua code, I don't think that it can work:

local function filter(lines,settings)
local strip = settings.strip
if strip == v_yes then
lines = realign(lines,strip)
end
...
end

This means that when realign is called, strip = v_yes. But, realign
function is defined as


local function realign(lines,forced_n) -- no, auto, number
forced_n = (forced_n == v_auto and huge) or tonumber(forced_n)
if forced_n then
...
end
return lines
end

Since, forced_n is always true when realign is called, the original
lines are not changed.

Hans, did you mean

if not (strip == v_no) then

in the filter function?


I cleaned up that bit. So now we have:

\starttext

test (automatic based on spaces before \stop...):

\starttyping
test test
 test test
test test
\stoptyping

test (key controlled):

\starttyping[strip=yes]
   test test
test test
   test test
\stoptyping

test

\startbuffer[x]
   test test
test test
   test test
\stopbuffer

\typebuffer[x][strip=yes]

test

\typebuffer[x][strip=8]

test

\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] ConTeXt - LaTeXt - ODT?

2011-07-19 Thread Hans Hagen

On 19-7-2011 10:47, Cecil Westerhof wrote:

I another thread I talked about my problems with converting my ConTeXt file
to an editable format. In principal going the xhtml way seemed best.

But yesterday I got talking with someone in the train. He told me that it
was possible to convert ConTeXt to LaTeXt and LaTeXt to an ODT file. This
could solve my problem. Was this person correct? If yes, how would I do
this?


context - latex sounds like a no-go to me

At some point if could be interesting to see if we could go from the 
context xml export (structure makeup) to odt (office makeup) but it's 
not something that I'll do for fun (I have no need for it anyway).


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] resolvers.findctxfile broken

2011-07-19 Thread Hans Hagen

On 19-7-2011 11:06, Andreas Schneider wrote:

Hi,

since one of the latest beta, resolvers.findctxfiles is broken.

The  attached  example  used to work (see test3.working.log) while the
new beta fails (see test3.failed.log).


fixed in next update

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] resolvers.findctxfile broken

2011-07-19 Thread Andreas Schneider
On Tuesday, July 19, 2011 11:22 Hans Hagen wrote:
 On 19-7-2011 11:06, Andreas Schneider wrote:
 Hi,

 since one of the latest beta, resolvers.findctxfiles is broken.

 The  attached  example  used to work (see test3.working.log) while the
 new beta fails (see test3.failed.log).

 fixed in next update

 Hans

Thank you very much!

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


Re: [NTG-context] ConTeXt - LaTeXt - ODT?

2011-07-19 Thread Cecil Westerhof
2011/7/19 Hans Hagen pra...@wxs.nl

 On 19-7-2011 10:47, Cecil Westerhof wrote:

 I another thread I talked about my problems with converting my ConTeXt
 file
 to an editable format. In principal going the xhtml way seemed best.

 But yesterday I got talking with someone in the train. He told me that it
 was possible to convert ConTeXt to LaTeXt and LaTeXt to an ODT file. This
 could solve my problem. Was this person correct? If yes, how would I do
 this?


 context - latex sounds like a no-go to me


Okay, I'll discard this option then. (Or someone else must have a way to do
the ConTeXt - LaTeXt part.)


At some point if could be interesting to see if we could go from the context
 xml export (structure makeup) to odt (office makeup) but it's not something
 that I'll do for fun (I have no need for it anyway).


If I could help in a way …

-- 
Cecil Westerhof
___
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] Characters instead numbers in headings

2011-07-19 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I'm trying to get numbering style like this:

A. Chapter
A.1 Section

I compiled a couple-of-months-old file and I got another result than before 
(?!).

So I created a minimal example - hope this is a valid code for numbering (or rather 
charactering) chapters as described before:


\definestructureconversionset[Num2Char][numbers,Characters][numbers]

\setuphead[chapter][sectionconversionset=Num2Char]

\starttext
  \chapter{Cha}
\section{Sec}
\stoptext


But numbers appear - so what has changed or what am I doing wrong?

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

SecChar.mkiv
Description: Binary data


SecChar.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] ConTeXt - LaTeXt - ODT?

2011-07-19 Thread Mojca Miklavec
On Tue, Jul 19, 2011 at 11:41, Cecil Westerhof wrote:

 Okay, I'll discard this option then. (Or someone else must have a way to do
 the ConTeXt - LaTeXt part.)

Keep in mind that ConTeXt - ODT should in theory be doable as well,
but the author of tex4ht died and it is very unlikely that the
conversion would work without any problems and even more unlikely that
anyone would know how to fix it.

If you can throw away any formatting you did and if you didn't use too
many ConTeXt specific tricks, you can simply rewrite your code to
LaTeX with a few regular expressions etc. But in the same spirit it
might be way easier to just convert the document straight to ODT
using copy-paste and applying some formatting there.

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Use of \hairline in the header

2011-07-19 Thread Cecil Westerhof
I have the following document:
\setupheader[
  after={\startalignment[center]\hairline\stopalignment},
  style={\switchtobodyfont[9pt]},
]

\setuplayout[
  footer=0mm,
  header=10mm,
]

\setupheadertexts[]
\setupheadertexts[Documentation for product XYZ –concept–]
 [version: 2001-07-19]

\starttext

Just some text to fill the document.

\stoptext


I would expect the hairline to be at the  same place as the text of the
document, but instead it is completely left aligned. What am I doing wrong?

-- 
Cecil Westerhof


dummy.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] ConTeXt - LaTeXt - ODT?

2011-07-19 Thread Martin Schröder
2011/7/19 Mojca Miklavec mojca.miklavec.li...@gmail.com:
 If you can throw away any formatting you did and if you didn't use too
 many ConTeXt specific tricks, you can simply rewrite your code to
 LaTeX with a few regular expressions etc. But in the same spirit it
 might be way easier to just convert the document straight to ODT
 using copy-paste and applying some formatting there.

Or, if you know up front that you need multiple output formats,
you could use Markdown/Pandoc etc. and let it generate ConTeXt
as needed.

Best
   Martin
___
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 to Markdown (was Edit a ConTeXt generated document with Adobe Acrobat Professional)

2011-07-19 Thread Cecil Westerhof
2011/7/18 Aditya Mahajan adit...@umich.edu

 On Thu, 14 Jul 2011, John Haltiwanger wrote:

  PS. For what it is worth, I do not think it would be _too_ hard to create
 a
 Context to Markdown translator.


 Yes. A while back I did some tests (though I cannot find them now), and had
 most of the basic ConTeXt-to-markdown working (sections, blockquotes,
 typing, itemize, footnotes (via endnotes); but no tables and figures). The
 main idea was to *typeset* the output as you would expect a markdown
 documnet to be, and then use pdftotext to convert it to text. (Hans had
 mentioned this as a possible way to convert to HTML during TUG 2009).


When you find them, I would be interested in them. And maybe I can improve
on them.

-- 
Cecil Westerhof
___
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 to Markdown (was Edit a ConTeXt generated document with Adobe Acrobat Professional)

2011-07-19 Thread Martin Schröder
2011/7/19 Cecil Westerhof cldwester...@gmail.com:
 When you find them, I would be interested in them. And maybe I can improve
 on them.

Pandoc. :-)

Best
   Martin
___
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] General suggestion: Unit tests for ConText

2011-07-19 Thread Cecil Westerhof
2011/7/18 Peter Schorsch trala...@freenet.de

 during my work with context I wrote a bunch of fewliners mainly to test
 how to do things. When there change from mkii to mkiv occured many of
 my mini-tests failed and later with the growing of mkiv restartet to
 work - some just without adaption.. some with some adjustment to a new
 syntax.

 I realize that they have the same functionality like unit-tests -
 just instead of comparing classes and variables - a pdf-output is
 visually compared.

 So I like to suggest to introduce unit tests for context. It would

a) increase the quality of context as it makes the
testing easier for the developer

b) it also would be a great source of minihowtos for learning
context.

 Before I write my technical ideas about this I would like to know what
 are you thinking about this idea?


I think it is a great idea.

-- 
Cecil Westerhof
___
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] General suggestion: Unit tests for ConText

2011-07-19 Thread Cecil Westerhof
2011/7/19 Hans Hagen pra...@wxs.nl

 fyi: there is an archive with a bunch of tests (mostly mine but I
 occasionally add -adapted- samples from the list):

 http://www.pragma-ade.nl/**context/latest/cont-tst.7zhttp://www.pragma-ade.nl/context/latest/cont-tst.7z

 Quite some of these can be used for testing, some can also serve as
 examples of usage. I have a script that can process them and keep track of
 changes at a rough pixel level but simply have no time to keep up with that.


How much time would cost that? Maybe I could do that.

-- 
Cecil Westerhof
___
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 - LaTeXt - ODT?

2011-07-19 Thread Cecil Westerhof
2011/7/19 Martin Schröder mar...@oneiros.de

 2011/7/19 Mojca Miklavec mojca.miklavec.li...@gmail.com:
  If you can throw away any formatting you did and if you didn't use too
  many ConTeXt specific tricks, you can simply rewrite your code to
  LaTeX with a few regular expressions etc. But in the same spirit it
  might be way easier to just convert the document straight to ODT
  using copy-paste and applying some formatting there.

 Or, if you know up front that you need multiple output formats,
 you could use Markdown/Pandoc etc. and let it generate ConTeXt
 as needed.


I did not know. They where happy with PDF's all the time, but when the
project was almost finished, they changed the requirements. But maybe good
to keep in mind for the next project.

-- 
Cecil Westerhof
___
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 to Markdown (was Edit a ConTeXt generated document with Adobe Acrobat Professional)

2011-07-19 Thread John Haltiwanger
On Tue, Jul 19, 2011 at 3:27 AM, Martin Schröder mar...@oneiros.de wrote:

 2011/7/19 Cecil Westerhof cldwester...@gmail.com:
  When you find them, I would be interested in them. And maybe I can
 improve
  on them.


Pandoc. :-)


Pandoc does not support Context as an input. Nor does it support modern mkIV
conventions (\startchapter..\stopchapter; \hyphenatedURL; etc).

If anyone knows Haskell, maybe we can submit some patches to Pandoc to
create a --mkiv switch for Context?

Don't get me wrong, I use Pandoc all the time. But it is not a panacea,
particularly for existing Context documents.



 Best
Martin

 ___
 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] ConTeXt to Markdown (was Edit a ConTeXt generated document with Adobe Acrobat Professional)

2011-07-19 Thread luigi scarso
On Tue, Jul 19, 2011 at 12:41 PM, John Haltiwanger
john.haltiwan...@gmail.com wrote:


 On Tue, Jul 19, 2011 at 3:27 AM, Martin Schröder mar...@oneiros.de wrote:

 2011/7/19 Cecil Westerhof cldwester...@gmail.com:
  When you find them, I would be interested in them. And maybe I can
  improve
  on them.


 Pandoc. :-)

 Pandoc does not support Context as an input. Nor does it support modern mkIV
 conventions (\startchapter..\stopchapter; \hyphenatedURL; etc).
 If anyone knows Haskell, maybe we can submit some patches to Pandoc to
 create a --mkiv switch for Context?
I don't know haskell, but it sound like a good excuse to start.

-- 
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] ConTeXt - LaTeXt - ODT?

2011-07-19 Thread Cecil Westerhof
2011/7/19 Hans Hagen pra...@wxs.nl

 Concerning OTD: if you need to be roundtrip, then you also need to be able
 to convert back, which might be non trivial.


Roundtrip is not necessary I think (in this case). As I understand it: after
delivery we do not have to change the document anymore. And if we have, well
we just use Open Office. (Or Libre.)

-- 
Cecil Westerhof
___
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 - LaTeXt - ODT?

2011-07-19 Thread Mojca Miklavec
On Tue, Jul 19, 2011 at 12:50, Cecil Westerhof wrote:

 As I understand it: after
 delivery we do not have to change the document anymore. And if we have, well
 we just use Open Office. (Or Libre.)

I wonder why someone would want to hire third-party to create them a
document in OpenOffice if they:
- know how to use OpenOffice
- don't need proffessional typography
- have to provide input/text in some form anyway

What was their input? Was it a database at least?

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ConTeXt - LaTeXt - ODT?

2011-07-19 Thread Cecil Westerhof
2011/7/19 Mojca Miklavec mojca.miklavec.li...@gmail.com

  As I understand it: after
  delivery we do not have to change the document anymore. And if we have,
 well
  we just use Open Office. (Or Libre.)

 I wonder why someone would want to hire third-party to create them a
 document in OpenOffice if they:
 - know how to use OpenOffice
 - don't need proffessional typography
 - have to provide input/text in some form anyway

 What was their input? Was it a database at least?


They use a program that is been made by the company I am working for. It was
used for ten years, but never documented. First it was they wanted
documentation because they did not want to be lost if our company stops
working on the application. Now they want to further develop the application
themselves.(They have the rights on the sources.) And then it is handy that
you can change the documentation. ;-}

It was quite a learning experience altogether.

-- 
Cecil Westerhof
___
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] Use of \hairline in the header

2011-07-19 Thread Christian
Hi, I was also experiencing unexpected results when using a hairline in the 
header.
I found this solution for a line (I think it's somewhere in the wiki):
\setupbackgrounds[header][text][frame=off, bottomframe=on,rulethickness=.5pt]

The drawback is, that you'll have to use
\setuphead[chapter][header=high]
If you want no header on pages where a chapter starts. If you use 'empty', the 
line will still be there (since it's no really part of the header, but the 
background).

 -Ursprüngliche Nachricht-
 Von: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] Im
 Auftrag von Cecil Westerhof
 Gesendet: Dienstag, 19. Juli 2011 12:21
 An: mailing list for ConTeXt users
 Betreff: [NTG-context] Use of \hairline in the header
 
 I have the following document:
 \setupheader[
   after={\startalignment[center]\hairline\stopalignment},
   style={\switchtobodyfont[9pt]},
 ]
 
 \setuplayout[
   footer=0mm,
   header=10mm,
 ]
 
 \setupheadertexts[]
 \setupheadertexts[Documentation for product XYZ –concept–]
  [version: 2001-07-19]
 
 \starttext
 
 Just some text to fill the document.
 
 \stoptext
 
 
 I would expect the hairline to be at the  same place as the text of the
 document, but instead it is completely left aligned. What am I doing wrong?
 
 --
 Cecil Westerhof


___
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] Characters instead numbers in headings

2011-07-19 Thread Wolfgang Schuster

Am 19.07.2011 um 12:02 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

 Hello,
 
 I'm trying to get numbering style like this:
 
 A. Chapter
 A.1 Section
 
 I compiled a couple-of-months-old file and I got another result than before 
 (?!).
 
 So I created a minimal example - hope this is a valid code for numbering (or 
 rather charactering) chapters as described before:
 
 
 \definestructureconversionset[Num2Char][numbers,Characters][numbers]
 
 \setuphead[chapter][sectionconversionset=Num2Char]

\setupheads[sectionconversionset=Num2Char]

or

\setuphead[chapter,section][sectionconversionset=Num2Char]

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] Characters instead numbers in headings

2011-07-19 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

have you tried it?

On Tue, 19 Jul 2011 14:19:52 +0200, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


or

\setuphead[chapter,section][sectionconversionset=Num2Char]

Wolfgang



\definestructureconversionset[Num2Char][numbers,Characters][numbers]

\setuphead[chapter,section][sectionconversionset=Num2Char]

\starttext
  \chapter{Cha}
\section{Sec}
\stoptext


I'm still getting:


1  Cha
1.1  Sec


instead of


A  Cha
A.1  Sec


(ConTeXt  ver: 2011.07.13 20:14 MKIV  fmt: 2011.7.14  int: english/english)

Lukas

___
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 well do ConTeXt (lua)module for other users?

2011-07-19 Thread Jaroslav Hajtmar

Hello ConTeXist.

I have done the module (for context), which is entirely written in Lua 
(ConTeXt definitions are done through Lua too).


I wonder how it can be loaded into ConTeXt file. Have I to use the 
beginning of the file:

\startluacode
  dofile (my-module.lua)
\stopluacode

to loading the module? I would like to use \usemodule [my-module.lua], 
but there is a problem, that code must be inside \startluacode ... 
\stopluacode environment.
But when I put my luacode into \startluacode ... \stopluacode into 
my-module.mkiv file, then I have a problem with catcodes inside strings 
defining by  [[  ... ]].


Or must be module consists of two separate files (my-module.lua and 
my-module.mkiv)? Must I to load the Lua module file (my-module.lua)  
into ConTeXt module file (my-module.mkiv) by command 
\ctxlua{dofile(my-module.lua );} and then load module file 
(my-module.mkiv) into my user file by command \usemodule[my-module]?


Is there something like \useluamodule[] or  
\usemodule[anyluaswitch][modulefile] ???


How to proceed in these cases? I find it inappropriate to divide the 
module into two separate files.


Thanx Jaroslav


___
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 well do ConTeXt (lua)module for other users?

2011-07-19 Thread luigi scarso
On Tue, Jul 19, 2011 at 2:27 PM, Jaroslav Hajtmar hajt...@gyza.cz wrote:
 Hello ConTeXist.

 I have done the module (for context), which is entirely written in Lua
 (ConTeXt definitions are done through Lua too).

 I wonder how it can be loaded into ConTeXt file. Have I to use the beginning
 of the file:
 \startluacode
  dofile (my-module.lua)
 \stopluacode
It's lua , so
require(my-module.lua)
also works

-- 
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] Characters instead numbers in headings

2011-07-19 Thread Wolfgang Schuster

Am 19.07.2011 um 14:27 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

 Hello,
 
 have you tried it?

Yes!

mtx-context | current version: 2011.07.17 23:08

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] ConTeXt to Markdown (was Edit a ConTeXt generated document with Adobe Acrobat Professional)

2011-07-19 Thread Hans Hagen

On 19-7-2011 12:46, luigi scarso wrote:

On Tue, Jul 19, 2011 at 12:41 PM, John Haltiwanger
john.haltiwan...@gmail.com  wrote:



On Tue, Jul 19, 2011 at 3:27 AM, Martin Schrödermar...@oneiros.de  wrote:


2011/7/19 Cecil Westerhofcldwester...@gmail.com:

When you find them, I would be interested in them. And maybe I can
improve
on them.



Pandoc. :-)


Pandoc does not support Context as an input. Nor does it support modern mkIV
conventions (\startchapter..\stopchapter; \hyphenatedURL; etc).
If anyone knows Haskell, maybe we can submit some patches to Pandoc to
create a --mkiv switch for Context?

I don't know haskell, but it sound like a good excuse to start.


it might be way easier to convert the xml export to pandoc because then 
users can still define commands (like special sectioning); otherwise you 
keep extending


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] How well do ConTeXt (lua)module for other users?

2011-07-19 Thread Wolfgang Schuster

Am 19.07.2011 um 14:27 schrieb Jaroslav Hajtmar:

 Hello ConTeXist.
 
 I have done the module (for context), which is entirely written in Lua 
 (ConTeXt definitions are done through Lua too).
 
 I wonder how it can be loaded into ConTeXt file. Have I to use the beginning 
 of the file:
 \startluacode
  dofile (my-module.lua)
 \stopluacode
 
 to loading the module? I would like to use \usemodule [my-module.lua], but 
 there is a problem, that code must be inside \startluacode ... \stopluacode 
 environment.
 But when I put my luacode into \startluacode ... \stopluacode into 
 my-module.mkiv file, then I have a problem with catcodes inside strings 
 defining by  [[  ... ]].
 
 Or must be module consists of two separate files (my-module.lua and 
 my-module.mkiv)? Must I to load the Lua module file (my-module.lua)  into 
 ConTeXt module file (my-module.mkiv) by command \ctxlua{dofile(my-module.lua 
 );} and then load module file (my-module.mkiv) into my user file by command 
 \usemodule[my-module]?
 
 Is there something like \useluamodule[] or  
 \usemodule[anyluaswitch][modulefile] ???
 
 How to proceed in these cases? I find it inappropriate to divide the module 
 into two separate files.

Use \usemodule:

example
\startbuffer[test]
function test(argument)
context.quotation(argument)
end

interfaces.definecommand {
name = test,
arguments = {
{ content, string },
},
macro = test,
}
\stopbuffer

\savebuffer[test][p-test.lua]

\usemodule[test]

\starttext
\test{Hello}
\stoptext
/example

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] Characters instead numbers in headings

2011-07-19 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

On Tue, 19 Jul 2011 14:33:05 +0200, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


mtx-context | current version: 2011.07.17 23:08

Wolfgang


OK, thanks for hints and testing.

I've just downloaded the latest beta -

ConTeXt  ver: 2011.07.19 11:22 MKIV  fmt: 2011.7.19  int: english/english (OK)

- so probably just the previous version had the problem -

ConTeXt  ver: 2011.07.13 20:14 MKIV  fmt: 2011.7.14  int: english/english 
(problem).

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] ConTeXt to Markdown (was Edit a ConTeXt generated document with Adobe Acrobat Professional)

2011-07-19 Thread luigi scarso
On Tue, Jul 19, 2011 at 2:37 PM, Hans Hagen pra...@wxs.nl wrote:
 On 19-7-2011 12:46, luigi scarso wrote:
 I don't know haskell, but it sound like a good excuse to start.

 it might be way easier to convert the xml export to pandoc because then
 users can still define commands (like special sectioning); otherwise you
 keep extending
yes I know that as an excuse is a bit weak...


-- 
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] ConTeXt to Markdown (was Edit a ConTeXt generated document with Adobe Acrobat Professional)

2011-07-19 Thread Khaled Hosny
On Tue, Jul 19, 2011 at 02:37:33PM +0200, Hans Hagen wrote:
 On 19-7-2011 12:46, luigi scarso wrote:
 On Tue, Jul 19, 2011 at 12:41 PM, John Haltiwanger
 john.haltiwan...@gmail.com  wrote:
 
 
 On Tue, Jul 19, 2011 at 3:27 AM, Martin Schrödermar...@oneiros.de  wrote:
 
 2011/7/19 Cecil Westerhofcldwester...@gmail.com:
 When you find them, I would be interested in them. And maybe I can
 improve
 on them.
 
 
 Pandoc. :-)
 
 Pandoc does not support Context as an input. Nor does it support modern mkIV
 conventions (\startchapter..\stopchapter; \hyphenatedURL; etc).
 If anyone knows Haskell, maybe we can submit some patches to Pandoc to
 create a --mkiv switch for Context?
 I don't know haskell, but it sound like a good excuse to start.
 
 it might be way easier to convert the xml export to pandoc because
 then users can still define commands (like special sectioning);
 otherwise you keep extending

Indeed, I was about to suggest the same. Handling xml exported by
ConTeXt avoids all the complexities of parsing TeX code and avoids the
need to only support some predefined subset of it (which is inevitable).

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab
___
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 - LaTeXt - ODT?

2011-07-19 Thread Khaled Hosny
On Tue, Jul 19, 2011 at 12:15:46PM +0200, Mojca Miklavec wrote:
 On Tue, Jul 19, 2011 at 11:41, Cecil Westerhof wrote:
 
  Okay, I'll discard this option then. (Or someone else must have a way to do
  the ConTeXt - LaTeXt part.)
 
 Keep in mind that ConTeXt - ODT should in theory be doable as well,
 but the author of tex4ht died and it is very unlikely that the
 conversion would work without any problems and even more unlikely that
 anyone would know how to fix it.

ODT is just another XML format, so it shouldn't be hard to do with the
current export code (and IIRC they have even a flat xml ODT that gets
the whole document in one xml file instead of the common multi-file in a
zip archive format).

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab
___
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 - LaTeXt - ODT?

2011-07-19 Thread Hans Hagen

On 19-7-2011 2:58, Khaled Hosny wrote:

On Tue, Jul 19, 2011 at 12:15:46PM +0200, Mojca Miklavec wrote:

On Tue, Jul 19, 2011 at 11:41, Cecil Westerhof wrote:


Okay, I'll discard this option then. (Or someone else must have a way to do
the ConTeXt -  LaTeXt part.)


Keep in mind that ConTeXt -  ODT should in theory be doable as well,
but the author of tex4ht died and it is very unlikely that the
conversion would work without any problems and even more unlikely that
anyone would know how to fix it.


ODT is just another XML format, so it shouldn't be hard to do with the
current export code (and IIRC they have even a flat xml ODT that gets
the whole document in one xml file instead of the common multi-file in a
zip archive format).


So then it's mostly a matter of someone writing an xslt script.

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] Use of \hairline in the header

2011-07-19 Thread Wolfgang Schuster

Am 19.07.2011 um 12:21 schrieb Cecil Westerhof:

 I have the following document:
 \setupheader[
   after={\startalignment[center]\hairline\stopalignment},
   style={\switchtobodyfont[9pt]},
 ]

\setupheader[text][after=\hairline,...]

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-19 Thread Hans Hagen

Hi Khaled,

I took a look at the lunamark code, and ran it on some (copied) sample. 
As it was much slower than I'd expected from lpeg I messed around a 
little and could bring down the runtime on the sample from 2 sec to 0.1 
sec. Anyhow, there is room for improvement so I wonder If I should take 
the code, wrap it up a bit, and make a module so that we can directly 
process markdown in context. (Of course we then need to keep an eye on 
how the original develops, if mkdown develops at all.)


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

2011-07-19 Thread John Haltiwanger
On Tue, Jul 19, 2011 at 7:05 AM, Hans Hagen pra...@wxs.nl wrote:

 Hi Khaled,

 I took a look at the lunamark code, and ran it on some (copied) sample. As
 it was much slower than I'd expected from lpeg I messed around a little and
 could bring down the runtime on the sample from 2 sec to 0.1 sec. Anyhow,
 there is room for improvement so I wonder If I should take the code, wrap it
 up a bit, and make a module so that we can directly process markdown in
 context. (Of course we then need to keep an eye on how the original
 develops, if mkdown develops at all.)


Markdown, in its official form, does not seem to evolve very much. However,
there are extensions to the original syntax, such as those provided by
Pandoc (including nice new reference functionalities) and also the Python
Markdown processor.

Anyway, this is great news! Can't wait to see it in action :)
___
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 well do ConTeXt (lua)module for other users?

2011-07-19 Thread Jaroslav Hajtmar

Great ... that's exactly what I needed ... Thanks very much Wolfgang.
It can be somewhere on similar techniques to read more? Just links to 
some sample files to the dissected ...


Thanks a lot
Jaroslav



Dne 19.7.2011 14:39, Wolfgang Schuster napsal(a):

Am 19.07.2011 um 14:27 schrieb Jaroslav Hajtmar:

   

  Hello ConTeXist.
  
  I have done the module (for context), which is entirely written in Lua (ConTeXt definitions are done through Lua too).
  
  I wonder how it can be loaded into ConTeXt file. Have I to use the beginning of the file:

  \startluacode
dofile (my-module.lua)
  \stopluacode
  
  to loading the module? I would like to use \usemodule [my-module.lua], but there is a problem, that code must be inside \startluacode ... \stopluacode environment.

  But when I put my luacode into \startluacode ... \stopluacode into 
my-module.mkiv file, then I have a problem with catcodes inside strings defining 
by  [[  ... ]].
  
  Or must be module consists of two separate files (my-module.lua and my-module.mkiv)? Must I to load the Lua module file (my-module.lua)  into ConTeXt module file (my-module.mkiv) by command \ctxlua{dofile(my-module.lua );} and then load module file (my-module.mkiv) into my user file by command \usemodule[my-module]?
  
  Is there something like \useluamodule[] or  \usemodule[anyluaswitch][modulefile] ???
  
  How to proceed in these cases? I find it inappropriate to divide the module into two separate files.
 

Use \usemodule:

example
\startbuffer[test]
function test(argument)
 context.quotation(argument)
end

interfaces.definecommand {
 name = test,
 arguments = {
 { content, string },
 },
 macro = test,
}
\stopbuffer

\savebuffer[test][p-test.lua]

\usemodule[test]

\starttext
\test{Hello}
\stoptext
/example

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] Use of \hairline in the header

2011-07-19 Thread Cecil Westerhof
2011/7/19 Wolfgang Schuster schuster.wolfg...@googlemail.com

  I have the following document:
  \setupheader[
after={\startalignment[center]\hairline\stopalignment},
style={\switchtobodyfont[9pt]},
  ]

 \setupheader[text][after=\hairline,...]


Works. Thanks.

-- 
Cecil Westerhof
___
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] \copypages[file#.pdf]

2011-07-19 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

this kind of question was discussed once - how to include '#' character to the 
file name so that \copypages take it?

Something like:

\copypages[TZ#001.pdf]

e.g. by

\copypages[\MAKETEXT{TZ#001.pdf}]

There was discussion about other not-so-frequent chars as well - ! # $ % @ ^ 
 _ - any evolution?

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] \copypages[file#.pdf]

2011-07-19 Thread Wolfgang Schuster

Am 19.07.2011 um 16:58 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

 Hello,
 
 this kind of question was discussed once - how to include '#' character to 
 the file name so that \copypages take it?
 
 Something like:
 
 \copypages[TZ#001.pdf]
 
 e.g. by
 
 \copypages[\MAKETEXT{TZ#001.pdf}]
 
 There was discussion about other not-so-frequent chars as well - ! # $ % @ 
 ^  _ - any evolution?

You can use \asciimode to make them character for the whole document or 
restrict it to a area with \startasciimode …\stopasciimode. After asciimode has 
been enabled you need %% to write a comment.

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 well do ConTeXt (lua)module for other users?

2011-07-19 Thread Wolfgang Schuster

Am 19.07.2011 um 16:26 schrieb Jaroslav Hajtmar:

 Great ... that's exactly what I needed ... Thanks very much Wolfgang.
 It can be somewhere on similar techniques to read more? Just links to some 
 sample files to the dissected ...

You should always read Hans bet announcements where he often mentions new 
features and sometimes gives examples.

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] \copypages[file#.pdf]

2011-07-19 Thread Procházka Lukáš Ing . - Pontex s . r . o .

... Perfect, thank you!

Lukas


On Tue, 19 Jul 2011 17:04:35 +0200, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:



Am 19.07.2011 um 16:58 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:


Hello,

this kind of question was discussed once - how to include '#' character to the 
file name so that \copypages take it?

Something like:

\copypages[TZ#001.pdf]

e.g. by

\copypages[\MAKETEXT{TZ#001.pdf}]

There was discussion about other not-so-frequent chars as well - ! # $ % @ ^ 
 _ - any evolution?


You can use \asciimode to make them character for the whole document or 
restrict it to a area with \startasciimode …\stopasciimode. After asciimode has 
been enabled you need %% to write a comment.

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] \start/stopTEXpage resets page layout?

2011-07-19 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

let's have the following code:


\setuplayout[page]
\starttext
  AAA
  \page
  \copypages[cow.pdf]
  BBB
  \startTEXpage
\externalfigure[cow]
  \stopTEXpage
  \page
  CCC
\stoptext


Texts AAA and BBB are written from the strict left top corner of the page - 
page has no header nor backspace.

So does the cow - it fills one page perfectly.

That's OK.

But when the text CCC is typeset, it seems a default layout is restored - 
see the space up and left, also the header appears; that's unwanted.

What is the trick to prevent page layout from being modified by 
\start/stopTEXpage?

TIA.

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

Test.mkiv
Description: Binary data


Test.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Use of \hairline in the header

2011-07-19 Thread Christian
   \setupheader[text][after=\hairline,...]
 
 
 
 Works. Thanks.

Works, but does penetrate the text area. See the attached image (I have 
\showframe on, so don’t be confused by that many lines. The hairline is the one 
partially highlighted, running just above the lowercase letters).
How can I avoid this?
attachment: pic.JPG___
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] Use of \hairline in the header

2011-07-19 Thread Wolfgang Schuster

Am 19.07.2011 um 18:27 schrieb Christian:

  \setupheader[text][after=\hairline,...]
 
 
 
 Works. Thanks.
 
 Works, but does penetrate the text area. See the attached image (I have 
 \showframe on, so don’t be confused by that many lines. The hairline is the 
 one partially highlighted, running just above the lowercase letters).
 How can I avoid this?

Try “after={\blackrule[width=\textwidth,height=\linewidth,depth=0pt]}”.

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

2011-07-19 Thread Khaled Hosny
On Tue, Jul 19, 2011 at 04:05:13PM +0200, Hans Hagen wrote:
 Hi Khaled,
 
 I took a look at the lunamark code, and ran it on some (copied)
 sample. As it was much slower than I'd expected from lpeg I messed
 around a little and could bring down the runtime on the sample from
 2 sec to 0.1 sec. Anyhow, there is room for improvement so I wonder
 If I should take the code, wrap it up a bit, and make a module so
 that we can directly process markdown in context. (Of course we then
 need to keep an eye on how the original develops, if mkdown develops
 at all.)

That would be great! That was my intent when I started hacking lunamrk
to include a ConTeXt writer, by due to lack of time I never managed to
do the ConTeXt module part.

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab
___
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] markdown

2011-07-19 Thread Hans Hagen

On 19-7-2011 7:08, Khaled Hosny wrote:

On Tue, Jul 19, 2011 at 04:05:13PM +0200, Hans Hagen wrote:

Hi Khaled,

I took a look at the lunamark code, and ran it on some (copied)
sample. As it was much slower than I'd expected from lpeg I messed
around a little and could bring down the runtime on the sample from
2 sec to 0.1 sec. Anyhow, there is room for improvement so I wonder
If I should take the code, wrap it up a bit, and make a module so
that we can directly process markdown in context. (Of course we then
need to keep an eye on how the original develops, if mkdown develops
at all.)


That would be great! That was my intent when I started hacking lunamrk
to include a ConTeXt writer, by due to lack of time I never managed to
do the ConTeXt module part.


Ok, I'll give it a try and you can do the checking.

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

2011-07-19 Thread Wolfgang Schuster

Am 19.07.2011 um 19:14 schrieb Hans Hagen:

 On 19-7-2011 7:08, Khaled Hosny wrote:
 On Tue, Jul 19, 2011 at 04:05:13PM +0200, Hans Hagen wrote:
 Hi Khaled,
 
 I took a look at the lunamark code, and ran it on some (copied)
 sample. As it was much slower than I'd expected from lpeg I messed
 around a little and could bring down the runtime on the sample from
 2 sec to 0.1 sec. Anyhow, there is room for improvement so I wonder
 If I should take the code, wrap it up a bit, and make a module so
 that we can directly process markdown in context. (Of course we then
 need to keep an eye on how the original develops, if mkdown develops
 at all.)
 
 That would be great! That was my intent when I started hacking lunamrk
 to include a ConTeXt writer, by due to lack of time I never managed to
 do the ConTeXt module part.
 
 Ok, I'll give it a try and you can do the checking.

Can you then also add a few features:

- Headings use \startstructurelevel
- Paragraphs are enclosed in startparagraph/stopparagraph
- emphasis and bold styles use \definehiglight command

to make it possible to change the layout of markdown documents
where ConTeXt is only used to produce a PDF.

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] Use of \hairline in the header

2011-07-19 Thread Christian
 \setupheader[text][after=\hairline,...]
 
 
 
  Works. Thanks.
 
  Works, but does penetrate the text area. See the attached image (I have
 \showframe on, so don’t be confused by that many lines. The hairline is the
 one partially highlighted, running just above the lowercase letters).
  How can I avoid this?
 
 Try “after={\blackrule[width=\textwidth,height=\linewidth,depth=0pt]}”.

Works like a charm, thanks! 

Now the wiki has this in the Titles article:

Titling Style
see \setuphead and some enhanced samples below.
A FAQ is, how to get a line under the pageheader:
\setupbackgrounds[header][text][bottomframe=on]

I feel that does not belong there, it belongs rather in the Headers and 
Footers article.

Anyways, I added your code to the wiki.

___
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] Problem with \automigrateinserts

2011-07-19 Thread Andreas Harder

Am 18.07.2011 um 13:39 schrieb Hans Hagen:

 On 16-7-2011 1:40, Andreas Harder wrote:
 Hi,
 
 if one uses \automigrateinsers footnotes in captions will be eaten.
 
 \automigrateinserts % kill footnotes in captions!
 
 experimental hack in next version

Thanks a lot! It works.

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] vertical alignment in TOC

2011-07-19 Thread Thomas A. Schmitz

Hi all,

for an edited volume, entries in the TOC have two lines, title, then 
author. Is is possible to have the page number aligned to the title, 
i.e. the first of these lines?


Example:

\setuphead[chapter]
  [number=no]

\setuplist[chapter]
  [width=0cm]

\starttext

\startchapter[title=One,list={A Title \crlf An Author}]

\input knuth

\stopchapter

\page

\placelist[chapter][criterium=text]

\stoptext

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
___


Re: [NTG-context] vertical alignment in TOC

2011-07-19 Thread Hans Hagen

On 19-7-2011 8:36, Thomas A. Schmitz wrote:

Hi all,

for an edited volume, entries in the TOC have two lines, title, then
author. Is is possible to have the page number aligned to the title,
i.e. the first of these lines?


i'll send you a temp hack

-
  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] vertical alignment in TOC

2011-07-19 Thread Andreas Harder

Am 19.07.2011 um 20:36 schrieb Thomas A. Schmitz:

 Hi all,
 
 for an edited volume, entries in the TOC have two lines, title, then author. 
 Is is possible to have the page number aligned to the title, i.e. the first 
 of these lines?
 
 Example:
 
 \setuphead[chapter]
 [number=no]
 
 \setuplist[chapter]
  [width=0cm]
 
 \starttext
 
 \startchapter[title=One,list={A Title \crlf An Author}]
 
 \input knuth
 
 \stopchapter
 
 \page
 
 \placelist[chapter][criterium=text]


\define[3]\ChapterList%
  {\bTABLE[offset=none,rulethickness=0pt,width=broad]
 \bTR
 % \bTD  #1 \eTD
   \bTD  #2 \eTD
   \bTD[width=1.5em,align={left,high}]\strut #3 \eTD
 \eTR
   \eTABLE}

\setuplist[chapter][alternative=command,command=\ChapterList]

\placelist[chapter][criterium=text]

\stoptext

If I got your right, this should work.

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