Giter Club home page Giter Club logo

tex2text's Introduction

Tex2text

A useless tool that translates a command-oriented tex file to a pure text file. The underlying principle is very simple: using regular expression to replace the commandes to spaces.

Get Started

You can download and run the executable binary file.

  1. Load a configure file with replacing rules. Here I give a example configre file.

step 1

  1. Check or Edit your rules.

step 2

%.*\n -> $0:
\\begin{abstract}(.*)\\end{abstract} -> $1:s
\\begin{IEEEkeywords}(.*)\\end{IEEEkeywords} -> $1:s
\\begin{figure}.*\\end{figure} -> $0:s
\\begin{itemize}(.*)\\end{itemize} -> $1:s
\$.*?\$ -> EXP:
\\S -> this Section:
...

The rules include two parts : a left part and a right part, divided by an arrow mark '->'. The left part is a normal regular expression. The right part is a self-defined mark: new_text:flag. There are three types of new_text:

  • $0 represents spaces, which means erasing all matched text.
  • $1 represents original text, which use the reserved text in the regular expression wrapped in brackets.
  • OTHER_TEXT like EXP and this Section, represents replacing all matched text with the OTHER_TEXT.

The flag is the flag of regular expression. Currently, g is enabled by default, s means enabling match \n, which are used in multi-row matching.

  1. Input your tex documents and get the result.

step 3

You can also edit your configure file if you are familiar with the regular expressions. Then you can click save to convert them into a file.

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.