[NTG-context] Handling MathML in ConTEXt

2014-05-06 Thread Ananth Narayanan
Dear Sir,
I am new to ConTEXt. I am using the below mentioned coding in a TEX file and 
try to compile it in ConTEXt to get a .DVI output. But I am getting PDF output 
only
%=\setupbodyfont[times]\usemodule[mathml]\starttext\setupheader 
[state=stop]\startbuffermath xmlns=http://www.w3c.org/mathml; version=2.0 
mcolumn mn123/mn mrow mn456/mn mo+/mo /mrow mline 
spacing=000+/ mn579/mn 
/mcolumn/math\stopbuffer\processxmlbuffer\stoptext%==

Could you please help me to get .DVI output from ConTEXt.
Regards
Anantha   ___
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] Empty heads after leading whitespace

2014-05-06 Thread Maggyero
 after={\blank[0em]\blank[disable]}]

Yes it also works, thank you Thangalin. So here is the final solution (I
have added the 'nowhite' keyword in the second blank to kill whitespaces
when they are active) to get real empty heads (sections here) in the
document:


\setupwhitespace[line]

\setuphead
  [section]
  [placehead=empty,
   page=yes,
   after={\blank[none]\blank[nowhite, disable]}]

\setuphead
  [subsection]
  [placehead=yes,
   before={\blank[line]},
   after={\blank[line]}]

\setupheadertexts[section]

\showframe

\starttext
   \completecontent
   \dorecurse{2}
 {\section{My section}
  \dorecurse{2}
{\subsection{My subsection}
 \input knuth}}
\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] Empty heads after leading whitespace

2014-05-06 Thread Hans Hagen

On 5/6/2014 7:08 AM, Thangalin wrote:

\setuphead
   [section]
   [placehead=empty,
page=yes,
after={\blank[0em]\blank[disable]}]

That works for me. I don't know if it is better, but if it works for
you as well then it is probably the way to go.

mtx-context | current version: 2014.01.03 00:40


if you want no head-related nodes interfering, use:

% \setuphead[chapter][placehead=hidden]
% \chapter {test}
%
% %(\synchronizehead{chapter}) % \getheadsyncs
% %(\getfullstructurenumber{\thenamedheadlevel{chapter}})
% %(\getspecificstructuretitle{\thenamedheadlevel{chapter}})
%
% (\placerawheaddata  [chapter])
% (\placerawheadnumber[chapter])
% (\placerawheadtext  [chapter])

at some point you need to make sure you flush but you can decide to do 
it in some safe place (a header or footer or whatever you build as 
chapter opening)



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Handling MathML in ConTEXt

2014-05-06 Thread Hans Hagen

On 5/5/2014 2:02 PM, Ananth Narayanan wrote:

Dear Sir,

I am new to ConTEXt. I am using the below mentioned coding in a TEX file
and try to compile it in ConTEXt to get a .DVI output. But I am getting
PDF output only

%=
\setupbodyfont[times]
\usemodule[mathml]
\starttext
\setupheader [state=stop]
\startbuffer
math xmlns=http://www.w3c.org/mathml; version=2.0 mcolumn
mn123/mn mrow mn456/mn mo+/mo /mrow mline
spacing=000+/ mn579/mn /mcolumn/math
\stopbuffer
\processxmlbuffer
\stoptext
%==


Could you please help me to get .DVI output from ConTEXt.


context mkiv doesn't output dvi (maybe some day when i'm in the mood and 
when we have enhanced the dvi format)


why do you need dvi?

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Force two figures to appear on the same page

2014-05-06 Thread Thomas Friedrich
Unfortunately, this is not what I am looking for: Both figures have
there own caption and shall appear as separate figures in the list of
figures at the end of the document.

2014-04-30 22:39 GMT+02:00 Andres Conrado ela...@chiquitico.org:
 Maybe combinations is what you are looking for? It works very well for me.
 http://wiki.contextgarden.net/Command/startcombination

 Andres

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



-- 
Thomas Möbius
Fakultät Statistik
Technische Universität Dortmund
44221 Dortmund
Telefon: 0231 755 - 3116
FAX: 0231 755 - 5304
E-Mail: friedr...@statistik.tu-dortmund.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] text with background does not break properly around float

2014-05-06 Thread Thomas Möbius
Has really no one an idea how to solve this problem? It is driving me crazy...

Thanks for any help.

Thomas


