Giter VIP home page Giter VIP logo

parshape's Introduction

Parshape

See parshape.com for a live version.

This project came to be as a semestral work in subject Typography and TeX. Subject page on CTU's website can be found here.

List of features

  • draw a shape of your paragraph with
    • lines
    • lines that snap to a multiple of 15°
    • half-circles
    • n-point Bézier curve
  • configure the app close to your TeX environment, this project can use
    • \baselineskip and \lineskip
    • \hsize and \vsize
    • \pagewidth and \page height
    • offset of text start: \hoffset, \pdfhorigin, \voffset and \pdfvorigin

Static Build

Static Build

To obtain a static build click the badge above and go to the latest build. On successful static builds, there is a section called Artifacts with a ZIP file.

To serve the contents of the ZIP file, unpack it and serve using any HTTP server. My favourite way to do so is using

$ npx http-server -p 9000 &  # ensure you are in the correct directory
$ firefox localhost:9000

To create a build locally, run

$ npm run build:static

after setting up your development environment using instructions below.

Local development

Required programs:

  • Node.js version >= 14 and compatible NPM

To get started, run the following commands:

$ npm install  # install dependencies
$ npm run dev  # run local development server

A local build can be made with

$ npm run build

and served with

$ npm run start

Documentation

This project is documented in two ways: code with its tests and a PDF file.

Code and tests

Ideally all code should be tested -- don't understand what a line of code does? Try to change it or remove it and see what functionality breaks and which tests don't pass. Still have no clue? File an issue.

React components should be understandable to a React developer. For everything else there should be readable code (explanatory variables, short functions) and tests.

Jest is the chosen test runner. To run all tests, use:

$ npm run test  # or `npm run test:watch` when developing

PDF

Build Docs

To obtain the PDF doc file, click the badge above and select the latest successful run from branch master. The PDF contains high-level introduction to the project and explanation of some used algorithms and math formulas.

If you wish to compile the TeX source yourself, go to ./doc and run

$ lautex -fmt optex parshape.tex

parshape's People

Contributors

tmscer avatar

Stargazers

Louis Stenger 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.