[NTG-context] Different counters for titles

2013-09-03 Thread H. Özoguz
To solve my last asked question, I chose a somewhat easiert way and 
defined an own chapter-title, which is unnumbered.


Here is my Minexample:

\definehead[mychapter][chapter]
\setuphead[mychapter][number=no]
\setupcombinedlist[content]
[list={mychapter, chapter, section}]

\starttext
\completecontent
\mychapter{Vorwort}
\chapter{First Chapter}
\section{Some section in the first chapter}
\chapter{Second chapter}
\section{Some section in the second chapter}
\stoptext

The problem is now: Obviously the counter of mychapter and chapter is 
the same. Because first chapter begins with number 2, but should with 
1 – that was the intention of this new chapter style, which is nothing 
but a unnumbered copy of the default chapter. Was that idea wrong? How 
to give chapter and mychapter their own counters, to achieve this result 
– or any other way to let first chapter begin with 1 (but not subtract 
1 from the numbers, because that ends up in the first section 1.0. The 
first section of the first chapter should be numbered with 1.1, as usual).


Huseyin


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

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

Re: [NTG-context] installing two ConTeXt trees

2013-09-03 Thread Otared Kavian

On 2 sept. 2013, at 23:44, Hans Hagen pra...@wxs.nl wrote:

 On 9/2/2013 6:14 PM, Alan Bowen wrote:
 
(personnaly I add also
 rm -f *.tui *.log *.tuo *.xdv *.mp *.tmp *.top *-mpgraph.*
*-mpgraph-temp.dvi *.tuc
at the end of each of the files to remove auxiliary files, but you
must be careful with removing such files as *.mp…).
 
 --purge

Thanks Hans for your attention, but saying
texexec --autogenerate --synctex=1 $1 --purge

or
context --autogenerate --synctex=1 $1 --purge

removes also the synctex.gz file and one loses the synctex functionality which 
is essential for me.

Best regards: OK
___
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] Different counters for titles

2013-09-03 Thread Hans Hagen

On 9/3/2013 8:14 AM, H. Özoguz wrote:

To solve my last asked question, I chose a somewhat easiert way and
defined an own chapter-title, which is unnumbered.

Here is my Minexample:

\definehead[mychapter][chapter]
\setuphead[mychapter][number=no]
\setupcombinedlist[content]
[list={mychapter, chapter, section}]

\starttext
\completecontent
\mychapter{Vorwort}
\chapter{First Chapter}
\section{Some section in the first chapter}
\chapter{Second chapter}
\section{Some section in the second chapter}
\stoptext

The problem is now: Obviously the counter of mychapter and chapter is
the same. Because first chapter begins with number 2, but should with
1 – that was the intention of this new chapter style, which is nothing
but a unnumbered copy of the default chapter. Was that idea wrong? How
to give chapter and mychapter their own counters, to achieve this result
– or any other way to let first chapter begin with 1 (but not subtract
1 from the numbers, because that ends up in the first section 1.0. The
first section of the first chapter should be numbered with 1.1, as
usual).


Indeed they are clones and the main reason is that you can use different 
rendering. In fact the topmost levels are :


\definesection[section-1] % part
\definesection[section-2] % chapter
\definesection[section-3] % section
\definesection[section-4] % subsection
\definesection[section-5] % subsubsection
\definesection[section-6] % subsubsubsection
\definesection[section-7] % subsubsubsubsection

There's a lot going on with section heading so having a copy of the same 
is non trivial as one should decide what gets copied (think of all kind 
of references).


Here's a cheat:

\starttext
\placelist[chapter][criterium=all]

\startchapter[ownnumber=1,title=chap 1] \startsection[title=sec 
1]\input ward \stopsection \stopchapter
\startchapter[ownnumber=1,title=chap 1] \startsection[title=sec 
1]\input ward \stopsection \stopchapter

\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] How to redefine \section temporaly?

