ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* textbackground exceeds its scope
@ 2006-04-23 18:33 Aditya Mahajan
  2006-04-23 21:11 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2006-04-23 18:33 UTC (permalink / raw)


[-- Attachment #1: Type: TEXT/PLAIN, Size: 824 bytes --]

Hi,

  I have encountered a really strange bug in textbackground. 
Occasionally, textbackground colors the whole page instead of just the 
text between \starttextbackground and \stoptextbackground. This 
happens only when I am using module mag-01 and have
\setuptyping[style=\ttx\setupinterlinespace] set.
Attached is the minimal example that I could make.

Tested with beta
ConTeXt  ver: 2006.04.18 22:36  fmt: 2006.4.23  int: english  mes: english

For this test, ConTeXt  ver: 2006.04.10 20:04  fmt: 2006.4.23  does 
not give any problem, but similar problem occurs at some other place. 
If it is important, I can try to make a minimal file to reproduce the 
problem with latest stable release.

Thanks,
Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

[-- Attachment #2: Type: APPLICATION/octet-stream, Size: 1801 bytes --]

\usemodule[mag-01]

\setuptyping[style=\ttx\setupinterlinespace]

\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
     \typebuffer
   \stopexample
   \getbuffer}

\starttext

Suppose you want to number only a few equations by a subformula and have 
normal formula numbering for others, it can be achieved by
\startbuffer
\def\CNR{\decrementnumber[formula]\NR} %Continued NR

\placeformula
\startformula \startalign
  \NC c^2 \NC = a^2 + b^2 \NR[+][a]
  \NC a^2 + b^2 \NC = c^2 \CNR[+][b]
  \NC d^2 \NC = e^2 \NR[+]
\stopalign \stopformula
\stopbuffer

\ShowExample

\section{Intertext}
Sometimes you want to place some text between two parts of math equations 
without disturbing equation alignment. \CONTEXT\ provides \tex{startintertext} 
environment to achieve this.

\startbuffer
\startformula \startalign
  \NC A_1 \NC= \left| \int_0^1 (x^2 - 3x)\, dx \right|
    + \left| \int_1^2 (x^2 -5x + 6)\, dx \right| \NR
  \startintertext
    Take limits of both integrals
  \stopintertext
  \NC \NC = \left| \frac{x^3}{3} - \frac{3}{2} x^2 \right|_0^1
    + \left| \frac {x ^3}{3} - 7 \frac{5}{2} x^2 + 6x \right|_1^2 \NR
    \NC \NC = \left| - \frac{7}{6} \right| + \left|\frac{14}{3} - 
    \frac{23}{6}\right| = \frac{7}{6} + \frac{5}{6} = 2 \NR
\stopalign \stopformula
\stopbuffer

\ShowExample


\section{Aligned Matrices}
\CONTEXT\ provides \tex{startmatrix} for generic alignment mechanism.
\startbuffer
\startformula
  \startmatrix
    \NC A \NC B \NC C \NR
    \NC a \NC b \NC c \NR
    \NC 1 \NC 2 \NC 3 \NR
  \stopmatrix
\stopformula
\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] 7+ messages in thread

end of thread, other threads:[~2006-04-25  6:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-23 18:33 textbackground exceeds its scope Aditya Mahajan
2006-04-23 21:11 ` Hans Hagen
2006-04-23 21:33   ` Aditya Mahajan
2006-04-23 21:48     ` Hans Hagen
2006-04-25  4:26       ` Aditya Mahajan
2006-04-25  5:35         ` Taco Hoekwater
2006-04-25  6:15           ` 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).