LaTeX/Installation : Différence entre versions

De LaTeX
Aller à : navigation, rechercher
m (Calc2LaTeX installation on OpenOffice.org 2.0)
 
(16 révisions intermédiaires par le même utilisateur non affichées)
Ligne 32 : Ligne 32 :
  
 
If you are willing to use Emacs for your TeX editor, you will have to download Aquamacs for OS/X users. On Linux, you need to download gnu-emacs as well as AucTeX which are in two separate packages. On Windows, go to http://www.gnu.org/software/auctex/download-for-windows.html and you will able to download AucTeX as well as Emacs.
 
If you are willing to use Emacs for your TeX editor, you will have to download Aquamacs for OS/X users. On Linux, you need to download gnu-emacs as well as AucTeX which are in two separate packages. On Windows, go to http://www.gnu.org/software/auctex/download-for-windows.html and you will able to download AucTeX as well as Emacs.
 +
 +
Just download the Emacs zip (currently version 23.3) first and then extract it on <tt>c:\Program Files\Emacs</tt> by creating an Emacs folder. It will created a tree <tt>c:\Program Files\Emacs\emacs-23.3</tt> of all the emacs distribution. In the directory <tt>c:\Program Files\Emacs\emacs-23.3\bin</tt>, you will find a file named <tt>runemacs.exe</tt>. Right click and create an alias (link) file and then move this link on your desktop or menu bar in order to launch emacs.
 +
 +
Now, unzip the AucTeX zipped file exactly on this emacs-23.3 folder in order to add the AucTeX tree to the emacs tree. In particular a newer <tt>dir</tt> file under the <tt>emac-23.3\info</tt> will supersede the previous file with the same name (accept to overwrite <tt>dir</tt> file).
 +
 +
Launch runemacs and open a tex file. It should work. See [[AucTeX]] for more information.
  
 
== JabReF ==
 
== JabReF ==
Ligne 40 : Ligne 46 :
  
 
Other softwares will be used during the presentation in relation to LaTeX. They are all free softwares. You can dowload them.
 
Other softwares will be used during the presentation in relation to LaTeX. They are all free softwares. You can dowload them.
 +
 +
== OpenOffice and writer2latex ==
 +
If you want to export a Word document into a LaTeX document, a nicer way than copy and paste consists in loading the .doc file in Writer from Openoffice and export it using writer2latex as a LaTeX file.
 +
 +
You can download OpenOffice at http://fr.openoffice.org/about-downloads.html and install the default installation with Java.
 +
 +
Then go to http://writer2latex.sourceforge.net/index12.html#download in order to download ''Writer2LaTeX 1.1.7'' (April 2011) as a zip file. Unzip the file in a temporary folder and click on the file writer2latex.oxt which will open by OpenOffice and install as an extension.
 +
 +
Now you can export a .doc into a .tex file. Amongst the various options, you can use Simple LaTeX, utf-8 encoding as well as xetex for the TeX engine instead of pdftex.
 +
[[Fichier:writer2latex-exmaple.png|right|400px|Writer2latex: default, Xetex, no mulitlingual, separate folder for images.]]
 +
 +
For non well structured documents you will find that Writer2LaTeX uses the principle garbage in – garbage out!
 +
If you wish to simply get TeXed output of your Word document ie without the purpose of reworking on the LaTeX code, you can use the default layout, as shown on the figure.
 +
 +
But for a well structured Word document, writer2latex (recent version only) simplifies the porting by creating images (png files) for most of the figures.
 +
 +
You need Emacs or any editor to clean the LaTeX file.
 +
 +
===Remarks concerning this wiki (wiki publisher) ===
 +