2013-09-03 Thread john Culleton
On Sat, 31 Aug 2013 23:10:07 +0200
Romain Diss romain.d...@yahoo.fr wrote:

 Hi all,
 
 I wrote some articles with context and they contain (of course)
 sections. Now I have to include all these articles in a book but each
 article should become a section of the book. So I wonder if there is
 a way to convert the \section command of the article files into
 \subsection in the book.
 
 Minimal not working (but supposed to explain my problem) example:
 
 %%% article.tex
 \startsection[title=A first point]
 ... \stopsection
 \startsection[title=A second point]
 ... \stopsection
 
 %%% book.tex
 % command to make the \section of the input articles become
 \subsection % commands 
 \startsection[title=My first article]
   \input article
 \stopsection
 
 %%% end
 
 
 I know I can change the \section commands of the article.tex into 
 \ArticleSection and switch with
 \definehead[ArticleSection][section]
 \definehead[ArticleSection][subsection]
 depending of the context, but it would be better (for me) to not
 modify the article.tex files.
 
 Any ideas?
 
 Thank in advance.
 
If faced with this problem I would import the tex file into gvim and do
a mass change with one statement like:

:% s/\\section/\\subsection/

Then I would save the tex file under a different name.

If there are already subsections I would convert them to subsubsections
first, then convert the sections to subsections. Eqch step is just a
singl command in gvim.


-- 
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] texlive vs. Context minimal on Windows

2013-09-03 Thread john Culleton
On Sat, 31 Aug 2013 12:12:28 -0400
john Culleton j...@wexfordpress.com wrote:

 On Sat, 31 Aug 2013 11:40:57 -0400
 john Culleton j...@wexfordpress.com wrote:
 
  
 
 Just found a zip file which may contain the full context distro for 
 windows. Stay tuned for success/failure notice.
 

Failure. It was just a repackaging of the Windows download and unzip
software.

-- 
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] texlive vs. Context minimal on Windows

2013-09-03 Thread john Culleton
On Sat, 31 Aug 2013 23:44:30 +0200
Hans Hagen pra...@wxs.nl wrote:

 On 8/31/2013 5:40 PM, john Culleton wrote:
 
  If there were a way to download minimals or the full context suite
  for windows as an iso image I would be home free. But fate is not
  so kind to me.
 
 installing the garden via rsync (one can even be more monimal with an 
 initial --engine=luatex install as then successive runs will also
 only download luatex only) is way more efficient than an
 (uncompressed and carrying all engines) iso image each update
 
 Hans
 
 

In the general case, affecting 99.9% of Context users that is the best
strategy. I am however caught in an unusual situation. I have two
computers at my work station, both Syx (Systemax) computers and both
delivered without any OS. I installed Linux on both and they work just
fine. When I install Windows XP or Windows 7 on either machine there is
a problem with the ethernet connection. But my projected customer base
is likely of the Windows persuasion. 

Turning now to my template design, it is easiest for me if I use plain
instead of either Context or Latex formats. Luatex would be an ideal
candidate but for one thing. In pdftex and Context one can
set protrusion at a large or a smaller amount. The large version
is too large for a novel. However luatex hasn't advanced that far. I
assume that it will one day and that an updated version of luatex will
show up in your distros long before texlive is updated. 

In the meantime I am beating at the virtual doors of the support
people for Systemax looking for the correct Windows driver for ethernet.

Perhaps the protrusion problem has already been solved in your
latest luatex. I will check it out on my (linux) version of Context
standard. If not I will retreat to pdftex (gasp) for my template.
Protrusion and microtypography are two advantages of TeX and InDesign
for the novel writer. I need to be able to demonstrate those advantages
when offering my template.

As a reminder: I don't have a problem with documents I create here. I am
a bit fiddler from way back. It is the potential users of my templating
system that I am concerned about. Telling them that they must modify a
file buried in the innards of TeX is a bridge too far. 

-- 
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] outer floats on doublesided pages

2013-09-03 Thread R. Ermers
Dear all,

Does anyone know what causes this problem? Is it a bug?

Regards,

Robert


