将章节标题大写

将章节标题大写

我怎样才能将作品中的章节标题大写?将其写成 CHAPTER ONE 而不是 CHAPTER One。以下是我的序言:

\titleformat{\chapter}[hang]
{\normalfont\normalsize\bfseries}{\chaptertitlename\
\Numberstring{chapter}:}{12pt}{\fontsize{12pt}{12pt}\selectfont\normalsize\bfseries}
\makeatletter \renewcommand{\@chapapp}{\MakeUppercase{Chapter}}\makeatother
\titleformat*{\section}{\fontsize{12pt}{12pt}\bfseries}
\titleformat*{\subsection}{\fontsize{12pt}{12pt}\bfseries}
\titleformat*{\subsubsection}{\fontsize{12pt}{12pt}\bfseries}
\titlespacing*{\chapter}{0pt}{0pt}{0pt}
%formatting chapters letters end
\makeatletter \renewcommand{\@chapapp}{\MakeUppercase{Chapter}}\makeatother

答案1

以下是基于\titleformat和的解决方案fmtcount

\documentclass{report}
\usepackage{lipsum}
\usepackage{fmtcount}
\usepackage{titlesec}
    \titleformat{\chapter}[hang]
    {\normalfont\normalsize\bfseries}{\MakeUppercase{\chaptertitlename}         \NUMBERstring{chapter}:}{12pt}{\fontsize{12pt}{12pt}\selectfont\normalsize\bfseries\MakeUppercase}
    \titleformat*{\section}{\fontsize{12pt}{12pt}\bfseries}
    \titleformat*{\subsection}{\fontsize{12pt}{12pt}\bfseries}
    \titleformat*{\subsubsection}{\fontsize{12pt}{12pt}\bfseries}
    \titlespacing*{\chapter}{0pt}{*0}{*6}

    \begin{document}

      \chapter{Looking-Glass House}

One thing was certain, that the white kitten had had nothing to do with it: — it was the black kitten's fault entirely. For the white kitten had been having its face washed by the old cat for the last quarter of an hour (and bearing it pretty well, considering); so you see that it couldn't have had any hand in the mischief.

​The way Dinah washed her children's faces was this: first she held the poor thing down by its ear with one paw, and then with the other paw she rubbed its face all over, the wrong way, beginning at the nose: and just now, as I said, she was hard at work on the white kitten, which was lying quite still and trying to purr — no doubt feeling that it was all meant for its good.

But the black kitten had been finished with earlier in the afternoon, and so, while Alice was sitting curled up in a corner of the great armchair, half talking to herself and half asleep, the kitten had been having a grand game of romps with the ball of worsted Alice had been trying to wind up, and had been rolling it up and down till it had all come undone again; and there it was, spread over the hearth-rug, all knots and tangles, with the kitten running after its own tail in the middle.

"Oh, you wicked wicked little thing!" cried Alice, catching up the kitten, and giving it a ​little kiss to make it understand that it was in disgrace. "Really, Dinah ought to have taught you better manners! You ought, Dinah, you know you ought!" she added, looking reproachfully at the old cat, and speaking in as cross a voice as she could manage — and then she scrambled back into the arm-chair, taking the kitten and the worsted with her, and began winding up the ball again. But she didn't get on very fast, as she was talking all the time, sometimes to the kitten, and sometimes to herself. Kitty sat very demurely on her knee, pretending to watch the progress of the winding, and now and then putting out one paw and gently touching the ball, as if it would be glad to help if it might.

"Do you know what to-morrow is, Kitty?" Alice began. "You'd have guessed if you'd been up in the window with me — only Dinah was making you tidy, so you couldn't. I was watching the boys getting in sticks for the bonfire — and it wants plenty of sticks, Kitty! Only it got so cold, and it snowed so, they ​had to leave off. Never mind, Kitty, we'll go and see the bonfire to-morrow." Here Alice wound two or three turns of the worsted round the kitten's neck, just to see how it would look: this led to a scramble, in which the ball rolled down upon the floor, and yards and yards of it got unwound again.

    \end{document} 

在此处输入图片描述

相关内容