将文本放置在页面的任意位置

将文本放置在页面的任意位置

我想在几页的任意位置放置一些文本和一些公式。对于公式,我使用包 tikzpicture,如下所示:

\begin{tikzpicture}
\draw (5,-10)  node{
$ \left\lbrace \begin{array} \sin x>0 & 0<x<\frac{\pi}{2} \\ \sin x >0 & \frac{\pi}{2}<x<\pi \\  \sin x<0 & \pi <x<\frac{3\pi}{2} \\  \sin x<0 & \frac{3\pi}{2}<x<2\pi  \end{array} \right.  $
    };
\end{tikzpicture}

并且没有问题。但有时使用上述方法时,我会遇到文本问题:文本的宽度大于页面的宽度,并且 tikzpicture 不会换行。例如:

\begin{tikzpicture}
\draw (5,-13)  node{The proof of that theorem in not complete and  we can prove that theorem by another way that you will read it in the coming year
    };
\end{tikzpicture}

在此处输入图片描述

有没有命令可以换行?有没有办法把文本放在页面的任意位置(有或没有 tikzpicture)?(非常感谢)

答案1

让我将我的评论延伸到答案:

\documentclass{article}
%---------------- Show page layout. Don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}

\noindent\begin{tikzpicture}[
node distance=0mm
                    ]
\node (n1) [left] at (\linewidth,0)
    {$\begin{cases} \sin x > 0 & 0<x<\frac{\pi}{2}      \\
                    \sin x > 0 & \frac{\pi}{2}<x<\pi    \\
                    \sin x < 0 & \pi <x<\frac{3\pi}{2}  \\
                    \sin x < 0 & \frac{3\pi}{2}<x<2\pi  \\
      \end{cases}$};
\node (n2) [below left=of n1.south east,
       text width=\linewidth, align=left,
       inner xsep=0pt] {The proof of that theorem in not complete and  we can prove that theorem by another way that you will read it in the coming year};
\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容