Benutzer:Michail/css für PrinceXML
aus Wikisource, der freien Quellensammlung
Das folgende ist ein angepasstes XML für PrinceXML, um aus HTML-Seiten bei Wikisource PDF zu bauen. Änderungen:
- Textbox ist raus
- Kategorien sind raus
- Fußzeile ist raus
- Fußnoten sind reiner Text, also nicht mit mehr Wikisource verlinkt
- Pfeil nach oben in den references entfernt, der auch auf Wikisource verlinkte
- (wenn mir jemand sagt wie man in CSS Texte ersetzen kann, dann verlinke ich die Fußnoten oben und unten wieder miteinander)
- Weiterleitungshinweise werden nicht angezeigt
- Blabla "aus Wikisource, der freien Quellensammlung" wird unterhalb des Titel nicht angezeigt
Vorgehensweise:
- Den folgenden Text kopieren
- in eine Datei auf der lokalen Platte speichern mit der Endung .css, z.B. wikisource_pdf.css
- in PrinceXML normal die HTML-Seite mit dem Text laden, Hinweis Am besten die Seite in Wikisource als reine HTML-Seite und nicht als komplette Webseite speichern, da es sonst zu Problemen mit Umlauten in den Dateinamen kommen kann und eventuell keine Bilder eingebunden werden.
- Zusätzlich mit dem Knopf "Add Cascading Stylesheet" die oben angelegte CSS-Datei dazuladen, sollte dann auf dem zweiten Tab erscheinen
- Generieren
/*
** MediaWiki Print style sheet for CSS2-capable browsers.
** Copyright Gabriel Wicke, http://www.aulinx.de/
**
** Derived from the plone (http://plone.org/) styles
** Copyright Alexander Limi
*/
/* Thanks to A List Apart (http://alistapart.com/) for useful extras */
a.stub,
a.new {
color: #ba0000;
text-decoration: none;
}
#toc {
/*border:1px solid #2f6fab;*/
border: 1px solid #aaaaaa;
background-color: #f9f9f9;
padding: 5px;
}
.tocindent {
margin-left: 2em;
}
.tocline {
margin-bottom: 0;
}
/* images */
div.floatright {
float: right;
clear: right;
margin: 0;
position: relative;
border: solid White;
border-width: 0.5em 0 0.8em 1.4em;
}
div.floatright p {
font-style: italic;
}
div.floatleft {
float: left;
margin: 0.3em 0.5em 0.5em 0;
position: relative;
border: 0.5em solid White;
border-right-width: 1.4em;
border-bottom-width: 0.8em;
border-left-width: 0;
}
div.floatleft p {
font-style: italic;
}
/* thumbnails */
div.thumb {
margin-bottom: 0.5em;
border-style: solid;
border-color: White;
width: auto;
overflow: hidden;
}
div.thumb div {
border: 1px solid #cccccc;
padding: 3px !important;
background-color: #f9f9f9;
font-size: 94%;
text-align: center;
}
div.thumb div a img {
border: 1px solid #cccccc;
}
div.thumb div div.thumbcaption {
border: none;
padding: 0.3em 0 0.1em 0;
}
div.magnify {
display: none;
}
div.tright {
float: right;
clear: right;
border-width: 0.5em 0 0.8em 1.4em;
}
div.tleft {
float: left;
margin-right: 0.5em;
border-width: 0.5em 1.4em 0.8em 0;
}
img.thumbborder {
border: 1px solid #dddddd;
}
/* table standards */
table.rimage {
float: right;
width: 1pt;
position: relative;
margin-left: 1em;
margin-bottom: 1em;
text-align: center;
}
body {
background: White; /*font-size: 11pt !important;*/
color: Black;
margin: 0;
padding: 0;
}
.noprint,
#siteSub,
#contentSub,
div#jump-to-nav,
div.top,
div#column-one,
#colophon,
#catlinks,
#footer,
#mw_header,
#mw_portlets,
#p-personal,
#p-cactions,
.editsection,
.toctoggle,
.tochidden,
.printfooter,
div#f-poweredbyico,
div#f-copyrightico,
li#viewcount,
li#about,
li#disclaimer,
li#privacy {
/* Hides all the elements irrelevant for printing */
display: none;
}
ul {
list-style-type: square;
}
#content {
background: none;
border: none ! important;
padding: 0 ! important;
margin: 0 ! important;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
}
p, .documentDescription {
margin: 1em 0 1em 0;
line-height: 1.2em;
}
.tocindent p {
margin: 0 0 0 0 ! important;
}
pre {
border: 1pt dashed black;
white-space: pre;
font-size: 8pt;
overflow: auto;
padding: 1em 0;
background: white;
color: black;
}
table.listing,
table.listing td {
border: 1pt solid black;
border-collapse: collapse;
}
a {
color: Black !important;
background: none !important;
padding: 0 !important;
}
a:link, a:visited {
color: #520;
background: transparent;
text-decoration: underline;
}
#globalWrapper {
width: 100% !important;
min-width: 0 !important;
}
#content {
background: white;
color: black;
}
#column-content {
margin: 0 !important;
}
#column-content #content {
padding: 1em;
margin: 0 !important;
}
.reference {
counter-increment: ref;
content: "[" counter( ref ) "]";
}
.references li a:first-child {
display: none;
}
/* MSIE/Win doesn't understand 'inherit' */
a, a.external, a.new, a.stub {
color: black ! important;
text-decoration: none ! important;
}
/* Continue ... */
a, a.external, a.new, a.stub {
color: inherit ! important;
text-decoration: inherit ! important;
}
img {
border: none;
}
img.tex {
vertical-align: middle;
}
span.texhtml {
font-family: serif;
}
#siteNotice {
display: none;
}
table.gallery {
border: 1px solid #cccccc;
margin: 2px;
padding: 2px;
background-color: #ffffff;
}
table.gallery tr {
vertical-align: top;
}
div.gallerybox {
border: 1px solid #cccccc;
margin: 2px;
background-color: #f9f9f9;
width: 150px;
}
div.gallerybox div.thumb {
text-align: center;
border: 1px solid #cccccc;
margin: 2px;
}
div.gallerytext {
font-size: 94%;
padding: 2px 4px;
}
/*Wikisource-Spezifika*/
.center {
margin: auto; /* Alle vier Werte auf „auto“ */
text-align: center;
}
.floatnone {
float: none;
}
.poem {
line-height:1.6em;
margin-bottom:0;
margin-left:5em;
margin-top:0;
}
div[style="position:relative;"]
{
position:relative;
margin-top:-1em;
margin-bottom:-1em;
}
.poem div[style="position:relative;"]
{
position: relative;
margin-top: -0.2em;
margin-bottom: 0;
}
.poem .pr1pn
{
left:-5.5em;
position: absolute;
text-align: right;
top:0;
vertical-align: middle;
width: 3em;
}
.poem .zeilennummer {
font-size: 0.8em;
left:-5.5em;
position: absolute;
text-align: right;
top:0;
vertical-align: middle;
width: 5em;
}
.poem p {
margin-bottom: 0 !important;
margin-top: -0.2em !important;
}
.seitennummer {
left:-0.5em;
position: absolute;
text-align: right;
top:0;
vertical-align: middle;
width: 3em;
}