Re: [NTG-context] Tesselating the sheet with a image

2013-05-22 Thread Wolfgang Schuster

Am 21.05.2013 um 07:38 schrieb H. Özoguz :

> Hi there,
> 
> for a card game I have this macro:
> 
> \defineoverlay[eslami][{\externalfigure[somepicture.pdf]}]
> \def\esl[#1][#2][#3]{%
> \startframed[frame=on,width=4.75cm,offset=overlay,align=middle,background=eslami]%
>  \offinterlineskip
>  \framed[width=4.75cm,frame=off,height=2cm]{\blank[-3mm]#1}\\
>  \framed[width=4.75cm,frame=off,height=3cm]{#2}\\
>  \framed[width=4.75cm,frame=off,height=2.4cm]{#3}
> \stopframed}
> \starttext
> \esl[blub][blub][blub]
> \stoptext
> 
> which produces cards with some text (see attachment).
> Now, I only want to write in the editor the commands
> 
> \esl[blub1][blub1][blub1]
> \esl[blub2][blub2[blub2]
> \esl[blub3][blub3][blub3]
> etc.
> 
> and these images / overlays should be placed automatically vertically and 
> horizontically over the sheets, like a tesselation (and after that they will 
> be printed and cutted).
> The order of setting the cards is not important. If one page is full, then 
> they should be placed automatically on the next page - but perfectly the same 
> way, on the same locations, like on all other pages. That is important for 
> cutting, each card should have two sides, so they have to match in location.
> 
> Is there a way to do this?

You can let each card produce a single page (select a small aper size, e.g. A7) 
and use the imposition mechanism
to print many cards on paper. I wrote a while ago a imposition shame for 
flashcards which can be used for this.

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

2013-05-22 Thread Wolfgang Schuster

Am 22.05.2013 um 19:17 schrieb Sietse Brouwer :

> NB: I also have some recollection of dummy text composed of hollow
> rectangles rather than solid black ones, but like you I cannot
> remember where I saw that. Maybe the document also showed kerns, in
> pretty colors? I can't remember.

One of these examples can be found in the TeXbook on page 65.

IIRC a few presentations regardings math used boxes to show the position
of the various symbols and the needed kerns for sub- and superscripts etc.

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

2013-05-22 Thread Sietse Brouwer
Hi John,

John Culleton  wrote:
>> In some Context manuals (can't remember which ones) there is a faux font
>> that just consists of little rectangles of two different sizes. What is
>> the name of that font? Is it included in e.g. TeXLive?

Wolfgang wrote:
> Do you mean \fakeword?

Link to the This Way that introduces \fakeword and friends:
http://www.pragma-ade.com/general/magazines/mag-0007.pdf
(I am personally rather fond of the \simplethesis command. (This
command produces a lot of output, so it may take a bit longer than you
expect --- just like a real thesis.))

Or perhaps you mean the black boxes in section 5 of the reference
manual's typography chapter [1]? Those are made by replacing every
letter with a black rule of equal height, depths, and width. I dug op
the code [2]; relevant bit is below.

[1] 
http://context.aanhet.net/svn/contextman/context-reference/en/co-typography.pdf
[2] 
http://context.aanhet.net/svn/contextman/context-reference/en/co-typography.tex

NB: I also have some recollection of dummy text composed of hollow
rectangles rather than solid black ones, but like you I cannot
remember where I saw that. Maybe the document also showed kerns, in
pretty colors? I can't remember.

Cheers,
Sietse

% Converting every letter into a rectangle.
\def\somecharacter#1%
  {\setbox0=\hbox{#1}%
   \blackrule[width=\wd0,height=\ht0,depth=\dp0]}

\def\someline%
  {\noindent \processtokens\somecharacter\somecharacter\relax\space
 {The height and depth of lines differs.}}

\starttext
\someline
\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] \smash broken (beta)

2013-05-22 Thread Peter Rolf
Am 22.05.2013 18:44, schrieb Wolfgang Schuster:
> 
> Am 22.05.2013 um 18:00 schrieb Peter Rolf :
> 
>> as the subject says... :-)
>>
>>
>> \starttext
>> \starttabulate[|l|l|]
>> \NC w   \NC \ruledhbox{\smash  [w]{This is some great smashing, isn't
>> it?}} \NC \NR
>> \NC h   \NC \ruledhbox{\smash  [h]{This is some great smashing, isn't
>> it?}} \NC \NR
>> \NC d   \NC \ruledhbox{\smash  [d]{This is some great smashing, isn't
>> it?}} \NC \NR
>> \NC tb  \NC \ruledhbox{\smash [tb]{This is some great smashing, isn't
>> it?}} \NC \NR
>> \NC whd \NC \ruledhbox{\smash[whd]{This is some great smashing, isn't
>> it?}} \NC \NR
>> \stoptabulate
>> \stoptext
> 
> supp-box.mkiv:
> 
> \def\syst_boxes_smash_process_option#1%
>   {\ifx#1\relax\else
> -\csname boxes_s_#1\endcsname
> +\csname syst_boxes_s_#1\endcsname
>  \expandafter\syst_boxes_smash_process_option
>\fi}
>

Thanks for the fast fix :-)

Peter


> 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] partial derivatives with bonum/pagella font

2013-05-22 Thread Mikael P. Sundqvist
Thank you very much Sietse! This fits my needs for the students for
tomorrow...

I also defined
\def\sprime{\myprime{\prime}}
\def\dprime{\myprime{\prime\kern-0.1em\prime}}

Then $f\sprime_x$ and $f\dprime_{xx}$ is not too hard to write :)

/Mikael


On Wed, May 22, 2013 at 2:22 PM, Sietse Brouwer  wrote:

> Hi Mikael,
>
> > is there a quick fix/hack that somehow allows me to get it look "almost
> like
> > it should" in a small document today with bonum?
>
> This might get you somewhere. I hope you don't have too many double
> primes in your document...
>
> NB: `%macros=mkvi` has to be the first line in the file.
>
> Cheers,
> Sietse
>
> % macros=mkvi
>
> \setupbodyfont[bonum]
>
> % This macro takes 1 arguments, #upper. It postfixes a negative kern just a
> % bit larger than the width of #upper, so that #upper does not push
> % the next content away to the right.
> \def\myprime#upper%
>{% 1. Store the width of the primes in a box, so we can get its width
> \setbox\scratchbox=\hbox{$#upper$}%
> % 2. We'll want to kern back by a bit more than
> \scratchdimen=\dimexpr \wd\scratchbox + 0.3em \relax%
> % The actual typesetting
> \kern 0em #upper\kern -\scratchdimen}
>
> \starttext
> % Quick and dirty 1: just pretend the prime is uppercased
> $f'_x$, $f_x'$ $f^{\prime\prime}_x$.
>
> % Less quick, still dirty: the \myprime macro defined above
> $f'_x$, $f_x'$ $f\myprime{\prime\prime}_x$.
>
> % Slow and dirty: add a kern between the \primes,
> % because bonum pushes them apart a bit.
> $f'_x$, $f_x'$ $f\myprime{\prime\kern -0.1em \prime}_x$.
> \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
>
> ___
>
___
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] \smash broken (beta)

2013-05-22 Thread Wolfgang Schuster

Am 22.05.2013 um 18:00 schrieb Peter Rolf :

> as the subject says... :-)
> 
> 
> \starttext
> \starttabulate[|l|l|]
> \NC w   \NC \ruledhbox{\smash  [w]{This is some great smashing, isn't
> it?}} \NC \NR
> \NC h   \NC \ruledhbox{\smash  [h]{This is some great smashing, isn't
> it?}} \NC \NR
> \NC d   \NC \ruledhbox{\smash  [d]{This is some great smashing, isn't
> it?}} \NC \NR
> \NC tb  \NC \ruledhbox{\smash [tb]{This is some great smashing, isn't
> it?}} \NC \NR
> \NC whd \NC \ruledhbox{\smash[whd]{This is some great smashing, isn't
> it?}} \NC \NR
> \stoptabulate
> \stoptext

supp-box.mkiv:

\def\syst_boxes_smash_process_option#1%
  {\ifx#1\relax\else
-\csname boxes_s_#1\endcsname
+\csname syst_boxes_s_#1\endcsname
 \expandafter\syst_boxes_smash_process_option
   \fi}

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] \smash broken (beta)

