20 ctex下cctbook 转texlive 的问题

发布于 2024-08-19 19:44:26
\documentclass[a4paper, twoside, 12pt]{book} 
\usepackage{ctex}
\renewcommand
\baselinestretch{1.41} 
\usepackage{ccmap}%这个包在texlive中会报错
\usepackage{amsmath, amsthm, amssymb, amscd}
\usepackage{makecell,booktabs} 
\usepackage{float} 
\usepackage{mathrsfs}
\usepackage{latexsym}
\usepackage{setspace}
\usepackage{headrule}%这个包在texlive中会报错
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{tocbibind}
\usepackage{fancyhdr}
\allowdisplaybreaks 
\newtheorem{theorem}{\indent 定理}[section]
\newtheorem{corollary}[theorem]{\indent 推论}
\newtheorem{lemma}[theorem]{\indent 引理}
\newtheorem{proposition}[theorem]{\indent 命题}
\newtheorem{nature}[theorem]{\indent 性质}
\newtheorem{definition}[theorem]{\indent 定义}
\newtheorem{remark}[theorem]{\indent 注记}
\newtheorem{example}[theorem]{\indent 例}
\newcommand{\headingstobeshown}{}
\newcommand{\cndash}{\rule{0.2em}{0pt}\rule[0.35em]{1.6em}{0.05em}\rule{0.2em}{0pt}}
\renewcommand{\proofname}{\bf{\indent 证明}}
\renewcommand\subsectionformat{}%添加这个命令在texlive中会报错
\renewcommand\sectionformat{}%添加这个命令在texlive中会报错
\def\Box{\hfill\square}

%%%%%%%%%%%%%%%%%%%
\numberwithin{equation}{section} 
\topmargin=0.5cm
\oddsidemargin=20pt 
\evensidemargin=0pt 
\textwidth=15.1cm
\textheight=22.5cm
%%%%%%%%%%%%%%%%%
\makeatletter 
\numberwithin{equation}{section} 
\def\ps@headings{%
    \def\@oddfoot{\hfill\thepage\hfill}
    \def\@evenfoot{\hfill\thepage\hfill}
    \def\@evenhead{\thepage\hfil\slshape\leftmark}%    !!!
    \def\@oddhead{\slshape\rightmark\hfil\thepage}%  !!!
    \let\@mkboth\markboth
    \def\chaptermark##1{%
        \markboth {%                         !!!
            \ifnum \c@secnumdepth >\m@ne
            \if@mainmatter
            \chaptername \ \ %             !!!
            \fi
            \fi
            ##1}{}}%                           !!!
    \def\sectionmark##1{%
        \markright {%                         !!!
            \ifnum \c@secnumdepth >\z@
            \sectionname \ \ %                 !!!
            \fi
            ##1}}}%                             !!!
\ps@headings
\renewcommand{\@oddhead}{\protect\footnotesize{%
            \begin{minipage}{\textwidth}
                {\heiti \hfill \ziju{0.5} 家里蹲大学博士学位论文
                    \hfill} \\
                \begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}r@{}}%
                    {\kaishu \leftmark} & { \kaishu \rightmark}
                    \\ \hline \hline\vspace{2pt}
                \end{tabular*}
            \end{minipage}
    }}
\renewcommand{\@evenhead}{\@oddhead}
\makeatletter \@addtoreset{equation}{section} \makeatother  
\renewcommand\contentsname{目 \ 录}
\renewcommand\bibname{参考文献}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  摘要 %%%%%%%%%%%%%%%    
    \newpage\pagenumbering{Roman}\thispagestyle{plain}\chapter*{摘 \ 要}
    \addcontentsline{toc}{chapter}{摘 \ \ \ \ 要} 
    在第一章中, 我们主要阐述本文所讨论问题的背景及研究现状, 并简要介绍本文的主要工作以及相关的预备知识和一些记号.
    
    \bigskip
    
    \textbf{\zihao{4}\textbf{关键词}:}  临界指数;\ Lusternik-Schnirelman定理.
    
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of 摘要 %%%%%%%%%%%%%%%
\thispagestyle{plain}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The Abstract of Thesis %%%
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{\large Abstract}
In this thesis, 

\bigskip

\textbf{\zihao{4}\textbf{Keywords}:}   Lusternik-Schnirelman theory.

\newpage
\thispagestyle{plain}

\tableofcontents

\newpage

\pagenumbering{arabic} \setcounter{page}{1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 引言 %%%%%%%%%%%%%
\chapter{引 言}\renewcommand\headingstobeshown{ 引 \ 言}

本章介绍了与本文所研究课题相关的背景知识, 发展概况以及我们所做的主要工作.
\section{问题的背景及研究现状} %%使用\section命令会报错

\chapter{第一章}

\section{问题的背景及研究现状} %%使用\section命令会报错

\begin{thebibliography}{199}
\bibitem{ass} AAAA

\end{thebibliography}
%%%%%%%%%%%致谢
\newpage\thispagestyle{empty}\chapter*{\zihao{2} 致 \ \ \ 谢}
\addcontentsline{toc}{chapter}{致\ \ \ \ \ 谢}\bigskip

aaa
\chapter*{攻读XX学位期间发表的学术论文}
\addcontentsline{toc}{chapter}{攻读XX学位期间发表的学术论文}
\begin{enumerate}

\vskip 20pt

{\zihao{4}}

\item 1

\vskip 15pt

\item 2

\vskip 15pt

\item 3

\end{enumerate}

\end{document}

将上述出问题的命令注释后texlive能运行,但是和ctex的不一样。比较如下
微信图片_20240819220138.png
微信图片_20240819220159.png
微信图片_20240819220233.png
微信图片_20240819220241.png
微信图片_20240819220247.png

查看更多

关注者
0
被浏览
218
1 个回答
LaTeXStudio
LaTeXStudio 2024-08-19
这家伙很懒,什么也没写!

实际最早的 ctexbook 继承了 cctbook 的特性,现在,ctexbook 已经大大优化了很多内容,完全和以前的对照比较困难,除非回退版本,不过,一点点对照,回退到 cctbook 的样式,需要点功夫。

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览