Solved

# Insert data into Latex table using Java

Posted on 2006-05-18
395 Views
I have a file which I want to transform into a latex table.

For example:

File:

Person one's date of birth is 20/09/80
their age is 26
they like sport
bla bla bla
bla bla bla
Person two's date of birth is 10/09/78
Their age is 28
they like dancing
bla bla
bla bla

I want to read in this file, and write it to an output file like this:

{\small
\begin{table}[htb]
\begin{center}
\begin{tabular}{|c|c|c|c|} \hline
\multicolumn{4}{|c|}{{\bf Results}} \\ \hline \hline
Person&Date of Birth&Age &Likes\\ \hline \hline
one &20/09/80 &26 &Sport \\ \hline
two &10/09/78 &28 &Dancing \\ \hline
\end{tabular}
\end{center}
\caption{Results of people}
\end{table}
}

(The above is just an example, I would like to be able to edit the number of columns and rows in the table as well)

When you run Latex on the above code, it creates a table in a dvi file.

If anyone is familiar with Latex and Java, do you know of any Java packages specially designed for this type of thing, or how I can approach this problem? Thank you.
0
Question by:MyriamMencke
1 Comment

LVL 30

Accepted Solution

I think you can use this:

https://texdoclet.dev.java.net/
0

## Featured Post

### Suggested Solutions

tenRun challenge 28 67
NotAlone Challenge 20 65
zeroFront challenge 7 58
Starting to learn JAVA, 7 35
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.