issue123:tutoriel1
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue123:tutoriel1 [2017/07/29 10:45] – créée d52fr | issue123:tutoriel1 [2017/08/08 14:51] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | In my last article, I explained Zim Wiki’s ability to be a shortcut for creating LaTeX documents, or at least creating text that can be easily imported into a LaTeX document. Importing text created in another program is not as straightforward as we may think. One issue is the way LaTeX handles characters such as ampersand, quotation marks and dollar signs. Cutting and pasting from a text editor or web page straight into a LaTeX editor can cause some strange characters to appear in your PDF file if your text includes symbols to which LaTeX takes exception. This creates a lot of grunt work that can be eliminated with applications that are configured to handle the exceptions and deal with them for you. | + | **In my last article, I explained Zim Wiki’s ability to be a shortcut for creating LaTeX documents, or at least creating text that can be easily imported into a LaTeX document. Importing text created in another program is not as straightforward as we may think. One issue is the way LaTeX handles characters such as ampersand, quotation marks and dollar signs. Cutting and pasting from a text editor or web page straight into a LaTeX editor can cause some strange characters to appear in your PDF file if your text includes symbols to which LaTeX takes exception. This creates a lot of grunt work that can be eliminated with applications that are configured to handle the exceptions and deal with them for you. |
- | Two programs available in your Ubuntu repositories are Pandoc and Writer2Latex. You may install them via Synaptic or the command-line. If you are composing LaTeX documents on the Raspberry Pi, please be aware that Writer2Latex will add 106 MB of files to your disk. This may or may not be a problem, depending on the size of your SD card. | + | Two programs available in your Ubuntu repositories are Pandoc and Writer2Latex. You may install them via Synaptic or the command-line. If you are composing LaTeX documents on the Raspberry Pi, please be aware that Writer2Latex will add 106 MB of files to your disk. This may or may not be a problem, depending on the size of your SD card.** |
- | Pandoc | + | Dans mon dernier article, j'ai expliqué comment le Zim Wiki pouvait servir de raccourci pour la création de documents LaTeX, ou, du moins, la création de texte qui peut être facilement importé dans un document LaTeX. L' |
+ | |||
+ | Deux programmes, Pandoc et Writer2Latex, | ||
+ | |||
+ | **Pandoc | ||
- | I am impressed with what Pandoc will do, especially with HTML files. Pandoc processed an HTML file that was mostly a table and did it quite well. I did have to edit my .tex file, though. First I had to add “\usepackage{longtable}” to my preamble, and I had to set my page margins with “\usepackage[left=0.50cm, | + | I am impressed with what Pandoc will do, especially with HTML files. Pandoc processed an HTML file that was mostly a table and did it quite well. I did have to edit my .tex file, though. First I had to add “\usepackage{longtable}” to my preamble, and I had to set my page margins with “\usepackage[left=0.50cm, |
In this conversion of an HTML table, Pandoc placed some code into the document that my LaTeX editor did not like. We see them in the form of the nasty error messages that pop up during the compile and view PDF stage. There are two things you can do: | In this conversion of an HTML table, Pandoc placed some code into the document that my LaTeX editor did not like. We see them in the form of the nasty error messages that pop up during the compile and view PDF stage. There are two things you can do: | ||
• Search on Google for the error and you may find a solution. Often this can be as easy as adding another line or two to your preamble. | • Search on Google for the error and you may find a solution. Often this can be as easy as adding another line or two to your preamble. | ||
- | • Comment out the offending line of code with a “%” at the beginning of the line. | + | • Comment out the offending line of code with a “%” at the beginning of the line.** |
- | Pandoc is a command-line application but it is user-friendly. An example of a basic command is: | + | Pandoc |
+ | |||
+ | Ce que Pandoc fera, surtout avec des fichiers HTML, m'a impressionné. Pandoc a traité un fichier HTML qui était pour la plus grande part une table et l'a fait très bien. Il m'a fallu toutefois éditer le fichier texte. D' | ||
+ | |||
+ | Lors de cette conversion d'une table en HTML, Pandoc a mis du code dans le document que mon éditeur LaTeX n' | ||
+ | • Recherchez l' | ||
+ | • Commenter la ligne de code qui fâche avec un « % » au début de la ligne. | ||
+ | |||
+ | **Pandoc is a command-line application but it is user-friendly. An example of a basic command is: | ||
pandoc -s -o filename.tex filename.odt | pandoc -s -o filename.tex filename.odt | ||
Ligne 19: | Ligne 31: | ||
More information can be found at the Pandoc website: http:// | More information can be found at the Pandoc website: http:// | ||
- | As good as Pandoc is, it has its limitations, | + | As good as Pandoc is, it has its limitations, |
- | Writer2LaTeX | + | Pandoc est une application en ligne de commande, mais elle est conviviale. Voici une commande de base : |
+ | |||
+ | pandoc -s -o filename.tex filename.odt | ||
+ | |||
+ | filename.tex est le nom du fichier LaTex de sortie ; filename.odt est le fichier d' | ||
+ | |||
+ | Vous trouverez plus d' | ||
+ | |||
+ | Aussi bonne soit-elle, à ma connaissance, | ||
+ | |||
+ | **Writer2LaTeX | ||
The website http:// | The website http:// | ||
Ligne 27: | Ligne 49: | ||
w2l filename.odt filename.tex. | w2l filename.odt filename.tex. | ||
- | You may have noticed that the files are in the reverse order of the command you would use for Pandoc. You type in the name of the input file first and then the output tex file. I have tried it on an .odt file with a table in it and it worked like a charm. Moreover, Writer2LaTeX can handle some fairly complex .odt documents. | + | You may have noticed that the files are in the reverse order of the command you would use for Pandoc. You type in the name of the input file first and then the output tex file. I have tried it on an .odt file with a table in it and it worked like a charm. Moreover, Writer2LaTeX can handle some fairly complex .odt documents.** |
- | The manual for writer2latex is a whopping eighty-four pages long. There is lots to sink your teeth into, and it’s well worth the time to take a look at it so that you have an idea of what can be done. | + | Writer2LaTeX |
+ | |||
+ | Le site Web http:// | ||
+ | |||
+ | w2l filename.odt filename.tex | ||
+ | |||
+ | Vous pourriez avoir remarqué que l' | ||
+ | |||
+ | |||
+ | **The manual for writer2latex is a whopping eighty-four pages long. There is lots to sink your teeth into, and it’s well worth the time to take a look at it so that you have an idea of what can be done. | ||
You will also find information on these other applications: | You will also find information on these other applications: | ||
Ligne 36: | Ligne 67: | ||
Resources: | Resources: | ||
+ | Writer2LaTeX: | ||
+ | |||
+ | Pandoc: http:// | ||
+ | |||
+ | Avec quatre-vingt-quatre pages, le manuel de writer2latex est énorme. Il y a beaucoup de choses à absorber, mais ça vaut le coup de prendre le temps de l' | ||
+ | |||
+ | Vous y trouverez aussi des informations sur ces autres applications : Writer2BibTeX, | ||
+ | |||
+ | La bonne nouvelle est que, quand vous voulez importer des données dans LaTeX à partir d' | ||
+ | |||
+ | Ressources : | ||
Writer2LaTeX: | Writer2LaTeX: | ||
Pandoc: http:// | Pandoc: http:// | ||
+ |
issue123/tutoriel1.1501317942.txt.gz · Dernière modification : 2017/07/29 10:45 de d52fr