I have been working on an Octave script that outputs a .tex file to generate
a report with Latex. I tried copying my tex file into my Octave script using
the arrangement below but I have had issues. I started with a file from
someone else so I was aware of the need to replace single backslashes with
double backslashes. Additionally, I found a helpful hint in the forum to
obtain double backslashes (\\ - critical in Latex) by putting four
backslashes (\\\\) in the string to be output with fprintf.
However, I have been unable to get my script to output the Latex file. I see
the error 'error: fprintf: invalid format specified'.
Any suggestions, perhaps better methods I should be considering, would be
greatly appreciated!
Thanks!
A stripped example of the Latex output portion of my script (the last few
lines):
s=['\\end{tabular}\n'];
s=[s '\\end{document}\n'];
file=fopen('report.tex','w');
fprintf(file,s);