LaTeX'te masayı nasıl çizebilirim?

Dec 18 2020

LaTeX'te masayı nasıl çizebilirim? Özellikle tablonun altındaki içerik?

Yanıtlar

10 Bernard Dec 18 2020 at 19:23

Bunu sıradan bir dizi ile yapabilirsiniz ve pstricks: 5 ve 8. sütunlardaki son elemanları \rnodes olarak tanımladım ve ilgili düğüm bağlantısına bağlıyım. Bu şekilde kullanılan kodun pstricks kısmının lateks için bir boyuta sahip olmadığına dikkat edin, bu nedenle aşağıdaki metinle herhangi bir örtüşmeyi önlemek için yalnızca dikey bir boşluk içeren ek bir satır ekledim.

\documentclass{article}
\usepackage{array}
\usepackage{bm}
\usepackage[semibold, condensed]{cabin}
\usepackage[usestackEOL]{stackengine}
\usepackage{pst-node}

\begin{document}

\[
\setlength{\extrarowheight}{3pt}
\begin{array}{ |*{8}{c|}}
\hline
\bm{A} & \bm{B} & \bm{C} & \bm{B\cap C}& \bm{A \cup ∪ (B \cap C)}& \bm{A \cup B}& \bm{A \cup C}& \bm{(A \cup B)\cap(A \cup C)} \\
\hline
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 & 1 & 0 \\
0 & 1 & 0 & 0 & 0 & 1 & 0 & 0 \\
0 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \\
1 & 0 & 1 & 0 & 1 & 1 & 1 & 1 \\
1 & 1 & 0 & 0 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & \rnode{A}{1} & 1 & 1 & \rnode{B}{1} \\
\hline
\multicolumn{8}{c}{\vspace{4ex}}%
\ncbar[linewidth=0.6pt, arrows=<->, arrowinset=0.12,angle=-90, nodesep=1.5ex]{A}{B}
\nbput{\sffamily\bfseries\small \Shortunderstack{Since these columns are identical, we conclude \\%
 that $\;\bm{A\cup(B\cap C)=(A \cup B) \cap (A \cup C)}$}}
\end{array}
\]

\end{document} 

7 Zarko Dec 18 2020 at 20:05

Yorumumu cevaplamak için genişletmeme izin verin:

\documentclass{article}
\usepackage{bm}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                tikzmark}
\usepackage{lipsum}

\begin{document}
\[
\renewcommand\arraystretch{1.2}
\begin{array}{ |*{8}{c|}}
    \hline
\bm{A} & \bm{B} & \bm{C} & \bm{B\cap C}& \bm{A\cup (B\cap C)}
    & \bm{A\cup B} & \bm{A\cup C} & \bm{(A\cup B)\cap (A \cup C)} \\
    \hline
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 & 1 & 0 \\
0 & 1 & 0 & 0 & 0 & 1 & 0 & 0 \\
0 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \\
1 & 0 & 1 & 0 & 1 & 1 & 1 & 1 \\
1 & 1 & 0 & 0 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 & \tikzmarknode{a}{1} 
                  & 1 & 1 & \tikzmarknode{b}{1} \\
\hline
\end{array}
\vspace{4\baselineskip} % <--- space for arrow
\tikz[>=Straight Barb, overlay,remember picture]%
{
\draw[<->, semithick, shorten <=2ex, shorten >=2ex]
    (a) -- ++ (0,-1) -|
    node[align=center,font=\bfseries, pos=0.25, below]
        {Since these columns are identical, we conclude \\%
         that $\;\bm{A\cup(A\cap C)=(A\cup B)\cap (A\cup C)}$}
                        (b); 
}
\]
\lipsum[1]
\end{document}