Insert data into Latex table using Java

Posted on 2006-05-18
Last Modified: 2008-01-16
I have a file which I want to transform into a latex table.

For example:


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:

\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
\caption{Results of people}

(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.
Question by:MyriamMencke
    1 Comment
    LVL 30

    Accepted Solution

    I think you can use this:

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    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.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now