Skip to content

TPad::SaveAs .tex Standalone option #9384

@ferdymercury

Description

@ferdymercury

Is your feature request related to a problem? Please describe.

When saving a canvas as .tex, I often have to later add the begin{document} and usepackages by hand.

Describe the solution you'd like

  • SaveAs(".tex", "standalone") adds the statements below in the output file:
  • Default behaviour without arguments adds the statements below as comment (prepend %)
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{patterns,plotmarks}
\begin{document}
<----- here the current output
\end{document}

Describe alternatives you've considered

To develop a bash script that modifies the text file using cat / echo. Or a c++ macro.
https://root-forum.cern.ch/t/colored-2d-histograms-in-pdf-output/13822/45

Additional context

#9147

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions