« Notation TeX » : différence entre les versions

De MoodleDocs
Aller à :navigation, rechercher
(Section à traduire)
Ligne 24 : Ligne 24 :
Il est conseillé de n'utiliser MimeTeX seulement si l'installation d'une véritable distribution de LaTeX n'est pas possible sur votre serveur, car la qualité des résultats n'est de loin pas optimale.
Il est conseillé de n'utiliser MimeTeX seulement si l'installation d'une véritable distribution de LaTeX n'est pas possible sur votre serveur, car la qualité des résultats n'est de loin pas optimale.


== Site administration settings ==
== Réglages ==


Location: TeX Notation settings link in ''Settings > Site administration > Plugins > Filters > Manage filters''
Emplacement : lien vers Notation TeX dans ''Administration > Administration du site > Plugins > Filtres > Gérer les filtres''


The TeX filter settings page are primarily intended to adjust the operation of the LaTeX renderer. The defaults for the three path settings are selected according to the detection of the operating system on which Moodle is running. These are simply suggested common values - Moodle does not check that the binaries actually exist at these locations. More recent versions of Moodle show a green tick or a red cross next to the path setting - this shows that the binary exists at that location (only). The settings have no effect on the operation of the MimeTex binary (used if any of these binaries are not found).
The TeX filter settings page are primarily intended to adjust the operation of the LaTeX renderer. The defaults for the three path settings are selected according to the detection of the operating system on which Moodle is running. These are simply suggested common values - Moodle does not check that the binaries actually exist at these locations. More recent versions of Moodle show a green tick or a red cross next to the path setting - this shows that the binary exists at that location (only). The settings have no effect on the operation of the MimeTex binary (used if any of these binaries are not found).


==== Installing the binaries ====
=== Installation des exécutables ===


