Re: [NTG-context] mkiv versus mkii: whitespace issues

2015-03-15 Thread Gerben Wierda
mkii result



On 14 Mar 2015, at 17:14, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 14.03.2015 um 15:54 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 I am running into two issues with my mkii-to-mkiv conversion project
 
 - The \chapter command in mkiv uses more whitespace between the header and 
 the first paragraph. How can I influence this?
 - \startitemize[packed,joinedup] inserts whitespace between the list and the 
 paragraph before it where mkii doesn’t
 
 How can I fix this?
 
 Do you have a example because I can’t reproduce it.
 
 \showgrid
 
 \starttext
 
 \chapter{\contextmark}
 
 \input knuth
 
 \startitemize[packed,joinedup]
 \item One
 \item Two
 \item Three
 \stopitemize
 
 \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
___

Re: [NTG-context] Indentation within footnotes

2015-03-15 Thread Pablo Rodriguez
On 03/15/2015 03:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
 [...]
 \setupnotation[footnote][indenting=yes,next]
 \setupfootnotedefinition[before={\setupindenting[big,yes]}]
 
 will give me what I want. But can anyone explain why *both* commands are  
 needed? Toggling these two commands doesn't work.

Hi Idris,

this does what you need:

\setupindenting[big,yes]
\startsetups[footnote:indenting]
\setupindenting[big,yes]
\stopsetups
\setupheads[indentnext=no]
\setupnote[footnote][setups=footnote:indenting]
\setupnotation[footnote][indenting=yes,next]

\starttext
\startsubject[title=Indentation Within a Footnote]
\input ward
\startfootnote
\input ward

\input ward

\input ward
\stopfootnote

The explanation (you are a ConTeXt expert and I’m only a long-term
newbie :-)) is that setups are required.

Setups belong to \setupnote and indenting belongs to \setupnotation.

I hope it helps,


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

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

Re: [NTG-context] Indentation within footnotes

2015-03-15 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 15 Mar 2015 07:42:11 -0600, Idris Samawi Hamid ادريس سماوي حامد  
isha...@colostate.edu wrote:



Dear gang,

In the attached example: For a given footnote I would like for the first
line of each paragraph after paragraph one to be indented. What do I need
to do to get this right? Thanks in advance, and

Best wishes
Idris


\setupindenting[big,yes]
\setupheads[indentnext=no]
\setupnotation[footnote][command={\setupindenting[big,yes]},indenting=yes,next]

\starttext
\startsubject[title=Indentation Within a Footnote]
\input ward
\startfootnote
\input ward

\input ward

\input ward
\stopfootnote

\input ward
\stopsubject
\stoptext



\setupnotation[footnote][indenting=yes,next]
\setupfootnotedefinition[before={\setupindenting[big,yes]}]

will give me what I want. But can anyone explain why *both* commands are  
needed? Toggling these two commands doesn't work.


Best wishes
Idris

--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] mkiv versus mkii: whitespace issues

2015-03-15 Thread Gerben Wierda
mkiv result



On 14 Mar 2015, at 17:14, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 14.03.2015 um 15:54 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 I am running into two issues with my mkii-to-mkiv conversion project
 
 - The \chapter command in mkiv uses more whitespace between the header and 
 the first paragraph. How can I influence this?
 - \startitemize[packed,joinedup] inserts whitespace between the list and the 
 paragraph before it where mkii doesn’t
 
 How can I fix this?
 
 Do you have a example because I can’t reproduce it.
 
 \showgrid
 
 \starttext
 
 \chapter{\contextmark}
 
 \input knuth
 
 \startitemize[packed,joinedup]
 \item One
 \item Two
 \item Three
 \stopitemize
 
 \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] currentreferencerealpage wrong (how to detect even/odd pages?)

2015-03-15 Thread Harald Koenig
Hi,

right now I use \currentreferencerealpage to detect if I'm on an even or odd 
page
(because my picture placement rules depend on it) like this:

\newcount\bildpage
\bildpage=1
% ...
\def\bild#1...{%
 {\global\bildpage=\realpageno}%
 \ifodd\bildpage \def\eo{o}\else \def\eo{e}\fi
 % ...
 \if o\eo odd...\else even...\fi
\message{ bildpage=\the\bildpage \space eo=\eo \space 
currentreferencerealpage=\currentreferencerealpage \space  }%
}

but now I notice that for some pages/pictures the value of 
\currentreferencerealpage
is not correct (only for the first picture on a new page?):-(

I'm writing some  ...  data to the log file:

pagesflushing realpage 34, userpage 34
 bildpage=35 eo=o currentreferencerealpage=35 
 bildpage=35 eo=o currentreferencerealpage=35 
pagesflushing realpage 35, userpage 35
 bildpage=35 eo=o currentreferencerealpage=35 
 bildpage=36 eo=e currentreferencerealpage=36 
pagesflushing realpage 36, userpage 36
 bildpage=37 eo=o currentreferencerealpage=0   
 bildpage=37 eo=o currentreferencerealpage=0   
 bildpage=37 eo=o currentreferencerealpage=0   

typically after that flushing realpage XX, userpage XX messages (not from me;)
the currentreferencerealpage is set to the new page number.

but NOT for page 36:  here after flushing realpage 35 
it's still currentreferencerealpage=35 for the first picture on this page:-(


any idea how this can go wrong ?
what can I test, which debug info can  I provide ?
is there a possible 

the attached zip file contains a minimal example 
with only 2 pages and 4 images: on the 2nd page (#36)
the first image should bleed to the left like all other pictures...


so far this seems to happen 3 times according to the log file:

pagesflushing realpage 10, userpage 10
 bildpage=11 eo=o currentreferencerealpage=11 
 bildpage=12 eo=e currentreferencerealpage=12 
pagesflushing realpage 11, userpage 11


pagesflushing realpage 14, userpage 14
 bildpage=15 eo=o currentreferencerealpage=15 
 bildpage=15 eo=o currentreferencerealpage=15 
 bildpage=16 eo=e currentreferencerealpage=16 
pagesflushing realpage 15, userpage 15



thanks for any help,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] mkiv versus mkii: whitespace issues

2015-03-15 Thread Gerben Wierda
I’m struggling to make a minimal example.It happens in my project, so it is a 
result of my …/products/prd_book.tex and ../environment/env_cataoia.tex and the 
test file. I need to give three files, two of which differ between mkii and 
mkiv because of different font commands and lettrine vs initial

prd_book.tex ===
\startproduct prd_book
\project project_cataoia

\starttext
\start
\startstandardmakeup[doublesided=no]
\ss
\hairline \start
\blank[line]
\switchtobodyfont[16pt]\bf
\leftaligned{Chess}%
\blank[line]
\leftaligned{and the Art of}%
\blank[line]
\leftaligned{Enterprise Architecture}%
\stop
\hairline \blank[line]
\leftaligned{Making the right moves to manage Business--IT complexity}%
\hairline \blank[line]\rightaligned{Gerben Wierda}%
\blank[6cm]\start\leftskip=10cm\hairline\stop
\rightaligned{2015}%
\stopstandardmakeup
\startstandardmakeup[doublesided=no,page=no]
~\blank[2in]
\start
\switchtobodyfont[9pt]
Copyright \copyright\ 2015 by Gerben Wierda, The Netherlands\crlf
Image used on cover (and on the inside) \copyright\ iStock.com/Antonio
\blank[4mm]
Published by R\A, The Netherlands
\blank[4mm]
Typeset with \TeX, using the mkii version of the \SSCONTEXT\ macro package.
\blank[4mm]
Neither the author, nor the publisher, nor the printer, nor the distributor,
nor the seller accept any responsibility or liability for loss or damage
occasioned to any person or property through using the material, instructions,
methods or ideas contained in or distributed with this book, or acting or
refraining from acting as a result of such use. The author, publisher,
printer, distributor, and seller expressly disclaim all implied warranties,
including merchantability of fitness for any particular purpose.
\blank[4mm]
ISBN 978-90-819840-5-8
\blank[4mm]
Contact info: {\sl i...@enterprisechess.com}\crlf Web site: {\sl
http://enterprisechess.com}\crlf Suggested hashtag: {\sl \#eachess}
\stop
\stopstandardmakeup
\startstandardmakeup[doublesided=no]
\start
\switchtobodyfont[16pt]
\midaligned{The world is not {\blackboard Q}, it is {\blackboard R}}
\blank[6cm]
\stop
\stopstandardmakeup
\stop
\startfrontmatter
\startbuffer [chapter:quote]
%When teaching a rapidly changing technology, perspective is more important
%than content\crlf
%{\tf Richard~Pattis}
The most erroneous stories are those we think we know best --- and therefore
never scrutinize or question.\crlf
{\tf Stephen Jay Gould}
\stopbuffer
\noheaderandfooterlines
\start
\title[h:toc]{Contents}
\setuppagenumber[number=3]
\placelist[chapter,chaptertext]
\stop
\component c_loosely
\stopfrontmatter
\startbodymatter
\component c_inconvenient
\component c_goals
\component c_orthodoxy
\component c_intermezzo
\component c_chess
\component c_model
\component c_future
\component c_hurdles
\stopbodymatter
\startappendices
%   \component c_logic
\component c_cloud
\component c_current
\component c_fsatemplate
\component c_psatemplate
\component c_bibliography
\component c_endnotes
\component c_index
\stopappendices
\stoptext

\stopcomponent
=

env_cataoia.tex mkii =
\startenvironment env_cataoia
\project project_cataoia
%
\definedescription [description]
[location=serried, width=broad, hang=fit, margin=standard,
headstyle=bold]
\definestartstop [descriptions] [before=\startpacked,
after=\stoppacked]
%
\def\SSCONTEXT {Con\kern-.15em\TeX t}
%
%
\definepapersize[smallpaperback][width=5in,height=8in]
\setuppapersize[smallpaperback][smallpaperback]
\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided]
\setupsectionblock[frontpart][page=no]
\setupsectionblock[bodypart][page=no]
\setupsectionblock[appendix][page=no]
\setupsectionblock[backpart][page=no]

% Every chapter body text starts with lettrine:
\usemodule[lettrine]
\setuplettrine[Lines=3,
   Hang=.5,
   Oversize=0,
   Raise=0,
   Findent=0pt,
   Nindent=0em,
   Slope=0em,
   Ante=,
   FontHook=,
   TextFont=\sc,
   Image=no]

% Every chapter starts with a quote on the LHS page:
\setuphead
  [chapter]
  [page=,
   before={\setups[chapter:before]},
   after={\setups[chapter:after]}]

\startsetups chapter:before
\page[left]
\noheaderandfooterlines
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
\noheaderandfooterlines
\blank[force,2*big]
\stopsetups

\startsetups chapter:after
\blank[3*big]
\stopsetups

% Mark TODO items in the text
\def\todo#1{{\red --- --- --- TODO: {#1} --- --- ---}}

%

Re: [NTG-context] mkiv versus mkii: whitespace issues

2015-03-15 Thread Gerben Wierda
The itemize white space issue was a difference in handling \reference. In mkii 
a \reference between \startitemize and the first item did not produce empty 
space, in mkiv it does. I moved the \reference to inside the \item

G

On 14 Mar 2015, at 17:14, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 14.03.2015 um 15:54 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 I am running into two issues with my mkii-to-mkiv conversion project
 
 - The \chapter command in mkiv uses more whitespace between the header and 
 the first paragraph. How can I influence this?
 - \startitemize[packed,joinedup] inserts whitespace between the list and the 
 paragraph before it where mkii doesn’t
 
 How can I fix this?
 
 Do you have a example because I can’t reproduce it.
 
 \showgrid
 
 \starttext
 
 \chapter{\contextmark}
 
 \input knuth
 
 \startitemize[packed,joinedup]
 \item One
 \item Two
 \item Three
 \stopitemize
 
 \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] Indentation within footnotes