Op 30 aug. 2013, om 19:08 heeft R. Ermers het volgende geschreven:

 Dear all,
 
 I have problems with the placement of floats. I need them to be placed in the 
 outer edge of the text, but Context puts them in the middle of the page. The 
 outer, inner, outeredge, inneredge, commands do not work. Right and left do 
 work.
 
 Preferably the criterium option should also work, e.g. criterium=0.67.
 A minimal test file is attached. Try it out with a dummy, or with cow 
 picture, or with any other picture of your liking.
 
 I updated my context installation today to a bèta version. The version is: 
 2013.08.30 02.05.
 
 All help is welcome!
 Many thanks in advance,
 
 Robert
 
 tmp1.tex
 
 %%
 
 \setuppapersize[A4][A4]
 
 \setuppagenumbering[alternative=doublesided,location=footer]
 
 \definefloat[edgefigure][figure]
 
 \setupfloat
  [edgefigure]
  [leftmargindistance=-\outercombitotal,
   rightmargindistance=-\outercombitotal,
   default={outer,none,low,high}]
 
 \setupcaption[edgefigure][number=no]
 
 \useexternalfigure[cow][./cow.pdf]
 
 \starttext
 
 \startsection[title={insight},reference=insight]
 
 \placeedgefigure[][]{}{\framed[frame=off]{\externalfigure[cow][scale=150]}}
 When the first volume of Donald Knuth's The Art of Computer Programming was 
 published in 1969, it was typeset using hot metal type set by a Monotype 
 Corporation typecaster with a hot metal typesetting machine from the 19th 
 century which produced a good classic style appreciated by Knuth. When the 
 second edition of the second volume was published, in 1976, the whole book 
 had to be typeset again because the Monotype technology had been largely 
 replaced by photographic techniques, and the original fonts were no longer 
 available.[4] When Knuth received the galley proofs of the new book on 30 
 March 1977, he found them awful.[5] Around that time, Knuth saw for the first 
 time the output of a high-quality digital typesetting system, and became 
 interested in digital typography. The disappointing galley proofs gave him 
 the final motivation to solve the problem at hand once and for all by 
 designing his own typesetting system. On 13 May 1977, he wrote a memo to 
 himself describing the basic features of TeX.[6]
 
 \placeedgefigure[][]{}{\framed[frame=off]{\externalfigure[cow][scale=150]}}
 He planned to finish it on his sabbatical in 1978, but as it happened the 
 language was not frozen until 1989, more than ten years later. Guy Steele 
 happened to be at Stanford during the summer of 1978, when Knuth was 
 developing his first version of TeX. When Steele returned to MIT that autumn, 
 he rewrote TeX's I/O to run under the ITS operating system. The first version 
 of TeX was written in the SAIL programming language to run on a PDP-10 under 
 Stanford's WAITS operating system. For later versions of TeX, Knuth invented 
 the concept of literate programming, a way of producing compilable source 
 code and cross-linked documentation typeset in TeX from the same original 
 file. The language used is called WEB and produces programs in DEC PDP-10 
 Pascal.
 
 
 \placeedgefigure[][]{}{\framed[frame=off]{\externalfigure[cow][scale=150]}}
 When the first volume of Donald Knuth's The Art of Computer Programming was 
 published in 1969, it was typeset using hot metal type set by a Monotype 
 Corporation typecaster with a hot metal typesetting machine from the 19th 
 century which produced a good classic style appreciated by Knuth. When the 
 second edition of the second volume was published, in 1976, the whole book 
 had to be typeset again because the Monotype technology had been largely 
 replaced by photographic techniques, and the original fonts were no longer 
 available.[4] When Knuth received the galley proofs of the new book on 30 
 March 1977, he found them awful.[5] Around that time, Knuth saw for the first 
 time the output of a high-quality digital typesetting system, and became 
 interested in digital typography. The disappointing galley proofs gave him 
 the final motivation to solve the problem at hand once and for all by 
 designing his own typesetting system. On 13 May 1977, he wrote a memo to 
 himself describing the basic features of TeX.[6]
 He planned to finish it on his sabbatical in 1978, but as it happened the 
 language was not frozen until 1989, more than ten years later. Guy Steele 
 happened to be at Stanford during the summer of 1978, when Knuth was 
 developing his first version of TeX. When Steele returned to MIT that autumn, 
 he rewrote TeX's I/O to run under the ITS operating system. The first version 
 of TeX was written in the SAIL programming language to run on a PDP-10 under 
 Stanford's WAITS operating system. For later versions of TeX, Knuth invented 
 the concept of literate programming, a way of producing compilable source 
 code and cross-linked documentation typeset in TeX from the same 

Re: [NTG-context] Different counters for titles

2013-09-03 Thread H. Özoguz

\startchapter[ownnumber=1,title=chap 1]


This cheat gives the chapter his own number, but the counter still 
counts. So for my minexample it does not work:


\definehead[mychapter][chapter]
\setuphead[mychapter][number=no]

\setupcombinedlist
 [content]
 [list={mychapter, chapter, section}]

\starttext
\completecontent
\startmychapter[ownnumber=0,title=Vorwort]
\chapter{First Chapter}
\section{Some section in the first chapter}
\chapter{Second chapter}
\section{Some section in the second chapter}
\stoptext

Still first chapter has the number 2 etc. Of course I could change all 
chapter numbers by my own with this cheat ownnumber, but that would be 
inappropriate, I have many of them in my currect project, and maybe 
things change and then I have to change and correct all of them again 
and again ...


Maybe this way would work too: To define a new title (same styled like 
chapter, but not a clone), which has no counter and to add this title 
Vorwort into the toc. Then the first real chapter would 
automatically begin with 1?! Would that work, and if yes, how to do that?


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

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


Re: [NTG-context] installing two ConTeXt trees

2013-09-03 Thread Hans Hagen

On 9/3/2013 9:31 AM, Otared Kavian wrote:


On 2 sept. 2013, at 23:44, Hans Hagen pra...@wxs.nl wrote:


On 9/2/2013 6:14 PM, Alan Bowen wrote:


(personnaly I add also
 rm -f *.tui *.log *.tuo *.xdv *.mp *.tmp *.top *-mpgraph.*
*-mpgraph-temp.dvi *.tuc
at the end of each of the files to remove auxiliary files, but you
must be careful with removing such files as *.mp…).


--purge


Thanks Hans for your attention, but saying
texexec --autogenerate --synctex=1 $1 --purge

or
context --autogenerate --synctex=1 $1 --purge

removes also the synctex.gz file and one loses the synctex functionality which 
is essential for me.


i've added a test: if --synctex is given or the first line has

% synctex=zipped|unzipped|1|-1|yes

then the synctex file is not deleted

(not really tested as i never use synctex but it looks like it works ok)

-
  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] texlive vs. Context minimal on Windows

2013-09-03 Thread Hans Hagen

On 9/1/2013 6:56 PM, john Culleton wrote:

On Sat, 31 Aug 2013 23:44:30 +0200
Hans Hagen pra...@wxs.nl wrote:


On 8/31/2013 5:40 PM, john Culleton wrote:


If there were a way to download minimals or the full context suite
for windows as an iso image I would be home free. But fate is not
so kind to me.


installing the garden via rsync (one can even be more monimal with an
initial --engine=luatex install as then successive runs will also
only download luatex only) is way more efficient than an
(uncompressed and carrying all engines) iso image each update

Hans




In the general case, affecting 99.9% of Context users that is the best
strategy. I am however caught in an unusual situation. I have two
computers at my work station, both Syx (Systemax) computers and both
delivered without any OS. I installed Linux on both and they work just
fine. When I install Windows XP or Windows 7 on either machine there is
a problem with the ethernet connection. But my projected customer base
is likely of the Windows persuasion.


imo changing your workflow because of crappy hardware is a bad idea 
(it's hard to find a motherboard with an ethernet device on it that os 
so broken that windows won't work)



Perhaps the protrusion problem has already been solved in your
latest luatex. I will check it out on my (linux) version of Context
standard. If not I will retreat to pdftex (gasp) for my template.
Protrusion and microtypography are two advantages of TeX and InDesign
for the novel writer. I need to be able to demonstrate those advantages
when offering my template.


i'm not aware of problems with protrusion (not much changed in the 
implementation)


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] buffers.prepend()

2013-09-03 Thread Hans Hagen

On 9/1/2013 2:30 PM, Peter Münster wrote:

On Sun, Sep 01 2013, Wolfgang Schuster wrote:


\startrawsetups[letter:section:content]

Text before the content of the letter.

\getbuffer[MyLetter]

Text after the content of the letter.

\stoprawsetups


Yes, thanks! (I forgot about this part, because in my setup it was
hidden in another file...)

In the meantime I've played with the lua buffers functions:

