Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to format names of algorithms just as they appear inside the algorithmic environment. For an example, see the title "An unsuccessful attempt: Flip-and-Match" of this paper. So far I've been using \Call{MyFunc}{}, but guts tell me this is not the right thing to do, and more importantly, it doesn't work if I want to use it in section titles. What is the proper command to use for such cases?

share|improve this question
3  
I couldn't see anything that resembled an algorithm in the work you cite. I think we could help better if you gave us a minimum complete document that illustrates your problem, plus a description or picture shewing what's wrong with it. –  Brent.Longborough Mar 16 '12 at 17:23
2  
Perhaps you are looking for a way to use small caps in the argument of a sectional unit? If this is so, you can use something like \section{An unsuccessful attempt: {\normalfont\scshape Flip-and-Match}} –  Gonzalo Medina Mar 16 '12 at 17:45
add comment

1 Answer

up vote 2 down vote accepted

Define a macro for your specially formatted names: for example

\newcommand{\algoname}[1]{\textnormal{\textsc{#1}}}

will produce the result you want when called as

\section{An unsuccessful attempt: \algoname{Flip-and-Match}}
Let us warm up by considering the mechanism \algoname{Flip-and-Match} proposed ...
share|improve this answer
    
Thank you, that was exactly what I was looking for. –  blubb Mar 19 '12 at 10:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.