Tikz-Bild im Text ausrichten

Tikz-Bild im Text ausrichten

Ich möchte meine Tikz innerhalb eines Textes ausrichten.

Ein Beispiel ist im zweiten Bild unter folgendem Link zu sehen: Bild mit freundlicher Genehmigung vonhttp://www.echoecho.com/htmlimages08.htm Bildbeschreibung hier eingeben

Dies ist mein Versuch:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=6.0em]{geometry}
\usepackage[nomessages]{fp}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{stmaryrd }
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{wrapfig}
\usepackage{enumerate}
\usepackage[turkish]{babel}

\usepackage[hidelinks]{hyperref}
\usepackage[stable]{footmisc}
\usepackage{perpage} %the perpage package
\MakePerPage{footnote} %the perpage package command

\setcounter{secnumdepth}{-1}

 \begin{document}

\begin{enumerate}
\item 
Ardışık üç pozitif tamsayının çarpımının hiçbir zaman bir tamsayının birden büyük bir kuvvetine eşit olamayacağını gösteriniz.

\item

\begin{tabular}[t]{p{4.5cm}r}

$ABCD$ kirişler dörtgeni ve $|AE|=|AD|$, $|BC|=|BE|$ dir. 
Buna göre, $EF\parallel AB$ olduğunu gösteriniz.

&


\definecolor{ffffff}{rgb}{1,1,1}
\begin{tikzpicture}[baseline=(current bounding box.north),line cap=round,line join=round,>=triangle 45,x=0.24698133918770565cm,y=0.24577572964669714cm]
\clip(-0.5,-2.72) rectangle (11.5,3.6);
\draw [line width=1.2pt] (0.06,-2.01)-- (4.43,3.26);
\draw [line width=1.2pt] (9.33,1.94)-- (4.43,3.26);
\draw [line width=1.2pt] (9.33,1.94)-- (11.14,-2.13);
\draw [line width=1.2pt] (11.14,-2.13)-- (0.06,-2.01);
\draw [line width=1.2pt] (11.14,-2.13)-- (4.43,3.26);
\draw [line width=1.2pt] (9.33,1.94)-- (0.06,-2.01);
\draw (-0.38,-2.0) node[anchor=north west] {$A$};
\draw (11.4,-2.00) node[anchor=north west] {$B$};
\draw (9.56,2.14) node[anchor=north west] {$C$};
\draw (3.96,3.48) node[anchor=north west] {$D$};
\draw (6,0.92) node[anchor=north west] {$E$};
\draw (7.90,0.87) node[anchor=north west] {$F$};
\begin{scriptsize}
\fill [color=ffffff] (0.06,-2.01) circle (2.0pt);
\fill [color=ffffff] (4.43,3.26) circle (2.0pt);
\fill [color=ffffff] (9.33,1.94) circle (2.0pt);
\fill [color=ffffff] (11.14,-2.13) circle (2.0pt);
\fill [color=ffffff] (6.36,0.67) circle (2.0pt);
\fill [color=ffffff] (7.67,0.66) circle (2.0pt);
\end{scriptsize}
\end{tikzpicture}
\end{tabular}


\item
$0<q<200$ ve $\dfrac{59}{80} < \dfrac{p}{q} <\dfrac{45}{61}$ koşullarını sağlayan bir $(p,q)$ tamsayı çifti bulunuz ve böyle tek bir $(p,q)$ tamsayı çifti olduğunu gösteriniz.

\item
$7$ arkadaşı olan bir kimse, bir hafta boyunca her akşam $3$ arkadaşını yemeğe çağırır. Farklı iki akşam yemeğe çağrılan gruplar birbirlerinden farklı olup; $7$ arkadaştan her biri en az bir akşam yemeğe çağrılmaktadır. Bu koşulları sağlayan kaç değişik çağrı programı yapılabileceğini bulunuz.

\item
\begin{tabular}[t]{p{7cm}r}

$O$ merkezli çemberin yarıçapı $R$'dir. $A$ merkezli $|AB|$ yarıçaplı çember ile $B$ merkezli $|BA|$ yarıçaplı çemberin $D$ kesim noktası alınıyor. $CD$ doğrusu, $O$ merkezli çemberi $E$ noktasında kestiğine göre $|ED|$ uzunluğunu $R$ cinsinden hesaplayınız. 

&
\begin{tikzpicture}[baseline=(current bounding box.north),line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]

