All Projects → ruuda → Pris

ruuda / Pris

Licence: gpl-3.0
A language for designing slides

Programming Languages

rust
11053 projects
dsl
153 projects

Projects that are alternatives of or similar to Pris

Markdownslides
MarkdownSlides is a Reveal.js and PDF slides generator from MARKDOWN files, that also generate HTML, EPUB and DOCX documents. The idea is that from a same MARKDOWN file we can get slides and books without worrying about style, just worrying about content.
Stars: ✭ 121 (+24.74%)
Mutual labels:  slides, pdf
One File Pdf
A minimalist Go PDF writer in 1982 lines. Draws text, images and shapes. Helps understand the PDF format. Used in production for reports.
Stars: ✭ 429 (+342.27%)
Mutual labels:  graphics, pdf
Decktape
PDF exporter for HTML presentations
Stars: ✭ 1,847 (+1804.12%)
Mutual labels:  slides, pdf
Material
A UI/UX framework for creating beautiful applications.
Stars: ✭ 11,870 (+12137.11%)
Mutual labels:  graphics, design
Fonts
A collection of rad, open-source typefaces that everyone needs in their lives.
Stars: ✭ 24 (-75.26%)
Mutual labels:  graphics, design
Awesome Design
🌟 Curated design resources from all over the world.
Stars: ✭ 13,333 (+13645.36%)
Mutual labels:  graphics, design
Pts
A library for visualization and creative-coding
Stars: ✭ 4,628 (+4671.13%)
Mutual labels:  graphics, design
Mojs
The motion graphics toolbelt for the web
Stars: ✭ 17,189 (+17620.62%)
Mutual labels:  graphics, design
Backslide
💦 CLI tool for making HTML presentations with Remark.js using Markdown
Stars: ✭ 679 (+600%)
Mutual labels:  slides, pdf
Webslides
Create HTML presentations in seconds —
Stars: ✭ 5,778 (+5856.7%)
Mutual labels:  slides, design
Svglib
Read SVG files and convert them to other formats.
Stars: ✭ 139 (+43.3%)
Mutual labels:  graphics, pdf
Graphicsrenderer
A drop-in UIGraphicsRenderer port -- CrossPlatform, Swift 4, Image & PDF
Stars: ✭ 85 (-12.37%)
Mutual labels:  graphics, pdf
Pagebot
Scripted page layout framework for Python.
Stars: ✭ 103 (+6.19%)
Mutual labels:  graphics, design
P5.js
p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
Stars: ✭ 16,542 (+16953.61%)
Mutual labels:  graphics, design
Leerraum.js
A PDF typesetting library with exact positioning and hyphenated line breaking
Stars: ✭ 233 (+140.21%)
Mutual labels:  pdf, design
Glisp
A Lisp-based Design Tool Bridging Graphic Design and Computational Arts
Stars: ✭ 519 (+435.05%)
Mutual labels:  graphics, design
Generative Designs
A collection of generative design React components
Stars: ✭ 51 (-47.42%)
Mutual labels:  graphics, design
React Color Tools
A set of tools as React components for working with colors 🎨
Stars: ✭ 87 (-10.31%)
Mutual labels:  graphics, design
Puppeteer Dart
A Dart library to automate the Chrome browser over the DevTools Protocol. This is a port of the Puppeteer API
Stars: ✭ 92 (-5.15%)
Mutual labels:  pdf
Officeproducer
Produce doc/docx/pdf format from doc/docx template
Stars: ✭ 95 (-2.06%)
Mutual labels:  pdf

Pris

Pris is a domain-specific language for designing slides and other graphics.

Build Status Gitter

Example

The obligatory “hello world”:

{
  put t("Hello world") at (0.1w, 0.5h)
}

And to show a little more of the language, here is a slightly more elaborate program that also draws lines:

top_left = (0w, 0h)
top_right = (1w, 0h)
bottom_left = (0w, 1h)
bottom_right = (1w, 1h)

{
  put line(bottom_right) at top_left
  put line(top_right - bottom_left) at bottom_left

  font_family = "Cantarell"
  font_size = 0.3h
  color = #882244
  put t("A language for designing slides.") at (0.1w, 0.1w + font_size)
}

{
  color = #000000
  put line((1w, 0h)) at (0w, 0.5h)
}

It creates two slides, the first one with a cross in it, the second one with a horizontal line. The first slide contains text in dark purple.

Comparison to other technologies

  • Pris is similar to LaTeX with Beamer in the sense that you write your slides in a text-based, human readable format, from which a pdf is produced. Pris differs from LaTeX with Beamer in not doing any lay-out. All elements must be placed manually.
  • Pris is similar to reveal.js in that its control over visuals superficially resembles css. It differs from reveal.js in requiring a separate compilation step that renders a pdf. It differs from html in being imperative rather than declarative.
  • Pris is similar to TikZ in LaTeX, in the sense that it is a domain-specific language for creating graphics. It is similar in providing complete control over where elements are placed. Pris differs from TikZ in not being embedded in LaTeX. It has a more modern syntax, and it has first class support for computation. For instance, arithmetic with coordinates is supported out of the box, and Pris has proper functions, rather than TeX macros.
  • Pris is similar to Fran, in having first-class, composable graphics (although implementation is a work in progress). Pris differs from Fran in not being embedded in Haskell. Pris differs from Fran in placing emphasis on graphics rather than animation.
  • Pris is similar to Diagrams in being a domain-specific language with first-class composable graphics, giving complete control over layout. Pris differs from Diagrams in not being embedded in Haskell. Pris differs from Diagrams in its styling system. Customization in Pris resembles CSS due to dynamic scoping, whereas in Diagrams functions pass around a style value.
  • Pris is vaguely similar to Powerpoint and graphical editors like Illustrator or Inkscape in providing complete control over where elements are placed. It differs in being a text-based format intended to be edited with a text editor, rather than with a graphical editor.
  • Pris is similar to an html canvas element, or to drawing with Skia or Cairo, in providing complete control over how graphics are drawn. It differs from direct canvas drawing in being more high-level (graphic elements can be manipulated as first-class values), and in being a domain-specific language rather than being controlled by a general-purpose scripting language.

Documentation

Building

Pris uses Cairo for drawing and Harfbuzz for text shaping, and links against libcairo.so and libharfbuzz.so. It uses Rsvg to render svg images, for which it links against librsvg-2.so. Ensure that these are installed:

# On Ubuntu
apt install fonts-cantarell libcairo2-dev libharfbuzz-dev librsvg2-dev

# On Arch
pacman -S --needed cantarell-fonts cairo harfbuzz librsvg fontconfig freetype2

Pris is written in Rust and builds with Cargo, the build tool bundled with Rust.

cargo build --release
target/release/pris examples/lines.pris
evince examples/lines.pdf

License

Pris is free software. It is licensed under the GNU General Public License, version 3.

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].