
在 LaTeX 中排版 $\mathbb{R}$ 上的二元關係圖的最佳方法是什麼,類似於以下:
粗線表示二元關係(由三個線段組成)。
答案1
$\text{No MWE or attempt} \mapsto \text{minimal explanations from me}$
。此處介紹的所有內容均在pgfmanual
或 的第 2 章中介紹Tikz 命令總結。這是一種方法,但可能不是最好的方法:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[thin,gray,text=black,<->] (0,1.4) node[left] {$y$}
|- (1.4,0) node[below] {$x\vphantom{1}$};
\draw[densely dotted,gray] (1,0) |- (0,1);
\draw[thick] (0,1) node[left] {$1$}
-- (0,0) node[below left] {$0$}
-- (1,0) node[below] {$1$}
(0,0) -- (1,1);
\end{tikzpicture}
\end{document}