Skip to content

Commit

Permalink
Style fixes, optimize mobi. New project layout. Switch calibre for ki…
Browse files Browse the repository at this point in the history
…ndlegen.
  • Loading branch information
czerwonamaupa committed Dec 6, 2018
1 parent 026ac53 commit c78a707
Show file tree
Hide file tree
Showing 13 changed files with 242 additions and 62 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/ebook.css
/*.epub
/*.mobi
8 changes: 1 addition & 7 deletions chapters/00-simulacra-and-simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
% Jean Baudrillard
% 1981

# #

:::{.title}
Simulacra
[and]{.title-small}
Simulation
:::
# Simulacra [and]{.title-small} Simulation #{.title}

:::{.authors}
By
Expand Down
3 changes: 0 additions & 3 deletions epub.css

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 17 additions & 21 deletions index.html

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
default : index.html simulacra-and-simulation.epub simulacra-and-simulation.mobi
default : index.html books/simulacra-and-simulation.mobi

index.html : chapters/* index.css html.css template.t
index.html : chapters/* styles/index.css styles/html.css template.t
pandoc \
-s \
--section-divs \
-o index.html \
-c index.css \
-c html.css \
-c styles/index.css \
-c styles/html.css \
--template template.t \
chapters/*

simulacra-and-simulation.epub : chapters/* index.css epub.css template.t cover.jpg
styles/ebook.css : styles/index.css styles/epub.css
cat styles/index.css > styles/ebook.css && cat styles/epub.css >> styles/ebook.css

ebooks/simulacra-and-simulation.epub : chapters/* styles/index.css styles/ebook.css template.t cover.jpg
pandoc \
-s \
--section-divs \
--toc-depth=1 \
--toc-depth=2 \
--epub-cover-image cover.jpg \
-o simulacra-and-simulation.epub \
-c index.css \
-c epub.css \
-o ebooks/simulacra-and-simulation.epub \
-c styles/ebook.css \
--epub-embed-font 'fonts/*' \
--template template.t \
-t epub3 \
chapters/*

simulacra-and-simulation.mobi : simulacra-and-simulation.epub cover.jpg
ebook-convert simulacra-and-simulation.{epub,mobi} --cover cover.jpg
ebooks/simulacra-and-simulation.mobi : ebooks/simulacra-and-simulation.epub
kindlegen ebooks/simulacra-and-simulation.epub
184 changes: 184 additions & 0 deletions styles/ebook.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
@charset "UTF-8";

@font-face
{ font-family: libertine;
src: url(../fonts/LinLibertine_R.woff); }

@font-face
{ font-family: libertine;
font-style: italic;
src: url(../fonts/LinLibertine_RI.woff); }

@font-face
{ font-family: libertine;
font-weight: bold;
src: url(../fonts/LinLibertine_RB.woff); }

@font-face
{ font-family: libertine;
font-weight: bold;
font-style: italic;
src: url(../fonts/LinLibertine_RBI.woff); }

html
{ font-size: 0.7rem; }

body
{ padding: 1rem;
font-family: libertine, serif; }

@media (min-width: 34rem)
{ html
{ font-size: 1rem; }

body
{ width: 34rem;
margin: 0 auto; } }

h1
{ font-weight: bold;
width: 22rem;
margin: 3rem auto 5rem auto;
font-size: 2rem;
text-align: center;
text-transform: uppercase;
line-height: 1; }

h2
{ font-weight: normal;
margin-top: 2rem;
margin-bottom: 1rem;
font-size: 1.5rem;
font-variant: small-caps;
line-height: 1;
text-align: center;
text-indent: 0; }

p
{ font-size: 1.2rem;
line-height: 1.4rem;
margin-bottom: 0;
margin-top: 0;
text-align: justify;
text-indent: 1rem; }

.title h1
{ font-weight: bold;
text-indent: 0;
font-size: 3rem;
margin-bottom: 10rem; }

.title span.title-small
{ font-size: 2.4rem; }

.authors p
{ font-weight: normal;
margin-top: 2rem;
margin-bottom: 1rem;
font-size: 1.5rem;
font-variant: small-caps;
line-height: 1;
text-align: center;
text-indent: 0;
text-transform: uppercase;
line-height: 1.5;
margin-bottom: 10rem; }

.redaction p
{ line-height: 1.5;
text-indent: 0;
text-align: center; }

.noindent p
{ text-indent: 0; }

.break p
{ margin-top: 4rem; }

footer
{ margin-top: 32rem;
line-height: 1.4rem;
font-size: 1.2rem;
display: block;
margin-left: auto;
margin-right: auto;
width: 28rem; }

ul
{ margin: 0.75rem 0;
padding: 0 1rem;
list-style: none; }

li
{ text-indent: -1rem;
font-size: 1.2rem;
text-align: justify;
margin: 0; }

.contents ul
{ padding-left: 4rem;
list-style: none; }

.contents li
{ margin: 1rem 0;
font-size: 1.4rem;
text-align: left; }

a:link, a:visited
{ color: inherit; }

a:link
{ text-decoration: none; }

.initial p:first-letter
{ font-size: 6rem;
float: left;
margin-right: 0.5rem;
line-height: 4rem; }

.initial p
{ text-indent: 0; }

.initial-up p:first-letter
{ font-size: 6rem;
margin-right: 0.5rem; }

.initial-up p
{ text-indent: 0; }

.signature p
{ text-align: right;
padding-right: 2rem;
font-size: 1.2rem; }

span.smallcaps
{ font-weight: bold;
font-size: 1.3rem; }

span.nothing
{ margin-right: 4rem; }

.footnotes ol
{ padding-left: 3rem; }

.footnotes p
{ margin-left: -3rem; }

.footnotes p:first-child
{ text-indent: 3rem; }

blockquote
{ margin: 1rem; }

sup
{ line-height: 0; }
.initial p:first-letter
{ margin: -2rem 0.5rem -2rem 0; }

.initial-up
{ margin: -1.4rem 0; }

.footnote-ref
{ font-size: 0.7rem;
vertical-align: text-top;
line-height: 0.7rem; }
10 changes: 10 additions & 0 deletions styles/epub.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.initial p:first-letter
{ margin: -2rem 0.5rem -2rem 0; }

.initial-up
{ margin: -1.4rem 0; }

.footnote-ref
{ font-size: 0.7rem;
vertical-align: text-top;
line-height: 0.7rem; }
File renamed without changes.
32 changes: 12 additions & 20 deletions index.css → styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

@font-face
{ font-family: libertine;
src: url(LinLibertine_R.woff); }
src: url(../fonts/LinLibertine_R.woff); }

@font-face
{ font-family: libertine;
font-style: italic;
src: url(LinLibertine_RI.woff); }
src: url(../fonts/LinLibertine_RI.woff); }

@font-face
{ font-family: libertine;
font-weight: bold;
src: url(LinLibertine_RB.woff); }
src: url(../fonts/LinLibertine_RB.woff); }

@font-face
{ font-family: libertine;
font-weight: bold;
font-style: italic;
src: url(LinLibertine_RBI.woff); }
src: url(../fonts/LinLibertine_RBI.woff); }

html
{ font-size: 0.7rem; }
Expand All @@ -36,17 +36,16 @@ body
margin: 0 auto; } }

h1
{ font-weight: 600;
margin-top: 3rem;
margin-bottom: 5rem;
padding: 0 5rem;
{ font-weight: bold;
width: 22rem;
margin: 3rem auto 5rem auto;
font-size: 2rem;
text-align: center;
text-transform: uppercase;
line-height: 1; }

h2
{ font-weight: 400;
{ font-weight: normal;
margin-top: 2rem;
margin-bottom: 1rem;
font-size: 1.5rem;
Expand All @@ -63,23 +62,17 @@ p
text-align: justify;
text-indent: 1rem; }

.title p
{ font-weight: 600;
margin-top: 3rem;
margin-bottom: 5rem;
font-size: 2rem;
text-align: center;
.title h1
{ font-weight: bold;
text-indent: 0;
text-transform: uppercase;
line-height: 1;
font-size: 3rem;
margin-bottom: 10rem; }

.title span.title-small
{ font-size: 2.4rem; }

.authors p
{ font-weight: 400;
{ font-weight: normal;
margin-top: 2rem;
margin-bottom: 1rem;
font-size: 1.5rem;
Expand All @@ -89,7 +82,6 @@ p
text-indent: 0;
text-transform: uppercase;
line-height: 1.5;
font-weight: 500;
margin-bottom: 10rem; }

.redaction p
Expand Down Expand Up @@ -160,7 +152,7 @@ a:link
font-size: 1.2rem; }

span.smallcaps
{ font-weight: 600;
{ font-weight: bold;
font-size: 1.3rem; }

span.nothing
Expand Down

0 comments on commit c78a707

Please sign in to comment.