|
[Sponsors] |
|
July 16, 2019, 14:12 |
How to automate latex document
|
#1 |
Member
Andrew
Join Date: Mar 2018
Posts: 82
Rep Power: 8 |
Hi guys, kindly, i have a question for you.
I have searched a lot on the internet but i haven't found answers to my question, so i'm sorry if my question is trivial but i've not found alternatives. i would like to write a bash script that, once the post processing in paraview in over, automatically wrote a document in latex with the results i set to save. i really appreciate if anyone could give me advice or explain me how to do it. Really Really thanks to everyone for the time spent to read this post. Astan |
|
July 17, 2019, 05:23 |
|
#2 |
Senior Member
|
Hi Astan,
Not sure if your post-processing already involves a python script, because than you can build the report as you are generating the images. You just need to write LaTeX code to a .tex-file while generating the images. If you are only doing this after manually making the images, the bash option could work, but I am not that sure how to do it. I would start with listing all images in a folder and than use that list to generate LaTeX code to include the images. Hope this helps. Regards, Tom |
|
July 18, 2019, 10:01 |
|
#3 |
Member
Andrew
Join Date: Mar 2018
Posts: 82
Rep Power: 8 |
hi tomf, first of all, thanks you very much for your answer.
I use a python script to do the post processing, could you kinldly give me more details about the process of writing a .tex file and make it compatible with my python script? thanks you in advance, Astan |
|
July 18, 2019, 10:51 |
|
#4 |
Senior Member
|
Hi Astan,
Obviously it depends a lot on how you have everything set-up, but I can show you some skeleton code or at least the idea that I use. I have a default LaTeX file, which sets up the report, I will not go into that detail. I expect you know how to work with LaTeX. within that I have: Code:
\begin{document} <some stuff> \include{results} <other stuff> \end{document} Code:
with open('results.tex','w') as texFile: <lots of ParaView code> SaveScreenshot('image.png') texFile.wrtie(''\\begin{figure}[htb!]\n\\centering\n\\includegraphics[width=0.9\\textwidth{image.png}\n\\caption{image showing bla bla bla}\\label{fig:image}\n\\end{figure}\n'') I cannot really give more information than this, so you would have to search a bit if something is unclear. Regards, Tom |
|
July 18, 2019, 11:05 |
|
#5 |
Member
Andrew
Join Date: Mar 2018
Posts: 82
Rep Power: 8 |
Hi tomf, thanks you very much, that's a good starting point, what i need!
I will try to develp the code using your guidelines! Thanks you again for the support! Astan |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to make temperature + move simulation - workbench | Idiom_1 | System Analysis | 1 | March 27, 2017 04:57 |
about CGNS | nba1942 | Pointwise & Gridgen | 0 | May 21, 2015 21:31 |
[swak4Foam] swak4foam can not be installed | hugo17 | OpenFOAM Community Contributions | 1 | September 11, 2012 05:17 |
a way to make lots of money quick and easy no lies | Dob | Main CFD Forum | 0 | October 10, 2006 16:45 |
[Q]How to make MPEGs with CFD datas??? | Bum-Seok Hyun | Main CFD Forum | 4 | February 16, 2000 18:59 |