Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. documentclass[twoside]{book}
  2.  
  3. usepackage{tikz}
  4. %%table
  5. usetikzlibrary{matrix}
  6. tikzset{
  7. table/.style={
  8. matrix of nodes,
  9. row sep=-pgflinewidth,
  10. column sep=-pgflinewidth,
  11. nodes={
  12. rectangle,
  13. draw=gray!50,
  14. align=center
  15. },
  16. minimum height=1.5em,
  17. text depth=0.5ex,
  18. text height=2ex,
  19. nodes in empty cells,
  20. %%
  21. every odd row/.style={
  22. nodes={fill=gray!05}
  23. },
  24. column 1/.style={
  25. nodes={text width=5em,font=bfseries}
  26. },
  27. row 1/.style={
  28. nodes={
  29. fill=gray!25,
  30. text=black,
  31. text height=2.5ex,
  32. font=bfseries, purple!75!black
  33. }
  34. }
  35. }
  36. }
  37.  
  38. begin{document}
  39.  
  40. begin{tikzpicture}
  41. matrix[table,text width=12em]
  42. {
  43. first & 2nd column & 3rd column\
  44. &A & B \
  45. & C & D \
  46. };
  47. end{tikzpicture}
  48.  
  49. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement