I'm drawing this figure
And specifically, in the red line X1-P I used the key shorten and I need to put in subfigure, as follows
\documentclass[11pt,letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{caption}
\usepackage{subfigure}
\usepackage{amsthm}
\usepackage{tikz, pgf, pgfplots}
\pgfplotsset{compat=1.16}
\usetikzlibrary{babel, calc, through, intersections}
\title{Problema 3.4-11}
\author{}
\begin{document}
\maketitle
\begin{enumerate}
\item[\textbf{3.4-11}] Problema...
\begin{proof}
Sea $K$ la circunferencia variable y $O$ su centro (figura \ref{ej-11})...
\begin{figure}[h]
\centering
\subfigure[]{
\begin{tikzpicture}[scale=0.5, font = \small]
\node[] (O1) at (-4,0) {};
\node[] (O2) at (2,0) {};
\node[] (O) at (0,4) {};
\node[] (T) at (0,0) {};
\node[] (X1) at (-4,4) {};
\node[] (X2) at (3.2,1.6) {};
\node[] (P) at (8,0) {};
\draw[dashed, thin, gray] (0,-5) -- (0,9);
\draw[thin] (-9,0) -- (9,0);
\node (S1) at (O1) [draw, circle through = (T), cyan!75!black] {};
\node (S2) at (O2) [draw, circle through = (T), green!75!black] {};
\node (S) at (O) [draw, circle through = (T), orange] {};
\draw[red, thick, shorten >= -30pt, shorten <= -30pt] (X1) -- (P); %ERROR!
\fill (O1) circle (0.5mm);
\fill (O2) circle (0.5mm);
\fill (O) circle (0.5mm);
\fill (T) circle (0.5mm);
\fill (X1) circle (1mm);
\fill (X2) circle (1mm);
\fill[red] (P) circle (1.5mm);
\node[below left] at (P) {$P$};
\node[left] at (X1) {$X_{1}$};
\node[right] at (X2) {$X_{2}$};
\node[below] at (O1) {$O_{1}$};
\node[below] at (O2) {$O_{2}$};
\node[below] at (T) {$T$};
\node[right] at (O) {$O$};
\node[below] at (-7,-3) {$K_{1}$};
\node[below] at (3,-2) {$K_{2}$};
\node[above] at (3,7) {$K$};
\end{tikzpicture}
\label{sub:recta}
}
\caption{}
\label{ej-11}
\end{figure}
\end{proof}
\end{enumerate}
\end{document}
But this yields an error and I realized when I delete the shorten key, error disappear
What is happen?
PS. Ok, I know I can "cheat" and use auxiliary points to extend my line, but I need know the reason for this error too
I apologize for possible misspellings

subfigurepackage is deprecated. Please consider switching tosubfigorsubcaptioninstead. – leandriis May 25 '20 at 18:16shortenby negative distances leads to paths that are not fully contained in the bounding box. That is, the length you add by supplyingshortenwith some negative distance will not be taken into account in the bounding box determination. – May 25 '20 at 18:21<and>characters. Just adding>=latexyields the same error. – May 25 '20 at 18:29babellibrary? – pga11 May 25 '20 at 18:33\begingroup\shorthandoff{>}\shorthandoff{<}after\centeringand add\endgroupbefore\end{figure}. It seems to be a strange interaction betweensubfigureandbabel. So you should do what @leandriis and will be fine, I think. – May 25 '20 at 18:34subcaptionthebabellibrary is sufficient. In your document you could use\shorthandoff{>}\shorthandoff{<}, butsubcaptionis probably a better choice, i.e. this issue adds to the reasons why one should no longer usesubfigure. – May 25 '20 at 18:40subcaptionworks without additional efforts, butsubfigureandsubfigdo not. – May 25 '20 at 19:03