Gotcha : a real cross platform solution for docgen gen and more

Hi,
one disadvantage of including office is, its not always cross platform, and its not easy to include it into version management systems.

Here is a cross platform solution , maybe a little bit off topic, but think about a pipeline, which checks out docs, generates new docs out of it and checks it in again. Another benefit, the docs can be generated with a simple editor because the rest is handled by document processor…
And the documents are much smaller and easy to diff.

What you need:

Install a TexLive page (Linux, Win, Mac)

Start writing files with Xojo or editor .
Here is a sample with the beamer template ( windows)

Class Window1

Inherits Window

Window1 Control PushButton1:

Sub Action()

Var file As FolderItem = FolderItem.ShowSaveFileDialog("", “C:\texgen\TexGenSample.tex” ) If file <> Nil Then Var fileStream As TextOutputStream fileStream = TextOutputStream.Create(file) fileStream.WriteLine("\documentclass{beamer}") fileStream.WriteLine("\begin{document}") fileStream.WriteLine("\title{Hi a presentation generated with xojo out of the box} “) fileStream.WriteLine(”\author{Rainer Greim} “) fileStream.WriteLine(”\date{\today} “) fileStream.WriteLine(”\frame{\titlepage} “) fileStream.WriteLine(”") fileStream.WriteLine("\frame{\frametitle{Table of contents}\tableofcontents} “) fileStream.WriteLine(”") fileStream.WriteLine("") fileStream.WriteLine("\section{Section no.1} “) fileStream.WriteLine(”\frame{\frametitle{Title} “) fileStream.WriteLine(“Each frame should have a title.”) fileStream.WriteLine(”}") fileStream.WriteLine("\subsection{Subsection no.1.1 }") fileStream.WriteLine("\frame{ “) fileStream.WriteLine(“Without title somethink is missing. “) fileStream.WriteLine(”}”) fileStream.WriteLine(”") fileStream.WriteLine("\end{document}")

-1- fileStream.Close End If

’ und nun das dok generieren ’ C:\texlive\2020\bin\win32 ’ pdflatex.exe

’ par1= dokumentname C:\texgen

Dim sh as new Shell sh.mode=0 sh.TimeOut=-1

dim cmd as string = "C:\texlive\2020\bin\win32\pdflatex.exe " + "C:\texgen\TexGenSample. tex " + “C:\texgen\TexGenSample.pdf” sh.Execute cmd TextArea1.Value = sh.Result

’ ergebnis landed bei einer vm hier:C:\Users\auserAppData\Local\VirtualStore\Progra m Files\Xojo\Xojo 2020r1

End Sub

Window1 Control TextArea1:

End Class

Stay healty
Rainer