\clip(-0.16,-1.88) rectangle (6.4,3.52);
\draw [line width=1.2pt] (4.02,0.3) circle (2.16cm);
\draw [line width=1.2pt] (4.55,2.4) circle (1.08cm);
\draw [line width=1.2pt] (3.47,2.39) circle (1.08cm);
\draw [line width=1.2pt] (1.93,0.87)-- (5.5,1.88);
\draw [line width=1.2pt] (1.93,0.87)-- (1.04,0.62);
\draw (4.04,0.04) node[anchor=north west] {$O$};
\draw (5.74,1.94) node[anchor=north west] {$C$};
\draw (4.78,2.58) node[anchor=north west] {$A$};
\draw (3.1,2.62) node[anchor=north west] {$B$};
\draw (1.56,1.12) node[anchor=north west] {$E$};
\draw (4.10,1.25) node[anchor=south east] {$D$};
\begin{scriptsize}
\fill [color=ffffff] (4.02,0.3) circle (2.0pt);
\fill [color=ffffff] (5.5,1.88) circle (2.0pt);
\fill [color=ffffff] (4.55,2.4) circle (2.0pt);
\fill [color=ffffff] (3.47,2.39) circle (2.0pt);
\fill [color=ffffff] (4.01,1.46) circle (2.0pt);
\fill [color=ffffff] (1.93,0.87) circle (2.0pt);
\end{scriptsize}
\end{tikzpicture}

\end{tabular}

\item
$$\sqrt{x - \dfrac{1987}{14}} + \sqrt{x - \dfrac{1988}{13}} + \sqrt{x - \dfrac{1989}{12}} = \sqrt{x - \dfrac{14}{1987}} + \sqrt{x - \dfrac{13}{1988}} + \sqrt{x - \dfrac{12}{1989}}$$
denkleminin tüm reel çözümlerini bulunuz.

\item
İki kişinin bir keki paylaşmasının her iki tarafı da hoşnut eden ve adil bir yöntemi şudur: Biri keki iki parçaya ayırır, diğeri parçalardan birini kendine seçer. Diğer bir deyişle keki $[0,1]$ aralığı gibi düşünürsek, birinci kişi $x_1\in [0,1]$ seçer; ikinci kişi ise $x_1$ ve $1-x_1$ sayılarından birini seçer. (Burada her iki tarafın da ``keksever'' olduğu varsayıldığından, ikinci kişinin $x_1$ ve $1-x_1$ sayılarından daha büyük olanını seçeceği ve dolayısıyla birincinin de $x_1 = \dfrac 12$ seçimini yapacağı kolaylıkla görülür.) Üç keksever kişi için benzer bir paylaşma yöntemi bulabilir misiniz? 



\end{enumerate}

\end{document}

Antwort1

Erstens kann Ihr Code nicht mit \usepackage[turkish]{babel}und ohne kompiliert werden \shorthandoff{=}. Jetzt habe ich einige Schwierigkeiten, mit dem Code von tikz wie diesem eine Antwort zu geben. Ich denke, Ihr Code stammt von Geogebra oder so etwas. In Teil A versuche ich also, Ihnen einige Erklärungen zu geben, um Code von Geogebra in etwas Lesbareres und Verständlicheres zu übersetzen. Der nächste Code ist jetzt perfekt, weil ich versuche, einen Code zu erhalten, der einfach und Ihrem Code sehr ähnlich ist.

Teil A

Sie stehen vor einem weißen Blatt Papier mit einigen Bleistiften.

a) Wählen Sie einen Bleistift aus. Sie müssen die Farbe und die Größe auswählen. Standardmäßig ist die Farbe Schwarz und die Größe 0,4pt. In Ihrem Code \definecolor{ffffff}{rgb}{1,1,1}wird eine Farbe definiert; rgb 1,1,1 ist die weiße Farbe und das ist sehr seltsam, aber unnötig. Tikz lädt das xcolor-Paket und dieses Paket definiert einige grundlegende Farben wie Weiß und Schwarz. Wenn Sie Geogebra weiterhin ausführen, können Sie mit einem Editor den gesamten Code wie ffffff durch Weiß ersetzen. Ein Beispiel \definecolor{mycolor}{rgb}{.2,1,.5}. Die Größe line width=0.5ptwird am Anfang angegeben, da diese Größe für die Zeichnungen verwendet wird. line width=1.2ptist zu groß für mich, aber ...

