ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] rotation weirdness
@ 2023-09-16 13:46 Hans van der Meer via ntg-context
  0 siblings, 0 replies; only message in thread
From: Hans van der Meer via ntg-context @ 2023-09-16 13:46 UTC (permalink / raw)
  To: NTG ConTeXt; +Cc: Hans van der Meer


[-- Attachment #1.1: Type: text/plain, Size: 1438 bytes --]

I encountered something weird, that I cannot explain. It could be an error, but I was not able to pinpoint this.
It seems as if the \rotate macro plays havoc with the macro definitions used to set the color of the frame and an outside title.
Placing the outside title before the rotate proves that the call to \rotate is the culprit.
I enclose an MWE with a little jpeg figure as illustration.

yours sincerely
dr. Hans van der Meer

\def\formattitle#1{\color[\boxtitlecolor]{#1\strut}}
\def\boxfigurerotate#1#2{%
	\rotate[rotation=10]%
	{%
		\externalfigure[#1]%
		[rulethickness=4pt,width=100pt,height=50pt,frame=on,framecolor=\boxframecolor,]%
	}%
	\formattitle{#2}%
}
\def\boxfigure#1#2{%
		\externalfigure[#1]%
		[rulethickness=4pt,width=100pt,height=50pt,frame=on,framecolor=\boxframecolor,]%
	\formattitle{#2}%
}

\def\boxtitlecolor{blue}
\def\boxframecolor{blue}

\starttext
\ConTeXt\ \contextversion
\blank
Problem:\crlf
it looks like \type{\rotate[]{}} kills the definition of boxtitlecolor.
Changing the names of the titlecolor/framecolor definitions makes no difference.
\crlf
Why is this? ConTeXt error?
\blank

\boxfigure{test}{norotation: title color is blue}
\blank

\boxfigurerotate{test}{rotation: title color should be blue but is not}
\blank

\def\boxframecolor{red}
\boxfigurerotate{test}{rotation: title color different from framecolor now blue}

\stoptext






[-- Attachment #1.2.1: Type: text/html, Size: 2938 bytes --]

[-- Attachment #1.2.2: rotatecolor.pdf --]
[-- Type: application/pdf, Size: 45387 bytes --]

[-- Attachment #1.2.3: Type: text/html, Size: 253 bytes --]

[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-16 13:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-16 13:46 [NTG-context] rotation weirdness Hans van der Meer via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox