Graphics, Figures & TablesGreek symbol in table problem

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tatex
Posts: 4
Joined: Wed Sep 12, 2012 5:03 pm

Greek symbol in table problem

Post by tatex »

Hello guys,
I'm new to latex.

My problem is as follows:
Alpha symbol turns as 'ff' when inside table and table caption.

Code: Select all

\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|c|c|}
    \hline
    $Na$       &  $\alpha_1$  &  $\alpha_2$  &  \ldots    & $\alpha_M$  &  TNV  \\ \hline \hline
    $d_{mil}$  &  0           &  0           &  \ldots    &  0                          & \\ \hline
    $2d_{mil}$ &  0           &  0           &  \ldots    &  0                                 &         \\ \hline
    \vdots    &  \vdots      &  \vdots      &  $\ddots$  &  \vdots                            &         \\
    \hline
\end{tabular}
\caption[Blank TAD Table]{Blank TAD  table. $\alpha_1$, $\alpha_2$, and $\alpha_M$ denote the 1st, 2nd, and Mth angles in radians.}
\label{tab:tad_blank}
\end{table}
When inline a regular text, Greek letters turns just fine.
Can anyone tell what am I doing wrong?

10X
KD

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Greek symbol in table problem

Post by Stefan Kottwitz »

Hello,

this table works for me.I get:
table.png
table.png (7.31 KiB) Viewed 6048 times
So the problem is somewhere else in your code, probably caused by settings in your preamble. So, please post a Infominimal working example which shows the problem, so we can test and fix it. Follow that link to know why and how.

Stefan

PS: please don't write 10X or any shortcuts such as plz or such slang, it's not a chat here, but a serious forum. Your may benefit by serious answers. ;-)
LaTeX.org admin
tatex
Posts: 4
Joined: Wed Sep 12, 2012 5:03 pm

Greek symbol in table problem

Post by tatex »

OK.

I'm using IEEE LaTeX template with the following preamble:

Code: Select all

\documentclass[conference]{IEEEtran}
\usepackage{amsmath}

\hyphenation{op-tical net-works semi-conduc-tor}

\newcommand{\MYfooter}{\smash{
\hfil\parbox[t][\height][t]{\textwidth}{}\hfil\hbox{}}}
\makeatletter
\def\ps@IEEEtitlepagestyle{%
\def\@oddhead{\mbox{}2012 IEEE 27-th Convention of Electrical and Electronics Engineers in Israel \rightmark \hfil }%
\def\@oddfoot{\MYfooter}%
\def\@evenfoot{\MYfooter}}
\makeatother
\pagestyle{headings}
% adjust as needed
\addtolength{\footskip}{0\baselineskip}
\addtolength{\textheight}{-1\baselineskip}

\begin{document}
The source file generates two column layout using the an IEEEtran class file.

Your help is much appreciated.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Greek symbol in table problem

Post by Stefan Kottwitz »

When I use this preamble, I got a different layout, but the symbols are ok:
ieeetran-table.png
ieeetran-table.png (6.02 KiB) Viewed 6033 times
If you would read the text I linked to (Infominimal working example) you would know that such an example should be complete, i.e. compilable. Otherwise, as we see here, the problem cannot be reproduced. I gladly tested what I got, table with preamble, no problem. The cause is somewhere else. Perhaps in your document (not visible in the code pieces here), or system settings, perhaps visible in the .log file. You could post that as attachment here.

You will probably often notice, that people tell: post an MWE. It can be tested and usually leads to a solution. If you don't, well, no problem, you could get a guess or a general suggestion, but don't expect a working fix. Just for info.

Stefan
LaTeX.org admin
tatex
Posts: 4
Joined: Wed Sep 12, 2012 5:03 pm

Greek symbol in table problem

Post by tatex »

Stefan hello,

Thanks for your guidance.

The complete .tex is:

Code: Select all

\documentclass[conference]{IEEEtran}

\usepackage{amsmath}

\hyphenation{op-tical net-works semi-conduc-tor}

\newcommand{\MYfooter}{\smash{
\hfil\parbox[t][\height][t]{\textwidth}{}\hfil\hbox{}}}
\makeatletter
\def\ps@IEEEtitlepagestyle{%
\def\@oddhead{\mbox{}IEEEL\rightmark \hfil }%
\def\@oddfoot{\MYfooter}%
\def\@evenfoot{\MYfooter}}
\makeatother
\pagestyle{headings}
% adjust as needed
\addtolength{\footskip}{0\baselineskip}
\addtolength{\textheight}{-1\baselineskip}

\begin{document}

\title{TNL for Power Systems}

\author{\IEEEauthorblockN{Aron & Log}
\IEEEauthorblockA{Dept.\\}
}

\maketitle

\begin{abstract}
%\boldmath
abstract
\end{abstract}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
\label{sec:intro}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% no \IEEEPARstart
intro

\hfill

\hfill

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{TNS}
\label{sec:tns}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Section
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Initialization}
\label{sec:init}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Next we construct a blank LUT as shown in table \ref{tab:blank_lut}.

\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|c|c|}
    \hline
    $N_a$     &  $\alpha_1$  &  $\alpha_2$  &  \ldots    &  $\alpha_M$  &  TNV  \\ \hline \hline
    $d_{mil}$  &  0           &  0           &  \ldots    &  0                                 &         \\ \hline
    $2d_{mil}$ &  0           &  0           &  \ldots    &  0                                 &         \\ \hline
    \vdots    &  \vdots      &  \vdots      &  $\ddots$  &  \vdots                            &         \\
    \hline
\end{tabular}
\caption[tns]{tns table. $\alpha_1$, $\alpha_2$, and $\alpha_M$ denote the 1st, 2nd, and Mth angles in radians.}
\label{tab:blank_lut}
\end{table}

\subsection{Subsection Heading Here}
Subsection text here.

\subsubsection{Subsubsection Heading Here}
Subsubsection text here.

\section{Conclusion}
The conclusion goes here.

\section*{Acknowledgment}
The authors would like to thank...

\begin{thebibliography}{1}

\bibitem{IEEEhowto:kopka}
H.~Kopka and P.~W. Daly, \emph{A Guide to \LaTeX}, 3rd~ed.\hskip 1em plus
  0.5em minus 0.4em\relax Harlow, England: Addison-Wesley, 1999.

\end{thebibliography}

\end{document} 
This uses again the IEEEtran class. I've also attached the log file as you instructed.

Again, thanks for your patience.
Attachments
tatex.log
log file
(8.57 KiB) Downloaded 448 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Greek symbol in table problem

Post by Stefan Kottwitz »

Just a tip: the code example could be shorter, not everything is relevant. ;-) It's nice to solve problems with specific relevant code.

This time it happens, that the complete code is ok, when I tested it. So the log gives an answer, I noticed many warnings, such as

Code: Select all

LaTeX Font Info:    Font shape `OT1/ptm/bx/n' in size <5> not available
ptm means the Times font. So probably the symbols are wrong, even if your code is correct, just because that font is missing on your system. So, install the times package, using the package manager of your system. There are several alternative Times fonts, I would just try this one first.

When I tested, I saw that the Nimbus Roman font was used. So it could be also a good idea to install the nimbus package and/or urw.

Stefan
LaTeX.org admin
tatex
Posts: 4
Joined: Wed Sep 12, 2012 5:03 pm

Re: Greek symbol in table problem

Post by tatex »

Hello again.

Problem was solved by installing the Times package as you suggested.
The Nimbus link seems to be broken though.
Thanks a lot for you time and patience.
Post Reply