b) Jetzt musst du kleine Kreise zeichnen. Du wählst einen Punkt auf dem Papier (a,b) oder als ersten Punkt (0,0) reicht es. Wir müssen diesen Punkt verwenden, damit wir den Punkt benennen können. Du gibst einen Namen mit der Koordinate (a) ein. Danach schreibst du mit demselben Stift die Beschriftung $A$. Mit Tikz kann eine Beschriftung oder ein Text mit einem Knoten platziert werden. Standardmäßig ist der Knoten ein Rechteck und du schreibst $A$ darauf. Du kannst das Rechteck hier mit einem Anker am Punkt befestigen anchor=north west.

Mit dem gleichen Stift fügst du B, C und D hinzu. Die Kreise sind ausgefüllt. Mit der Option kannst du die Kreise ausfüllen [fill].Anmerkung : standardmäßig ist die Farbe schwarz falls Sie fill=graybeispielsweise eine andere Farbe wünschen.

c) Jetzt können wir die Linien zeichnen. In derselben Farbe und in derselben Größe zeichnen wir den Viereckszyklus, der \draw (a) -- (b) -- (c) --(d) -- cycle;verwendet wird, um den Pfad zu schließen

d) Die Punkte E und F. F ist ein Punkt auf der Linie AC. Er lässt sich leicht mit baryzentrischen Koordinaten definieren. E liegt in meinem Beispiel am Schnittpunkt zweier Linien AC und BD. Wir benennen die Linien (die Pfade) mitname path

\draw (a) -- (b) -- (c) --(d) -- cycle;
\draw [name path=ac] (a) -- (c);
\draw [name path=bd] (b) -- (d);

