[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: raw text and @macro
From: |
Patrice Dumas |
Subject: |
Re: raw text and @macro |
Date: |
Thu, 22 May 2014 21:48:02 +0200 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Thu, May 22, 2014 at 06:03:56PM +0000, Karl Berry wrote:
> Patrice,
>
> @tex
> @macro xtimes
> @math{\times}
> @end macro
> @end tex
I think it would be cleaner to use
@iftex
@macro xtimes
@math{\times}
@end macro
@end iftex
> That works ok for TeX. But for HTML:
>
> @html
> @set vtimes ×
> @macro xtimes
> ×
> @end macro
> @end html
>
> It seems that the raw-ness is lost while handling @set and @macro.
> The HTML output from both @value{vtimes} and @xtimes{} looks like:
> ×
Having a @set or @macro being defined within @html do not change the
call. In any case, @set and @macro arguments are taken as is whn being
defined, and the environment of the definition does not change anything.
I think that you want to use @inlineraw. Maybe (but it will only work
with 5.2, I think) the best is:
@set vtime @inlineifelse{html, @inlineraw{html, ×}, x}
or
@macro xtimes
@inlineifelse{html, @inlineraw{html, ×}, x}
@end macro
--
Pat