2015-03-15 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

In the attached example: For a given footnote I would like for the first  
line of each paragraph after paragraph one to be indented. What do I need  
to do to get this right? Thanks in advance, and


Best wishes
Idris


\setupindenting[big,yes]
\setupheads[indentnext=no]
\setupnotation[footnote][command={\setupindenting[big,yes]},indenting=yes,next]

\starttext
\startsubject[title=Indentation Within a Footnote]
\input ward
\startfootnote
\input ward

\input ward

\input ward
\stopfootnote

\input ward
\stopsubject
\stoptext

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

test-noteindent.pdf
Description: Adobe PDF document


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

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

Re: [NTG-context] Problem in using vlingrid() and hlingrid() macros (Metafun)

2015-03-15 Thread Fabrice

Hi,
To solve my problem, I finally used a loop to draw a grid.
Fabrice

\starttext
\start
\switchtobodyfont[small]
\startMPcode
 path p ;
 u := 2cm ; v:= 1cm ;
 p := (-u,-5v)--(3u,-5v)--(3u,4v)--(-u,4v)--cycle ;
 drawoptions(withpen pencircle scaled 0.5pt withcolor 
\MPcolor{mycolor});

 for i=-u step u until 3u :
 draw (i,-5v)--(i,4v) ;
 endfor ;
 for i=-5v step v until 4v :
 draw (-u,i)--(3u,i) ;
 endfor ;
 drawoptions(withpen pencircle scaled 1pt) ;
 drawarrow (-u,0)--(3u,0) ;
 drawarrow (0,-5v)--(0,4v) ;
 draw (u,-0.05v)--(u,0.05v) ;
 draw (-0.025u,v)--(0.025u,v) ;
 draw curvedfunction (x, 3*x*x-5*x+1, -1, 3, 0.01) xyscaled 
(u,v) withcolor red ;
 draw curvedfunction (x, -5*x+1, -1, 3, 0.01) xyscaled (u,v) 
withcolor blue ;
 draw curvedfunction (x, 7*x-11, -1, 3, 0.01) xyscaled (u,v) 
