documentclass[11pt,table,a5paper]{article} usepackage{array,ragged2e} usepackage{graphicx} usepackage[framemethod=TikZ]{mdframed} usepackage{lipsum} usepackage[top=2cm, bottom=2cm, outer=1cm, inner=2.1cm,twoside, headsep=26pt]{geometry} renewcommand{familydefault}{sfdefault} usepackage[T1]{fontenc} usepackage{tikz} usepackage{lipsum} usepackage{url} usepackage[utf8]{inputenc} usepackage{fancyhdr} usepackage{transparent} usepackage{hyphenat} usepackage{bm} newcommand{+}{discretionary{mbox{${bmcdot}mkern-1mu$}}{}{}} usepackage{microtype} usepackage{xstring} usepackage{forloop} usepackage{collcell} usepackage{longtable} usepackage{makecell} usepackage{varwidth} usepackage{textcomp} usepackage{enumitem} usepackage{textcomp} usepackage{placeins} usepackage[T1,T2A]{fontenc} usepackage{CJKutf8} usepackage[english,russian]{babel} usepackage{alltt} usepackage{caption} %usepackage{Sweave} captionsetup{skip=5pt,font=footnotesize} usepackage[labelformat=empty]{caption} usepackage{needspace} usepackage{setspace} usepackage{multirow} usepackage{IEEEtrantools} usepackage{amsmath} usepackage[colorlinks]{hyperref} hypersetup{colorlinks, linkcolor=red, urlcolor=blue, pdfborderstyle={/S/U/W 1} } definecolor{rowcol}{rgb}{.714, .855, .957} definecolor{headcol}{rgb}{.537, .769, .933} definecolor{yel}{rgb}{1, 1, 0} definecolor{logcol}{rgb}{0,.411,0.655} definecolor{paleyellow}{rgb}{1,1,0.8} pagestyle{fancy} fancyhf{} fancyhead{} fancyfoot{} %chunk = 1 fancyfoot[C]{begin{mdframed}[roundcorner=0pt,leftmargin=0, rightmargin=0, linecolor=white,outerlinewidth=.1, innerleftmargin=0,innertopmargin=0,innerbottommargin=0,innerrightmargin=0,everyline = true, splittopskip=.6cm, splitbottomskip=.3cm] parbox[t]{0.333textwidth} {raggedright{scriptsizetextcolor{white}{ 4795271 }}} parbox[t]{0.31textwidth} {centering{scriptsizetextcolor{white}{thepage}}} parbox[t]{0.333textwidth} {raggedleft{scriptsizetextcolor{white}{ 2013-08-30 }}} end{mdframed}} definecolor{textcol}{rgb}{.118, .565, 1.00}definecolor{maincol}{rgb}{.219, .6941, .8941} patchcmd{tableofcontents}{section*}{vspace*{-30pt}section*}{}{} makeatletter patchcmd{l@section}% {begingroup}% {begingroupnormalfontLargebfseries}% {}{}% newcommandmdframedintoc{parbigskip% begin{mdframed}[roundcorner=0pt,leftmargin=0, rightmargin=0, linecolor=gray,outerlinewidth=.1, innerleftmargin=4, innerrightmargin=4, innertopmargin=4,innerbottommargin=4, everyline = true, splittopskip=.6cm, splitbottomskip=.3cm] centering includegraphics[trim=2.8cm 4cm 1.5cm 12.8cm, clip=true,width=0.75linewidth] {./tmp/risk_legend.pdf} end{mdframed}parbigskip begin{mdframed}[roundcorner=0pt,leftmargin=0, rightmargin=0, linecolor=white,outerlinewidth=.001, innerleftmargin=0, innerrightmargin=0, innertopmargin=0,innerbottommargin=0, everyline = true, splittopskip=.6cm, splitbottomskip=.3cm] %chunk = 2 ~\[35pt] hspace{1mm} normalsizetextcolor{textcol}{textbf{{NA}}} {renewcommand{arraystretch}{-1}begin{longtable}{P{4.5cm}M{5.55cm}P{1cm}} hspace{-.2cm}normalfontsmallbfseries{Aspirin} & &normalfontsmallbfseries{63}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ hspace{-.2cm}normalfontsmallbfseries{Bucindolol (beta-blocker)} & &normalfontsmallbfseries{64}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ hspace{-.2cm}normalfontsmallbfseries{Metoprolol (beta-blocker)} & &normalfontsmallbfseries{65}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ hspace{-.2cm}normalfontsmallbfseries{Plavix (Clopidogrel)} & &normalfontsmallbfseries{67}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ hspace{-.2cm}normalfontsmallbfseries{Statins} & &normalfontsmallbfseries{68}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ hspace{-.2cm}normalfontsmallbfseries{Warfarin} & &normalfontsmallbfseries{70}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ smalltextcolor{white}{data}& &smalltextcolor{white}{data}\ end{longtable}} footnotesize end{mdframed}% } patchcmd{tableofcontents}{@starttoc{toc}}{@starttoc{toc}mdframedintoc}{}{} makeatother newcolumntype{P}[1]{>{RaggedRighthspace{0pt}}p{#1}} begin{document} ifthenelse{isodd{thepage}}{newpagembox{}thispagestyle{empty}newpage}{} newpage newcolumntype{M}[1]{>{centeringarraybackslash}p{#1}} ~\[-22pt] arrayrulecolor{black} newcommand{dsr}{rule[-1.2cm]{0pt}{2cm}} newcommand{nsr}{rule[-0.2cm]{0pt}{1cm}} newcommand{psr}{rule[-1.1cm]{0pt}{1.7cm}} arrayrulecolor{red} {renewcommand{arraystretch}{1.8}begin{longtable} {|P{3.4cm}|M{1.0cm}|P{4.0cm}|P{0.8cm}|} hline rowcolor{textcol} textbf{ textcolor{white}{Col1}} &textbf{ textcolor{white} {Col2}} &textbf{ textcolor{white}{Col3}} &textbf{ textcolor{white}{Col4}} \ endfirsthead rowcolor{textcol} textbf{ textcolor{white}{Col1}} &textbf{ textcolor{white} {Col2}} &textbf{ textcolor{white}{Col3}} &textbf{ textcolor{white}{Col4}} \ endhead hline rowcolor[RGB]{243,189,185} AAAAAAAAAAAA & 3.38& multirow{-1}{*}{parbox{4.0cm}{textcolor{black}{rwqerwrwr wrwrweqrw qrwerwqerwrwe qreqrweqweqrf sfsfsdfsdafsd rweqrwetw efsdfsft}}} & dsr cellcolor{red!25}18\cline{1-2} cline{4-4} hline rowcolor[RGB]{251,204,157} AAAAAAAAAAAA & 1.8 & & nsr cellcolor{yellow!25}35\cline{1-2} cline{4-4} rowcolor[RGB]{251,204,157} AAAAAAAAAAAA & 1.6 & & nsr cellcolor{yellow!25}11\cline{1-2} cline{4-4} rowcolor[RGB]{251,204,157} AAAAAAAAAAAA & 1.55& multirow{-5}{*} {parbox{4.0cm}{textcolor{black}{reqw fsdafsad 34rweqrtwqe rfdrweqr 4rwerqwe rqrwqerwq rqwrwqrt ffa afsdafasf reqfsd }}} & nsr cellcolor{yellow!25}52\cline{1-2} cline{4-4} hline rowcolor[RGB]{255,255,51} AAAAAAAAAAAA & 1.4 & & psr cellcolor{yellow!25}15\cline{1-2} cline{4-4} rowcolor[RGB]{255,255,51} AAAAAAAAAAAA & 1.2 & & psr cellcolor{yellow!25}25\cline{1-2} cline{4-4} rowcolor[RGB]{255,255,51} AAAAAAAAAAAA & 1.02& multirow{-5}{*} {parbox{4.0cm}{textcolor{black}{fsda fsdafsda fsdafsda fsdafsafs ffdfass terwtert werweter twetwerter tetewrterw treterr rtwetewte rtewteew trweterw ~\ ~\ ertewq rwrwqt rwqrwtwq rwqrwtwq rwteeq rtwetyerewy }}} & psr cellcolor{yellow!25}39\cline{1-2} cline{4-4} hline rowcolor{rowcol} rweqrt & N/A & wertwer & 45 \ hline end{longtable}} arrayrulecolor{black} end{document}linecolor=goldenpoppy