使用中文和大脚怪之间的问题

使用中文和大脚怪之间的问题

我正在写一本中文书。当我使用 时\package{bigfoot}\usepackage[heading]{ctex}它不能正常工作。这里有一个小例子:

\documentclass[12pt]{book}
\usepackage{graphicx}
\usepackage[total={6in, 8in}]{geometry} % See geometry.pdf to learn the layout options. There are lots.

%% 顯示中文
\usepackage[heading]{ctex} %代替了\usepackage{ctexcap}



%% 備註   % 對表格的備注只能使用\footnote{text}
\usepackage{bigfoot}
\usepackage{tabularx}
\newcounter{footalt}
\def\thefootalt{\fnsymbol{footalt}}
\MakeSortedPerPage{footalt}
\WithSuffix\def\footnotedefault'{\refstepcounter{footalt}
    \Footnotedefault{\thefootalt}}
\usepackage[hang]{footmisc}  % footref 的應用。要放在 hyperref 之前。
%\usepackage{hyperref} % 可讓你點擊ref 直接指向所 ref, 譬如點擊 TOC, 可以去到相應章節. 要放在 footmisc 之後
\DeclareNewFootnote{A}[arabic]
\DeclareNewFootnote{B}[roman]
\DeclareNewFootnote[para]{C}[alph]
\DeclareNewFootnote[para]{D}[Roman]
\DeclareNewFootnote[para]{E}[Alph]
\DeclareNewFootnote[para]{F}[fnsymbol]
\MakeSortedPerPage{footnoteC}
\MakeSortedPerPage{footnoteD}
\MakeSortedPerPage{footnoteE}
\MakeSortedPerPage{footnoteF}

\newcommand{\lb}{\label}

\setlength{\footnotemargin}{3mm} 






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

It is highly\footnoteF{footnote f to the text} recommended to add a compilable, \footnoteA{this\footnoteF{footnoteF to footnote} is a \footref{001}first-level\footnoteB{\lb{001}this is a \footref{002}second-level\footnoteC{\lb{002}footnote\footnoteD{footnote d} c} footnote sample.} foonote sample.}but minimal working example (MWE) that illustrates your problem. This way other users can compile it themselves, analyze error messages more closely and also easily implement and test their solutions before posting them. This allows also for full, compilable examples to be posted in the answers which are very helpful for the question asker and all other people with the same problem. Note that in (La)TeX, issues are often dependent on the packages used, and other people won't be able to provide much help if they don't know which packages you are using.

"中文中文中文"

\end{document}

在这个例子中,汉字和\footnoteF{footnoteF to footnote}不能同时使用。它们通过使用\usepackage[heading]{ctex}或不使用而单独出现。我怎样才能让两者同时出现?谢谢!

答案1

这看起来非常类似于在加载 fancyvrb、siunitx 和 bigfoot 时,我收到输入堆栈大小=5000,TeX STOPPED:发生致命错误并且适用相同的解决方案:

\documentclass[12pt]{book}
\usepackage{graphicx}
\usepackage[total={6in, 8in}]{geometry} % See geometry.pdf to learn the layout options. There are lots.

%% 顯示中文
\usepackage[heading,fontset=ubuntu]{ctex} %代替了\usepackage{ctexcap}



%% 備註   % 對表格的備注只能使用\footnote{text}
\usepackage{bigfoot}
\usepackage{xpatch}

\makeatletter
\xpatchcmd{\FN@allmarks}{266}{256}{}{} % patch bigfoot to use the right counter
\makeatother


\usepackage{tabularx}
\newcounter{footalt}
\def\thefootalt{\fnsymbol{footalt}}
\MakeSortedPerPage{footalt}
\WithSuffix\def\footnotedefault'{\refstepcounter{footalt}
    \Footnotedefault{\thefootalt}}
\usepackage[hang]{footmisc}  % footref 的應用。要放在 hyperref 之前。
%\usepackage{hyperref} % 可讓你點擊ref 直接指向所 ref, 譬如點擊 TOC, 可以去到相應章節. 要放在 footmisc 之後
\DeclareNewFootnote{A}[arabic]
\DeclareNewFootnote{B}[roman]
\DeclareNewFootnote[para]{C}[alph]
\DeclareNewFootnote[para]{D}[Roman]
\DeclareNewFootnote[para]{E}[Alph]
\DeclareNewFootnote[para]{F}[fnsymbol]
\MakeSortedPerPage{footnoteC}
\MakeSortedPerPage{footnoteD}
\MakeSortedPerPage{footnoteE}
\MakeSortedPerPage{footnoteF}

\newcommand{\lb}{\label}

\setlength{\footnotemargin}{3mm} 






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

It is highly\footnoteF{footnote f to the text} recommended to add a compilable, \footnoteA{this\footnoteF{footnoteF to footnote} is a \footref{001}first-level\footnoteB{\lb{001}this is a \footref{002}second-level\footnoteC{\lb{002}footnote\footnoteD{footnote d} c} footnote sample.} foonote sample.}but minimal working example (MWE) that illustrates your problem. This way other users can compile it themselves, analyze error messages more closely and also easily implement and test their solutions before posting them. This allows also for full, compilable examples to be posted in the answers which are very helpful for the question asker and all other people with the same problem. Note that in (La)TeX, issues are often dependent on the packages used, and other people won't be able to provide much help if they don't know which packages you are using.

"中文中文中文"

\end{document}

我添加它fontset=ubuntu只是为了能够运行示例,但它与解决方案无关。

相关内容