tikz-uml: ¿Cómo colocar un objeto UML debajo del carril?

tikz-uml: ¿Cómo colocar un objeto UML debajo del carril?

Tengo el siguiente código:

\documentclass[a4paper]{article}

%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

%% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{tikz} % For graphics
\usepackage{pgfplots}
\usepackage{xcolor}
\usetikzlibrary{matrix,arrows,calc,positioning,shapes,decorations.pathreplacing}
\usepackage{graphicx}
\usepackage{tikz-uml}

\title{Your Paper}
\author{You}
\begin{document}
\maketitle
\section{Introduction}

Diagram below:

\small\begin{tikzpicture} 

  \begin{umlseqdiag} 
    \umlactor{User} 
    \umlobject{Proxy} 
    \umlobject[x=7]{Entry station}
    \umlobject[x=10]{Dst station}  

    \begin{umlcall}[op=retrieve(token),return=pkt-info]{User}{Proxy}
      \begin{umlcall}[op=RReq,return=success]{Proxy}{Entry station}
      \end{umlcall}
      \begin{umlcall}[op=RReq,return=success]{Entry station}{Dst station}
      \end{umlcall}
      \begin{umlcallself}[op=lookup,return=pkt-info]{Dst station} 
      \end{umlcallself}
      \begin{umlcall}[op=RRes,return=success]{Dst station}{Entry station}
      \end{umlcall}
      \begin{umlcall}[op=RRes,return=success]{Entry station}{Proxy}
      \end{umlcall}
    \end{umlcall}

    \begin{umlfragment}[type=loop, label=$\forall p_k$, inner ysep=1]
      \begin{umlcall}[dt=7, op=retrieve(token $p_k$),return=fragment $p_k$]{User}{Proxy}
        \umlcreatecall[x=7]{Proxy}{Station}
        \begin{umlcall}[op=RRes,return=success]{Proxy}{Station}
        \end{umlcall}
      \end{umlcall}
    \end{umlfragment}

    \begin{umlcallself}[dt=5, op=aggregate($p_k$), return=packet $p$]{User} 
    \end{umlcallself}
  \end{umlseqdiag} 

\end{tikzpicture} 
\end{document} 

El cual emite lo siguiente:ingrese la descripción de la imagen aquí

El problema está en el objeto Station. De hecho, no quiero tener la llamada de creación. Sólo me gustaría que ese carril se colocara ahí para objeto Stationy usarlo, eso es todo. No quiero createque se realice la llamada.

Si no es posible, ¿cómo puedo al menos cambiar la etiqueta para que en lugar de mostrarse createmuestre algo más?

Respuesta1

El texto de ese nodo está escrito directamente en el código del paquete (línea 4622, en la última versión), no está representado por alguna macro que pueda redefinirse.

Sin embargo, con la ayuda de , puedes xpatchparchear la definición de \umlcreatecallpara reemplazarla {create}con, por ejemplo {\CreateTxt}, una macro que puedes definir y redefinir como quieras. A continuación lo definí inicialmente como \newcommand{\CreateTxt}{create}y lo redefiní \renewcommanden el diagrama.

Nota no relacionada: carga graphicxdos veces, lo cual no es realmente necesario. Y ambos graphicxy xcolorse cargan mediante tikz, por lo que agregarlos explícitamente no es estrictamente necesario. tikza su vez, lo cargan ambos pgfplotsy tikz-uml, por lo que con uno de los presentes... entiendes el punto.

salida de código

\documentclass[a4paper]{article}

%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

%% Useful packages
\usepackage{amsmath}
\usepackage{tikz-uml}
\usepackage{xpatch}

\newcommand\CreateTxt{create}
% in the macro \umlcreatecall, replace "{create}" with "{\CreateTxt}":
\xpatchcmd{\umlcreatecall}{{create}}{{\CreateTxt}}{}{}

\begin{document}

\begin{tikzpicture} 
\small

  \begin{umlseqdiag} 
    \umlactor{User} 
    \umlobject{Proxy} 
    \umlobject[x=7]{Entry station}
    \umlobject[x=10]{Dst station}  

    \begin{umlcall}[op=retrieve(token),return=pkt-info]{User}{Proxy}
      \begin{umlcall}[op=RReq,return=success]{Proxy}{Entry station}
      \end{umlcall}
      \begin{umlcall}[op=RReq,return=success]{Entry station}{Dst station}
      \end{umlcall}
      \begin{umlcallself}[op=lookup,return=pkt-info]{Dst station} 
      \end{umlcallself}
      \begin{umlcall}[op=RRes,return=success]{Dst station}{Entry station}
      \end{umlcall}
      \begin{umlcall}[op=RRes,return=success]{Entry station}{Proxy}
      \end{umlcall}
    \end{umlcall}

    \begin{umlfragment}[type=loop, label=$\forall p_k$, inner ysep=1]
      \begin{umlcall}[dt=7, op=retrieve(token $p_k$),return=fragment $p_k$]{User}{Proxy}
        % redefine \CreateTxt to be empty
        \renewcommand\CreateTxt{}
        \umlcreatecall[x=7]{Proxy}{Station}
        \begin{umlcall}[op=RRes,return=success]{Proxy}{Station}
        \end{umlcall}
      \end{umlcall}
    \end{umlfragment}

    \begin{umlcallself}[dt=5, op=aggregate($p_k$), return=packet $p$]{User} 
    \end{umlcallself}
  \end{umlseqdiag} 

\end{tikzpicture} 
\end{document}

información relacionada