简体   繁体   English

如何使用C#编译LaTeX?

[英]How to compile LaTeX with C#?

is there a way to compile a LaTeX document with C#? 有没有办法用C#编译LaTeX文档?

I want to program a standalone Windows application, that gives you a pdf-file without installing any other programs like miktex/etc. 我想编写一个独立的Windows应用程序,该应用程序可以为您提供pdf文件,而无需安装任何其他程序,例如miktex / etc。

Thanks in advance. 提前致谢。

Using LaTeX is similar to using a programming language or markup language, like HTML. 使用LaTeX类似于使用编程语言或标记语言(例如HTML)。 You'll have to reimplement everything from LaTeX that you want to support in your C# program. 您必须重新实现LaTeX中要在C#程序中支持的所有功能。 This might be possible for a very small subset of the LaTeX standard, but you'll be reinventing the wheel. 对于LaTeX标准的一小部分,这可能是可行的,但是您将重新发明轮子。 LaTeX is the most extensive markup language around with an enormous feature set with decades of development, it's not feasible to create a C# converter out of the blue for it. LaTeX是最广泛的标记语言,具有经过数十年开发的强大功能集,因此无法一劳永逸地创建C#转换器。

To put it bluntly, it would be probably easier for you to create your own C# compiler than to come up with a feature complete LaTeX compiler. 坦率地说,与创建功能完整的LaTeX编译器相比,创建自己的C#编译器可能更容易。

If you can't change your input data, ie a LaTeX source, then you should use one of the existing LaTeX converters. 如果您无法更改输入数据(即LaTeX源),则应使用现有的LaTeX转换器之一。 If you're looking for a way to convert text source files with some markup data to PDF with C# then better look into a lightweight markup language like Markdown. 如果您正在寻找一种使用C#将带有一些标记数据的文本源文件转换为PDF的方法,那么最好使用一种轻巧的标记语言,例如Markdown。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM