I'd like the following to be in a fixed-width (i.e. monospace) font, so I can get the various expressions lined up nicely in order to (probably with a bit of manipulation) make their similarities and differences more obvious and immediately apparent.

I do like the font though, so if there is something similar, that is monospaced, or maybe some kind of quantization method; a way to force each character to occupy the same space; that would be ideal. Not getting my hopes up, just saying it would be nice.

enter image description here



$\neg(p\vee q)\leftrightarrow\neg p\wedge\neg q$\\
$(A\cup B)^c=A^c\cap$ $B^c$\\
$\neg(p\wedge q)\leftrightarrow\neg p\vee\neg q$\\
$(A\cap B)^c=A^c\cup B^c$\\

  • Would a align environment be a good first step? What is your exact aim (what should line up)? – TeXnician Jul 4 '18 at 17:14

If I understand your aim correctly you want it to be easily comparable. So here are two suggestions (if you don't like any of them I'll delete my post):

  • use align and use them as in your post version 1
  • use a tabular to make the comparison more clear align 2





(x+y)' &= x'y'\\
\neg(p\vee q) &\leftrightarrow \neg p\wedge\neg q\\
(A\cup B)^c &= A^c\cap B^c\\[\baselineskip]
x' + y' &= (xy)'\\
\neg(p\wedge q) &\leftrightarrow \neg p\vee\neg q\\
(A\cap B)^c &= A^c\cup B^c


  (x+y)' &=& x'y' & x' + y' &=& (xy)'\\
  \neg(p\vee q) &\leftrightarrow& \neg p\wedge\neg q & \neg(p\wedge q) &\leftrightarrow& \neg p\vee\neg q\\
  (A\cup B)^c &=& A^c\cap B^c & (A\cap B)^c &=& A^c\cup B^c
  • Thanks, it's quite nice. And it's useful information. But it's not quite what I was looking for. Maybe if I could align the wedges and the caps and cups and various other operators it would be good, but that seems like it would get messy real quick. Anyway, please leave it up for our perusal. Thanks again. – voices Apr 9 '19 at 11:39

You might do like this:



  \tl_map_inline:nn { #1 } { \makebox[1.2em]{$##1$} }



& \fsmath{(x+y)'=x'y'} \\
& \fsmath{\neg(p\vee q)\leftrightarrow\neg p\wedge\neg q} \\
& \fsmath{(A\cap B){^c}=A{^c}\cup B{^c}}


enter image description here


A literal answer to your question: It is technically possible, using unicode-math, to load TeX Gyre DejaVu math as your math font and then the letters, numbers and symbols from DejaVu Sans Mono over it using the range= option of \setmathfont.

However, that won’t do what you want because subscripts, large operators, spacing and so on will not be monospaced. It’s an XY-problem.

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.