\def\StopLetter{%
\ctxlua{buffers.prepend(MyLetter, START)}
\ctxlua{buffers.append(MyLetter, \\relax STOP)}
\placeletter
\stoptext}

This works also quite well.

buffers.prepend() does not yet exist. Hans, could you please add it? It
could be perhaps useful one day.


ok

-
  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] Setting `before` option of chapter breaks header text

2013-09-03 Thread Michael Scholtz
If chapter titles are styled using the `before` option, the header texts on 
each first page of the documents (body|back|appendix)part are incorrect, 
because chapter name and number are empty. 
(Tested with ConTeXt version 2013.05.28 00:36 and 2013.09.03 10:22)

Is this a bug? (If not, is there any other way to set `before` without breaking 
the headers?)

Here an example:

\setuphead[chapter][
before=\hairline\blank,  % headers work, if this line is removed
after=\nowhitespace\hairline,
]

\setuppagenumbering[location=]  % clear page numbers

\startsectionblockenvironment[frontpart]
\setupheadertexts[chapter][pagenumber]
\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
\setupheadertexts[{Chapter \getmarking[chapternumber]: 
\getmarking[chapter]}][pagenumber]
\stopsectionblockenvironment

\startsectionblockenvironment[backpart]
\setupheadertexts[chapter][pagenumber]
\stopsectionblockenvironment

\startsectionblockenvironment[appendix]
\setupheadertexts[{Appendix \getmarking[chapternumber]: 
\getmarking[chapter]}][pagenumber]
\stopsectionblockenvironment


\starttext
\startfrontmatter
\chapter{Front One}
Here the header is correct.
\chapter{Front Two}
\stopfrontmatter

\startbodymatter
\chapter{Body One}
Incorrect header on this page.
\page[yes]
Here the header is correct.
\chapter{Body Two}
\stopbodymatter

\startbackmatter
\chapter{Back One}
Incorrect (none) header on this page.
\chapter{Back Two}
\stopbackmatter

\startappendices 
\chapter{Appedix One}
Incorrect header on this page.
\chapter{Appedix Two}
\stopappendices
\stoptext


Regards,
Michael

___
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] Setting `before` option of chapter breaks header text

2013-09-03 Thread Wolfgang Schuster

Am 03.09.2013 um 16:02 schrieb Michael Scholtz scmi...@gmail.com:

 If chapter titles are styled using the `before` option, the header texts on 
 each first page of the documents (body|back|appendix)part are incorrect, 
 because chapter name and number are empty. 
 (Tested with ConTeXt version 2013.05.28 00:36 and 2013.09.03 10:22)
 
 Is this a bug? (If not, is there any other way to set `before` without 
 breaking the headers?)

It’s the wrong method to add rules at the begin/end of a heading.

A better way to add rules is to put a frame around the text.

\defineframedtext
  [ChapterFrame]
  [frame=off,
   width=\textwidth,
   topframe=on,
   bottomframe=on,
   offset=0pt,
   toffset=1ex,
   boffset=1ex]

\setuphead
  [chapter]
  [before=\startChapterFrame,
   after=\stopChapterFrame]

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] installing two ConTeXt trees

2013-09-03 Thread Otared Kavian

On 3 sept. 2013, at 10:50, Hans Hagen pra...@wxs.nl wrote:

 On 9/3/2013 9:31 AM, Otared Kavian wrote:
 […]
 Thanks Hans for your attention, but saying
  texexec --autogenerate --synctex=1 $1 --purge
 
 or
  context --autogenerate --synctex=1 $1 --purge
 
 removes also the synctex.gz file and one loses the synctex functionality 
 which is essential for me.
 
 i've added a test: if --synctex is given or the first line has
 
 % synctex=zipped|unzipped|1|-1|yes
 
 then the synctex file is not deleted

Hi Hans,

Thanks for the quick modification…
I tested the new beta, and indeed using mkiv and 
context --autogenerate --synctex=1 $1 --purge

the synctex.gz file is not anymore deleted (however a utility file 
[file-name].tuc remains).

I noticed also that using mkii and
texexec --autogenerate --synctex=1 $1 --purge

does delete the synctex.gz file, but this is expected since mkii is frozen and 
no change has effect ont it.

