Re: [NTG-context] placefigure and listoffigures

2016-03-15 Thread Alan BRASLAU
On Tue, 15 Mar 2016 23:01:46 +0100
Wolfgang Schuster  wrote:

> \startplacefigure [location={inmargin,none}]

Thank you, clean and elegant (and much easier than Willi's suggestion).
The syntax is a bit magical, though ("location" of the caption).

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

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

Re: [NTG-context] placefigure and listoffigures

2016-03-15 Thread Wolfgang Schuster

Alan BRASLAU 
15. März 2016 um 21:43
Hi,

How can one suppress the addition of a placed figure to the
listoffigures?

In the following MWE, list=no places "no" as an alternative to the
(blank) title.

Alan


\starttext

\startplacefigure [location=inmargin,number=no,list=no]

\startplacefigure [location={inmargin,none}]

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] Howto use the lua io.read() function only in the first context run?

2016-03-15 Thread Hans Hagen

On 3/15/2016 9:04 PM, Romain Diss wrote:

Hi all,

I want to write a cld document with some data read on the standard
input. I'm using the lua io.read() function but it's launched at every
context passes (depending on the case, it is launched 2 to 3 times).

-- Minimum not working example
local name = io.read()
context.startdocument()
context("Hello " .. name)
context.stopdocument()


you can test for environment.arguments.currentrun being "1"

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] placefigure and listoffigures

2016-03-15 Thread Willi Egger
I would define another float and assign this not to be listed float to this new 
float-type something like \definefloat[Notlisted][figure] and then
\startplaceNotlisted
\externalf…
\stopplaceNotlisted

Best wishes

Willi
> On 15 mrt. 2016, at 21:43, Alan BRASLAU  wrote:
> 
> Hi,
> 
> How can one suppress the addition of a placed figure to the
> listoffigures?
> 
> In the following MWE, list=no places "no" as an alternative to the
> (blank) title.
> 
> Alan
> 
> 
> \starttext
> 
> \startplacefigure [location=inmargin,number=no,list=no]
>  \externalfigure [cow] [width=1cm]
> \stopplacefigure
> \input knuth
> 
> \blank
> 
> \placelistoffigures [criterium=all]
> 
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

___
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] placefigure and listoffigures

2016-03-15 Thread Alan BRASLAU
Hi,

How can one suppress the addition of a placed figure to the
listoffigures?

In the following MWE, list=no places "no" as an alternative to the
(blank) title.

Alan


\starttext

\startplacefigure [location=inmargin,number=no,list=no]
  \externalfigure [cow] [width=1cm]
\stopplacefigure
\input knuth

\blank

\placelistoffigures [criterium=all]

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

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

[NTG-context] Howto use the lua io.read() function only in the first context run?

2016-03-15 Thread Romain Diss
Hi all,

I want to write a cld document with some data read on the standard
input. I'm using the lua io.read() function but it's launched at every
context passes (depending on the case, it is launched 2 to 3 times).

-- Minimum not working example
local name = io.read()
context.startdocument()
context("Hello " .. name)
context.stopdocument()

Thanks in advance.

-- 
Romain Diss
___
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] Are nested sections possible?

2016-03-15 Thread Alan BRASLAU
On Tue, 15 Mar 2016 18:10:27 +0100
"Thomas A. Schmitz"  wrote:

> But don't let anyone 
> tell you that explicit names are "antiquated." They make TeX or xml 
> source documents so much more readable! And when you have to retrace 
> five levels of \startsectionlevels because you want to change the 
> structure of your document, you will rue the day you abandoned proper
> names.

When you want to change the structure of your document when using
structure levels, all that you need do is add or subtract a level of
nesting. With named levels, it is easy to create complicated documents
that jump around in level, which would be pretty messy.

What a nightmare it would be to add or subtract a named structure level
in a complicated document.

This being said, I still mostly use named structure levels myself, as
old habits are hard to change (but don't tell Hans this!).

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

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

Re: [NTG-context] Are nested sections possible?

2016-03-15 Thread Thomas A. Schmitz

On 03/15/2016 05:54 PM, Alan BRASLAU wrote:

Indeed, Hans, it would be nice to be able to nest sectionlevels within
a chapter...section... scheme (which is NOT depreciated, although
antiquated).


Oooh, shiny! In the TEI community, there are also people who repeat that 
having s all the way down is modern, and  etc. is old 
hat. Well, I like to think about the way I structure my texts before I 
write them. I'm old fashioned that way...


But seriously: by all means, let's allow nesting. But don't let anyone 
tell you that explicit names are "antiquated." They make TeX or xml 
source documents so much more readable! And when you have to retrace 
five levels of \startsectionlevels because you want to change the 
structure of your document, you will rue the day you abandoned proper names.


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] Are nested sections possible?

2016-03-15 Thread Alan BRASLAU
Indeed, Hans, it would be nice to be able to nest sectionlevels within
a chapter...section... scheme (which is NOT depreciated, although
antiquated).

Currently, \startsectionlevel will by default start a chapter. One
would like it to start a section if located within a chapter, a
subsection, if located within a section, etc. This should be possible.

Alan


On Mon, 14 Mar 2016 09:05:49 +0100
Procházka Lukáš Ing.  wrote:

