Math & SciencePseudocode environment - rename Algorithm

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Leonaj
Posts: 3
Joined: Fri May 13, 2016 1:06 pm

Pseudocode environment - rename Algorithm

Post by Leonaj »

Hello, is there anybody, who could help me with Pseudocode, please?

I need to cancel 'Algorithm' term in the beginning of environment and rename it because of language of my thesis.

I will be grateful for your help. Thank you :)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Pseudocode environment - rename Algorithm

Post by Johannes_B »

We certainly want and probably can help you, but we need more information. Can you provide a minimal working example along with a more detailed description of what you want to do?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Leonaj
Posts: 3
Joined: Fri May 13, 2016 1:06 pm

Pseudocode environment - rename Algorithm

Post by Leonaj »

OK, I'll try :)

Code: Select all

\documentclass{book}
\usepackage[utf8]{inputenc} 
\usepackage[IL2]{fontenc} 
\usepackage[czech]{babel}
\usepackage{mathptmx}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{pseudocode}

\begin{document}
\begin{pseudocode}{2. Varianta: Diskrétní komutační funkce $N_{xy}$}{?}
... some statements
\end{pseudocode}
\end{document}
Current Output
But I would like to have 'Algoritmus' instead of 'Algorithm' :) I tried to find some advices on the Internet how to redefine name, but I didn't find :(
Last edited by Leonaj on Fri May 13, 2016 7:56 pm, edited 1 time in total.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Pseudocode environment - rename Algorithm

Post by Johannes_B »

Wow, that almost drove me crazy on a late friday, the 13th.

Ulrike Fischer and Enrico Gregorio saved me from going insane, all attribution belongs to them.

Code: Select all

\documentclass{book}
\usepackage{xpatch}% Added
\usepackage{pseudocode}
\xpatchcmd{\pseudocode }{Algorithm}{Wombat}{}{}
\xpatchcmd{\pseudocode }{Algorithm}{Nasenb\"ar}{}{}
\begin{document}
\begin{pseudocode}{capybara}{?}
\end{pseudocode}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Leonaj
Posts: 3
Joined: Fri May 13, 2016 1:06 pm

Re: Pseudocode environment - rename Algorithm

Post by Leonaj »

Oh, that's amazing! I almost didn't believe, that could ever work :)) Thank you so much! :)) And thanks Ulrike Fischer and Enrico Georgio as well :)
Post Reply