background preloader

LaTeX

Facebook Twitter

LaTeX/Packages/Listings. There are many packages providing code listings and highlighting, below are most popular: listings : It is very useful and rich in functionality. You can insert the code directly as well as provide the file name containing code. (It should not be confused with Algorithms and Pseudocode).minted: It uses the external Python library Pygments for code highlighting, which as of February 2021 boasts over 537 supported languages and text formats. As the package relies on external Python code, the setup require a few more steps than a usual LaTeX package, so please have a look at their GitHub repo and their manual. The main use of the listings package is to include the source code of any programming language within your document in a well formatted fashion. The listings package supports highlighting of all the most common languages and it is highly customizable.

To use the package, you need to include \usepackage{listings} in the preamble of the latex document and define (\usepackge{listings}). LaTeX/Advanced Mathematics. This page outlines some more advanced uses of mathematics markup using LaTeX. In particular it makes heavy use of the AMS-LaTeX packages supplied by the American Mathematical Society. Equation numbering[edit] The equation environment automatically numbers your equation: You can also use the \label and \ref (or \eqref from the amsmath package) commands to label and reference equations, respectively. And \eqref results in Further information is provided in the labels and cross-referencing chapter. To have the enumeration follow from your section or subsection heading, you must use the amsmath package or use AMS class documents. To the preamble to get enumeration at the section level or to have the enumeration go to the subsection level.

To remove the duplicate dot, add the following command immediately after \numberwithin{equation}{section}: For a numbering scheme using \numberwithin{equation}{subsection}, use: in the preamble of the document. Subordinate equation numbering[edit] and for harpoons: LaTeX: Fancy Stuff. LaTeX/Introduction. What is TeX? [edit] TeX is a low-level markup and programming language created by Donald Knuth to typeset documents attractively and consistently. Knuth started writing the TeX typesetting engine in 1977 to explore the potential of the digital printing equipment that was beginning to infiltrate the publishing industry at that time, especially in the hope that he could reverse the trend of deteriorating typographical quality that he saw affecting his own books and articles. With the release of 8-bit character support in 1989, TeX development has been essentially frozen with only bug fixes released periodically. TeX is a programming language in the sense that it supports the if-else construct: you can make calculations with it (that are performed while compiling the document), etc., but you would find it very hard to do anything else but typesetting with it.

The fine control TeX offers over document structure and formatting makes it a powerful—and formidable—tool. What is LaTeX? In LaTeX: Www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-letter.pdf. How to Convert a JPEG to a Vector Image. Easylist-doc. Pygments — Python syntax highlighter. LaTeX » Subscript And Superscript In Text Mode. Using SageTeX — Sage Tutorial v4.5.3. The SageTeX package allows you to embed the results of Sage computations into a LaTeX document. It comes standard with Sage. To use it, you will need to “install” it into your local TeX system; here “install” means copying a single file. See Installation in this tutorial and the “Make SageTeX known to TeX” section of the Sage installation guide (this link should take you to a local copy of the installation guide) for more information on doing that. Here is a very brief example of using SageTeX.

To see how SageTeX works, follow the directions for installing SageTeX (in Installation) and copy the following text into a file named, say, st_example.tex: Warning The text below will have several errors about unknown control sequences if you are viewing this in the “live” help. Run LaTeX on st_example.tex as usual. Package sagetex Warning: Graphics file sage-plots-for-st_example.tex/plot-0.eps on page 1 does not exist. The different macros used above should be pretty easy to understand.