Tentei inserir uma imagem TikZ fornecida abaixo em um documento beamerposter.
Ele é gerado pelo seguinte código (exceto a seta no meio do "feixe incidente", é um detalhe excessivo):
\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}
Quando insiro esse trecho de código em qualquer lugar do documento beamerposter (dentro \begin{block}...\end{block}
ou apenas dentro do quadro), obtenho este resultado feio (a imagem abrange toda a largura do 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}
Como posso tornar sua aparência aceitável? Redimensionamento por meio de
\scalebox{2.2}{
\begin{tikzpicture}[scale=3]
% picture code
\end{tikzpicture}
}
produz esta saída (abrange também toda a largura do papel)
Então posso fazer alguns ajustes nas larguras das linhas ( \draw[..., line width=0.33ex]
por exemplo) manualmente para obter uma saída razoável:
Quero perguntar à comunidade se existe outra maneira de obter o resultado desejado (talvez seja um problema amplamente conhecido, mas não consegui pesquisá-lo diretamente no Google) e por que a 'portação' direta do código de imagem agradável do documento A4 produz tal lixo?
Responder1
Bem-vindo ao TeX-SE! Você poderia anexar algumas diretivas aos estilos every path
e every node
. Aqui está um exemplo.
\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}
Claro que não sei do que você mais gosta, mas você pode ajustar as escalas às suas necessidades.
EDITAR: Corrigidas as setas. Por causa da maneira como TikZ analisa os caminhos, a opção provavelmente mais simples é definir a largura da linha por meio de escopos.