使用报价包时,报价文本大小不会改变

使用报价包时,报价文本大小不会改变

我有一个大book模板。书中包含引文,我使用quoting包来引用。

在书中,引文的字体大小与书中的普通文本大小相同,这是一个错误:根据我的 中的条目small中的代码,它应该是。当我尝试实际将其设置为 时,引文的文本变得比周围的文本更大。quotingPREAMBLEsmall

接下来是错误的代码。有一次,为了找出代码的错误部分,我删除了位于 % FRONTMATTER STARTS % 和 % MAINMATTER STARTS % 之间的所有代码,然后,引用的文本就变成了small,正如预期的那样。但我不知道为什么。这是否与我使用的某些 TOC 相关代码存在冲突?

% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[oneside,centered,twocolumn]{book}
\usepackage[T1]{fontenc}
\special{papersize=215.9mm,279.4mm}
\usepackage[english]{babel}

\usepackage[sc]{mathpazo}
\linespread{1.05} % Palladio needs more leading

\usepackage{tocloft} % Customization of TOC LOF LOT

\makeatletter\@addtoreset{chapter}{part}\makeatother%

%\usepackage[table,xcdraw]{xcolor} % For shading in tables
\usepackage[toc,page]{appendix}
\usepackage{xcolor} % For links color
\usepackage{multirow}

\usepackage{epigraph}
\usepackage{caption} % To change way captions are labelled
\usepackage{pdfpages}
\usepackage{ltablex}
\usepackage{nicefrac} % to write fractions
\usepackage{attrib} % For source of quotations
\usepackage{lettrine} % For NewThought formatting
\usepackage{array} % To define width of columns in long table
\usepackage{booktabs} % Nicer spacing in columns
\usepackage{siunitx} % To write Celsius, etc.
\usepackage{enumitem} % To create item lists

\usepackage{scrextend}
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{etoolbox} % To make table footnote font smaller
\usepackage{threeparttablex}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{textcomp} % For Numero symbol
\usepackage{titlesec}

\usepackage{colortbl} % To define colors
\usepackage[linguistics,edges]{forest}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{etoolbox}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella} % Palatino clone
\setsansfont{Cabin}

% QUOTE TEXT MARGINS + FONT SIZE %%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[font=small,rightmargin=0pt]{quoting}

% FOOTNOTES IN QUOTATION %%%%%%%%%%%%%%%%%%%%

\usepackage[symbol]{footmisc}
%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}

\usepackage[
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=teal,
urlcolor=teal
]{hyperref} % Hyperlinks

% CHAPTER, SECTION, SUBSECTION STYLE %%%%%%%%%%%%%%%%%%%%%%%%

\newfontfamily\headingfont[]{Cabin}

\begin{document}

    % FRONTMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \frontmatter
    {
        \hypersetup{linkcolor=blue}\textbf{}
        \renewcommand{\cftdot}{} % This line removes dots for Sections and under
        \tableofcontents
    }
    \clearpage

    \addcontentsline{toc}{section}{\listtablename}
    \small{\listoftables}
    \clearpage

    % MAINMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \mainmatter

Call me Ishmael. Some years ago- never mind how long precisely- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation. Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people's hats off- then, I account it high time to get to sea as soon as I can. This is my substitute for pistol and ball.

\begin{quoting}[leftmargin=\parindent]
    Shakespeare wrote Moby-Dick, using Melville as a Ouija board.
    \attrib{Ray Bradbury }
\end{quoting}

\end{document}

答案1

找到了一个解决方案,在这里:相对于上下文,引文环境中的字体较小

添加: \usepackage{relsize,etoolbox}

合格quoting环境: \usepackage[rightmargin=0pt]{quoting}

加: \AtBeginEnvironment{quoting}{\smaller}

现在引文很小,一直延伸到我的两栏文档的右边距。

代码如下:

% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[oneside,centered,twocolumn]{book}
\usepackage[T1]{fontenc}
\special{papersize=215.9mm,279.4mm}
\usepackage[english]{babel}

\usepackage[sc]{mathpazo}
\linespread{1.05} % Palladio needs more leading

\usepackage{tocloft} % Customization of TOC LOF LOT

\makeatletter\@addtoreset{chapter}{part}\makeatother%

%\usepackage[table,xcdraw]{xcolor} % For shading in tables
\usepackage[toc,page]{appendix}
\usepackage{xcolor} % For links color
\usepackage{multirow}

\usepackage{epigraph}
\usepackage{caption} % To change way captions are labelled
\usepackage{pdfpages}
\usepackage{ltablex}
\usepackage{nicefrac} % to write fractions
\usepackage{attrib} % For source of quotations
\usepackage{lettrine} % For NewThought formatting
\usepackage{array} % To define width of columns in long table
\usepackage{booktabs} % Nicer spacing in columns
\usepackage{siunitx} % To write Celsius, etc.
\usepackage{enumitem} % To create item lists
\usepackage[rightmargin=0pt]{quoting}
\usepackage{scrextend}
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{relsize,etoolbox} % To make table footnote font smaller
\usepackage{threeparttablex}
\appto\TPTnoteSettings{\footnotesize}
\usepackage{textcomp} % For Numero symbol
\usepackage{titlesec}

\usepackage{colortbl} % To define colors
\usepackage[linguistics,edges]{forest}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{etoolbox}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella} % Palatino clone
\setsansfont{Cabin}

% QUOTE TEXT MARGINS + FONT SIZE %%%%%%%%%%%%%%%%%%%%%%%%
\AtBeginEnvironment{quoting}{\smaller}


% FOOTNOTES IN QUOTATION %%%%%%%%%%%%%%%%%%%%

\usepackage[symbol]{footmisc}
%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}

\usepackage[
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=teal,
urlcolor=teal
]{hyperref} % Hyperlinks

% CHAPTER, SECTION, SUBSECTION STYLE %%%%%%%%%%%%%%%%%%%%%%%%

\newfontfamily\headingfont[]{Cabin}

\begin{document}

    % FRONTMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \frontmatter
    {
        \hypersetup{linkcolor=blue}\textbf{}
        \renewcommand{\cftdot}{} % This line removes dots for Sections and under
        \tableofcontents
    }
    \clearpage

    \addcontentsline{toc}{section}{\listtablename}
    \small{\listoftables}
    \clearpage

    % MAINMATTER STARTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \mainmatter

    Call me Ishmael. Some years ago- never mind how long precisely- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation. Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people's hats off- then, I account it high time to get to sea as soon as I can. This is my substitute for pistol and ball.

    \begin{quoting}
        Call me Ishmael. Some years ago- never mind how long precisely- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation. 
        \attrib{Ishmael}
    \end{quoting}

\end{document}

相关内容