Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[fontsize=11pt,paper=a4,DIV=6,landscape]{scrartcl}
- usepackage{tikz}
- usepackage{graphicx}
- usepackage{tabularx}
- usepackage{booktabs}
- newcolumntype{s}{>{hsize=.05hsizecenteringarraybackslash}X} %for id
- newcolumntype{n}{>{hsize=.1hsizeraggedrightarraybackslash}X} %for name
- newcolumntype{y}{>{hsize=.2hsizecenteringarraybackslash}X} %for everthing else
- newcolumntype{e}{>{hsize=.3hsizeraggedrightarraybackslash}X} %for email
- usepackage{datatool}
- DTLloaddb[noheader]{data}{namelist.csv}
- newcommand{circleme}[1]{begin{tikzpicture}
- begin{scope}
- clip [rounded corners=.4cm] (0,0) rectangle coordinate (centerpoint) (.8,.8cm);
- node [inner sep=0pt] at (centerpoint) {includegraphics[width=.8cm, height=.8cm]{#1}};
- end{scope}
- draw[mycolor,very thick] (.4cm,.4cm) circle (.4cm);
- end{tikzpicture}}
- begin{filecontents*}{namelist.csv}
- 1,Name One,PhD,supervisor,Immunology,nameone@yahoo.com,logo,red
- 2,Name Two,MSc,worker,Microbiology,nametwo@yahoo.com,logo,blue
- 3,Name Three,BSc,worker,Chemistry,namethree@yahoo.com,logo,green
- end{filecontents*}
- newcommand{tabcontents}{begin{tabularx}{textwidth}{@{}snyyyey@{}}
- toprule
- & multicolumn{1}{c}{textbf{Name}}
- & multicolumn{1}{c}{textbf{Qual}}
- & multicolumn{1}{c}{textbf{Specs}}
- & multicolumn{1}{c}{textbf{Descr}}
- & multicolumn{1}{c}{textbf{E-mail}}
- &}
- begin{document}
- thispagestyle{empty}
- DTLforeach*{data}{idcode=Column1,name=Column2,qual=Column3,%
- descr=Column4,spec=Column5,email=Column6,figpath=Column7,mycolor=Column8}%
- {%
- eapptotabcontents{noexpand\noexpandmidrule
- idcode noexpand&
- name noexpand&
- qual noexpand&
- spec noexpand&
- descr noexpand&
- email noexpand&
- noexpandraisebox{-.5baselineskip}{noexpandcircleme{figpath}}}
- }%
- apptotabcontents{\bottomruleend{tabularx}}
- tabcontents%
- end{document}
- %%% Local Variables:
- %%% mode: latex
- %%% TeX-master: t
- %%% TeX-engine: xetex
- %%% End:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement