Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Education & Science
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Education & Science
A place to discuss scientific and mathematics software for Ubuntu or linux in general. Questions and comments from all academic and research disciplines are welcome.

 
Thread Tools Display Modes
Old January 8th, 2007   #1
Toufik
A Carafe of Ubuntu
 
Join Date: Jun 2006
Beans: 116
Ubuntu 8.04 Hardy Heron
OOoLatex or Latex for OpenOffice

The preferred method of installation is no more a deb package but rather via the OpenOffice extension manager

The preferred method of installation is no more a deb package but rather via the OpenOffice extension manager. This has the advantage to be platform independent (Win, Mac, Linux,...); to be cleaner than the deb package which has to modify some configuration files (subjected to change from one version to another); ... However, the disadvantage is that there is no more automatic update. But if it works for you, why update? If you experience some problems, then go back to the website to check!

Install dependencies:
Code:
sudo apt-get install texlive imagemagick epstool
Install Mathematical Fonts:
Code:
mkdir OOoLatexFonts
cd OOoLatexFonts
wget http://mesh.dl.sourceforge.net/sourceforge/ooolatex/OOoLatexFonts.zip
unzip OOoLatexFonts.zip
cd ..
sudo mv OOoLatexFonts /usr/share/fonts/truetype/.
sudo fc-cache -f /usr/share/fonts/truetype
The last step may take a while before finishing

(Optionnal) Install binaries for EMF
If you want to use emf format (i.e. scalable pictures of the equations ==> I recommend), you need one more dependency: the latex2emf program.The easiest way to install it is to grab the binaries directly from the OOoLatex website: http://sourceforge.net/project/showf...roup_id=150801
If you have Ubuntu i386 or 64bits choose latex2emf_Linux_i386_binary.tar.gz
If you have Ubuntu PPC choose latex2emf_Linux_PPC_binary.tar.gz
If you have something else, you'll need to compile from source (grab OOoLatexEmf_noarch_src.tar.gz)

Once downloaded, go to the directory where you've downloaded:
Code:
tar -xzvf latex2emf_Linux_i386_binary.tar.gz
cd latex2emf_Linux_i386_binary/
sudo ./install.sh
Install OOoLatex
And finally, you can now install the extension!! Remarks that if you're just upgrading the extension, you need only this final step! But first download the extension here:
http://sourceforge.net/project/showf...roup_id=150801
At the time of writing this post, the latest one was 4.0.0-beta2 --> file OOoLatex-4.0.0-beta-2-linux.oxt

There are two types of installation. The administrator one is useful when installing for a lot of users but each user is not allowed to modify the configuration (most notably the shortcuts), only root can do that. Therefore I recommend, for normal user, to install the single-user type. For each type ther are two ways to make the install:
  • Terminal :
    Single-user
    Code:
    /usr/lib/openoffice/program/unopkg.bin add OOoLatex-4.0.0-beta-2-linux.oxt
    Administrator
    Code:
    sudo /usr/lib/openoffice/program/unopkg.bin add --shared OOoLatex-4.0.0-beta-2-linux.oxt
  • Graphical :
    Single-user:
    Open OpenOffice (writer or impress). Tools > Package Manager > Add > Select the oxt file you've downloaded
    Administrator:
    Not recommended, see terminal method

Note that you'll have to accept the licence.

Usage
After installation, try <Control>+M and <Control>+K (the default shortcuts). You can also add the OOoLatex Toolbar: View > Toolbars > OOoLatex

The module Equation transform a LaTeX code into an image. Two formats are proposed: .png and .emf. You probably know PNG, this is a kind of "normal" image. If you rescale it, you'll see pixel. A way to circumvent this problem is to increase the resolution (dpi) but you'll get larger files! Or to use the EMF format which is a scalable image: the equation is vectorised and don't loose resolution when you rescale it! This is probably the better choice but you need then some binaries (see above). Selecting an equation and opening the equation dialog box allows editing of the equation.

The module Expand was first called Inline in the first versions of OOoLatex. Basically, it transforms (expands) the LaTeX special characters into ones that are usable by OpenOffice. This is done (partly) via the STIX general fonts. The interests of Expand is to include LaTeX characters directly in a sentence without requiring the insertion of an image (as in Equation). Evidently, not all LaTeX code can be expanded (e.g. a fraction bar with something above and under is not a character!), that's why a list is offered in the dialog box.

In summary: use Equation for ... equations and Expand for some in-text characters

Remove
Remove the extension:
Single User mode:
Code:
/usr/lib/openoffice/program/unopkg.bin remove net.sourceforge.ooolatex
Admin mode:
Code:
sudo /usr/lib/openoffice/program/unopkg.bin remove --shared net.sourceforge.ooolatex

Last edited by Toufik; July 10th, 2008 at 05:37 AM.. Reason: Removing
Toufik is offline   Reply With Quote
Old January 9th, 2007   #2
neoflight
Ubuntu Extra Shot
 
neoflight's Avatar
 
Join Date: Nov 2005
Location: 127.0.0.1
Beans: 365
Ubuntu 8.04 Hardy Heron
Re: OOoLatex or Latex for OpenOffice

