Outils pour utilisateurs

Outils du site


issue119:tuto1

Ceci est une ancienne révision du document !


LaTeX can be found in the most surprising places. It is not only the ability to compose in LaTeX that can be found, it is the ability to export data in a *.tex file which is then compiled to produce the pretty .PDF file. The financial package Grisbi can do that, as well as Gnumeric. It is not uncommon. I have seen others, they just do not come to mind right now. However the programs export only the .tex file, we need the rest of the LaTeX packages to compile.

The ability to do a .tex export of files can be found in the desktop Wiki application called Zim. You can find Zim in the Ubuntu repositories. I found Zim one day when I was just skimming through the lists of software as they are found in the Synaptic Package Manager, and I thought that Zim looked interesting. Here is the description from Synaptic:

“Zim is a graphical text editor used to maintain a collection of wiki pages.

“Each page can contain links to other pages, simple formatting, and inline images. Pages are stored in a folder structure, like in an outliner, and can have attachments. Creating a new page is as easy as linking to a nonexistent page.

“All data is stored in plain text files, with wiki formatting. Various plugins provide additional functionality, like a task list manager, an equation editor, a tray icon, and support for version control.

“Zim can be used to: * Keep an archive of notes * Take notes during meetings or lectures * Organize task lists * Draft blog entries and emails * Do brainstorming’’

So, all that I was expecting was a text editor that would permit me to link to my files. An editor and some kind of organiser. File format exporting in LaTeX, HTML, MHTML, RST or Markdown is not mentioned, this is a bonus that I found later. In fact, the more I looked into Zim, I realised that this application was much more than as advertised in Synaptic.

Zim looks like any other text editor, with text formatting such as bold, italic, underline and strike-through. The top menu bar also has a link icon, an attachment icon, and a calendar icon that will start a journal section on your Index column as soon as you click on a day in the calendar.

As for page formatting, click on the Format menu and we find just about everything we need for everyday documents and more:

Zim is full of surprises, and, hang on, I will get to LaTeX in a few minutes. Under the Edit menu we find Templates, where we can select a template to use for the way Zim looks when you open it, and a choice of six HTML templates. We can choose from three LaTeX document styles, default Markdown, and RST. But wait! There is more! In the Templates menu there is a link to get more templates online at: https://github.com/jaap-karssenberg/zim-wiki/wiki/Templates.

Another Pleasant Surprise: Third-party html export templates

There are export templates that will allow you to export your files as a complete Wiki in HTML format. This feature enables us to run an instant website on something as small as a Raspberry Pi. The following is a cut-and-paste from the Zim web site:

Eight-Five-Zero

A template for exporting content from the Zim program as a website. It is designed to be responsive for viewing in all devices. Specifically, it is designed as “mobile-first,” (dropping navigation to the bottom of the screen), and will enable right-side navigation only if the device is of significant width and in landscape mode. Available on github

Ecodiv-responsive

Template to export your Zim notebook as a responsive/adaptive website that can be viewed in desktop and mobile devices alike. You can find more information, or download the template, on this github page. For an example, see http://ecodiv.org/ and http://notebook.ecodiv.org/

Ecodiv-mobile

Template to export your Zim notebook as a website with mobile theme. Build with jquerymobile to create a website with a focus on mobile devices, but which will also look good on the desktop. The template offers some pointers to customize the design to fit the user’s need. For more information, or to download the template, go to the github page.

LaTeX Exporting

Yes it is about time I got to this. Here is a short entry I made to Zim:

To export this as a LaTeX file: • Click on File —→Export—→Single Page • Forward • Under Format select LaTeX • Choose a template • Forward • Give the output file a name and/or select the directory it is to go into • Click OK

This is the file I created under the “Part” template:

+ \part{Home} \chapter{Home} Created Wednesday 31 August 2016 \chapter{Hello World} \textbf{Some Thoughts on Software Freedom}

There are some things that we have to keep in mind about Free Software.

\begin{enumerate}[1] \item “Free software” means software that respects users' freedom and community. Roughly, it means that the users have the freedom to run, copy, distribute, study, change and improve the software. \textbf{Thus, “free software” is a matter of liberty, not price.} \item In computer history, take Richard Stallman, Linus Torvalds, and Tim Berners-Lee out of the equation \emph{and the .dot com billionaires don't happen.} \item At this very moment you are benefiting from the efforts of the three people listed above. Keep in mind that there are many more people who have contributed to free software. \end{enumerate}

Copy the .tex file in whole or part into your LaTeX editor, You will need to provide the preamble. There may be gremlins and you may have to make some edits such as: • Remove the [1] from the first line. • Replace any “ or ‘ using your LaTeX editor. • Any words that have capitals in the middle of them are treated by Zim as a link. So a word like CanLii will have to be broken up (Can Lii) and the code for the link removed.

Take care of those gremlins and you should have a very nice .PDF file with all of your formatting intact. Your Latex editor will alert you of any changes like this that need to be made.

I would not want to use Zim as my main LaTeX editor, but it is nice to know that after you have done some work within Zim, you have an option to export in a LaTeX document format that can be imported into an existing document or be a LaTeX document on its own.

I will be using Zim to create an internal website at the law library where I work. Zim automatically saves any edits that you make to the file. I like this feature – I can’t forget to save before closing. To date, it is the best organiser, note taker, journal creator, and backup LaTeX editor, that I have found.

Zim is the creation of Jaap Karssenberg (jaap.karssenberg@gmail.com) Thank you Jaap.

This article was written using Zim, LibreOffice, and Shutter on a Raspberry Pi3.

issue119/tuto1.1491238757.txt.gz · Dernière modification : 2017/04/03 18:59 de auntiee