How can I use Greek symbols as a part of section? For example, how may I create a section 'k-epsilon Turbulence Model'?
-
1We do not put an explicit thank you in this site. You can upvote an answer if you want to thank somebody. – Masroor Jun 22 '14 at 17:50
-
1Welcome! Depending on what exactly you want (plain section title, + toc, + hyperref), one of the following questions probably contains a solution for you: http://tex.stackexchange.com/q/5314, http://tex.stackexchange.com/q/77657, http://tex.stackexchange.com/q/134236. Please take a look at them as the information there might help you. If so, that's great, and we'll probably close this question as a duplicate just to keep the place tidy and to help people find answers quickly. If not, please edit your question here to explain why so that people can better focus their attention to help you. – doncherry Jun 22 '14 at 18:32
1 Answers
Actually, there is nothing special when you want to put a Greek letter in a section name. Simply write in the way you would have written at other places, using math mode.
(See the end of the answer regarding a notable exception when you use the hyperref package.)
\documentclass{article}
\begin{document}
\section{$k$-$\epsilon$ Turbulence Model}
\end{document}

Elaborating the above point a little, just remember that you can write in math mode anywhere you like just the way you write in normal text.
If you want to add some Greek letters in figure captions, there is nothing special, write it in the above way. In a footnote? No special way. In your paper title? Again, no special way.
In the above solution, I assumed that the - between k and epsilon is a
hyphen. If it means a minus sign, please write it as $k-\epsilon$. As a matter of fact,
you are in the best position to tell which you actually meant.
In addition to the general comments, if you are using the package hyperref, you will face the warning,
Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)
in the above case. Under this scenario, you will need to change the usage to,
\section{\texorpdfstring{$k$-$\epsilon$}{k-e} Turbulence Model}.
Do not forget that \texorpdfstring requires two arguments. The second argument will be used for the pdf section name, while the first argument will be displayed with (La)TeX. Please see this for details.
-
1If the section title is boldface, one must not forget to write
\boldmathat the beginning of the section title. – Bernard Jun 22 '14 at 17:55 -
@Bernard except when a bold
$k$would mean something different (for example a vector...) than the non-bold version :) – cgnieder Jun 22 '14 at 17:57 -
@Bernard That depends on the actual use, and yes, I wanted keep it simple for a user who looks like still in first-faltering-steps. – Masroor Jun 22 '14 at 17:58
-
5if
hyperrefis being used, math won't be allowed in bookmarks. that possibility is dealt with in Token not allowed in a PDF string: hyperref warning affecting the bookmarks in the PDF – barbara beeton Jun 22 '14 at 18:16 -
@barbarabeeton Thanks. That was an oversight from me not mentioning this. I have updated my answer. – Masroor Jun 22 '14 at 23:28
-
According to this answer,
\texorpdfstring"takes two arguments and uses the first for (La)TeX and the second for pdf," so you need an extra set of{}after the one given. – Bondolin Dec 20 '15 at 20:23