2013-05-22 Thread Peter Rolf
as the subject says... :-)


\starttext
\starttabulate[|l|l|]
\NC w   \NC \ruledhbox{\smash  [w]{This is some great smashing, isn't
it?}} \NC \NR
\NC h   \NC \ruledhbox{\smash  [h]{This is some great smashing, isn't
it?}} \NC \NR
\NC d   \NC \ruledhbox{\smash  [d]{This is some great smashing, isn't
it?}} \NC \NR
\NC tb  \NC \ruledhbox{\smash [tb]{This is some great smashing, isn't
it?}} \NC \NR
\NC whd \NC \ruledhbox{\smash[whd]{This is some great smashing, isn't
it?}} \NC \NR
\stoptabulate
\stoptext


mtx-context | current version: 2013.05.21 16:14 
This is LuaTeX, Version beta-0.77.0-2013051618  (TeX Live 2013/W32TeX)
(rev 4635)


Peter
___
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] Tabulate: vertical distance between rows

2013-05-22 Thread Wolfgang Schuster

Am 22.05.2013 um 15:20 schrieb Procházka Lukáš Ing. - Pontex s. r. o. 
:

> Hello,
> 
> are there more ways how to affect vertical distance between rows within 
> \start/stop-tabulate?
> 
> 1) There is one, described on wiki (http://wiki.contextgarden.net/Tabulate):
> 
> 
> \unprotect
> \appendtoks
>  \blank[halfline]
> \to \t_tabl_tabulate_every_after_row
> \protect

This is only a hack and shouldn’t be used.

> Its problem is that I don't know how to call it by Lua.
> The following code fails:
> 
> 
>  \startluacode
>context[[
> \unprotect
> \appendtoks
>  \blank[halfline]
> \to \t_tabl_tabulate_every_after_row
> \protect
> ]]
>  \stopluacode
> 
> ...
> 
> 
> So how to make it acceptable by Ctx?
> 
> 
> 2) Is there another way, e.g. inserting something each time before \NC\NR or 
> elsewhere)?
> 
> This brings no effect:
> 
> 
>  \starttabulate[|l|r|]
>\NC a \NC b \blank\NC\blank\NR
>\NC A \NC B \NC\NR
>  \stoptabulate
> 
> 
> As I intend to typeset a table (into tabulate) via Lua, adding an extra 
> sequence/command anywhere when a table row is typeset is no problem.


