我在脚注中使用自定义符号。我想用老式的风格来做,所以我交替使用匕首和双匕首。一旦任一符号的实例达到四个,我就会遇到麻烦。右边的两个符号被挤压在一起:
我不确定是什么原因造成的,但我想修复它。
我在 Mac 上使用 LyX 和 XeTeX。
这只是前言:
%% Footnotes
%% allows the use of multiple types of footnotes
\usepackage{perpage}
\MakePerPage{footnote}
%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
\ensuremath{%
\ifcase#1% 0
\or % 1
\dagger
\or % 2
\ddagger
\or % 3
\dagger\dagger
\or % 4
\ddagger\ddagger
\or % 5
\dagger\dagger\dagger
\or % 6
\ddagger\ddagger\ddagger
\or % 7
\dagger\dagger\dagger\dagger
\or % 8
\ddagger\ddagger\ddagger\ddagger
\else % >= 9
\@ctrerr
\fi
}%
}
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
\myfnsymbolsingle{\value{#1}}%
}
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
\myfnsymbolmult{\value{footnote}}%
}
%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
\textsuperscript{\thefootnotemark}~%
}
以下是最小工作副本,LyX 格式(文件扩展名为 .lyx):
#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass scrbook
\begin_preamble
%% Footnotes
%% allows the use of multiple types of footnotes
\usepackage{perpage}
\MakePerPage{footnote}
%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
\ensuremath{%
\ifcase#1% 0
\or % 1
\dagger
\or % 2
\ddagger
\or % 3
\dagger\dagger
\or % 4
\ddagger\ddagger
\or % 5
\dagger\dagger\dagger
\or % 6
\ddagger\ddagger\ddagger
\or % 7
\dagger\dagger\dagger\dagger
\or % 8
\ddagger\ddagger\ddagger\ddagger
\else % >= 9
\@ctrerr
\fi
}%
}
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
\myfnsymbolsingle{\value{#1}}%
}
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
\myfnsymbolmult{\value{footnote}}%
}
%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
\textsuperscript{\thefootnotemark}~%
}
\end_preamble
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "Kaiti SC"
\font_sans "default" "Kaiti SC"
\font_typewriter "default" "Baskerville"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts true
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format pdf4
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize 12
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder false
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle true
\papersize custom
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date true
\justification true
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\paperwidth 6in
\paperheight 9in
\leftmargin 0.8in
\topmargin 0.8in
\rightmargin 0.6in
\bottommargin 0.8in
\headheight 0.1in
\headsep 0.3in
\footskip 0.3in
\secnumdepth -2
\tocdepth 0
\paragraph_separation indent
\paragraph_indentation 0pt
\quotes_language swedish
\papercolumns 1
\papersides 2
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Standard
Lorem ipsum dolor sit amet
\begin_inset Foot
status open
\begin_layout Plain Layout
footnote 1
\end_layout
\end_inset
, consectetur adipiscing elit, sed do
\begin_inset Foot
status open
\begin_layout Plain Layout
footnote 2
\end_layout
\end_inset
eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin_inset Foot
status open
\begin_layout Plain Layout
footnote 3
\end_layout
\end_inset
Ut enim ad minim veniam,
\begin_inset Foot
status open
\begin_layout Plain Layout
footnote 4
\end_layout
\end_inset
quis nostrud exercitation ullamco laboris
\begin_inset Foot
status open
\begin_layout Plain Layout
footnote 5
\end_layout
\end_inset
nisi ut aliquip ex ea commodo consequat.
\begin_inset Foot
status open
\begin_layout Plain Layout
footnote 6
\end_layout
\end_inset
Duis aute irure dolor in reprehenderit
\begin_inset Foot
status open
\begin_layout Plain Layout
footnote 7
\end_layout
\end_inset
in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
\begin_inset Foot
status open
\begin_layout Plain Layout
footnote 8
\end_layout
\end_inset
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
\end_layout
\end_body
\end_document
感谢您提供的任何帮助!
答案1
解决方案是使用提供和textcomp
的包而不是和。\textdagger
\textdaggerdbl
\dagger
\ddagger
我的调试表明,一行中的四个\daggers
或(当然是在数学模式下)会导致这些奇怪的空间[因此,具体问题与您的代码无关。我认为是偶数和的函数。您可以在我的 MWE 上检查问题,其中包含一行中的一些匕首,让您轻松看到。两把匕首也比其他匕首更近,但只有两把匕首,效果是不可见的]。\ddaggers
\daggers
\ddaggers
代码:
\documentclass{article}
%% Footnotes
%% allows the use of multiple types of footnotes
\usepackage{perpage}
\MakePerPage{footnote}
\usepackage{textcomp}
%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
%
\ifcase#1% 0
\or % 1
\textdagger
\or % 2
\textdaggerdbl
\or % 3
\textdagger\textdagger
\or % 4
\textdaggerdbl\textdaggerdbl
\or % 5
\textdagger\textdagger\textdagger
\or % 6
\textdaggerdbl\textdaggerdbl\textdaggerdbl
\or % 7
\textdagger\textdagger\textdagger\textdagger
\or % 8
\textdaggerdbl\textdaggerdbl\textdaggerdbl\textdaggerdbl
\else % >= 9
\@ctrerr
\fi
%
}
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
\myfnsymbolsingle{\value{#1}}%
}
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand{\thefootnote}{%
\myfnsymbolmult{\value{footnote}}%
}
%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
\textsuperscript{\thefootnotemark}~%
}
\begin{document}
\footnote{first} and \footnote{second} and \footnote{third} and \footnote{fourth} and \footnote{fifth}
and \footnote{sixth} and \footnote{seventh} and \footnote{eighth}
Test math daggers:
1:$\dagger$ 2:$\dagger\dagger$ 3:$\dagger\dagger\dagger$ 4:$\dagger\dagger\dagger\dagger$ 5:$\dagger\dagger\dagger\dagger\dagger$
6:$\dagger\dagger\dagger\dagger\dagger\dagger$ 7:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger$
8:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger$ 9:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger$
10:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger$ 11:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger$
12:$\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger\dagger$
\end{document}
输出:
答案2
解释一下为什么会发生这种情况:\dagger
是“mathbin”类型的数学符号。如果上面有东西,这些符号周围的间距会有所不同两个都符号的两侧或仅一侧。加号也会出现同样的情况。强制使用更大间距的标准方法是使用空的 mathgroup {}
。抑制间距的标准方法是在符号周围添加括号,使其成为 mathord 类型。
\documentclass{article}
\begin{document}
$+x+x$
${}+x+x$
$\dagger\dagger\dagger\dagger{} $
${\dagger}{\dagger}{\dagger}{\dagger}$
\end{document}
答案3
我仍然不确定为什么会发生此问题,但我找到了解决方案。
导致问题的原因是手动将多个字符输入到序言中,如下所示:
\or % 3
\dagger\dagger
\or % 4
\ddagger\ddagger
\or % 5
\dagger\dagger\dagger
\or % 6
\ddagger\ddagger\ddagger
\or % 7
\dagger\dagger\dagger\dagger
\or % 8
\ddagger\ddagger\ddagger\ddagger
当删除该部分并使用下面注释中以大写字母标注的部分时,问题就解决了:
%% Footnotes
%% allows the use of multiple types of footnotes
\usepackage{perpage}
\MakePerPage{footnote}
%% Footnote Symbols
%% use daggers and double daggers as footnote symbols
%%
%% define which symbols are to be used
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
\ensuremath{%
\ifcase#1% 0
\or % 1
\dagger
\or % 2
\ddagger
\else % >= 9
\@ctrerr
\fi
}%
}
\makeatother
%% redefine the command for creating footnotes
\newcommand*{\myfnsymbol}[1]{%
\myfnsymbolsingle{\value{#1}}%
}
%% RELY ON THIS SECTION TO MULTIPLY SYMBOLS, INSTEAD
%% multiply the symbols for iterations above the upper bound, if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
\myfnsymbolmult{\value{footnote}}%
}
%% add space between the footnote character and text in the footer
\usepackage{scrextend}
\deffootnote[1em]{1.5em}{1em}{%
\textsuperscript{\thefootnotemark}~%
}
结果如下:
现在,间距已经非常整齐了。
我希望这能对其他人有所帮助。