这是我的代码:
\documentclass [a4paper, 12pt] {article}
\setlength{\parindent}{1.5em}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage[margin=1in]{geometry}
\usepackage{csquotes}
\usepackage{tikz}
\usetikzlibrary{shapes,decorations,arrows,calc,arrows.meta,fit,positioning}
\tikzset{
-Latex,auto,node distance =1 cm and 1 cm,semithick,
state/.style ={ellipse, draw, minimum width = 0.7 cm},
point/.style = {circle, draw, inner sep=0.04cm,fill,node contents={}},
bidirected/.style={Latex-Latex,dashed},
el/.style = {inner sep=2pt, align=left, sloped}
}
\usepackage{epigraph}
\usepackage{float}
\usepackage{amsmath}
\usepackage{makecell}
\begin{document}
\begin{figure}[H]
\centering
\begin{tikzpicture}[node distance=2cm]
\node[circle,draw] at (0,0) (X) {\bf X};
\node[circle,draw,right of=X,yshift=1cm] (Y) {\bf Y};
\node[circle,draw,right of=X,yshift=-1cm] (Z) {\bf Z};
\node[circle,draw,right of=Z,yshift=0cm] (W) {\bf W};
\draw[-] (X) -- (Y);
\draw[-] (X) -- (Z);
\draw[-] (Z) -- (W);
\end{tikzpicture}
\renewcommand{\figurename}{Figura}
\caption{Un grafo semplice}
\end{figure}
\end{document}`