You can use the \TB which accepts the same keywords as \blank.

\starttext

\starttabulate
\NC one  \NC two   \NC\NR 
\NC two  \NC three \NC\NR 
\TB[line]
\NC four \NC five  \NC\NR 
\TB[1cm]
\NC six  \NC seven \NC\NR 
\stoptabulate

\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] Referring to a numbered figure in text.

2013-05-22 Thread Wolfgang Schuster

Am 22.05.2013 um 17:08 schrieb john Culleton :

> 
> Using MKIV and the \placefigure command how do I
> a. define a reference term in \placefigure command
> b. refer to that term in my text.

\useMPlibrary[dum]

\starttext

\placefigure
  [][fig:one]
  {First dummy figure}
  {\externalfigure[dummy-1]}

\startplacefigure[reference=fig:two,title=Second dummy figure]
  \externalfigure[dummy-2]
\stopplacefigure

This document contains \in{figure}[fig:one] at \at{page}[fig:one]
and \in{figure}[fig:two] at \at{page}[fig: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] Faux font

2013-05-22 Thread Wolfgang Schuster

Am 22.05.2013 um 16:13 schrieb john Culleton :

> 
> In some Context manuals (can't remember which ones) there is a faux font
> that just consists of little rectangles of two different sizes. What is
> the name of that font? Is it included in e.g. TeXLive?

Do you mean \fakeword?

\usemodule[visual]

\starttext

\dorecurse{10}{\fakeword\space}

\blank

\dorecurse{10}{\fakewords{2}{8}\par}

\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] Referring to a numbered figure in text.

