tikz-cd 包超出了底部边缘,是一个特定的类文件

tikz-cd 包超出了底部边缘,是一个特定的类文件

我正在使用特定的类文件fundam.cls。但是,当我添加 tikz-cd 包时,底部边距会超出范围。我怀疑这是因为 tikz-cd 包正在更改纸张类型,使其变小。

以下是不良行为的最小工作示例:

\documentclass{fundam}
\usepackage{tikz-cd}
\usepackage{url}
\begin{document}
\setcounter{page}{1001}
\issue{XXI~(2001)}

\title{How to Prepare Articles for Fundamenta Informaticae}

\address{Address for correspondence goes here}

\author{First Author\thanks{Thanks for something to somebody}\\
Institute of Informatics \\
Warsaw University\\ Banacha 2, 02-097 Warszawa, Poland\\
first{@}mimuw.edu.pl
\and Second Author\thanks{Thanks for something else to somebody else}\\
Department of Informatics \\
City University \\
London, England } \maketitle

\runninghead{F. Author, S. Author}{How to Prepare Articles for FI}

\begin{abstract}
  This guide is for authors who are preparing papers for
  \emph{Fundamenta Informaticae\/} using the \LaTeXe\ document
  preparation system and the \texttt{fundam.cls} class file.
\end{abstract}

\begin{keywords}
\LaTeXe, document class file, Bib\TeX
\end{keywords}


\section{Introduction}

The \emph{Fundamenta Informaticae\/} class file is based on the
standard \LaTeXe\ \texttt{article} class as described in the \LaTeX\
manual.  It means that the paper prepared to be process with the
standard \texttt{article} class can be processed with the
\texttt{fundam} class without any modifications.  Commands which
differ from the standard \LaTeX\ interface, or which are provided in
addition to the standard interface, are explained in this guide. This
guide is not a substitute for the \LaTeX\ manual itself.

The \texttt{fundam} class can be used only with \LaTeXe. It is not
supposed to work with the obsolete 2.09 (or earlier) version of
\LaTeX.


\end{document}

没有 tikz-cd 包,它也能完美运行。

答案1

graphicx我刚刚在课堂上遇到了与包相同的问题fundam。我尝试了@egreg提供的解决方案,但不幸的是,这对我没有用。

