Posts

Showing posts with the label LaTeX

Study on an example of integration between Python and LaTeX

Image
Table of Contents 1. Subject of this article. 2. Description of the steps without using Python. 3. Python file content. 4. Program analysis. 5. Source in LaTeX generated by Python. 6. To try the program. 1. Subject of this article. I am not a computer scientist but I have been using LaTeX for over ten years to write court documents. Only a few months ago I started to follow some tutorials on programming with Python. I immediately wondered if LaTeX and Python could interact with each other. So I asked Gemini to generate a source in Python for that purpose. The structure of the program in Python is as follows: an array consisting of 5 columns and 10 rows of random numbers is generated, and a LaTeX language document containing the newly generated array is created. Although the code is generated by Gemini, the observations and analysis are my own. The study was fully conducted on GNU/Linux operating systems , mostly Arch Linux. 2. Description ...

LaTeX with Sublime Text and LaTeXools.

Image
ABSTRACT An article illustrating the use of Sublime Text for creating complex documents, with a focus on legal briefs written in LaTeX. INDEX 1. This article is about LaTeX and Sublime Text. 2. The bad news: LaTeXTools is out of date. 3. Placeholders and Variables. 4. Multiple cursors. 5. Paste lists of documents copied from folders. 6. Create and use bookmarks. 7. Persistence of open documents. 8. Snippet for the creation of Sections. 9. A useful little “script”. 10. Compilation, viewers and other commands. 11. Conclusion. 1. This article is about LaTeX and Sublime Text. The outstanding typographic quality of LaTeX cannot be doubted. To manage complex documents in LaTeX, however, one needs to use editors that allow one to quickly perform a number of operations including: Quickly jumping between the titles of the various levels of sections. Quickly compile variables and other related data by jumping between preset bookmarks, Quickly compil...

Automatic generation of hyperlinks in LaTeX environment, using Vim's Regular Expressions, between PDF documents.

Image
Vim is an editor with endless capabilities. It can also generate hyperlinks in LaTeX language to other locally stored documents, thanks to its built-in Regular Expressions. For lawyers, this means linking a legal document with its related evidentiary materials. This is the analysis of the procedure. 1. Subject of this article. 2. Main document configuration. 3. RegEx formula for automatic link generation. 4. Explanation of the RegEx formula. 5. Management of "underline character". 6. Links within the text 6.1. "Indirect linkage" solution: 6.2. "Direct link" solution: 1. Subject of this article. Sometimes it is necessary to include in a main PDF document a list of documents to be retrieved with specific hyperlinks dedicated to each item in the list. For example: judicial acts with reference to related document productions. In this article I deal with the automatic generation of hyperlinks in LaTeX by Vim using...

LaTeX: some considerations on font size

Image
1 LaTeX: class definition, standard classes and font sizes. 2 What are the font-sizing commands in LaTeX? 3 When are character sizing commands used in LaTeX? 4 How do you use the character sizing commands in LaTeX? 5 The alternative classes of the KOMA-Script project. 1 LaTeX: class definition, standard classes and font sizes. In LaTeX, the term “class” refers to a predefined or custom document type that determines the general layout , style, and options available for formatting a document. The classes in LaTeX are identified by the file extension .cls and provide the basic instructions for document structure. The main features of a class in LaTeX relate to the page format as well as the style of the title, of the sections and text. The standard LaTeX classes are article , report , book and letter . To use a class in LaTeX, it is necessary to declare it in the preamble of the document using the command ...

About LaTeX, standalone, PDF and PNG

Image
1 LaTeX and the document format 2 Exporting documents from PDF to PNG. 3 Exporting images from PDF to PNG. 4 Examples 1 LaTeX and the document format As, of course, you all already know (:smiley:), LaTeX is a language dedicated to the typesetting of documents with state-of-the-art quality. It is, therefore, unnecessary to note that the basics of LaTeX can be learned in about 30 minutes, as illustrated in this page . For the purposes of this article, it is sufficient to recall that sources in LaTeX are composed of a preliminary part, also called the preamble , and the document with the contents. The format of documents generated by LaTeX is defined at the beginning of the preamble with the command \documentclass . The (probably) most widely used classes, such as article , report and book , produce documents in formats with predetermined sizes, specified by specific options, such as A4 (...

Converting documents from the .tex format of LaTeX to the .docx format of MS Word

Image
Table of Contents 1. Preface on LaTeX and MS Word 2. Conversion through htlatex . 3. Conversion through Pandoc 4. Document export examples 1. Preface on LaTeX and MS Word I have been using LaTeX for about thirty years to write documents of all kinds: court documents, reports, research, projects and more. After overcoming the challenging initial learning curve, therefore, it is very unlikely that one will go back to "traditional" word processing systems: the extraordinary typographic quality and considerable time savings have become indispensable. Sometimes, however, it is necessary to exchange material written in LaTeX to friends and colleagues who have not yet had the opportunity to appreciate it. In such cases, it is necessary to convert the text into readable word processing software format. Mainly I am referring to the .docx format, typical of MS Word but also readable by other similar systems, such as LibreOffice Writer that I used for this...

Vim, VimTex: environments and commands in LaTeX

Image
Vim, LaTeX and VimTex: surround commands Table of Contents 1. A smart system for writing 2. VimTex Built-in functions for environments and commands 3. Create a surround function in VimTex based upon surround.vim plugin 1. A smart system for writing Vim is a great editing tool. LaTeX is a "State of the Art" typesetting system. Vim and LaTeX together make a powerful writing system, but an add-on is needed to relate them. VimTex provides exactly that target by relating Vim to LaTeX, and it does its job very well. So Vim and VimTex is a smart system for every kind of writer in LaTeX. The topic is vast and certainly cannot be contained in a short post like this one. In this article, I simply cover functions for managing environments and commands. 2. VimTex Built-in functions for environments and commands I assume that those who use LaTeX already know the difference between commands and environments. VimTeX ha...

Jumping between matching pairs of characters in Vim and Emacs

It is very useful to jump through corresponding pairs of characters, such as parentheses or tags, when coding or writing in a markup language such as HTML, Markdown or LaTeX. Both Vim and Emacs have dedicated commands for this purpose. To jump between matching pairs using Vim Vim uses a “single character” command to jump to the nearest pairs of corresponding characters and to place the cursor into the closing one: % . For instance: let’s assume that the cursor is placed at the beginning of the following sentence: If you want to write your own use the contents of [syntax-ppss (point)] When you press % your cursor jumps to the corresponding closing square bracket. If you press % another time the cursor jumps back to the opening corresponding square bracket. If you place the cursor everywhere inside the square brackets and press % it jumps to the closing round bracket. Naturally, if you press another time the % command the cursor jumps to the opening corresponding rou...