Manual:$wgUseTeX/hu

Részletek
A beállítás a MediaWiki 1.18 és későbbi verziójában nem használt, funkcionalitása a kiterjesztésbe került át.

A MediaWiki 1.17 és korábbi verzióiban a változó engedélyezi a  címkék használatát.

A TeX használatához szükséges a  fordítása (a MediaWiki   könyvtárában), továbbá szükséges hozzá a ,  ,   (ghostscript) és   (ImageMagick) telepítése és a PATH-ben történő definiálása. További információkért lásd a math/README fájlt.

Interpretáció
A  a LocalSetting.php-ban definiált változó, melynek   értéke szükséges a matematikai formulák megjelenítéséhez. A beállítás szintaxisa:

Without such a setting, the tags and  are not recognized as commands.

Ez a beállítás a működéshez szükséges, de nem elégséges. Számos más dolog betöltésére, telepítésére, beállítására és a szerver egyedi paramétereihez való igazítására van szükség egy hozzáértő által. Ezeket kiterjesztéseknek hívjuk. A beállítás leírását a lapon találod.

Felismerés
The status of the setting required for the  can be checked with typing in the MediaWiki article any mathematical formulas with the math tags; for example, the following short code:

A kódnak a dőlt O betűt kell megjelenítenie. A wiki jelenlegi beállításaiban ez a következőképpen néz ki:


 * $$O$$

Ha a  értéke nem , a beírt kód nyers szövegként jelenik meg. Ha a változó hozzá van rendelve a beállításhoz, az eredmény más változók és fájlok helyességén, többek közt a wiki könyvtárán kívül eső állományokén múlik.

Diagnosztika
The errors of the installation of the required extensions are reported with the red messages


 * (1) Failed to parse (Cannot write to or create math temp directory)

or
 * (2) Failed to parse (Missing texvc executable; please see math/README to configure.)

or
 * (3) Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert):

In the case (1), it may help to make the math directory writable with the command
 * chmod 777 math

In the case (2), it may help to set variable $wgTexvc in the LocalSetting.php in the following way:

In the case (3), one should verify the existence of the commands latex, dvips, gs, and convert at the server, check that they work properely, and assign the corresponding variables in the LocalSetting.php the appropriate values. This is the most difficult and painful part of the installation of MediaWiki.

A LaTeX meglétének ellenőrzése
The existing of latex at the server can be detected with the simple code, for example, let the file 0.tex contains the four lines below:

Then, at the command line, the command
 * latex 0

should produce the file 0.dvi

A dvips meglétének ellenőrzése
If the dvips is installed, then, after the test above, the command
 * dvips -o 0.ps 0.dvi

should produce the file 0.ps

A gs meglétének ellenőrzése
If the check for latex and the check for dvips above did not cause the error messages, then one may test them together with the gs command typing in the command line
 * gs 0.ps

If at the console, this should produce a frame with image, showing the simple formula, indicating the square of variable x.

A konvertáló meglétének ellenőrzése
After the tests above, the program convert and be checked with the command
 * convert 0.ps 0.png

At the correct installation of the convert (if the tests above passed well), the file 0.png should appear, and, in principle, this file already can be glued into the html document (although the formula occupies very small part of the areas of the frame). However, the software is supposed to do such operations automatically, with correct setting, providing the beautiful formula in the displayed text. (Up to year 2011, the vector mode of displaying of mathematical formulas is not realized, so, for wiki, the formulas are stored as png images, and such images are supported by the most of browsers.)

Telepítési hely
For the use of MediaWiki, the commands mentioned above should be located, id est, the programmed should know the full path to each of them. This can be realized in the command line with commands
 * which latex
 * which dvips
 * which gs
 * which convert

Each of this commands is supposed to type at the screen the full path to each of the executables required. Let the corresponding outputs are p_1, p_2,p_3 and p_4.

Javítás
Yet, there is no robot to perform the automatic installing of the software. Assume that all the directories required have the mode access 777, and the only problem is that MediaWiki cannot find the support for the conversion of formulas to the images. The programmer should find the corresponding variables in the MediaWiki package and assign them the required values. In some cases, this can be done, editing the LocalSetting.php

The names of variable for latex is already known; so, the corresponding line may have format

however, the p_1 should be substituted to value returned by the which latex command; for example, for some servers, it may have form

Unfortunately, the names of other variables that need to be assigned are not yet reported. There is hypothesis, that the correct name for the convert program is

where p_4 should be substituted to the value specific for the custom server; doe example, for some servers, it may have form

The confirmation of the name of variable for the path of the program convert and search for the names of variables for the programs dvips and gs may be matter for the future research. The assignment of appropriate values to these variables is expected to make the installation of mediaviki usable.

This text is expected to be updated according to the recommendations of more successful wiki-specialists.

The manual about the use of the variable $wgUseTeX and all the requirement accessories is expected to appear at ; currently there is only a stab there.

Lásd még

 * math/README in SVN
 * math/README in SVN
 * math/README in SVN
 * math/README in SVN