Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
81 lines (59 sloc) 2.24 KB
This is a Django site to publish a book online, converting LaTeX into HTML.
Django 1.3 or later
python-plastex (to read LaTeX files)
poppler-utils (to convert .pdf figures to images)
Put your LaTeX source files in:
books/mybook/book.tex (must be named book.tex)
Create the following files in this directory:
SECRET_KEY = "something long and random, see Django for details"
DEFAULT_BOOK = "mybook" # root directory of book content
HASHTAG = "myhashtag" # suggested hashtag, no #-sign
TWEET = "What a great book." # suggested tweet
RELATED_TWITTER_HANDLE = "YourHandle" # your twitter handle, no @-sign
GOOGLE_GROUP_NAME = "mybookgroup" # name of your Google Group
GOOGLE_ANALYTICS_ID = "UAXXXXXXXX1" # your Google Analytics ID
FACEBOOK_APP_ID = "1133344455511" # your Facebook App ID
You may also specify chapters to embargo (hide from the site) using the chapter
numbers, e.g.:
EMBARGO_CHAPTERS = { "mybook": (2, 3, 4) }
<!-- HTML Metadata -->
<title>Your Book Title</title>
<meta name="description" content="Your Book Description">
<meta name="author" content="Your Name">
<!-- Facebook Graph -->
<meta property="og:title" content="Your Book Title" />
<meta property="og:type" content="book" />
<meta property="og:url" content="Your Book URL" />
<meta property="og:image" content="Your Book Cover Image" />
<meta property="og:site_name" content="Your Site Name" />
<meta property="fb:admins" content="Facebook User ID to Admin the Page" />
<!-- Google Plus Metadata -->
<meta itemprop="name" content="Your Book Name">
<meta itemprop="description" content="Your Book Description">
<h1>My Book</h1>
<h2>Subtitle subtitle subtitle subtitle</h2>
<h2>By Your Name</h2>
<div class="copyright">Copyright &copy; 2012 Your Name</div>
<div style="padding: 2em 3em 2em 2em">
<p>This book is the culmination of much work.</p>
Running The Site
Check that the site works locally with:
python runserver
The first time a page is hit, the LaTeX source file will be processed. For large
documents, this can take a little while.