whutug / whu-thesis

:memo: 武汉大学毕业论文 LaTeX 模版 2024
LaTeX Project Public License v1.3c
908 stars 200 forks source link

需要把chapter居左,而摘要保持居中 #193

Closed Utopia97 closed 1 year ago

Utopia97 commented 1 year ago

检查

编译环境

格式要求变化,需要把一级标题居左

经管院2021年发布地格式要求中,要求:一级标题1,2 ……用黑体小二号字,居左,上下隔1 行(段前段后空1 行)。 但是摘要也用的chapter,我把chapter中的\centering去掉后摘要也没法居中了,不知道怎么办,求大大帮忙

note286 commented 1 year ago
\documentclass{whu-thesis}
\ctexset{chapter/format+=\raggedright}
\begin{document}
\chapter{title1}
\chapter{title2}
\chapter{title3}
\chapter{title4}
\end{document}
sikouhjw commented 1 year ago
  1. 哪个格式要求的变化?本科还是硕博?
  2. https://github.com/whutug/whu-thesis/blob/6f19c2e0d34bbfc752f86a7ea505154a185ff595/whu-thesis.cls#L305-L318 把这段代码的 \centering 去掉,可以达到居左的效果
  3. 在摘要前把 \centering 加回去,摘要后再去掉 https://github.com/whutug/whu-thesis/blob/6f19c2e0d34bbfc752f86a7ea505154a185ff595/whu-thesis.cls#L1374-L1417
    \ctexset{
      chapter/format += {\centering}
    }
    % or
    \ctexset{
      chapter/format += {\raggedright}
    }
note286 commented 1 year ago

可以局部生效。

\documentclass{whu-thesis}
\begin{document}
{\ctexset{chapter/format+=\raggedright}\chapter{title1}}
\chapter{title2}
\chapter{title3}
\chapter{title4}
\end{document}
Utopia97 commented 1 year ago
  1. 哪个格式要求的变化?本科还是硕博?
  2. https://github.com/whutug/whu-thesis/blob/6f19c2e0d34bbfc752f86a7ea505154a185ff595/whu-thesis.cls#L305-L318

    把这段代码的 \centering 去掉,可以达到居左的效果

  3. 在摘要前把 \centering 加回去,摘要后再去掉 https://github.com/whutug/whu-thesis/blob/6f19c2e0d34bbfc752f86a7ea505154a185ff595/whu-thesis.cls#L1374-L1417

    \ctexset{
     chapter/format += {\centering}
    }
    % or
    \ctexset{
     chapter/format += {\raggedright}
    }

大大你好,是硕士。硕士论文写作指南(暂行).pdf

Utopia97 commented 1 year ago

可以局部生效。

\documentclass{whu-thesis}
\begin{document}
{\ctexset{chapter/format+=\raggedright}\chapter{title1}}
\chapter{title2}
\chapter{title3}
\chapter{title4}
\end{document}

感谢大佬!