Skocz do zawartości

Rekomendowane odpowiedzi

Opublikowano

It is update of ipbLatex hook, wchich looks like dead (author doesn`t reply nor fix issues).

It fixes LaTeX code poupus and allow to work for users without short_open_tag enabled.

 

Author: Cap'n Refsmmat

Initial version: 1.1.0

 

There are 2 language versions available:

  • english (ipbLatex_120_en.zip)
  • polish (ipbLatex_120_pl.zip)
 

Original description:

 

File Name: ipbLatex

File SubmitterCap'n Refsmmat

File Submitted: 05 Oct 2010

File CategoryMiscellaneous XML Files

ipbLatex enables the use of LaTeX mathematical typesetting on your forum, providing professional-looking equations with comparatively simple syntax. You can see some examples of the results at my forum -- click on the equations to see how they were created.

ipbLatex is fast, efficient, and easy to install. Features:

  • Normal display math — the $$ math $$ environment in LaTeX.
  • Inline math, as in the $math$ environment.
  • Typeset chemical equations, using mhchem.
  • PNG and GIF output, with customizable background colors and transparency.
  • A popup showing the raw LaTeX code upon clicking on an image, allowing users to find out how a LaTeX equation was made so they can type their own
  • Caching of every equation
  • As many LaTeX packages as you want to use
  • There is experimental support for PGF, but it is not enabled and incomplete, so you’d have to finish it yourself.
Note there are some requirements:
  • A working distribution of LaTeX. This kind of goes without saying – if you’re using Linux, look into the TeXlive distribution.
  • You absolutely must have a copy of dvipng installed. This plugin will not work without it.
  • If you want GIF output, then dvipng must have GIF support compiled into it. Things may otherwise break. Versions supplied as a part of many distributions will have this support.
  • The mhchem package needs to be accessible by LaTeX; either put the mhchem.sty file in the tmp directory or install the package properly. It is not bundled with ipbLatex by default (although this may change in the future).
  • mogrify is recommended for prettier images. If you do not have mogrify, be sure to set ‘resample’ to FALSE as instructed in the configuration. You’ll want to change ‘density’ and ‘gamma’ to the recommended values in the comment above if you cannot use mogrify.
For installation instructions and more detailed information on support, features, and use, see my blog. Important note on support: I am a student. The blog post gives contact info, but I cannot guarantee a speedy reply, so please be careful. Install on a test board first, for safety -- LaTeX can be fickle.

Click here to download this file

 

 

Current updates:

class.latex-vb.php file begins with:

<? 
to work for users without short_open_tag enabled.

 

Also, after this annoying update, that removes custom classes, templates.txt file has been updated:


Instalation quote from //blogs.scienceforums.net/capn/2010/08/26/releasing-ipblatex

Note, that PHP files should go to the /admin/sources/classes/text/parser/bbcode instead of /admin/sources/classes/bbcode/custom since last update.

 

Installation

 

(Again, partially stolen from Dave’s documentation.)

  • Create a folder somewhere web-accessible to hold all of your generated images. You need to create two sub-directories called tmp and img inside this folder, and make them both world-writable.
  • Extract the archived ZIP file somewhere. Carefully read through the configuration in class.latex-vb.php (at the beginning of the file) and fill in all required sections. Make sure your paths are correct and agree with step 1.
  • Upload the class.latex.php and ipbLatex.php files to the/admin/sources/classes/bbcode/custom /admin/sources/classes/text/parser/bbcode directory of your IP.Board installation.
  • Open templates.txt. To enable the LaTeX popup feature, which allows your users to see the LaTeX code that generated a formula by clicking it, you need to edit your default templates. You’ll have to do this for every style you have installed. Simply follow the directions in templates.txt.
  • Head to your administration panel, to Look & Feel -> BBCode Management. Scroll to the bottom, at Import New BBCodes. Browse and select thebbcode.xml file that came with the plugin. Install it.
  • That’s it!
By default, the plugin uses the [latex] and [math] tags as synonyms, with [imath] and [ce] representing inline math and chemical equations, respectively. You can add additional synonyms as aliases in IPB’s BBCode editor, but note that [imath] and [ce] are hardcoded, and they won’t work if you change the aliases for those.

With ipbLatex installed, you should be able to use LaTeX anywhere that BBCode can be used — personal messages, in the forums, and wherever. All images are stored in the img directory you create for all time, so you may wish to periodically cull that directory. (If a user previews their post, then changes an equation before posting it, the old equation will remain for all time.) At SFN we commonly see an img directory of over 20,000 images, so be careful opening it in your FTP client or you may cause it to hang. If images are deleted, never fear, ipbLatex will merely recreate once the posts are viewed.

If you need extra LaTeX packages for additional features, you can always add more to the ‘extrapackages’ list in the configuration. By default, the AMS math packages are loaded, as well as color and slashed.

 

Pobierz plik

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.