1

The {memoir} document class allows for text smaller than \tiny, with the \miniscule command, which can be useful, but I never find myself needing to write an actual memoir. I tend to use either {article} or {\standalone}, or a combination of the two. For instance I might start an article and as the main file, draw standalone diagrams in separate files, and insert the graphics with something like:

    \noindent\makebox[\textwidth]
        {\includegraphics[scale=0.8]{illustration.pdf}}

After all, the best thing about vectors is they're scalable.
Here's a quick demo of a situation where \miniscule text might be useful:

enter image description here

It looks okay, but I want to make the [32-bit] text smaller:

(\textcolor{red!50!black!50}{\tiny{[32-bit]}})

%%% Document Preamble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[varwidth]{standalone}
\usepackage{tikz, xcolor}
\usetikzlibrary{arrows, arrows.meta}
\begin{document}
%%% Tikz Preamble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % Set Default Arrowheads, Node Distance, etc.
  \begin{tikzpicture}
    [-{>[scale=3,length=width=2]}, >=Stealth, 
    node distance=15mm, auto]
%%% Define Object Types %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \tikzstyle{red_ball} = [draw, circle, fill=red!20, 
    text width=1.5em, minimum height=2.5em, text centered]
  \tikzstyle{blue_ball} = [draw, circle, fill=blue!20, 
    text width=1.5em, minimum height=2.5em, text centered]
%%% Place Nodes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Associate Objects with Text
    \node[red_ball](Pbi) {$P_{\beta_{i}}$};
    \node[blue_ball, below of=Pbi](XOR) {$\oplus$};
    % Additional Annotations
    \node[yshift=12mm, below of=Pbi](PbiBits) 
      {\textcolor{red!50!black!50}{\tiny{[32-bit]}}};
%%% Draw Lines, Arrows, etc. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \draw[->](Pbi)--(XOR);
%%% Close Tikz Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \end{tikzpicture}
%%% Close Main Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
voices
  • 2,039
  • 2
    note \tiny{[32-bit]} should be \tiny [32-bit] font sizes do not take an argument you could use \fontsize{3pt}{4pt}\selectfont with fix-cm package if you use the standard cm fonts – David Carlisle Jul 10 '19 at 16:44
  • @David Seems to work with or without braces, but duly noted. Actually, I tried that with the fix-cm package but it seemed to go ignored. I think Computer Modern fonts are the default; I haven't changed them. I'll try again, thanks. – voices Jul 10 '19 at 16:51
  • yes the braces do nothing so it works with or without them but looksmisleading as you might expect \tiny{one} two three to just make one tiny but it applies to two and three as well. without fix-cm your will get font substitutions to a fixed set of sizes for cm, and will not be able to go below 5pt – David Carlisle Jul 10 '19 at 17:30

1 Answers1

3

You can define a very tiny font, but you need a freely scalable font. For the standard fonts, fix-cm is needed.

\RequirePackage{fix-cm}
\documentclass{standalone}
\usepackage{tikz, xcolor}
\usetikzlibrary{arrows, arrows.meta}

\newcommand{\veryverytiny}{\fontsize{3}{3}\selectfont}

\begin{document}
%%% Tikz Preamble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set Default Arrowheads, Node Distance, etc.
\begin{tikzpicture}[-{>[scale=3,length=width=2]},>=Stealth,node distance=15mm,auto]
%%% Define Object Types %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tikzset{
  red_ball/.style = {
    draw, circle, fill=red!20, text width=1.5em, minimum height=2.5em, text centered
  },
  blue_ball/.style = {
    draw, circle, fill=blue!20, text width=1.5em, minimum height=2.5em, text centered
  },
}
%%% Place Nodes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Associate Objects with Text
\node[red_ball](Pbi) {$P_{\beta_{i}}$};
\node[blue_ball, below of=Pbi](XOR) {$\oplus$};
% Additional Annotations
\node[yshift=12mm, below of=Pbi](PbiBits) {\textcolor{red!50!black!50}{\veryverytiny[32-bit]}};
%%% Draw Lines, Arrows, etc. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[->](Pbi)--(XOR);
%%% Close Tikz Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{tikzpicture}
%%% Close Main Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}

enter image description here

Note that \tikzstyle has been deprecated for some years.

I removed the varwidth option, because not needed.

egreg
  • 1,121,712
  • "Note that \tikzstyle has been deprecated for some years." Is that right? How come? I use it a lot. I mostly learn syntax by example and studying old code, so I guess it's bound too happen. Sometimes vestigial bits and pieces creep in like the varwidth you mentioned. Anyway I'll try this method; much appreciated. – voices Jul 10 '19 at 16:57
  • @tjt263 Read the quote from Till Tantau in https://tex.stackexchange.com/a/52379/4427 – egreg Jul 10 '19 at 17:05
  • Quick question: Why do you use \RequirePackage{fix-cm} instead of \usepackage{fix-cm}? – voices Jul 10 '19 at 17:25
  • @tjt263 Some fonts are loaded as soon as \documentclass is executed and would not obey properly to scaling, so doing \RequirePackage{fix-cm} prevents this possible issue. If you have \usepackage[T1]{fontenc} you can load fix-cm also after \documentclass. – egreg Jul 10 '19 at 17:30