[tw] Re: Question on macro usage / slices

2010-08-31 Thread stilldodge
Thanks for your help and quick response

The look is not the main problem, I was trying to avoid manually
escaping everything that would automatically be wikified

Ideally, I am looking for a way to only have macros work but no other
wikification if that make sense

FYI, building on your example to exactly match the {{{ }}} look.
display:block is critical

.codeExample {
   display:block;
   white-space:pre;
   background: none repeat scroll 0 0 [[ColorPalette::SecondaryPale]];
   border: 1px solid [[ColorPalette::SecondaryLight]];
   font-family: monospace;
   font-size: 1.2em;
   line-height: 1.4em;
   margin-left: 0.5em;
   overflow: auto;
   padding: 0.5em;
}

On Aug 31, 12:23 am, Eric Shulman  wrote:
> > The code examples are complex enough to warrant {{{ }}} in
> > order to present well.
>
> You can't create a PRE/CODE block using the TW {{{...}}} syntax AND
> also have the content within that block wikified.
>
> However, you CAN wrap wikified content within a custom CSS wrapper,
> {{classname{...}}} and then define that classname in [[StyleSheet]] to
> provide the desired formatting, making sure to include "white-
> space:pre;" as one of the CSS attributes, like this:
>
> .codeExample {
>    white-space:pre;
>    border:1px solid [[ColorPalette::SecondaryLight]];
>    background:[[ColorPalette::SecondaryPale]];
>
> }
>
> Then, use it in with your content, like this:
>
> {{codeExample{
> print <> * < "Tiddler1::testvar2">>
>
> }}}
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlyw...@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.



[tw] Re: Question on macro usage / slices

2010-08-30 Thread Eric Shulman
> The code examples are complex enough to warrant {{{ }}} in
> order to present well.

You can't create a PRE/CODE block using the TW {{{...}}} syntax AND
also have the content within that block wikified.

However, you CAN wrap wikified content within a custom CSS wrapper,
{{classname{...}}} and then define that classname in [[StyleSheet]] to
provide the desired formatting, making sure to include "white-
space:pre;" as one of the CSS attributes, like this:

.codeExample {
   white-space:pre;
   border:1px solid [[ColorPalette::SecondaryLight]];
   background:[[ColorPalette::SecondaryPale]];
}

Then, use it in with your content, like this:

{{codeExample{
print <> * <>
}}}

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlyw...@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.