如何寫 1 章而不是第 1 章

如何寫 1 章而不是第 1 章

我想寫 1 章而不是第 1 章。

謝謝

答案1

除非我遺漏了一些東西,然後根據OP和OP下的評論...這個解決方案應該足夠了:

\documentclass[12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[LGR,T1]{fontenc}
\usepackage[basque]{babel} % <- choice based on OP's comment
\usepackage{titlesec}

\renewcommand\chaptertitlename{kapitulua} % <- assuming that should be made lowercase when order changed
%\renewcommand\thechapter{\Roman{chapter}} % <- uncomment if you want Roman numerals instead
\titleformat{\chapter}[display]{\normalfont\huge\bfseries}{\thechapter\ \chaptertitlename}{20pt}{\Huge} % <- order changed (default is \chaptertitlename \ \thechapter)

\begin{document}

\chapter{Your title goes here}

\end{document}

程式碼輸出

\renewcommand\thechapter{\Roman{chapter}}如果您希望使用大寫羅馬數字,即“I Chapter”、“II Chapter”而不是阿拉伯語“1 Chapter”、“2 Chapter”,請取消註釋該行。

答案2

正如@Bernard 在他的評論中所說,你應該使用titlesec 包裹。可以使用對應pdf文件第23頁和24頁中的代碼。請閱讀頁面上的說明進行調整。

\documentclass[10pt,oneside]{book}
\usepackage[dvips]{color}
\usepackage{lipsum}
\usepackage[rigidchapters,explicit]{titlesec}
\DeclareFixedFont{\chapterfont}{T1}{phv}{bx}{n}{4cm}
\titlespacing{\chapter}{0pt}{100pt}{75pt}

\titleformat{\chapter}[block]
{\begin{picture}(0,230)}
{\put(450,80){%
\makebox(0,0)[rb]{%
{}}}
\put(0,270){%
\makebox(0,0)[lb]{%
\Huge\sffamily{\thechapter\ Chapter }}}}
{0pt}
{\put(0,200){\parbox[t]{300pt}{%
\Huge\sffamily\filright#1}}}
[\end{picture}]

\begin{document}
\chapter{First Chapter}
\lipsum[2]
\section{First Section}
\lipsum[1]
\end{document}

在此輸入影像描述

相關內容