关于这个主题有很多页面,但我没有找到解决方案。
我想编辑一本 a5 格式的诗歌小书。里面有多种语言(俄语、匈牙利语、瑞典语……)。这就是为什么我需要“Nota Serif”字体,并且使用 xelatex 进行编译。
每个章节都是一个作品的标题。例如:
\chapter*{Sviete Tikhiy}
由于每个章节标题的字体太大,结果不合适。文本高度为 10pt,我希望标题为 12pt。我没有找到解决方案。
以下是阅读 Bernard、Greg 和 David 的评论后的新代码。
\documentclass[headings=small,a5paper,french,10pt]{book}
%\usepackage{graphicx} %for pictures
\usepackage[french]{babel}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\usepackage{verse}
% deleted instructions as advised by David Carlisle
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
%\usepackage{textcomp}
%\usepackage{lmodern}
%\usepackage{txfonts}
\usepackage[a5paper, margin=2cm]{geometry}
%you should remove the lines for fontenc, inputenc, lmodern, txfonts and textcomp
\usepackage{titlesec}
\titlespacing*{\chapter}{0pt}{-50pt}{12pt}
\titleformat{\chapter}[display]{\normalfont\fontsize{12}{15}\huge\bfseries}{\chaptertitlename\ \thechapter}{12pt}{}{\Huge}
\newcommand{\chapfnt}{\fontsize{10}{14}}
\newcommand{\chaptersize}{\fontsize{10}{14}\selectfont}
\pagestyle{plain} %Header is clear, but the footer contains the page number in the center.
%\usepackage[margin=0.25in]{geometry}
%\usepackage[margin=2cm,top=2.5cm,headheight=16pt,headsep=0.1in,heightrounded]{geometry}
%\usepackage[explicit]{titlesec}
%\usepackage{color}
%\definecolor{darkblue}{rgb}{0.12,0.47,0.87}
%\titleformat{\chapter}[display] {\fontsize{12pt}{12pt}\selectfont \bfseries}{\textcolor{darkblue} {\chaptertitlename\ \thechapter: #1}}{2pt}{\Huge}
%\titleformat{name=\chapter,numberless}[display] {\fontsize{12pt}{12pt}\selectfont \bfseries}{\textcolor{darkblue} {#1}}{2pt}{\Huge}
\newcommand{\attrib}[1]{\nopagebreak{\raggedleft\footnotesize #1\par}}
\setlength{\stanzaskip}{\baselineskip}
%https://tex.stackexchange.com/questions/593104/how-to-use-fontspec-in-details
%https://en.wikibooks.org/wiki/LaTeX/Special_Characters
\begin{document}
\author{Parisian Harmonist}
\title{Harmonies du soir}
\date{Janvier 2022}
\frontmatter
\maketitle
\tableofcontents
\mainmatter
\include{./TeX_files/01}
\include{./TeX_files/02}
\include{./TeX_files/03}
\include{./TeX_files/04}
\include{./TeX_files/05}
\backmatter
% bibliography, glossary and index would go here.
\end{document}
有人有什么想法吗?