1

I created a figure in Inkscape and exported it to TeX. I used bezier for drawing curves. When I import this to my text, there is a free space between the text and the picture, because some bezier points are out of the picture range. (See negative points in example)

Text
\begin{figure}[htbp]
    \centering
    \begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
    \path[draw=black,line join=miter,line cap=butt,line width=0.680pt]
    (40,52) -- (40,311) -- (550,311) --
    (550,52) -- cycle;
    \path[draw=black,dash pattern=on 0.68pt off 0.68pt,line join=miter,line
    cap=butt,miter limit=4.00,line width=0.680pt] (274,311) .. controls
    (402,-3) and (355,-59) .. (495,311);
    \end{tikzpicture}
\end{figure}

Is there a way to shift the whole picture about these negative values and overlap the free space with my text? If I reduce the controls to a positive value, the curves are not useful for me.

Werner
  • 603,163
xant
  • 13

2 Answers2

0

The \fbox{] is there simply to show the actual image size. Note that one can draw and crop using the same rectangle.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
  \fbox{%
    \begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
    \draw[line width=0.680pt,use as bounding box] (40,52) rectangle (550,311);
    \path[draw=black,dash pattern=on 0.68pt off 0.68pt,line join=miter,line
    cap=butt,miter limit=4.00,line width=0.680pt] (274,311) .. controls
    (402,-3) and (355,-59) .. (495,311);
    \end{tikzpicture}%
  }
\end{document}

bounded curve

John Kormylo
  • 79,712
  • 3
  • 50
  • 120
0

You can't \clip the figure.

\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{here}

\begin{document}
Text
\begin{figure}[H]
    \centering
    \begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
    \clip[draw] (40,52) rectangle (550,311);
    %\path[draw=black,line join=miter,line cap=butt,line width=0.680pt]
    (40,52) -- (40,311) -- (550,311) --
    (550,52) -- cycle;
    \path[draw=black,dash pattern=on 0.68pt off 0.68pt,line join=miter,line
    cap=butt,miter limit=4.00,line width=0.680pt] (274,311) .. controls
    (402,-3) and (355,-59) .. (495,311);
    \end{tikzpicture}
\end{figure}
text

\end{document}

enter image description here

Karlo
  • 3,257
rpapa
  • 12,350