karnaugh-map.tex 741 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. \documentclass{article}
  2. \usepackage[pdftex,active,tightpage]{preview}
  3. \setlength\PreviewBorder{2mm}
  4. \usepackage[dvipsnames]{xcolor}
  5. \input{kvmacros}
  6. \begin{document}
  7. \begin{preview}
  8. \karnaughmap{4}{$f(w,x,y,z)$}{{$w$}{$x$}{$y$}{$z$}}%
  9. {
  10. 1100
  11. 1100
  12. 0011
  13. 0101
  14. }
  15. {
  16. % Long one at top
  17. \textcolor{Blue}{
  18. \put(2,3.5){\oval(3.9,0.9)[]}
  19. }
  20. \textcolor{WildStrawberry}{
  21. \put(0.9,3.5){\oval(1.7,0.8)[]}
  22. }
  23. % two left
  24. \textcolor{Green}{
  25. \put(0.7,1.5){\oval(1.9,0.9)}
  26. }
  27. \textcolor{Sepia}{
  28. \put(1.5,1.5){\oval(1.6,0.7)}
  29. }
  30. \textcolor{Red}{
  31. \put(1.92,1){\oval(0.9,1.9)}
  32. }
  33. \textcolor{LimeGreen}{
  34. \put(1.76,-0.2){\oval(0.9,2.1)[t]}
  35. \put(1.76,4.2){\oval(0.9,2.1)[b]}
  36. }
  37. }
  38. \end{preview}
  39. \end{document}