withcolor green ;

 label.bot(btex $x$ etex,(2.97u,-0.1v)) ;
 label.rt(btex $y$ etex,(0.01u,3.9v)) ;
 label.llft(0,(0,0)) ;
 label.urt(A,(0,v)) ;
 dotlabel(,(u,-4v)) ;
 label.rt(C,(1.02u,-4v)) ;
 dotlabel.lrt(B,(2u,3v)) ;
 label.bot(1,(u,0)) ;
 label.lft(1,(0,v)) ;
 clip currentpicture to p ;
\stopMPcode
\stop
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Indentation within footnotes

2015-03-15 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Pablo,

On Sun, 15 Mar 2015 11:24:47 -0600, Pablo Rodriguez oi...@gmx.es wrote:


Changing indenting to {yes, next} only the third
paragraph in the footnote is indented.


My guess is that the first next is already hardwired into the footnote  
mechanism. If you remove the next it should work. So this works here:


% \setupnotation[footnote][indenting={yes,big,next}]
\setupnotation[footnote][indenting={yes,big}]

When I had the next I got the same result as you.

Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Indentation within footnotes

2015-03-15 Thread Wolfgang Schuster

 Am 15.03.2015 um 14:42 schrieb Idris Samawi Hamid ادريس سماوي حامد 
 isha...@colostate.edu:
 
 Dear gang,
 
 In the attached example: For a given footnote I would like for the first line 
 of each paragraph after paragraph one to be indented. What do I need to do to 
 get this right? Thanks in advance, and
 
 Best wishes
 Idris
 
 
 \setupindenting[big,yes]
 \setupheads[indentnext=no]
 \setupnotation[footnote][command={\setupindenting[big,yes]},indenting=yes,next]

1. You have to put braces around the arguments for the indenting key.

2. Change the notation setup to \setupnotation[footnote][indenting={yes,big}] 
because notes ignore the global indent value.

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

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

Re: [NTG-context] Indentation within footnotes

2015-03-15 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Pablo,

On Sun, 15 Mar 2015 10:29:25 -0600, Pablo Rodriguez oi...@gmx.es wrote:


On 03/15/2015 03:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

[...]
\setupnotation[footnote][indenting=yes,next]
\setupfootnotedefinition[before={\setupindenting[big,yes]}]

will give me what I want. But can anyone explain why *both* commands are
needed? Toggling these two commands doesn't work.


snip


\setupindenting[big,yes]
\startsetups[footnote:indenting]
\setupindenting[big,yes]
\stopsetups
\setupheads[indentnext=no]
\setupnote[footnote][setups=footnote:indenting]
\setupnotation[footnote][indenting=yes,next]


Fortunately, it's much easier that that ;-)

% Argument to after= controls vertical space between notes
\setupnotation
[footnote][before={\setupwhitespace[big]},indenting={yes,big},after={\blank[small]}]

As mentioned in the other email, the first next is apparently already  
built in, no no need for it.



(you are a ConTeXt expert and I’m only a long-term newbie :-))


Well, all users are long-term ConTeXt newbies, now and forever... The only  
exception is Wolfgang ;-)


And I still suspect Wolfgang is just Hans in disguise :D

Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] currentreferencerealpage wrong (how to detect even/odd pages?)

2015-03-15 Thread Wolfgang Schuster

 Am 15.03.2015 um 16:40 schrieb Harald Koenig 
 koe...@tat.physik.uni-tuebingen.de:
 
 Hi,
 
 right now I use \currentreferencerealpage to detect if I'm on an even or odd 
 page
 (because my picture placement rules depend on it) like this:
 
 \newcount\bildpage
 \bildpage=1
 % ...
 \def\bild#1...{%
 {\global\bildpage=\realpageno}%
 \ifodd\bildpage \def\eo{o}\else \def\eo{e}\fi
 % ...
 \if o\eo odd...\else even...\fi
