Tex/Latex, the world’s standard tool for writing papers, and Mathjax, the web math display tool

Digital Transformation Machine Learning Artificial Intelligence Paper/Report Writing  Life Tips & Miscellaneous Navigation of this blog 

Tex/Latex, the world’s standard tool for writing papers, and Mathjax, a web formula display tool

In the reprinted issue of the computer science magazine “bit” (No. 338, April 1997), which was previously referred to in the article “Artificial Anencephaly Talks about Zen and Buddabodhi,” there is an article titled “Round Table Talk: Interview with Dr. Knuth.

Donald E. Knuth, a professor emeritus at Stanford University at the time, was a driving force in early computer science, analyzing algorithms, designing programming languages, and developing information processing techniques, and one of his books was “The Art of Computer Programming,” a thick book in four volumes (apparently there are still planned publications) with 1300 pages per volume in the Japanese translation.

vol1, vol4B, vol4A, vol3

This will be a book on computer programming that provides a thorough explanation of various algorithms, going into their background and history.

What is amazing about Professor Knuth is not only his vast knowledge of computer science, but also the fact that he was not satisfied with the final product of the book and built his own typesetting system, called TEX, and wrote the book using it.

TEX is an open source system that is OS-independent and can automatically process and express complex mathematical formulas that are essential for academic papers. For example, the display of this mathematical expression can be written as follows

-bpm sqrt{b^2 -4ac} over 2a

The following is what will be displayed.

{-bpm {sqrt {b^{2}-4ac}} over 2a}

LaTex is a further extension of TEX. LaTex, developed by Leslie Lamport, is an electronic typesetting software that incorporates a macro package into TEX and allows for easier typesetting than the standalone TEX.

Since TEX and LaTex were strong in expressing mathematical expressions and were simple and easy-to-use electronic typesetting software at the time, they were used as tools for writing papers, and they continue to be used as tools for writing papers today.

The flow of document creation (data conversion) using TEX and LaTex is shown in the figure below.

The above flow is basically a text file (source code) that arrives with a .tex or .latex extension and is created by compiling it into a viewing file such as DVI or PDF using a text editor.

Latex can be used in various environments. For example, “LatexTools” plugin exists in “Sublimetext” as described in “Overview and Installation of Sublimetext“, which can be installed to build Latex from text editor.

The procedure is as follows

  1. Download SublimeText from the official website
  2. Select “Command Pallet” from “Tools” in the top menu (or press Ctrl+p).
  3. Enter search keywords such as “Package install” in the text input box, and “Package Control: Install Package” will appear among the options.
  4. If you enter “Latex” in the text input box, plug-ins related to Latex will be displayed. Select “LatexTools” to start the download.
  5. When the download is successfully completed, Latex will appear in “Tools”→”Build System”.
  6. (Optional) Select “Sublime” menu -> “Preferences” -> “Package Settings” -> “LatexTools” -> “Setting User” to create a configuration file. (An example is shown below)
  7. (Optional) Modify the section “build_setting” in “Build engin settings” (example shown below)
  8. Create a file on sublime with “.tex” as the extension, and build it with “tools” → “Build System” → Latex (or ctrl+b).
  9. Create a pdf of the built file.

<Example of configuration file in windows>

"windows": {
    // Path used when invoking tex & friends; "" is fine for MiKTeX
    // For TeXlive 2011 (or other years) use
    // "texpath" : "C:\\texlive\\2011\\bin\\win32;$PATH",
    "texpath" : "",
    // TeX distro: "miktex" or "texlive"
    "distro" : "miktex",
    // Command to invoke Sumatra. If blank, "SumatraPDF.exe" is used (it has to be on your PATH)
    "sumatra": "${SumatraPDF_path}\\SumatraPDFPortable.exe",
    // Command to invoke Sublime Text. Used if the keep_focus toggle is true.
    // If blank, "subl.exe" or "sublime_text.exe" will be used.
    "sublime_executable": "",
    // how long (in seconds) to wait after the jump_to_pdf command completes
    // before switching focus back to Sublime Text. This may need to be
    // adjusted depending on your machine and configuration.
    "keep_focus_delay": 0.5
},

<Example of setting file in windows>

"builder_settings" : {

    // General settings:
    // See README or third-party documentation

    "command" : ["latexmk", "-cd",
                "-e", "$latex = 'uplatex %O -interaction=nonstopmode -synctex=1 %S'",
                "-e", "$biber = 'biber %O --bblencoding=utf8 -u -U --output_safechars %B'",
                "-e", "$bibtex = 'upbibtex %O %B'",
                "-e", "$makeindex = 'makeindex %O -o %D %S'",
                "-e", "$dvipdf = 'dvipdfmx %O -o %D %S'",
                "-f", "-norc", "-gg", "-pdfdvi"],

    // (built-ins): true shows the log of each command in the output panel
    "display_log" : false,

    // Platform-specific settings:
    "osx" : {
        // See README or third-party documentation
    },

    "windows" : {
        // See README or third-party documentation
    },

    "linux" : {
        // See README or third-party documentation
    }
},

もう少し

If you want an easier way to handle this, you can also use Cloud Latex. This is a free web browser-based tool provided by Acaric, and after initial registration

It will be a tool that allows you to create while checking previews.

For more information on creating documents using Cloud LaTex, please refer to the following “Super Introduction to Latex: How to Create Science Documents from Scratch” if you are interested.

For information on how to use Latex formatting, etc., see “Introduction to LaTeX – TeX Wiki” and “Introduction to Tex/Latex” (the latter is a good place to start for absolute beginners). For a dictionary of special characters, see “Special Characters and Symbols in Latex“.

For your information, Hello.tex looks like this

% File name: test1.tex
documentclass{article}
begin{document}
Hello, TeX \
Hello, LaTeX \
end{document}

In the case of TEX, the beginning of a sentence is simplified to “b,” but now it is more easily understood as “begin{documnet}.

MathJax is a tool for displaying mathematical expressions on the web using this Latex format.

MathJax is a cross-browser JavaScript library released as open source software under the Apache License that displays mathematical expressions written in MathML, LaTeX, and ASCIIMathML in a web browser.

It can render mathematical expressions in all major browsers, including Internet Explorer 6, Firefox 3, Google Chrome 0.3, Safari 2.0, Opera 9.5, iPhone/iPad Safari, and Android browsers. It will be brag-in ready on many popular web platforms, including MediaWiki, Drupal, WordPress, Joomla!

As for MathJax dictionaries, “Easy Copy MathJax” is easy to use with a simple user interface.

 

コメント

タイトルとURLをコピーしました