美化页面

美化页面

我正在尝试将文档中的特定页面横向显示,并使用pdflscape包和landscape环境来实现此目的。页面确实变为横向模式,但文本没有(如图所示)。 在此处输入图片描述 是什么让页面变成这样?

这里我添加了我的文档的main.tex文件和try.sty文件。

\documentclass[oneside,12pt,a4paper,fleqn]{book}
\usepackage{try}

\begin{document}
\frontmatter
\mainmatter
   \input{CompleteGraph.tex}
\backmatter
\end{document}

这是 try.sty 文件。

% LaTeX cod for chapter header
%--------------------------------------------------------
\makeatletter
\def\@makechapterhead#1{
  %\vspace*{20\p@}   %  \vspace*{15\p@}
  {\parindent \z@ 
      \centering  
    \normalfont
    \ifnum \c@secnumdepth >\m@ne
      \if@mainmatter
      \normalsize 
           \bfseries \@chapapp\space \thechapter 
       \par\nobreak
              \vskip 1.4\baselineskip 
      \fi
    \fi
    \interlinepenalty\@M
    \normalsize     
         \bfseries #1\par\nobreak 
       \vskip 1.4\baselineskip %
  }}
\def\@schapter#1{\if@twocolumn
                   \@topnewpage[\@makeschapterhead{#1}]%
                 \else
                   \@makeschapterhead{#1}
                   \@afterheading
                 \fi}
\def\@makeschapterhead#1{
  %\vspace*{20\p@} % \vspace*{20\p@} %
  {\parindent \z@  
    \centering  
    \normalfont 
    \interlinepenalty\@M
    \normalsize 
    \bfseries  #1\par\nobreak
         \vskip 1.4\baselineskip  
  }}
\makeatother
\renewcommand{\chaptername}{CHAPTER}
%------------------------------------------------------------
% Commands for layout
   %\setlength{\topmargin}{-1.2cm}
   %\setlength{\oddsidemargin}{1.7cm}   %\setlength{\oddsidemargin}{1.46cm} 
\setlength{\textwidth}{14.5cm}
   \setlength{\textheight}{24.5cm} %  \setlength{\textheight}{24.5cm}
   %\setlength{\headheight}{2mm}
    %\setlength{\headsep}{10.175mm}
%-------------------------------------------------------------
% Command for 1.5 spacing
   %\renewcommand{\baselinestretch}{1.5}
\usepackage{doublespace}
\setstretch{1.5}
%-------------------------------------------------------------
% Command for  indentation
   \setlength\parindent{.5in}
   \usepackage{indentfirst} %1st line indented after section...
%-------------------------------------------------------------
% Command for space between paragraph
  \makeatletter
    %\setlength{\parskip}{1.5\baselineskip \@plus 3ex
                %  \@minus 2.0ex}
    \setlength{\parskip}{2\baselineskip \@plus .01ex
                  \@minus .01ex}
   \makeatother
%-------------------------------------------------------------
% Commands for no hyphenation and right justified
    \hyphenpenalty=10000 \sloppy
    \raggedbottom
%-------------------------------------------------------------
% Command to get rid of default running head
   \pagestyle{myheadings}
%-------------------------------------------------------------
% Command for  page number 
%  \makeatletter
%    \renewcommand{\ps@plain}{%
%    \renewcommand{\@oddhead}{\hfill\textrm{\thepage}}
%    \renewcommand{\@evenhead}{\@oddhead}
%    \renewcommand{\@evenfoot}{}
%    \renewcommand{\@oddfoot}{}  }
%   \makeatother
%-----------------------------------------------------------------

 %For section font
 % \usepackage{sectsty} 
  %  \chapterfont{\centering\normalsize\uppercase}
  %  \sectionfont{\normalsize\uppercase}
   % \subsectionfont{\normalsize}
   % \subsubsectionfont{\itshape\normalsize}
%---------------------------------------------------------
%--------------------------------------------------------------
% Commands for REFERENCES name
\renewcommand{\bibname}{REFERENCES}
%--------------------------------------------------------------
% Commands to change vertical space in section and subsection
\makeatletter
\renewcommand{\section}{\@startsection
  {section}%      % the name
  {1}             % the level
  {0cm}           % the indent
  {1.0cm}         % the beforeskip
  {0.01cm}    %{0.5cm}    % the afterskip
  {\normalfont\normalsize\bfseries} } % the style
\renewcommand{\subsection}{\@startsection
  {subsection}%   % the name
  {2}             % the leve2
  {0cm}           % the indent
  {1.0cm}         % the beforeskip
  {0.01cm} %{0.5cm}        % the afterskip
  {\normalfont\normalsize\bfseries} } % the style
\makeatother
%--------------------------------------------------------------
% Commands to change horizontal space in section and subsection
% for times romans
   \renewcommand{\thesection} % space between sect. etc.
     {\thechapter.\arabic{section}\hspace{.12in}}
    \renewcommand{\thesubsection} 
       {\thesection\hspace{-.3cm}.\arabic{subsection} \hspace{-.135cm}} 
%--------------------------------------------------------------
% Commands for  TocLoFT
  \usepackage{tocloft}
    %\cftsetrmarg{2.75cm} %    
     \cftsetrmarg{1.5cm} %  
       \cftsetpnumwidth{1.25cm} 
       %\cftsetpnumwidth{1.25cm}
    \renewcommand{\cftdot}{} % get rid of dots
%Table of Contents
\renewcommand{\contentsname}{}    % off tocname        
\renewcommand{\cftchapfont}{\bfseries}
\renewcommand{\cftchappagefont}{\normalfont\bfseries}
\renewcommand{\cftchappresnum}{\hspace{0.3cm}CHAPTER }
%\setlength{\cftchapindent}{.8cm}      % chapter indent
\setlength{\cftsecindent}{2.3cm}      % section indent
\setlength{\cftsubsecindent}{3.25cm}  % subsection indent
\setlength{\cftchapnumwidth}{3.25cm}  % chp number width
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  \renewcommand{\cftchapafterpnum}{\rule{1.75ex}{0ex}}
%   \renewcommand{\cftsecafterpnum}{\rule{1.75ex}{0ex}}
%   \renewcommand{\cftsubsecafterpnum}{\rule{1.75ex}{0ex}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \renewcommand{\cftchapafterpnum}{\rule{0.75ex}{0ex}}
   \renewcommand{\cftsecafterpnum}{\rule{0.75ex}{0ex}}
   \renewcommand{\cftsubsecafterpnum}{\rule{0.75ex}{0ex}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   \renewcommand{\cftchappagefont}{\normalfont}
%-------------------------------------------------------------  
%List of Table
\setlength{\cfttabnumwidth}{2.5cm}  %\setlength{\cfttabnumwidth}{2.5cm}  
\renewcommand{\listtablename}{} % off lotname
%\setlength{\cfttabindent}{-.015cm}      % table indent %%%%%%%%%%%%%%%%%%
\setlength{\cfttabindent}{-.1cm}      % table indent %%%%%%%%%%%%%%%%%%
\renewcommand{\cfttabpresnum}{Table }
\renewcommand{\cfttabafterpnum}{\rule{2ex}{0ex}}
\cftsetrmarg{3cm}
%------------------------------------------------------------
 %List of Figure
\setlength{\cftfignumwidth}{2.5cm}
\renewcommand{\listfigurename}{} % off lofname
\setlength{\cftfigindent}{-.1cm}      % figure indent %%%%%%%%%%%%%%%%%%
\renewcommand{\cftfigpresnum}{Figure }
\renewcommand{\cftfigafterpnum}{\rule{2ex}{0ex}}
%-------------------------------------------------------------
%-------------------------------------------------------------
% Command for bold caption
\makeatletter
  \long\def\@makecaption#1#2{\vskip 10\p@   % caption parameter
       \setbox\@tempboxa\hbox{{ #1\,\,\,\,\,} #2} %%%%%
       \ifdim \wd\@tempboxa >\hsize         % caption parameter
           {#1\,\,\,\,\,}  #2\par  % caption parameter
       \else                                   % caption parameter
           \hbox to\hsize{\hfil\box\@tempboxa\hfil}  % caption parameter
   \fi}                                            % caption parameter
\makeatother   
\renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}
\renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
%--------------------------------------------------------------
\usepackage{paralist} %refine list item
%--------------------------------------------------------------
\usepackage{latexsym,amsmath,amssymb} % math symbols
%--------------------------------------------------------------
\usepackage{graphicx} % .eps graphic
%--------------------------------------------------------------
\usepackage{pdflscape} % for landscape
%-------------------------------------------------------------- 
\usepackage{times}
%--------------------------------------------------------------
% Theorem-Like-Environment
\usepackage{theorem}
{\theorembodyfont{\upshape}
\newtheorem{lemma}{Lemma}[chapter]
\newtheorem{theorem}{\rule{0ex}{5ex}Theorem}[chapter]
\newtheorem{corollary}{Corollary}[chapter]
\newtheorem{proposition}{Proposition}[chapter]
\newtheorem{definition}{\rule{0ex}{5ex}Definition}[chapter]
\newtheorem{example}{Example}[chapter] }
%--------------------------------------------------------
\newenvironment{proof}{\begin{paragraph}
          {Proof}\vspace{-1cm}}{\end{paragraph}}
\newenvironment{solution}{\begin{paragraph}
          {Solution}\vspace{-1cm}}{\end{paragraph}}

CompleteGraph.tex 文件非常简单,如下所示。

\begin{landscape}
$COM\rightarrow$ a set of combinations of $\textrm{C}^{n}_{m}$\\

$(x_0\textrm{ }x_1\textrm{ }\cdots\textrm{ }x_m)\in COM$ such $x_i=0,1,2,...,n-1$ for $i=0,1,2,...,m$\\

$\delta_j\rightarrow$ difference between two consecutive $x_i$\\

$\Delta(\delta_1\textrm{ }\delta_2\textrm{ }\cdots\textrm{ }\delta_{m-1})\rightarrow$ collection/sequence of differences $\delta_j$ for $j=1,2,...,m-1$
\end{landscape}

相关内容