AsciiMathToLatex

所属分类:代码编辑器
开发工具:HTML
文件大小:0KB
下载次数:0
上传日期:2016-04-07 22:34:20
上 传 者sh-1993
说明:  用Swift编写的编译器,使用文字编程将AsciiMath语句转换为LaTeX。
(Compiler written in Swift using literate programming to convert AsciiMath statements to LaTeX.)

文件列表:
AsciiMathToLaTeX_Report_Combined.pdf (781804, 2016-04-07)
AsciiMathToLatex (235060, 2016-04-07)
Literate_Output/ (0, 2016-04-07)
Literate_Output/ExpressionTypes.html (37548, 2016-04-07)
Literate_Output/Lexer.html (28494, 2016-04-07)
Literate_Output/Main.html (21666, 2016-04-07)
Literate_Output/Overview.html (22563, 2016-04-07)
Literate_Output/Parser.html (34128, 2016-04-07)
Literate_Output/Util.html (19690, 2016-04-07)
Literate_Output/expressiontypes.swift (9027, 2016-04-07)
Literate_Output/lexer.swift (3174, 2016-04-07)
Literate_Output/main.swift (518, 2016-04-07)
Literate_Output/parser.swift (5140, 2016-04-07)
Literate_Output/util.swift (184, 2016-04-07)
Literate_Source/ (0, 2016-04-07)
Literate_Source/ExpressionTypes.lit (14650, 2016-04-07)
Literate_Source/Lexer.lit (7030, 2016-04-07)
Literate_Source/Main.lit (1990, 2016-04-07)
Literate_Source/Overview.lit (3945, 2016-04-07)
Literate_Source/Parser.lit (11774, 2016-04-07)
Literate_Source/Util.lit (935, 2016-04-07)
Presentation/ (0, 2016-04-07)
Presentation/AsciiMathToLatex_Presentation.pdf (96873, 2016-04-07)
Presentation/AsciiMathToLatex_Presentation.tex (1966, 2016-04-07)
Project_Proposal/ (0, 2016-04-07)
Project_Proposal/ProjectProposal.html (218182, 2016-04-07)
Project_Proposal/ProjectProposal.lit (6218, 2016-04-07)
Project_Proposal/literature_style_override.css (258, 2016-04-07)
literature_style_override.css (258, 2016-04-07)
makefile (268, 2016-04-07)
run_tests.swift (1635, 2016-04-07)

# AsciiMathToLatex AsciiMathToLatex takes a math equation written in [AsciiMath](http://asciimath.org) as input and converts it into valid LaTeX source. The tool first parses the AsciiMath input, outputting syntax errors as they are encountered. It then generates an AST representing the equation which is converted into LaTeX math notation and output as text to the console. The purpose of the project is to allow for a simpler, more readable syntax for math equations to be used with the superior typesetting abilities of LaTeX. In terms of formatting, LaTeX is unparalleled for complex math equations. As such, it has become the industry standard and is widely used and supported throughout academia and in math-related fields. Personally, I've been using LaTeX for several years and continue to use it to format math equations and take notes. However, the syntax to write these math equations is verbose, difficult-to-read, and slow to type. AsciiMath is a language that implements a subset of LaTeX's math functionality and is used for displaying math equations in HTML documents. It uses a much simpler syntax that prefers spaces and parentheses over braces and backslashes and saves the user keystrokes by requiring less explicit instructions. # Installation Guide All the source code for *AsciiMathToLatex* as well as all the documentation (including this document) were created using [Literate](http://literate.zbyedidia.webfactional.com), a tool for writing programs using the [literate programming](http://www.literateprogramming.com) method. That means that the source code is contained alongside the documentation within the .lit files. Running the Literate program will generate both the .swift source files that make up the project and the HTML files that form the documentation. After the .swift files are generated by Literate, the Swift compiler is used to create the executable. ## Dependencies ### Literate Download and install Literate from their [downloads page](http://literate.zbyedidia.webfactional.com/download.php) ### Swift Compiler - OS X users can install the swift compiler, swiftc, by installing [Xcode](https://www.google.ca/search?client=safari&rls=en&q=install+xcode&ie=UTF-8&oe=UTF-8&gfe_rd=cr&ei=7hn_VravBYON8QfU77HgDg) and then running `xcode-select install` from Terminal
- Linux users can install Swift from the compiler [homepage](https://swift.org/getting-started/#using-the-repl) ## Building AsciiMathToLatex Run `make` from the project directory. # Usage The AsciiMathToLatex executable takes an equation written in AsciiMath notation as the first argument and prints out the converted LaTeX source code. For example, running: ``` ./AsciiMathToLatex 'x/y + sqrt(beta)' ``` will output the following LaTeX code: ``` \frac{x}{y} + \sqrt{\beta} ```

近期下载者

相关文件


收藏者