* textbackground and midaligned
@ 2006-05-18 22:13 Aditya Mahajan
2006-05-19 12:43 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2006-05-18 22:13 UTC (permalink / raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 535 bytes --]
I encountered a very strange problem. The very presence of
\definetextbackground changed the meaning of \midaligned (and
\rightaligned). Attached are the minimal example that illustrate the
problem. The first file, nobackground.tex has no background and works
as expected. The second file background.tex has a textbackground and
\midaligned is no longer middle aligned.
Any insight into this strange behaviour?
Aditya
--
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
[-- Attachment #2: Type: TEXT/PLAIN, Size: 684 bytes --]
\setupcolors[state=start]
\defineenumeration
[Solution]
[
text=Solution,
number=no,
headcolor=darkblue,
headstyle=bold,
location=serried,
width=broad,
before=\blank,
after=\blank]
\definetextbackground
[solution]
[location=paragraph,
rulethickness=1pt,
framecolor=red,
background=color,
backgroundcolor=lightgray,
leftoffset=1em,
topoffset=1em]
\def\startsolution
{\startSolution}
\def\stopsolution
{\stopSolution}
\starttext
\startsolution
\input tufte \endgraf
\midaligned{
\externalfigure{}
}
\stopsolution
\stoptext
[-- Attachment #3: Type: TEXT/PLAIN, Size: 747 bytes --]
\setupcolors[state=start]
\defineenumeration
[Solution]
[
text=Solution,
number=no,
headcolor=darkblue,
headstyle=bold,
location=serried,
width=broad,
before=\blank,
after=\blank]
\definetextbackground
[solution]
[location=paragraph,
rulethickness=1pt,
framecolor=red,
background=color,
backgroundcolor=lightgray,
leftoffset=1em,
topoffset=1em]
\def\startsolution
{\starttextbackground[solution]
\startSolution}
\def\stopsolution
{\stopSolution
\stoptextbackground}
\starttext
\startsolution
\input tufte \endgraf
\midaligned{
\externalfigure{}
}
\stopsolution
\stoptext
[-- Attachment #4: 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] 3+ messages in thread
* Re: textbackground and midaligned
2006-05-18 22:13 textbackground and midaligned Aditya Mahajan
@ 2006-05-19 12:43 ` Hans Hagen
2006-05-19 14:30 ` Aditya Mahajan
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2006-05-19 12:43 UTC (permalink / raw)
Aditya Mahajan wrote:
> I encountered a very strange problem. The very presence of
> \definetextbackground changed the meaning of \midaligned (and
> \rightaligned). Attached are the minimal example that illustrate the
> problem. The first file, nobackground.tex has no background and works
> as expected. The second file background.tex has a textbackground and
> \midaligned is no longer middle aligned.
>
> Any insight into this strange behaviour?
\def\doalignline#1#2% \\ == newline
{\begingroup
\setlocalhsize % new
\def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
\dowithnextbox
{\noindentation % change this line in core-spa.tex
\hbox to \localhsize
{\ifcase\alignstrutmode\or\strut\fi
#1\unhbox\nextbox#2}\endgroup}
\hbox}
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] 3+ messages in thread
* Re: textbackground and midaligned
2006-05-19 12:43 ` Hans Hagen
@ 2006-05-19 14:30 ` Aditya Mahajan
0 siblings, 0 replies; 3+ messages in thread
From: Aditya Mahajan @ 2006-05-19 14:30 UTC (permalink / raw)
On Fri, 19 May 2006, Hans Hagen wrote:
> Aditya Mahajan wrote:
>> I encountered a very strange problem. The very presence of
>> \definetextbackground changed the meaning of \midaligned (and
>> \rightaligned). Attached are the minimal example that illustrate the
>> problem. The first file, nobackground.tex has no background and works
>> as expected. The second file background.tex has a textbackground and
>> \midaligned is no longer middle aligned.
>>
>> Any insight into this strange behaviour?
> \def\doalignline#1#2% \\ == newline
> {\begingroup
> \setlocalhsize % new
> \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
> \dowithnextbox
> {\noindentation % change this line in core-spa.tex
> \hbox to \localhsize
> {\ifcase\alignstrutmode\or\strut\fi
> #1\unhbox\nextbox#2}\endgroup}
> \hbox}
Thank you!
This takes care of the problem.
Aditya
--
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-19 14:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-18 22:13 textbackground and midaligned Aditya Mahajan
2006-05-19 12:43 ` Hans Hagen
2006-05-19 14:30 ` 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).