/* CSS style sheet used to format XTech 2007 papers */
/* written by Håkon Wium Lie, may be reused for any purpose */

/* web fonts */

@import url(http://www.princexml.com/fonts/liberation/index.css);

/* set up page */

@page {
  size: a4;
  margin: 2.8cm 2cm 2.2cm;

  @bottom-center {
    content: counter(page);
    vertical-align: top;
    padding-top: 1em;
  }
  @top-center {
    content: string(header, first); 
    font-style: italic;
    vertical-align: bottom;
    padding-bottom: 1.5em;
  }
}

/* SVG logo */

#headline::before {
  content: url(xtech07logo.svg);
  width: 100px;
  margin-top: -1.2em;
}

/* generic settings for common HTML elements  */

body { margin: 2em; font: 10pt/1.4 serif; text-align: justify; }
@media print { body { margin: 0; font-family: "Liberation Serif", serif } }

/* some papers contain CJK characters */

pre { font-family: "AR PL SungtiL GB", monospace }
pre { font: 0.9em/1.1 monospace; margin: 0.8em 0 1.3em 1.77em }

/* paragraphs */

p { margin: 0 }
p { prince-text-replace: "'" "\2019"  "`" "\2019" }

p + p { text-indent: 1.6em }
p.caption + p, p + p.noindent, p.noindent { text-indent: 0 !important }
p.bibliography, p.bibliography + p.bibliography { 
  text-align: left; margin-left: 1.6em; text-indent: -1.6em; margin-bottom: 0.7em }

p { text-replace: "`" "\2019" "'" "\2019" }

/* lists */

ul, ol { margin: 0.7em 0 0.7em 1.6em; padding: 0 }
dl { margin: 0; padding: 0 }
dt { margin: 0.4em 0 0; padding: 0; }
dd { margin: 0 0 0.4em 1.6em; padding: 0;  }

/* headings */

h1, h2, h3, h4, h5 { 
  margin: 0.8em 0 0.25em; page-break-after: avoid; 
  clear: both; text-align: left; line-height: 1.1;
}

/* links */

a { text-decoration: none; color: black }

/* special treatment for author information */

#headline, #headline h1 { text-align: center }
#headline ul { margin: 1em 0 0.6em 0 }
#headline li { display: block }

#headline { margin: 0 0 3em }

/* minor styling */

.author_contact { font-style: italic }

/* figures */

div.figure { float: top; margin: 0em 0 1.2em; padding: 0; page-break-inside: avoid }

img { width: auto; height: auto; prince-image-resolution: 180dpi }

img { max-width: 100%; border: none; margin: 1em 0 0.3em 0;  }

p+p img { margin-left: -1.6em }

p.caption { 
  page-break-before: avoid; font-style: italic; margin: 0.3em 0 1em; 
  text-align: left; padding: 0; text-indent: 1.6em }

table {
  table-collapse: collapse;
  border: thin solid black;
  margin: 1em 0;
}

table td, table th {
  border: thin solid black;
  padding: 0.2em;
}

td p, th p { margin: 0; padding: 0 }

/* headers/footers */

body { string-set: header "" }
title { string-set: header content() }
h1 { string-set: header content() }


