
為什麼論文文檔類別中的章節標題位於章節編號下方?我的意思是我需要將章節標題和章節編號放在一行。
答案1
這是一個解決方案,使用帶有明確選項的 titlesec 套件:
\documentclass[11pt, twoside]{report}% http://ctan.org/pkg/amsproc
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[explicit]{titlesec}%
\usepackage{xcolor}
\titleformat{name=\chapter}[block]{\filcenter\color{blue}\normalfont\bfseries\huge\boldmath}{}{0ex}{#1\quad\fontsize{60}{72}\selectfont\thechapter}%
\begin{document}
\chapter{First Chapter}
Once upon a time, a long while ago, there were four little people whose names were Violet, Slingsby, Guy and Lionel, and they all thought they should like to see the world. So they bought a large boat to sail quite round the world by sea, and then they were to come back on the other side by land. The boat was painted blue with green spots, and the sail was yellow with red stripes; and when they set off, they only took a small Cat to steer and look after the boat, besides an elderly Quangle-Wangle, who had to cook dinner and make the tea; for which purposes they took a large kettle.
\end{document}
當然,你可以將\filcenter改為\fillleft或filright