I would like to set up a package with some logos for titles and fancy headers and the like. The key problem that I have at this point is that it should be possible to get the logo in different colors. The logo is available as PNG, JPG, EMF or SVG.
I am aware of some (partial) solutions, but they either seem to be not quite the "right" solution or I lack some details as to how to actually make the solution work:
- Convert SVG to PDF and include a logo for every color that is needed in the package. Easy, but does not really scale.
- Use the PNG (which has a white background) and the TikZ blender trick found here or the TikZ fading trick from this answer. The resolution of the PNG might be good enough for documents, but I would prefer vector graphics in order to get good looking beamer presentations.
- Use the JPG and apply the solution suggested in this answer. The main problem with this approach is that it is not entirely clear to me whether/how this could allow setting the logo to a specific color.
- Convert SVG to "colorless" PDF and use something like
{\color{mycolor} \includegraphics{logo.pdf}}
(as suggested in this answer or this other answer). However, I have tried different ways to convert the SVG to PDF and all tools seem to set the color in the PDF, since the include did not work. Also manually fiddling with the PDF does not seem to be a reasonable solution. - Use the
svg
package to load the SVG directly (as suggested in the answer to this question). However, this does not seem to work on Windows, which would be very inconvenient. - Convert SVG to TikZ code and include the TikZ pictures (as discussed here). This allows to change colors on the fly, but I am a little concerned about performance. E.g. if the package would be used for a beamer presentation where the logo appears on every slide, the TikZ image would be rendered separately for every slide (if I understood that correctly). I am aware of the standalone package, but since it seems to build the TikZ images in the user directory (when using
mode=build
or the like) I am also a little hesitant of this approach. - (in some sense similar to 4) Convert SVG to TikZ code (as in the previous point) to render a "colorless" PDF. This question shows how the
picture
environment can be used to create a "colorless" PDF and seems to hint that it should also be possible with TikZ, but as soon as I add\usepackage{tikz}
to the provided MWE, the PDF is no longer colorless. I also failed to find out whether/how to render a "colorless" PDF with TikZ.
Maybe it is worth mentioning that the logo that should be included has been changed quite a bit recently. Therefore, it would be great if the required file could be created with little to no manual intervention. Also, the package should be easy to install/use.
Currently, options 6 and 4/7 look most promising, but it would be great if the images could be built "out-of-sight" for 6 or when someone could point me to how a "colorless" pdf could be generated.
Feel free to add options, if I forgot something!
[this question]
in option 5?LaTeX
codes, can able to change the color as you expected, but if those are in image format, nothing to fix...(as of my knowledge)