it should be interesting....i could try that sometime.... would you please provide some screenshots if possible? thanks
edit: i forgot that you had provided tha link to that page...there are screen shots in there...so its ok.

Last edited by neoflight; January 9th, 2007 at 02:48 AM..
neoflight is offline   Reply With Quote
Old January 9th, 2007   #3
Vincosmo
First Cup of Ubuntu
 
Join Date: Jan 2006
Beans: 6
Kubuntu 6.10 Edgy
Re: OOoLatex or Latex for OpenOffice

cool

next step: write a .deb package and a page on the ubuntu wiki(s)
Vincosmo is offline   Reply With Quote
Old February 8th, 2007   #4
rlgc79
5 Cups of Ubuntu
 
Join Date: Jan 2006
Location: Japan
Beans: 33
Ubuntu 6.06
Re: OOoLatex or Latex for OpenOffice

Without OOoLatex I would never use Openoffice Openoffice should give support to equations written in Latex by default...

Keep the good work

Best,
rlgc79 is offline   Reply With Quote
Old March 11th, 2007   #5
eliasekp
First Cup of Ubuntu
 
Join Date: Dec 2006
Beans: 1
Re: OOoLatex or Latex for OpenOffice

Hi, this is my first post in Ubuntu Forum
I'd like to thank you for the the instructions of installing OOoLatex. I want to answer if anybody using the OOoLatex in emf output noticed that some math symbol it is not viewable like \leq or \kappa in other output you can see the symbol. Is there a solution?
eliasekp is offline   Reply With Quote
Old March 15th, 2007   #6
Toufik
A Carafe of Ubuntu
 
Join Date: Jun 2006
Beans: 116
Ubuntu 8.04 Hardy Heron
Re: OOoLatex or Latex for OpenOffice

Hi,

I made a verification: character number 183 is missing in each bakoma fonts... You guess that kappa and leq are at the 183th position. It seems that the original Bakoma fonts on the OOoLatex website are corrupted. I'm trying to correct this. I'll let you know when it will be fixed (a couple of days).
Toufik is offline   Reply With Quote
Old March 15th, 2007   #7
Toufik
A Carafe of Ubuntu
 
Join Date: Jun 2006
Beans: 116
Ubuntu 8.04 Hardy Heron
Re: OOoLatex or Latex for OpenOffice

After some searches, I discover that the ttf fonts coming from CTAN are buggy !? The character number 183 is missing in all the fonts (these are : "[", \kappa, \leq, and other various AMS symbol). I correct this by using the fontforge program. Now, the fonts included in OOoLatex4Ubuntu are corrected (the ones on the OOoLaTeX website are still buggy but they should be changed soon). The easiest way the do the update is simply to repeat steps 1 to 3 hereabove.

Enjoy
Toufik is offline   Reply With Quote
Old March 16th, 2007   #8
Belathor
Gee! These Aren't Roasted!
 
Join Date: Apr 2006
Location: Michigan
Beans: 184
Send a message via MSN to Belathor
Re: OOoLatex or Latex for OpenOffice

I did steps 1-3 again but I still don't have \kappa and \leq.
__________________
Code:
~$ sudo aptitude install sandwich
Belathor is offline   Reply With Quote
Old March 18th, 2007   #9
etotehpii
Just Give Me the Beans!
 
Join Date: Jun 2006
Beans: 48
Ubuntu 6.06 Dapper
Re: OOoLatex or Latex for OpenOffice

Code:
4) This is a bit boring, so we will create a new shortcut

  Tools > Customize
  Choose the tab Keyboard
  Select Openoffice.org (instead of Writer in order to have it in all openoffice applications)
  Choose the category : OpenOffice.org > user > OOoLatex > OOoLatexEquation
  Choose the function : Main
  Select your shortcut key (for instance Control+M which is free)
  Click on Modify
  Click on OK

  Try it!!
I get that in the console. Then I go to Tools and Customize and select openoffice.org instead of writer. Once I do this Office crashes on me. (I followed the instructions as stated in the OP)
etotehpii is offline   Reply With Quote
Old March 18th, 2007   #10
Toufik
A Carafe of Ubuntu
 
Join Date: Jun 2006
Beans: 116
Ubuntu 8.04 Hardy Heron
Re: OOoLatex or Latex for OpenOffice

I also experienced a lot of bug/crash with OpenOffice. The Ubuntu version is really buggy! Personnally, I use the offcial OpenOffice from their website: much more stable (but need a bit of work to install because there is no Ubuntu package)!! For your problem, I cannot advice you anything else than "retry until it doesn't crash on that step" (or install the official Openoffice). I'm not sure if this is an issue but have you check in Tools > Options > OpenOffice.org > Java if you have a proper JRE. Maybe it is better to use Sun one :
Code:
$ sudo apt-get install sun-java5-jre sun-java5-bin
$ sudo update-alternatives --config java
and select sun java. Tell me if it helps so I can add it in the first post.

For the \kappa, I'll check what happens. For the moment, I've made a .deb package (my first ) and I'm testing it on sevral computers. It installs the binaries AND the macros Must be release very soon.

Last edited by Toufik; March 18th, 2007 at 06:07 PM..
Toufik is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:14 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry