如何让tikz绘制的图片与array竖直方向“底对齐”“居中对齐”“顶对齐”

2020-01-11 16:39发布

```tex \documentclass{book} \usepackage{amsmath} \usepackage{txfonts} \usepackage{tikz} \begin{doc...

```tex \documentclass{book} \usepackage{amsmath} \usepackage{txfonts} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) -- (4,0) -- (5,2) --(1,2)-- cycle; \node (j) at (0.5,0.3) {$\alpha$}; \draw[color=red] (1,1) --(2.5,1)node[above]{$b$}-- (4,1); \draw[color=blue] (1,2.5) --(2.5,2.5)node[above]{$a$}-- (4,2.5); \end{tikzpicture} $\left.\begin{array}{l} a//b\\ b\subset \alpha \\ a\nsubset \alpha \end{array}\right\}\Rightarrow a//\alpha $ \end{document} ```
2条回答
主要是依赖于 `baseline` 来进行调整,参考 [https://tex.stackexchange.com/questions/57019/inline-tikz-vertical-centering](https://tex.stackexchange.com/questions/57019/inline-tikz-vertical-centering) ```tex \documentclass{book} \usepackage{amsmath} \usepackage{txfonts} \usepackage{tikz} \begin{document} \begin{tikzpicture}[baseline=25pt] \draw(0,0) -- (4,0) -- (5,2) --(1,2)-- cycle; \node (j) at (0.5,0.3) {$\alpha$}; \draw[color=red] (1,1) --(2.5,1)node[above]{$b$}-- (4,1); \draw[color=blue] (1,2.5) --(2.5,2.5)node[above]{$a$}-- (4,2.5); \end{tikzpicture} \( \left. \begin{array}{l} a//b\\ b\subset \alpha \\ a\nsubset \alpha \end{array} \right\} \Rightarrow a // \alpha \) \end{document} ```

作者追问:2020-01-11 17:17

感谢热心回答!

一周热门 更多>

相关问答