I’m not quite sure what “plain latex” means in your case. On my Mac I am using latex and pdflatex (both work) from MacPorts, using the texlive-* packages.
Jean-François
I’m not quite sure what “plain latex” means in your case. On my Mac I am using latex and pdflatex (both work) from MacPorts, using the texlive-* packages.
Jean-François
i mean normal latex … ok I will try again .
I would like to revive this thread because I recently learned of a very good way to draw graphics with LaTeX commands. It uses the package “tikz” and can easily make graph and histogram-like figures.
This would be a new option when talking about a .SaveAs(".tex") option in ROOT: all the graphics AND text defined as valid latex code, dependent on the tikz package. This avoids the problems with separation of text and graphical elements, but probably comes with its own challenges.
http://www.texample.net/tikz/examples/area/physics/
Jean-François
I managed to do an “hello world” example and compile it with my installed pdflatex.
documentclass{article}
\usepackage{tikz}
\title{simple LaTex example}
\author{Olivier Couet}
\date{July 2013}
\begin{document}
\maketitle
Hello world!
\begin{tikzpicture}
\draw (0,0) -- (0,2) -- (1,3.25)
-- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);
\end{tikzpicture}
\end{document}
Sounds quite simple. Now I would like to be able to include the image instead of putting it inline. Then we need to understand the coordinate system … if all that is sorted out the implementation should be a matter of time.
hello.pdf (30.3 KB)
Now implemented in 5.34 and trunk. Thanks for the suggestion.
Hi Olivier,
thanks for the implementation. I saw that basically all markers are not yet supported. Please find attached the implementation I did and its result compared to the pdf print option. TTeXDump.h (3.69 KB)TTeXDump.cxx (24.6 KB)min.pdf (23.6 KB)
One can easily use of the plotmarks library of tikz and even define whatever marker you like (even markers with different colors for the fill and the frame are possible).
let me know if you have further questions.
some small bugs are found:
Cheers,
Julian
Thanks for your patches and suggestions. I will look at them.
Patch for markers applied. (534 and trunk)
It should be \em I guess ?
\it is working for me…
Yes I did that to be able to plot the { character. It is used in the cuts … but then it is also a control character … so it is a bad idea… now the question is is: how to make the difference between a { which a control character and a { which is not.
Now fixed in 5.34 and trunk
Could you also escape the percentage character as % .
Done
Hi!
Could you please add math mode for log scale axis labels? But maybe all numbers should be in math mode anyhow.
Best,
Sebastian
It is already the case seems to me. I just tried … it is fine.
Thank you very much for implementing this feature, I have requested such a thing in the past1 I have been manually editing my pdf plots in inkscape for some time, which get’s annoying if you have to re-run the data…
I believe that the inkscape/gnuplot “pdf+latex” method of having two files, 1 tex for the labels and 1 pdf for the graphics, works really well. The issues mentioned with regards to sizing and positioning are not problems, but features that one desires and I very much like this style. Is it too difficult to include this as another option, such as canvas->SaveAs(“filename.pdf_tex”) and perform the same actions as inkscape?
Best regards,
Liam
We do not have the manpower to implement his right now. But you are welcome to submit a contribution
Note: I do not like the idea of have 2 files, and many users think the same.
Hi,
I will probably look into this eventually. For the moment, I am exporting to svg and coverting with Inkscape in order to have the desired result (http://www.ctan.org/tex-archive/info/svg-inkscape), so it’s not a huge problem.
A reason I am having to avoid the TikZ solution is that I quickly reach the memory limit of LaTeX when plotting TH2 with the “colz” option. Externalizing doesn’t help and so I’m left with creating a secondary pdf as my only (desirable) solution.
I can understand that people do not like 2 files, but this method is implemented in gnuplot and inkscape and has many supporters. One of the nice things that I find is the ability to resize the pdf, without resizing the text, meaning that one always has a consistent text size. Maybe I am alone on this one in the ROOT user community though!
Cheers,
Liam
I am not sure how to implement that. May be you can try to make the color part without labels in PDF and the labels without colours with tikz and superimpose the two in Latex … ? as I said I have no idea if it will work or not.