2014-04-30 12:24 GMT+02:00 Thomas Möbius kont...@thomasmoebius.de:
 Dear ConTeXt list,

 text that has some background attached to it, does not properly break
 if a float appears on the same page. How to work around it?

 ---minimal example---
 \starttext

 \chapter {Bsaoteh}

 \defineenumeration
 [excursion]
 [text=Excursion,
 listtext={Excursion~},
 counter=theorem,
 before={\blank\startbackground},
 after={\stopbackground\blank}]

 \input knuth
 \input knuth
 \input knuth

 \placetable
 [here]
 [tab:bala]
 {Blaoesunthaoeusatoheu saohusaoteh asotehu asoehu aseohu}{
 \bTABLE

 \setupTABLE[frame=off]
 \setupTABLE[r][first][topframe=on,rulethickness=1.3pt]
 \setupTABLE[r][2][topframe=on]
 \setupTABLE[r][last][bottomframe=on,rulethickness=1.3pt]

 \setupTABLE[c][each][align=left]
 \setupTABLE[c][1][align=right]
 \setupTABLE[c][1][width=.7\textwidth]
 \setupTABLE[c][2][width=.2\textwidth]

 \bTR\bTD something \eTD\bTD 0. \eTD\eTR
 \bTR\bTD something \eTD\bTD 0. \eTD\eTR
 \bTR\bTD something \eTD\bTD 0. \eTD\eTR
 \bTR\bTD something \eTD\bTD 0. \eTD\eTR
 \bTR\bTD something \eTD\bTD 0. \eTD\eTR
 \bTR\bTD something \eTD\bTD 0. \eTD\eTR
 \bTR\bTD something \eTD\bTD 0. \eTD\eTR
 \bTR\bTD something \eTD\bTD 0. \eTD\eTR
 \eTABLE}

 \excursion \input knuth\input knuth\input knuth
 \input knuth

 \input knuth \input knuth \input knuth

 \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] Force two figures to appear on the same page

2014-05-06 Thread Wolfgang Schuster

Am 06.05.2014 um 12:36 schrieb Thomas Friedrich 
friedr...@statistik.tu-dortmund.de:

 Unfortunately, this is not what I am looking for: Both figures have
 there own caption and shall appear as separate figures in the list of
 figures at the end of the document.


You can use the floatcombination environment to put many floats into a single 
block,
the figure environment around the combination environment where I disabled
the counter is used to center the block.

\setupexternalfigures[location=default]

\starttext

\input knuth

\startplacefigure[location=nonumber]
\startfloatcombination[1*2]
\startplacefigure[title={Dutch cow}]
\externalfigure[cow][width=4cm]
\stopplacefigure
\startplacefigure[title={English cow}]
\externalfigure[cow][width=4cm]
\stopplacefigure
\stopfloatcombination
\stopplacefigure

\input ward

\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] [Metapost] Using mkIV and metapost to produce SVG

2014-05-06 Thread Hans Hagen

On 5/5/2014 1:54 PM, ralf.waldvo...@pta.de wrote:

Dear all,

I would like to produce an svg file from a Metapost input file using
some of ConTeXt's typesetting features (esp. using System OTF Fonts)
using something like:

\startbuffer[buffer:dummy]
 \start
 \startcolor[white]
 \framed[align=middle,width=28mm,frame=off]
 {
 \SansBodyBold % Font definition done earlier
Test to \par
rendered \par
 }
 \stopcolor
 \stop
\stopbuffer

% 


\startuniqueMPgraphic{mp:margin}
 picture text;
 text := btex \getbuffer[buffer:dummy] etex;
 draw text shifted(-11.8mm,-4.8mm );

% Some more fancy drawing her
\stopuniqueMPgraphic

Can I render that with MetaPost to SVG?


no


Is it possible to render text as paths not as referenced glyphs in
MetaPost/ConTexT?


no, unless you use the graphic text features



Unfortunately I have to stick to SVG as the resulting output format.
Converting from PDF to SVG is not an option at the moment due a)
performance considerations and b) trouble with generated font names in
the resulting ConTeXt PDF file (inkscape as well as pdf2svg produce real
strange results).


performance should not really be an issue as one can cache

what strange results?

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] [Metapost] Using mkIV and metapost to produce SVG

2014-05-06 Thread ralf . waldvogel
Dear all,

as I have seen on the mailing list digest, my original (HTML) mail has been 
scrambled. Sorry for that. Here the repost:


I would like to produce an svg file from a Metapost input file using some of 
ConTeXt's typesetting features (esp. using System OTF Fonts) using something 
like:

