I want to write pseudo-codes in my survey using program
package. Since I'm writing in other languages rather than English, I have to alter the names of those environments, like theorem
and proof
, etc (these environments are all from amsthm
). I use the command
\renewcommand{\proofname}{XXX}
in order to alter the proof name, but after loading the program
package the name turns back into Proof in bold font, instead of XXX that I want.
Another confliction happened in the usage of vertical bar. The program
package use |variable_name|
in both normal text and math expression, and thus when I write the following equations:
\[f|_{\mathsf{ker} A}=g|_{\mathsf{Ker} A}\]
where the vertical bar refers to function restriction, it is expalined to be a variable and the compiler claims error:
! LaTeX Error: \mathsf allowed only in math mode.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.208 \[f|_{\mathsf
{ker} A}=g|_{\mathsf{Ker} A}\]
How can I resolve these problems? I know that algorithmicx
or some similar packages are also able to do the pseudo-code job, but I really dislike their strict end or end if fashions.
Thanks in advance.
algpseudocode
without end block text.program
package.