All Projects → rreece → markdown-memo

rreece / markdown-memo

Licence: other
Compile simple (or not so simple) Markdown memos to html and/or pdf via LaTeX with pandoc.

Programming Languages

python
139335 projects - #7 most used programming language
CSS
56736 projects
TeX
3793 projects
HTML
75241 projects
Makefile
30231 projects

Projects that are alternatives of or similar to markdown-memo

Letter Boilerplate
Finest letter typesetting from the command line
Stars: ✭ 374 (+1868.42%)
Mutual labels:  latex, typesetting
Cv Boilerplate
Programmatic generation of high-quality CVs
Stars: ✭ 967 (+4989.47%)
Mutual labels:  latex, typesetting
Pandoc Starter
📄 My pandoc markdown templates and makefiles
Stars: ✭ 443 (+2231.58%)
Mutual labels:  latex, writing
Writefreely
A clean, Markdown-based publishing platform made for writers. Write together, and build a community.
Stars: ✭ 2,479 (+12947.37%)
Mutual labels:  writing, blogging
dillinger
The last Markdown editor, ever.
Stars: ✭ 7,533 (+39547.37%)
Mutual labels:  writing, blogging
Mistletoe
A fast, extensible and spec-compliant Markdown parser in pure Python.
Stars: ✭ 368 (+1836.84%)
Mutual labels:  latex, webdev
Readteractive
Tool for writing and generating interactive books.
Stars: ✭ 23 (+21.05%)
Mutual labels:  latex, writing
Openlivewriter
An open source fork of Windows Live Writer
Stars: ✭ 2,398 (+12521.05%)
Mutual labels:  writing, blogging
content-o-tron
A process for helping the Rust community and new comers to share their story of using Rust 🤖
Stars: ✭ 18 (-5.26%)
Mutual labels:  writing, blogging
Latex Homework Class
A class for homework assignments written in LaTeX.
Stars: ✭ 76 (+300%)
Mutual labels:  latex, writing
Invoice Boilerplate
Simple automated LaTeX invoicing system
Stars: ✭ 604 (+3078.95%)
Mutual labels:  latex, typesetting
merlot
Web based Markdown writing app built with isomorphic Ink and Torus
Stars: ✭ 145 (+663.16%)
Mutual labels:  writing, blogging
Caoutchouc
Make TeX great again
Stars: ✭ 38 (+100%)
Mutual labels:  latex, typesetting
writefreely
A clean, Markdown-based publishing platform made for writers. Write together and build a community.
Stars: ✭ 2,866 (+14984.21%)
Mutual labels:  writing, blogging
cross-post
Cross Post a blog to multiple websites
Stars: ✭ 66 (+247.37%)
Mutual labels:  writing, blogging
stylo
Stylo est un éditeur de textes pour articles scientifiques en sciences humaines et sociales.
Stars: ✭ 29 (+52.63%)
Mutual labels:  writing
latex-mimore
A minimal & modern LaTeX template for reports
Stars: ✭ 26 (+36.84%)
Mutual labels:  latex
SCU Beamer Slide-demo
四川大学非官方Beamer模板 | Unofficial Beamer Template for Sichuan University
Stars: ✭ 28 (+47.37%)
Mutual labels:  latex
opendetex
Improved version of Detex - tool for extracting plain text from TeX and LaTeX sources
Stars: ✭ 179 (+842.11%)
Mutual labels:  latex
nctu-thesis-latex
A LaTeX template for writing thesis in NCTU.
Stars: ✭ 70 (+268.42%)
Mutual labels:  latex

markdown-memo

This project is meant to make writing easier and more productive.

So you want to write a document. Maybe you'll share it on the web. Maybe you want a polished pdf. Maybe it's a blog, research paper, book draft, or just a set of notes. You don't want to think about typesetting details. You just want to throw your ideas in some plain text files and call make.

This package makes it very easy to compile text taken in Markdown to valid xhtml or to a pdf via LaTeX. It can be used to make simple webpages quickly, for example:
http://rreece.github.io/sw/markdown-memo/

This same document compiled to a pdf can be found here:
http://rreece.github.io/sw/markdown-memo/example.pdf

Author

Ryan Reece [email protected]
Created: July 29, 2014

License

Copyleft 2014-2019 Ryan Reece
License: GPL http://www.gnu.org/licenses/gpl.html

Requirements

  • make
  • LaTeX (texlive/mactex)
  • python
  • pandoc
  • pandoc-citeproc
  • pandoc-crossref
  • matplotlib (for pagecount and wordcount plots)
  • xpdf (pdfinfo command for pagecount)

On my Mac, I used to install the missing dependencies through macports, but beginning with OS 10.11, I started using homebrew.

First, if you are on a Mac, you should install Xcode through the Apple app store to get make and basic build utilities.

Some basic requirements I had to install with homebrew were the following, and I got pip and used it to install somethings:

brew install wget
brew install xpdf
sudo python get-pip.py 
sudo pip install scipy
sudo pip install matplotlib
sudo pip install pandas

Then, with homebrew, the main packages to install are

brew cask install mactex
brew install pandoc
brew install pandoc-citeproc
brew install pandoc-crossref

Instead of homebrew, some years ago, with macports I installed

sudo port selfupdate
sudo port install texlive-latex texlive-latex-recommended texlive-latex-extra texlive-math-extra
sudo port install pandoc
sudo port install hs-cabal-install
cabal update
cabal install pandoc-citeproc pandoc-crossref

If something doesn't work for you, please let me know! I'll do my best improve the documentation and make the software more robust as time allows. Contact me at: [email protected]

Features

html

  • disqus comments
  • mathjax LaTeX rendering
  • google analytics tracking
  • automatically generates an index.md

If you want to write your own index.md, then put the same markdown in index.txt.

pdf

  • LaTeX
  • fancyheader

both

  • appendices
  • bibtex bibliographies
  • footnotes
  • multiple authors
  • word- and page-count plots (see below)

Getting started

  • Clone/fork this package and possibly rename the markdown-memo directory as your project.

  • Put some *.md files in that directory.

  • In those files, just start writing the h1 heading. There's no need for additional markup or html. Examples of Markdown syntax are

    Section 1
    =================================
    
    Sub-section 1
    ---------------------------------
    
    [Lorem ipsum](https://en.wikipedia.org/wiki/Lorem_ipsum)
    dolor sit amet, duo ut putant verear, nam ut brute utroque.
    Officiis qualisque conceptam te duo, eu vim soluta numquam, has ut aliquip
    accusamus. Probo aliquam pri id. Mutat singulis ad vis, eam euismod pertinax
    an, ea tale volumus vel. At porro soleat est. Debet facilis admodum an sed,
    at falli feugiat est.
    
    1.  one
    1.  two
    1.  three
    
    You can do latex in-line, $e^{i\pi} + 1 = 0$, like that.
    Or equations:
    
    \begin{equation}
        \int_{\partial\Omega} \omega = \int_{\Omega} \mathrm{d}\omega \,.
    \end{equation}
    
  • Edit the metadata in meta.yaml.

  • Call make to generate valid xhtml.

  • Call make pdf to generate a pdf document.

  • Call make clean to delete temporary LaTeX files.

  • Call make realclean to additionally delete the output html and pdf files.

I use an image of my email to hide it from text crawlers. Please replace img/my-email.png with a screenshot of your email address instead of mine, or just remove the use of the image in meta.yaml.

Customize the files in templates/ to adjust the format of the output html and pdfs files to your needs.

If you want to put the html online, perhaps a solution for you, because it's free and easy, would be to host the pages at github. See: pages.github.com.

Special files

There are a few special files that help steer the execution of markdown-memo or are otherwise exceptional.

Documentation:

  • README.md - This file. Please empty this file and adapt it to your project.
  • VERSIONS.md - Documents the chronology of markdown-memo versions. Feel free to delete or adapt this to your project.

Primary files edited by the user:

  • meta.yaml - The main metadata file controlling the project in many ways.
  • *.md - Any other user-created Markdown files, the markup of your document.

Optional files:

  • index.[md,txt] - The top-level, root file of your project. By default, if index.txt is missing, a table of contents is generated for index.md, otherwise (the user-written) index.txt is copied to be the index.md.
  • bib_index.md - Call make bib_index.md to generate this file. It is to help incoorporate citations into your document by being an automatically generated list of the references, with footnotes, created from the available bibliography files in bibs/.
  • order.txt - Optionally, the user can create this file, which should have a list of Markdown files used in the document, one-per-line, in the order as to be used for the navigation buttons in the html template. By default, building the html will generate this file if it doesn't already exist, with the Markdown files listed in alphabetical order. If one names the Markdown files something like 01-first-section.md, 02-second-section.md, etc., then the order should be handled automatically.

Disqus integration

You can choose to append a comments section at the end of your html. Just register a user name and the site name with disqus.com. Then in the meta.yaml, set disqus: true, and set your disqus_shortname.

More info

The documentation in this README is expanded on in the markdown-memo example:
rreece.github.io/sw/markdown-memo

Word count

Note that word-count and page-count plots are generated when you call make pdf. You might want to keep these around in the README.md for your document.

Page count over time.

Word count over time.

Wish list / TODOs

  • Automatically generate an index.md with a TOC.
  • Find and replace the default figure environment to be \begin{figure}[tph] instead of \begin{figure}[htbp].
  • Add conditionals to the Makefile such that templates/refs.md is only added for documents that have references.
  • Write a script to generate a md file with footnotes and citations defined given a bibliography (make_bib_index.py).
  • Find and replace such that LaTeX figures use pdf figures while html uses raster png/jpg.
  • Optionally make a TOC automatically in the html.
  • Make links to previous and next sections (if they exist) in the navigation box in the html.
  • Finish the basic documentation in the markdown-memo example document.
  • Make a template that works with REVTeX.
  • Make a template that works with JHEP.
  • Hack equation references to be done the same as figure and table references. [@eq:stokes]eq.\ $\eqref{eq:stokes}$
  • PlotTable float
  • Allow tables to be given as csv files.
  • Fix TOC spacing issues with REVTeX.
  • Fix Author issues with JHEP.
  • Make the use of tmp files more robust.
  • Test and explain the installation and requirements better on different systems.
  • Fix TOC issues when calling make ohtml.
  • Explain make html vs make ohtml in the documentation.
  • Get tables to be normal \begin{table}[bph] instead of the longtable environment.
  • References to labels on other pages unfortunately don't work in html.

See the version history: VERSIONS.md

See also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].