Programmer .NET how to show LaTeX
this article describes several ways to display LaTeX documents in programs .NET. The information is useful primarily to programmers working in the field of education. All it is, tested on their own experience in the development of the Department of mathematics of one of Moscow's leading technical UNIVERSITIES.
Your software automatically created a lot of scientific documents in LaTeX (as most appropriate for these purposes text format), each document must quickly show the user as a draft. "Automatically" means that the user is not gaining a LaTeX document manually, he may not even know what it is. It is implied that once you have created a final version of the document, it will be either exported to LaTeX-e, or converted to a PDF means installed TeX and printed. Show drafts should be possible without using third-party programs and faster, and their correctness is guaranteed. The size of the documents does not exceed a few sheets of A4, the number of formulas moderate.
It would seem, if still at the end of the document will print, which is impossible without installation of TeX, what to emphasize independence from TeX-as? This is specifics of the software system, developed by the author.
the
What is the best way to choose?
It is possible to present a comparison of methods in the form of a table.
the
Inserted below are examples of display LaTeX to PDF in techexplorer and MathML in Mozilla Firefox
the
The quality of the display, obviously the leader PDF, MathML/Firefox and techexplorer your mistakes.
Comparison table of speeds displayed:
the
In the first case, the document is converted to PDF and then displayed in Adobe Reader. In the second were displayed directly in Internet Explorer. The third was converted to XHTML+MathML displayed in Firefox. Computer configuration: Windows 7 x86, Core 2 Duo T7500, 4GB DDR2. It is seen as slows down the display of MathML in Firefox on relatively large documents.
Subjectively, the first method is the most reliable but slow, the second fast and of poor quality, and the third uses a new technology, which until the end is not established.
As can be seen, each method has its advantages and disadvantages. Until recently, the author uses the techexplorer, but he's already 4 years does not develop, and potentially bring problems in the future. Unfortunately, the dampness latex2mathml to quickly achieve results, and is not a universal solution for all.
This article was provided an overview of the ways to solve the problem quickly display LaTeX in programs .NET. If you are interested in details, I will be glad to explain.
Article based on information from habrahabr.ru
Objective
Your software automatically created a lot of scientific documents in LaTeX (as most appropriate for these purposes text format), each document must quickly show the user as a draft. "Automatically" means that the user is not gaining a LaTeX document manually, he may not even know what it is. It is implied that once you have created a final version of the document, it will be either exported to LaTeX-e, or converted to a PDF means installed TeX and printed. Show drafts should be possible without using third-party programs and faster, and their correctness is guaranteed. The size of the documents does not exceed a few sheets of A4, the number of formulas moderate.
It would seem, if still at the end of the document will print, which is impossible without installation of TeX, what to emphasize independence from TeX-as? This is specifics of the software system, developed by the author.
Solutions
the
-
the
- In a forehead — to compile LaTeX to PDF something-like using TeX, and to show in external viewer the
- otherwise — to display LaTeX in the browser (ie WebBrowser component) using Integre techexplorer — ActiveX plugin for Internet Explorer the
- Even trickier to convert LaTeX MathML and show support in the standard browser (i.e. the corresponding component .NET)
What is the best way to choose?
It is possible to present a comparison of methods in the form of a table.
Method | Benefits | Weaknesses |
"head" |
|
|
Using Integre techexplorer |
|
|
Using MathML |
|
|
Inserted below are examples of display LaTeX to PDF in techexplorer and MathML in Mozilla Firefox
The quality of the display, obviously the leader PDF, MathML/Firefox and techexplorer your mistakes.
Comparison table of speeds displayed:
Method | Time (in LaTeX, of 8.5 KB, 130 Strok 101 formula) | Time (LaTeX, 1 KB, 30 lines, 11 formulas) |
"head" | 14 | 11 |
techexplorer | 3 | 3 |
MathML | 12 | 3 |
In the first case, the document is converted to PDF and then displayed in Adobe Reader. In the second were displayed directly in Internet Explorer. The third was converted to XHTML+MathML displayed in Firefox. Computer configuration: Windows 7 x86, Core 2 Duo T7500, 4GB DDR2. It is seen as slows down the display of MathML in Firefox on relatively large documents.
Subjectively, the first method is the most reliable but slow, the second fast and of poor quality, and the third uses a new technology, which until the end is not established.
As can be seen, each method has its advantages and disadvantages. Until recently, the author uses the techexplorer, but he's already 4 years does not develop, and potentially bring problems in the future. Unfortunately, the dampness latex2mathml to quickly achieve results, and is not a universal solution for all.
This article was provided an overview of the ways to solve the problem quickly display LaTeX in programs .NET. If you are interested in details, I will be glad to explain.
Комментарии
Отправить комментарий