目前我的文档是这样开始的,
\documentclass{report}
\usepackage{bm}
\usepackage{xcolor}
\usepackage{varwidth}
\usepackage{array}
\usepackage{geometry}
\usepackage[pdftex,bookmarks=true]{hyperref}
\usepackage{pdfpages}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amsthm}
\usepackage{tikz-cd}
\usetikzlibrary{cd}
\usepackage{tikz}
\usepackage{appendix}
\usepackage{eso-pic}
\usetikzlibrary{positioning}
\usepackage[explicit]{titlesec}
\RequirePackage{fix-cm}
\definecolor{bluegreen}{rgb}{-.2,.4,0.6}
\newcommand\semihuge{\@setfontsize\semihuge{18.72}{20.38}}
\titleformat{\chapter}[display]
{\normalfont\huge}
{\hspace*{-60pt}\thechapter.~#1}
{-10pt}
{\hspace*{-110pt}\rule{\dimexpr\textwidth+20pt\relax}{0pt}}
\titleformat{name=\chapter,numberless}[display]%conents
{\normalfont\bfseries\huge}
{\hspace*{175pt}#1}
{-12pt}
{\hspace*{-110pt}\rule{\dimexpr\textwidth+30pt\relax}{0pt}}
\titlespacing*{\chapter}{0pt}{0pt}{30pt}
\geometry{
top=20mm,
total={145mm,230mm}
}
\hypersetup{
colorlinks=true,
linkcolor=bluegreen,
filecolor=magenta,
urlcolor=cyan,
pdftitle={Sharelatex Example},
bookmarks=true,
}
\tikzset{>=stealth}
\newcommand\BackgroundPic{
\put(0,0){
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
\includegraphics[width=\paperwidth,height=\paperheight]{BackGroundPDF.pdf}
\vfill
}}}
\begin{document}
\begin{titlepage}
\end{titlepage}
\pagenumbering{roman}
\title{\Huge\textsc{The Road to Reality}}
{}
\date{}
\maketitle
\newpage
\tableofcontents
\newpage
\clearpage
\pagenumbering{arabic}
\end{document}
答案1
字母间间距默认为\theLetterSpace
,但可以使用可选参数进行更改\spaceout
。 额外的词间空间由 定义\theWordSpace
。其余的只是使用\textsc
等。
\documentclass{article}
\def\theLetterSpace{0.5pt}
\def\theWordSpace{2\LocalLetterSpace}
\newlength\LocalLetterSpace
\newcommand\spaceout[2][\theLetterSpace]{%
\setlength\LocalLetterSpace{#1}\expandafter\spaceouthelpA#2 \relax\relax}
\def\spaceouthelpA#1 #2\relax{%
\spaceouthelpB#1\relax\relax%
\ifx\relax#2\else\ \kern\theWordSpace\spaceouthelpA#2\relax\fi
}
\def\spaceouthelpB#1#2\relax{%
#1%
\ifx\relax#2\else
\kern\LocalLetterSpace\spaceouthelpB#2\relax%
\fi
}
\begin{document}
\thispagestyle{empty}
\vspace*{1.5in}
{\centering
\textsc{\Large\spaceout[5pt]{The Road to Reality}}
\hrulefill\par}
\end{document}