Best regards: OK
___
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] Setting `before` option of chapter breaks header text

2013-09-03 Thread Michael Scholtz
On 03.09.2013, at 16:13, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 03.09.2013 um 16:02 schrieb Michael Scholtz scmi...@gmail.com:
 
 If chapter titles are styled using the `before` option, the header texts on 
 each first page of the documents (body|back|appendix)part are incorrect, 
 because chapter name and number are empty. 
 (Tested with ConTeXt version 2013.05.28 00:36 and 2013.09.03 10:22)
 
 Is this a bug? (If not, is there any other way to set `before` without 
 breaking the headers?)
 
 It’s the wrong method to add rules at the begin/end of a heading.
 
 A better way to add rules is to put a frame around the text.
 
 \defineframedtext
  [ChapterFrame]
  [frame=off,
   width=\textwidth,
   topframe=on,
   bottomframe=on,
   offset=0pt,
   toffset=1ex,
   boffset=1ex]
 
 \setuphead
  [chapter]
  [before=\startChapterFrame,
   after=\stopChapterFrame]
 
 Wolfgang


Thanks, I got this from the wiki page: 
http://wiki.contextgarden.net/Titles#Your_Own_Titling_Levels
...but it seems to be wrong there.

I used `before` (probably in the wrong way ;-) ) to add more space above each 
chapter title. 
How to do this without `before`?

Michael


___
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] Setting `before` option of chapter breaks header text

2013-09-03 Thread Wolfgang Schuster

Am 03.09.2013 um 16:32 schrieb Michael Scholtz scmi...@gmail.com:

 On 03.09.2013, at 16:13, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 
 Am 03.09.2013 um 16:02 schrieb Michael Scholtz scmi...@gmail.com:
 
 If chapter titles are styled using the `before` option, the header texts on 
 each first page of the documents (body|back|appendix)part are incorrect, 
 because chapter name and number are empty. 
 (Tested with ConTeXt version 2013.05.28 00:36 and 2013.09.03 10:22)
 
 Is this a bug? (If not, is there any other way to set `before` without 
 breaking the headers?)
 
 It’s the wrong method to add rules at the begin/end of a heading.
 
 A better way to add rules is to put a frame around the text.
 
 \defineframedtext
 [ChapterFrame]
 [frame=off,
  width=\textwidth,
  topframe=on,
  bottomframe=on,
  offset=0pt,
  toffset=1ex,
  boffset=1ex]
 
 \setuphead
 [chapter]
 [before=\startChapterFrame,
  after=\stopChapterFrame]
 
 Wolfgang
 
 
 Thanks, I got this from the wiki page: 
 http://wiki.contextgarden.net/Titles#Your_Own_Titling_Levels
 ...but it seems to be wrong there.

It’s a solution which works but also with side effects because allow TeX to 
break
the page between the rule and the heading which isn’t the case with framedtext
where the whole block is unbreakable.

 I used `before` (probably in the wrong way ;-) ) to add more space above each 
 chapter title. 
 How to do this without `before`?

Controlling the space before and after the heading is the default way in which 
the before/after
keys are used. There has been a few suggestions to add a spacebefore key to 
\setuphead which
will replace before=\blank for this but this hasn’t happened so far.

In the example above you can now set the spaces before and after the heading in 
the framedtext
setup with before={\blank[2cm]} and after=\blank.

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] Setting `before` option of chapter breaks header text

2013-09-03 Thread Michael Scholtz

On 03.09.2013, at 17:54, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 03.09.2013 um 16:32 schrieb Michael Scholtz scmi...@gmail.com:
 
 On 03.09.2013, at 16:13, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 
 Am 03.09.2013 um 16:02 schrieb Michael Scholtz scmi...@gmail.com:
 
 If chapter titles are styled using the `before` option, the header texts 
 on each first page of the documents (body|back|appendix)part are 
 incorrect, because chapter name and number are empty. 
 (Tested with ConTeXt version 2013.05.28 00:36 and 2013.09.03 10:22)
 
 Is this a bug? (If not, is there any other way to set `before` without 
 breaking the headers?)
 
 It’s the wrong method to add rules at the begin/end of a heading.
 
 A better way to add rules is to put a frame around the text.
 
 \defineframedtext
 [ChapterFrame]
 [frame=off,
 width=\textwidth,
 topframe=on,
 bottomframe=on,
 offset=0pt,
 toffset=1ex,
 boffset=1ex]
 
 \setuphead
 [chapter]
 [before=\startChapterFrame,
 after=\stopChapterFrame]
 
 Wolfgang
 
 
 Thanks, I got this from the wiki page: 
 http://wiki.contextgarden.net/Titles#Your_Own_Titling_Levels
 ...but it seems to be wrong there.
 
 It’s a solution which works but also with side effects because allow TeX to 
 break
 the page between the rule and the heading which isn’t the case with framedtext
 where the whole block is unbreakable.
 
 I used `before` (probably in the wrong way ;-) ) to add more space above 
 each chapter title. 
 How to do this without `before`?
 
 Controlling the space before and after the heading is the default way in 
 which the before/after
 keys are used. There has been a few suggestions to add a spacebefore key to 
 \setuphead which
 will replace before=\blank for this but this hasn’t happened so far.
 
 In the example above you can now set the spaces before and after the heading 
 in the framedtext
 setup with before={\blank[2cm]} and after=\blank.
 
 Wolfgang

Thanks for the hints. 
I tried `\blank` commands in `before`, but it seems to have to effect. A space 
before `\blank` (like `before={\ \blank[5em]}`) makes it work, but is not so 
nice.

But using `toffset` and `boffset` does the job, even without `\blank`s:

\defineframedtext[ChapterFrame][
frame=off,
width=\textwidth,
offset=0pt,
toffset=5em,
boffset=2em,
]

\setuphead[chapter][
before=\startChapterFrame,
after=\stopChapterFrame,
]

Regards,
Michael





___
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] Setting `before` option of chapter breaks header text

2013-09-03 Thread Wolfgang Schuster

Am 03.09.2013 um 20:22 schrieb Michael Scholtz scmi...@gmail.com:

 I tried `\blank` commands in `before`, but it seems to have to effect. A 
 space before `\blank` (like `before={\ \blank[5em]}`) makes it work, but is 
 not so nice.

TeX ignores a \blank at the begin of a page, to force the space you can 
“before=\blank[force,value]”.

 But using `toffset` and `boffset` does the job, even without `\blank`s:

This is wrong because the toffset and buffet control the margins *in* the boy 
and not around the box.

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] Setting `before` option of chapter breaks header text

2013-09-03 Thread Michael Scholtz

On 03.09.2013, at 20:32, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 03.09.2013 um 20:22 schrieb Michael Scholtz scmi...@gmail.com:
 
 I tried `\blank` commands in `before`, but it seems to have to effect. A 
 space before `\blank` (like `before={\ \blank[5em]}`) makes it work, but is 
 not so nice.
 
 TeX ignores a \blank at the begin of a page, to force the space you can 
 “before=\blank[force,value]”.
 
 But using `toffset` and `boffset` does the job, even without `\blank`s:
 
 This is wrong because the toffset and buffet control the margins *in* the boy 
 and not around the box.


Thanks again, with `force` option everything works fine.

Regards,
Michael





___
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] Another issue with my magazine

2013-09-03 Thread Mikoláš Štrajt
% Hello All!
%
% In the folowing style, I need to do some whitespace tweaks. Unfortunately, I 
didn't found solutions in manual, so I am asking here.
%
% I need:
%
% - make first paragraph after author name noindented, i tried to put some 
\nointdent here, but without any effect
% - make vertical space between article head and author name shorter (also in 
general : modify vertical spaces of heads)
%
% Regards Mikoláš Štrajt
%
% PS: You can use this e-mail as source code of my solution. :-D


%%%
%%% FOLLOWING IS STYLE AS IS USED IN REAL LIFE %%%
%%%

% Čeština
\enableregime[utf]

% Fonty
\definetypeface [iwona] [ss] [sans] [iwona] [default] [encoding=ec]
\definetypeface [antykwa] [rm] [serif] [antykwa-torunska] [default] 
[encoding=ec]
\usetypescript[modern][ec]
\setupbodyfont[ss,10pt]

% Papír a číslování řádek

