3

When I write this code:

% Preview source code

%% LyX 2.3.1-1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,english,hebrew,numbers=noenddot]{scrartcl}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands

\usepackage{tikz}
\usetikzlibrary{automata}

\makeatother

\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\begin{document}
\begin{tikzpicture}
\node[state] (1) {$1$};
\path[->](1) edge [loop] ();
\end{tikzpicture}
\end{document}

What I get is this:
enter image description here

How I repace the direction of the arrow to left to right?

Thank you!

  • \path(1) edge [in=60,out=120,loop] (); and please clean up your code, i.e. remove all unnecessary packages. – user121799 Nov 15 '18 at 17:15
  • I edit my code :-) It's still no the same... :-( I get other shape – heblyx Nov 15 '18 at 17:20
3
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{automata}

\begin{document}
\begin{tikzpicture}
\node[state] (1) {$1$};
\path(1) edge [in=45,out=135,looseness=8,loop] ();
\node[state] (2) at (2,0) {$2$};
\path(2) edge [loop] ();
\end{tikzpicture}
\end{document}

enter image description here

  • You can do that it will be at the same shape (like at example)? – heblyx Nov 15 '18 at 17:26
  • 1
    @heblyx Yes, one only needs to look up the definitions of loop in tikzlibrarytopaths.code.tex. – user121799 Nov 15 '18 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.