TeX - LaTeX Asked on December 28, 2020
I want to replicate the table (3 by 6), and it should be sizable in order to get inside mini page.
documentclass{report}
usepackage{tikz}
usetikzlibrary{arrows.meta}
usepackage{tabularx}
% New Commands
newcommand{sdgarr}[2]{
tikz draw[-{Straight Barb[line width=.2cm,line join=round,line cap=round]},line width=.2cm,color=#2,line cap=round,rotate=#1-45] (0,0) - - (1,1);
}
newcommand{sdgcir}[1]{
tikz draw[fill=#1,color=#1] (0,0) circle (5pt);
}
begin{document}
begin{tabularx}{0.95linewidth}{|X|X|}
centering
hline
1 NO newline POVERTY newline
sdgarr{red}{45}
&
2 ZERO newline Hunger newline
sdgcir{gray}
hline
end{tabularx}
end{document}
I asked similar question, but I was not clear enough.
Edit:
As promised I wee bit improve suggest solution:
documentclass[table]{report}
usepackage{geometry}
usepackage{tikz}
usetikzlibrary{arrows.meta}
usepackage{makecell, multirow, tabularx}
usepackage{graphicx}
% arrows
newcommand{rotarr}[2]{centerline{
tikz[baseline]{%
path[draw=#1,line width=3mm, line join=round,line cap=round,
-{Straight Barb[scale=1.2, line join=round,line cap=round]},
rotate around={#2:(0,0)}] (-0.4linewidth,0) -- (0.4linewidth,0);}
}}
% circle fill, meaning zero?
newcommand{zero}{centerline{
tikz[baseline]{node[circle, fill=gray, minimum size=0.8linewidth] {};}
}}
% columns headers
newcommand{cellhead}[2]{smallskipcenterline{
begin{tabular}[t]{@{} >{sffamilybfseries}l @{,}
>{sffamilybfseries}l
@{} }
multirow[b]{2}{*}{scalebox{2.8}{#1}} & {makecell[lt]{#2}}
end{tabular} } }
begin{document}
begin{center}
setlengtharrayrulewidth{1pt}
arrayrulecolor{cyan}
begin{tabularx}{linewidth}{|*{6}{X|}}
% first two-line row
hline
cellhead{1}{NOPOVERTY}
& cellhead{2}{ZEROHUNGER}
& cellhead{3}{WHATEVER}
& cellhead{4}{NOPOVERTY}
& cellhead{5}{ZEROHUNGER}
& cellhead{6}{WHATEVERNEWER}
rotarr{red}{45}
& zero
& rotarr{purple}{-90}
& rotarr{orange}{0}
& rotarr{teal}{90}
& rotarr{orange}{0}
% second two-line row
hline
cellhead{7}{NOPOVERTY}
& cellhead{8}{ZEROHUNGER}
& cellhead{9}{WHATEVER}
& cellhead{10}{NOPOVERTY}
& cellhead{11}{ZEROHUNGER}
& cellhead{12}{WHATEVERNEWER}
rotarr{red}{45}
& zero
& rotarr{purple}{-90}
& rotarr{orange}{0}
& rotarr{teal}{90}
& rotarr{orange}{0}
hline
end{tabularx}
end{center}
end{document}
Answered by Zarko on December 28, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP