Hi I have the following code
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{blindtext}
\usepackage{enumerate}
\geometry{paper=a4paper, left=24mm, right=23mm, top=20mm, bottom=20mm}
%Abbildungen
\usepackage{graphicx}
\usepackage[list=true,listformat=simple]{subcaption} %Mehrere Bilder in einer figure
\usepackage[justification=raggedright]{caption}
%Zentrierte Beschriftungen
\usepackage{float} %H-Figure Typ
\usepackage[labelfont={bf,sf},font={small},%
labelsep=space]{caption}
\usepackage{rotating}
\usepackage{listings}
\lstset{
basicstyle=\ttfamily\footnotesize,
xleftmargin=.1\textwidth,
}
\usepackage[wide]{sidecap}
\usepackage{newfloat}
\DeclareFloatingEnvironment[placement={!ht},name=]{listing}
\sidecaptionvpos{listing}{c}
\makeatletter
\makeatother
\begin{document}
\blindtext
(\cite{pykrige}).
\begin{SClisting}
\begin{lstlisting}[language=Python]
from traceback import print_tb
import numpy as np
from pykrige.ok import OrdinaryKriging
from pykrige.kriging_tools import write_asc_grid
import pykrige.kriging_tools as kt
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
\end{lstlisting}
\captionsetup{style=base}
\caption{}
\label{lst:einf}
\end{SClisting}
\blindtext
\begin{SClisting}
\begin{lstlisting}[language=Python]
def load_data():
dflm = dfl
return dflm
def get_data(dflm):
return {
"lons": dflm['Longitude'].values,
"lats": dflm['Latitude'].values,
"values": dflm['ValueHeight'].values
}
dflm = load_data()
base_data = get_data(dflm)
\end{lstlisting}
\captionsetup{style=base}
\caption{}
\label{lst:laden}
\end{SClisting}
\begin{figure}[H]
\centering
\includegraphics{Unbenannt.PNG}
\caption{these captions should remain as they are}
\label{fig:my_label}
\end{figure}
\end{document}
However, I want the numbers on the right edge to be in a plane and surrounded by a bracket. I know I have to change the \captionsetup{style=base}snipped, however I don´t know in which way
The difficulty:I have illustrations in the same work, so the defintition of the caption for the code must be such that it only affects the code and the captions of the illustrations remain as before.


\DeclareCaptionFormat{myformat}{\hspace*{<space>} [#1]}with different negative spaces starting with0pt(3) Google in this site\dimexpr– Simon Dispa Sep 24 '22 at 13:43