I want to produce svg images of tikz pictures in a standalone environment that match the main document. So far everything works just fine. However, I am struggeling with defining the fontsize of the main document, which in this case is a beamer presentation with fontsize 9pt. How is it possible to set normalfontsize to 9pt in the standalone too?
MWE of main document:
\documentclass[9pt]{beamer}
\usepackage{fontspec}
\setmainfont{Arial}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (-0.4,0) -- (10.6,0);
\node[anchor=north east,align=right, inner sep=2mm, yshift=-0.5cm, xshift=0cm,font=\centering\bfseries\huge](a) at (current bounding box.east){This is the Main Title:};
\node[anchor=north east,align=right, inner sep=2mm, yshift=0.2cm, xshift=0cm,font=\centering\bfseries\large](b) at (a.south east){And this is the Subtitle that fits within the black border lines.};
\node[anchor=north east,align=right, inner sep=2mm, yshift=-0.4cm, xshift=0cm,font=\centering](c) at (b.south east){Name 1, Name 2};
\draw (-0.4,0) -- (-0.4,-5);
\draw (10.6,0) -- (10.6,4.5);
\end{tikzpicture}
\end{document}
MWE of the Standalone:
\documentclass[crop,tikz,convert=pdf2svg]{standalone}
\usepackage[inkscapelatex=false]{svg}
\usepackage{fontspec}
\setmainfont{Arial}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (-0.4,0) -- (10.6,0);
\node[anchor=north east,align=right, inner sep=2mm, yshift=-0.5cm, xshift=0cm,font=\centering\bfseries\huge](a) at (current bounding box.east){This is the Main Title:};
\node[anchor=north east,align=right, inner sep=2mm, yshift=0.2cm, xshift=0cm,font=\centering\bfseries\large](b) at (a.south east){And this is the Subtitle that fits within the black border lines.};
\node[anchor=north east,align=right, inner sep=2mm, yshift=-0.4cm, xshift=0cm,font=\centering](c) at (b.south east){Name 1, Name 2};
\draw (-0.4,0) -- (-0.4,-5);
\draw (10.6,0) -- (10.6,4.5);
\end{tikzpicture}
\end{document}
MWE of the standalone gives:
{
&}
. You can add font-sizes likelarge
,small
,footnotesize
,normalsize
in those delimiters. eg. {\normalsize This is the main title} Try on your own, if you didn't get it, I'll post an example-answer. – Niranjan Feb 24 '20 at 15:30current bounding box
is in time of using unknown, drawn lines are over text and partly invisible .... Please provide a sketch, that you like to have (i suspect that right aligned titles and names with lines around). I took a liberty and add to your question a image what your MWE produce. – Zarko Feb 24 '20 at 16:00