Posts

Showing posts from March, 2019

Emacs Org Mode code blocks with and without colors

Image
Emacs Org Mode code blocks with and without colors Table of Contents 1. Coloring the code blocks in Emacs Org Mode 2. How to install the htmlize library 3. Colored Code Examples 3.1. First example: HTML code with and without colored syntax. 3.2. Second example: LaTeX code with and without colored syntax. 3.3. Third example: Ruby code with and without colored syntax. Figure 1: Photo by Sharon Pittaway on Unsplash 1 Coloring the code blocks in Emacs Org Mode Emacs Org Mode is an excellent environment to develop any kind of argument. If you need to display blocks of source codes in Org Mode, it may be very useful to know that there are two basic versions for displaying them. The first one is the monochromatic visualisation mode. In order to obtain this visualisation you must just wrap your code block into the tags #+BEGIN_SRC and #+END_SRC . This is already a good way of displaying source codes. But you can get a prettier look by

Square Brackets Motion in Markdown and LaTeX in Vim environment

Image
Foreword on Markdown, LaTeX and Vim Markdown and LaTeX are awesome markup languages, expecially when you use them in creating and developing structured texts. I assume that the reader already has at least a bit knowledge of them. A structured text is a text subdivided into chapters, sections, or subsections, etc. The more complex the text, the more those two languages are useful. At the same time Vim is an excellent integrated environment for writing in Markdown and LaTeX , available in almost every operating system. One of Vim most useful features is its ability to quickly jump through the sections of structured texts. Square brackets can be very useful for Vim jumping through the sections of structured texts. But be careful: the same combinations of square brackets can have different effects in Markdown and LaTeX for Vim. Here is a brief comparative overview of the square brackets jumping movements in Markdown and LaTeX in a Vim (and GVim ) environment. Square b