Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. If ( (No = 5 and B=11111) OR (No = 5 and B=2222))
  2. => Insert page A: inserpageA
  3. If (No = 5 And (B not 11111, B not 22222))
  4. => insert page B
  5. Other:
  6. No hspace{1cm} B hspace{5cm} A
  7.  
  8. RequirePackage{filecontents}
  9. begin{filecontents*}{test.csv}
  10. Acol, Bcol, NoCol
  11. Ax,Bxxxx,1
  12. Ay,By,3
  13. A1,B22,2
  14. A2,B44,4
  15. A3,11111,5
  16. Ax,B,1
  17. Ay,By,3
  18. A1,B22,2
  19. A2,B44,4
  20. A3,22222,5
  21. Ax,Bxxxx,1
  22. Ay,By,3
  23. A1,B22,2
  24. A2,B44,4
  25. A3,33333,5
  26. end{filecontents*}
  27.  
  28. documentclass{article}
  29. usepackage{datatool}
  30. DTLloaddb{mydata}{test.csv}
  31. newcommand{inserpageA}[2]{%
  32. subsubsection*{AAA}
  33. newpage
  34. }
  35. newcommand{inserpageB}[2]{%
  36. subsubsection*{BBB}
  37. newpage
  38. }
  39. begin{document}
  40.  
  41. DTLforeach*{mydata}{A=Acol, B=Bcol, No=NoCol}%
  42. {%
  43. No hspace{1cm} B hspace{3cm} A
  44.  
  45. % newpage
  46. }%
  47.  
  48. end{document}
  49. %inserpageA
  50. %inserpageB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement