3

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:

  1. Convert SVG to PDF and include a logo for every color that is needed in the package. Easy, but does not really scale.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. (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!

  • I think you forgot a link to [this question] in option 5? – Abby Jul 8 at 16:08
  • @Abby I rather messed something up while copy-pasting everything to the right spot. Thanks for the heads up, I cleaned it up! – Mr Tsjolder Jul 9 at 6:50
  • If that logos are set by using 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) – MadyYuvi Jul 9 at 9:22
  • @MadyYuvi The logo would be black on white. The links in my question point to different solutions to set the color of that black area within LaTeX. – Mr Tsjolder Jul 9 at 9:32
  • I am sure I got not all, but there are 'logo'-packages at LaTeX, and I think that are more fonts than graphics. So if your startpoint is SVG (Inkscape?) why not using a font-software like FontForge? I make some things with Japanese symbols; and after some tries with TikZ, I work more with Inkscape and FontForge. – cis Sep 6 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.