IEEE 액세스 형식의 의사 코드에 "입력" 및 "출력" 문구 대신 "요구" 및 "보장"이 표시되는 이유는 무엇입니까?

IEEE 액세스 형식의 의사 코드에 "입력" 및 "출력" 문구 대신 "요구" 및 "보장"이 표시되는 이유는 무엇입니까?

\documentclass{article} 형식으로 다음 의사 코드를 작성하면 컴파일 후 "입력" 및 "출력" 문구가 표시되지만 IEEE 액세스 템플릿에 동일한 라텍스 코드를 작성하면 "요구" 및 "보장" 문이 표시됩니다. 그대로, 컴파일 후에. 첫 번째 경우 기사 형식은 어떻게든 "필수" 및 "보장" 문구를 "입력" 및 "출력"으로 변환하지만 IEEE 액세스 형식에서는 이 변환이 수행되지 않습니다.

누군가 이 문제를 어떻게 해결할 수 있는지 설명해 주시겠습니까? 컴파일 후 "Require" 및 "Ensure" 대신 "Input" 및 "Output"이 표시되고 싶습니다.

\documentclass{ieeeaccess}
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage[section]{placeins}
\usepackage{algorithm}
 \usepackage{algpseudocode}
 \usepackage{algorithmicx}
 \algdef{SE}[DOWHILE]{Do}{doWhile}{\algorithmicdo}[1]{\algorithmicwhile\ #1}%

\begin{document}
\begin{algorithm}[H]    
    \caption{Algorithm 1}\label{Alg-Decap}
    \begin{algorithmic}[1]
        \Require{$(C,S_k)$}
        \Ensure{ HashSession$(1,\underbar r,C)$ or HashSession$(0,\rho,C))$ }
        \State $c\leftarrow$ Decode$(\underbar c)$  
        \State $c.(3f)\in\mathcal{R}/q$
        \State $e\leftarrow $ (Rounded$(c.(3f))$ mod 3) $\in \mathcal{R}/3$
        \State $e.(1/g)\in\mathcal{R}/3$
        \State $r'\leftarrow$ Lift($e.(1/g)$) $\in\mathcal{R}/q$
        \State $h.r'\in\mathcal{R}/q$
        \State $c'\leftarrow$ Round$(h.r')$
        \State  $\underbar c'\leftarrow$ Encode$(c')$
        \State $C'\leftarrow(\underbar c',$ HashConfirm$(\underbar r',\underbar h))$
        \If{$C'==C$}
        \State \textbf{return} HashSession$(1,\underbar r,C)$
        \Else
        \State \textbf{ return} HashSession$(0,\rho,C))$
        \EndIf
    \end{algorithmic}
\end{algorithm}
\end{document}

답변1

다음 설정을 사용하여 "필수"를 "입력"으로 매핑하고 "보장"을 "출력"으로 매핑할 수 있습니다.

\algrenewcommand\algorithmicrequire{\textbf{Input:}}
\algrenewcommand\algorithmicensure{\textbf{Output:}}

따라서 귀하의 경우 전체 코드는 다음과 같습니다.

\documentclass{ieeeaccess}
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage[section]{placeins}
\usepackage{algorithm}
 \usepackage{algpseudocode}
 \usepackage{algorithmicx}
 \algdef{SE}[DOWHILE]{Do}{doWhile}{\algorithmicdo}[1]{\algorithmicwhile\ #1}%

\algrenewcommand\algorithmicrequire{\textbf{Input:}}
\algrenewcommand\algorithmicensure{\textbf{Output:}}

\begin{document}
\begin{algorithm}[H]    
    \caption{Algorithm 1}\label{Alg-Decap}
    \begin{algorithmic}[1]
        \Require{$(C,S_k)$}
        \Ensure{ HashSession$(1,\underbar r,C)$ or HashSession$(0,\rho,C))$ }
        \State $c\leftarrow$ Decode$(\underbar c)$  
        \State $c.(3f)\in\mathcal{R}/q$
        \State $e\leftarrow $ (Rounded$(c.(3f))$ mod 3) $\in \mathcal{R}/3$
        \State $e.(1/g)\in\mathcal{R}/3$
        \State $r'\leftarrow$ Lift($e.(1/g)$) $\in\mathcal{R}/q$
        \State $h.r'\in\mathcal{R}/q$
        \State $c'\leftarrow$ Round$(h.r')$
        \State  $\underbar c'\leftarrow$ Encode$(c')$
        \State $C'\leftarrow(\underbar c',$ HashConfirm$(\underbar r',\underbar h))$
        \If{$C'==C$}
        \State \textbf{return} HashSession$(1,\underbar r,C)$
        \Else
        \State \textbf{ return} HashSession$(0,\rho,C))$
        \EndIf
    \end{algorithmic}
\end{algorithm}
\end{document}

요구, 입력 보장, 출력 변경 예

관련 정보