\mainlanguage[cz]

\setuppapersize[A4][A4]
\setuppagenumbering[location={footer,middle}]

% Struktura

\definehead[kochapter][chapter]
\setuphead[title][style=\antykwa, number=no]
\setuphead[kochapter][placehead=empty,before=,after=,number=no]
\setuphead[section][page=no,style=\tfb\iwona\grave,number=no]

\def\rubrika #1{\kochapter{#1}}

\def\prispevek #1#2{
\section{#2}
{\noindent \rm \sc #1} \noindent \endgraf \noindent
}

% Hlavička a patička

\setupheadertexts[]
\setupheadertexts[\setups{hlavicka}][][][\setups{hlavicka}]

\startsetups[hlavicka]
  \zanrO{\getmarking[kochapter]}
\stopsetups


% Odstavce
\setupindenting[yes, small]
\setupheads[indentnext=no]

% Záložky a PDF
\placebookmarks[kochapter,section][force=yes]
\setupinteractionscreen[option=bookmark]
\setupinteraction[state=start,
  title={Neslyšný kočkopes},
  author={Psanci}]

% TOC

\setupcombinedlist[content][list={kochapter,section,subsection}]
\setuplist[kochapter][interaction=text,color=green,textcommand=\WORD]
\setuplist[section][interaction=text,color=green]

% Barvy

\setupcolors[state=start]
\definecolor[indigo][r=.0, g=0.0, b=0.5]
\definecolor[green][r=0, g=0.5, b=0]
\definecolor[ruda][r=0.5, g=0, b=0]
\definecolor[grave][r=0.5, g=0.5, b=0.5]

% Makra

\def\citat #1#2{
{\it
#1
\blank[1*halfline]
\rightaligned{--- #2}
}}

\def\trojtecka {
{\bf \ruda \tt...}
}

\def \robotitulka{
\startstandardmakeup
\title{Neslyšný kočkopes - \getvariable[cislo]}
\placecontent
\stopstandardmakeup
\page
}

\def\zanrO #1{
\framed[
  background=color,
  backgroundcolor=grave,
  foreground=color,
  foregroundcolor=white,
  frame=off.
  width=\hsize
  ]{\antykwa \rightaligned{\WORD{#1}~~}}
}

\setupdelimitedtext[blockquote][style=\slx,before={\setupinterlinespace[line=2.4ex]}]

%%%
%%% FOLLOWING IS EXAMPLE TEXT %%%
%%%

%%% `rubrika` is section of magazine
\rubrika{Example}

%%% `pripevek` is article
%%% syntax is \prispevek{author name}{article name}

\prispevek{Steve W. Hawking}{The Universe in a Nutshell}

\dorecurse{10}{\input hawking\par}
___
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] vragen over layoutinstellingen

2013-09-03 Thread luigi scarso
2013/9/4 Ernst van der Storm evdst...@xs4all.nl

 PS ConTeXt (b)lijkt eenvoudiger dan LaTeX, maar dit soort moeilijkheden
 frustreren...

 yes, it's different from latex, but it doesn't mean that it is easier than
latex.



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

[NTG-context] Unexpected EPUB Output

2013-09-03 Thread Thangalin
Hi,

I ran the following commands:

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

This produced the following code:

 document xmlns:m=http://www.w3.org/1998/Math/MathML; date=Tue Sep  3
17:29:27 2013 xmlns:xhtml=http://www.w3.org/1999/xhtml; file=t
context=2013.08.17 00:58 version=0.30 language=en
  division detail=frontpart
*Title pageCopyright
*   xhtml:a name=aut_1section detail=title location=aut:1
reference=content
  sectiontitleContents/sectiontitle

The Title page and Copyright page are inseparable text. I believe this
is due to how the front matter is coded:

\startfrontmatter
  \startstandardmakeup
Title page
  \stopstandardmakeup
  \startstandardmakeup
Copyright
  \stopstandardmakeup
  \completecontent
\stopfrontmatter

The front matter produces correct PDF output (with three separate pages for
the title page, copyright page, and ToC, respectively).

What must I do to wrap the *Title page* and *Copyright* page in separate
elements, yet still produce the same PDF?

Kind regards.


t.tex
Description: TeX document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] 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
___