LaTeX forum ⇒ Math & SciencePseudocode environment - rename Algorithm Topic is solved

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

Pseudocode environment - rename Algorithm

Postby Leonaj » Fri May 13, 2016 1:16 pm

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 :)

User avatar
Johannes_B
Site Moderator
Posts: 4104
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri May 13, 2016 6:15 pm

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

Postby Leonaj » Fri May 13, 2016 7:50 pm

OK, I'll try :)

  1. \documentclass{book}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[IL2]{fontenc}
  4. \usepackage[czech]{babel}
  5. \usepackage{mathptmx}
  6. \usepackage{amsmath,amssymb,amsthm}
  7. \usepackage{pseudocode}
  8.  
  9. \begin{document}
  10. \begin{pseudocode}{2. Varianta: Diskrétní komutační funkce $N_{xy}$}{?}
  11. ... some statements
  12. \end{pseudocode}
  13. \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: 4104
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri May 13, 2016 10:30 pm

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.

  1. \documentclass{book}
  2. \usepackage{xpatch}% Added
  3. \usepackage{pseudocode}
  4. \xpatchcmd{\pseudocode }{Algorithm}{Wombat}{}{}
  5. \xpatchcmd{\pseudocode }{Algorithm}{Nasenb\"ar}{}{}
  6. \begin{document}
  7. \begin{pseudocode}{capybara}{?}
  8. \end{pseudocode}
  9. \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

Postby Leonaj » Fri May 13, 2016 11:14 pm

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 :)


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 2 guests