Graphics, Figures & Tables\parpic tikzpicture align in enumerated item

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
bvj
Posts: 1
Joined: Thu Jul 11, 2019 8:53 pm

\parpic tikzpicture align in enumerated item

Post by bvj »

If i use this code to create the PDF the drawing (tikzpic) appears in the right corner and the drawing is aligned to the first row of the linked item. how can i align the drawing to other rows, for example to the second or the third one?

Code: Select all

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,patterns,decorations.pathmorphing,decorations.markings,positioning,arrows}
\usepackage{picins}
\usepackage{mdwlist}
\usepackage{lipsum}

\textwidth=6.5in
\textheight=9.5in
\voffset=-1in
\hoffset=-1in

\begin{document}

\begin{enumerate}
\item Neki tekst da se vidi kako se prelama sledec1a stavka. Dolazi zatim slika i treba da bude vishe redova 

\item \parpic[r]{%
    \begin{tikzpicture}[every node/.style={draw,outer sep=0pt,thick}]
% \draw [line width=0.8pt,domain=1.0:8.065193283210691] plot(\x,{(--8.-0.*\x)/4.});
%\draw [line width=0.8pt,domain=1.0:8.065193283210691] plot(\x,{(-0.--4.*\x)/2.});
\       \tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.3cm,post length=0.3cm,segment length=12}]
        \tikzstyle{dampener}=[thick,decoration={markings,
          mark connection node=dmp,
          mark=at position 0.5 with
          {
            \node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum width=15pt,minimum height=3pt,draw=none] {};
            \draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
            \draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
          }
        }, decorate]
        \tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum width=2cm,minimum height=0.3cm]
    \node (M) [ground,anchor=north] {};
    \node[draw=none,below=1.5cm of M,inner sep=-2,minimum size=0mm] (pt1){};
    \node[circle,below=1.5cm of pt1] (pt2){$m$};
    \draw [dampener] (pt1.north) -- ($(M.south)$) node[draw=none,pos=.52,right=.4cm] {$b$};
    \draw [spring] (pt1.south) -- ($(pt2.north)$) node[draw=none,pos=.5,right=.25cm] {$k$};
    \node[draw=none,left=1.25cm of pt2,minimum size=0mm] (pt3){};
    \node[draw=none,right=1.25cm of pt2,minimum size=0mm] (pt4){};
    \node[draw=none,right=.25cm of pt2,minimum size=0mm] (pt5){};
    \node[draw=none,below=.75cm of pt5,minimum size=0mm] (pt6){};
    \draw[dashed] (pt3) -- (pt2.west);
    \draw[dashed] (pt4) -- (pt2.east);
    \begin{scope}[>=latex]
    \draw[->,thick,xshift=.25cm] (pt5) -- (pt6) node[draw=none,pos=.5,right=.15cm] {$y(t)>0$};
    \end{scope}
    \end{tikzpicture}
}%

%\lipsum[66]
%    \begin{enumerate}
  %  \item 
%    \lipsum 
    Neka je $ABC$ pravougli trougao sa pravim uglom kod teman $C$. Neka je $D$ podnozhje visine iz temena $C$. Ugao kod temena $A$ trougla $ACD$ je ujedno i ugao kod temena $A$ trougla $ABC$. Ugao kod temena $D$ trougla $ACD$ je prav ugao, pa je jednak uglu kod temena $C$ trougla $ABC$. S obzirom da je zbir uglova trougla $180^{\circ}$ i trougao $ACD$ i $ABC$ imaju po dva jednaka ugla, to i trec1i uglovi ´ce biti jednaki.
Slichno se dokazuje jednakost uglova trougla $BCD$ i $ABC$.
 %   \item 
Neka je $O$ centar kruzhnice. kod temena $C$ trougla $ABC$. S obzirom da je zbir uglova trougla $180^{\circ}$ i trougao $ACD$ i $ABC$ imaju po dva jednaka ugla, to i trec1i uglovi c1e biti jednaki\\
$OB = OB$		(poluprechnici kruzhnice)\\
$AO = AO > OB$	(sve je jednako sa samim sobom) kod temena $C$ trougla $ABC$. S obzirom da je zbir uglova trougla $180^{\circ}$ i trougao $ACD$ i $ABC$ imaju po dva jednaka ugla, to i trec1i uglovi c1e biti jednaki\\
$\measuredangle ABO = \measuredangle ACO$	(tangenta je normalna na poluprechnik)\\
$\triangle ABO \cong \triangle ACO$	(po SSU)\\
$AB = AC$		(iz prethodnog)
 \item josh jednom da vidim neshto.
Neka je $O$ centar kruzhnice. kod temena $C$ trougla $ABC$. S obzirom da je zbir uglova trougla $180^{\circ}$ i trougao $ACD$ i $ABC$ imaju po dva jednaka ugla, to i trec1i uglovi c1e biti jednaki\\
$OB = OB$		(poluprechnici kruzhnice)\\
$AO = AO > OB$	(sve je jednako sa samim sobom) kod temena $C$ trougla $ABC$. S obzirom da je zbir uglova trougla $180^{\circ}$ i trougao $ACD$ i $ABC$ imaju po dva jednaka ugla, to i trec1i uglovi c1e biti jednaki\\
$\measuredangle ABO = \measuredangle ACO$	(tangenta je normalna na poluprechnik)\\
$\triangle ABO \cong \triangle ACO$	(po SSU)\\
$AB = AC$		(iz prethodnog)    \end{enumerate}
\end{enumerate}
\end{document}
Attachments
wrap2.pdf
(44.88 KiB) Downloaded 172 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
Post Reply