2013-05-22 Thread john Culleton

Using MKIV and the \placefigure command how do I
a. define a reference term in \placefigure command
b. refer to that term in my text.


-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: "Create Book Covers with Scribus"
available at http://www.booklocker.com/books/4055.html
___
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] typo in meta-pdf.lua (beta)

2013-05-22 Thread Peter Rolf
Hi,

I found a typo in the current beta (2013-05-21)

meta-pdf.lua, line 169

168  function mps.translate(tx,ty)
169  mpscode(f_translate(tx,ty)
170  end


Regards,  Peter
___
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] Faux font

2013-05-22 Thread john Culleton

In some Context manuals (can't remember which ones) there is a faux font
that just consists of little rectangles of two different sizes. What is
the name of that font? Is it included in e.g. TeXLive?
-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: "Create Book Covers with Scribus"
available at http://www.booklocker.com/books/4055.html
___
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] Place a box on the right

2013-05-22 Thread Wolfgang Schuster

Am 22.05.2013 um 09:27 schrieb H. Özoguz :

> Hi there,
> 
> \starttext
> 
> \startalignment[right] \framed{This box should be on the right side, but is 
> not.} \stopalignment
> 
> \stoptext
> 
> 
> I know it is easy, but could not find it in the reference. Why not allow 
> simply \framed[location=right]{} ? ("right" is not a correct keyword for 
> "location").


Method 1:

\startlinealignment[right]
\framed{…}
\stoplinealignment

Method 2:

\startframedtext[right][width=fit]
This box should be on the right side!
\stopframedtext

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] Tabulate: vertical distance between rows

2013-05-22 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

are there more ways how to affect vertical distance between rows within 
\start/stop-tabulate?

1) There is one, described on wiki (http://wiki.contextgarden.net/Tabulate):


\unprotect
\appendtoks
  \blank[halfline]
\to \t_tabl_tabulate_every_after_row
\protect

...


Its problem is that I don't know how to call it by Lua.
The following code fails:


  \startluacode
context[[
\unprotect
\appendtoks
  \blank[halfline]
\to \t_tabl_tabulate_every_after_row
\protect
]]
  \stopluacode

...


So how to make it acceptable by Ctx?


2) Is there another way, e.g. inserting something each time before \NC\NR or 
elsewhere)?

This brings no effect:


  \starttabulate[|l|r|]
\NC a \NC b \blank\NC\blank\NR
\NC A \NC B \NC\NR
  \stoptabulate


As I intend to typeset a table (into tabulate) via Lua, adding an extra 
sequence/command anywhere when a table row is typeset is no problem.

Questions are: a) what would be such sequence and b) where it should be placed?


My whole testing code is attached.

Thank you in advance.

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-Tabul.mkiv
Description: Binary data


t-Tabul.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] \digits get \times instead of \cdot before exponent

