Senin, 28 Oktober 2024

Matematics Set Operation In Latex 5

Matematics Set Operation in this post consist of:
  • Set A picture
  • Complement Set A picture
  • A union B picture
  • A intersect B picture
  • Subset picture
  • Disjoint Set picture
  • Difference Set picture

Subset picture

Type this following Latex source code in the Latex editor:
%!TEX TS-program=pdflatex
%!TEX encoding=UTF-8 Unicode
%
% File name: diaVenns1-5.tex
% Description:
% The Set operations in diagram venn
%
\documentclass[12pt,a4paper]{report}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{0.25pt}
\begin{document}
%%%title page
\centering \begin{tikzpicture}
\node[font=\bfseries\Huge] at(0,0) {$Set$};
\node[font=\bfseries\Huge] at(0,-1) {$Operations$};
 \end{tikzpicture}

%Subset picture
%B is proper subset of A
%B\verb!$\subset$!A
\begin{tikzpicture}
 % Universal set U
 \draw[fill=white!20, even odd rule] (-2, -2) rectangle (4, 2);
 % Set B
 \draw[fill=white!30,thick] (0,0) circle (1.5cm);
 \node[font=\bfseries] at (0.99,-0.15) {$\mathbf{B}$};
 % Set A (subset of B)
 \draw[fill=white!30] (-0.3,0) circle (1cm);
 \node at (-0.5,0) {$\mathbf{A}$};
 % title Labeling
 \node[font=\bfseries] at (2.5,1.5) {$\mathbf{A \subset B}$};
 \node[font=\bfseries] at (2.5,1) {$\mathbf{\scriptstyle{A\ subset\ of\ B}}$};
 % Draw the universal set label
 \node[font=\bfseries] at (3.5,-1.7) {U};
\end{tikzpicture}

\end{document}

Save file as diaVenns1-5.tex

Output



Tidak ada komentar:

Posting Komentar

Various Other Posts