If you want to improve this wiki and are used to work with Word, you can export from Word or Libre Office to a wiki source code, using the Sun wiki publisher extensions that you can get [http://extensions.services.openoffice.org/project/wikipublisher there]. Then under Writer, you can export to a file using the wiki format (you can also send to a wiki server, but it useful only if you do it regularly). A wiki text is supposed to be simpler to enter that html. It is more modern that LaTeX.
 +
 +
If you want to export a table into a wiki, copy paste it into a Writer new document by using html special paste (right click). And then export to wiki format. Then you can paste your wiki table into a wiki server like this one.
 +
 +
==Calc2LaTeX==
 +
 +
Calc2LaTeX lets you select cells in your spreadsheets and output code for LaTeX tables. It is very very helpful but needs some installation.
 +
 +
 +
=== Calc2LaTeX installation on OpenOffice.org 2.0 ===
 +
 +
# Before installing Calc2LaTeX, you need to download a zip file from http://calc2latex.sourceforge.net and to extract its content on any temporary directory:
 +
#Open OpenOffice Calc or (Libre Office) and click <tt>Tools</tt>=><tt>Macros</tt>=><tt>Organize Macros</tt> => <tt>OpenOffice.org Basic...</tt>
 +
:[[Image:calc2latexinstall.jpg|frame|right|400px]]
 +
#You will see 'OpenOffice.org Basic Macros' dialog box. Select 'My Macros' and push 'Organizer' button
 +
:[[Fichier:calc2latex2.jpg|frame|right|400px]]
 +
# Click 'Libraries' tab, and confirm that 'My Macros & Dialogs' is selected on the list of 'Location.' (If not, select it.)
 +
:And then click <tt>Append</tt> button.[[Fichier:calc2latex3.jpg|frame|right|400px]]
 +
:[[Fichier:calc2latex3-fr-mac.jpg|frame|right|400px]]
 +
# You will see a file dialog, so select <tt>script.xlb</tt> which you have extracted from the zip file in advance.[[Fichier:calc2latex4.jpg|frame|right|400px]]
 +
 +
You can now use calc2latex to produce LaTeX tables. There is chapter on LaTeX and you will learn how to use calc2latex as well as how to improve the source code output by calc2latex as well as how to simplify it. The following section gives some advices and you can refer to it later.
 +
 +
===Optional steps ===
 +
====Changing the default output encoding to UTF-8 unicode ====
 +
Default settings of Calc2LaTeX are nice except the encoding which is the old West European Latin 1 or ISO-8859-1 code instead of UNICODE (UTF-8). It doesn't really matter if you store the LaTeX code in your clipboard and paste it in your TeX editor because the transformation to the local encoding of your LaTeX file is done on the fly, but if your output is a file, that file will be ISO-8859-1 encoded. And you will have difficulties to mix words from East European languages as well as Russian, Arabic and Asian languages. Older TeX (1982) and even pdfTeX are not able to mix 'naturally' various languages like this wiki is able to do. Only XeTeX as well LuaTeX are able to do it. You are encouraged to use these engines instead of pdfTeX. Don't worry XeTeX and LuaTeX are outputting PDF formats by default and no more the old DVI format.
 +
 +
Thus in order to make UTF-8 the default encoding of Calc2LaTeX (if not set already by a newer version than the current 0.2.4) you can do it during the installation. It is as easy or as difficult as the installation.
 +
 +
Do the previous steps, and then Edit the <tt>Main</tt> macro. [[Fichier:calc2latex-edit-macro.png|frame|right|400px]]
 +
then change ISO-8859-1 to UTF-8 and save.[[Fichier:calc2latex-change-main-macro.png|frame|right|400px]]
 +
 +
==== Adding the macro in a menu bar ====
 +
:Once you verified that the macro is running, it can be more convenient to add it to a menu bar. :Therefore select View => Toolbar => Customize then choose (for example) the <tt>Standard</tt> menu and scroll down to (after "New", "Open", "Save", "Save as" etc.) "Export to pdf" and click <tt>Add</tt>. :Then select OpenOffice Macros, and Calc2latex (twice) in order to attach the <tt>Main</tt> subroutine to the menu bar. [[Fichier:calc2latex-add-to-menubar.png|thumb|right|400px]]
 +
:In a second step, instead of <tt>Add</tt> you can click on <tt>Modify</tt> in order to rename the name of the macro to be displayed by "Selection to LaTeX table" (or similar) instead of "Main".
 +
 +
:At last, you can add an icon such as this one [[Fichier:latex-table.png]] (right-click and save the image on your hard disk) by clicking on import [[Fichier:calc2latex-add-icon.png|frame|right|400px]]
 +
and import
 +
[[Fichier:calc2latex-import-icon.png|frame|right|400px]]
 +
then it will display like this and after selecting contiguous cells you can click and the new icon.
 +
[[Fichier:calc2latex-show-latex-icon.png|frame|right|400px]]
 +
 
== R ==
 
== R ==
 
== Gnuplot (***)==
 
== Gnuplot (***)==
Ligne 48 : Ligne 115 :
  
 
== IPE 7 (**)==
 
== IPE 7 (**)==
 +
 +
See the wiki specific to ipe users http://lamut.informatik.uni-wuerzburg.de/mediawiki/ipe7 as well as the official site http://ipe7.sourceforge.net/ and documentation at http://ipe7.sourceforge.net/manual/manual.pdf .
 +
 +
For OS/X you can get an Ipe.app since version 7.1.1
 +
 
== Geogebra (**)==
 
== Geogebra (**)==
  
 
   
 
   
 
  
 
<noinclude>
 
<noinclude>
 
{{LaTeX/Bottom||Introduction}}
 
{{LaTeX/Bottom||Introduction}}
 
</noinclude>
 
</noinclude>

Version actuelle en date du 18 mars 2014 à 07:55

TeXLive

TeXLive2010 is a common distribution for Windows, Mac OS/X and Linux. In May 2011, TeXLive2011 is not out but most of packages, if upgraded from CTAN. The Comprehensive TeX Archive Network is the place to get materials related to the TeX typesetting system. You need to read http://www.tug.org/texlive/doc/texlive-en/texlive-en.html

  • On Mac OS/X, you are supposed to get MaCTeX which includes TeXLive and run the dmg file for installation.
  • On Linux, texlive is installed by default. You may need to install some additional packages.

Windows installation

Insert the DVD and install the distribution. It may take half an hour or more. See http://www.tug.org/texlive/doc/texlive-en/texlive-en.html for Post instal actions. In particular open a terminal and enter the command (copy and paste by right click)

> tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet 

For all 3 OS

Follow the section 3.5 Testing the installation and test the commands: latex, pdflatex, etc. on simple examples.


Once you are finished, you can test the editor TeXworks which works on the 3 operating systems.

Click on the TeXworks icon on your Desktop (Windows installation) and choose File => New from a template. Choose a Beamer template. Run it, look at the pdf, move to another page. Right click somewhere on the pdf text and choose sync to the source code. Your left window will sync with the corresponding tex source line. Move to another section of the source text, right click and choose locate on PDF and the right pane (PDF window) will scroll to the corresponding section.

Test a XeTeX template and run it. If it runs into error because of a missing font, comment the line by adding a % in front of the line and run again. XeTeX is able to run with any font of your OS and not only on "Computer Modern" fonts which are specific to TeX.

Now you have a running mininal running installation.

Gnu-emacs and AucTeX

If you are willing to use Emacs for your TeX editor, you will have to download Aquamacs for OS/X users. On Linux, you need to download gnu-emacs as well as AucTeX which are in two separate packages. On Windows, go to http://www.gnu.org/software/auctex/download-for-windows.html and you will able to download AucTeX as well as Emacs.

Just download the Emacs zip (currently version 23.3) first and then extract it on c:\Program Files\Emacs by creating an Emacs folder. It will created a tree c:\Program Files\Emacs\emacs-23.3 of all the emacs distribution. In the directory c:\Program Files\Emacs\emacs-23.3\bin, you will find a file named runemacs.exe. Right click and create an alias (link) file and then move this link on your desktop or menu bar in order to launch emacs.

Now, unzip the AucTeX zipped file exactly on this emacs-23.3 folder in order to add the AucTeX tree to the emacs tree. In particular a newer dir file under the emac-23.3\info will supersede the previous file with the same name (accept to overwrite dir file).

Launch runemacs and open a tex file. It should work. See AucTeX for more information.

JabReF

JabReF (see http://jabref.sourceforge.net/) is the tool which will be presented for the Bibliography management. Some exercises will be proposed using JabReF. It is very easy to download.

Other softwares

Other softwares will be used during the presentation in relation to LaTeX. They are all free softwares. You can dowload them.

OpenOffice and writer2latex

If you want to export a Word document into a LaTeX document, a nicer way than copy and paste consists in loading the .doc file in Writer from Openoffice and export it using writer2latex as a LaTeX file.

You can download OpenOffice at http://fr.openoffice.org/about-downloads.html and install the default installation with Java.

Then go to http://writer2latex.sourceforge.net/index12.html#download in order to download Writer2LaTeX 1.1.7 (April 2011) as a zip file. Unzip the file in a temporary folder and click on the file writer2latex.oxt which will open by OpenOffice and install as an extension.

Now you can export a .doc into a .tex file. Amongst the various options, you can use Simple LaTeX, utf-8 encoding as well as xetex for the TeX engine instead of pdftex.

Writer2latex: default, Xetex, no mulitlingual, separate folder for images.

For non well structured documents you will find that Writer2LaTeX uses the principle garbage in – garbage out! If you wish to simply get TeXed output of your Word document ie without the purpose of reworking on the LaTeX code, you can use the default layout, as shown on the figure.

But for a well structured Word document, writer2latex (recent version only) simplifies the porting by creating images (png files) for most of the figures.

You need Emacs or any editor to clean the LaTeX file.

Remarks concerning this wiki (wiki publisher)

If you want to improve this wiki and are used to work with Word, you can export from Word or Libre Office to a wiki source code, using the Sun wiki publisher extensions that you can get there. Then under Writer, you can export to a file using the wiki format (you can also send to a wiki server, but it useful only if you do it regularly). A wiki text is supposed to be simpler to enter that html. It is more modern that LaTeX.

If you want to export a table into a wiki, copy paste it into a Writer new document by using html special paste (right click). And then export to wiki format. Then you can paste your wiki table into a wiki server like this one.

Calc2LaTeX

Calc2LaTeX lets you select cells in your spreadsheets and output code for LaTeX tables. It is very very helpful but needs some installation.


Calc2LaTeX installation on OpenOffice.org 2.0

  1. Before installing Calc2LaTeX, you need to download a zip file from http://calc2latex.sourceforge.net and to extract its content on any temporary directory:
  2. Open OpenOffice Calc or (Libre Office) and click Tools=>Macros=>Organize Macros => OpenOffice.org Basic...
Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination
  1. You will see 'OpenOffice.org Basic Macros' dialog box. Select 'My Macros' and push 'Organizer' button
Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination
  1. Click 'Libraries' tab, and confirm that 'My Macros & Dialogs' is selected on the list of 'Location.' (If not, select it.)
And then click Append button.
Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination
Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination
  1. You will see a file dialog, so select script.xlb which you have extracted from the zip file in advance.
    Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination

You can now use calc2latex to produce LaTeX tables. There is chapter on LaTeX and you will learn how to use calc2latex as well as how to improve the source code output by calc2latex as well as how to simplify it. The following section gives some advices and you can refer to it later.

Optional steps

Changing the default output encoding to UTF-8 unicode

Default settings of Calc2LaTeX are nice except the encoding which is the old West European Latin 1 or ISO-8859-1 code instead of UNICODE (UTF-8). It doesn't really matter if you store the LaTeX code in your clipboard and paste it in your TeX editor because the transformation to the local encoding of your LaTeX file is done on the fly, but if your output is a file, that file will be ISO-8859-1 encoded. And you will have difficulties to mix words from East European languages as well as Russian, Arabic and Asian languages. Older TeX (1982) and even pdfTeX are not able to mix 'naturally' various languages like this wiki is able to do. Only XeTeX as well LuaTeX are able to do it. You are encouraged to use these engines instead of pdfTeX. Don't worry XeTeX and LuaTeX are outputting PDF formats by default and no more the old DVI format.

Thus in order to make UTF-8 the default encoding of Calc2LaTeX (if not set already by a newer version than the current 0.2.4) you can do it during the installation. It is as easy or as difficult as the installation.

Do the previous steps, and then Edit the Main macro.
Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination
then change ISO-8859-1 to UTF-8 and save.
Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination

Adding the macro in a menu bar

Once you verified that the macro is running, it can be more convenient to add it to a menu bar. :Therefore select View => Toolbar => Customize then choose (for example) the Standard menu and scroll down to (after "New", "Open", "Save", "Save as" etc.) "Export to pdf" and click Add. :Then select OpenOffice Macros, and Calc2latex (twice) in order to attach the Main subroutine to the menu bar.
Calc2latex-add-to-menubar.png
In a second step, instead of Add you can click on Modify in order to rename the name of the macro to be displayed by "Selection to LaTeX table" (or similar) instead of "Main".
At last, you can add an icon such as this one
Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination
(right-click and save the image on your hard disk) by clicking on import
Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination

and import

Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination

then it will display like this and after selecting contiguous cells you can click and the new icon.

Erreur lors de la création de la miniature : Impossible d'enregistrer la vignette sur la destination

R

Gnuplot (***)

Xfig (****)

Linux and OS/X only!!!

Inkscape (***)

IPE 7 (**)

See the wiki specific to ipe users http://lamut.informatik.uni-wuerzburg.de/mediawiki/ipe7 as well as the official site http://ipe7.sourceforge.net/ and documentation at http://ipe7.sourceforge.net/manual/manual.pdf .

For OS/X you can get an Ipe.app since version 7.1.1

Geogebra (**)

  Index Next: Introduction