2013-05-22 Thread Romain Diss
Le mercredi 22 mai 2013, Hans Hagen a écrit :
> On 5/21/2013 11:35 PM, Romain Diss wrote:
> >> We've already got \setdigitmode, \setdigitorder, and \setdigitspace;
> >> it might make sense to create a \setupdigits to consolidate these
> >> setups into one interface. Something like this:
> >> 
> >> \setupdigits
> >> 
> >> [mode=4,   % -->\setdigitmode{4}
> >> 
> >>% (decimal period, thinspace between groups)
> >>  
> >>  inputdecimalmark={,}, % -->\setdigitorder{0}
> >>  signspace=yes,% -->\setdigitsign{1}; '+ 1.4', not '+1.4'
> >>  times=\times, % or times=\cdot
> >>  ]
> > 
> > +1
> > 
> >> P.s: I've been thinking I'd like to write more contexty interface that
> >> doesn't use predefined modes, but lets you setup the decimal mark,
> >> separator mark, the input decimal mark, etc. Something like this:
> >> 
> >> \setupdigits
> >> 
> >> [inputdecimal={.},  % input  3.1415926535
> >> 
> >>  decimal={,}
> >>  separator=\space,
> >>  groupsize=4,   % output 3,1415 9265 45
> >>  signspace=,]   % +3.14159...
> >> 
> >> That could even tie into \setuplanguage to allow setting
> >> language-specific defaults. Would anyone be interested in this?
> > 
> > +1 again!
> 
> needs a bit of thinking as when we start this route we get lots of new
> keywords (with the danger of introducing inconsistencies) so first we
> need to collect all potential candidates for such keys (e.g. using
> separator might be too generic )

I don't know if it is possible and can not estimate how much work it 
represents but maybe one can consider to merge the digit part of the \digits 
and \unit code.
The \unit command would then use the same code as the \digit one to format the 
digit part. Then, the \unit code would use a specific code to format the unit 
part.
This would make it possible to configure the digit formatting with one unique 
command for both \unit and \digit and another command would be used to 
configure the formating of the unit part.

-- 
Romain Diss

___
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] partial derivatives with bonum/pagella font

2013-05-22 Thread Sietse Brouwer
Hi Mikael,

> is there a quick fix/hack that somehow allows me to get it look "almost like
> it should" in a small document today with bonum?

This might get you somewhere. I hope you don't have too many double
primes in your document...

NB: `%macros=mkvi` has to be the first line in the file.

Cheers,
Sietse

% macros=mkvi

\setupbodyfont[bonum]

% This macro takes 1 arguments, #upper. It postfixes a negative kern just a
% bit larger than the width of #upper, so that #upper does not push
% the next content away to the right.
\def\myprime#upper%
   {% 1. Store the width of the primes in a box, so we can get its width
\setbox\scratchbox=\hbox{$#upper$}%
% 2. We'll want to kern back by a bit more than
\scratchdimen=\dimexpr \wd\scratchbox + 0.3em \relax%
% The actual typesetting
\kern 0em #upper\kern -\scratchdimen}

\starttext
% Quick and dirty 1: just pretend the prime is uppercased
$f'_x$, $f_x'$ $f^{\prime\prime}_x$.

% Less quick, still dirty: the \myprime macro defined above
$f'_x$, $f_x'$ $f\myprime{\prime\prime}_x$.

% Slow and dirty: add a kern between the \primes,
% because bonum pushes them apart a bit.
$f'_x$, $f_x'$ $f\myprime{\prime\kern -0.1em \prime}_x$.
\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] partial derivatives with bonum/pagella font

2013-05-22 Thread Mikael P. Sundqvist
OK!

is there a quick fix/hack that somehow allows me to get it look "almost
like it should" in a small document today with bonum? I'll give a
presentation tomorrow, and if this is not the case I'll change the notation
of partial derivative to the one using \partial instead...

/Mikael


On Wed, May 22, 2013 at 12:01 PM, Hans Hagen  wrote:

> On 5/22/2013 10:46 AM, Mikael P. Sundqvist wrote:
>
>> Hi all,
>>
>> The following examples give wrong space. There is a space between the
>> prime and the subscripted x. If I do not load the bonum font it just
>> looks as it should.
>>
>> \setupbodyfont[bonum]
>> \starttext
>> $f'_x$, $f_x'$ $f\prime_x$.
>> \stoptext
>>
>> (it does not look good with the pagella font either...)
>>
>> Any ideas?
>>
>
> cambria is the benchmark ... indeed bonum looks somewhat weird (also
> because the f is rather tightly bounded; the same with pagella)
>
> (there are some primes-*.tex test files in the test suite)
>
> the primes mechanism is somewhat non-trivial as ' is not really the prime
> symbol and some additional parsing / hackery happens; also, traditionally
> primes in tex sit on the baseline and need to be lifted
>
> one problem is that texgyre math is still beta so messing around at the
> tex end will interfere with improvements
>
> 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] partial derivatives with bonum/pagella font

