0

I apologize if this is simple, but I am not really sure how to do this.

Is there a way to make the smaller fonts not stretch horizontally so much? From what I read it is for readability, but in this day and age we can all zoom in on a PDF to read fonts, and tons of papers have incredibly small font size for footnotes, which is fine because you can just zoom in.

I have a table and I set the font to \tiny initially, and currently I have it as \fontsize{6}{6}\selectfont. I know for a fact that what I have written will perfectly fit in one line (made it in word), but I cannot do it in a table environment within LaTeX, unless I use \fontsize{5}{5}\selectfont. Using \fontsize{6}{6}\selectfont will not have enough room for the text to all fit on one line. So ,does anyone know how to reduce the stretching of small fonts for visibility sakes, which IMO isn't super necessary, since word will do this perfectly, and we can just zoom in.

Here is a MWE showing the issue.

\documentclass[12pt]{report}

\usepackage[left=1.5in,right=1.0in,top=1.0in,bottom=1.0in,footskip=0.5in]{geometry} \usepackage{graphicx} \usepackage{booktabs} \usepackage{tabulary} \usepackage{pdflscape} \usepackage[T1]{fontenc} \usepackage[skip=0.5ex]{caption} % skip specifies space between caption and toprule

\begin{document}

\begin{landscape}

\begin{table}[ht] \fontsize{6}{6}\selectfont \caption{Brief summary some data} \begin{tabulary}{\linewidth}{@{}LLLLLLLLL@{}} \label{tab:table1}\ \toprule \textbf{Header} & \textbf{Header} & \textbf{Header} & \textbf{Header} & \textbf{Longer header} & \textbf{Another header} & \textbf{Another header} & \textbf{Header 2} & \textbf{Header 3} \ \midrule Data & Some tex that might be long & Some more text & More text & More text & Some more text & More text & Even more text & Some more text that might be even longer with more text \* \bottomrule \end{tabulary} \end{table} \end{landscape}

\end{document}

This results in this

enter image description here

As you can see it currently uses \fontsize{6}{6}\selectfont but the font is stretched a lot horizontally.

Also, the rendering is quite poor when zoomed in.

enter image description here

EDIT:

Okay so here is what I am looking for, but seriously there has to be a better way to then to custom-specify every entry to scalebox.

MWE working, but is there a better way??

\documentclass[12pt]{report}

\usepackage[left=1.5in,right=1.0in,top=1.0in,bottom=1.0in,footskip=0.5in]{geometry} \usepackage{graphicx} \usepackage{booktabs} \usepackage{tabulary} \usepackage{pdflscape} \usepackage{xcolor} \pagecolor{white} %renders latex PDF in white background \usepackage[T1]{fontenc} \usepackage[skip=0.5ex]{caption} % skip specifies space between caption and toprule

\newcommand{\tinyb}[1]{\scalebox{0.5}{{\normalsize #1}}} % properly scale smaller font sizes \begin{document}

\begin{landscape}

\begin{table}[ht] \fontsize{6}{6}\selectfont \caption{Brief summary some data} \begin{tabulary}{\linewidth}{@{}LLLLLLLLL@{}} \label{tab:table1}\ \toprule \tinyb{\textbf{Header}} & \tinyb{\textbf{Header}} & \tinyb{\textbf{Header}} & \tinyb{\textbf{Header}} & \tinyb{\textbf{Longer header}} & \tinyb{\textbf{Another header}} & \tinyb{\textbf{Another header}} & \tinyb{\textbf{Header 2}} & \tinyb{\textbf{Header 3}} \ \midrule \tinyb{Data} & \tinyb{Some tex that might be long} & \tinyb{Some more text} & \tinyb{More text} & \tinyb{More text} & \tinyb{Some more text} & \tinyb{More text} & \tinyb{Even more text} & \tinyb{Some more text that might be even longer with more text} \* \bottomrule \end{tabulary} \end{table} \end{landscape}

\end{document}

Which results in this, which is what I am trying to accomplish. Perfectly legible, and the characters are actually properly rendered when zoomed in.

enter image description here enter image description here

So, I ask again. Is there a way to do it so that I don't have to literally specify every entry in a table?

jfang5
  • 49
  • 1
    Note: That MWE is missing at least one line: LaTeX Error: \usepackage before \documentclass.. – pst Jul 26 '21 at 06:11
  • 1
    The characters are not stretched – that is how they look. Maybe you simply want to use some other font instead? Maybe \usepackage{mathptmx} for Times, since it is designed for cramming in a lot in a small width? – pst Jul 26 '21 at 06:28
  • 1
    With so small fonts your table will become unreadable. It would be good to reconsider how the table should looks. – Zarko Jul 26 '21 at 06:49
  • Unrelated: if you want readers to zoom, perhaps use an actual Infodot: https://tex.stackexchange.com/questions/501281/how-to-hide-searchable-text-behind-a-figure-image/510523#510523 – Cicada Jul 26 '21 at 07:18
  • See my edit. That is what I am looking for, if there isn't a way to automate then I will suffer through and type 5 characters followed by curly brackets for, oh god like 200 terms, but I rather not... – jfang5 Jul 26 '21 at 20:34
  • Is this what you are looking for? https://tex.stackexchange.com/questions/328228/appearance-of-tiny-or-scriptsize-fontsize-in-latex-horizontal-stretch – Steven B. Segletes Jul 27 '21 at 00:25
  • That is very similar to the solution I am looking for, but I tried to do it for computer modern instead of latin modern and couldn't get it to work. I also very much need small caps to work. – jfang5 Jul 27 '21 at 01:43

0 Answers0