Pandoc kaobook 旁注问题

Pandoc kaobook 旁注问题

我正在使用 Obsidian 编写 markdown 文本,以便使用 pandoc PDFLateX 导出为 PDF。我正在使用 tufte-book 类,它运行完美。问题是我尝试使用 kaobook 类,但在 tufte 中自动显示为侧注的引用在 kaobook 中显示为脚注

有没有办法设置 kaoobook 像 tufte-book 类一样自动将所有引用视为侧注?

这是使用 tufte-book 类的结果: 在此处输入图片描述

这是使用 kaobook 类的结果: 在此处输入图片描述

这是使用 kaobook 模板的基本代码:

% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
%
\documentclass[
  13pt,
  a4paper,
  justified]{kaobook}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
  \setmainfont[]{KpRoman}
  \setsansfont[]{KpSans}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\pagestyle{headings}
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newlength{\cslentryspacingunit} % times entry-spacing
\setlength{\cslentryspacingunit}{\parskip}
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
 {% don't indent paragraphs
  \setlength{\parindent}{0pt}
  % turn on hanging indent if param 1 is 1
  \ifodd #1
  \let\oldpar\par
  \def\par{\hangindent=\cslhangindent\oldpar}
  \fi
  % set entry spacing
  \setlength{\parskip}{#2\cslentryspacingunit}
 }%
 {}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
\ifLuaTeX
\usepackage[bidi=basic]{babel}
\else
\usepackage[bidi=default]{babel}
\fi
\babelprovide[main,import]{brazilian}
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same} % disable monospaced font for URLs
\hypersetup{
  pdfauthor={Christian M. De Britto},
  pdflang={pt-BR},
  colorlinks=true,
  linkcolor={Maroon},
  filecolor={Maroon},
  citecolor={blue},
  urlcolor={Blue},
  pdfcreator={LaTeX via pandoc}}

\author{Christian M. De Britto}
\date{}

\begin{document}

{
\hypersetup{linkcolor=}
\setcounter{tocdepth}{4}
\tableofcontents
}
\hypertarget{cidade-e-transformauxe7uxe3o}{%
\section{Cidade e transformação}\label{cidade-e-transformauxe7uxe3o}}

\hypertarget{afinal-de-contas-o-que-uxe9-a-cidade}{%
\subsection{Afinal de contas, o que é a
cidade?}\label{afinal-de-contas-o-que-uxe9-a-cidade}}

O Sociólogo alemão Georg Simmel (1858-1918) foi um dos primeiros autores
clássicos da sociologia a refletir sobre características da vida urbana.
Segundo ele, a vida urbana é marcada pela intensificação das
experiências. Em suas palavras:

\begin{quote}
O fundamento psicológico sobre o qual se eleva o tipo das
individualidades das grandes cidades é a \textbf{intensificação da vida
nervosa}, que brota da mudança acelerada e ininterrupta das impressões
interiores e exteriores.\footnote{Georg Simmel, \emph{As Grandes Cidades
  e a Vida Do Espírito} ({Covilhã}: {Universidade da Beira Interior},
  2009), 4.}
\end{quote}

\hypertarget{referuxeancias-bibliogruxe1ficas}{%
\subsection*{Referências
Bibliográficas}\label{referuxeancias-bibliogruxe1ficas}}
\addcontentsline{toc}{subsection}{Referências Bibliográficas}

\hypertarget{refs}{}
\begin{CSLReferences}{1}{1}
\leavevmode\vadjust pre{\hypertarget{ref-simmel}{}}%
Simmel, Georg. \emph{As Grandes Cidades e a Vida Do Espírito}.
{Covilhã}: {Universidade da Beira Interior}, 2009.

\end{CSLReferences}

\end{document}

答案1

我不知道这是否是最好的解决方案。我在我的 tex 文件中插入了此命令,现在它可以正常工作:

  • \usepackage{旁注}
  • \let\footnote=\sidenote

相关内容