> Hello,
> 
> one more thing:
> 
> It would be nice to allow mixing:
> 
> - \section like commands (or \startsection ... \stopsection)
> - AND \startsectionlevel ... \stopsectionlevel.
> 
> The main problem is that one may NEED to mix:
> 
> - (ancient) source files which use \section (deprecated) style
> - with more versatile \start-\stopsectionlevel style in newer source
> files.
> 
> See the test attached - only the case 3 works universally with the
> \start-\stopstructurelevel; any mixing of sectioning styles doesn't
> yield a desired result.
> 
> Best regards,
> 
> Lukas
> 
> 
> On Sat, 12 Mar 2016 01:53:18 +0100, Alan BRASLAU
>  wrote:
> 
> > On Fri, 11 Mar 2016 09:36:01 +0100
> > Pablo Rodriguez  wrote:
> >  
> >> Sorry, Mica, but which is the gain in nesting sections (whether
> >> possible or not) over using subsections and subsubsections?
> >>
> >> I can hardly imagine the sense in the point you’re making. (Sorry,
> >> it must be my fault.)  
> >
> > Think about including source in another source, for example.
> >
> > Say one has an article that becomes a book, or gets included in a
> > book, or the book gets parts. In the course of writing, one might
> > decide to add an additional level of structure and not want to
> > change all of the \start...\stop structure definitions.
> >
> > In fact, using fixed section, subsection, subsubsection is a bit
> > antiquated, isn't it?
> >
> > Alan
> > ___
> > If your question is of interest to others as well, please add an
> > entry to the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> > http://www.ntg.nl/mailman/listinfo/ntg-context webpage  :
> > http://www.pragma-ade.nl / http://tex.aanhet.net archive  :
> > http://foundry.supelec.fr/projects/contextrev/ wiki :
> > http://contextgarden.net
> > ___
> >   
> 
> 



-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS UMR 3680
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.fr
___
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] duplex printing and doublesided

2016-03-15 Thread Pablo Rodriguez
Hi Hans,

I have the following sample:

\setuppagenumbering[alternative=doublesided]
\setupinteractionscreen[option=portrait]
\starttext
No duplex printing.
\page[right]
In this document.
\stoptext

I’m afraid that doublesided alternative disables duplex printing.

This would be a good reason to implement the features already asked at
https://mailman.ntg.nl/pipermail/ntg-context/2016/084298.html.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Page number woes

2016-03-15 Thread Pablo Rodriguez
On 03/14/2016 03:43 PM, Mari Voipio wrote:
> Greetings all!
> 
> I have a book setup that worked perfectly as long as the inside cover
> was only one page long. But then we added information to the inside
> cover and had to split the information on two pages. The so called
> inside cover works fine, the TOC works fine, but the main text part
> (starting with Intro) begins now on page 2 when it should be on page
> 1. And this happens even when the TOC is two pages long, which is a
> bit weird (I would assume that if it counts TOC into page numbers,
> two-page TOC would mean that Intro starts on page 3, but nope, it
> still starts on page 2).
> [...]

Hi Mari,

how about adding "\setcounter[userpage][1]" just before the introduction?

Just in case it might help,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Page number woes

2016-03-15 Thread Wolfgang Schuster

Mari Voipio 
14. März 2016 um 15:43
Greetings all!

I have a book setup that worked perfectly as long as the inside cover
was only one page long. But then we added information to the inside
cover and had to split the information on two pages. The so called
inside cover works fine, the TOC works fine, but the main text part
(starting with Intro) begins now on page 2 when it should be on page
1. And this happens even when the TOC is two pages long, which is a
bit weird (I would assume that if it counts TOC into page numbers,
two-page TOC would mean that Intro starts on page 3, but nope, it
still starts on page 2).

The minimal sample attached to this message is really ugly as it
doesn't contain any of the environment files, but the problem is
visible here just as well as in the real thing - if I make the second
page of the inside cover disappear, Intro starts on page 1 as it
should. If the so called inside cover is two pages long, Intro starts
on page 2. (The file to be compiled is prd-pr43-general_test.tex, the
others are component files.)

It is quite possible the TOC file is the culprit and it has been pure
luck that everything has worked until now... I don't understand the
page mechanism in ConTeXt well enough to see where the problem is.

I noticed that my ConTeXt version is pretty old: "ConTeXt ver:
2015.02.03 23:55 MKIV beta" (hmm... I didn't update at ConTeXt meeting
as I usually do, stupid me.)
I'd rather not update just now (production in sensitive phase), but if
you think the problem will go away with an update, I'll do it.

Move your intro text after the \startfrontmatter command everything before
it doesn’t belong to any sectionblock.

You can also omit \startext and \stoptext commands when you \startcomponent
etc. because they already do the work of \starttext.

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 to store command line arguments in ConTeXt LUA Documents?

2016-03-15 Thread Hans Hagen

On 3/14/2016 10:46 PM, Romain Diss wrote:

Is it possible to store context command line arguments into lua
variables?
[...]
What I would like to do is something like this:

-- start of the example
something = context.getcommandlineargument("ARG1") -- doesn't exist
-- make some tests here to check if 'something' has the right syntax
context.startdocument{title = something}
context.input("knuth")
context.stopdocument()
-- end of the example

Then, one has just to launch:
$ context file.cld --ARG1="My first title"


environment.arguments

Thank you. It works very well.

I did not find this table in any documentation. Did I forget something?

If I want to document it, what is the best place?
- http://wiki.contextgarden.net/Command/getdocumentargument
- another place in the wiki which evokes lua environment tables...


maybe expand the lua section of the wiki


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___