我是 latex 新手,我的问题是如何获得类似这样的结构:
章节编号 + 章节标题(例如:I 简介)
我只得到简介,我想要名称前面的编号。如果您能看到代码,我应用了一个删除“第 x 章”的代码 tex 文件的代码:
\documentclass[11pt,a4paper,oldfontcommands,openany]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage[dvips]{graphicx}
\usepackage{xcolor}
\usepackage{times}
% Importation package use case %
\usepackage{tikz}
\usepackage{tikz-uml}
\usepackage{amsmath}
\usepackage{savetrees}
%FIN IMPORTATION PACKAGE USECASE%
\usepackage[
breaklinks=true,colorlinks=true,
%linkcolor=blue,urlcolor=blue,citecolor=blue,% PDF VIEW
linkcolor=black,urlcolor=black,citecolor=black,% PRINT
bookmarks=true,bookmarksopenlevel=2]{hyperref}
\usepackage[export]{adjustbox}
\usepackage{geometry}
\usepackage[pagestyles]{titlesec}
\usepackage{etoolbox}
% We remove chapter word {n}
\titleformat{\chapter}[display]{\normalfont\bfseries}{}{0pt}{\Large}
\newpagestyle{mystyle}
{\sethead[\thepage][] [\chaptertitle]{}{}{\thepage}}
\pagestyle{mystyle}
%FIN IMPORT QUI ENLEVE CHAPTER
% PDF VIEW
% \geometry{total={210mm,297mm},
% left=25mm,right=25mm,%
% bindingoffset=0mm, top=25mm,bottom=25mm}
% PRINT
\geometry{total={210mm,297mm},
left=20mm,right=20mm,
bindingoffset=10mm, top=25mm,bottom=25mm}
\OnehalfSpacing
%\linespread{1.3}
%%% CHAPTER'S STYLE
%chapterstyle{bianchi}%
%\chapterstyle{madsen}
\chapterstyle{ell}
%%% STYLE OF SECTIONS, SUBSECTIONS, AND SUBSUBSECTIONS
\setsecheadstyle{\Large\bfseries\sffamily\raggedright}
\setsubsecheadstyle{\large\bfseries\sffamily\raggedright}
\setsubsubsecheadstyle{\bfseries\sffamily\raggedright}
%%% STYLE OF PAGES NUMBERING
%\pagestyle{companion}\nouppercaseheads
%\pagestyle{headings}
%\pagestyle{Ruled}
\maxsecnumdepth{subsection} % chapters, sections, and subsections are numbered
\maxtocdepth{subsection} % chapters, sections, and subsections are in the Table of Contents
\begin{document}
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%--- % %%
% TITLEPAGE
%
% due to variety of titlepage schemes it is probably better to make titlepage manually
\thispagestyle{empty}
{%%%
\sffamily
\centering
\Large
~\vspace{\fill}
\clearpage
\tableofcontents*
\chapter*{Remerciements} this page is a sample page, not a chapter page
\chapter{Introduction} this is a chapter , I want the number before Introduction
答案1
使用
\titleformat{\chapter}[display]{\normalfont\bfseries}{\thechapter}{0pt}{\Large}
^^^^^^^^^^^^
或者
\titleformat{\chapter}[block]{\normalfont\bfseries}{\thechapter}{1em}{\Large}
^^^^^^^^ ^^^^^^^^^^^^ ^^^^
针对“ 1 个标题”