我仔细观察了fundam.cls 文件并查找\paperlength和值\paperwidth。在那里我发现\topmargin -2cm115 行被评论了。删除评论解决了我的问题。

            % $Id: fundam.cls,v 1.2 2000/06/24 06:57:31 piotrek Exp $
            % This file fuin.cls defines LaTeX 2e document class
            % for Fundamenta Informaticae.
            %Last modified 25/06/2016 by Marcin Szczuka
            % To be used with LaTeX 2e.
            %


            \newif\iffour\fourfalse
            \NeedsTeXFormat{LaTeX2e}
            \ProvidesClass{fundam}[1998/08/19 v1.1
             Fundamenta Informaticae document class]
            \DeclareOption{manyauthors}{\fourtrue}
            \DeclareOption{draft}{\PassOptionsToClass{draft}{article}}
            \DeclareOption{times}{\AtEndOfClass{\RequirePackage{times}}}
            \DeclareOption{cmtt}{\AtEndOfClass{\renewcommand{\ttdefault}{cmtt}}}
            \DeclareOption{theoremsf}{\def\THstyle{\theorembodyfont{\sffamily}
                \theoremheaderfont{\bfseries\sffamily}}
              \def\PRstyle{\sffamily}}
            \DeclareOption{theoremnormal}{\def\THstyle{\theorembodyfont{\upshape}}
              \def\PRstyle{\relax}}
            \ExecuteOptions{final,theoremnormal,times,cmtt}
            \ProcessOptions
            \relax
            \LoadClass[11pt,twoside,onecolumn]{article}
            \RequirePackage{theorem}
            \RequirePackage{amsmath}
            %=======================================================================
            \def\@seccntformat#1{\csname the#1\endcsname.\quad} %% PU - 19 VIII
                                                  %% zmiana \enspace na \quad
            %=======================================================================
            %\def\ii{\footnotesize\em}
            %=======================================================================
            \def\issue#1{\gdef\@issue{#1}}
            \issue{XX~(\number\year)}  % zmiana (PU)
            \def\papernumber#1{\gdef\@papernumber{#1}}
            \papernumber{0000}
            \def\runninghead#1#2{\gdef\@shortauthor{#1}\gdef\@shorttitle{#2}}
            \runninghead{author}{short title}
            % this ugly thing for backwards compatibility:
            \let\markboth\runninghead
            %%%\setcounter{page}{163}

            \AtEndDocument{\label{::last page of FI article:\jobname::}}

            \def\@maketitle{\newpage%
                \renewcommand\thefootnote{\ifnum\c@footnote=7\relax C\else\@fnsymbol\c@footnote\fi}%
                \def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}%
                \long\def\@makefntext##1{\parindent 0em\noindent
                        {%
                            \@textsuperscript{\normalfont\@thefnmark }}##1}%
              {\noindent\footnotesize\textit{Fundamenta Informaticae
                  \ignorespaces\@issue\unskip\space
                  \thepage--\pageref{::last page of FI article:\jobname::}}% zmiana - na -- (PU)
                  \hfill \thepage}
               \vskip .01em
              {\noindent\footnotesize\textit{DOI 10.3233/FI-2016-\@papernumber}}
              \vskip .01em
              {\noindent\footnotesize\textit{IOS Press}}
              \vskip 1.6em
              \par\hangindent=30pt\hangafter=0
              \pretolerance=10000
              \begin{flushleft}%
                {\Large\bfseries \@title\par}
                \vskip 1.7em
                {\normalsize\fontsize{10}{\f@baselineskip}\itshape
                  \tabcolsep=0pt
                  \lineskip0pt %??
            \iffour\@fourauthors\else
                  \begin{tabular}[t]{l}
                    \reset@font\normalsize\bfseries\@author\relax
                  \end{tabular}\par\fi}%
                \nointerlineskip
              \end{flushleft}%
              \vskip .2em
              \footnoterule
              \vskip 3cm
              }

            \def\and{\\[5pt]\reset@font\normalsize\bfseries}

            \def\abstract{%
            \list{}{\advance\topsep by0.35cm\relax\small\rm
             \leftmargin=1cm
             \labelwidth\listparindent
             \itemindent\listparindent
             \rightmargin\leftmargin}\item[\hskip\labelsep\bf\abstractname.]}
            \let\endabstract=\endlist

            \def\keywords{%
            \list{}{\advance\topsep by0.35cm\relax\small\rm
             \leftmargin=1cm
             \labelwidth=\z@
             \listparindent=\z@
             \itemindent\listparindent
             \rightmargin\leftmargin}\item[\hskip\labelsep\bf Keywords: ]}
            \let\endkeywords=\endlist
            %=======================================================================
            \let\ps@plain\ps@empty
            \def\ps@fuin{\let\@mkboth\@gobbletwo
              \def\@oddhead{\footnotesize\phantom{\thepage}%
                \hfil\textit{\@shortauthor\,/\,\@shorttitle}\hfil
                \thepage}
              \def\@oddfoot{}
              \def\@evenhead{\footnotesize\thepage
                \hfil \textit{\@shortauthor\,/\,\@shorttitle}\hfil
                \phantom{\thepage}}
              \def\@evenfoot{}
              }
            \pagestyle{fuin}
            \paperwidth 19.2cm
            \paperheight 26.2cm
            \textwidth 15.6cm
            \textheight 21.6cm
            %\topmargin -2cm  %Remove comment if you are using graphicx package
            \oddsidemargin 0.0cm
            \evensidemargin 0.0cm

            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            % Theorem like environments

            \gdef\th@plain{\normalfont\itshape
              \def\@begintheorem##1##2{%
                    \item[\hskip\labelsep \theorem@headerfont ##1\ ##2.]}%

            \def\@opargbegintheorem##1##2##3{%
              \item[\rlap{\vbox{\hbox{\hskip \labelsep \theorem@headerfont
                                 ##1\ ##2.\ (##3)}%
                                \hbox{\strut}}}]}}
            %\def\@opargbegintheorem##1##2##3{%
            %   \item[\hskip\labelsep \theorem@headerfont ##1\ ##2.\ (##3)]\hfill\newline}}

            \theoremstyle{plain}
            \THstyle
            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            \newtheorem{definition}{Definition}[section]
            \newtheorem{theorem}[definition]{Theorem}%[section]
            \newtheorem{fact}[definition]{Fact}%[section]
            \newtheorem{lemma}[definition]{Lemma}
            \newtheorem{example}[definition]{Example}
            \newtheorem{assumption}[definition]{Assumption}
            \newtheorem{proposition}[definition]{Proposition}
            \newtheorem{remark}[definition]{Remark}
            \newtheorem{corollary}[definition]{Corollary}
            \newtheorem{claim}[definition]{Claim}
            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

            %%\newtheorem{definition}{Definition}[section]
            %%\newtheorem{theorem}{Theorem}[section]
            %%\newtheorem{fact}{Fact}[section]
            %%\newtheorem{lemma}{Lemma}[section]
            %%\newtheorem{example}{Example}[section]
            %%\newtheorem{assumption}{Assumption}[section]
            %%\newtheorem{proposition}{Proposition}[section]
            %%\newtheorem{remark}{Remark}[section]
            %%\newtheorem{corollary}{Corollary}[section]
            %%\newtheorem{claim}{Claim}[section]
            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            \newenvironment{proof}
              {\trivlist\PRstyle\item[]{\bfseries Proof:}\newline}{\QED\endtrivlist}
            \def\squareforqed{\hbox{\rlap{$\sqcap$}$\sqcup$}}
            \def\QED{\ifmmode\squareforqed\else{\unskip\nobreak\hfil
            \penalty50\hskip1em\null\nobreak\hfil\squareforqed
            \parfillskip=0pt\finalhyphendemerits=0\endgraf}\fi}
            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

            \renewcommand\arraystretch{1.2}
            \setlength\tabcolsep{9\p@}
            \setlength\belowcaptionskip{5\p@}

            \long\def\@makecaption#1#2{%
              \small
              \vskip\abovecaptionskip
              \sbox\@tempboxa{#1.\quad #2}%
              \ifdim \wd\@tempboxa >\hsize
                #1.\quad #2\par
              \else
                \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
              \fi
              \vskip\belowcaptionskip}

            \abovedisplayskip=7pt plus 2pt minus 5pt
            \abovedisplayshortskip=0pt plus 2pt
            \belowdisplayskip=7pt plus 2pt minus 5pt
            \belowdisplayshortskip=5pt plus 2pt minus 3pt

            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            \newcounter{ttmp}\setcounter{ttmp}{0}

            \def\QQQ{
            \setcounter{ttmp}{\thetmp}
            \setlength\maxl{0pt}
            \setbox0=\vbox{\def\corresponding{\relax}\def\thanks##1{\relax}%
              \csname @author\thettmp\endcsname}
            \setlength\tmpl{\ht0}\addtolength\tmpl{\dp0}
            \ifnum\tmpl>\maxl\relax\setlength\maxl{\tmpl}\fi
            \stepcounter{ttmp}
            \setbox0=\vbox{\def\corresponding{\relax}\def\thanks##1{\relax}%
              \csname @author\thettmp\endcsname}
            \setlength\tmpl{\ht0}\addtolength\tmpl{\dp0}
            \ifnum\tmpl>\maxl\relax\setlength\maxl{\tmpl}\fi
            %\message{\the\maxl}
            \addtolength\maxl{0.8\baselineskip}
            %
            \halign{##&##\cr
            \hbox{\global\stepcounter{tmp}
            \vbox to \maxl{\hsize=0.5\hsize\upshape\bfseries\csname @author\thetmp\endcsname\vfill}}&
            \hbox{\global\stepcounter{tmp}
            \vbox to \maxl{\hsize=0.5\hsize\upshape\bfseries\csname @author\thetmp\endcsname\vfill}}\cr}
            }

            \def\END{\relax}
            \def\AUTORZY#1{\doAUTOR#1\and\END
            \setcounter{tmp}{0}
            \let\ORIGBS=\\
            \def\\{\fontsize{10}{\f@baselineskip}\mdseries\itshape\ORIGBS}
            \vbox{\loop
            \QQQ
            \ifnum\thetmp<\theauthor
            \repeat}\par}
            \def\doAUTOR#1\and#2{\formatauthor{#1}%\message{^^J}
            \if#2\relax%\message{KONIEC^^J}
            \let\next\relax\else\let\next\doAUTOR\fi\next#2}

            \def\@fourauthors{\expandafter\expandafter\AUTORZY{\@author}}

            \newcounter{author}\setcounter{author}{0}
            \newcounter{tmp}\setcounter{tmp}{0}

            \newlength\maxl
            \newlength\tmpl

            \def\formatauthor#1{\stepcounter{author}%\message{****\theauthor}
              \expandafter\def\csname @author\theauthor\endcsname{#1}
            \setcounter{tmp}{\theauthor}\stepcounter{tmp}
              \expandafter\def\csname @author\thetmp\endcsname{\relax}
            %\message{^^J<<<<<<<<<<<<<<<<<<<<<<<<^^J}
            %\expandafter\show\csname @author\theauthor\endcsname
            %\message{^^J>>>>>>>>>>>>>>>>>>>>>>>>^^J}
            }

            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

            \renewcommand\@makefntext[1]{%
                \parindent 0em%
                \noindent
                {\@makefnmark }#1}
            \def\@makefnmark{{\@textsuperscript{\normalfont\@thefnmark}}}%

            \def\acknowledgements{\section*{Acknowledgements}}

            \def\corresponding{\advance\c@footnote by -1\global\renewcommand\thefootnote{C}
                \long\def\@makefntext##1{\parindent 0em\noindent
                        {%
                            \@textsuperscript{C}}##1}%
            \footnotemark
            \protected@xdef\@thanks{\@thanks
              \protect\footnotetext[7]{Corresponding author}}%
            }

            \def\address#1{{\renewcommand\thefootnote{\relax}%
            \footnotetext{Address for correspondence: #1}}}
            \def\thanksas#1{\@textsuperscript{\@fnsymbol#1}}


            \renewenvironment{thebibliography}[1]
                 {\section*{\refname
                    \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
                  \small
                  \list{\@biblabel{\@arabic\c@enumiv}}%
                       {\settowidth\labelwidth{\@biblabel{#1}}%
                        \leftmargin\labelwidth
                        \advance\leftmargin\labelsep
                        \@openbib@code
                        \usecounter{enumiv}%
                        \let\p@enumiv\@empty
                        \renewcommand\theenumiv{\@arabic\c@enumiv}}%
                  \sloppy
                  \clubpenalty4000
                  \@clubpenalty \clubpenalty
                  \widowpenalty4000%
                  \sfcode`\.\@m}
                 {\def\@noitemerr
                   {\@latex@warning{Empty `thebibliography' environment}}%
                  \endlist}

            \gdef\@ltag{\relax}
            \def\ltag#1{\gdef\@ltag{$#1$}}

            \def\mkltag{\if\@ltag\relax\else\llap{\hbox to \hsize{\@ltag\hss}}\fi\gdef\@ltag{\relax}}

            %\def\endequation{\eqno \hbox{\@eqnnum\mkltag}$$\@ignoretrue}

            \def\@@eqncr{\let\reserved@a\relax
                \ifcase\@eqcnt \def\reserved@a{& & &}\or \def\reserved@a{& &}%
                 \or \def\reserved@a{&}\else
                   \let\reserved@a\@empty
                   \@latex@error{Too many columns in eqnarray environment}\@ehc\fi
                 \reserved@a \if@eqnsw\@eqnnum\mkltag\stepcounter{equation}\fi
                 \global\@eqnswtrue\global\@eqcnt\z@\cr}


            \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}\mkltag}

答案2

其实问题;这只是软件的最新版本处理输出页面尺寸的方式。

fundam班级来自 1998 年,其分页参数设置为使得文本块(几乎)位于 A4 纸的中心。

然而,最近版本的 LaTeX 试图更好地解决这个问题,因此它们根据\paperwidth和的值设置纸张宽度和高度\paperheight。加载后立即发生此操作graphicx(TikZ 会执行此操作)。

补救措施很简单:之前\begin{document}将纸张参数重新设置为A4。

\documentclass{fundam}

\usepackage{tikz-cd}

% everything has been set; reset the page dimensions to A4
\setlength{\paperwidth}{21cm}
\setlength{\paperheight}{29.7cm}

\begin{document}
\setcounter{page}{1001}
\issue{XXI~(2001)}

\title{How to Prepare Articles for Fundamenta Informaticae}

\address{Address for correspondence goes here}

\author{First Author\thanks{Thanks for something to somebody}\\
Institute of Informatics \\
Warsaw University\\ Banacha 2, 02-097 Warszawa, Poland\\
first{@}mimuw.edu.pl
\and Second Author\thanks{Thanks for something else to somebody else}\\
Department of Informatics \\
City University \\
London, England } \maketitle

\runninghead{F. Author, S. Author}{How to Prepare Articles for FI}

\begin{abstract}
  This guide is for authors who are preparing papers for
  \emph{Fundamenta Informaticae\/} using the \LaTeXe\ document
  preparation system and the \texttt{fundam.cls} class file.
\end{abstract}

\begin{keywords}
\LaTeXe, document class file, Bib\TeX
\end{keywords}


\section{Introduction}

The \emph{Fundamenta Informaticae\/} class file is based on the
standard \LaTeXe\ \texttt{article} class as described in the \LaTeX\
manual.  It means that the paper prepared to be process with the
standard \texttt{article} class can be processed with the
\texttt{fundam} class without any modifications.  Commands which
differ from the standard \LaTeX\ interface, or which are provided in
addition to the standard interface, are explained in this guide. This
guide is not a substitute for the \LaTeX\ manual itself.

The \texttt{fundam} class can be used only with \LaTeXe. It is not
supposed to work with the obsolete 2.09 (or earlier) version of
\LaTeX.

The \emph{Fundamenta Informaticae\/} class file is based on the
standard \LaTeXe\ \texttt{article} class as described in the \LaTeX\
manual.  It means that the paper prepared to be process with the
standard \texttt{article} class can be processed with the
\texttt{fundam} class without any modifications.  Commands which
differ from the standard \LaTeX\ interface, or which are provided in
addition to the standard interface, are explained in this guide. This
guide is not a substitute for the \LaTeX\ manual itself.

The \texttt{fundam} class can be used only with \LaTeXe. It is not
supposed to work with the obsolete 2.09 (or earlier) version of
\LaTeX.

\end{document}

在此处输入图片描述

相关内容