csv文件中的下划线,在LaTeX中导入文件时不打印(背页)

mbjcgjjk  于 12个月前  发布在  其他
关注(0)|答案(1)|浏览(70)

我在LaTeX中构建了一个表,csv包含以下内容:

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

而给我带来麻烦的代码是:

\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}

问题是,它打印我这个小圆点字符,而不是原来的下划线从csv文件,我该怎么办?

zpjtge22

zpjtge221#

你会得到真实的的下划线与一个合适的字体编码:

\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}

相关问题