ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans van der Meer via ntg-context <ntg-context@ntg.nl>
To: NTG ConTeXt <ntg-context@ntg.nl>
Cc: Hans van der Meer <havdmeer@ziggo.nl>
Subject: [NTG-context] rotation weirdness
Date: Sat, 16 Sep 2023 15:46:50 +0200	[thread overview]
Message-ID: <739E871C-E32E-428D-9DEC-C4BC1FF6204C@ziggo.nl> (raw)


[-- 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
___________________________________________________________________________________

                 reply	other threads:[~2023-09-16 13:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=739E871C-E32E-428D-9DEC-C4BC1FF6204C@ziggo.nl \
    --to=ntg-context@ntg.nl \
    --cc=havdmeer@ziggo.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).