我認為用乳膠做一件簡單的事。我需要取幾個標題並將它們設為大、粗體、Bookman 字體和紅色。完成此任務的最簡單方法是使用新環境嗎?以下是我嘗試過但沒有成功的方法。
\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{color}
\newenvironment{scrip}{%
\center\LARGE\bfseries\fontfamily{pbk}\selectfont\color{red}%
%
}{\endcentering}
\begin{document}
\begin{scrip}
I Corinthians 4:1-6
\end{scrip}
\end{document}
謝謝!
答案1
你可以使用titlesec
適當地重新定義(例如)的格式\section
:
\documentclass[a4paper,12pt]{article}
%\usepackage[T1]{fontenc}% http://ctan.org/pkg/fontenc
%\usepackage[utf8]{inputenc}% http://ctan.org/pkg/inputenc
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\usepackage[explicit]{titlesec}% http://ctan.org/pkg/titlesec
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\titleformat{\section}
{\normalfont\LARGE\bfseries\fontfamily{pbk}\selectfont\color{red}\filcenter}{}{0em}{#1}
\begin{document}
\section{I Corinthians 4:1-6} \lipsum[1]
\end{document}
titlesec
的\titleformat
命令具有以下介面(來自titlesec
文件):
\titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before>}[<after>]
這裡
<command>
是要重新定義的分段指令,即、\part
、\chapter
、\section
、\subsection
、\subsubsection
或。\paragraph
\subparagraph
段落形狀由 設定
<shape>
,其可能值如上所述(請參閱第 3-4 頁)。
<format>
是應用於整個標題(標籤和文字)的格式。該部分可以包含垂直材料,該材料排版在標題上方的空格之後。標籤定義在
<label>
.如果該層級沒有章節標籤,您可以忽略它,但請注意,透過刪除它,目錄和運行頭中的數字不會被抑制。
<sep>
是標籤和標題正文之間的水平間距,且必須是長度。這個空間是垂直的display
;其中frame
是文字到框架的距離。在有星號的切片指令版本中,<label>
和均被忽略。<sep>
如果您正在使用picture
等,請將此參數設為0pt
。
<before>
是標題正文之前的程式碼。最後一個指令可以帶一個參數,即標題文字。
<after>
是標題正文後面的程式碼。排版材質為垂直排模式,帶有hang
、block
和display
;在水平模式下與runin
.否則被忽略。