Posts

Showing posts with the label OrgMode

Converting from Org Mode to Markdown GFM

Image
Converting from Org Mode to Markdown GFM Table of Contents 1. Does it make sense to talk about Org Mode instead of Markdown? 2. The export problems 3. Some examples to make it clearer 4. The solution: export from Org-Mode to Markdown via Pandoc with GFM option. 5. The special case of exporting code blocks. 1. Does it make sense to talk about Org Mode instead of Markdown? Why should I use Org-Mode to write articles to be published network in Markdown format? Wouldn't it be more convenient to write the articles directly in Markdown? The question is more than justified and the answer is not obvious. First, let me remind you that Org-Mode is a mode of GNU/Emacs. While there are various plugins for other editors, including Vim, none of them can match the outstanding efficiency of the original system. So: to write in Org-Mode, it's best to must use GNU/Emacs. Org-Mode is a complete and extremely powerful structured writing system, alth...

Variables in LaTeX documents exported from Emacs Org Mode

Image
The usual introduction to Emacs, Org Mode and LaTeX This is the usual introduction to Emacs, Org Mode and LaTeX: if you already know everything you can skip it. Org Mode under GNU Emacs is a very powerful tool for organizing ideas. An excellent features of this tool is its ability to directly export documents from Org Mode to LaTeX , the absolute excellence for pagination, as well as to other languages such as Markdown and HTML. When exporting to LaTeX, you can add commands in the preliminary part of the documento in Org Mode, to customize the output in the final PDF document. Variables are useful commands that allow LaTeX to automatically replace placeholders fields with names, numerical strings or any other combination of text and numbers. You can find information on this topic in my previous article . In the actual article I suggest some solutions for generating variables when exporting documents from Org Mode to LaTeX. Preamble section in Org Mode for essential...

Table Of Contents (TOC), from Org-Mode to Jekyll

Image
My Table of Contents What’s a Table Of Contents and why using it? Emacs Org-Mode and the autogenerated TOC Minimal-Mistakes over Jekyll provides an automatic TOC What’s a Table Of Contents and why using it? A Table Of Contents (“TOC”) is an index of a document’s content. In the world wide web environment it’s usually a list of chapter and sub-chapter headings in the online articles. Why using it? Obviously: the TOC can give you an overview of the documents’ structure, so you can quickly jump where you’re interested, without spending time reading the rest of the document. As a not-developer writer in GitHub of some posts, I’d like a simple and fast system to get the TOC of my articles. Emacs Org-Mode and the autogenerated TOC An excellent resource to generate a TOC is offered by Emacs with its extraordinary Org-Mode : if you write structure...

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...