Re: [NTG-context] mptopdf TeX text problem

2011-12-01 Thread Hans Hagen

On 30-11-2011 21:32, Martin Bruchanov wrote:

Hello,

what is the proper way of using MetaPost with TeX text? I have two examples:


beginfig(1);
draw unitsquare scaled(1cm);
draw textext($\pi$) shifted((0.5,0.5)*cm);
%   label(btex $\pi$ etex,  origin);
endfig;
end


Easiest is:

fig-1.tex:

\startMPpage
  draw unitsquare scaled(1cm);
  draw textext($\pi$) shifted((0.5,0.5)*cm);
\stopMPpage

and then run:

context fig-1

this will give you an independent pdf

-
  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] math font

2011-12-01 Thread Hans van der Meer
Instead of the mathfont'a italics I would like to try an upright typeface. See 
for example the P.p on the left of the sample, 1-p in the second \pmatrix and 
the toprow in the last one.

How can I do this globally, there by avoiding avoiding the need to sprinkle 
\mathrm's all around as in: \pmatrix{\mathrm  p\cr\mathrm 1-p\cr}. A single 
\mathrm in front as not enough for the matrices.



kanaalmatrix.pdf
Description: Adobe PDF document


By the way, this comes from the lucida typescript.

Hans van der Meer



___
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] math font

2011-12-01 Thread Aditya Mahajan

On Thu, 1 Dec 2011, Hans van der Meer wrote:


Instead of the mathfont'a italics I would like to try an upright typeface. See 
for example the P.p on the left of the sample, 1-p in the second \pmatrix and 
the toprow in the last one.

How can I do this globally,


I don't think that there is a global interface. You can try

\appendtoks \mathrm \to \everysetupmathematics.

In principle, we can have an interface similar to 
\setupmathematics[lcgreek=...,ucgreek=...], but the choice of keys 
requires some thought.



there by avoiding avoiding the need to sprinkle \mathrm's all around as
in: \pmatrix{\mathrm  p\cr\mathrm 1-p\cr}. A single \mathrm in front as 
not enough for the matrices.


That is because \pmatrix uses \halign, where each cell starts a new math 
gruop. This reminds me of an old request to have support for \mhalign and 
\mvalign at the engine level.


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
___


Re: [NTG-context] beta

2011-12-01 Thread Ian Lawrence
New units are a great improvement. Thanks.
Ian
On 29 Nov 2011, at 17:57, Hans Hagen wrote:

 Hi,
 
 I uploaded a new beta. The usual fixes (as reported to/suggested on this 
 list) and an updated unit mechanism. I'll also upload the new (but yet 
 incomplete) units manual.
 
 http://www.pragma-ade.com/general/manuals/units-mkiv.pdf
 
 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
___


[NTG-context] MPpage-MPcode

2011-12-01 Thread Hans van der Meer
Can someone give me a short explanation of the difference between the various 
metapost enclosures in MetaFun? such as \startMPpage-\stopMPpage, 
\startMPcode-\stopMPcode?

I am on the lookout for a setup in which textext can be used and where the 
figure comes out clipped, i.e. not contained in a full page with lots of 
surrounding whitespace. Note without textext doing framed's etc. there is no 
problem. The problem arises when the pageheight and pagewidth come into play.

Hans van der Meer



___
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] math font

2011-12-01 Thread Hans Hagen

On 1-12-2011 17:43, Aditya Mahajan wrote:


That is because \pmatrix uses \halign, where each cell starts a new math
gruop. This reminds me of an old request to have support for \mhalign
and \mvalign at the engine level.


just give a functional description and put it in the luatex tracker



-
  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] Escaping a special character in a MetaPost figure within a ConTeXt document fails

2011-12-01 Thread Raymond LeClair
Thanks for the reply!

Found I needed to use \letterbackslash\letterhash for this to work. Does that 
make sense?

On Nov 30, 2011, at 10:37 AM, Aditya Mahajan wrote:

 Try:
 
 using \letterhash instead of \#
 
 or
 
 \startasciimode
 \def \FrontMatterTitle {
 \startreusableMPgraphic{frontmattertitle:\overlaywidth:\overlayheight}
   matter_paper_width := 4.25in;
   matter_paper_height := 6.875in;
   front_left_margin := 0.3889in;
   top_margin := 0.3472in;
   draw (0, 0)--(matter_paper_width, matter_paper_height)
 withpen pencircle scaled 1bp withcolor white;
   picture titleText;
 
   %% == HERE IS THE SOURCE OF THE PROBLEM ==
 
   titleText := btex {\vbox{\hsize 2.7291667in \baselineskip 38.0pt
   \setupalign[flushleft,hyphenated,verytolerant]
   \TitleFont THE BEGINNINGS OF #BOOM}} etex;
 %% NOTE I changed \# to # and % to %%
   labeloffset := 0bp;
   label.lrt(titleText, (front_left_margin,
 matter_paper_height - top_margin));
 \stopreusableMPgraphic
 \reuseMPgraphic{frontmattertitle:\overlaywidth:\overlayheight}
 }
 
 \stopasciimode
 
 You can also use \framed[width=2.73in, 
 foregroundstyle={\TitleFont\setupinterlinespace[38pt],
 align={flushleft, }]{The } instead of explicit \vbox.
 
 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
 ___

___
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] Formatting footnote numbers (in text)

2011-12-01 Thread Chris Lott
I'm new to ConTeXt, but I have searched for this myself... I'm trying
to format the footnote numbers that appear in the text of my
documents. I've used this to change them from being blue (there may be
a better way-- I am generating PDFs for print, so don't need the
hyperlinks) using the following:
\setupinteraction[state=start,color=black,contrastcolor=black]

Is this where I would control other formatting (size, face, format)?
Can anyone provide or point to an example of formatting footnote
numbers in text area of a doc?

c
--
Chris Lott
___
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] Formatting footnote numbers (in text)

