Re: [NTG-context] OT: Reflections on usability ConTeXt for typesetting of mathematics

2014-02-12 Thread Keith J. Schultz
Hi Mikael,

Basically, I see your problem with ConTeXts handling of math as a matter of 
taste!
That is you want LaTeX syntax. 

It is easy enough to get the results you want.

The only place where I see a bug is that a single prime is set larger than 
multple
primes. 

regards
Keith


Am 11.02.2014 um 14:18 schrieb Mikael P. Sundqvist mic...@gmail.com:

 On Tue, Feb 11, 2014 at 11:33 AM, Keith J. Schultz schul...@uni-trier.de 
 wrote:
 
 Am 11.02.2014 um 09:57 schrieb Mikael P. Sundqvist mic...@gmail.com:
 
 On Mon, Feb 10, 2014 at 6:57 PM, Hans Hagen pra...@wxs.nl wrote:
 On 2/10/2014 9:24 AM, Mikael P. Sundqvist wrote:
 Hi,
 
 I used ConTeXt (mkii) to write my PhD thesis in Mathematics in 2008. It
 worked just fine.
 
 At the moment I write some exams and hand-outs using ConTeXt, but
 research using LaTeX (since the journals do not really accept ConTeXt
 and my collaborators dont know ConTeXt).
 
 It certainly works OK to write math in ConTeXt, but I have a feeling
 that there are some things that are somewhat broken or not finetuned to
 output what mathematicians expect. Look at the attached pdf files [1]
 l.pdf (from LaTeX) and c.pdf (from latest standalone ConTeXt), with
 source l.tex and c.tex for some examples.
 
 In mkiv we follow some alternative approaches compared to mkii (and probably 
 other tex macro packages) and some aspects indeed might need tuning (or more 
 configuration options) .. I try hard to get away from hackery solutions (for 
 several reasons).
 
 I agree it is good to avoid hackery as long as possible, and I for sure is 
 ready to relearn how to write some things. With the examples I gave in the 
 previous email in mind:
 
 * How am I supposed to write first derivative (f') and second derivative 
 (f'') in such a way that they have the same type of prime (the prime in the 
 first derivative is the one I prefer)?
 
   No sure if to call this a bug! It seems that a single prime is always 
 larger than multiple ones!
   You can always change its size!
 
 I think the user should not have to change its size. All primes should have 
 the same size, independent if they are one or several.
  
 
 * How am I supposed to write f_xx'' to get the output as in the LaTeX 
 example (i.e. so that the primes are over the xx)?
   
 have to switch things around: f''_xx or f''_{xx}  depending on the actual 
 result you want.
 
 I know about the grouping. Please have a look at my example files in my 
 earlier post in this thread.
  
  
 * Could the default placement of limits in integrals be changed 
 (integral=nolimits)? This is how it is done in almost all math books).
   
 Not sure what you want here! example? can be LateX
 
 As above, I gave examples...
 
 Best regards, Mikael
  
 
 * What about the size and finetuning of placement of indices in integrals 
 and sums (and probably products, unions, ...)?
 * I remember I suggested that \| should be double bars in a previous thread 
 on this list. Is there any drawback in giving double bars for \|? Of course 
 I can relearn and use \lVert and \rVert, but I have a feeling that if we 
 want people moving from LaTeX to ConTeXt, then this is the kind of things 
 that should just work as expected...
 
 Best regards, Mikael
 
 regards
   Keith
 
 ___
 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
 ___

___
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] narrowered columns on background image?

2014-02-12 Thread Rudolf Bahr

Hi All,

in the following two code examples I tried to place text in columns on a 
background image.
The first example, partly achieved by plain TeX commands is ok, even 
narrowering works.
Have a look at the attached .pdf file.

The second example isn't ok. Neither narrowering nor putting the text into 
columns work.
Though the code of the first example is completely good enough for me, I'd like 
to learn where my 
mistakes in the 2. example are. Any ideas?

Greetings, Rudolf


%---1. 
example---8---
\setupexternalfigures
[location={local,global,default}]

\useexternalfigure[moe][cow.pdf][width=\hsize, height=.4\vsize]

\def\txt
{
\startnarrower
\setupcolumns[n=3, rule=off, align=right, distance=10pt]
\startcolumns
\startcolor[darkred]
It was a dark and stormy night. The rain came down in tons. The 
old captain
said: \quotation{Antonio, come and tell us a story!} And 
Antonio began as follows:
\quotation{It was a dark and stormy night. The rain ...}
\stopcolor
\stopcolumns
\stopnarrower
}


\starttext

\vbox to .4\textheight{\externalfigure[moe]}
\vskip-.35\textheight
\txt

%---2. example-

\vskip.3\vsize

\useexternalfigure[muh][cow.pdf][width=\overlaywidth, height=\overlayheight]

\setupframed[height=.4\vsize, width=\hsize]
\defineoverlay
[muh]
[{\externalfigure[muh]}]

\framed
[background=muh, align=right]
{\txt}


\stoptext
%8-



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

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

Re: [NTG-context] Linespacing in TOC

