text box within a tiddler?

1,153 views
Skip to first unread message

Kosmaton

unread,
Nov 22, 2010, 7:29:54 AM11/22/10
to TiddlyWiki
Hello,

What is the best way to put some text in a box within a tiddler? I.e.
have the text display in a rectangle with a custom background and
border colour. The text contains equation markup that needs to be
evaluated, so //{{{...//}}} won't do, and it's multi-paragraph, so a
single-cell 'table' doesn't seem to work either, even if I put all of
the text between {{span{...}}} within the cell.

Thanks,

Kosmaton

Dave Parker

unread,
Nov 22, 2010, 9:32:02 AM11/22/10
to TiddlyWiki
would this work for you?

in TiddlerOne:
|<<tidder TiddlerTwo>>|

in TiddlerTwo:
TiddlerTwo (so you can open it from Tiddler One)
bla bla bla (several paragraphs)

Kosmaton

unread,
Nov 22, 2010, 11:48:37 AM11/22/10
to TiddlyWiki
Thanks Dave -- interesting idea, but it's not ideal to have to make an
extra tiddler here. Just found {{menubox{...}}} in

http://www.tiddlytools.com/#StyleSheetShortcuts

This gives a white box with rounded corners. I'll go with that for
now. cheers,

Kosmaton

tiziano de togni

unread,
Nov 22, 2010, 3:59:35 PM11/22/10
to tiddl...@googlegroups.com
Kosmaton ha scritto:

> Thanks Dave -- interesting idea, but it's not ideal to have to make an
> extra tiddler here. Just found {{menubox{...}}} in
>
> http://www.tiddlytools.com/#StyleSheetShortcuts
>
> This gives a white box with rounded corners. I'll go with that for
> now. cheers,
>

If you wish a floating box, look at the built-in styles "tagging" and
"tagged" in StyleSheetLayout and StyleSheetColor. You could derive a
custom style from them or use them as they are.

Look here for an example:
http://tiziano.tiddlyspot.com/#Introduzione

regards
--
tiziano de togni
______________________________________
http://tiziano.tiddlyspot.com

tiziano de togni

unread,
Nov 22, 2010, 4:06:59 PM11/22/10
to tiddl...@googlegroups.com
Kosmaton ha scritto:

> Thanks Dave -- interesting idea, but it's not ideal to have to make an
> extra tiddler here. Just found {{menubox{...}}} in
>
> http://www.tiddlytools.com/#StyleSheetShortcuts
>
> This gives a white box with rounded corners. I'll go with that for
> now. cheers,
>

Forgot that there are other two built-in styles to be used for this
purpose: "tabContents" and "annotation"

Kosmaton

unread,
Nov 22, 2010, 6:58:42 PM11/22/10
to TiddlyWiki
'tabContents' and 'annotation' don't seem to behave box-like for
multiple lines, but the 'tagged' boxes on your site look nice. It
doesn't work on my TW - must be because of existing theme/config
tiddlers. I'll play around with it, and also with the 'display' CSS
tag.

grazie,

Kosmaton

On Nov 22, 9:06 pm, tiziano de togni <tiziano.deto...@gmail.com>
wrote:

UBi

unread,
Nov 23, 2010, 5:54:53 AM11/23/10
to TiddlyWiki
Another option: the built-in gradient macro:

<<gradient horiz #fc0 #fc0>>Very
important
content
>>

You could adjust it with additional CSS:

<<gradient horiz #fc0 #fc0>>padding:10px;Totally
important
content
indeed!
>>

UBi

UBi

unread,
Nov 23, 2010, 5:56:18 AM11/23/10
to TiddlyWiki
Forgot the closing '>>':

UBi

unread,
Nov 23, 2010, 5:57:49 AM11/23/10
to TiddlyWiki
Nah, Google Groups eliminates it. Append '>>' after the last line.

Anthony Muscio

unread,
Nov 23, 2010, 5:50:44 PM11/23/10
to tiddl...@googlegroups.com
I have some ideas for you but could you explain further why you want the box.

It is a presentation thing for text within the tiddler ?
Is it so you can edit it independently ?
Could it just be in a pop up ?

If I understand I can suggest more appropriate solutions rather than write a novel.

Tony

Anthony Muscio
LaSourceProjects.org Open Source Sustainability Projects
LaSource.com.au Sustainable Products and Business
SerendipityIdeas.com IT hints and Tips and Website hosting
Like personal Web 2.0 ? see www.tiddlywiki.com



On Tue, Nov 23, 2010 at 21:57, UBi <u...@kefc.de> wrote:
Nah, Google Groups eliminates it. Append '>>' after the last line.

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


Alex Hough

unread,
Nov 24, 2010, 9:38:46 AM11/24/10
to tiddl...@googlegroups.com
UBi

good call
gradient must be the least used macro in tiddlyland.
nice to see a use case

Alex

Forgot the closing '>>':
--

Secret-HQ

unread,
Nov 24, 2010, 9:56:12 PM11/24/10
to TiddlyWiki
Hi, Kosmaton —

It may be worth noting that TiddlyWiki treats

{{styleName{content}}}

and

{{styleName{
content
}}}

differently.

I didn't realize it for a long time, but the first syntax (all on one
line) invokes a custom style in a <span> tag, and the second (with the
hard returns/line breaks) invokes the style in a <div> instead. In a
nutshell, if you're wrapping any multi-line content in a custom style,
it's better to put your {{styleName{ and }}} bits on their own lines.



In case you want to add some variety to your arsenal of styles, here
are the go-to styles for doing this from my own style sheet:

/***
!!Sidebars /% ================= %/
***/
/*{{{*/
.sidebar {background-color:[[ColorPalette::SecondaryLight]];
border:2px solid [[ColorPalette::SecondaryMid]]; margin:0.3em 5% 0.3em
5%; padding:0.3em;}

.sidebarRight {background-color:[[ColorPalette::SecondaryLight]];
border:2px solid [[ColorPalette::SecondaryMid]]; margin:0.3em; padding:
0.3em; width:20%; float:right;}

.sidebarLeft {background-color:[[ColorPalette::SecondaryLight]];
border:2px solid [[ColorPalette::SecondaryMid]]; margin:0.3em; padding:
0.3em; width:20%; float:left;}
/*}}}*/

I created sidebarRight and sidebarLeft first, then added the generic
"sidebar" (which isn't a sidebar at all!) later. Just add the style
definitions to your StyleSheet, and you can invoke them like so:

{{sidebar{
content to set off
}}}

Or float the content right or left by using {{sidebarRight{ or
{{sidebarLeft{ instead.
Reply all
Reply to author
Forward
0 new messages