[NTG-context] odd and even test: incorrect behavior on the first two lines

2012-09-06 Thread stdin | Alexandre Leray

Hi,

I'm trying to make the content of an environment behave differently 
weither it appears on a right page or on a left page. It works mainly, 
except that with the following code, from the second page, the two first 
lines of subsequent pages don't show the expected behavior.


\setuppagenumbering[alternative=doublesided]
\definestartstop[foo][
before={\doifrightpageelse{(right)}{(left)}},
]
\starttext
\dorecurse{100}{
\startfoo
hello world\par
\stopfoo
}
\stoptext

Is it a known problem? How can one fix this?

Thanks,

Alex

--
Alexandre Leray
media  graphic design
http://stdin.fr | http://osp.constantvzw.org/
rue Gallaitstraat 80
1030 Bruxelles
+32 (0)4 87 04 70 30

___
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] reading from standard input

2012-06-08 Thread stdin | Alexandre Leray

Hi,

I was wondering if there was a way to make context read from stdin 
instead of reading from a file?


cat /path/to/src.tex | context --result=/path/to/result.pdf

I'd like to do something like this in python:

def generate_pdf(self):

src = 
\starttext
\section[éléments-de-transmission]{Éléments de transmission}

Un module dans lequel une communauté temporaire d'étudiants et
d'enseignants s'exerce à mettre en situation des réflexions et des
moments de transmission en interrogeant sans cesse la question de
l'enseignement. La configuration des enseignants est variable selon
les situations. Les situations seront mises en place en semaine 
A et B
selon l'emploi du temps. Chaque nouvelle situation invente sa 
méthode.

\stoptext

cmd = 'context --result=/tmp/result.pdf'
p1 = subprocess.Popen(cmd.split( ), stdout=subprocess.PIPE, 
stdin=subprocess.PIPE)

(stdout, stderr) = p1.communicate(stdin=src)


Thanks,

Alex

--
Alexandre Leray
media  graphic design
http://stdin.fr | http://osp.constantvzw.org/
rue Gallaitstraat 80
1030 Bruxelles
+32 (0)4 87 04 70 30

___
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] reading from standard input

2012-06-08 Thread stdin | Alexandre Leray

Thank you,

I will try this!

Alex

On 08/06/2012 15:31, Aditya Mahajan wrote:

On Fri, 8 Jun 2012, stdin | Alexandre Leray wrote:


Hi,

I was wondering if there was a way to make context read from stdin 
instead of reading from a file?


   cat /path/to/src.tex | context --result=/path/to/result.pdf

I'd like to do something like this in python:

   def generate_pdf(self):

   src = 
   \starttext
   \section[éléments-de-transmission]{Éléments de transmission}

   Un module dans lequel une communauté temporaire d'étudiants et
   d'enseignants s'exerce à mettre en situation des réflexions et 
des

   moments de transmission en interrogeant sans cesse la question de
   l'enseignement. La configuration des enseignants est variable 
selon
   les situations. Les situations seront mises en place en 
semaine A et B
   selon l'emploi du temps. Chaque nouvelle situation invente sa 
méthode.

   \stoptext
   
   cmd = 'context --result=/tmp/result.pdf'
   p1 = subprocess.Popen(cmd.split( ), stdout=subprocess.PIPE, 
stdin=subprocess.PIPE)

   (stdout, stderr) = p1.communicate(stdin=src)



You can try context --pipe --result=/tmp/result.pdf but that only runs 
the document once, so cross referencings, TOC, etc won't work 
correctly. The other options is to write to a file, and then run 
context --purgeall --result=/tmp/result.pdf filename; this will run 
the document appropriate number of times, and then delete the temp 
files, leaving only the .tex and the .pdf file.


Aditya


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

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


--
Alexandre Leray
media  graphic design
http://stdin.fr | http://osp.constantvzw.org/
rue Gallaitstraat 80
1030 Bruxelles
+32 (0)4 87 04 70 30

___
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] doublesided layout with floating text blocks wrapped in the main text

2011-10-10 Thread Alexandre Leray

Hi,

