Coder Social home page Coder Social logo

harimau99 / texlite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lucrae/texlite

0.0 0.0 0.0 5.5 MB

:pencil: A lightweight, open-source tool for writing standard LaTeX documents cleanly using Markdown-style syntax.

Home Page: https://lucienrae.com/texlite

License: GNU General Public License v3.0

Shell 0.44% Python 76.44% TeX 21.28% Makefile 1.83%

texlite's Introduction

PyPI version build GNU/Linux macOS Windows

TeXLite is a lightweight, open-source tool for writing standard LaTeX documents cleanly using Markdown-style syntax. It's all about writing your LaTeX documents without distractions or overhead.

Example

Input: Document Output: PDF

TeXLite processes all LaTeX commands seamlessly and directly, even when using external packages!

Get Started

Installation

STEP 1: Install texlite with pip.

$ pip install --upgrade texlite

STEP 2: Install (if not already installed) a distribution of TeX. Recommendations:

  • On Windows, MikTeX can be installed from its official downloads page.

  • On MacOS, MacTeX can be installed with brew cask install mactex.

  • On Ubuntu/Debian, TeX Live can be installed with sudo apt-get install texlive.

You should now be able to run $ texlite (see Usage). If you have any issues, refer to Installation Fixes.

Usage

Write your document in any editor and save as Markdown (.md). See here for syntax.

Compile your document to PDF by opening the terminal and using:

$ texlite my_document.md

where my_document.md is the path to your document. Note that on Windows you may need to use python -m texlite my_document.md instead, (see Installation Fixes for more info).

Use texlite --help for options and information.

Guide

๐Ÿ“™ The guide provides a concise but comprehensive run-down on all you need to know, with examples included.

Document Setup

Document setup options can be specified with tags at the start of the document. For example:

:title: My Document  
:usepackages: xcolor, hyperref 

The lines above will set the document title to "My Document" and allow the document to use commands from the xcolor and hyperref LaTeX packages (given they're installed).

All the meta specification tags can be found in the guide here.

Saving as LaTeX/TeX

TeXLite "transpiles" to TeX, so it's very easy to save the .tex with:

$ texlite --save-tex my_document.md

Or if you want just the .tex and no PDF:

$ texlite --no-pdf my_document.md

Contributing

TeXLite is still in development and has plenty of features and fixes yet to come! If you can help with that, no matter to what degree, contributions to the project are greatly appreciated.

For example, you can become a credited contributer to the project by:

  • Adding ideas for the project to Issues.
  • Adding new components (as simple as adding a module to texlite/components and then adding it to parse.py).
  • Fixing bugs, or trying to break TeXLite to discover bugs (go to Issues).
  • Writing documentation or examples (super appreciated!).

Notes on contributing:

  • If you're new to contributing, that's okay! Refer to this great guide on how to get started.

  • Go to Issues to report any bugs, suggest any features, or see what contributions are currently in need.

  • Before and after implementing features, run tests on your local build with $ tox and lint with $ tox -e lint. Pull requests will not be accepted if not passing tests.

Other

License

TeXLite is licensed under GNU GPL v3. You are essentially free to use this software in any way you want (privately, commercially, with modifications, etc.) on the condition that distributions stay open-source and stick to the license.

Installation Fixes

If you're having issues with installing TeXLite, here are some fixes to possible problems:

  • TeXLite not added to Windows PATH: On Windows, Pip will not automatically add programs to your PATH (meaning that TeXLite can't be executed with $ texlite). Try calling TeXLite instead with python -m texlite or python3 -m texlite, or adding Python/TeXLite to your PATH.

  • Wrong Python: If pip install texlite is not working, you may be using Python 2.7, which has reached its end of life. Use pip3 install --upgrade pip and then pip3 install texlite to ensure that you're using Python 3.

  • TeX Live Missing Packages: If TeX Live is installed and working but the document TeX cannot be compiled, it may because of missing plugins. You can ensure your TeX Live has all the plugins with sudo apt-get install texlive-full.

  • MikTeX Missing Packages: When first running MikTeX on Windows, you may still need to install LaTeX packages. To easily install all that are missing, run texlite and wait for a prompt. In the prompt there's a checkbox to do this automatically, which may require you to wait but then it should fix your problems.

texlite's People

Contributors

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