cture cross;
> cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0););
> draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle
> scaled .8pt ;
> \stopuniqueMPgraphic
>
> \defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
>
> \define[1]\cancel{%
>
;
\stopuniqueMPgraphic
\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
\define[1]\cancel{%
\ifmmode
\mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\else%
\framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\fi%
}
Maybe something else is available nowadays.
A
;
\stopuniqueMPgraphic
\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
\define[1]\cancel{%
\ifmmode
\mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\else%
\framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\fi%
}
\starttext
\dots E.g
scaled .8pt ;
\stopuniqueMPgraphic
\defineoverlay[canceloverlay][\uniqueMPgraphic{cross out}]
\define[1]\cancel{%
\ifmmode
\mframed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\else%
\framed[background=canceloverlay, frame=off, offset=overlay]{{#1}}%
\fi%
}
\starttext
\mpos macro that uses
>> \hpos but sets the contents as display-style math. This isn’t great for
>> spacing, and it does't adapt to different math styles. \framed has a math
>> version, \mframed, that sets the contents in the appropriate math style. If
>> anyone know a w
version of \hpos? The contents of \hpos are set as
text, even when \hpos is in mathematics, so I wrote an \mpos macro that uses
\hpos but sets the contents as display-style math. This isn’t great for
spacing, and it does't adapt to different math styles. \framed has a math
version, \mf
version of \hpos? The contents of \hpos are set as
text, even when \hpos is in mathematics, so I wrote an \mpos macro that uses
\hpos but sets the contents as display-style math. This isn’t great for
spacing, and it does't adapt to different math styles. \framed has a math
version, \mf
Hello everyone,
I'm using \startaligned with pairs and a distance to represent inference steps,
one per row.
Now I would like to sometimes add a vertical bar to the left of the rows and one
below the last row. I was able to achieve this using \mframed, but now the
contented inside the frame
Mathias Schickel schrieb am 07.12.18 um 12:09:
Dear list,
it seems that \mframed does not align properly. Compare the example
fount at https://www.contextgarden.net/Framed#Location_parameter to
the compiled example attached.
What can I do to get a correctly aligned framed formula
Dear list,it seems that \mframed does not align properly. Compare the example fount at https://www.contextgarden.net/Framed#Location_parameter to the compiled example attached.What can I do to get a correctly aligned framed formula?Many thanks for you help,Mathias
mframed.tex
Description: TeX
rtformula <- works like a charm
\mframed[offset=1mm,loffset=3mm,roffset=3mm]
{a + b = c}
\stopformula
\startformula \startalign <- that's an example
multiline equation
\NC c - a = \NC b \NR<- unframed
;- works like a charm
\mframed[offset=1mm,loffset=3mm,roffset=3mm]
{a + b = c}
\stopformula
\startformula \startalign <- that's an example
multiline equation
\NC c - a = \NC b \NR<- unframed it works
\NC d + c - b = \NC a \NR
\sto
{\mframed[frame=off,
topframe=on,
bottomframe=on,
frameoffset=\dimexpr.254\baselineskip\relax,
height=\lineheight
]}
\def\borderdttop{\mframed[frame=off,
bottomframe=on,
frameoffset=\dimexpr.254\baselineskip\relax,
height=\lineheight
]}
\definehspace[spacedt] [2
On Tue, 22 Oct 2013, Otared Kavian wrote:
Hi Aditya,
I wikified your remarks,
http://wiki.contextgarden.net/Math/Display#Shaded_background_for_part_of_a_displayed_equation
Rather than
\def\graymath{\mframed[frame=off,
background=color,
backgroundcolor=gray
22:18, Aditya Mahajan wrote:
> On Mon, 21 Oct 2013, Otared Kavian wrote:
>
>> Dear Hans,
>>
>> I noticed a difference between mkii and mkiv in the behavior of \mframed: it
>> seems that in mkiv the frame is not vertically aligned with the the + sign
>> in
Thanks Aditya!
I overlooked this change in mkiv…
Best regards: OK
On 21 oct. 2013, at 22:18, Aditya Mahajan wrote:
> On Mon, 21 Oct 2013, Otared Kavian wrote:
>
>> Dear Hans,
>>
>> I noticed a difference between mkii and mkiv in the behavior of \mframed: it
>>
On Mon, 21 Oct 2013, Otared Kavian wrote:
Dear Hans,
I noticed a difference between mkii and mkiv in the behavior of \mframed: it
seems that in mkiv the frame is not vertically aligned with the the + sign in
the following example (or rather it is not vertically centered, please see the
Dear Hans,
I noticed a difference between mkii and mkiv in the behavior of \mframed: it
seems that in mkiv the frame is not vertically aligned with the the + sign in
the following example (or rather it is not vertically centered, please see the
attached PDF produced with ConTeXt ver
\hbox\bgroup
\xypos\pack_framed_mc_one}
\unexpanded\def\pack_framed_mc_end
{\egroup
\egroup}
\unexpanded\def\pack_framed_mc_nop#1%
{\pack_framed_mc_begin
\mframed{\xypos\pack_framed_mc_two#1}%
\pack_framed_mc_end}
\unexpanded\def\pack_framed_mc_yes[#1]#2%
{\pack_framed_mc_begin
\pack_framed_mc_one}
\unexpanded\def\pack_framed_mc_end
{\egroup
\egroup}
\unexpanded\def\pack_framed_mc_nop#1%
{\pack_framed_mc_begin
\mframed{\xypos\pack_framed_mc_two#1}%
\pack_framed_mc_end}
\unexpanded\def\pack_framed_mc_yes[#1]#2%
{\pack_framed_mc_begin
\mframed[#1]{\xypos
color
OverlayLineColor ;
\stopuniqueMPgraphic
\defineoverlay[LabelA][\uniqueMPgraphic{LabelA}]
\defineoverlay[LabelB][\uniqueMPgraphic{LabelB}]
\def\VariantA{\mframed[foregroundstyle=\tfc,frame=off,background=LabelA,backgroundoffset=3pt,backgroundcolor=red]}
\def\VariantB{\mframed[foregroundstyle=\tfc,
thpen pencircle scaled 1pt dashed withdots;
setbounds currentpicture to boundingbox OverlayBox;
\stopuniqueMPgraphic
\defineoverlay[Label][\useMPgraphic{Label}]
\def\dottext#1%
{ \mframed[frame=off, background=Label, location=low]
{ #1 }
}
\setupcolors[state=start]
\def\rndgraymath{\mframed[
C a_{mn} \NR
>> \stopmatrix
>> \stopformula
>>
>> But \frame or \inframe is not working inside matrix.
>> Is there a way to do that?
>
> maybe \mframed
He’s looking for \HL and \VL commands like the table below has to frame a
complete row in the matrix.
\star
Hi Dalyoung,
Is this what you want:
\setupcolors[state=start]
\def\RedMath{\mframed[frame=on,
framecolor=red,
offset=2pt,
% background=color,
% backgroundcolor=lightred,
% backgroundoffset=2pt
]}
\starttext
\startformula
\startmatrix[left={\left
Dear Hans,
Thank you for quick answer and for reminding me \mframed.
\mframed is working if I enclose one term like ... \NC{\mframed[]{x+y}}\NC
...\NC\NR.
But I'd like to enclose the whole row in one frame.
I apply \mframed to every term and get close result except there are gaps
be
vdots \NR
\NC a_{i1} \NC a_{i2} \NC \cdots \NC a_{in} \NR
\NC \vdots \NC \vdots \NC \ddots \NC \vdots \NR
\NC a_{m1} \NC a_{m2} \NC \cdots \NC a_{mn} \NR
\stopmatrix
\stopformula
But \frame or \inframe is not working inside matrix.
Is there a way to do that?
maybe \mf
On 25-1-2012 21:17, Aditya Mahajan wrote:
@Hans: Can we have \definemframed etc as well?
sure, the next beta will have ...
\starttext
\dontleavehmode test \mframed{x} test $x^{\mframed{x}}$ test
\inmframed{x} test $x^{\inmframed{x}}$ test
\definemathframed[whatever][location=low
On Thu, 26 Jan 2012, Philipp A. wrote:
2012/1/25 Aditya Mahajan
Better is to use: \StrikeMeFrame{\mathsurround\zeropoint$#1$}. But for
this to work in subscripts and superscripts, you must use math palette.
IIRC, \mframed does that. In principle:
\mframed[background=strikeme]{**...}
should
2012/1/25 Aditya Mahajan
> Better is to use: \StrikeMeFrame{\mathsurround\zeropoint$#1$}. But for
> this to work in subscripts and superscripts, you must use math palette.
> IIRC, \mframed does that. In principle:
>
> \mframed[background=strikeme]{**...}
>
> should work
\zeropoint$#1$}. But for
this to work in subscripts and superscripts, you must use math palette.
IIRC, \mframed does that. In principle:
\mframed[background=strikeme]{...}
should work (untested).
@Hans: Can we have \definemframed etc as well
t; >
> > I discovered that I can use \defineframed so that I can write
> >
> > \defineframed[myframed][frame=off,background=myoverlay]
> >
> > \myframed{whatever}
> >
> > But I'd like to have "my" counterparts of \inframed, \mframed and
yframed][frame=off,background=myoverlay]
>
> \myframed{whatever}
>
> But I'd like to have "my" counterparts of \inframed, \mframed and
> \inmframed. Is there any \define-like command for that, too, or do I
> have to resort to plain old \def?
\defineframed[mathfra
"my" counterparts of \inframed, \mframed and
\inmframed. Is there any \define-like command for that, too, or do I
have to resort to plain old \def?
Regards,
--
Marcin Borkowski
___
If your question is of interest
As the example below shows, \mframed part of the formula is placed too
high. I found that \inmframed helps, but my question is: does
\inmframed alter spacing? In other words: does $...whatever...$ look
the same as $...\inmframed[frame=off]{whatever}...$?
\starttext
$E=\mframed{mc^2}$ % wrong
$E
Hello,
Is it possible (using ConTeXt MKII) to put a frame
(and/or other highlighters) around an aligned multiline
formula, and also around a single line of this equation array?
(The equation number should align correctly outside the frame.)
\mframed within an alignment seems to refuse the job
Hi,
In MkIV, \mframed does not place the result in the middle of the math
axis. Consider,
\starttext
\startformula
f(x) = \mframed{\frac{1}{2}}^{\mframed{\frac{1}{2}}}
\stopformula
\stoptext
The MkII and MkIV results are attached.
Aditya
Aditya Mahajan wrote:
On Mon, 11 May 2009, Hans Hagen wrote:
Alan BRASLAU wrote:
Thanks (\setupinteractions[option=max], \mframed[background=color])!
Please note that the vertical spacing seems to be off (raised) for
\mframed...
minimal example:
\starttext
\startformula
A = B + \mframed
On Mon, 11 May 2009, Hans Hagen wrote:
Alan BRASLAU wrote:
Thanks (\setupinteractions[option=max], \mframed[background=color])!
Please note that the vertical spacing seems to be off (raised) for
\mframed...
minimal example:
\starttext
\startformula
A = B + \mframed[frame=off,background
On Monday 11 May 2009 15:40:04 Hans Hagen wrote:
> Alan BRASLAU wrote:
> > Thanks (\setupinteractions[option=max], \mframed[background=color])!
> >
> > Please note that the vertical spacing seems to be off (raised) for
> > \mframed... minimal example:
> >
> &
Alan BRASLAU wrote:
Thanks (\setupinteractions[option=max], \mframed[background=color])!
Please note that the vertical spacing seems to be off (raised) for \mframed...
minimal example:
\starttext
\startformula
A = B + \mframed[frame=off,background=color,backgroundcolor=gray]{C}
\stopformula
\mframed misbehaves under mkiv (latest minimals)
minimal example:
\setupcolors[state=start]
\starttext
\mframed[frame=off,background=color,backgroundcolor=yellow]{k_2 \propto \langle
N \rangle^{\alpha}}
\stoptext
-> framed text, white background
(works correctly under mkii: no frame, yel
ed(1u,0u); % no braces
>> \stopMPcode
>> \stoptext
>>
>> I remember having problems with at least {, }, #, & and with the usage
>> of the following macro inside metapost:
>>
>> % outside:
>> \def\combine#1{\hbox to .5em{}\hbox to
>> 0pt{\hss\co
ext
\startMPcode
u := 1cm;
draw \sometxt{a\{b\}} shifted(1u,0u); % no braces
\stopMPcode
\stoptext
I remember having problems with at least {, }, #, & and with the usage
of the following macro inside metapost:
% outside:
\def\combine#1{\hbox to .5em{}\hbox to
0pt{\hss\color[red]{\mframed[frame=off]{
arttext
\startMPcode
u := 1cm;
draw \sometxt{a\{b\}} shifted(1u,0u); % no braces
\stopMPcode
\stoptext
I remember having problems with at least {, }, #, & and with the usage
of the following macro inside metapost:
% outside:
\def\combine#1{\hbox to .5em{}\hbox to
0pt{\hss\color[red]{\mframed[f
Hi Sanjoy, welcome back
In displayed math I was trying to highlight a piece of a formula
using a
gray background. After a few spacing failures with \framed, I
discovered \mframed in the core-rul.tex source file. The comments
there
say:
Use backgroundoffset, not frameoffset.
Wolfgang
In displayed math I was trying to highlight a piece of a formula using a
gray background. After a few spacing failures with \framed, I
discovered \mframed in the core-rul.tex source file. The comments there
say:
%D As usual, one can specify in what way the text should be
%D framed. One should
Aditya Mahajan wrote:
> Here is an example:
>
> \setupcolors[state=start]
>
> \def\solutionbox
>{\dosingleempty\dosolutionbox}
>
> \def\dosolutionbox[#1]%
>{\mframed[width=2em,background=color,backgroundcolor=lightgreen,#1]
> {\strut}}
>
&g
colors[state=start]
\def\solutionbox
{\dosingleempty\dosolutionbox}
\def\dosolutionbox[#1]%
{\mframed[width=2em,background=color,backgroundcolor=lightgreen,#1]
{\strut}}
\starttext
Not aligned
\startformula \startalign[n=1]
\NC 6 + 7 + 4 = \solutionbox \NR
\NC 16 + 5 + 4 =
\strikeout#1{\mframed[frame=off,background=strikeme]{#1}}
I tried working with offset (instead of attacking the graphic as I
did), but that raised the numbers.
This look OK to folks, or should I be doing something with enlarged
1pt or some such thing?
On Jan 14, 2006, at 12:10 PM, Mojca
ramed{6},\ 9,\ 18}
> \stopformula
>
> But I'd like to keep the numbers on the same baseline and let the
> frame dip below the baseline.
What about \mframed? (Probably already evident from the other mail.)
Mojca
___
ntg-context mailing
ineoverlay[strikeme][{\color[red]{\bf/}}]
\def\strikeout#1{\mframed[frame=off,background={foreground,strikeme}]{#1}}
will draw bold red slashes over the numbers. They still seem a bit too
thin too me , but you could use other bolder characters if needed.
A more complex solution with metafun:
\startu
\right\}
the braces do not take the size of the sum into account while scaling.
13. Have a command say \tag so that
\startformula
a = b \tag{*}
\stopformula
comes out as
a = b (*)
14. Allow a framed command that works with align and aligned. So that
a \implies\mframed{ \startaligned
\NC
Aditya Mahajan wrote:
What is the \setup... command that can be used to configure the frames
typeset by \mframed?
There is no such command, so just use the optional argument
to \mframed, like:
$$
\mframed[framecolor=red]{E=mc^2}
$$
Cheers, Taco
What is the \setup... command that can be used to configure the frames
typeset by \mframed?
Thanks,
Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
<--- On Dec 2, Mojca Miklavec wrote --->
1. What's the best way to frame a formula like here:
\placeformula
\startformula
\mframed{x^2+y^2=z^2}
\stopformula
The problem is that:
- formula number is shifted downwards in comparison to the formula
without a number
- I don't kn
Aditya Mahajan wrote:
> Mojca Miklavec wrote:
>
> > 1. What's the best way to frame a formula like here:
> >
> > \placeformula
> > \startformula
> > \mframed{x^2+y^2=z^2}
> > \stopformula
> >
> > The problem is that:
> > -
<--- On Dec 2, Mojca Miklavec wrote --->
1. What's the best way to frame a formula like here:
\placeformula
\startformula
\mframed{x^2+y^2=z^2}
\stopformula
The problem is that:
- formula number is shifted downwards in comparison to the formula
without a number
- I don't kn
Hello,
I would like to ask a couple of questions about frames and numbers in
math formulas.
1. What's the best way to frame a formula like here:
\placeformula
\startformula
\mframed{x^2+y^2=z^2}
\stopformula
The problem is that:
- formula number is shifted downwards in comparison t
\startformula
\mframed[offset=.3em,rulethickness=1pt]{
I=x-\sqrt2\,\arctan\frac{x}{\sqrt2}+C}
\stopformula
it does typeset a displayed formula. However, you could still force
displayed style by adding a \displaystyle command at the beginning of
your \mframed argument.
That's o
Jilani,
> Thank you for your answer. I seems that "\startformula .. \stopformula"
> doesn't have any effect to produce a "dispaly mode" formula.
When I try:
\startformula
\mframed[offset=.3em,rulethickness=1pt]{
I=x-\sqrt2\,\arctan\frac{x}{\sqrt2}+C}
David Munger wrote:
The way I usually do it:
\startformula
\mframed[offset=.3em,rulethickness=1pt]{a^2 + b^2 = c^2}
\stopformula
Thank you for your answer. I seems that "\startformula .. \stopformula"
doesn't have any effect to produce a "dispaly mode" for
The way I usually do it:
\startformula
\mframed[offset=.3em,rulethickness=1pt]{a^2 + b^2 = c^2}
\stopformula
Regards,
David
Le Vendredi 30 septembre 2005 à 13:41 +0200, Jilani Khaldi a écrit :
> Hi All,
> how to make a boxed formula with ConTeXt?
&g
trying to implement steps-without-JavaScript for slides. You can
get the module here:
http://cfd.homelinux.org/tex/
The current problem, in its simplest form, is that using \mframed breaks
the spacing. Minimal example:
\starttext
We aim to get this spacing:
\startformula
a + b
\stopfor
[ reserve=>[EMAIL PROTECTED]@dostepreserve,
\s!default=>[EMAIL PROTECTED]@dostepnoreserve]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
\ifUseSteps%
[EMAIL PROTECTED]
[EMAIL PROTECTED]
\fi%
\fi%
\ifmmode\expandafter\mframed\else\expandafter\fram
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
\ifUseSteps%
[EMAIL PROTECTED]
[EMAIL PROTECTED]
\fi%
\fi%
\ifmmode\expandafter\mframed\else\expandafter\framed\fi%
[EMAIL PROTECTED],frame=off,offset=overlay]{#1}%
\ifmmode\;\fi}
[EMAIL PROTECTED]
[EMAIL PROTECTED];\fi}%
65 matches
Mail list logo