2013-05-22 Thread Hans Hagen

On 5/22/2013 10:46 AM, Mikael P. Sundqvist wrote:

Hi all,

The following examples give wrong space. There is a space between the
prime and the subscripted x. If I do not load the bonum font it just
looks as it should.

\setupbodyfont[bonum]
\starttext
$f'_x$, $f_x'$ $f\prime_x$.
\stoptext

(it does not look good with the pagella font either...)

Any ideas?


cambria is the benchmark ... indeed bonum looks somewhat weird (also 
because the f is rather tightly bounded; the same with pagella)


(there are some primes-*.tex test files in the test suite)

the primes mechanism is somewhat non-trivial as ' is not really the 
prime symbol and some additional parsing / hackery happens; also, 
traditionally primes in tex sit on the baseline and need to be lifted


one problem is that texgyre math is still beta so messing around at the 
tex end will interfere with improvements


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] Place a box on the right

2013-05-22 Thread Henning Hraban Ramm
Did you try "left"?
___
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] \digits get \times instead of \cdot before exponent

2013-05-22 Thread Hans Hagen

On 5/21/2013 11:35 PM, Romain Diss wrote:

We've already got \setdigitmode, \setdigitorder, and \setdigitspace;
it might make sense to create a \setupdigits to consolidate these
setups into one interface. Something like this:

\setupdigits
[mode=4,   % -->\setdigitmode{4}
   % (decimal period, thinspace between groups)
 inputdecimalmark={,}, % -->\setdigitorder{0}
 signspace=yes,% -->\setdigitsign{1}; '+ 1.4', not '+1.4'
 times=\times, % or times=\cdot
 ]



+1



P.s: I've been thinking I'd like to write more contexty interface that
doesn't use predefined modes, but lets you setup the decimal mark,
separator mark, the input decimal mark, etc. Something like this:

\setupdigits
[inputdecimal={.},  % input  3.1415926535
 decimal={,}
 separator=\space,
 groupsize=4,   % output 3,1415 9265 45
 signspace=,]   % +3.14159...

That could even tie into \setuplanguage to allow setting
language-specific defaults. Would anyone be interested in this?


+1 again!


needs a bit of thinking as when we start this route we get lots of new 
keywords (with the danger of introducing inconsistencies) so first we 
need to collect all potential candidates for such keys (e.g. using 
separator might be too generic )


-
  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] partial derivatives with bonum/pagella font

2013-05-22 Thread Mikael P. Sundqvist
Hi all,

The following examples give wrong space. There is a space between the prime
and the subscripted x. If I do not load the bonum font it just looks as it
should.

\setupbodyfont[bonum]
\starttext
$f'_x$, $f_x'$ $f\prime_x$.
\stoptext

(it does not look good with the pagella font either...)

Any ideas?

/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] Place a box on the right

2013-05-22 Thread H. Özoguz

Hi there,

\starttext

\startalignment[right] \framed{This box should be on the right side, but 
is not.} \stopalignment


\stoptext


I know it is easy, but could not find it in the reference. Why not allow 
simply \framed[location=right]{} ? ("right" is not a correct keyword for 
"location").


Huseyin


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