Tikz 图片校正

Tikz 图片校正

我需要修正图形的上部尺寸(即使菱形对称,指向节点 s5 的箭头与图形下部的箭头对齐)-忽略最后一个矩形中不可读的文本:它是希腊语。谢谢

\documentclass[a4paper,twoside,10pt]{memoir}
\usepackage{alphabeta}
\def\eng#1{\textlatin{#1}}
\usepackage{textcase}
\usepackage{silence}
\usepackage{kerkis}
\usepackage{color}
\usepackage[svgnames,x11names,named]{xcolor}
\WarningFilter*{mdframed}{You got a bad break}
\WarningFilter{latex}{Text page}
\usepackage[usetwoside]{mdframed}
\usepackage[LGR,T1]{fontenc}
\usepackage{anyfontsize}
\usepackage{lipsum}
\usepackage {tikz}
\usetikzlibrary {positioning,graphs,calc,decorations.pathmorphing,shapes,arrows.meta,arrows}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{systeme}
\usepackage{wrapfig}
\usepackage{afterpage}
\usepackage{tocloft}
\usepackage[figuresright]{rotating}
\usepackage{parskip}
\usepackage{caption}
\usepackage{enumitem}
\usepackage{titletoc}
\usepackage{calc}
\usepackage{pstricks}
\usepackage{bbm}
\usepackage{textcomp}
\usepackage{upgreek}
\usepackage{ifthen}
\usepackage{extramarks}
\usepackage{bm}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{colortbl}
\usepackage[symbol]{footmisc}




\begin{document}


\begin{center}
\tikzset{every loop/.style={min distance=15mm,looseness=10}}
\begin{tikzpicture}[-latex ,auto ,node distance =1.5cm and 3cm, on grid,semithick ,
state/.style ={rectangle ,top color =white , bottom color = cyan!20, draw,cyan , text=blue , minimum width =1 cm}]
\node[state] (s5) {$S5$};
\node[shape=coordinate] (inv) [below =of s5]{};
\node[state] (B) [below left =of inv]{$B$};
\node[state] (s4) [below right =of inv] {$s4$};
\node[state] (t) [below right =of B] {$T$};
\node[state] (d) [below =of t] {$D$};
\node[state] (k) [below =of d] {$K$};
\node[state,yshift=-0.8cm] (pl) [below =of k]
{\begin{tabular}{c}Κλασική Προτασιακή Λογική\\$\diamond\varphi\equiv\neg\Box\neg\varphi$\\Κανόνας Αναγκαιότητας\\Νόμος Απόσπασης\end{tabular}};
\path (pl) edge [bend left = 0] node[xshift=4.2cm, yshift=0.02cm] {$\Box(\varphi\rightarrow\psi)\rightarrow(\Box\varphi\rightarrow\Box\psi)$} (k);
\path (k) edge [bend left = 0] node[xshift=1.8cm, yshift=0.03cm] {$\Box\varphi\rightarrow\diamond\varphi$} (d);
\path (d) edge [bend right = 0] node[xshift=1.6cm, yshift=0.03cm] {$\Box\varphi\rightarrow\varphi$} (t);
\path (t.north) edge [bend right = 0] node[yshift=0.03cm] {$\varphi\rightarrow\Box\diamond\varphi$} (B);
\path (t.north) edge [bend right = 0] node[xshift=2.1cm, yshift=-0.505cm] {$\Box\varphi\rightarrow\Box\Box\varphi$} (s4);
\path (B) [-] edge [bend right = 0] node[below =0.15 cm] {} (inv);
\path (s4) [-] edge [bend right = 0] node[below =0.15 cm] {} (inv);
\path (inv) edge [bend right = 0] node[xshift=2.05cm, yshift=0.03cm] {$\Box\varphi\rightarrow\diamond\Box\varphi$} (s5);
\end{tikzpicture}
\end{center}


\end{document} 

答案1

改变节点的相对位置(t)并使用垂直偏移的快速解决方案:

\node[state,yshift=-3.5cm] (t) [below =of s5] {$T$};

这可以进一步完善。

\documentclass[a4paper,twoside,10pt]{memoir}
\usepackage{alphabeta}
\def\eng#1{\textlatin{#1}}
\usepackage{textcase}
\usepackage{silence}
\usepackage{kerkis}
\usepackage{color}
\usepackage[svgnames,x11names,named]{xcolor}
\WarningFilter*{mdframed}{You got a bad break}
\WarningFilter{latex}{Text page}
\usepackage[usetwoside]{mdframed}
\usepackage[LGR,T1]{fontenc}
\usepackage{anyfontsize}
\usepackage{lipsum}
\usepackage {tikz}
\usetikzlibrary {positioning,graphs,calc,decorations.pathmorphing,shapes,arrows.meta,arrows}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{systeme}
\usepackage{wrapfig}
\usepackage{afterpage}
\usepackage{tocloft}
\usepackage[figuresright]{rotating}
\usepackage{parskip}
\usepackage{caption}
\usepackage{enumitem}
\usepackage{titletoc}
\usepackage{calc}
\usepackage{pstricks}
\usepackage{bbm}
\usepackage{textcomp}
\usepackage{upgreek}
\usepackage{ifthen}
\usepackage{extramarks}
\usepackage{bm}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{colortbl}
\usepackage[symbol]{footmisc}




\begin{document}


\begin{center}
\tikzset{every loop/.style={min distance=15mm,looseness=10}}
\begin{tikzpicture}[-latex ,auto ,node distance =1.5cm and 3cm, on grid,semithick ,
state/.style ={rectangle ,top color =white , bottom color = cyan!20, draw,cyan , text=blue , minimum width =1 cm}]
\node[state] (s5) {$S5$};
\node[shape=coordinate] (inv) [below =of s5]{};
\node[state] (B) [below left =of inv]{$B$};
\node[state] (s4) [below right =of inv] {$s4$};
\node[state,yshift=-3.5cm] (t) [below =of s5] {$T$};
\node[state] (d) [below =of t] {$D$};
\node[state] (k) [below =of d] {$K$};
\node[state,yshift=-0.8cm] (pl) [below =of k]
{\begin{tabular}{c}Κλασική Προτασιακή Λογική\\$\diamond\varphi\equiv\neg\Box\neg\varphi$\\Κανόνας Αναγκαιότητας\\Νόμος Απόσπασης\end{tabular}};
\path (pl) edge [bend left = 0] node[xshift=4.2cm, yshift=0.02cm] {$\Box(\varphi\rightarrow\psi)\rightarrow(\Box\varphi\rightarrow\Box\psi)$} (k);
\path (k) edge [bend left = 0] node[xshift=1.8cm, yshift=0.03cm] {$\Box\varphi\rightarrow\diamond\varphi$} (d);
\path (d) edge [bend right = 0] node[xshift=1.6cm, yshift=0.03cm] {$\Box\varphi\rightarrow\varphi$} (t);
\path (t.north) edge [bend right = 0] node[yshift=0.03cm] {$\varphi\rightarrow\Box\diamond\varphi$} (B);
\path (t.north) edge [bend right = 0] node[xshift=2.1cm, yshift=-0.505cm] {$\Box\varphi\rightarrow\Box\Box\varphi$} (s4);
\path (B) [-] edge [bend right = 0] node[below =0.15 cm] {} (inv);
\path (s4) [-] edge [bend right = 0] node[below =0.15 cm] {} (inv);
\path (inv) edge [bend right = 0] node[xshift=2.05cm, yshift=0.03cm] {$\Box\varphi\rightarrow\diamond\Box\varphi$} (s5);
\end{tikzpicture}
\end{center}


\end{document} 

相关内容