0

How can I store latex in a database whilst ensuring when displayed, it shows correctly(displays equations etc)?

  • 1
    Welcome to TeX.SX! Store the source code and compile when reading... – TeXnician Mar 04 '19 at 13:33
  • 1
    Thanks for the reply, how would I go about compiling the .tex file from within a database? – Jerry Spranger Mar 04 '19 at 13:37
  • 1
    @JerrySpranger Can you please explain your question further? –  Mar 04 '19 at 13:39
  • 1
    Yes, I essentially have LaTeX which I want to store inside a DB, which I plan on reading and displaying. However I do not want it to display the LaTeX code. I want it to display my equations and diagrams etc. I am trying to figure out how I can do this. A pdf would be preffered – Jerry Spranger Mar 04 '19 at 13:42
  • 1
    You cannot compile within the database. When reading you save it in RAM or on a fast hard drive (e.g. /tmp/ or something like this), run a pdflatex compilation on it and then use the output... – TeXnician Mar 04 '19 at 14:05
  • Simples IF you can run shell commands from the database with snippets so blob =core.tex copy header+core+trailer.tex to run.tex > pdfLaTeX run.tex > pdfviewer run.pdf this all presumes you have a minimal latex with pdfLaTeX on path –  Mar 04 '19 at 18:28

0 Answers0