Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[12pt,a4paper]{article}
- usepackage{graphicx}
- usepackage[table,xcdraw]{xcolor}
- renewcommand{arraystretch}{1.5}
- begin{document}
- begin{figure}
- centering
- includegraphics{example-image-a}
- caption{Caption}
- label{fig:my_label}
- end{figure}
- begin{table}
- centering
- begin{tabular}{rc|cc}
- multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{2}{|c}{Figure~ref{fig:my_label} sub-plot} \ hline
- Variable & Unit & (a) & (b) \ hline
- One & m & cellcolor[HTML]{FFCCC9}Vary & 50 \
- Two & kg & 0.5 & cellcolor[HTML]{FFCCC9}Vary \
- Three & Hz & 1000 & 1000
- end{tabular}
- end{table}
- end{document}
- documentclass[12pt,a4paper]{article}
- usepackage{graphicx,tabularx}
- usepackage[table,xcdraw]{xcolor}
- renewcommand{arraystretch}{1.5}
- begin{document}
- begin{figure}
- centering
- includegraphics{example-image-a}
- caption{Caption}
- label{fig:my_label}
- end{figure}
- begin{table}
- centering
- begin{tabularx}{.6linewidth}{rc|XX}
- multicolumn{1}{l}{} & multicolumn{1}{l|}{} & multicolumn{2}{c}{Figure~ref{fig:my_label} sub-plot} \ hline
- Variable & Unit & (a) & (b) \ hline
- One & m & cellcolor[HTML]{FFCCC9}Vary & 50 \
- Two & kg & 0.5 & cellcolor[HTML]{FFCCC9}Vary \
- Three & Hz & 1000 & 1000
- end{tabularx}
- end{table}
- end{document}
- [![enter code here][1]][1]
- documentclass[12pt,a4paper]{article}
- usepackage{graphicx}
- usepackage[table,xcdraw]{xcolor}
- renewcommand{arraystretch}{1.5}
- begin{document}
- begin{figure}
- centering
- includegraphics{example-image-duck}
- caption{Caption}
- label{fig:my_label}
- end{figure}
- begin{table}[htb]
- centering
- begin{tabular}{>{raggedleft}p{4em}
- >{centering}p{4em} |
- *{2}{>{centeringarraybackslash}p{4em}}
- }
- multicolumn{2}{l|}{} & multicolumn{2}{c}{Figure~ref{fig:my_label} sub-plot} \ hline
- Variable & Unit & (a) & (b) \ hline
- One & m & cellcolor[HTML]{FFCCC9}Vary & 50 \
- Two & kg & 0.5 & cellcolor[HTML]{FFCCC9}Vary \
- Three & Hz & 1000 & 1000
- end{tabular}
- end{table}
- end{document}
- documentclass[12pt,a4paper]{article}
- usepackage[table,xcdraw]{xcolor}
- usepackage{array}
- renewcommand{arraystretch}{1.5}
- newlength{templen}
- begin{document}
- begin{figure}[htp]
- caption{Just for the number}label{fig:my_label}
- end{figure}
- begin{table}[htp]
- centering
- settowidth{templen}{Figure~ref{fig:my_label} sub-plot}
- setlength{templen}{dimexpr(templen-2tabcolsep)/2}
- begin{tabular}{ r c | *{2}{>{centeringarraybackslash}p{templen}} }
- & & multicolumn{2}{c}{Figure~ref{fig:my_label} sub-plot} \
- hline
- Variable & Unit & (a) & (b) \
- hline
- One & m & cellcolor[HTML]{FFCCC9}Vary & 50 \
- Two & kg & 0.5 & cellcolor[HTML]{FFCCC9}Vary \
- Three & Hz & 1000 & 1000
- end{tabular}
- end{table}
- end{document}
Add Comment
Please, Sign In to add comment