Giter Site home page Giter Site logo

synthetica9 / tufte-pandoc Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 168 KB

A pandoc scaffold using the LaTeX Tufte style

License: Creative Commons Zero v1.0 Universal

Python 36.94% Lua 35.58% TeX 16.98% Nix 7.28% Shell 3.22%
pandoc tufte-latex pandoc-latex-template scons nix

tufte-pandoc's Introduction

Tufte-Pandoc

Build Status

A template/scaffold that can be used to generate LaTeX documents.

Intended usage

# Clone into wanted directory:
git clone https://github.com/synthetica9/tufte-pandoc Report
cd Report

# Remove unneeded files:
./init.sh

# Build it:
nix-shell --run scons

After that, you should probably edit meta.yaml to add your own name, title and subtitle. After that, you can add files to md-src/.

Files

md-src/*.md
Every file should contain a chapter. Automatically discovered by scons.
meta.yaml
Contains variables for the document, such as the title, the subtitle, the author, the date.
header.tex
Anything contained here will be pasted into the header of the final LaTeX file. Recommended to contain things like \newcommands and such.
bibliography.bib
Biblatex file containing bibliography entries.
filters/*.lua
Filters that are run at various stages.
out.pdf
The final PDF file.
environments
You can place nix files here, they will be built and linked under the same name.
.build/
Internal build directory. You should assume this can be deleted at any time.
init.sh
Removes standard build files

Custom syntax

[!label]
Reference a label with cref. If you use [!Label] (with a capital), the reference is also capitalised.
[!!label]
Create a label.
captions

Captions are created as follows:

::: figure

FIGURE GOES HERE

---

CAPTION GOES HERE
[!!label]

:::

If you need a horizontal rule inside a figure but don't want a caption, that can be done as follows:

::: figure

FIGURE GOES HERE

---

CONTINUE WITH FIGURE

---

:::

The bottom rule will be deleted.

Software used

  • scons
  • pandoc
  • pandoc-citeproc
  • codebraid
  • XeLaTeX

If you can’t use Nix for some reason, you’ll have to install at least this software.

Attribution

If you use this template, you can (but don't have to, as per the CC0 licensing) credit @hilhorst-19, which is included in the default Biblatex file.

Future work

  • Use nix-build instead of nix-shell, for performance, persistence, and reproducibility.
  • Rename the default filters to something more descriptive.
  • Add an index file that explicitly lists chapters? (for easier reshuffling)

tufte-pandoc's People

Contributors

synthetica9 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

tufte-pandoc's Issues

How to handle offset parameter for figure and marginfigure

Thanks for a nice template/scaffold! A question, how can I / should I handle the offset parameter for figures and marginfigures? It would be convenient to be able to adjust vertical offset somehow. I refer to the offsets like 1.0in below:

\begin{marginfigure}[1.0in]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.