投影机中的文本对齐

投影机中的文本对齐

我使用 LaTeX 制作演示文稿。但我有一张包含图片和文字的幻灯片,我想让文字右对齐。该怎么做?

\documentclass{beamer}
\begin{document}
\begin{frame}

\begin{block}{Подпрограма Solver}
\end{block}

\begin{itemize}
\item Изпълнява се n -- пъти; \\ 
\item $\overline{F}(\varphi) = -\varphi \, '' + \sin \varphi - \gamma$; \\
  \item $\varepsilon$ -- стоп--критерий. \\
\end{itemize}

\tikzstyle{my loop}=[->,to path={
.. controls +(300:1) and +(560:1) .. (\tikztotarget) \tikztonodes}]


\begin{tikzpicture}

\path (0, 0) node(a) [ellipse, draw] {$\varphi_0$};
\path (0, -1) node(b) [rectangle, draw] {$\varphi^n = \varphi^{n-1} + \tau_n \cdot     w^n$};
\path (0, -3) node(c) [diamond, draw] {$\| \overline{F}(\varphi^n) \| < \varepsilon$};
\path (6, -3) node(d) [rectangle, draw] {Продължаваме (получили сме решение)};

\draw[->] (a) to (b);
\draw[->] (b) to (c);
\draw[->] (c) to node[above] {да} (d);
\draw[->] (c) to (0, -5) node[right] {не} to (-2.5, -5) to (-2.5, 0) to (a);

\end{tikzpicture}
\end{frame}
\end{document}

答案1

你可以试试\hfill

\hfill Right aligned text

应该做你想做的事。

答案2

为此,最好的办法是利用环境columns

例如:

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{shapes}
\begin{document}
\tikzstyle{my loop}=[->,to path={
 .. controls +(300:1) and +(560:1) .. (\tikztotarget) \tikztonodes}]
\begin{frame}

\begin{block}{Подпрограма Solver}
\end{block}

\begin{columns}[T]

\begin{column}{0.5\textwidth}
% first column: the image
\begin{tikzpicture}     
\path (0, 0) node(a) [ellipse, draw] {$\varphi_0$};
\path (0, -1) node(b) [rectangle, draw] {$\varphi^n = \varphi^{n-1} + \tau_n \cdot w^n$};
\path (0, -3) node(c) [diamond, draw] {$\| \overline{F}(\varphi^n) \| < \varepsilon$};
\path (6, -3) node(d) [rectangle, draw] {Continue (we received an answer)};

\draw[->] (a) to (b);
\draw[->] (b) to (c);
\draw[->] (c) to node[above] {if yes} (d);
\draw[->] (c) to (0, -5) node[right] {if not} to (-2.5, -5) to (-2.5, 0) to (a);
\end{tikzpicture}
\end{column}

\begin{column}{0.5\textwidth}
% second column: the text
\begin{itemize}
\item Runs n - times; \\ 
\item $\overline{F}(\varphi) = -\varphi \, '' + \sin \varphi - \gamma$; \\
\item $\varepsilon$ -- stop-test. \\
\end{itemize}
\end{column}

\end{columns}

\end{frame}
\end{document}

实际上,我用英文翻译了标签:如果不准确,请见谅。

图形结果为:

在此处输入图片描述

相关内容