* textbackground trouble
@ 2006-06-28 23:47 Aditya Mahajan
2006-06-29 9:16 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2006-06-28 23:47 UTC (permalink / raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 216 bytes --]
Hi Hans and Taco,
Something goes wrong when a textbackground occurs right at the page
boundary. Please have a look at the attached file (a snippet from an
updated copy of Myway on using new math features).
Aditya
[-- Attachment #2: Type: TEXT/PLAIN, Size: 2559 bytes --]
\usemodule[mag-01]
% \input mathfix %Bugfix by Taco
\setuptyping[style=\ttx\setupinterlinespace]
\setupheadertexts[section]
\setupbodyfontenvironment [default][em=italic]
\definetextbackground
[example]
[width=\textwidth,
background=color,
backgroundcolor=lightgray,
frame=off,
leftoffset=1em,
rightoffset=1em,
location=paragraph,
after={\blank[small]},
before={\blank[small]}]
\def\ShowExample
{\startexample
% \nobreak
\typebuffer
\stopexample
\getbuffer}
\setvariables
[magazine]
[title={Using \textbackslash startalign and friends},
author=Aditya Mahajan,
date=\currentdate,
]
\starttext \setups[titlepage] \setups[title]
\startbuffer
\startformula \startalign[m=2]
\NC a_1 x + b_1 y \NC = c_1 \NC d_1 u + e_1 v \NC = f_1 \NR
\NC a_2 x + b_2 y \NC = c_2 \NC d_2 u + e_2 v \NC = f_2 \NR
\stopalign \stopformula
\stopbuffer
\ShowExample
The distance between the pairs can be increased by the option
\type<<distance>> of \tex{startalign}.
\startbuffer
\startformula \startalign[m=2,distance=5em]
\NC a_1 x + b_1 y \NC = c_1 \NC d_1 u + e_1 v \NC = f_1 \NR
\NC a_2 x + b_2 y \NC = c_2 \NC d_2 u + e_2 v \NC = f_2 \NR
\stopalign \stopformula
\stopbuffer
\ShowExample
A combination of \type<<[m=...,n=...]>> can be used.
\startbuffer
\startformula \startalign[m=2,distance=8em,n=5,
align={right,middle,middle,middle,left}]
\NC 0 \NC < \NC 2x + 5y \NC < \NC 10
\NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR
\NC 3 \NC < \NC 2y + 3z \NC < \NC 15
\NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR
\stopalign \stopformula
\stopbuffer
\ShowExample
Sometimes, one simply wants to display two separate set of equations side by
side. For such applications the above pairs mode can be cumbersome to work
with. There is another alternative in \tex{startformulas}
\startbuffer
\startformulas
\startformula \startalign
\NC a_1 x + b_1 y \NC = c_1 \NR
\NC a_2 x + b_2 y \NC = c_2 \NR
\stopalign \stopformula
\startformula \startalign
\NC d_1 u + e_1 v \NC = f_1 \NR
\NC d_2 u + e_2 v \NC = f_2 \NR
\stopalign \stopformula
\stopformulas
\stopbuffer
\ShowExample
More than two groups can also be placed.
\startbuffer
\startformulas
\dorecurse{5}{\startformula
\startalign[n=3,align={middle,middle,middle}]
\NC a \NC = \NC b \NR
\NC 2a \NC = \NC 2b \NR
\stopalign
\stopformula}
\stopformulas
\stopbuffer
\ShowExample
\stoptext
[-- Attachment #3: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: textbackground trouble
2006-06-28 23:47 textbackground trouble Aditya Mahajan
@ 2006-06-29 9:16 ` Hans Hagen
2006-06-29 14:23 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2006-06-29 9:16 UTC (permalink / raw)
Aditya Mahajan wrote:
> Hi Hans and Taco,
>
> Something goes wrong when a textbackground occurs right at the page
> boundary. Please have a look at the attached file (a snippet from an
> updated copy of Myway on using new math features).
so, what goes wrong here?
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: textbackground trouble
2006-06-29 9:16 ` Hans Hagen
@ 2006-06-29 14:23 ` Aditya Mahajan
2006-06-29 15:57 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2006-06-29 14:23 UTC (permalink / raw)
On Thu, 29 Jun 2006, Hans Hagen wrote:
> Aditya Mahajan wrote:
>> Hi Hans and Taco,
>>
>> Something goes wrong when a textbackground occurs right at the page
>> boundary. Please have a look at the attached file (a snippet from an
>> updated copy of Myway on using new math features).
> so, what goes wrong here?
I get
Runaway argument?
{boxgridtype := 0 ;
! Paragraph ended before \flushTeXtexts was complete.
<to be read again>
\par
<argument> boxgridtype := 0 ;\par
boxlinetype := 0 ;\par boxfilltype
:= 1 ;\...
\writecheckedMPgraphic ...aphic \flushTeXtexts {#1
}\writeMPgraphic
{#1}
\startMPgraphic ...hic \writecheckedMPgraphic {#1}
\stopwritingMPgraphic
\getMPdrawing ...ic \MPdrawingdata \stopMPgraphic
\loadcurrentMPgraphic {}\d...
\dopositionaction ...fMPdrawingdone \getMPdrawing
\fi \resetMPdrawing
\popMP...
...
l.96 \ShowExample
?
The backgrounds on the first page do not have any color. The string
boxlinetype := 0 ;boxfilltype := 1 ;boxgridcolor :=
(scaledrgb(0,0,1,1)) ;boxlinecolor := (scaledrgb(0,0,1,1))
ends up at the bottom of page 1.
I do not know what is going wrong.
Aditya
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: textbackground trouble
2006-06-29 14:23 ` Aditya Mahajan
@ 2006-06-29 15:57 ` Hans Hagen
2006-06-29 16:07 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2006-06-29 15:57 UTC (permalink / raw)
Aditya Mahajan wrote:
> I get
>
> Runaway argument?
> {boxgridtype := 0 ;
> ! Paragraph ended before \flushTeXtexts was complete.
> <to be read again>
> \par
> <argument> boxgridtype := 0 ;\par
>
hm, did you use the latest version?
(looks like a endofline problem, i.e. some empty line not converted to an endline char)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: textbackground trouble
2006-06-29 15:57 ` Hans Hagen
@ 2006-06-29 16:07 ` Aditya Mahajan
0 siblings, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2006-06-29 16:07 UTC (permalink / raw)
On Thu, 29 Jun 2006, Hans Hagen wrote:
> Aditya Mahajan wrote:
>> I get
>>
>> Runaway argument?
>> {boxgridtype := 0 ;
>> ! Paragraph ended before \flushTeXtexts was complete.
>> <to be read again>
>> \par
>> <argument> boxgridtype := 0 ;\par
>>
> hm, did you use the latest version?
>
> (looks like a endofline problem, i.e. some empty line not converted to an endline char)
Just downloaded the latest beta and the problem is not present. Sorry
for the noise.
Aditya
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-06-29 16:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-28 23:47 textbackground trouble Aditya Mahajan
2006-06-29 9:16 ` Hans Hagen
2006-06-29 14:23 ` Aditya Mahajan
2006-06-29 15:57 ` Hans Hagen
2006-06-29 16:07 ` Aditya Mahajan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).