Print open tiddlers without TW header or tiddler toolbar

165 views
Skip to first unread message

kn0t

unread,
Jun 3, 2006, 9:10:37 AM6/3/06
to TiddlyWiki
I've seen some older discussion/questions regarding how to print
tiddlers without all the extra stuff, like the mainmenu, sidebar, etc,
which the v2 shadow tiddler StyleSheetPrint takes care of. What's
missing is the TW header still prints.

To print a tiddler without the header as well:

1. Modify StyleSheetPrint to include "#header" in the list of
exclusions
2. Modify PageTemplate by adding "id='header'" to the first div (of
class 'header')

While ensuring the mouse is not hovering over the tiddler when you go
to print will suffice to keep a tiddler's toolbar from printing, you
can do a similar thing with it so that the mouse position is of no
concern:

1. Modify StyleSheetPrint to include "#toolbar" in the list of
exclusions
2. Modify ViewTemplate by adding "id='header'" to the first div (of
class 'header')

Simon Baird

unread,
Jun 3, 2006, 9:27:19 AM6/3/06
to Tiddl...@googlegroups.com
The "toolbar prints when mouse over tiddler" is something I've noticed also. I think it's a bug.

Also you ought to be able to add .header to StyleSheetPrint (rather than #header with the required mod to PageTemplate. Or if you're like me and like to keep your shadow StyleSheet tiddlers stock standard then pu the following in StyleSheet tiddler:
@media print { .header {display: none ! important;} }
(Untested)

Simon.

kn0t

unread,
Jun 3, 2006, 11:20:05 PM6/3/06
to TiddlyWiki

Simon Baird wrote:
> Or if you're like me and like
> to keep your shadow StyleSheet tiddlers stock standard then...

Thanks, Simon, for the cleaner solution (which I definitely prefer).
Here's what I ended up with in the StyleSheet tiddler (PageTemplate and
StyleSheetPrint restored to their shadow state) so as to remove the
header, tiddler toolbar, and tiddler tag box in the print view:

@media print {
.header {display: none ! important;}

.toolbar {display: none ! important;}
.tagged {display: none ! important;}
}

On the subject of shadow tiddlers, StyleSheet is also a shadow tiddler,
so which is less appropriate to edit: StyleSheet or StyleSheetPrint?
The same result can be accomplished by editing either one.

Also, out of curiosity, why does "#header" not work in the
StyleSheetPrint @media print exclusion list (so that you have to put
.header on a separate line in stead), yet adding #toolbar and #tagged
does work?

Kevin

Reply all
Reply to author
Forward
0 new messages