3

Wondering how to draw this using different colors (such as each letter a different color) so that it appears in the document like this:

   / \  / ___| / ___|_ _|_ _|
  / _ \ \___ \| |    | | | | 
 / ___ \ ___) | |___ | | | | 
/_/   \_\____/ \____|___|___|

But A is blue, S is red, etc.

11

enter image description here

\documentclass{article}
\usepackage{color}
\catcode`!=13
\def!#1!{\color{#1}}
\begin{document}
\begin{verbatim}
!red!   / \   !blue!/ ___| !green! / ___|!yellow!|_ _|!cyan!|_ _|
!red!  / _ \  !blue!\___ \ !green!| |    !yellow! | | !cyan! | | 
!red! / ___ \ !blue! ___) |!green!| |___ !yellow! | | !cyan! | | 
!red!/_/   \_\!blue!\____/ !green! \____|!yellow!|___|!cyan!|___|
\end{verbatim}
\end{document}
  • +1: How does !red! use all that follows as an argument (even if there are spaces between the characters that follow)? – Dr. Manuel Kuehner Dec 22 '18 at 15:45
  • 4
    @Dr.ManuelKuehner I used \color not \textcolor, that does not take an argument. – David Carlisle Dec 22 '18 at 15:46
  • Thanks - I should have see this myself :). – Dr. Manuel Kuehner Dec 22 '18 at 15:46

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.