Senin, 28 Oktober 2024

Matematics Set Operation In Latex 3

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

A union B picture

Type this following Latex source code in the Latex editor:
%!TEX TS-program=pdflatex
%!TEX encoding=UTF-8 Unicode
%
% File name: diaVenns1-3.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}

% A union B picture
%Either A or B, A union B
%A \verb!$\cup$! B,
%is the set of all values that are a member of A, or B, or both.
\begin{tikzpicture}
% Universal set U
\fill[white!35!white, even odd rule]
  (-2,-2) rectangle (4,2);
  
% Union text label
\node[black!100!black,font=\bfseries\large] at (0.9,1.8) {A$\mathbf{\cup}$ B or A union B};

% Set A
\node [circle, draw=black, pattern=dots, minimum size=2.6cm] (A) {};
% Set B
\node [circle, draw=black, pattern=dots,  minimum size=2.6cm] (B) at (1.8,0) {};

% Set text label
\node[left,black,fill=white,font=\Large] at (A.center){$A$};
\node[right,black,fill=white,font=\Large] at (B.center){$B$};

% Circles outline
\draw[black,thick] (0,0) circle(1.3cm);
\draw[black,thick] (1.8,0) circle(1.3cm);

% Draw the Universal Label
\node[font=\bfseries] at (3.5,-1.7) {\textbf{U}};
\end{tikzpicture}

\end{document}

Save file as diaVenns1-3.tex

Tidak ada komentar:

Posting Komentar

Various Other Posts