部分刻字乳胶

时间:2017-03-14 20:32:49

标签: latex

我正在尝试将我的文档部分显示为:

一个。叙事%\ part {Narrative}

  1. 简介%\ section {简介}
  2. 正文......

    B中。附录%\ part {Appendix}

    1. 派生%\ section {Derivations}
    2. 附录文字......

      我见过其他人使用过:

      \renewcommand{\thepart}{\Alph{part}} 
      

      然而,出于某种原因,这对我不起作用。我的部分显示为:

      A部分

      叙事

      1. 简介
      2. 正文......

        B部分

        附录

        1. 附录文字......

          任何想法?

2 个答案:

答案 0 :(得分:0)

你的想法是正确的,但你也重新定义了标题格式。

来自以下link

\usepackage{titlesec}

\renewcommand{\thepart}{\Alph{part}}
\makeatletter
\titleformat{\part}[display]
{\Huge\scshape\filright}
{\thepart~\partname}
{20pt}
{\thispagestyle{plain}}
\makeatother

答案 1 :(得分:0)

下面的最小示例更新\part以不同方式设置其编号。更具体地说,它删除了\partname - Part - 前缀并将标题保留在同一行。字体也会更新,以便在\LARGE\bfseries\part中使用\part*设置零件。以上所有更新均使用etoolbox\patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}宏来完成,该<search><replace>内执行<cmd> - 和\documentclass{article} \usepackage{lipsum,etoolbox} \renewcommand{\thepart}{\Alph{part}} \makeatletter % Change part display; also uniform size of \LARGE\bfseries \patchcmd{\@part}% <cmd> {\Large\bfseries \partname\nobreakspace\thepart \par\nobreak}% <search> {\LARGE\bfseries \thepart.\quad}% <replace> {}{}% <success><failure> \patchcmd{\@part}{\huge}{\LARGE}{}{} \patchcmd{\@spart}{\huge}{\LARGE}{}{} \renewcommand{\@seccntformat}[1]{\csname the#1\endcsname.\quad} % \@addtoreset{section}{part} % Reset section counter with every part \makeatother \begin{document} \part{Narrative} \section{Intro} \lipsum[1] \part{Appendix} \section{Derivations} \lipsum[2] \end{document}

enter image description here

\section

如果您希望每个新\part重置public class User : IdentityUser { public User() { this.Id = Guid.NewGuid().ToString(); } public virtual ICollection<TeamMember> Teams { get; set; } } public class Team { public Team() { this.Id = Guid.NewGuid().ToString(); } [Key] public string Id { get; set; } public virtual ICollection<TeamMember> Memberinos { get; set; } [Required] public virtual Game Game { get; set; } } public class TeamMember { public TeamMember() { this.Id = Guid.NewGuid().ToString(); } [Key] public string Id { get; set; } public virtual Team Team { get; set; } public virtual User Member { get; set; } } public class Game { public Game() { this.Id = Guid.NewGuid().ToString(); } [Key] public string Id { get; set; } public string Name { get; set; } } 个号码,请取消注释前导码中引用该号码的行。