Hi Andres

Does your stylesheet include the following pragma at the top?

\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline

If so, the problem will be that the list of allowed rules doesn't include the 
rule that understands widget calls like you <$macrocall> widget.

The cleanest way around this would be to put your macrocall widget into a macro 
at the top of the stylesheet tiddler, and then invoke it in your :after 
declaration (the rules pragma above allows the macro invocation syntax).

Best wishes

Jeremy

--
Jeremy Ruston
[email protected]
https://jermolene.com

> On 24 Apr 2018, at 11:03, Andres Gongora <[email protected]> wrote:
> 
> I'm trying to insert a macro-call into several tiddlers through stylesheets, 
> such that the macro is processed/called within the tiddler it has been parsed 
> into.
> Specifically, I'm trying to add a call to my custom TOC macro at the end of 
> all tiddlers tagged with TOC.
> 
> However, it does not work. I can call my macro inside tiddlers with 
> <$macrocall $name="mytoc" category={{!!title}}/> and it works fawlessly. But 
> I'm unable to "inject" it with CSS. 
> What am I missing?
> 
> 
> 
> my code:
> 
> $:/macros/mytoc (tagged $:/tags/Macro )
> \define mytoc(category)
>     <div class="tc-custom-toc">
>         <div class="tc-table-of-contents">
>             <<toc-selective-expandable tag:"""$category$""" 
> sort:"""sort[title]""">>
>         </div>
>     </div>
> \end
> 
> 
> $:/custom_styles (tagged $:/tags/Stylesheet and of type text/vnd.tiddlywiki)
> (this simply applies a box shadow to my TOCs)
> <pre> .tc-custom-toc {
>     border-radius: 4px;
>     padding: 5px 10px;
>     border: 1px solid <<colour message-border>>;
>     <<box-shadow "2px 2px 10px rgba(0, 0, 0, 0.5)">>
> } </pre>
> 
> 
> $:/custom_styles2 (tagged $:/tags/Stylesheet and of type text/css)
> (This should add the TOC macro call to all tiddlers tagged with "toc")
> .tc-tagged-toc .tc-tiddler-body:after {
>     content: '<$macrocall $name="mytoc" category={{!!title}}/>';
> }
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/ce605a91-21c3-49f8-8598-a4a5b6098304%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/F04746BA-F411-4D20-951B-3C0E504AF61F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to