Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 450
  • Last Modified:

Insert data into Latex table using Java

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
MyriamMencke
Asked:
MyriamMencke
1 Solution
 
Mayank SAssociate Director - Product EngineeringCommented:
I think you can use this:

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

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now