This depends on your platform, but for a typical install you are going to need a LaTeX implementation. On modern Linux implementations you should look for the 'texlive' package (e.g. ''apt-get install texlive'') although a Windows version is available (see [http://www.tug.org/texlive/doc/texlive-en/texlive-en.html Tex Live]). It is highly unlikely that you will have all these binaries as part of a standard install. If you cannot find texlive you may have to install LaTeX, Ghostscript and ImageMagick separately. While not endorsed by Moodle.org, a simple installation binary for Windows is [http://miktex.org/| MikTeX].   
This depends on your platform, but for a typical install you are going to need a LaTeX implementation. On modern Linux implementations you should look for the 'texlive' package (e.g. ''apt-get install texlive'') although a Windows version is available (see [http://www.tug.org/texlive/doc/texlive-en/texlive-en.html Tex Live]). It is highly unlikely that you will have all these binaries as part of a standard install. If you cannot find texlive you may have to install LaTeX, Ghostscript and ImageMagick separately. While not endorsed by Moodle.org, a simple installation binary for Windows is [http://miktex.org/| MikTeX].   
Ligne 38 : Ligne 38 :
Some systems supply the fonts as separate packages. If you are having problems make sure you have all the fonts you need installed. You may need to track down an 'extra' fonts package to get the required maths fonts.
Some systems supply the fonts as separate packages. If you are having problems make sure you have all the fonts you need installed. You may need to track down an 'extra' fonts package to get the required maths fonts.


==== LaTeX preamble ====
=== Préambule LaTeX ===


Enables the LaTeX preamble to be specified. The default should work for most users, but you may need to change it to support non-latin character sets etc. Please see the LaTeX documentation for further details.
Enables the LaTeX preamble to be specified. The default should work for most users, but you may need to change it to support non-latin character sets etc. Please see the LaTeX documentation for further details.


==== Transparent colour ====
=== Couleur transparente ===


This should be set to your normal text background colour. The default setting is #FFFFFF (i.e., white).  
This should be set to your normal text background colour. The default setting is #FFFFFF (i.e., white).  


==== Density ====
=== Densité ===


This setting effects the size of the resulting image. The default setting is 120 pixels, and it produces an image of  reasonable quality, but for some complicated equations, this still may not be enough. It may be that anything less is not going to produce an image of sufficient quality but the image size can be controlled by the TeX encoding when the page is rendered.
This setting effects the size of the resulting image. The default setting is 120 pixels, and it produces an image of  reasonable quality, but for some complicated equations, this still may not be enough. It may be that anything less is not going to produce an image of sufficient quality but the image size can be controlled by the TeX encoding when the page is rendered.


==== Path of ''latex'' binary ====
=== Chemin d'accès du logiciel ''latex'' ===


Path to standard latex binary.
Path to standard latex binary.
Ligne 58 : Ligne 58 :
In Windows, using MiKTeX, it is usually something like C:\texmf\miktex\bin\latex.exe
In Windows, using MiKTeX, it is usually something like C:\texmf\miktex\bin\latex.exe


==== Path of ''dvips'' binary ====
=== Chemin d'accès du logiciel ''dvips'' ===


Path to standard dvips binary - generally distributed as part of a LaTeX system.
Path to standard dvips binary - generally distributed as part of a LaTeX system.
Ligne 66 : Ligne 66 :
On Windows using MikTeX is is usually something like C:\texmf\miktex\bin\dvips.exe
On Windows using MikTeX is is usually something like C:\texmf\miktex\bin\dvips.exe


==== Path of ''convert'' binary ====
=== Chemin d'accès du logiciel ''convert'' ===


Path to standard convert binary. This is distributed as part of the Ghostscript system, or ImageMagick in Linux.
Path to standard convert binary. This is distributed as part of the Ghostscript system, or ImageMagick in Linux.


On Unix based systems it is normally "/usr/bin/convert". On a MacOS X, the path is "/usr/local/bin/".
On Unix based systems it is normally "/usr/bin/convert". On a Mac OS X, the path is "/usr/local/bin/".


On a Windows based PC the path is something like C:\Program Files\ImageMagick\convert.exe (for ImageMagick, but something else for GhostScript.)
On a Windows based PC the path is something like C:\Program Files\ImageMagick\convert.exe (for ImageMagick, but something else for GhostScript.)

Version du 21 octobre 2013 à 20:44

Remarque : cet article est en cours de rédaction. N'hésitez pas à le compléter. Veuillez utiliser la page de discussion ou un forum adéquat de Moodle en français pour vos recommandations et suggestions d'améliorations.


Une fois activé, le filtre Notation TeX permet d'afficher des formules mathématiques sous la forme d'images à partir d'expressions en langage TeX saisies entre deux délimiteurs appropriés. Le filtre utilise trois programmes sur le serveur pour accomplir ce travail. Si ces programmes ne sont pas disponibles, Moodle fournit une alternative passable au moyen de MimeTeX. Des versions de MimeTeX pour Linux (glib2.3), Windows, Mac OS X et FreeBSD sont incluses dans la distribution standard de Moodle.

Il y a par ailleurs d'autre technologies permettant d'afficher du code TeX.

Méthodes et utilisation

Il convient de noter, afin d'éviter des confusions, que le filtre Notation TeX dispose de deux méthodes pour convertir le code TeX en images. La méthode la meilleure utilise une combinaison de trois programmes, dont l'installation doit être effectuée sur le serveur en plus de Moodle (pour autant qu'ils ne soient pas déjà présents) et la configuration effectuée correctement. La page des réglages du filtre correspond totalement à cette méthode. Si ceci ne fonctionne pas pour quelque raison que ce soit, le filtre utilisera un autre programme, appelé MimeTeX, inclus dans la distribution standard de Moodle (on peut aussi compiler et installer soi-même MathTeX, le grand frère de MimeTeX, avec quelque compétence en administration système).

Avant tout, vous devez activer le filtre Notation TeX en allant sur Administration > Administration du site > Plugins > Filtres.

Une fois le filtre activé et configuré adéquatement, vous pouvez l'utiliser en saisissant une expression TeX entre deux paires de dollars ($$), par exemple :

   $$ \sqrt{x + y} $$

Si l'affichage ne se fait pas correctement, voyez la section ci-dessous sur le débogage.

MimeTeX

Moodle utilise un programme MimeTeX (situé dans le dossier filters/tex) s'il ne peut pas trouver les programmes dvips, convert et latex. Des versions de MimeTeX sont disponibles pour diverses versions de divers systèmes d'exploitation. Le filtre TeX utilise le programme pour le système adéquat. Votre serveur web doit être configuré de sorte à pouvoir lancer des exécutables depuis cet emplacement.

Le manuel de MimeTeX est disponible, mais destiné à des administrateurs système, et ne traite pas de l'environnement Moodle.

Il est conseillé de n'utiliser MimeTeX seulement si l'installation d'une véritable distribution de LaTeX n'est pas possible sur votre serveur, car la qualité des résultats n'est de loin pas optimale.

Réglages

Emplacement : lien vers Notation TeX dans Administration > Administration du site > Plugins > Filtres > Gérer les filtres

The TeX filter settings page are primarily intended to adjust the operation of the LaTeX renderer. The defaults for the three path settings are selected according to the detection of the operating system on which Moodle is running. These are simply suggested common values - Moodle does not check that the binaries actually exist at these locations. More recent versions of Moodle show a green tick or a red cross next to the path setting - this shows that the binary exists at that location (only). The settings have no effect on the operation of the MimeTex binary (used if any of these binaries are not found).

Installation des exécutables

This depends on your platform, but for a typical install you are going to need a LaTeX implementation. On modern Linux implementations you should look for the 'texlive' package (e.g. apt-get install texlive) although a Windows version is available (see Tex Live). It is highly unlikely that you will have all these binaries as part of a standard install. If you cannot find texlive you may have to install LaTeX, Ghostscript and ImageMagick separately. While not endorsed by Moodle.org, a simple installation binary for Windows is MikTeX.

The filter settings page will try to guess the most likely location for the binary files depending on the detected platform. If correct, green ticks will appear against each setting. If red crosses appear you will need to check and modify the settings as required. A simple check is made to establish if the binaries exist at the given paths. A tick or a cross is displayed alongside each as a result. Note that this does not check that the application actually works, just that it is there.

Some systems supply the fonts as separate packages. If you are having problems make sure you have all the fonts you need installed. You may need to track down an 'extra' fonts package to get the required maths fonts.

Préambule LaTeX

Enables the LaTeX preamble to be specified. The default should work for most users, but you may need to change it to support non-latin character sets etc. Please see the LaTeX documentation for further details.

Couleur transparente

This should be set to your normal text background colour. The default setting is #FFFFFF (i.e., white).

Densité

This setting effects the size of the resulting image. The default setting is 120 pixels, and it produces an image of reasonable quality, but for some complicated equations, this still may not be enough. It may be that anything less is not going to produce an image of sufficient quality but the image size can be controlled by the TeX encoding when the page is rendered.

Chemin d'accès du logiciel latex

Path to standard latex binary.

On Unix based systems it is normally "/usr/bin/latex". On a MacOS X, the path is "/usr/texbin/".

In Windows, using MiKTeX, it is usually something like C:\texmf\miktex\bin\latex.exe

Chemin d'accès du logiciel dvips

Path to standard dvips binary - generally distributed as part of a LaTeX system.

On Unix based systems it is normally "/usr/bin/dvips". On a MacOS X, the path is "/usr/texbin/".

On Windows using MikTeX is is usually something like C:\texmf\miktex\bin\dvips.exe

Chemin d'accès du logiciel convert

Path to standard convert binary. This is distributed as part of the Ghostscript system, or ImageMagick in Linux.

On Unix based systems it is normally "/usr/bin/convert". On a Mac OS X, the path is "/usr/local/bin/".

On a Windows based PC the path is something like C:\Program Files\ImageMagick\convert.exe (for ImageMagick, but something else for GhostScript.)

Débogage du filtre TeX

Le filtre TeX possède un script de débogage (qui sera en outre plus utile si vous activez en plus le débogage de Moodle) qui pourra vous aider si vous rencontrez des problèmes. L'accès à ce script se fait au moyen de l'URL ci-dessous :

  http://votre.moodle.fr/filter/tex/texdebug.php

Vous pouvez saisir manuellement cette URL. Avec les permissions nécessaires, les images TeX rendues incorrectement auront un lien vers le script. Sur les versions récentes de Moodle, seuls les administrateurs peuvent avoir accès à cet utilitaire.