This page documents the configuration of application logic for a custom topictype
as it's special case, how you install the first Latex TopicType at your local installation
All users are welcome to leave their first wishes and bug reports below.
Introduction
The Latex Topic is currently in usage in the TU Berlin DeepaMehta Project. It is not platform independent implemented yet, but works fine on an ubuntu server installation(makes usage of external programs) See more about the special dependencies below.
Download
The bundled and compiled Java archive has some disadvantages but work at least but is definetely not user-friendly. Therefore you can download the special .jar-file latexTopic.jar and copy it into your DeepaMehta Home or Addon directory of your choice.
See the example by wget
cd .../deepamehta/examples/install/
mkdir dm-tex
cd dm-tex/
wget http://www.deepamehta.de/wiki/file/2008/10/latexTopic-10101231.jar
mv latexTopic-10101231.jar latexTopic.jar
Sources
Download the source code, customize the TopicType id's and build it yourself. This site tries to document the current addon installation process and we tried to describe it below. It is written for an administrator or a person who is familiar with a command line.
Here is your latexTopic-src-0.2.tar.gz, 22.10.2008
Installation
The hack is tested on ubuntu server 8.04.1 OS.
DeepaMehta-server is build on a 2.0b-rc4-repository.
Create 2 LaTeX TopicTypes
If you are not familiar with creating your own Types, visit the following section in our UserGuide Build your own Types.
First thing to do is to create two new TopicTypes as described below and watch out for the id's (like 't-1234' without ':1') in your DeepaMehta Server logfile. You can do this while reading it and clicking on the newly created TopicTypes. Therefore you login to your server with at least editing rights in the Type Builder Workspace and then open a new topicmap.
NOTE: To properly install this hack you have to use the exact names and values for the properties we present you.

Properties and TopicTypes for Latex in DeepaMehta
- Create a new TopicType and name it e.g. 'TexType' (plural: 'TexTypes').
- Fill in 'de.latex.deepamehta.topics.LatexTopic' in the 'Custom Implementation' field on right side..
- You have to create several properties by right-clicking on the newly created TopicType and choosing 'Create Property'.
- Property: Name='Body'; Visualisation='Multiline Input Field';
- Create another TopicType and name it e.g. 'TexConfig' (plural: 'TexConfigs').
- Fill in 'de.latex.deepamehta.topics.LatexTopic' in the 'Custom Implementation' field on right side..
- You have to create several properties by right-clicking on the newly created TopicType and choosing 'Create Property' again.
- Property: Name='Options'; Visualisation='Input Field'
- Property: Name='Output Format'; Visualisation='Options Menu'
- Property Value for 'Output Format': Right-click on the property and choose 'Create Property Value'. Name the new value with 'png'.
- Property: Name='Header'; Visualisation='Multiline Input Field'
- The last step in this part is now to update both topictypes by again right-clicking on them an choosing 'Update'.
Customize your Addon
If you downloaded the source you have to open the source file at src/de/deepamehta/Latex.java and replace the 2 ID's for your newly created TopicTypes.
Build your Addon
- Go to your DeepaMehta Home Directory in a command line e.g. note: path may differ
cd tools/deepaMehta
- Enter the following command into your shell note: your path to the latex build file may differ
./run.sh build -f latexTopicPath/build.xml
- The build should successfully place a latexTopic.jar file in your latexTopicPath/
- Now you have your customized version of the LatexTopic DeepaMehta Addon. You just need to register it in the build.xml file within your DeepaMehta Home directory.
Register your Addon
- The build.xml file in your deepamehta folder is responsible for incorporating the application archive into the dm-server when it's started. Add the file latexTopic.jar into the buildpath. NOTE: Your paths may differ from ours so check the location of your latexTopic.jar on the server.
<path id="dmapps">
<pathelement location="${examples}/dm-tex/latexTopic.jar" />
<!-- configure this -->
</path>
- Stop and start your DeepaMehta server run script. The new build.xml file will start the DeepaMehta server with custom implementation classes for the 2 Latex TopicTypes. To verify this, take a look in your server log and check the messages right after you logged in, it should display a LaTeX Topic 0.2
Configure a Custom Applicaton Workspace
Build a new workpsace for this two types or connect these 2 TopicTypes directly to all users who should be able to use it, via a Type Access association.
If you satisfied the package dependencies on your server machine and know how to tex at all, the rest will be fun for you.
Usage
And this is an example how to use this hack. The Administrators should give you Type Access to the newly introduced TopicTypes.

Create a LaTeX by right-clicking.
- Step one: Create a TexConfig
- To compile Latex code into an image of the filetype 'png' you have to use one LaTeXConfig Topic. Create it by right-clicking on an empty space of your topicmap. Name the new topic and type in the latex-header section you want to use to define your code.
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath,bm}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[dvipdfm]{geometry}
\voffset-10mm
\hoffset-60mm
\thispagestyle{empty}
- Step two: Create a TexTopic
- Once you have defined youre header properties you'll need the body of a normal Latex document to compile some content code. This is where the TexTopic comes in. You can use more than one 'TexType' with a 'TexConfig' but you'll need at least one. So lets create one by right-clicking, using the 'create' menu again and choosing the item. A working body has to be of the shape:

Just compile...and compile...snd compile.
\begin{document}
...
\end{document}
- Step three: Connect one with the other
- To let deepamehta know wich 'TexConfig' you want to use with wich LatexBody you'll need an association between them. Reveal a 'TexConfig' and a 'TexType' you want to use and drag a normal association from the 'TexType' to the 'TexConfig'. Retype it as a composition!
- After youre well set up and the chosen topics are connected you just have to make deepamehta 'compile' the 'TeyType'. To do so you'll have to choose the compile-button in the right-click menu of your 'TexType'.
- Note: It appears to happen that one click on 'compile' does not work. But dont panic! Just try it again.
Package Dependencies on a ubuntu server

How it looks like. :)
- tex-common
- texlive-common
- texlive-base-bin
- texlive-doc-base
- texlive-base
- texlive-latex-base
- texlive-latex-recommended
- latex-xcolor
- pgf
- latex-beamer
- texlive
- texlive-math-extra
- texlive-fonts-recommended
- preview-latex-style (Version 11.84-0ubuntu1) wird installiert
- texlive-latex-extra (Version 2007.dfsg.1-1) wird installiert
- texlive-pictures (Version 2007-13) wird installiert
- dvipng (Version 1.9-5) wird installiert
- libt1-5 (Version 5.1.1-5) wird installiert
Known Issues
- the dm client should notify about latex output.
- the TexTopic does not update if you change the tex-code and compile if it was compiled before.
- you cannot export or handle the shown '.png' in and with deepamehta.
- either browse the icon repository via webbrowser and drag&drop the image (admin: set context path in webserver)
- connect the TexTopic to a Topic (via Composition) and layout it's position according to some association properties in the Topics Description Panel
Wishlist für ProjektLabor [de]
- Mathematica in Detail Window, interactive editor (icon preview formula)
- Combine Text and Formulas kombinieren in einem Label, z.B. Sonderzeichen (\[Delta]) direkt im Text übersetzen, viell. per TextKontextMenü
- Hack pdf support in custom implementation for writing articles or books by combining chaptertopics and and texconfig topics
- Annotations/Sketches on the topicmap
- Gesture based pen input
- Kollaborativer DeepaMehta Konferenztisch