Guest User

Untitled

a guest
Jul 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. documentclass[12pt,a4paper]{article}
  2. usepackage{graphicx}
  3. usepackage[table,xcdraw]{xcolor}
  4. renewcommand{arraystretch}{1.5}
  5. begin{document}
  6.  
  7. begin{figure}
  8. centering
  9. includegraphics{example-image-a}
  10. caption{Caption}
  11. label{fig:my_label}
  12. end{figure}
  13.  
  14. begin{table}
  15. centering
  16. begin{tabular}{rc|cc}
  17. multicolumn{1}{l}{} & multicolumn{1}{l}{} & multicolumn{2}{|c}{Figure~ref{fig:my_label} sub-plot} \ hline
  18. Variable & Unit & (a) & (b) \ hline
  19. One & m & cellcolor[HTML]{FFCCC9}Vary & 50 \
  20. Two & kg & 0.5 & cellcolor[HTML]{FFCCC9}Vary \
  21. Three & Hz & 1000 & 1000
  22. end{tabular}
  23. end{table}
  24.  
  25. end{document}
  26.  
  27. documentclass[12pt,a4paper]{article}
  28. usepackage{graphicx,tabularx}
  29. usepackage[table,xcdraw]{xcolor}
  30. renewcommand{arraystretch}{1.5}
  31. begin{document}
  32.  
  33. begin{figure}
  34. centering
  35. includegraphics{example-image-a}
  36. caption{Caption}
  37. label{fig:my_label}
  38. end{figure}
  39.  
  40. begin{table}
  41. centering
  42. begin{tabularx}{.6linewidth}{rc|XX}
  43. multicolumn{1}{l}{} & multicolumn{1}{l|}{} & multicolumn{2}{c}{Figure~ref{fig:my_label} sub-plot} \ hline
  44. Variable & Unit & (a) & (b) \ hline
  45. One & m & cellcolor[HTML]{FFCCC9}Vary & 50 \
  46. Two & kg & 0.5 & cellcolor[HTML]{FFCCC9}Vary \
  47. Three & Hz & 1000 & 1000
  48. end{tabularx}
  49. end{table}
  50.  
  51. end{document}
  52.  
  53. [![enter code here][1]][1]
  54.  
  55.  
  56. documentclass[12pt,a4paper]{article}
  57. usepackage{graphicx}
  58. usepackage[table,xcdraw]{xcolor}
  59. renewcommand{arraystretch}{1.5}
  60.  
  61. begin{document}
  62. begin{figure}
  63. centering
  64. includegraphics{example-image-duck}
  65. caption{Caption}
  66. label{fig:my_label}
  67. end{figure}
  68.  
  69. begin{table}[htb]
  70. centering
  71. begin{tabular}{>{raggedleft}p{4em}
  72. >{centering}p{4em} |
  73. *{2}{>{centeringarraybackslash}p{4em}}
  74. }
  75. multicolumn{2}{l|}{} & multicolumn{2}{c}{Figure~ref{fig:my_label} sub-plot} \ hline
  76. Variable & Unit & (a) & (b) \ hline
  77. One & m & cellcolor[HTML]{FFCCC9}Vary & 50 \
  78. Two & kg & 0.5 & cellcolor[HTML]{FFCCC9}Vary \
  79. Three & Hz & 1000 & 1000
  80. end{tabular}
  81. end{table}
  82. end{document}
  83.  
  84. documentclass[12pt,a4paper]{article}
  85. usepackage[table,xcdraw]{xcolor}
  86. usepackage{array}
  87.  
  88. renewcommand{arraystretch}{1.5}
  89.  
  90. newlength{templen}
  91.  
  92. begin{document}
  93.  
  94. begin{figure}[htp]
  95. caption{Just for the number}label{fig:my_label}
  96. end{figure}
  97.  
  98. begin{table}[htp]
  99. centering
  100.  
  101. settowidth{templen}{Figure~ref{fig:my_label} sub-plot}
  102. setlength{templen}{dimexpr(templen-2tabcolsep)/2}
  103.  
  104. begin{tabular}{ r c | *{2}{>{centeringarraybackslash}p{templen}} }
  105. & & multicolumn{2}{c}{Figure~ref{fig:my_label} sub-plot} \
  106. hline
  107. Variable & Unit & (a) & (b) \
  108. hline
  109. One & m & cellcolor[HTML]{FFCCC9}Vary & 50 \
  110. Two & kg & 0.5 & cellcolor[HTML]{FFCCC9}Vary \
  111. Three & Hz & 1000 & 1000
  112. end{tabular}
  113. end{table}
  114.  
  115. end{document}
Add Comment
Please, Sign In to add comment