Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If ( (No = 5 and B=11111) OR (No = 5 and B=2222))
- => Insert page A: inserpageA
- If (No = 5 And (B not 11111, B not 22222))
- => insert page B
- Other:
- No hspace{1cm} B hspace{5cm} A
- RequirePackage{filecontents}
- begin{filecontents*}{test.csv}
- Acol, Bcol, NoCol
- Ax,Bxxxx,1
- Ay,By,3
- A1,B22,2
- A2,B44,4
- A3,11111,5
- Ax,B,1
- Ay,By,3
- A1,B22,2
- A2,B44,4
- A3,22222,5
- Ax,Bxxxx,1
- Ay,By,3
- A1,B22,2
- A2,B44,4
- A3,33333,5
- end{filecontents*}
- documentclass{article}
- usepackage{datatool}
- DTLloaddb{mydata}{test.csv}
- newcommand{inserpageA}[2]{%
- subsubsection*{AAA}
- newpage
- }
- newcommand{inserpageB}[2]{%
- subsubsection*{BBB}
- newpage
- }
- begin{document}
- DTLforeach*{mydata}{A=Acol, B=Bcol, No=NoCol}%
- {%
- No hspace{1cm} B hspace{3cm} A
- % newpage
- }%
- end{document}
- %inserpageA
- %inserpageB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement