3

Is it possible to draw a special LaTeX character, e.g. \blacklozenge of amssymb package, with different fill and edge colours without resorting TikZ?

Inner region of \blacklozenge may be coloured as follows:

textcolor{red}{$\blacklozenge$}

However, this produces a red character surrounded by a red line. Is it possible to change the line colour to, say yellow?

4

You can inset a shrunken red lozenge inside one of another color.

\documentclass{article}
\usepackage{amssymb,xcolor,stackengine,graphicx}
\begin{document}
\stackinset{c}{}{c}{}{\scalebox{.7}{\textcolor{red}{$\blacklozenge$}}}{%
  \textcolor{yellow!40!orange}{$\blacklozenge$}}
\end{document}

enter image description here

  • Is the inner lozenge a bit left of center? – Torbjørn T. Sep 8 '16 at 11:04
  • 4
    @TorbjørnT. If one thinks so, one may change the 2nd argument of \stackinset from {} to a small length, such as {.2pt}, for example. Such an offset might occur if the left/right sidebearing of the glyph were not symmetric. – Steven B. Segletes Sep 8 '16 at 11:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.