![No se pudo establecer correctamente el tamaño de tikzpicture en beamerposter](https://rvso.com/image/391719/No%20se%20pudo%20establecer%20correctamente%20el%20tama%C3%B1o%20de%20tikzpicture%20en%20beamerposter.png)
Intenté insertar una imagen de TikZ que se proporciona a continuación en un documento de beamerposter.
Se genera con el siguiente código (excepto la flecha en medio del "rayo incidente", es un detalle excesivo):
\begin{tikzpicture}
% axes and origin
\coordinate (O) at (0, 0);
\draw node[anchor=north east] {$O$};
\draw [->] (-3,0)--(3,0) node [pos=0.98, below] {$x$};
\draw [->] (0,-1)--(0,3) node [pos=0.98, left] {$z$};
% orts
\draw [thick, ->] (O)--(1,0) node[pos=1, below] {$\vc e_x$};
\draw [thick, ->] (O)--(0,1) node[pos=1, left] {$\vc e_z$};
% vector k and its angle chi
\coordinate (K) at ({2.6*sin(30)},{2.6*cos(30)});
\draw [thick, ->] (O)--(K) node[pos=1, right] {$\vc k$};
\draw ([shift=(60:0.5)] O) arc (60:90:0.5) node[pos=0.35, above] {$\chi$};
% k projections
\coordinate (Kx) at (K |- O);
\coordinate (Kz) at (K -| O);
\draw [thick, ->](O)--(Kx) node[pos=1.15, below] {$\vc k_x$};
\draw [thick, ->](O)--(Kz) node[pos=1, left] {$\vc k_z$};
\draw [dashed] (K)--(Kz);
\draw [dashed] (K)--(Kx);
% foton beam
\draw (-3, 2)--(O) node[pos=0.45, above] {$\ \hbar \omega$};
\end{tikzpicture}
Cuando inserto este fragmento de código en cualquier parte del documento de beamerposter (ya sea dentro \begin{block}...\end{block}
o justo dentro del marco), obtengo este feo resultado (la imagen ocupa todo el ancho del póster):
MWE
\documentclass[final, 24pt]{beamer}\usetheme{Frankfurt}\usecolortheme{orchid}\usefonttheme[onlymath]{serif}\mode<presentation>
\usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[english, russian]{babel}
\usepackage{tikz}
\newcommand{\vc}[1]{\mathbf {#1}}
\begin{document}
\begin{frame}{}
\begin{center}
\begin{tikzpicture}
% ... picture code given above
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}
¿Cómo hago para que su apariencia sea aceptable? Reescalado mediante
\scalebox{2.2}{
\begin{tikzpicture}[scale=3]
% picture code
\end{tikzpicture}
}
produce esta salida (también abarca todo el ancho del papel)
Luego puedo hacer algunos ajustes en el ancho de línea ( \draw[..., line width=0.33ex]
por ejemplo) manualmente para obtener un resultado razonable:
Quiero preguntarle a la comunidad si hay otra manera de obtener el resultado deseado (tal vez sea un problema ampliamente conocido pero no lo he buscado directamente en Google) y por qué la "portación" directa de un bonito código de imagen desde un documento a4 produce tal ¿basura?
Respuesta1
¡Bienvenido a TeX-SE! Podrías agregar algunas directivas a los estilos every path
y every node
. Aquí hay un ejemplo.
\documentclass[final, 24pt]{beamer}\usetheme{Frankfurt}\usecolortheme{orchid}\usefonttheme[onlymath]{serif}\mode<presentation>
\usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[english, russian]{babel}
\usepackage{tikz}
\newcommand{\vc}[1]{\mathbf {#1}}
\begin{document}
\begin{frame}{}
\begin{center}
\begin{tikzpicture}[scale=12,every path/.append style={
line width=4*\pgflinewidth},every node/.append style={scale=0.2,transform
shape}]
% axes and origin
\coordinate (O) at (0, 0);
\draw node[anchor=north east] {$O$};
\draw [->] (-3,0)--(3,0) node [pos=0.98, below] {$x$};
\draw [->] (0,-1)--(0,3) node [pos=0.98, left] {$z$};
% orts
\begin{scope}[thick]
\draw [->] (O)--(1,0) node[pos=1, below] {$\vc e_x$};
\draw [->] (O)--(0,1) node[pos=1, left] {$\vc e_z$};
% vector k and its angle chi
\coordinate (K) at ({2.6*sin(30)},{2.6*cos(30)});
\draw [thick, ->] (O)--(K) node[pos=1, right] {$\vc k$};
\end{scope}
\draw ([shift=(60:0.5)] O) arc (60:90:0.5) node[pos=0.35, above] {$\chi$};
% k projections
\coordinate (Kx) at (K |- O);
\coordinate (Kz) at (K -| O);
\begin{scope}[thick]
\draw [->](O)--(Kx) node[pos=1.15, below] {$\vc k_x$};
\draw [->](O)--(Kz) node[pos=1, left] {$\vc k_z$};
\end{scope}
\draw [dashed] (K)--(Kz);
\draw [dashed] (K)--(Kx);
% foton beam
\draw (-3, 2)--(O) node[pos=0.45, above] {$\ \hbar \omega$};
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}
Por supuesto no sé qué te gusta más pero puedes ajustar los escalados a tus necesidades.
EDITAR: Se corrigieron las flechas. Por la forma en que TikZ analiza las rutas. Podría decirse que la opción más simple es establecer el ancho de la línea mediante ámbitos.