how can I insert text blocks of texts of half the width of the text zone 
(+ gutter) tand make the main text flow wrap around them?
I'd like the blocks to be aligned on the outer side of the page (the 
document is doublesided).


My guess was to use floats but I don't need captions. Could you give me 
a snipet of how i'd need to do it?


You'll find a quick example of what I have in mind at this address:

http://stdin.fr/wrapped_text.pdf

Thanks!

Alex

___
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] doublesided layout with floating text blocks wrapped in the main text

2011-10-10 Thread Alexandre Leray

Thanks,

Unfortunatly they don't have a fixed height... any other option?

;)

Alex

On 10/10/2011 11:38, luigi scarso wrote:

On Mon, Oct 10, 2011 at 11:31 AM, Alexandre Leray
newslett...@alexandreleray.com  wrote:

Hi,

how can I insert text blocks of texts of half the width of the text zone (+
gutter) tand make the main text flow wrap around them?
I'd like the blocks to be aligned on the outer side of the page (the
document is doublesided).

My guess was to use floats but I don't need captions. Could you give me a
snipet of how i'd need to do it?

You'll find a quick example of what I have in mind at this address:

http://stdin.fr/wrapped_text.pdf

Thanks!

Do they have fixed dimensions ?
If so maybe column sets can help:
cfr. http://wiki.contextgarden.net/Columns#Column_Sets


___
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] vertically aligned side margin footnotes

2011-10-09 Thread Alexandre Leray

Hi,

Would it be possible to typeset the text on the left page and the 
comments on the right page?


Thanks

Alex

There is an experimental stream feature but I haven't looked into that
one for a while.

___
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] vertically aligned side margin footnotes

2011-10-07 Thread Alexandre Leray

Hello Wolfgang,

Thanks for your reply. I will adjust my text flow manually if 
necessary as I only have a couple of pages to deal with.


While I was searching for an answer in the mailing list archive I found 
this email:


[NTG-context] Flowfram-like behavior?
http://archive.contextgarden.net/message/20110706.133155.c488c215.en.html

I think such a feature would have been great here, and I was wondering 
if there was any plan for this in the future?


Thank you,

Alex

On 07/10/2011 10:02, Wolfgang Schuster wrote:

No, margin texts are unbreakable blocks.

When you many side notes with lots of text it’s better to use a layout with a 
wider margin and a narrower textblock, before you do this you can try 
“\inmargin[stack=yes]{…}” in the definition of the side note command.

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] vertically aligned side margin footnotes

2011-10-06 Thread Alexandre Leray

Hi and thanks for your help.

it works except that when the sidenote is too long it overflows the 
page. Is there a way to make the note continuing on the next page if it 
doesn't fit?


Thanks again,

Alex

On 06/09/2011 22:27, Wolfgang Schuster wrote:


Am 06.09.2011 um 18:25 schrieb Alexandre Leray:


Hi again,

is there a way to typeset footnotes in the margin, but placed at the same 
vertical distance as the text they refer to?


No, but you can combine \inmargin and a counter:

\usemodule[annotation]

\define[2]\SidenoteCommand
   {\rawnumber[sidenote]%
\inright{#1: #2}}

\defineannotation
   [sidenote]
   [alternative=command,
command=\SidenoteCommand,
number=yes]

\starttext

text text\sidenote{this is a note} text text

\input knuth

text text\sidenote{this is a note} text text

\stoptext

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

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



___
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] Retrieve the content of comments

2011-09-06 Thread Alexandre Leray

Hi,

I have a text with commented spans. The comments come later in the book, 
and I'd like to show the commented parts just above the comments 
themselves. Here is a pseudo code:


Vestibulum ante \commented[mycomment]{ipsum primis} in faucibus orci 
luctus et ultrices posuere cubilia Curae; Fusce pretium orci lectus, a 
egestas sapien. Maecenas ante tellus, cursus sed feugiat non, lacinia 
sit amet dui. Nam vel tortor sed leo pulvinar ornare.


\pagereference[mycomment]
This is my comment...

I'd like to get something like this:

Vestibulum ante _ipsum primis_^1 in faucibus orci luctus et ultrices 
posuere cubilia Curae; Fusce pretium orci lectus, a egestas sapien. 
Maecenas ante tellus, cursus sed feugiat non, lacinia sit amet dui. Nam 
vel tortor sed leo pulvinar ornare.


(page break)

_ipsum primis_
This is my comment...

Is there any way to achieve this?

Thanks,

Alex
___
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] vertically aligned side margin footnotes

