LaTeX forum ⇒ Graphics, Figures & Tablesresize big font size in a table include images

Information and discussion about graphics, figures & tables in LaTeX documents.
Ahmed Sokar
Posts: 4
Joined: Wed Jul 27, 2016 9:43 am

resize big font size in a table include images

Postby Ahmed Sokar » Tue Aug 02, 2016 2:48 am

Hello,

I have table which includes images and text. The point is that the document font is pretty big, therefore i need to automatically resize the pictures and the font size in the table. I also need the table to be with width=\textwidth and height of 80% of the paper height.

All of that is working except that resizing the font size stretches the text vertically.

Is there away to resize the font size with keeping the height relative to the width of the font?

I would appreciate general solution of resizing as i have many tables in the document.

  1. \documentclass[48pt,oneside,a4paper,extrafontsizes]{memoir}
  2.  
  3.  
  4. \usepackage[demo]{graphicx}
  5.  
  6. \begin{document}
  7.  
  8.  
  9. \begin{table*}[h!]\centering
  10. \resizebox{\textwidth}{0.4\textheight}{
  11. \begin{tabular}{|c|c|c|c|}
  12. \hline\noalign{}
  13. Chair&
  14. air&
  15. international&
  16. Ali
  17. \\\hline
  18. latex &latex &latex &latex\\\hline
  19. latex &latex &latex &latex\\\hline
  20. latex &latex &latex &latex\\\hline
  21. \includegraphics[width=\linewidth,height=0.2\textwidth]{demo}
  22. &\includegraphics[width=\linewidth,height=0.2\textwidth]{demo}
  23. &\includegraphics[width=\linewidth,height=0.2\textwidth]{demo}
  24. &\includegraphics[width=\linewidth,height=0.2\textwidth]{demo}\\\hline
  25. Chair&
  26. air&
  27. international&
  28. Ali
  29. \\\hline
  30. Chair&
  31. air&
  32. international&
  33. Ali
  34. \\\hline
  35. latex &latex &latex &latex\\\hline
  36. latex &latex &latex &latex\\\hline
  37. \end{tabular}}
  38. \end{table*}
  39.  
  40. \end{document}


Capture.JPG
Capture.JPG (32.72 KiB) Viewed 1736 times

User avatar
Johannes_B
Site Moderator
Posts: 4143
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Aug 02, 2016 4:53 pm

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 3 guests