10 一个ctex套装下的cctbook模板改到texlive上来用TexStudio运行,报错

发布于 2024-08-19 17:40:46
\documentclass[a4paper, twoside, 12pt]{book} 
\usepackage{ctex} 
\renewcommand 
\baselinestretch{1.41} 
\usepackage{amsmath, amsthm, amssymb, amscd}
\usepackage{makecell,booktabs} 
\usepackage{float} 
\usepackage{mathrsfs}
\usepackage{latexsym}
\usepackage{setspace}
\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 证明}}
\numberwithin{equation}{section} %公式编号与章节关联
\topmargin=0.5cm
\oddsidemargin=20pt 
\evensidemargin=0pt 
\textwidth=15.1cm
\textheight=22.5cm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%加入如下命令后报错
\makeatletter 
\def\ps@headings{%
    \def\@oddfoot{\hfill\thepage\hfill}
    \def\@evenfoot{\hfill\thepage\hfill}
    \def\@evenhead{\pushziti\thepage\hfil\slshape\leftmark\popziti}%    !!!
    \def\@oddhead{\pushziti{\slshape\rightmark}\hfil\thepage\popziti}%  !!!
    \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}{\pushziti{\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}
    }}\popziti}
\renewcommand{\@evenhead}{\@oddhead}
\makeatletter 
\@addtoreset{equation}{section}
\makeatother 
%%%%%%%%%%%%%%%%加入上述命令后报错
\begin{document}
    你好!家里蹲大学    aaaabbbbb
\end{document}

查看更多

关注者
0
被浏览
543
鱼香肉丝没有鱼先生
鱼香肉丝没有鱼先生.

\pushziti\popziti 替换为空吧.

\documentclass[a4paper, twoside, 12pt]{book} 
\usepackage{ctex} 
\renewcommand 
\baselinestretch{1.41} 
\usepackage{amsmath, amsthm, amssymb, amscd}
\usepackage{makecell,booktabs} 
\usepackage{float} 
\usepackage{mathrsfs}
\usepackage{latexsym}
\usepackage{setspace}
\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 证明}}
\numberwithin{equation}{section} %公式编号与章节关联
\topmargin=0.5cm
\oddsidemargin=20pt 
\evensidemargin=0pt 
\textwidth=15.1cm
\textheight=22.5cm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%加入如下命令后报错


\makeatletter 
\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 
%%%%%%%%%%%%%%%%加入上述命令后报错
\begin{document}
    你好!家里蹲大学    aaaabbbbb
\end{document}
1 个回答

撰写答案

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

发布
问题

分享
好友

手机
浏览

扫码手机浏览