Styleysheet Print.

107 views
Skip to first unread message

Jan

unread,
Feb 26, 2011, 1:29:45 PM2/26/11
to TiddlyWiki
Hello I spent some Time copypasting commands to suppress the printing
of the author, the Tags and the dates the tiddler was created and
modified.and the tiiddelertoolbar.
like: @media print {
.header {display: none ! important;}
.toolbar {display: none ! important;}
.tagged {display: none ! important;}
}

This had either no effect or caused quite au chaos...
Certainly my knowledege of CSS is to bad to do this correctly.

Could someone post a working Style sheetprint supressing all Elements
except for the TiddlerTitles

Best would be if the Tiddler was Commented to explain what

Måns

unread,
Feb 26, 2011, 4:20:40 PM2/26/11
to TiddlyWiki
Hi Jan

Extracted from:https://groups.google.com/group/tiddlywiki/
browse_thread/thread/3a0563e38b2faada/b0ea07d64316fa45?
hl=en&lnk=gst&q=StyleSheetPrint+uses+the+following
+statement:#b0ea07d64316fa45

StyleSheetPrint uses the following statement:
@media print { ... }
so that CSS contained inside the {...} will only be applied when
sending output to printing devices. This allows TW to format things
differently for hard-copy vs. screen display, without having to switch
stylesheets at all!

To optimize for printing, you can just place your own
@media print {...} definitions into StyleSheet. Since
StyleSheet is an OVERLAY, any print-related CSS it contains will
simply override the standard CSS in StyleSheetPrint and whenever
you print the document, it will use your customized styles by
default.


I copied this from http://twhelp.tiddlyspot.com

*{{{*/

@media print {#mainMenu {display: none ! important;}}
@media print {#topMenu {display: none ! important;}}
@media print {#sidebar {display: none ! important;}}
@media print {#messageArea {display: none ! important;}}
@media print {#toolbar {display: none ! important;}}
@media print {.header {display: none ! important;}}

@media print {.tiddler .subtitle {display: none ! important;}}
@media print {.tiddler .toolbar {display; none ! important; }}
@media print {.tiddler .tagging {display; none ! important; }}
@media print {.tiddler .tagged {display; none ! important; }}
@media print {#displayArea {margin: 1em 1em 0em 1em;}}
@media print {.pageBreak {page-break-before: always;}}

/*}}}*/

Cheers Måns Mårtensson

Bauwe Bijl

unread,
Feb 26, 2011, 4:51:49 PM2/26/11
to TiddlyWiki
Hi Jan
Try this (not tested):
/*{{{*/
@media print {
.header, .toolbar, .subtitle, .tagging, .tagged {display: none !
important;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where
print preview displays the noscript content */
}
/*}}}*/

And/or check an example (I disabled some extra in this stylesheet):
http://hoster.peermore.com/recipes/customers/tiddlers.wiki#StyleSheetPrint


Bauwe

Jan Johannpeter

unread,
Mar 6, 2011, 10:05:13 AM3/6/11
to tiddl...@googlegroups.com
Thanks for the help on the stylesheet M�ns and Bauwe.

The Stylesheet below was in deed able to eliminate the Top Title and the
notices on the editor in the printview.
What remains to be made invisible is the Tags and the Editbar which do
not have a real use in the Printversion...
Does anyone hav an Idea?
/*{{{*/

@media print {#mainMenu {display: none ! important;}}
@media print {#topMenu {display: none ! important;}}
@media print {#sidebar {display: none ! important;}}
@media print {#messageArea {display: none ! important;}}
@media print {#toolbar {display: none ! important;}}
@media print {.header {display: none ! important;}}
@media print {.tiddler .subtitle {display: none ! important;}}

@media print {#tiddler #toolbar {display; none ! important; }}


@media print {.tiddler .tagging {display; none ! important; }}
@media print {.tiddler .tagged {display; none ! important; }}
@media print {#displayArea {margin: 1em 1em 0em 1em;}}

/*}}}*/

> Cheers M�ns M�rtensson

Bauwe Bijl

unread,
Mar 6, 2011, 12:07:16 PM3/6/11
to TiddlyWiki
Hi Jan

If I had known that you needed to remove more than the few items in
your initial question I would have advised you to use the
SnapshotPlugin. (which lets you print a single tiddler and/or save as
pdf)
Have a look:
http://tiddlytools.com/#SnapshotPlugin

Bauwe

Jan Johannpeter

unread,
Mar 6, 2011, 12:59:34 PM3/6/11
to tiddl...@googlegroups.com
Hi Bauwe!
Thans a lot, but for my purpose I think it would be smarter to eliminate
the editbar and Tags within the stylesheet. The Tiddlywiki am working on
shall present a collection of games and exercises for theatrestudents...
It is planned that my students will put together a collection exercises
to plan their own lesson. So it would be good if printing was the
easiest possible.
Jan

Alvin

unread,
Aug 25, 2012, 3:38:15 PM8/25/12
to tiddl...@googlegroups.com, lasjo...@googlemail.com
I'm also looking to eliminate headers, et al., when printing tiddlers.  I generally LOVE Eric's plugins, but I'm struggling trying to understand Snapshot.  And I think I'm more interested in a simpler solution along the lines of Jan's approach.  Any help would be very much appreciated.


Alvin

On Sunday, March 6, 2011 9:05:13 AM UTC-6, Jan Johannpeter wrote:
Thanks for the help on the stylesheet M�ns and Bauwe.

The Stylesheet below was in deed able to eliminate the Top Title and the
notices on the editor in the printview.
What remains to be made invisible is the Tags and the Editbar which do
not have a real use in the Printversion...
Does  anyone hav an Idea?
/*{{{*/

@media print {#mainMenu {display: none ! important;}}
@media print {#topMenu {display: none ! important;}}
@media print {#sidebar {display: none ! important;}}
@media print {#messageArea {display: none ! important;}}
@media print {#toolbar {display: none ! important;}}
@media print {.header {display: none ! important;}}
@media print {.tiddler .subtitle {display: none ! important;}}
@media print {#tiddler #toolbar {display; none ! important; }}
@media print {.tiddler .tagging {display; none ! important; }}
@media print {.tiddler .tagged {display; none ! important; }}
@media print {#displayArea {margin: 1em 1em 0em 1em;}}

/*}}}*/

> Cheers M�ns M�rtensson

Reply all
Reply to author
Forward
0 new messages