[Tex/LaTex] font size in chemfig

chemfigfontsizescalingtikz-pgf

I am using chemfig scaling and want to increase the font size, but not any other parameter of the molecule. So a MWE would be:

\documentclass{article}
\usepackge{chemfig}

\begin{document}

\definesubmol{R1}{--[:150]-[::60]-[::-60]-[::60]-[::-60]-[::-60]-[::-60]-[::-60]-[::60]}
\definesubmol{R2}{--[:30]-[::-60]-[::60]-[::-60]-[::+60]-[::+60]-[::+60]-[::+60]-[::-60]}
\definesubmol{R3}{-[,0.6]}
\chemfig[][scale=0.7]{([:-18]N*5((!{R1})-(!{R3})=\chemabove{N}{\quad\scriptstyle\oplus}([:342]!{R2})-=-))}

\end{document}

Can I increase the font size minimally without changing the rest of the molecule?

Best Answer

To my surprise, the first or the second optional arguments of \chemfig do not take the option font=\Large (which is a tikz option for node font), contrary to what manual states. Here are the two methods mentioned by cgnieder along with a scalebox version (very hacky).

\documentclass{article}
\usepackage{chemfig,graphicx}

\begin{document}
%% ugly method and not advisable
\definesubmol{R1}{--[:150]-[::60]-[::-60]-[::60]-[::-60]-[::-60]-[::-60]-[::-60]-[::60]}
\definesubmol{R2}{--[:30]-[::-60]-[::60]-[::-60]-[::+60]-[::+60]-[::+60]-[::+60]-[::-60]}
\definesubmol{R3}{-[,0.6]}
\chemfig[][scale=0.7]{([:-18]\vphantom{N}\scalebox{1.2}%
{\smash{N}}*5((!{R1})-(!{R3})=\chemabove[0.8ex]{\vphantom{N}\scalebox{1.2}%
{\smash{N}}}{\quad\scriptstyle\oplus}([:342]!{R2})-=-))}

%% change printatom
\renewcommand * \printatom[1]{\Large\ensuremath{\mathrm{#1}}}

\definesubmol{R1}{--[:150]-[::60]-[::-60]-[::60]-[::-60]-[::-60]-[::-60]-[::-60]-[::60]}
\definesubmol{R2}{--[:30]-[::-60]-[::60]-[::-60]-[::+60]-[::+60]-[::+60]-[::+60]-[::-60]}
\definesubmol{R3}{-[,0.6]}
\chemfig[][scale=0.7]{([:-18]{N}*5((!{R1})-(!{R3})=\chemabove{N}{\quad\scriptstyle\oplus}([:342]!{R2})-=-))}
\renewcommand * \printatom[1]{\ensuremath{\mathrm{#1}}}   %% resetting for the example


%% fix a static bond length
\setatomsep{5mm}
\definesubmol{R1}{--[:150]-[::60]-[::-60]-[::60]-[::-60]-[::-60]-[::-60]-[::-60]-[::60]}
\definesubmol{R2}{--[:30]-[::-60]-[::60]-[::-60]-[::+60]-[::+60]-[::+60]-[::+60]-[::-60]}
\definesubmol{R3}{-[,0.6]}
\chemfig[][]{([:-18]{N}*5((!{R1})-(!{R3})=\chemabove{N}{\quad\scriptstyle\oplus}([:342]!{R2})-=-))}
\end{document}

enter image description here

Related Question