2014-02-12 Thread Jan Tosovsky
On 2014-02-11 Wolfgang Schuster wrote: 
  Am 11.02.2014 um 17:32 schrieb Jan Tosovsky j.tosov...@email.cz:
 
  My fundamental question is why ToC has different ToC line gaps
  than body text. I still think it is rather a bug which we are 
  trying to work around all the time.
 
 The chapter entries insert a empty line before their content, you can
 disable this with
 
   \setuplist[chapter][before=]

Great! I was not aware of that empty line!

I misled all of you by incorrect wording, sorry, but it is fortunately fixed
now!

Thanks a lot.

Jan

___
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] state=high vs state=empty for headers and footers

2014-02-12 Thread Aditya Mahajan

If one uses

\setuplayout[header][text][frame=on]

then the frame is drawn on pages with header=empty but not drawn on pages 
with header=high.


By default, the 'empty' pagebreak method (in page-txt.mkvi) sets the 
header and footer state to empty rather than high. This means that header 
frames are drawn on empty pages. For example, see attached file.


Would it make sense to change the definition in page-txt.mkvi to the 
following:


\installpagebreakmethod \v!empty
  {\page_otr_flush_all_floats
   \page_otr_command_next_page

\doifnot{\namedlayoutelementparameter\v!header\c!state}\v!stop{\setuplayoutelement[\v!header][\c!state=\v!high]}%

\doifnot{\namedlayoutelementparameter\v!footer\c!state}\v!stop{\setuplayoutelement[\v!footer][\c!state=\v!high]}%
   \page_otr_insert_dummy_page}

\installpagebreakmethod \v!header

{\doifnot{\namedlayoutelementparameter\v!header\c!state}\v!stop{\setuplayoutelement[\v!header][\c!state=\v!high]}}

\installpagebreakmethod \v!footer

{\doifnot{\namedlayoutelementparameter\v!footer\c!state}\v!stop{\setuplayoutelement[\v!footer][\c!state=\v!high]}}

or, if that is too drastic of a change, create a new pagebreakmethod 
called high. This request is motivated by:


http://tex.stackexchange.com/q/110701/323

Aditya%\showframe

\setuplayout
  [
header=\lineheight,
headerdistance=\lineheight,
  ]

\setuppagenumbering
  [
location=,
alternative=doublesided,
  ]

\definepagebreak
  [chapterpagebreak]
  [yes,empty,right]

\setuphead
  [chapter]
  [
style=\bfc,
header=high,
before={\blank[force,\the\headerheight]},
page=chapterpagebreak,
  ]

\setupheader[style=bold]

\setupheadertexts
  [{\getmarking[sectionnumber]\hskip1em\getmarking[section][first]}]
  [pagenumber]
  [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]
  [pagenumber]

\setupbackgrounds[header][text][bottomframe=on]

\starttext
\chapter{First Chapter}
this is the first chapter
\page   
the second page of the first chapter
\page
third page
\chapter{Second Chapter}
this is the second chapter
\page
the second page of the second chapter
\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] suggestion on [option=TEX]

2014-02-12 Thread Pablo Rodriguez
On 02/07/2014 12:36 AM, Wolfgang Schuster wrote:
 Am 06.02.2014 um 19:29 schrieb Pablo Rodriguez:
 [...]
 After reading the document, I think it could be achieved with:
 [...]
 But this doesn’t work. I must be missing something obvious.
 
 You have to add a comma after \letterpercent. You should also be
 careful with the text in the comments because commands are expanded,
 e.g. take a look at the \TeX in the comment.
 
 \setupbodyfont[dejavu]
 
 \defineprocessor[myescape][style=\ttbf,color=gray,left={\letterpercent}]
 
 \setuptyping[TEX][escape=myescape-{\letterpercent,}]
 
 \starttext
 \startTEX
 This is \TeX\ code % and this is a \TeX\ comment.
 \stopTEX
 \stoptext

Sorry for not having replied before and many thanks for your help, Wolfgang.

The code works as you told me. I really appreciate your help.

I have a further question about the option=TEX to color code. This was
my original issue, but I haven’t expressed myself clearly. The question
is directed primarily to Hans.

With option=TEX, comment seems to be the only element that isn’t colored
and formatted as a whole. Other elements are formatted as a whole and
the format even extends in multiple lines.

My question here isn’t technical (unless the described behavior is a
bug). The issue is on visual coherence. At least for newbies, it would
be better to differentiate visually between regular text and commented text.

Is there any reason not to format whole comments option=TEX? (Sorry, but
I don’t understand why this is different.)

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] Appendix Page Numbering

2014-02-12 Thread Andreas Schneider
Title: Re: [NTG-context] Appendix Page Numbering


On Monday, February 10, 2014, at 20:33 Troy Henderson wrote:




Any thoughts on getting these "custom PDF bookmark/index" entries?

Thanks in advance,

Troy



What you are looking for is called "Page Labels".
http://www.w3.org/TR/WCAG20-TECHS/PDF17 

I asked about this some time ago too and the conclusion was to manually manipulate the pdfcatalog:
http://www.ntg.nl/pipermail/ntg-context/2010/050146.html 

In the meantime it seems to have been implemented to a huge degree (see lpdf-mis.lua) but as the comments in there state, the prefixes you want are currently NOT part of the implementation.
If you are not particularly keen on enhancing that code, you are best off manually manipulating the pdfcatalog.

-- 
Best Regards,
Andreas

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

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