\startbuffer[buffer:dummy]
    \start
        \startcolor[white]
        \framed[align=middle,width=28mm,frame=off]
        {
        \SansBodyBold % Font definition done earlier
Test to \par
rendered \par
        }
        \stopcolor
    \stop
\stopbuffer

% 


\startuniqueMPgraphic{mp:margin}    
    picture text;
    text := btex \getbuffer[buffer:dummy] etex;
    draw text shifted(-11.8mm,-4.8mm );

   % Some more fancy drawing her
\stopuniqueMPgraphic

Can I render that with MetaPost to SVG?
Is it possible to render text as paths not as referenced glyphs in 
MetaPost/ConTexT?


Unfortunately I have to stick to SVG as the resulting output format.
Converting from PDF to SVG is not an option at the moment due a) performance 
considerations and b) trouble with generated font names in the resulting 
ConTeXt PDF file (inkscape as well as pdf2svg produce real strange results). 
 

Please let me know, if you need furhter information.
Thank you very much in advance.
Kind regards,

Ralf


http://www.pta.de
Mit ca. 2.460 Erfahrungsberichten aus 45 Jahren erfolgreicher Projektarbeit!

PTA Programmier-Technische Arbeiten GmbH
Seckenheimer Str. 65-67, 68165 Mannheim
Amtsgericht Mannheim, HRB 1139
USt-IdNr.: DE 143 839 368
Geschaeftsfuehrer:
Dipl.-Ing. Peter Fischer
Dr. Harald W. Busch
Dipl.-Kfm. Knut Fischer
___
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] \placeinitial query

2014-05-06 Thread Alan Bowen
In the following:

\definefallbackfamily[mainface][serif][IFAO Grec Unicode]
[range={02BB-1D513}]

\definefontfamily[mainface][serif][Tex Gyre Termes][]

\setupbodyfont[mainface,10pt]

\defineinitial[Greek]
[location=margin,
font={Regular sa 3},
n=2,
distance=-1em,
hoffset=1.25em]

\starttext

\placeinitial[Greek]Διὰ τί του ἡλίου Διὰ τί του ἡλίου Διὰ τί του ἡλίου Διὰ
τί του ἡλίου Διὰ τί του ἡλίου Διὰ τί του ἡλίου Διὰ τί του ἡλίου Διὰ τί του
ἡλίου

\blank

\placeinitial[Greek]Ⲇιὰ τί του ἡλίου Ⲇιὰ τί του ἡλίου Ⲇιὰ τί του ἡλίου Ⲇιὰ
τί του ἡλίου Ⲇιὰ τί του ἡλίου Ⲇιὰ τί του ἡλίου Ⲇιὰ τί του ἡλίου Ⲇιὰ τί του
ἡλίου

\stoptext

the first \placeinitial works but the second does not. I can get both if I
make IFAO Grec the main font and Termes the fallback. But then I will lose
italics and so forth. Are there some keys or values that I have missed?

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] numerator is too high in \frac{3}{4}, in palatino

2014-05-06 Thread Hans Hagen

On 5/2/2014 4:46 AM, Sanjoy Mahajan wrote:

I've noticed the following issue with how high the numerator is placed,
but only when using Palatino:

\setupbodyfont[palatino]
\starttext
\startformula
{3\over4}\quad {1\over2}
\stopformula
\stoptext

The 3 and the 1 sit quite high above the division line, esp. in
comparison with the gap below the line (above the 4 and the 2).

The place okay without the \setupbodyfont[palatino], so maybe it is
something incorrect in the font parameters?

The fonts are (from 'pdffonts'):

EUEJAR+TeXGyrePagella-RegularCID Type 0C   Identity-H   yes yes 
yes 18  0
UPBTGS+TeXGyrePagellaMath-RegularCID Type 0C   Identity-H   yes yes 
yes 19  0

And it is compiled with 2014.03.27 20:04 MKIV.


these are font properties and using a consistent opentype math versus a 
bunch of loosely related type one fonts makes a difference


keep in mind that a too small distance can give inconsistent output


Is there a way to adjust the spacing, or an alternative workaround?


I've added:

\starttext

$\displaystyle 1+{2g\over3}+{2\over3}$ \blank

\setupmathfractions[topdistance=0pt]

$\displaystyle 1+{2g\over3}+{2\over3}$ \blank

\setupmathfractions[bottomdistance=0pt]

$\displaystyle 1+{2g\over3}+{2\over3}$ \blank

\setupmathfractions[topdistance=0pt,bottomdistance=0pt]

$\displaystyle 1+{2g\over3}+{2\over3}$ \blank

\stoptext




-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] problem between textrule and setupindenting ?

2014-05-06 Thread Hans Hagen

On 5/3/2014 9:34 AM, Bertrand Masson wrote:

Hello,
In the following code, the second ruleis indented.
How to remove this indentation ?

%code%
\setuppapersize[A5]
\setupindenting[small,yes]
\setuptextrules[inbetween=\noindentation]
\starttext
\starttextrule{introduction}
Once upon a time \unknown
\stoptextrule
\stoptext
%code%


it's a buglet ... add this to cont-new.mkiv:

\unprotect

\def\pack_textrule_following#1%
  {\doifelsenothing{#1}
 {\ifhmode
\endgraf
  \fi

\doifelse{\directtextrulesparameter\c!depthcorrection}\v!on\pack_textrule_correct_depth_yes\pack_textrule_correct_depth_nop
  \nointerlineskip
  \noindent\vbox
{\color[\directtextrulesparameter\c!rulecolor]

{\hrule\s!depth\directtextrulesparameter\c!rulethickness\s!height\zeropoint\s!width\availablehsize}}}
 {\pack_textrule_with_text{#1}}%
   \ifvmode
 \prevdepth\zeropoint
   \fi}

\protect

fixed in next beta

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] \pm set too low in MkIV?

2014-05-06 Thread Sanjoy Mahajan
Continuing my recent theme of finding glyphs too low or too high:

The \pm symbol looks like it is set too low, in MkIV.

\setuppagenumbering[location=]
\starttext
$\pm2$
\stoptext

The minus part of the sign lies below the baseline, which looks odd
relative to the horizontal stroke of the 2.

In MkII it is fine, as is the equivalent latex or plain tex (using
LatinModern).

I don't know whether the problem lis in the font metrics or in the
positioning by MkIV, because I haven't yet been able to convince tex,
latex, lualatex, or luatex to use the same font (LM math).

In MkIV, the font is  (from pdffonts):

  NSOXNN+LatinModernMath-Regular   CID Type 0C   Identity-H

Can anyone confirm the problem?

-Sanjoy
___
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] module not found?

2014-05-06 Thread Roger Mason

Hello,

I'm running through Aditya's tutorial on makeing slides 
(http://randomdeterminism.wordpress.com/2013/01/13/creating-a-clean-presentation-style-in-40-commits/)


I'm running standalone ConTeXt  ver: 2014.05.06 14:35 MKIV beta fmt: 
2014.5.6  int: english/english and I installed visualcounter like this:


./first-setup.sh --modules=t-visualcounter

Running context example.tex  I encounter this error:

tex errorerror on line 59 in file slides.tex: ! Undefined 
control sequence


l.59 \definevisualcounter


49 fill p withcolor \MPcolor{background:light};
50   StopPage;
51 \stopreusableMPgraphic
52
53 \defineoverlay [page:background][\reuseMPgraphic{page:background}]
54
55 \setupbackgrounds[page][background={page:background}]
56
57 %\usemodule[visualcounter]
58
59   \definevisualcounter
60 [userpage]

Any help will be most appreciated.

Roger
___
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] \pm set too low in MkIV?

2014-05-06 Thread Mikael P. Sundqvist
On Tue, May 6, 2014 at 4:22 PM, Sanjoy Mahajan san...@mit.edu wrote:
 Continuing my recent theme of finding glyphs too low or too high:

 The \pm symbol looks like it is set too low, in MkIV.

 \setuppagenumbering[location=]
 \starttext
 $\pm2$
 \stoptext

 The minus part of the sign lies below the baseline, which looks odd
 relative to the horizontal stroke of the 2.

 In MkII it is fine, as is the equivalent latex or plain tex (using
 LatinModern).

 I don't know whether the problem lis in the font metrics or in the
 positioning by MkIV, because I haven't yet been able to convince tex,
 latex, lualatex, or luatex to use the same font (LM math).

 In MkIV, the font is  (from pdffonts):

   NSOXNN+LatinModernMath-Regular   CID Type 0C   Identity-H

 Can anyone confirm the problem?

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

I can confirm that it is too low in latest standalone. It looks OK at
http://live.contextgarden.net/, though.

I can also add that \surd is way too low in latest standalone (and
only a bit to low in mkiv on http://live.contextgarden.net/, and OK in
mkii on http://live.contextgarden.net/).

\setuppagenumbering[location=]
\starttext
$\pm2$ and $\surd(1+2)$.
\stoptext

/Mikael
___
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] LuaTeX-Plain and OTF/TTF Fonts

2014-05-06 Thread Aire Funvake
Dear Group,  

Thank you for your time. I'm starting out with TeX/ConTeXt, but
want to arrive via LuaTeX (`luatex-plain.tex/fmt`). Managed to
build, move and use `luatex-plain`. Have the same problem under
MacOSX  Win7 (here is the Win-specific decription -- `%CTX%` is
my ConTeXt root):

Placed some fonts under `%CTX%\tex\texmf-fonts\otf\minion\` 
`%CTX%\tex\texmf-fonts\otf\myriad`. Executed, the following
commands, recognising there might be redundancy, but not sure):

mtxrun --script fonts --update --force
mtxrun --script fonts --update --simple
mtxrun --script fonts --update
mtxrun --script fonts --list --pattern=minion

Result:

minionpro minionprobold  MinionPro-Bold.otf
minionprobold minionprobold  MinionPro-Bold.otf
minionproboldit   minionprobolditMinionPro-BoldIt.otf
minionprobolditalic   minionprobolditMinionPro-BoldIt.otf
minionproit   minionproitMinionPro-It.otf
minionproitalic   minionproitMinionPro-It.otf
minionpronormal   minionproitMinionPro-It.otf
minionproregular  minionproregular   MinionPro-Regular.otf


`hello.tex` - luatex-plain test file:

%[luatex-plain] Hello
%
font\T =minionproregular at 12pt\T
Hello world.
\bye

Executed:

luatex-plain hello.tex

Result:

fonts : font with asked name 'minionproregular'  
  is not found using lookup 'name'
fonts : unknown font 'minionproregular', loading aborted
! Font \ch=minionproregular at 12pt not loadable:  
  metric data not found or bad.

Looked in `%CTX%\tex\texmf-cache\luatex-cache\generic\fonts\data`
at the file `luatex-font-names.lua`. The fonts were listed. Then
deleted the `luatex-font-names.luc` file, added the full paths
to the fonts in front of all the file names in the `.lua` file.

Running `luatex-plain hello.tex` again, works now as expected (it
seems to recreate the `luatex-font-names.luc` automatically).

Setting `OSFONTDIR` before font update and/or before running
`luatex-plain`, have no observable effect.

So, I do have a manual fix/solution. But is there an easier way?

Thanks in advance,  

--  
Aíre Funvake

___
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] \pm set too low in MkIV?

2014-05-06 Thread Sanjoy Mahajan
Thanks for the testing.  I just tried it too. The live context uses MkIV
2012.05.30.  It also gets a different set of fonts:

VNVCGN+LMMathSymbols10-Regular   Type 1Custom  
LFHPBE+LMRoman12-Regular CID Type 0C   Identity-H  

I still wonder whether the placement is due to the new LM Math font.

-Sanjoy

Mikael P. Sundqvist mic...@gmail.com writes:

 I can confirm that it is too low in latest standalone. It looks OK at
 http://live.contextgarden.net/, though.

 I can also add that \surd is way too low in latest standalone (and
 only a bit to low in mkiv on http://live.contextgarden.net/, and OK in
 mkii on http://live.contextgarden.net/).

 \setuppagenumbering[location=]
 \starttext
 $\pm2$ and $\surd(1+2)$.
 \stoptext

 /Mikael
___
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] \pm set too low in MkIV?

2014-05-06 Thread Otared Kavian
Hi Hans,

Thanks for your attention to the issue pointed out by Sanjoy.

On 6 mai 2014, at 20:14, Hans Hagen pra...@wxs.nl wrote:
 […]
 all minus' are below the baseline so consider it a feature

Yes this is the case in recent versions of mkiv, but in Plain TeX and mkii this 
is not the case: there the minus sign in \pm is aligned with the baseline.

I agree with Sanjoy and Mikael to say that it the minus sign in \pm should be 
aligned with the baseline: however I don’t know if this can be easily achieved.

Best regards: OK

 
 Hans
 
 -
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
 -
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

___
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] \pm set too low in MkIV?

2014-05-06 Thread Hans Hagen

On 5/6/2014 4:22 PM, Sanjoy Mahajan wrote:

Continuing my recent theme of finding glyphs too low or too high:

The \pm symbol looks like it is set too low, in MkIV.

\setuppagenumbering[location=]
\starttext
$\pm2$
\stoptext

The minus part of the sign lies below the baseline, which looks odd
relative to the horizontal stroke of the 2.

In MkII it is fine, as is the equivalent latex or plain tex (using
LatinModern).

I don't know whether the problem lis in the font metrics or in the
positioning by MkIV, because I haven't yet been able to convince tex,
latex, lualatex, or luatex to use the same font (LM math).

In MkIV, the font is  (from pdffonts):

   NSOXNN+LatinModernMath-Regular   CID Type 0C   Identity-H

Can anyone confirm the problem?


\starttext
   $x \pm 2 + a $\par
\switchtobodyfont[pagella] $x \pm 2 + a $\par
\switchtobodyfont[termes]  $x \pm 2 + a $\par
\switchtobodyfont[cambria] $x \pm 2 + a $\par
\switchtobodyfont[bonum]   $x \pm 2 + a $\par
\switchtobodyfont[schola]  $x \pm 2 + a $\par
\stoptext

all minus' are below the baseline so consider it a feature

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \pm set too low in MkIV?

2014-05-06 Thread Hans Hagen

On 5/6/2014 8:28 PM, Otared Kavian wrote:

Hi Hans,

Thanks for your attention to the issue pointed out by Sanjoy.

On 6 mai 2014, at 20:14, Hans Hagen pra...@wxs.nl
mailto:pra...@wxs.nl wrote:

[…]
all minus' are below the baseline so consider it a feature


Yes this is the case in recent versions of mkiv, but in Plain TeX and
mkii this is not the case: there the minus sign in \pm is aligned with
the baseline.

I agree with Sanjoy and Mikael to say that it the minus sign in \pm
should be aligned with the baseline: however I don’t know if this can be
easily achieved.


so how about \mp then ...

\starttext
   $x \pm 2 + \mp x + a $\par
\switchtobodyfont[pagella] $x \pm 2 + \mp x + a $\par
\switchtobodyfont[termes]  $x \pm 2 + \mp x + a $\par
\switchtobodyfont[cambria] $x \pm 2 + \mp x + a $\par
\switchtobodyfont[bonum]   $x \pm 2 + \mp x + a $\par
\switchtobodyfont[schola]  $x \pm 2 + \mp x + a $\par
\stoptext

the + aligns on the math axis so one can argue if the type-one variant 
is ok ... so we would need a smaller (less height) + then which would 
look visually weird


(all can be achieved ... but the idea of lm/gyre fonts is to provide an 
acceptable consistent set ... at some point we can think of variants - 
or maybe the fonts have a variant already)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \pm set too low in MkIV?

2014-05-06 Thread Hans Hagen

On 5/6/2014 4:56 PM, Sanjoy Mahajan wrote:

Thanks for the testing.  I just tried it too. The live context uses MkIV
2012.05.30.  It also gets a different set of fonts:

VNVCGN+LMMathSymbols10-Regular   Type 1Custom
LFHPBE+LMRoman12-Regular CID Type 0C   Identity-H


that's then the virtual lm unicode math (which you can still use in the 
latest mkiv if needed)



I still wonder whether the placement is due to the new LM Math font.


yes


-Sanjoy

Mikael P. Sundqvist mic...@gmail.com writes:


I can confirm that it is too low in latest standalone. It looks OK at
http://live.contextgarden.net/, though.

I can also add that \surd is way too low in latest standalone (and
only a bit to low in mkiv on http://live.contextgarden.net/, and OK in
mkii on http://live.contextgarden.net/).

\setuppagenumbering[location=]
\starttext
$\pm2$ and $\surd(1+2)$.
\stoptext

/Mikael

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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] LuaTeX-Plain and OTF/TTF Fonts

2014-05-06 Thread Hans Hagen

On 5/6/2014 4:49 PM, Aire Funvake wrote:

Dear Group,

Thank you for your time. I'm starting out with TeX/ConTeXt, but
want to arrive via LuaTeX (`luatex-plain.tex/fmt`). Managed to
build, move and use `luatex-plain`. Have the same problem under
MacOSX  Win7 (here is the Win-specific decription -- `%CTX%` is
my ConTeXt root):

Placed some fonts under `%CTX%\tex\texmf-fonts\otf\minion\` 
`%CTX%\tex\texmf-fonts\otf\myriad`. Executed, the following
commands, recognising there might be redundancy, but not sure):

 mtxrun --script fonts --update --force
 mtxrun --script fonts --update --simple
 mtxrun --script fonts --update
 mtxrun --script fonts --list --pattern=minion

Result:

 minionpro minionprobold  MinionPro-Bold.otf
 minionprobold minionprobold  MinionPro-Bold.otf
 minionproboldit   minionprobolditMinionPro-BoldIt.otf
 minionprobolditalic   minionprobolditMinionPro-BoldIt.otf
 minionproit   minionproitMinionPro-It.otf
 minionproitalic   minionproitMinionPro-It.otf
 minionpronormal   minionproitMinionPro-It.otf
 minionproregular  minionproregular   MinionPro-Regular.otf

`hello.tex` - luatex-plain test file:

 %[luatex-plain] Hello
 %
 font\T =minionproregular at 12pt\T
 Hello world.
 \bye

Executed:

 luatex-plain hello.tex

Result:

fonts : font with asked name 'minionproregular'
   is not found using lookup 'name'
 fonts : unknown font 'minionproregular', loading aborted
 ! Font \ch=minionproregular at 12pt not loadable:
   metric data not found or bad.

Looked in `%CTX%\tex\texmf-cache\luatex-cache\generic\fonts\data`
at the file `luatex-font-names.lua`. The fonts were listed. Then
deleted the `luatex-font-names.luc` file, added the full paths
to the fonts in front of all the file names in the `.lua` file.

Running `luatex-plain hello.tex` again, works now as expected (it
seems to recreate the `luatex-font-names.luc` automatically).

Setting `OSFONTDIR` before font update and/or before running
`luatex-plain`, have no observable effect.

So, I do have a manual fix/solution. But is there an easier way?


I assume you made a plain format with:

  mtxrun --script plain --make

Then, does this work:

  mtxrun --script plain luatex-test

okay?

Hans
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Text background that spans the width of the page

2014-05-06 Thread Hans Hagen

On 5/2/2014 5:59 PM, Darksair wrote:

Hi all,

I would like to have a colored horizontal stripe as background for one
line of text.  Sort of like what textbackground does, but I want it to
span the whole \paperwidth, instead of just \textwidth.  At the end of
the day, I would use it to style for example my section heads, or to
highlight one specific \item.  What’s the best way to do it?


you can use textbackgrounds and plug in some mp code that extends into 
the margins ... it depends a bit on what 'line' means here


\startuniqueMPgraphic{whatever}
fill OverlayBox
leftenlarged BackSpace
rightenlarged CutSpace
withcolor OverlayColor ;
setbounds currentpicture to OverlayBox
enlarged max(BackSpace,CutSpace) ;
\stopuniqueMPgraphic

\defineoverlay[whatever][\uniqueMPgraphic{whatever}]

\framed
  [background=whatever,
   backgroundcolor=green,
   frame=off,
   width=\textwidth]
  {test}%

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] LuaTeX-Plain and OTF/TTF Fonts

2014-05-06 Thread Aíre Funvake

On Tue May  6 21:13:43 2014, Hans Hagen wrote:

On 5/6/2014 4:49 PM, Aire Funvake wrote:

Dear Group,

Thank you for your time. I'm starting out with TeX/ConTeXt, but
want to arrive via LuaTeX (`luatex-plain.tex/fmt`). Managed to
build, move and use `luatex-plain`. Have the same problem under
MacOSX  Win7 (here is the Win-specific decription -- `%CTX%` is
my ConTeXt root):


Setting `OSFONTDIR` before font update and/or before running
`luatex-plain`, have no observable effect.

So, I do have a manual fix/solution. But is there an easier way?


I assume you made a plain format with:

  mtxrun --script plain --make

Then, does this work:

  mtxrun --script plain luatex-test

okay?

Hans
8-


Hi Hans,

No, I made it with `luatex --ini luatex-plain.fmt` and copied
the resulting `.fmt` file. But, I executed the first command
just now, just to be sure, and then ran the next command:
`mtxrun --script plain luatex-test`. Result:

\write18 enabled.
...
tex/texmf-cache/luatex-cache/generic/fonts/data/luatex-fonts-names.luc)(load 
luc
: 
c:/ctx/tex/texmf-cache/luatex-cache/generic/fonts/otf/lmroman10-bold.luc)unkn

own font in database, run: mtxrun --script fonts --reload --simple
! LuaTeX error 
...ntext/tex/generic/context/luatex/luatex-fonts-merged.lua:6213:

attempt to index field 'known' (a nil value).
to be read again
\par
l.33

?Renter

After `R`, it did produced `luatex-test.pdf`. Not sure if it
looks the way it should ... couple of overfull boxes, narrow
third page.

Either way, I updated the fonts again as above, checked that
it recreated the `luatex-fonts-names.lua` file like before.
If I delete the old `luatex-fonts-names.luc`, the next run of
`luatex-plain hello.tex` produces the same result. Added the
paths to the fonts in `luatex-fonts-names.lua` (minion 
myriad), ran `luatex-plain hello.tex` again ... and all is fine.

Further experimentation: Copied the Source Sans Pro fonts to
a subdirectory alongside the `minion` and `myriad` directories,
(`%CTX%\tex\texmf-fonts\otf\sourcesans`), and again updated the
fonts database(s). Upon inspection of `luatex-fonts-names.lua`,
the Source Sans fonts and files are listed, but they *did* have
the path prefixed to the font file names, and consequently, I
could use them without modifying `luatex-fonts-names.lua`.

Thank you for your reply. I'm convinced this is no bug, just my
inexperience at play. This is not a crippling problem. I can
tackle The TeXbook now.

Regards,
Aíre Funvake.


___
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] first xcell dimension to large in xtable with external figure.

2014-05-06 Thread DesdeChaves
Dear Sirs,

I would like to write a tecnhical document that looks like the DIN
standards style.
 I found  in this Wolfgang's message  (
http://www.ntg.nl/pipermail/ntg-context/2013/076348.html) inspiration for
do that. All works great if the sentence  \externalfigure[cow.pdf][height=3cm]
are commented, otherwise the cell Doc No. is to large relatively the
other cells in the last column.
What is wrong with this code?

thanks in advance.

Jorge


 \setuplayout
   [backspace=15mm,
width=middle,
topspace=15mm,
height=middle,
header=5cm,
footer=0pt]

\startsetups[header:table]

\startembeddedxtable[align={middle,lohi},strut=no]
\startxrow
\startxcell[width=0.20\paperwidth,ny=4]
\externalfigure[cow.pdf][height=3cm]
\stopxcell
\startxcell[width=0.40\paperwidth,ny=4]
Document title
\stopxcell
\startxcellgroup[height=1cm,foregroundstyle=small]
\startxcell[width=0.10\paperwidth,align={flushright,lohi}]
Doc No.
\stopxcell
\startxcell[width=0.15\paperwidth,align={flushleft,lohi}]
\unknown
\stopxcell
\stopxcellgroup
\stopxrow
 \startxrow
\startxcellgroup[height=1cm, foregroundstyle=small]
\startxcell[width=0.10\paperwidth,align={flushright,lohi}]
Revision
\stopxcell
\startxcell[width=0.15\paperwidth,align={flushleft,lohi}]
\unknown
\stopxcell
\stopxcellgroup
\stopxrow
 \startxrow
\startxcellgroup[height=1cm, foregroundstyle=small]
\startxcell[width=0.10\paperwidth,align={flushright,lohi}]
Data
\stopxcell
\startxcell[width=0.15\paperwidth,align={flushleft,lohi}]
\unknown
\stopxcell
\stopxcellgroup
\stopxrow
 \startxrow
\startxcellgroup[height=1cm,foregroundstyle=small]
\startxcell[width=0.10\paperwidth,align={flushright,lohi}]
Pagina
\stopxcell
\startxcell[width=0.15\paperwidth,align={flushleft,lohi}]
\pagenumber/\lastpagenumber
\stopxcell
\stopxcellgroup
\stopxrow
\stopembeddedxtable

\stopsetups

\setupheadertexts[\texsetup{header:table}]


\starttext
\dorecurse{30}{\input knuth\par}


\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] \pm set too low in MkIV?

2014-05-06 Thread Sanjoy Mahajan
 the + aligns on the math axis so one can argue if the type-one variant 
 is ok ... so we would need a smaller (less height) + then which would 
 look visually weird

Plain TeX doesn't align the plus/minus to the math axis.  Rather, the
minus is aligned to the baseline, and the horizontal stroke of the plus
is above the baseline.  I agree that it looks a bit strange with the
horizontal stroke of the plus sign not aligned with the horizontal
stroke of the plus/minus.  Bt it looks even more jarring to have the
minus below the baseline, because the baseline is such a strong visual
line.

I don't think I've ever the minus below the baseline in a math book, and
it looks very wrong to my eye.

Pagella looks worse than the others, because it has a vertical gap
between the minus and the plus sign, so the depth below the baseline is
even larger.

 (all can be achieved ... but the idea of lm/gyre fonts is to provide an 
 acceptable consistent set ... at some point we can think of variants - 
 or maybe the fonts have a variant already)

I realize that it's not a ConTeXt problem, but is there a ConTeXt
workaround?  Or better to go to the TeX guts and compute the depth of
the box, then use \raise{}?

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