2011-09-06 Thread Alexandre Leray

Hi again,

is there a way to typeset footnotes in the margin, but placed at the 
same vertical distance as the text they refer to?


Thanks,

Alex
___
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] styling \at

2011-08-15 Thread Alexandre Leray

Hi,

I would like to style the \at labels: define a custom font for them and 
make them superscript. What is the best way to achieve this?


Thanks,

Alex
___
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] Using mycrotypography features with simplefont module and OTF/TTF

2011-07-22 Thread Alexandre Leray

Dear all,

I'm trying to enable protrusion on a text composed with a ttf font 
(tried otf converted from ttf as well)
and using the simplefont module. We have tried different things but did 
not see any difference in the results.


Our context version is 2011.07.20 14:10

The full context code is visible here: http://dpaste.com/574351/

The relevant chunk is this:

% USING SIMPLEFONT: FAILS %
%\usemodule[simplefonts][protrusion=quality,expansion=quality]
%\setmainfont[umepmincho]

% USING TYPESCRIPT: FAILS TOO %
\starttypescript [serif] [umepmincho]
\definefontsynonym [Serif]   [name:umepmincho]
\stoptypescript
\definetypeface[umepmincho][rm] [serif] [umepmincho]

\definefontfeature[default][default][expansion=quality,protrusion=quality]

\setupalign[hz,hanging]
\setupbodyfont[umepmincho, 10pt]
\definebodyfontenvironment[default][x=0.75 ,a=1.5, b=1.75, 
c=2,d=3.4] % defines higher sizes of fonts


Is there a way to make it work?


Thanks!

Alex
___
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] Custom function

2011-06-07 Thread Alexandre Leray

Hello,

I'm rather new to ConTeXt and would like to simplify my document, in
order to simplify processing of documents.

I have this:

\defineparagraphs[infos][n=1]
\setupparagraphs[infos][1][
style={\switchtobodyfont[6pt]},
%command=,
]

\starttext

\startinfos
\smash{\lower22pt\hbox{
\margintext[left]{
Edition de Trilogie de l'enfer en novembre 2011 chez Sens
Tonka
}}}
\stopinfos

\input tufte
\stoptext

I would like to avoid putting \inmargin and
\smash{\lower22pt\hbox{... by hand and add it directly to the
setupparagraphs.

Can I do such a thing?

Thanks for help!

Alex
___
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] writing the name of the section on all the pages

2011-05-19 Thread Alexandre Leray
Hi,

how could I write the name of the current \section or \subject in the
outer margin, with a rotation of 90°?

Best,

Alex

-- 
stdin
Alexandre Leray
graphic and media design
http://stdin.fr/
Munthofstraat 27
1060 Bruxelles
___
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] writing the name of the section on all the pages

2011-05-19 Thread Alexandre Leray
Thanks Marco,

I'm probably missing a piece here has it doesn't produce anything
visible in my composition. I'm a newbie at context; could you detail a
little bit more how to implement this or is this snippet anything I'm
supposed to need?

Thanks,

Alex

On 19/05/11 18:58, Marco wrote:
 how could I write the name of the current \section or \subject in the
 outer margin, with a rotation of 90°?
 
 \setupbackgrounds [state=repeat]
 \defineoverlay [side]
   [{\rotate[rotation=90]{\getmarking[section]}}]
 \setupbackgrounds [text] [rightmargin]
   [background=side]
 
 Marco
 
 
 ___
 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
 ___


-- 
stdin
Alexandre Leray
graphic and media design
http://stdin.fr/
+32 (0)4 85 27 76 08
Munthofstraat 27
1060 Bruxelles
___
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
___