[Tex/LaTex] Change algorithmicx caption name

algorithmicxalgorithmscaptions

I am trying to change the Caption name of Algorithmicx but it doesnt work. This what i include to use it.

%pseudocode
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\algtext*{EndWhile}% Remove "end while" text
\algtext*{EndIf}% Remove "end if" text
\algtext*{EndFor}
% \renewcommand{\ALG@name}{Pseudocode} doesnt work
\renewcommand{\listalgorithmname}{Liste der Pseudocodes}

I am getting this:

! LaTeX Error: Missing \begin{document}.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... \renewcommand{\ALG@name}

And also
\renewcommand{\algorithmcfname}{Pseudocode} doesnt work didnt work.
Could someone tell me whats going wrong?


The requested MWE. Sorry if this meight be long but thats simply my header.

\RequirePackage[ngerman=ngerman-x-latest]{hyphsubst}
%etwas größere schrift als default
\documentclass[a4paper,12pt]{scrreprt}
\usepackage{geometry} 
%definiere ränder neu
\geometry{verbose,a4paper,tmargin=25mm,bmargin=20mm,lmargin=25mm,rmargin=25mm,includefoot}
%\geometry{a4paper, portrait, left=2.5cm, right=2cm, top=2cm, bottom=2cm, includefoot}
%change font
\usepackage{helvet}
%use urls right
\usepackage{hyperref}
%include der grafiken
\usepackage{graphicx}
\usepackage{float}
%bla deutsch
\usepackage[ngerman]{babel} 
%wrapping von figuren
\usepackage{wrapfig}

%mathequark
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amsfonts}


\usepackage[utf8]{inputenc} %for all äöü

\renewcommand{\contentsname}{Inhaltsverzeichnis} %% change name form content to inhals...
%\usepackage{cite}% citieren

\pagestyle{plain} % regular pagestyle

%command for codes inline
\providecommand{\code}[1]{\texttt{#1}}

%for the code
\usepackage{listings} %code
\usepackage{xcolor}
%change the caption
\renewcommand{\lstlistingname}{Code}
\renewcommand{\lstlistlistingname}{Codeverzeichnis} 
\usepackage{xcolor}

%grapfics
\usepackage{tikz,times}
\usetikzlibrary{mindmap,backgrounds}

%pseudocode
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\algtext*{EndWhile}% Remove "end while" text
\algtext*{EndIf}% Remove "end if" text
\algtext*{EndFor}
\renewcommand{\ALG@name}{}% doesnt work
\renewcommand{\listalgorithmname}{Liste der Pseudocodes}

\begin{document}
test
\end{document}

Best Answer

You have tried to use the @ character in a command name, which is not directly possible, you have to 'mask' it with the commands \makeatletter before using the other command and afterwards change it back to \makeatother, see my code below.

\documentclass{report}

\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\algtext*{EndWhile}% Remove "end while" text
\algtext*{EndIf}% Remove "end if" text
\algtext*{EndFor}
\makeatletter  % Add this!!!!
 \renewcommand{\ALG@name}{Pseudocode} %doesnt work
\makeatother   % Add this also
\renewcommand{\listalgorithmname}{Liste der Pseudocodes}


\begin{document}

Some text to be written in here!

\end{document}

However, since I have no other information, what you intended, I can not say, whether this works at all -- there are no compilation errors, at least.