Tikz求相对位置坐标点的各绝对分量值

2020-03-04 18:10发布

```tex \documentclass{standalone} \usepackage{xeCJK} \usepackage{tikz} \usepackage{color} \begin{do...

```tex \documentclass{standalone} \usepackage{xeCJK} \usepackage{tikz} \usepackage{color} \begin{document} \begin{tikzpicture} \node[draw, align=center] (a) {aaaa\\aaa\\aaaaa\\a}; \fill (a.south east) circle (1pt); \node[below right, align=left] at (a.south east) {我想在这打印加粗这个点的绝对坐标$(x_0,y_0)$ (cm)\\和只打印其中一个分量$x=x_0$ cm\\甚至是极坐标$(\theta_0:r_0)$\\及其分量$\theta=\theta_0$ \textcolor{red}{rad}}; \end{tikzpicture} \end{document} ``` ![](https://pics.latexstudio.net/data/images/202003/7aab6c172d9dd75.png)
2条回答
vic156
2020-03-04 20:01
[https://tex.stackexchange.com/a/33706/204863](https://tex.stackexchange.com/a/33706/204863) 这个可以吗,要极坐标的话可以自己转化以下。 ```tex \documentclass{standalone} \usepackage{xeCJK} \usepackage{tikz} \usepackage{color} \usetikzlibrary{calc} \newdimen\XCoord \newdimen\YCoord \newcommand*{\ExtractCoordinate}[1]{\path (#1); \pgfgetlastxy{\XCoord}{\YCoord};}% \newcommand*{\LabelCurrentCoordinate}[2]{\fill [#1] ($(\XCoord,\YCoord)$) circle (2pt) node [right] {#2}}% \begin{document} \begin{tikzpicture} \node[draw, align=center] (a) {aaaa\\aaa\\aaaaa\\a}; \fill (a.south east) circle (1pt); \node[below right, align=left] at (a.south east) {我想在这打印加粗这个点的绝对坐标$(x_0,y_0)$ (cm)\\和只打印其中一个分量$x=x_0$ cm\\甚至是极坐标$(\theta_0:r_0)$\\及其分量$\theta=\theta_0$ \textcolor{red}{rad}}; \ExtractCoordinate{$(a.south east)$}; \LabelCurrentCoordinate{red}{ (\XCoord,\YCoord) }; \end{tikzpicture} \end{document} ```

一周热门 更多>