2

I am building a table in LaTeX, the csv contains the following:

Problem Instance,Best Model
1,CAHH_I
2,CAHH_I
3,CAHH_I
4,CAHH_I
5,CAHH_I
6,CAHH_I
7,CAHH_I
8,CAHH_I
9,CAHH_I
10,CAHH_I
11,CAHH_I
12,CAHH_I
13,CAHH_I
14,CAHH_I
15,CAHH_I
16,CAHH_I
17,CAHH_I
18,CAHH_I
19,CAHH_I
20,CAHH_I
21,CAHH_I
22,CAHH_I
23,CAHH_I
24,CAHH_I

And the code that causes me trouble is:

\documentclass{article}

\usepackage{csvsimple}
\usepackage{booktabs}
\usepackage{caption}

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%% DEFAULT BEST %%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{table}[htbp]
  \centering
  \begin{tabular}{cc}
    \toprule
    Problem Instance & Best Model \\
    \midrule
    \midrule
    \csvreader[
        late after line=\\
    ]{./dataframes/Best_Models_Performance_GAF_DEFAULT.csv}{}         
    {%
        \csvcoli & \detokenize\expandafter{\csvcolii}
       % Specify the columns to include in the table
    }
    \bottomrule
    \bottomrule
  \end{tabular}
  \caption{Best Profit Performance Solution Models for the GA Fundamentals Default Instance Library}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%% DEFAULT BEST %%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

The problem is that it prints me this tiny dot character instead of the original underscore from the csv file, what can I do?

MyTable Compiled in Overleaf

1 Answers1

1

You'll get real underscores with a suitable font encoding:

\documentclass{article}

\usepackage{csvsimple}
\usepackage{booktabs}
\usepackage{caption}
\usepackage[T1]{fontenc}

\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%% DEFAULT BEST %%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{table}[htbp]
  \centering
  \begin{tabular}{cc}
    \toprule
    Problem Instance & Best Model \\
    \midrule
    \midrule
    \csvreader[
        late after line=\\,
    ]{./test.csv}{}         
    {%
        \csvcoli & \detokenize\expandafter{\csvcolii}
       % Specify the columns to include in the table
    }
    \bottomrule
    \bottomrule
  \end{tabular}
  \caption{Best Profit Performance Solution Models for the GA Fundamentals Default Instance Library}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%% DEFAULT BEST %%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

enter image description here