消失的星号之谜

消失的星号之谜

我的表格中有一个奇怪的“错误”。不知为何,一个星号没有显示出来。我使用的是 LuaLaTex,据我所知,它使用 Unicode,因此我表格中所有这些奇怪的字形都应该可以直接打印出来,而且它们都打印出来了,除了那个星号!奇怪的是,如果我添加第二个星号,就会出现一个。我尝试过不添加tcolorbox和使用tabular替代的表格tabularx,但都没有显示星号。我被难住了。

它是什么样子的:

在此处输入图片描述

这是我的代码:

\documentclass[12pt,a4paper,openany]{book}
\usepackage{fontspec}
\setmainfont[Numbers=OldStyle,Ligatures=TeX]{linux libertine} 

\usepackage{polyglossia}
\setdefaultlanguage{icelandic}

\usepackage{tcolorbox}
\usepackage{tabularx}

\begin{document}
\begin{table}[h!]%
\begin{footnotesize}

\begin{tcolorbox}
    \begin{center}
    \begin{tabularx}{0.9\textwidth}{lXX}
        Stofn    &  Tenging við [GULUR]         &   Orð af sama stofni   \\
        \hline
        *ƀlaikaz &  gamalháþýska: \textit{bleih} ‘gulleitur, fölur’ &   is. \textit{bleikur};   \\
                 &                                      &   dk. \textit{bleg} ‘fölur’; \\
                 &                                      &   en. \textit{bleak} ‘hráslagalegur’ \\
        \hline
        *ƀlēwaz  &  skylt latnesku \textit{flāvus} ‘gullingulur’;       &   is. \textit{blár}; \\
                 &  fornírska \textit{blár} ‘gulur’     &   dk. \textit{blå} ‘blár’; \\
                 &                                      &   en. \textit{blue} ‘blár’ \\
        \hline
        *falvaz  &  fornenska \textit{fealu} ‘gulbrúnn, gulur’; &   is. \textit{fölur}; \\
                 &  gamalsaxneska \textit{falu} ‘fölgulur’; &   en. \textit{fallow} ‘gulbrúnn’  \\
                 &  fornháþýska \textit{falo} ‘fölur, rauðgulur’;       &       \\
                 &  slavneska *\textit{polь} ‘gulur, hvítleitur’        &       \\
        \hline
        *ʒallan  &  talið skylt *\textit{g̑hel}-                    &   is. \textit{gall};  \\
        *ʒallōn  &  sanskrít \textit{hári} ‘fölur, gulleitur, grænleitur’; & en. \textit{gall} ‘ósvífni’  \\
                 &  avestíska \textit{zairi} ‘gulur, gulleitur’     &       \\
        \hline
        *ʒelwaz  &  fornenska \textit{ʒeolu} ‘gulur’;               &   is. \textit{gulur};  \\
                 &  skylt sanskrít \textit{gaurá}- ‘hvítleitur, gulleitur’; &   dk. \textit{gul} ‘gulur’;  \\
                 &  latína \textit{giluus} ‘fölgulur’;          &   en. \textit{yellow} ‘gulur’  \\
                 &  latína \textit{fuluus} ‘skærgulur’          &           \\
        \hline
        *ʒlōraz  &  sama og gríska \textit{khlorós} ‘grænleitur gulur’ & is. \textit{glor} ‘gulgrár hungurlitur’;  \\
                 &                                  &   en. \textit{chlorine} ‘klór(gas)’  \\
        \hline
        *ʒlūmaz  &  skylt grísku \textit{khloús} ‘grænleitur gulur’ & is. \textit{Glúmur} ‘björn’; \\
                 &                              &   en. \textit{glum} ‘dökkur, daufur, leiður’  \\
        \hline
        *xunaʒgan & tengt grísku \textit{knikós} ‘fölgulur’ &   is. \textit{hunang}; \\
                 &                                          &   en. \textit{honey} ‘hunang’  \\
        \hline
        *pađđōn  &  fornírska \textit{buide} ‘gulur’        &   is. \textit{padda}; \\
                 &                                          &   dk. \textit{padde} ‘froskur’  \\
        \hline
        *salwaz  &  fornnorræna \textit{sǫlr} ‘gulur’       &   is. \textit{söl}  \\
                 &  miðhollenska \textit{salu} ‘skítugur, fölur, gulur’ &   en. \textit{sallow} ‘gugginn, fölur’  \\
    \end{tabularx}
    \end{center}
\end{tcolorbox}
\end{footnotesize}
    \caption{Germanskir stofnar íslenskra litaorða}
    \label{tafla:gulur}
\end{table}
\end{document}

我意识到既然我已经从技术上找到了解决方案(添加第二个星号),那么这本身就不是一个问题,但这确实让我很烦恼。所以如果有人知道为什么会发生这种情况,请告诉我。

答案1

一个非常简单的文档

\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{5cm}{lX}
\show\\
\end{tabularx}
\end{document}

给出终端输出

> \\=macro:
->\relax \iffalse {\fi \ifnum 0=`}\fi \@ifstar \@xarraycr \@xarraycr .

除了括号技巧之外,还有一个\@ifstar后面跟着两个相同的宏\@xarraycr。这意味着\\\\*具有相同的效果。现在,\@ifstar宏基于\@ifnextchar,它很好地完成了忽略空格。在这种情况下,副作用是,\\后面跟着一个新行的*被解释为\\*。因此,您必须“停止”扫描\@ifnextchar并使用 ,例如,\\ \relax如果您的行以 开头*

相关内容