\message{ bildpage=\the\bildpage \space eo=\eo \space 
 currentreferencerealpage=\currentreferencerealpage \space  }%
 }
 
 but now I notice that for some pages/pictures the value of 
 \currentreferencerealpage
 is not correct (only for the first picture on a new page?):-(

To test whether you’re on a left or right page you can use the \signalrightpage 
and \doifrightpageelse commands.

\setuppagenumbering[alternative=doublesided]
%\setuppagenumbering[alternative={singlesided,doublesided}]

\starttext

\dorecurse{100}
  {\dontleavehmode\signalrightpage
   \doifrightpageelse{Right page}{Left page}
   \blank[line]}

\stoptext

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

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

Re: [NTG-context] Indentation within footnotes

2015-03-15 Thread Pablo Rodriguez
On 03/15/2015 05:55 PM, Wolfgang Schuster wrote:
 Am 15.03.2015 um 14:42 schrieb Idris Samawi Hamid ادريس سماوي حامد:

 Dear gang,

 In the attached example: For a given footnote I would like for the
 first line of each paragraph after paragraph one to be indented. What do
 I need to do to get this right? Thanks in advance, and

 Best wishes
 Idris

 
 \setupindenting[big,yes]
 \setupheads[indentnext=no]
 \setupnotation[footnote][command={\setupindenting[big,yes]},indenting=yes,next]
 
 1. You have to put braces around the arguments for the indenting key.
 
 2. Change the notation setup to
 \setupnotation[footnote][indenting={yes,big}] because notes ignore the
 global indent value.

Hi Wolfgang,

with the following sample:

\setupindenting[big,yes]
\startsetups[footnote:indenting]
\setupindenting[big,yes]
\stopsetups
\setupheads[indentnext=no]
\setupnote[footnote][setups=footnote:indenting]
\setupnotation[footnote][indenting={yes}]
\starttext
\input ward\footnote{\dorecurse{3}{\input ward\par}}

\input ward
\stoptext

it works as expected. Changing indenting to {yes, next} only the third
paragraph in the footnote is indented.

Isn’t it a bug?

Many thanks for your help,

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

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

[NTG-context] Exporting highlights

2015-03-15 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Ok, I'm rolling up my sleeves and taking another stab at exporting to  
xhtml (maybe even epub). Major project, so taking this one small step at a  
time.


The immediate aim is to get correct output in a browser (I use Opera, and  
Chrome as a control). Test files attached.


Immediate problem is highlights.

export-highlight.tex==
\setupbackend
  [export=yes,css=highlight.css]

\definehighlight[emphasis] [style=italic]
\definehighlight[important][style=bold]
\definehighlight[regular][style=\tf]

\starttext

\startchapter[title=Highlights]
\startparagraph
This is \emphasis{emphasis}. This is \important{important}. This is  
\regular{regular}.


This is \emphasis{some emphasized text, with \regular{regular} in between}.

This is \important{some important text, with \regular{regular} in between}.
\stopparagraph
\stopchapter
\stoptext
===

In highlight.css (copied from export-sample.css and modified) I added  
these lines:


==
highlight [detail=emphasis]{
font-weight : italic ;
}

highlight [detail=important]{
font-weight : bold ;
}

highlight [detail=regular]{
font-weight : regular ;
}
==

Results:

===export-highlight-tag.xhtml
  sectioncontent
   paragraphThis is highlight detail=emphasisemphasis/highlight.  
This is highlight detail=importantimportant/highlight. This is  
highlight detail=regularregular/highlight.break/
This is highlight detail=emphasissome emphasized text, with highlight  
detail=regularregular/highlight in between/highlight.break/
This is highlight detail=importantsome important text, with highlight  
detail=regularregular/highlight in between/highlight./paragraph

  /sectioncontent
===export-highlight-div.xhtml
   div class=paragraphThis is div class=highlight  
emphasisemphasis/div. This is div class=highlight  
importantimportant/div. This is div class=highlight  
regularregular/div.div class=break!--empty--/div
This is div class=highlight emphasissome emphasized text, with div  
class=highlight regularregular/div in between/div.div  
class=break!--empty--/div
This is div class=highlight importantsome important text, with div  
class=highlight regularregular/div in between/div./div

=

Observation: Opera won't render *-raw.xml, so we ignore that file.

In a browser we have

Challenge 1:
Neither export-highlight-tag.xhtml nor export-highlight-div.xhtml renders  
the highlights. What do we need to do?


Challenge 2:
export-highlight-div.xhtml breaks the line before a highlight as well as  
after a highlight. What is missing here?


Aim: To turn my current project into an epub, or at least something that  
can be viewed in a browser (xhtml).


Caveat: I don't know much web development (css, xhtml, div, etc) but am  
willing to work with what I have... but only IF there is a finish line. If  
there is no finish line (i.e., things are too broken at the moment to get  
the mission accomplished via what ConTeXt and CSS provide) kindly let me  
know so I can stop now!


Henning Hraban Ramm and Aditya Mahajan mentioned XSLT stylesheets, but  
this is probably way above my paygrade, unless someone can give me very  
simple newbie pointers.


Thanks to all in advance and

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

export-highlight.tex
Description: TeX document


export-highlight.pdf
Description: Adobe PDF document
/*

	author: Hans Hagen, PRAGMA-ADE, Hasselt NL
	copyright : PRAGMA ADE / ConTeXt Development Team
	license   : see context related readme files
	comment   : companion to context.mkiv

*/

/* ignore  : mixed   */
/* metadata: display */

ignore {
	display : none ;
}

xmetadata {
	display : none ;
}

xmetavariable {
	display : none ;
}

/* document : display */

document:before {
	content   : attr(title) ;
	font-size : 44pt ;
	font-weight   : bold ;
	margin-bottom : 1em ;
}

document {
	font-family  : DejaVu Serif, Lucida Bright, serif ;
	font-size: 12pt ;
	max-width: 50em ;
	padding  : 1em ;
 /* text-align   : justify ;*/
 /*	hyphens  : manual ; */
 /* text-justify : inter-word ; */
}

documentmetadata {
	font-family   : Lucida Console, DejaVu Sans Mono, monospace ;
	margin-bottom : 2em ;
}

documentmetadatametavariable[name=title]:before {
	content : title\00A0\00A0\00A0:\00A0 ;
}

documentmetadatametavariable[name=author]:before {
		content : author\00A0\00A0:\00A0 ;
}

documentmetadatametavariable[name=version]:before {
	content : version\00A0:\00A0 ;
}

documentmetadatametavariable[name=title], documentmetadatametavariable[name=author], documentmetadatametavariable[name=version] {
	display : block ;
}

/* paragraph : mixed */
/* p : mixed */

paragraph, p {
	display   : block ;
	margin-top: 0.5em ;
	margin-bottom : 0.5em ;
}

/* break : display 

Re: [NTG-context] Indentation within footnotes

2015-03-15 Thread Wolfgang Schuster

 Am 15.03.2015 um 19:19 schrieb Idris Samawi Hamid ادريس سماوي حامد 
 isha...@colostate.edu:
 
 Hi Pablo,
 
 On Sun, 15 Mar 2015 11:24:47 -0600, Pablo Rodriguez oi...@gmx.es wrote:
 
 Changing indenting to {yes, next} only the third
 paragraph in the footnote is indented.
 
 My guess is that the first next is already hardwired into the footnote 
 mechanism. If you remove the next it should work. So this works here:
 
 % \setupnotation[footnote][indenting={yes,big,next}]
 \setupnotation[footnote][indenting={yes,big}]
 
 When I had the next I got the same result as you.


I will show below the reason for the unexpected behaviour of the next keyword. 
What you should
keep in mind is that context uses the same mechanism for enumerations, 
description and note
entries.

In older versions of the mechanism indentation was set before the title and 
content where placed
but this produces unwanted results when you used the “next” keyword because the 
title itself
was recognised as first paragraph (see page 1). After moving the indentation 
setting between
the title and the content (see page 2) the “next” keyword produced the expected 
output.

The problem is now when make the title part of the first paragraph because the 
indentation
is changed until we start the second paragraph and the “next” keyword applies 
now to the third
paragraph.

 begin example
\setuppapersize[A5]

\starttext

% Page 1

\start \setupindenting[yes,medium,next]

\noindent{\bf Description Title}

\input knuth

\stop

\page

% Page 2

\start

\noindent{\bf Description Title}

\setupindenting[yes,medium,next]

\input knuth

\stop

\page

% Page 3

\start

\noindent{\bf Description Title}
\setupindenting[yes,medium,next]
\input knuth

\stop

\stoptext
 end 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] Indentation within footnotes

2015-03-15 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sun, 15 Mar 2015 15:07:57 -0600, Pablo Rodriguez oi...@gmx.es wrote:


I’m not sure whether this is clearer to me. It seems that your approach
enables indenting by setting vertical space in paragraphs.
I may be missing something, since I’d bet that the setups for notes
approach is clearer.


Didn't mean to confuse you, all you need is

\setupnotation[footnote][indenting={yes,big}] % no next

The other two options were just to show other things you could do with  
\setupnotation. Thanks again for your help and


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Indentation within footnotes

2015-03-15 Thread Idris Samawi Hamid ادريس سماوي حامد
On Sun, 15 Mar 2015 15:43:47 -0600, Wolfgang Schuster  
schuster.wolfg...@gmail.com wrote:




Am 15.03.2015 um 19:19 schrieb Idris Samawi Hamid ادريس سماوي حامد  
isha...@colostate.edu:


Hi Pablo,

On Sun, 15 Mar 2015 11:24:47 -0600, Pablo Rodriguez oi...@gmx.es  
wrote:



Changing indenting to {yes, next} only the third
paragraph in the footnote is indented.


My guess is that the first next is already hardwired into the  
footnote mechanism. If you remove the next it should work. So this  
works here:


% \setupnotation[footnote][indenting={yes,big,next}]
\setupnotation[footnote][indenting={yes,big}]

When I had the next I got the same result as you.



I will show below the reason for the unexpected behaviour of the next  
keyword. What you should
keep in mind is that context uses the same mechanism for enumerations,  
description and note

entries.

In older versions of the mechanism indentation was set before the title  
and content where placed
but this produces unwanted results when you used the “next” keyword  
because the title itself
was recognised as first paragraph (see page 1). After moving the  
indentation setting between
the title and the content (see page 2) the “next” keyword produced the  
expected output.


The problem is now when make the title part of the first paragraph  
because the indentation
is changed until we start the second paragraph and the “next” keyword  
applies now to the third

paragraph.

 begin example
\setuppapersize[A5]

\starttext

% Page 1

\start \setupindenting[yes,medium,next]

\noindent{\bf Description Title}

\input knuth

\stop

\page

% Page 2

\start

\noindent{\bf Description Title}

\setupindenting[yes,medium,next]

\input knuth

\stop

\page

% Page 3

\start

\noindent{\bf Description Title}
\setupindenting[yes,medium,next]
\input knuth

\stop

\stoptext
 end example


Thanks, Wolfgang -- or is it Hans? ;-) -- for this very instructive  
example!


I just made one change: \noindentation instead of \noindent (my  
understanding is that we're supposed to avoid very low-level indenting  
commands).


So the first paragraph of a footnote insertion contains an implicit title,  
or does the footnote numeral function as title? Anyway, very interesting!  
Thanks again and


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] mkiv versus mkii: whitespace issues

2015-03-15 Thread Wolfgang Schuster

 Am 14.03.2015 um 15:54 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 I am running into two issues with my mkii-to-mkiv conversion project
 
 - The \chapter command in mkiv uses more whitespace between the header and 
 the first paragraph. How can I influence this?

The different space before the \chapter is caused by the “fixed” keyword for 
\blank
which produce different result with MkII and MkIV and the MkIV behaviour need
to be corrected.

The space after \chapter comes from your \writetolist entry and you can correct
this with the \GotoPar command at the end of the entry as shown below.

 begin example
\showgrid

\setuphead[chapter][before={\blank[force,2*line]}]

\starttext

\chapter{Knuth}

\writetolist[chapter]{}{}\GotoPar

\input knuth

\stoptext
 end 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] Indentation within footnotes

2015-03-15 Thread Pablo Rodriguez
On 03/15/2015 07:36 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
 On Sun, 15 Mar 2015 10:29:25 -0600, Pablo Rodriguez wrote:
 On 03/15/2015 03:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
 [...]
 will give me what I want. But can anyone explain why *both* commands are
 needed? Toggling these two commands doesn't work.

 \setupindenting[big,yes]
 \startsetups[footnote:indenting]
 \setupindenting[big,yes]
 \stopsetups
 \setupheads[indentnext=no]
 \setupnote[footnote][setups=footnote:indenting]
 \setupnotation[footnote][indenting=yes,next]
 
 Fortunately, it's much easier that that ;-)
 
 % Argument to after= controls vertical space between notes
 \setupnotation
 [footnote][before={\setupwhitespace[big]},indenting={yes,big},after={\blank[small]}]

Hi Idris,

I’m not sure whether this is clearer to me. It seems that your approach
enables indenting by setting vertical space in paragraphs.

I may be missing something, since I’d bet that the setups for notes
approach is clearer.

 (you are a ConTeXt expert and I’m only a long-term newbie :-))
 
 Well, all users are long-term ConTeXt newbies, now and forever... The only  
 exception is Wolfgang ;-)
 
 And I still suspect Wolfgang is just Hans in disguise :D

Good point.

It is Hans in his Superman disguise , :D.


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

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

[NTG-context] Now that I have something working on mkiv, I'd like to try ePUB

2015-03-15 Thread Gerben Wierda
Now that I have my book project basically running on mkiv (the layout probably 
has a few problems left, the main one currently being extra whitespace after a 
chapter heading  compared to mkii), I’d like to try producing ePUB from it.

ConTeXtgarden says I have to add a backend and points me to the info on the 
standard project structure (which I use), but there I don’t find anything about 
a backend. The extended example says that starting january 2015, things have 
changed with ePUB, which probably also applies to me as I only recently started 
with a fresh download of a current ConTeXt mkiv.

So, can someone tell me what I need to do to get a basic ePUB output?

And what command do I run to update my separate ConTeXt tree? 

And which one to find out what version I’m running?

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

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

Re: [NTG-context] Indentation within footnotes

2015-03-15 Thread Alan BRASLAU
  And I still suspect Wolfgang is just Hans in disguise :D  
 
 It is Hans in his Superman disguise , :D.

The ConTeXt meetings are a great opportunity to ask BOTH Hans and
Wolfgang everything that you might have wanted to know about ConTeXt
(and were afraid to ask on the mailing list).

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] Styling captions inside \startcombination ... \stopcombination

2015-03-15 Thread Alan BRASLAU
On Sat, 14 Mar 2015 13:10:28 +0100
Hans Hagen pra...@wxs.nl wrote:

 the obvious:
 
 \setupcombinations[style={\switchtobodyfont[8pt]}]

How about \switchtobodyfont[small] to handle nesting?

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] Indentation within footnotes

2015-03-15 Thread Wolfgang Schuster

 Am 15.03.2015 um 22:58 schrieb Idris Samawi Hamid ادريس سماوي حامد 
 isha...@colostate.edu:
 
 On Sun, 15 Mar 2015 15:43:47 -0600, Wolfgang Schuster 
 schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com wrote:
 
 
 Am 15.03.2015 um 19:19 schrieb Idris Samawi Hamid ادريس سماوي حامد 
 isha...@colostate.edu:
 
 Hi Pablo,
 
 On Sun, 15 Mar 2015 11:24:47 -0600, Pablo Rodriguez oi...@gmx.es wrote:
 
 Changing indenting to {yes, next} only the third
 paragraph in the footnote is indented.
 
 My guess is that the first next is already hardwired into the footnote 
 mechanism. If you remove the next it should work. So this works here:
 
 % \setupnotation[footnote][indenting={yes,big,next}]
 \setupnotation[footnote][indenting={yes,big}]
 
 When I had the next I got the same result as you.
 
 
 I will show below the reason for the unexpected behaviour of the next 
 keyword. What you should
 keep in mind is that context uses the same mechanism for enumerations, 
 description and note
 entries.
 
 In older versions of the mechanism indentation was set before the title and 
 content where placed
 but this produces unwanted results when you used the “next” keyword because 
 the title itself
 was recognised as first paragraph (see page 1). After moving the indentation 
 setting between
 the title and the content (see page 2) the “next” keyword produced the 
 expected output.
 
 The problem is now when make the title part of the first paragraph because 
 the indentation
 is changed until we start the second paragraph and the “next” keyword 
 applies now to the third
 paragraph.
 
  begin example
 \setuppapersize[A5]
 
 \starttext
 
 % Page 1
 
 \start \setupindenting[yes,medium,next]
 
 \noindent{\bf Description Title}
 
 \input knuth
 
 \stop
 
 \page
 
 % Page 2
 
 \start
 
 \noindent{\bf Description Title}
 
 \setupindenting[yes,medium,next]
 
 \input knuth
 
 \stop
 
 \page
 
 % Page 3
 
 \start
 
 \noindent{\bf Description Title}
 \setupindenting[yes,medium,next]
 \input knuth
 
 \stop
 
 \stoptext
  end example
 
 Thanks, Wolfgang -- or is it Hans? ;-) -- for this very instructive example!
 
 I just made one change: \noindentation instead of \noindent (my understanding 
 is that we're supposed to avoid very low-level indenting commands).
 
 So the first paragraph of a footnote insertion contains an implicit title, or 
 does the footnote numeral function as title? Anyway, very interesting!

The footnote number is placed as title.

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] mkiv versus mkii: whitespace issues

2015-03-15 Thread Wolfgang Schuster

 Am 15.03.2015 um 15:57 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 The itemize white space issue was a difference in handling \reference. In 
 mkii a \reference between \startitemize and the first item did not produce 
 empty space, in mkiv it does. I moved the \reference to inside the \item

For numbered items you can use the optional argument of \item to set a 
reference.

\starttext

\startitemize[n]
\item[item:one] First item
\item[item:two] Second item
\stopitemize

\page

Take a look at \in{item}[item:two] on \at{page}[item:two].

\stoptext

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

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

Re: [NTG-context] Exporting highlights

2015-03-15 Thread Aditya Mahajan

On Sun, 15 Mar 2015, Idris Samawi Hamid ادريس سماوي حامد wrote:

[Dear Aditya, I sent this to the list; sending it to you to have a look as 
well. Any assistance is much appreciated, especially if I have to go the xslt 
route! Thanks in advance!!]


It has been almost 1.5 years since I had a serious look at XML generated 
by ConTeXt. At that time, ConTeXt did not generate XHTML, so I thought 
that one has to go through the XLST route. But, it looks that things have 
changed.



===export-highlight-div.xhtml
   div class=paragraphThis is div class=highlight
emphasisemphasis/div. This is div class=highlight
importantimportant/div. This is div class=highlight
regularregular/div.div class=break!--empty--/div
This is div class=highlight emphasissome emphasized text, with div
class=highlight regularregular/div in between/div.div
class=break!--empty--/div
This is div class=highlight importantsome important text, with div
class=highlight regularregular/div in between/div./div
=


This is very well formed XHTML. You just need a proper CSS stylesheet to 
do the correct rednering. Something like:


.highlight.important {
   font-weight: bold;
}

.highlight.emphasis {
  font-style: italic;
}

etc.

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
___