I want to implement a raster graphic like this but i don't want to insert the image file. Does anybody know how to create some in latex?:enter image description here


EDIT: Added \bordercolor as a parameter, in addition to \thk rule thickness and \gsize grid size.

\usepackage{xcolor, graphicx}
\def\thk{.5pt}                   % RULE THICKNESS
\def\gsize{.65cm}                % GRID SIZE
\def\bordercolor{black}          % GRID BORDER COLOR
      \Ct\Ct   \Ct   \Ct   \Ct\\
      \Ct\Ct[A]\Cb[X]\Cw   \Cw\\
      \Cw\Cw   \Cw   \Cw   \Cw\\
      \Cw\Cw   \Cw   \Cw   \Cw

enter image description here

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.