Advertisement
Guest User

gelsim.sty

a guest
Apr 2nd, 2013
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. \usepackage{graphicx}
  2. \usepackage{amssymb}
  3. \usepackage{epstopdf}
  4. \usepackage{xcolor}
  5. \usepackage{calculator}
  6. \usepackage{pgf}
  7.  
  8. \COPY{5}{\gelheight}
  9. \newcounter{lane}
  10. \newcommand{\lane}[1][]{
  11. \addtocounter{lane}{1}
  12. \color{white}
  13. \SUBTRACT{\gelheight}{0.1}{\offsetgelheight}
  14. \pgfrect[stroke]{\pgfxy(\value{lane},\offsetgelheight)}{\pgfxy(0.9,0.1)}
  15.  
  16.  
  17. %%
  18. \color{black}
  19. \pgfputat{\pgfxy(\value{lane}+0.4,5.5)}{
  20.  
  21. \begin{pgfrotateby}{\pgfdegree{20}}
  22. \pgfbox[left,top]{#1}
  23. \end{pgfrotateby}
  24. }
  25. %%
  26. }
  27. \newcommand{\gelscale}[1]{
  28. \COPY{#1}{\gscale}
  29. }
  30. \newcommand{\geloffset}[1]{
  31. \COPY{#1}{\goffset}
  32. }
  33. \newcommand{\band}[2][1]{
  34. \definecolor{grayval}{gray}{#1}
  35. \LOG{#2}{\log}
  36.  
  37. \DIVIDE{\gscale}{\log}{\inverse}
  38. \SUBTRACT{\inverse}{\goffset}{\inverse}
  39. \SUBTRACT{\gelheight}{\inverse}{\hval}
  40.  
  41. \color{grayval}
  42. \pgfrect[fill]{\pgfxy(\value{lane},\hval)}{\pgfxy(0.9,0.03)}
  43. }
  44.  
  45. %%%%%%
  46. \newenvironment{gelsim}{
  47. \setcounter{lane}{-1}
  48.  
  49.  
  50. \setlength{\unitlength}{1cm}
  51. \begin{pgfpicture}{0cm}{0cm}{5cm}{6.5cm}
  52. \color{black}
  53. \pgfrect[fill]{\pgfxy(0,0)}{\pgfxy(5,5)}
  54. \gelscale{25}
  55. \geloffset{1}
  56.  
  57.  
  58. }{
  59.  
  60. \end{pgfpicture}
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement