Code Monkey home page Code Monkey logo

typst-notes-templates's Introduction

typst templates

Personal templates for Typst, a neat markdown-like typsetting system.

I have the following directory structure for these:

docs/
├── problems
│   ├── src
│   │   └── test.cpp
│   ├── test.pdf
│   └── test.typ
└── templates
    └── ...

Installation

Install dependencies:

  • ttf-liberation

Set up docs/ as a git repo.

mkdir docs
cd docs
git init

Add templates/ as a submodule.

git submodule add https://github.com/ojas-chaturvedi/typst-templates templates

Set the environment variable TYPST_TEMPLATE_ROOT to docs/ in .bashrc, .profile or equivalent. Otherwise, templates won't be able to render due to security policy.

.profile
--------

export TYPST_TEMPLATE_ROOT="$HOME/docs"

Create a settings file in docs/templates:

./gensettings.sh settings.yml

Example usage

Example usage (this is test.typ in the above tree:)

#import "/templates/problems.typ": template, source_code, status
#show: template.with(
  title: "CCC '22 J1 - Cupcake Party",
  problem_url: "https://dmoj.ca/problem/cc22j1",
  stat: "incomplete",
)

= Thought process

#lorem(20)

== Important things

#lorem(50)

#source_code("test")

Some settings are available in ./0.1.0/main.typ.

Screenshots

preview

Note that the font size is optimized for viewing the document fit to width on half a monitor.

typst-notes-templates's People

Contributors

dogeystamp avatar ojas-chaturvedi avatar zaheenj avatar

Watchers

 avatar

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.