Ich erhalte die Schnittmenge mit `name intersections={of=ac and bd, by=e}``

Sie können die letzten Schritte überspringen, da Geogebra Ihnen die Koordinaten von E und F geben kann, aber ich denke, Sie müssen A, B, C und D mit einfachen Koordinaten platzieren. Das ist lesbarer.

Vollständiger Code für das Bild

\begin{tikzpicture}[scale=.4,line width=0.5pt]
\draw[fill] (0,0)  coordinate (a)  circle (4pt)   node[anchor=north west] {$A$}
            (11,0) coordinate (b)  circle (4pt)   node[anchor=north west] {$B$}
            (9,3)  coordinate (c)  circle (4pt)   node[anchor=south west] {$C$} 
            (3,4) coordinate (d)   circle (4pt)   node[anchor=south west] {$D$} ;
 \draw (a) -- (b) -- (c) --(d) -- cycle;
 \draw [name path=ac] (a) -- (c);
 \draw [name path=bd] (b) -- (d);
 \draw [name intersections={of=ac and bd, by=e},fill] (e) circle (4pt) node[anchor=north] {$E$};
 \draw[fill]  (barycentric cs:a=1,c=1) coordinate (f) circle (4pt) node[anchor=north] {$F$};;
\end{tikzpicture}

Bemerkungen :Ich habe die baselineOption entfernt: Die Box wird nicht relativ zu einer Linie platziert. Ich habe auch entfernt x= ... and y=.... Es ist einfacher, den Standardwert von 1 cm für x und y zu verwenden und dann eine Skala zu verwenden.

Teil B

Ich habe das picinsPaket verwendet, um die Bilder in den Text einzufügen. Sie finden esHier

Es ist nicht auf Texlive und Sie müssen es herunterladen. wrapfigDas Paket ist mit der Aufzählungsliste nicht kompatibel.

Sie benötigen das zum Laden \usepackage{mdwlist}. Dieses Paket ist nützlich, da bei Verwendung des Makros \parpicdes picinsPakets der Einzugsrand falsch ist, sodass Sie vor dem nächsten Element Folgendes hinzufügen müssen

\suspend{aufzählen} \resume{aufzählen}

Der vollständige Code kann Ihnen helfen:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=6.0em]{geometry}
\usepackage{tikz}
\usetikzlibrary{intersections}
\usepackage{picins}
%  http://tug.ctan.org/tex-archive/macros/latex209/contrib/picins/picins.sty
\usepackage{mdwlist}
\usepackage{multicol,lipsum}
\usetikzlibrary{arrows}

\begin{document}
\begin{multicols}{2}
\begin{enumerate}

    \item 
\parpic[l]{%
\begin{tikzpicture}[scale=.25,line width=0.5pt]
\draw[fill] (0,0)  coordinate (a)  circle (4pt)   node[anchor=north west] {$A$}
            (11,0) coordinate (b)  circle (4pt)   node[anchor=north west] {$B$}
            (9,3)  coordinate (c)  circle (4pt)   node[anchor=south west] {$C$} 
            (3,4) coordinate (d)   circle (4pt)   node[anchor=south west] {$D$} ;
 \draw (a) -- (b) -- (c) --(d) -- cycle;
 \draw [name path=ac] (a) -- (c);
 \draw [name path=bd] (b) -- (d);
 \draw [name intersections={of=ac and bd, by=e},fill] (e) circle (4pt) node[anchor=north] {$E$};
 \draw[fill]  (barycentric cs:a=1,c=1) coordinate (f) circle (4pt) node[anchor=north] {$F$};;
\end{tikzpicture}
}%
\lipsum[1]
\suspend{enumerate}
\resume{enumerate}

\item   \parpic[r]{%
\begin{tikzpicture}[scale=.4,line width=0.5pt]
\draw[fill] (0,0)  coordinate (a)  circle (4pt)   node[anchor=north west] {$A$}
            (11,0) coordinate (b)  circle (4pt)   node[anchor=north west] {$B$}
            (9,3)  coordinate (c)  circle (4pt)   node[anchor=south west] {$C$} 
            (3,4) coordinate (d)   circle (4pt)   node[anchor=south west] {$D$} ;
 \draw (a) -- (b) -- (c) --(d) -- cycle;
 \draw [name path=ac] (a) -- (c);
 \draw [name path=bd] (b) -- (d);
 \draw [name intersections={of=ac and bd, by=e},fill] (e) circle (4pt) node[anchor=north] {$E$};
 \draw[fill]  (barycentric cs:a=1,c=1) coordinate (f) circle (4pt) node[anchor=north] {$F$};;
\end{tikzpicture}
}%
\lipsum[1-1]

\end{enumerate}
\end{multicols}

\begin{enumerate}

    \item 
\parpic[l]{%
\begin{tikzpicture}[scale=.8,line width=0.5pt]
\draw[fill] (0,0)  coordinate (a)  circle (4pt)   node[anchor=north west] {$A$}
            (11,0) coordinate (b)  circle (4pt)   node[anchor=north west] {$B$}
            (9,3)  coordinate (c)  circle (4pt)   node[anchor=south west] {$C$} 
            (3,4) coordinate (d)   circle (4pt)   node[anchor=south west] {$D$} ;
 \draw (a) -- (b) -- (c) --(d) -- cycle;
 \draw [name path=ac] (a) -- (c);
 \draw [name path=bd] (b) -- (d);
 \draw [name intersections={of=ac and bd, by=e},fill] (e) circle (4pt) node[anchor=north] {$E$};
 \draw[fill]  (barycentric cs:a=1,c=1) coordinate (f) circle (4pt) node[anchor=north] {$F$};;
\end{tikzpicture}
}%
\lipsum[1]
\suspend{enumerate}
\resume{enumerate}

\item   \parpic[r]{%
\begin{tikzpicture}[scale=.5,line width=0.5pt]
\draw[fill] (0,0)  coordinate (a)  circle (4pt)   node[anchor=north west] {$A$}
            (11,0) coordinate (b)  circle (4pt)   node[anchor=north west] {$B$}
            (9,3)  coordinate (c)  circle (4pt)   node[anchor=south west] {$C$} 
            (3,4) coordinate (d)   circle (4pt)   node[anchor=south west] {$D$} ;
 \draw (a) -- (b) -- (c) --(d) -- cycle;
 \draw [name path=ac] (a) -- (c);
 \draw [name path=bd] (b) -- (d);
 \draw [name intersections={of=ac and bd, by=e},fill] (e) circle (4pt) node[anchor=north] {$E$};
 \draw[fill]  (barycentric cs:a=1,c=1) coordinate (f) circle (4pt) node[anchor=north] {$F$};;
\end{tikzpicture}
}%  
\lipsum[1-1]

\end{enumerate}
\end{document}  

Sie können ein kleines Problem sehen, wenn ich den Maßstab für das Bild ändere. Die Kreise sind größer und es gibt ein Problem mit den Beschriftungen. Deshalb ist der Code nicht perfekt, aber ich habe versucht, einen Code zu erhalten, der dem Code von Geogebra ähnelt.

Bildbeschreibung hier eingeben

Antwort2

Paket ansehenwrapfig(Dokumentation auchOnline verfügbar).

verwandte Informationen