Latex on wordpress blog
Some time back I came to know that wordpress blogs hosted at wordpress.com supports latex. But no such default functionality for self hosted wordpress blogs. But there are plugins (latexrender, wp-latex) which can facilitate similar things.
But for these to work you will need to install latex on your hosting account. (I have intalled latex on my hostmonster account some time back.).
For installing latexrender wordpress plugin you can find guidelines here
One more thing to remember while setting $latexrender_path_http in latex.php give full http path to latexrender folder like $latexrender_path_http = "http://your blog addr/latexrender";
Now you are set to go. To include [tex]\LaTeX[/tex] in your posting, use the following:
[tex] your latex code here [/tex] For example:
[tex] (a+b)^3 = (a+b)^2(a+b) [/tex]
produces :
[tex](a+b)^3 = (a+b)^2(a+b)[/tex]
But after setting up latexrender plugin, the png image was still not generated. Error that I got was:
I can’t find the format file ‘latex.fmt’!
But when I tried similar command (latex sample.tex) from shell prompt, It was working fine.
So I thought that problem is in calling latex from php file using exec. So when I copied the latex.fmt file to directory containing .tex file it started working fine. May be some problem in setting environment variable.
You can look for latex.fmt file using :
find -name latex.fmt
For latexrender you can copy latex.fmt file to latexrender/tmp/ folder inside your wordpress installation.
I’m still working on how to set environment variable in php so that I don’t have to copy latex.fmt again and again.
But for now I gave got working latex on my blog
. Now I can write math equations in my blog posts.
You can try latex formulas in comment too.
And if you want to publish LaTeX equation in WordPress blog without installing any software, try jsTeXrender: http://yourequations.com/. Thanks Doug for the tip.
Related Posts:
Latex Beamer
Installing latex on hostmonster
Installing latex on hostmonster
In continuation with my previous post (Some times yahoo is better), I followed the steps on how to install latex/tetex on my web host from here (You can also get the Installation steps from QuickInstall file in source code or access the same file from tug.org).
But the problem is that on web hosts like hostmonster you won’t have root access so you will need to modify some of the things and do a local install in your home directory.
For that you can specify –prefix accordingly while doing ./configure. So you need to do:
./configure --prefix=/home/username/local/teTeX
replace username with your account name
This step ended without any errors But while I was doing make world, the process exited with following error:
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXt.a when searching for -lXt /usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when searching for -lX11
I found this thread, where they were discussing similar error and from what I got it was due to machine platform. So I checked my host system information with
uname -afrom there I got x86_64 x86_64 x86_64 GNU/Linux which meant its a 64 bit architecture.
So after some tweaking to what I found here(CBLFS: TeTeX) to make it work for local install, you can do following to compile the package:
CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" USE_ARCH=64 \ ./configure --prefix=/home/username/local/teTeX/ \ --enable-shared \ --without-texinfo \ --with-x=no \ --with-system-ncurses \ --with-system-zlib && [ -f texk/libtool ] && sed -i "/sys_lib_search_path_spec=/s:/lib:&64:g" texk/libtool;
And then you can do
make world make all install
You can then add generated executable to your system path by:
PATH=/home/username/local/teTeX/bin/x86_64-unknown-linux-gnu:$PATH; export PATH
You can also configure your installation using:
texconfig
And its DONE
Find all steps followed by me here
So if you want to install on 32 bit config the method at Microcontroller programming Blog should work fine.
Also read: The Tetex HowTo
You can download required packages using wget on shell account at hostmonster from ctan.org
Related Post: Latex Beamer
Making LaTeX Beamer Presentations
I came across this nicely compiled page on :
how to make Latex Beamer Presentations
If you want to create overhead presentations (รก la Powerpoint) with LaTeX, you can do so by using Beamer class, which creates surprisingly professional and sophisticated documents that you can then display using any pdf viewer (e.g., such as Adobe Acrobat). The advantage of using LaTeX over a program like Powerpoint is that it doesn’t require expensive software for either creating or displaying your presentation; it thus makes the presentation truly “portable”.
Read More >>
Related Links :
- Latex Beamer
- Hindi Presentation using Beamer
- Some Latex tips & Links
- Preview Latex
- http://itrans-prv.blogspot.com/ An Emacs Plugin for previewing Itrans and Latex
Some Latex tips & Links
Here are some quick tips and links which you can find useful when writing some report, article in latex.
Firstly here is an nice article explaining why latex is good .
Here are some editors available for latex:
For Linux :
- Kile : KDE Integrated LaTeX Environment
- Lyx
- Emacs : It’s available for a couple of operating systems like Linux, Unix and MS Windows. For LaTeX you should use the quite ingenious modes AUCTeX and RefTeX. You may refer my Emacs-page for further hints.
For windows :
Getting to grips with Latex
Getting Started with LaTeX
LaTeX Tutorial : some templates here
LaTeX Tips and Tricks
Itrans_Prv : Project Page up
An Emacs Plugin for previewing Itrans and Latex File
Project Webpage Up.
Webpage has Image Previews of Itrans_Prv working.
Also embedded a Flash intro of how the package works.
Embedding of flash done by vnc2swf screen recorder.
Image Previews
Emacs Plugin for Itrans : Itrans_Prv
This summer (after my 4th sem is over) Me and Me and Kshitij are
working on Project under guidance Prof. Siva Kumar to develop an
WYSIWYG type editor for Itrans (Indian Language Support).
Here is a brief overview of our project:
* Select any itrans/latex text that is between valid tags. Now you can select
option from menu for prview of this region. (See Preview1) .
* You can preview many such region in emacs window.
* You can select option “Remove all preview” from Itrans menu to remove all preview of all regions.
* With “continuous preview” option you can view preview in seperate gv (ghost view) window.(Preview 2)
* In “continuous preview” mode you can edit text and preview gets automatically updated in gv.
You can download it from here .
Preview Latex
This is an in-line latex viewer for emacs.The purpose of preview-latex is to embed LaTeX environments such as display math or figures into the source buffers and switch conveniently between source and image representation.It replaces the latex text with its preview.
When we tried it ,it could generate previews of only sections,sub-sections and mathematical formula. So a small trick could be used to preview any part of a latex document be it tables, enumerations, paragraphs or any kind of fonts.Just place the part to be previewed in the ‘\begin{figure}‘ and ‘\end{figure}’ tags.And now preview latex will generate preview for this part of the document.
Previewing itrans text
Preview-latex
can be used to preview itrans text.But the itrans text cannot be
directly modified and previewed in the latex file.We have to first
compile the .itx file using itrans and then the resulting .tex file can
be used for generating previews for the itrans text.
We have to use the ‘\begin{figure}’ and ‘\end{figure}’ tags for previewing this also.
Hindi Presentation using Beamer
In this presentation we have implimented the following features :
1) Beamer has predesigned themes that can be modified as required.We have used one of the themes.
2) Beamer supports pgf package which can be used for making geometrical figures and graphs. (In slide 8 )
3) Images (in .eps format) can be used in the presentation.
4) Frames once declared can be used thereafter in the presentation with dynamic effects (one by one appearance of the blocks). In page 11,12,13 of the sample presentation.
5) There are inbuilt buttons associated with the template like next slide,previous slide,last slide.
6) Buttons that link to some other page can also be declared. (In slide 15 of the presentation)
7) Frame information and section/subsection information is displayed at the top of the template. (Inbuilt feature of the template)
Including Hindi in the Presentation
Beamer
class is used in latex file (.tex file).So for including hindi we
started with .itx file with the same content as the latex file and
added hindi font paths and itrans text to it.Then we applied itrans to
it.The resultant tex file was could be converted to a pdf file using latex+dvips+ps2pdf.Tex
file with beamer can also be converted to pdf using pdflatex on tex
file.But due to some font path problem it is not recognizing hindi
fonts.
The presentation can be downloaded from the following link :
Beamer.pdf
View Readme for details.
The source .itx file can be found here.
Latex-Beamer
Beamer is a latex class used to prepare presentations. It is not
a WYSIWYG program. It can easily create dynamic effects.
Predesigned themes can be used to make presentations.
The layout,the color,the fonts can be globally changed.
Beamer can be used with pdflatex and latex+dvips commands.
Beamer can be used to add audio and video file in the presentation.
This can be done in two ways:
1) By calling an external program to play the audio or video file.
Using the ‘\href’ we can run an external program eg. mplayer,xmms.
This has been implemented in the sample files at the following link:
(View Readme first) Sample-beamer.pdf
2) The multimedia package of beamer has commands such as
‘\sound’ and ‘\movie’ that enable us to embed movied and
sounds in pdf files.Using this the data of the sound file can be
completely embedded in the a pdf file and hence no need to
carry the sound file along.The package can play movie in the
presentation itself.
We still have to implement this.
Related posts :
- Hindi Presentation using Beamer
- Some Latex tips & Links
- Preview Latex
- Making LaTeX Beamer Presentations
- http://itrans-prv.blogspot.com/ An Emacs Plugin for previewing Itrans and Latex
Add to del.icio.us Network
Google Reader Shared Items
Twitter Feed
Flickr Photos