[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] Better html footnotes
From: |
Sam Liddicott |
Subject: |
Re: [Texmacs-dev] Better html footnotes |
Date: |
Thu, 16 Jun 2011 10:59:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.19pre) Gecko/20110615 Lightning/1.0b2 Lanikai/3.1.11pre |
The new example below only works in a pre-amble, because <specific|...>
is not well defined in a .ts file; but this works for a .ts file:
<assign|html-render-footnote|<macro|nr|note|[<arg|nr>] (<arg|note>)>>
<assign|old-footnote|<value|footnote>>
<assign|footnote|<macro|note|<specific|html|<assign|render-footnote|<value|html-render-footnote>>><old-footnote|<arg|note>>>>
The footnote macro could be re-optimised so as not to keep assigning to
render-footnote; but in any case the assignment only takes effect from
that point on in the document and so doesn't affect pdf export or screen
editing.
I wish there were a macro executed at the end of the document (which for
html could emit the saved footnotes at the end of the document).
Sam
On 16/06/11 09:17, Sam Liddicott wrote:
I just discovered I can use the <specific> tag to override macros and
not just express content; so this works in my pre-amble:
<specific|html|<assign|render-footnote|<macro|nr|note|[<arg|nr>](<arg|note>)>>>
Of course it's a bit rubbish but the point is that it only overrides
render-footnote for html exports; so now I can work on a decent html
footnote renderer.
Sam
On 15/06/11 22:47, Sam Liddicott wrote:
These give better html footnotes - as a right-margin note.
<assign|old-render-footnote|<value|render-footnote>>
<assign|render-footnote|<macro|nr|x|<specific|html|\<less\>table
width="30%"
align="right"\<gtr\>\<less\>tr\<gtr\>\<less\>td\<gtr\>><assign|zz|<arg|nr>><with|footnote-sep|<macro|<specific|html|<value|zz>>.
>|<old-render-footnote|<arg|nr>|<arg|x>>><specific|html|\<less\>/td\<gtr\>\<less\>/tr\<gtr\>\<less\>/table\<gtr\>>>>
Please could someone help me get rid of the global variable zz - I'm
using footnote-sep because the footnote number doesn't get rendered
in html for some reason.
Also please could someone help me get rid of old-render-footnote by
the assign statement taking the old macro value as a "with" so it can
call it internally.
Also, what would be a better way to effect the rendering of
"footnote" for html exports without this hacky use of "specific"?
thanks
Sam
_______________________________________________
Texmacs-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/texmacs-dev
--
[FSF Associate Member #2325]
<http://www.fsf.org/register_form?referrer=2325>
<http://www.openrightsgroup.org/>