2011-12-01 Thread Wolfgang Schuster

Am 01.12.2011 um 22:02 schrieb Chris Lott:

 I'm new to ConTeXt, but I have searched for this myself... I'm trying
 to format the footnote numbers that appear in the text of my
 documents. I've used this to change them from being blue (there may be
 a better way-- I am generating PDFs for print, so don't need the
 hyperlinks) using the following:
 \setupinteraction[state=start,color=black,contrastcolor=black]

Why do you enable hyperlinks etc. when you don’t need them?

 Is this where I would control other formatting (size, face, format)?
 Can anyone provide or point to an example of formatting footnote
 numbers in text area of a doc?

\setupnote
  [footnote]
  [textstyle=italic,
   textcolor=green,
   textcommand=\inframed] % default: \high

\starttext
Hi there!\footnote{I’m a footnote.}
\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
___


[NTG-context] metapost question

2011-12-01 Thread Hans van der Meer
In MetaPost: 
After putting something in a picture, one can draw its boundaries with draw 
boundingbox thepicture. Is it possible to obtain at that point the dimensions 
of this boudingbox in order to do some calculations with them?

Hans van der Meer



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

2011-12-01 Thread Peter Rolf
Am 01.12.2011 23:25, schrieb Hans van der Meer:
 In MetaPost: 
 After putting something in a picture, one can draw its boundaries with draw 
 boundingbox thepicture. Is it possible to obtain at that point the 
 dimensions of this boudingbox in order to do some calculations with them?

urcorner boundingbox currentpicture

should hold the wanted values (untested); maybe you have to take
'llcorner' into account too.

Best wishes,  Peter

 Hans van der Meer
 
 
 
 ___
 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] Why does the oldstyle numerals switch, \os, also switch off m-dashes?

2011-12-01 Thread Pavneet Arora
Just for the sake of completeness, in case someone else stumbles upon this 
thread, it should be noted that \definefontfeature needs to be set before 
\setupbodyfont, i.e.,


\definefontfeature[default][default][onum=yes]
\definefontfeature[smallcaps][smallcaps][onum=yes]
\setupbodyfont[schola,11pt]

rather than:

\setupbodyfont[schola,11pt]
\definefontfeature[default][default][onum=yes]
\definefontfeature[smallcaps][smallcaps][onum=yes]

I made the mistake of using the latter form in one of my tests and was
left wondering why things weren't working.

Regards.

On 11-11-30 04:19 PM, Wolfgang Schuster wrote:


Am 30.11.2011 um 20:19 schrieb Pavneet Arora:


Okay another anomaly:  I used the example in the FAQs to try to set the feature 
across the entire document, which is really what I want.

http://wiki.contextgarden.net/FAQ#How_can_I_get_the_.E2.80.9Coldstyle_numbers.E2.80.9D_.28text_figures.29_in_a_document.3F

In a manuscript length project, I wouldn't want to get {\os } for each local 
instance.  Now, what I have noticed was that the small caps switch, \sc, seems 
to disable old-style numerals.  Is this a typographic convention, i.e., that in 
a run of small caps one should not revert to old-style numerals?  Is there a 
way of avoiding this assumption for a larger project?  I sometimes have text 
set in small caps that as part of a project ID would have some numbers in it.  
In that case, I would like the old-style numerals to be used.


No, the answer is that smallcaps are activated with the “smcp” feature and this 
is applied to the regular style with the “smallcaps” set. To get now old style 
figures when you use smallcaps letters you need also this setup:

\definefontfeature[smallcaps][smallcaps][onum=yes]

Wolfgang


--
-
- Pavneet Arora

Waroc Fine Audio + Custom Home Cinema
www.waroc.com  416.937.WAROC (9276)

___
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] [SOLVED] mod_php vs context: tight loop

2011-12-01 Thread Brendan Jurd

On 27/11/11 16:45, Brendan Jurd wrote:

On 25/11/11 19:17, Hans Hagen wrote:

On 25-11-2011 06:12, Brendan Jurd wrote:

I have a PHP application which generates documentation on the fly with
context. This has been working really well, but I am now testing
deployment on a new server with a more recent version of context, and it
seems to be somehow getting itself into a tight loop.


in such cases I always run with --batch to make sure that the job
itself cannot block


Thanks for the response. I tried running with --batch and it made no
difference to the outcome. The mtxrun process still got jammed up in
exactly the same manner.

Regressing to the ubuntu 'lucid' packages resolved the problem for me,
so whatever is wrong has gone wrong somewhere in the combination of
packages in ubuntu 'natty'.



I did eventually get to the bottom of this.  Turns out that mtxrun was 
failing to find a writable cache path (from mtxrun line 9269).


To find a cache path, mtxrun searches through the environment variables 
TEXMFCACHE, TMPDIR, TEMPDIR, TMP, TEMP, HOME, HOMEPATH.


The apache worker process had no such environment variables, so mtxrun 
failed.  Once I added the following line to my PHP script, everything 
started working just fine:


putenv('TEMPDIR=/tmp');

--
Regards,
Brendan Jurd

Software Engineer
Achieve, Corp

brendan.j...@achievecorp.com.au
___
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
___