0

Is it possible to create a charactar from a graphic that is sensible to \color{} commands? I'm aware of these three questions (one, two, three), but with the first method, the symbol doesn't change color, using TikZ is not feasable because the graphic is too complex, and creating my own font just for a few symbols seems overkill, and also will only work on machines that have the font installed. So is there an easier way?

\documentclass{article}
\usepackage{scalerel}
\usepackage{xcolor}

\def\mylogo{\scalerel*{\includegraphics{logo}}{X}}
\begin{document}
\color{orange} Can I insert my \mylogo{} inline?

\tiny Can I insert my \mylogo{} inline?
\end{document}
4
  • it depends on the graphic, in some cases it is possible to change their color, see tex.stackexchange.com/a/150219/2388 – Ulrike Fischer Jan 31 at 17:50
  • I just found that same post. Thanks! But for some reason, it doesn't work for me even though the logo is just a back lines. One comment suggests for pdftex you could use the resetcolor argument for \includegraphics but if I try that, I get an error. – mapf Jan 31 at 17:52
  • it doesn't matter which colors your graphics show but what it does internally. – Ulrike Fischer Jan 31 at 17:56
  • So what does that mean? In what way to I have to save the graphics for it to work? The commenter says this works "only and only if the graphics does not contain color settings". I don't understand this. – mapf Jan 31 at 17:59

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.