LaTeX forum ⇒ Page LayoutPage number is cropped; almost invisible! Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
feryee
Posts: 20
Joined: Sun Aug 09, 2015 12:57 pm

Page number is cropped; almost invisible!

Postby feryee » Sat May 27, 2017 10:46 am

|Hi,
I am now writing my thesis in latex and have very strange problem that maybe you can help me to resolve it. In the process of creating Pdf output (first i get ps due to my figures and then ps to pdf as it would end up giving error when i go directly from dvipdf). The problem is with page number. As i applied the margin guidlines In the style file (available at the bottom)
margin.png
margin.png (32.6 KiB) Viewed 2100 times


After compile , I get a sample page output as follows:

sample page.png
sample page.png (114.77 KiB) Viewed 2100 times





As you may see, the page number is cropped and almost invisible. Even when i try take print and set the paper size to to 21cm by 29.7cm (A4), i still unable to see the page number. I would be appreciated if you can possibly help me with that.

Best



Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. %style file
  2. ===============================================================
  3. %%
  4. %%
  5. %%
  6. %% Copying of part or all of any file in the fbe_tez.sty package
  7. %% is allowed under the following conditions only:
  8. %% (1) You may freely distribute unchanged copies of the files.
  9. %% Please include the documentation when you do so.
  10. %% (2) You may modify a renamed copy of this file, but only for
  11. %% personal use.
  12. %% (3) You may copy fragments from the files, for personal use
  13. %% or for use in a macro package for distribution, as long
  14. %% as credit is given where credit is due.
  15. %%
  16. %% You are NOT ALLOWED to take money for the distribution or
  17. %% use of these and associated files or modified versions or
  18. %% fragments thereof.
  19. %%
  20. %% Please report any bugs or suggestions to
  21. %%
  22. %%
  23. %%
  24. \typeout{Thesis style for IGSR, Eastern University, Version 1.0}
  25. %
  26. % Definitions for title and approval pages
  27. %
  28. \def\degree#1{\gdef\@degree{#1}}
  29. %\def\program#1{\gdef\@program{#1}}
  30. \def\Dept#1{\gdef\@Dept{#1}}
  31. \def\subyear#1{\gdef\@subyear{#1}}
  32. \def\InstituteDirector#1{\gdef\@InstituteDirector{#1}}
  33. \def\DeptChair#1{\gdef\@DeptChair{#1}}
  34. \def\cosuperi#1{\gdef\@cosuperi{#1}}
  35. \def\cosuperii#1{\gdef\@cosuperii{#1}}
  36. \def\examineri#1{\gdef\@examineri{#1}}
  37. \def\examinerii#1{\gdef\@examinerii{#1}}
  38. \def\supervisor#1{\gdef\@supervisor{#1}}
  39. \def\examineriii#1{\gdef\@examineriii{#1}}
  40. \def\examineriv#1{\gdef\@examineriv{#1}}
  41. \def\examinerv#1{\gdef\@examinerv{#1}}
  42. \def\dateofapproval#1{\gdef\@dateofapproval{#1}}
  43. %
  44. \global\let\@degree\empty
  45. %\global\let\@program\empty
  46. \global\let\@Dept\empty
  47. \global\let\@InstituteDirector\empty
  48. \global\let\@DeptChair\empty
  49. \global\let\@cosuperi\empty
  50. \global\let\@cosuperii\empty
  51. \global\let\@examineri\empty
  52. \global\let\@examinerii\empty
  53. \global\let\@supervisor\empty
  54. \global\let\@examineriii\empty
  55. \global\let\@examineriv\empty
  56. \global\let\@examinerv\empty
  57. \global\let\@examinervi\empty
  58. \global\let\@dateofapproval\empty
  59. \def\nyear{\number\year}
  60. \def\nmonth{\number\month}
  61. \global\let\@subyear\nyear
  62. \global\let\@submonth\nmonth
  63. %
  64. % Other definitions
  65. %
  66. \xdef\@singlespaced{1}
  67. \xdef\@onehalfspaced{1.5}
  68. %
  69. \newlength{\insd}
  70. \newlength{\dc}
  71. \newlength{\dpt}
  72. \newlength{\spv}
  73. \newlength{\ei}
  74. \newlength{\csi}
  75. \newlength{\csii}
  76. \newlength{\eii}
  77. \newlength{\eiii}
  78. \newlength{\eiv}
  79. \newlength{\ev}
  80. \let\@app\empty
  81. \newcounter{thsfootcnt}
  82. %
  83. % Title page
  84. %
  85. \newcommand\uptitle{
  86. \ifx\@degree\empty \@@warning{No \string\degree\space given} \fi
  87. \null
  88. \vspace*{-45pt}
  89. \let\baselinestretch\@singlespaced{\fontsize{18}{1}{\textbf{\@title}} \\%
  90. \vskip 160pt
  91. \fontsize{16}{1}{\textbf{\@author}} \\
  92. \vskip 110pt
  93. \large{Submitted to the\\Institute of Graduate Studies and Research\\
  94. in partial fulfillment of the requirements for the degree of} \\[120pt]}}
  95. %\vskip 200pt
  96. \newcommand\downtitle{
  97. \vskip 120pt
  98. %\vskip 2\baselineskip
  99. \let\baselinestretch\@singlespaced{
  100. \vskip 00pt
  101. \large{} \\ \large{June 2017}}\\[1pt] \large{}
  102. \null}
  103. %
  104. \newcommand\relaxtitlestuff{
  105. \setcounter{footnote}{0}%
  106. \global\let\thanks\relax
  107. \global\let\maketitle\relax
  108. \global\let\@thanks\@empty
  109. \global\let\@author\@empty
  110. \global\let\@date\@empty
  111. \global\let\author\relax
  112. \global\let\date\relax
  113. \global\let\and\relax}
  114. %
  115. \newcommand\makemstitle{\begin{titlepage}
  116. \let\baselinestretch\@singlespaced{
  117. \begin{center}
  118. \uptitle
  119. \vskip 56pt
  120. \large{Master of Science \\ in \\ \@Dept}
  121. \downtitle
  122. \end{center}}
  123. \end{titlepage}
  124. \relaxtitlestuff}
  125. %
  126.  
  127. \newcommand\makephdtitle{\begin{titlepage}
  128. \begin{center}
  129. \uptitle
  130. \large{Doctor of Philosophy} \\% \vspace{-0.5cm}
  131. \large{in}\\ %\vspace{-0.5cm}
  132. \large{\@Dept}
  133. \downtitle
  134. \end{center}
  135. \end{titlepage}
  136. \relaxtitlestuff}
  137. %
  138. % Approval page
  139. %
  140. \newcommand\makeapprovalpage{%
  141. \addtocounter{page}{-1}
  142. \settowidth{\insd}{\@InstituteDirector}
  143. \settowidth{\dc}{\@DeptChair}
  144. \settowidth{\dpt}{\@Dept}
  145. \settowidth{\ei}{\@examineri}
  146. \settowidth{\csi}{\@cosuperi}
  147. \settowidth{\csii}{\@cosuperii}
  148. \settowidth{\eii}{\@examinerii}
  149. \settowidth{\spv}{\@supervisor}
  150. \settowidth{\eiii}{\@examineriii}
  151. \settowidth{\eiv}{\@examineriv}
  152. \settowidth{\ev}{\@examinerv}
  153. \ifdim\ei>\spv \spv\ei \fi
  154. \ifdim\csii>\spv \spv\ei \fi
  155. \ifdim\eii>\spv \spv\eii \fi
  156. \ifdim\csi>\spv \spv\ei \fi
  157. \ifdim\eiii>\spv \spv\eiii \fi
  158. \ifdim\eiv>\spv \spv\eiv \fi
  159. \ifdim\ev>\spv \spv\ev \fi
  160. \vspace*{-1.6cm}
  161. \hspace{-0.5cm}Approval of the Institute of Graduate Studies and Research
  162. \vspace*{1cm}
  163. \begin{tabbing}
  164. \hspace*{3.0cm} \= \hspace*{\spv}\hspace*{1em} \= \kill
  165. \ifx\@InstituteDirector\empty \ifx\@cosuperi\empty \ifx\@cosuperi\empty
  166. \@@warning{No \string\InstituteDirector\space given} \fi \fi
  167. \else \hspace*{8.cm}\makebox[60mm]\hrulefill\> \\[-16pt]\hspace*{8.5cm}\@InstituteDirector \> \\[-16pt]
  168. \>\hspace*{7.2cm} Director \\\\ \> \fi
  169. \hspace{-3.1cm}\vspace*{6cm}I certify that this thesis satisfies the requirements as a
  170. thesis for the degree of\\[-12pt]
  171. Doctor of Philosophy in \@Dept\\[1cm]
  172. \vspace*{-0.5cm}
  173. \ifx\@supervisor\empty \ifx\@cosuperi\empty \ifx\@cosuperi\empty
  174. \@@warning{No \string\supervisor\space given} \fi \fi
  175. \else \hspace*{7.9cm}\makebox[60mm]\hrulefill\> \\[-16pt]\hspace*{7.5cm}\@DeptChair\> \\[-16pt]
  176. \>\hspace*{7cm} Chair of\>\\[-16pt]
  177. \>\hspace*{4.6cm} \@Dept\\[1cm]\> \fi
  178. \hspace{-3.1cm}We certify that we have read this thesis and that in our opinion it is fully adequate,\\[-12pt]
  179. in scope and quality as a thesis of the degree of Doctor of Philosophy in \\[-12pt]
  180. \@Dept\\[1cm]
  181.  
  182. \ifx\@supervisor\empty \else \hspace*{8.1cm}\makebox[60mm]\hrulefill\> \\[-16pt]\hspace*{8.4cm}\@supervisor \> \\[-16pt]
  183. \>\hspace*{7cm} Supervisor \> \\[-1.9cm]
  184.  
  185. \hspace*{-0.0cm}\makebox[60mm]\hrulefill\> \\[-16pt]\hspace*{0.90cm}\@cosuperi \>
  186. \\[-16pt]
  187. \>\hspace*{-1.2cm} Cosupervisor \\ \>\\\\\fi
  188. \hspace*{9cm}Examining Committee\\*[-24pt]
  189. \makebox[14cm]\hrulefill\\
  190.  
  191. \ifx\@examineri\empty \else 1. \@examineri \> \hspace*{5cm}\makebox[60mm]\hrulefill \\ \fi
  192. \ifx\@examinerii\empty \else 2. \@examinerii \> \hspace*{5cm}\makebox[60mm]\hrulefill\\ \fi
  193. \ifx\@examineriii\empty \else 3. \@examineriii \> \hspace*{5cm}\makebox[60mm]\hrulefill\\ \fi
  194. 4. \@supervisor \> \hspace*{5cm}\makebox[60mm]\hrulefill \\
  195. \ifx\@examineriv\empty \else 5. \@examineriv \> \hspace*{5cm}\makebox[60mm]\hrulefill\\ \fi
  196. \end{tabbing}
  197. \vfill
  198. %\vspace*{2cm}
  199. %\global\let\@title\@empty
  200. %\global\let\title\relax
  201. \global\let\@dateofapproval\@empty
  202. \global\let\dateofapproval\relax
  203. \global\let\@supervisor\@empty
  204. \global\let\supervisor\relax
  205. \global\let\@cosuperi\@empty
  206. \global\let\cosuperi\relax
  207. \global\let\@cosuperii\@empty
  208. \global\let\cosuperii\relax
  209. \global\let\@examineri\@empty
  210. \global\let\examineri\relax
  211. \global\let\@examinerii\@empty
  212. \global\let\examinerii\relax
  213. \global\let\@examineriii\@empty
  214. \global\let\examinerii\relax
  215. \global\let\@examinervi\@empty
  216. \global\let\examinervi\relax
  217. \global\let\@examinerv\@empty
  218. \global\let\examinerv\relax
  219. }
  220. %
  221. % Abstract, Acknowledgements, Oz, etc.
  222. %
  223.  
  224. \newenvironment{preface}{\chapter*{\prefacename}}
  225. {\par\vfil\null}
  226. %
  227. \newenvironment{foreword}{\chapter*{\forewordname}}
  228. {\par\vfil\null}
  229.  
  230. %************************* ABSTRACT TITLE ***********************
  231.  
  232. \renewenvironment{abstract}{\chapter*{\abstractname }
  233. \vspace{-0.5cm}
  234. \begin{center}{\large \textbf{}}\end{center}}
  235. {\par\vfil\null}
  236.  
  237. \newenvironment{acknowledgements}{\chapter*{\ackname}}
  238. {\par\vfil\null}
  239. %
  240. \newenvironment{ozet}{\chapter*{\ozetname }
  241. \vspace{-0.cm}
  242. \begin{center}{\large \textbf{}}\end{center}}
  243. {\par\vfil\null}
  244. %
  245. \newenvironment{symbols}{%
  246. \clearpage
  247. \chapter*{\listsymbolname}
  248. \beginsymlist}
  249. {\closesymlist}
  250. %
  251. \newcommand{\beginsymlist}{%
  252. \begin{tabbing}
  253. \hspace*{\symtabi}\=\hspace*{\symtabii}\=\kill}
  254. %
  255. \newcommand{\closesymlist}{\end{tabbing}}
  256. %
  257. \newcommand{\sym}[2]{\>#1 \>#2 \\}
  258. \newlength{\symtabi}
  259. \newlength{\symtabii}
  260. \setlength{\symtabi}{1em}
  261. \setlength{\symtabii}{10em}
  262. %
  263. \newcommand\prefacename{\vskip-1.3cm \hskip -0.65cm PREFACE}
  264. \newcommand\forewordname{\vskip-1.3cm \hskip -0.65cm FOREWORD}
  265. \newcommand\ackname{\vskip-1.3cm \hskip -0.65cm ACKNOWLEDGMENTS}
  266. \newcommand\ozetname{\vskip-1.3cm \hskip -0.65cm \"OZ}
  267. \newcommand{\listsymbolname}{\vskip-1.3cm \hskip -0.65cm LIST OF SYMBOLS}
  268. \renewcommand\indexname{\vskip-1.3cm \hskip -0.65cm INDEX}
  269. \renewcommand\partname{\vskip-1.3cm \hskip -0.65cm PART}
  270. \renewcommand\appendixname{\vskip-1.3cm \hskip -0.65cm APPENDIX}
  271. \renewcommand\abstractname{\vskip-1.3cm \hskip -0.65cm ABSTRACT}
  272. %
  273. % Sectional Units
  274. %
  275. \renewcommand\chapter{\clearpage
  276. \global\@topnum\z@
  277. \@afterindenttrue
  278. \secdef\@chapter\@schapter}
  279. %
  280. \renewcommand\@makechapterhead[1]{\begin{center}
  281. {\fontsize{16}{1}
  282. \ifnum \c@secnumdepth >\m@ne
  283. \ifx\@app\empty
  284. \vspace*{-2.1cm} \Large\bfseries Chapter \hspace{0.5ex}\arabic{chapter} \\[1cm]
  285. %\large\bfseries \hspace{1ex}
  286. \else
  287. \vspace*{-2cm}\large\bfseries \appendixname\ \thechapter.\hspace{1ex}
  288. \fi
  289. \fi
  290. \interlinepenalty\@M
  291. \large \bfseries #1\par\nobreak
  292. \vskip\baselineskip
  293. }\end{center}}
  294. %
  295. \renewcommand\@makeschapterhead[1]{\begin{center}
  296. { \normalfont
  297. \interlinepenalty\@M
  298. \vspace*{-0.5cm}\large \bfseries #1\par\nobreak
  299. \vskip\baselineskip
  300. }\end{center}}
  301. %
  302. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  303. \refstepcounter{chapter}%
  304. \typeout{\@chapapp\space\thechapter.}%
  305. \ifx\@app\empty
  306. \addcontentsline{toc}{chapter}%
  307. {\protect\numberline{\chaptocapp}#1}%
  308. \else
  309. \addtocontents{toc}{%
  310. \noindent
  311. \appendixname\ \thechapter.\hspace{1.6ex}#1
  312. \nobreak\leaders
  313. \hbox{$\m@th \mkern \@dotsep mu.\mkern
  314. \@dotsep mu$}
  315. \hfill \nobreak
  316. \hb@xt@\@pnumwidth{\hss \thepage}\par}
  317. \fi
  318. \else
  319. \addcontentsline{toc}{chapter}{#1}%
  320. \fi
  321. \chaptermark{#1}%
  322. \@makechapterhead{#2}%
  323. \@afterheading
  324. }
  325. %
  326. \renewcommand\@schapter[1]{\addcontentsline{toc}{chapter}{#1}%
  327. \@makeschapterhead{#1} \@afterheading}
  328. %
  329. \def\chaptocapp{\thechapter.}
  330. %
  331. \renewcommand\section{\@startsection {section}{1}{\z@}%
  332. {7pt} %{-3.5ex \@plus -1ex \@minus -.2ex}
  333. {7pt} %{2.3ex \@plus.2ex}%
  334. {\fontsize{14}{1}\raggedright\bfseries\textbf\large}}
  335. \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
  336. {7pt}%{-3.25ex\@plus -1ex \@minus -.2ex}%
  337. {7pt}%{1.5ex \@plus .2ex}%
  338. {\raggedright\bfseries\textbf\normalsize}}
  339. \renewcommand\subsubsection[1]{\@startsection{subsubsection}{3}{\z@}%
  340. {7pt}%{-3.25ex\@plus -1ex \@minus -.2ex}%
  341. {-0.5em}%
  342. %{-3.25ex\@plus -1ex \@minus -.2ex}%
  343. %{-1em}%
  344. {\normalsize}[#1]{\underbar{#1.}}}
  345. \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%]
  346. {3.25ex \@plus1ex \@minus.2ex}%
  347. {-1em}%
  348. {\normalfont\normalsize\itshape}}
  349. %
  350. % There should be a period after the section number.
  351. \def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
  352. \let\@svsec\@empty\else
  353. \refstepcounter{#1}
  354. \ifnum#2=3
  355. \edef\@svsec{\underbar{\csname the#1\endcsname.\hskip 0.5em}}
  356. \else
  357. \edef\@svsec{\csname the#1\endcsname.\hskip 0.5em}\fi
  358. \fi
  359. \@tempskipa #5\relax
  360. \ifdim \@tempskipa>\z@
  361. \begingroup #6\relax
  362. \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}%
  363. \endgroup
  364. \csname #1mark\endcsname{#7}
  365. \addcontentsline{toc}{#1}
  366. {\ifnum #2>\c@secnumdepth
  367. \else \protect\numberline{\csname the#1\endcsname.}
  368. \fi
  369. #7}
  370. \else
  371. \def\@svsechd{#6\hskip #3\relax %% \relax added 2 May 90
  372. \@svsec #8\ifnum #2>\c@secnumdepth.\fi
  373. \csname #1mark\endcsname{#7}
  374. \addcontentsline{toc}{#1}
  375. {\ifnum #2>\c@secnumdepth
  376. \else \protect\numberline{\csname the#1\endcsname.}
  377. \fi
  378. #7}}
  379. \fi
  380. \@xsect{#5}}
  381. %
  382. % First paragraf of a section should be indented
  383. %\def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
  384. % \par \@tempskipa #4\relax
  385. % \@afterindenttrue
  386. % \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \fi
  387. % \if@nobreak \everypar{}\else
  388. % \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar
  389. % {\@ssect{#3}{#4}{#5}{#6}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
  390. %
  391. \addtocounter{secnumdepth}{1}
  392. \addtocounter{tocdepth}{1}
  393. %
  394. % Figures and Tables
  395. %
  396. \renewcommand\listfigurename{\vskip-1.0cm \hskip -0.65cm LIST OF FIGURES}
  397. \renewcommand\listtablename{\vskip-1.0cm \hskip -0.65cm LIST OF TABLES}
  398. \renewcommand\figurename{Figure}
  399. \renewcommand\tablename{Table}
  400. %
  401. \renewcommand\listoffigures{% \ev is used for temporary storage of \parskip
  402. \setlength{\baselineskip}{\baselineskip} % This is where the linespacing is changed in the list of tables. Aykut Hocanin
  403. \setlength{\ev}{\parskip}
  404. \parskip0pt
  405. \chapter*{\listfigurename
  406. \@mkboth{\listfigurename}%
  407. {\listfigurename}}%
  408. \@starttoc{lof}%
  409. \parskip\ev}
  410.  
  411. \renewcommand\listoftables{% \ev is used for temporary storage of \parskip
  412. \setlength{\baselineskip}{\baselineskip}
  413. \setlength{\ev}{\parskip}
  414. \parskip0pt
  415. \chapter*{\listtablename
  416. \@mkboth{%\vspace{-2cm}
  417. \MakeUppercase\listtablename}{\listtablename}}%
  418. \@starttoc{lot}%
  419. \parskip\ev}
  420. %
  421. % The expressions 'FIGURE' and 'TABLE' also appear in the LOF and LOT.
  422. \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname
  423. ext@#1\endcsname}{#1}{\protect\numberline{
  424. \csname #1name\endcsname \space
  425. % This is where the linespacing is changed in the list of tables. Mohammad Ahmad
  426. % \csname the#1\endcsname .}{\ignorespaces #2}\protect\vspace{\baselineskip}}\begingroup
  427. \csname the#1\endcsname .}{\ignorespaces #2}\protect\vspace{0.3\baselineskip}}\begingroup
  428.  
  429. \@parboxrestore
  430. \normalsize
  431. \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  432. \endgroup}
  433. %
  434. % A period should appear after the caption number.
  435. \long\def\@makecaption#1#2{%
  436. \vskip\abovecaptionskip
  437. \sbox\@tempboxa{#1. #2}%
  438. \ifdim \wd\@tempboxa >\hsize
  439. \centering{#1. #2}\par
  440. \else
  441. \global \@minipagefalse
  442. \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  443. \fi
  444. \vskip\belowcaptionskip}
  445. %
  446.  
  447. % The lines of LOF and LOT must not be dotted.
  448. \renewcommand\l@figure{\@dottedtocline{1}{0em}{6em}}
  449. \renewcommand\l@table{\@dottedtocline{1}{0em}{5.8em}}
  450. \def\@undottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
  451. \vskip \z@ plus.2\p@
  452. {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
  453. \parindent #2\relax\@afterindenttrue
  454. \interlinepenalty\@M
  455. \leavevmode
  456. \@tempdima #3\relax \advance\leftskip \@tempdima \hbox{}\hskip -\leftskip
  457. #4\nobreak\leaders\hbox{}\hfill \nobreak
  458. \hbox to\@pnumwidth{\hfil\reset@font\rm #5}
  459. % \\*[-2cm]
  460. \par}\fi}
  461.  
  462.  
  463. %
  464. % Table of Contents
  465. %
  466.  
  467.  
  468. %\renewcommand\contentsname{TABLE OF CONTENTS}
  469. %\renewcommand\tableofcontents{% \ev is used for temporary strage of \parskip
  470. %\setlength{\ev}{\parskip}
  471. %\parskip0pt
  472. % A line as 'TABLE OF CONTENTS' must not appear in the
  473. % Table of Contents. Hence we reproduce the \chapter* here except that
  474. % no entry is put into the toc file
  475. % \clearpage \global\@topnum\z@
  476. % \@afterindenttrue
  477. % \@makeschapterhead{\contentsname} \@afterheading
  478. %\@starttoc{toc}%
  479. %\parskip\ev}
  480. %
  481.  
  482. \renewcommand\contentsname{\vspace{-1.1cm}TABLE OF CONTENTS\vspace{-1.7cm}}
  483. \renewcommand\tableofcontents{% \ev is used for temporary storage of \parskip
  484. \setlength{\ev}{\parskip}
  485. \parskip0pt
  486. % A line as 'TABLE OF CONTENTS' must not appear in the
  487. % Table of Contents. Hence we reproduce the \chapter* here except that
  488. % no entry is put into the toc file
  489. \clearpage\global\@topnum\z@
  490. \@afterindenttrue
  491. \begin{center}
  492. { \normalfont
  493. \interlinepenalty\@M
  494. \vspace*{-0.2cm}\large \bfseries \contentsname\par\nobreak
  495. \vskip\baselineskip \vskip\baselineskip % *********** bir vskip fazladan koyduk
  496. }\end{center}
  497. \@afterheading
  498. \@starttoc{toc}%
  499. \parskip\ev}
  500.  
  501.  
  502. % EMU IGER style TOC does not have bold lines
  503. \renewcommand\l@chapter[2]{%
  504. \ifnum \c@tocdepth >\m@ne
  505. \addpenalty{-\@highpenalty}%
  506. %EMU IGER style TOC does not have extra space between chapterlines
  507. \vskip 0.5em \@plus\p@
  508. \setlength\@tempdima{1.5em}%
  509. \begingroup
  510. \parindent \z@ \rightskip \@pnumwidth
  511. \parfillskip -\@pnumwidth
  512. \leavevmode % That is what we have to comment out: \bfseries
  513. \advance\leftskip\@tempdima
  514. \hskip -\leftskip
  515. #1\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep
  516. mu$}\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
  517. \penalty\@highpenalty
  518. \endgroup
  519. \fi}
  520. %
  521. % The spacing of the TOC lines has been redefined.
  522. \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.em}}
  523. \renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{2.9em}}
  524. \renewcommand*\l@subsubsection{\@dottedtocline{3}{7em}{3.8em}}
  525. \renewcommand*\l@paragraph{\@dottedtocline{4}{11.1em}{4.7em}}
  526. \renewcommand*\l@subparagraph{\@dottedtocline{5}{16.1em}{5.7em}}
  527. %
  528. % Appendix
  529. %
  530. \renewcommand\appendix{\par
  531. \setcounter{chapter}{0}%
  532. \setcounter{section}{0}%
  533. \renewcommand\@chapapp{\appendixname}
  534. \renewcommand\thechapter{\@Alph\c@chapter}%
  535. \let\@app1
  536. }
  537. %
  538. % References
  539. %
  540. %\def\@biblabel#1{#1.} % This removes the square brackets AH
  541. %
  542. \newenvironment{harvardbibliography}{\chapter*{\bibname}%
  543. \begin{list}{}{\topsep0pt \leftmargin2em \rightmargin0pt
  544. \item indent-2em \item sep\parskip \parsep0pt}}
  545. {\def\@noitemerr
  546. {\@latex@warning{Empty `harvardbibliography' environment}}
  547. \end{list}}
  548. %
  549. \newenvironment{bibnotcited}[1]{\chapter*{\bibncname}%
  550. \list{\@biblabel{\@arabic\c@enumiv}}%
  551. {\settowidth\labelwidth{\@biblabel{#1}}%
  552. \leftmargin\labelwidth
  553. \advance\leftmargin\labelsep
  554. \@openbib@code
  555. \usecounter{enumiv}%
  556. \let\p@enumiv\@empty
  557. \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  558. \sloppy
  559. \clubpenalty4000
  560. \@clubpenalty \clubpenalty
  561. \widowpenalty4000%
  562. \sfcode`\.\@m}
  563. {\def\@noitemerr
  564. {\@latex@warning{Empty `bibnotcited' environment}}%
  565. \endlist}
  566. %
  567. \newenvironment{harvardbibnotcited}{\chapter*{\bibncname}%
  568. \begin{list}{}{\topsep0pt \leftmargin2em \rightmargin0pt
  569. \itemindent-2em \itemsep\parskip \parsep0pt}}
  570. {\def\@noitemerr
  571. {\@latex@warning{Empty `harvardbibnotcited' environment}}%
  572. \end{list}}
  573. \renewcommand{\bibname}{\vskip-1.3cm \hskip -0.65cm REFERENCES}
  574. \newcommand{\bibncname}{\vskip-1.3cm \hskip -0.65cm REFERENCES NOT CITED}
  575. %
  576. % Footnotes are numbered consecutively throughout the
  577. % whole thesis and single line-spacing is invoked
  578. %
  579. \def\footnote#1{%
  580. \@ifnextchar[{\@xfootnote}{%
  581. \setcounter{footnote}{\value{thsfootcnt}}%
  582. \addtocounter{thsfootcnt}{1}%
  583. \stepcounter{\@mpfn}%
  584. \begingroup\let\protect\noexpand
  585. \xdef\@thefnmark{\thempfn}\endgroup
  586. \let\baselinestretch\@singlespaced
  587. \@footnotemark\@footnotetext{#1}
  588. \let\baselinestretch\@onehalfspaced}
  589. }
  590. %
  591. % Single line spacing is required in in quotations
  592. %
  593. \renewenvironment{quotation}{%
  594. \par
  595. \list{}{%
  596. \let\baselinestretch\@singlespaced
  597. \listparindent 1.5em%
  598. \itemindent \listparindent
  599. \rightmargin \leftmargin
  600. \parsep \z@ \@plus\p@}%
  601. \item\relax}
  602. {\par
  603. \let\baselinestretch\@onehalfspaced
  604. \endlist}
  605. \renewenvironment{quote}{%
  606. \par
  607. \let\baselinestretch\@singlespaced
  608. \list{}{%
  609. \baselineskip0.67\baselineskip
  610. \listparindent 1.5em%
  611. \itemindent\listparindent
  612. \rightmargin\leftmargin}%
  613. \item\relax}
  614. {\par
  615. \let\baselinestretch\@onehalfspaced
  616. \endlist}
  617. %
  618. % Spacing for displayed formulas (redefine the \normalsize command
  619. % Note: In earlier implementations of LaTeX \@normalsize may need
  620. % to be redefined instead of \normalsize
  621. %
  622. \renewcommand{\normalsize}{\@setsize\normalsize{14.5pt}\xiipt\@xiipt
  623. \abovedisplayskip 20pt %\p@ plus3\p@ minus7\p@
  624. \belowdisplayskip \abovedisplayskip
  625. \abovedisplayshortskip \abovedisplayskip %\z@ plus3\p@
  626. \belowdisplayshortskip \abovedisplayskip %6.5\p@ plus3.5\p@ minus3\p@
  627. \let\@listi\@listI}
  628. %
  629. % Page style
  630. %
  631. \oddsidemargin 1.8cm
  632. \evensidemargin 2cm
  633. \topmargin -1.3cm
  634. %\headheight20pt
  635. \textwidth 140mm
  636. \textheight 246mm
  637. %\pagestyle{myheadings}
  638. %
  639. % Invoke double spacing
  640. \renewcommand{\baselinestretch}{2}
  641. \setlength{\parskip}{\baselineskip}
  642. %
  643. % This is end of emu_tez.sty
Last edited by Stefan Kottwitz on Sat May 27, 2017 1:56 pm, edited 1 time in total.
Reason: code marked

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9572
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat May 27, 2017 2:10 pm

Can you please post the preamble of your document?

When I test the code above, I don't get that issue. I created this small code for testing:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass{report}
  2. \usepackage{fancyhdr}
  3. \usepackage{blindtext}
  4. \usepackage{ths}
  5. \begin{document}
  6. \chapter{FIRST CHAPTER}
  7. \section{First section}
  8. \blindtext
  9. \section{Second section}
  10. \blindtext
  11. \end{document}


I got:

page.png
page.png (58.47 KiB) Viewed 2094 times


The page number is fine. Something is different in your code.

Stefan
LaTeX.org admin

feryee
Posts: 20
Joined: Sun Aug 09, 2015 12:57 pm

Postby feryee » Sat May 27, 2017 3:44 pm

Here is the main file:


Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. % This is a template for the fbe_tez.sty, v2.0 (and maybe later).
  2. %
  3. %
  4. \documentclass[12pt,epsfig,times]{report}
  5.  
  6. \usepackage{EMU_Thesis_ikeV2}
  7. \usepackage{graphicx,epsfig,times}
  8. \usepackage{epstopdf}
  9. \usepackage{amsmath}
  10. \usepackage{enumerate}
  11. \usepackage{booktabs,slashbox}
  12.  
  13. %
  14. % LaTeX 2.09 users: Replace the above two lines with the following line
  15. %\documentstyle[12pt,epsfig,EMU_Thesis,times]{report}
  16. %\usepackage{graphicx}
  17. %
  18. % Declarations
  19. %
  20. \title{to be decided\vspace{-2cm}}
  21.  
  22.  
  23. \author{i}
  24.  
  25.  
  26. % Declare relevant examiners
  27.  
  28. \InstituteDirector{ }
  29.  
  30. \DeptChair{}
  31.  
  32. \Dept{Electrical and Electronic Engineering}
  33.  
  34. \examineri{}
  35. \vspace{-1cm} \supervisor{}
  36. \examinerii{}
  37. %\examineriii{Prof. Dr. Runyi Yu}
  38. \vspace{-1cm} \cosuperi{i}
  39. %\examineriv{Assoc. Prof. Dr. Erhan \.{I}nce}
  40. \dateofapproval{}
  41.  
  42.  
  43. \begin{document}
  44. \pagenumbering{roman}
  45. % Choose the relevant one
  46. %\makemstitle % For M.S. theses
  47. \makephdtitle % For Ph.D. theses
  48. \makeapprovalpage
  49. \begin{center}
  50. \newpage
  51. \vspace*{10cm} \center{\textbf{}}
  52. \end{center}
  53.  
  54. %\makephdtitle
  55. \begin{abstract}
  56. \vspace{-2cm}
  57. \noindent
  58.  
  59. \par
  60. \noindent In recent years, sparse signal estimation has become an important paradigm in the field of signal processing due to their vast amount of applications. Among the wide range of applications, system identification and echo cancelations problems are likely one of the most challenging signal estimation for many practical channels with sparse nature. For such channels, due to low convergence speed and sensitivity to highly correlated inputs, conventional adaptive filtering algorithms such as recursive least-mean-square (LMS) and its variants, recursive least-squares (RLS) and Kalman filters are incapable of exploiting the channel sparsity. To overcome with difficulties associated with sparse system identification and echo cancelation, $l_0$-norm constraint LMS ($l_0$-LMS) modifies the conventional LMS algorithm to capture the sparsity. The modification results in a zero-point attraction to all filter-taps. The $l_0$-norm addition, however, causes the optimization problem to be non-convex and hence not tractable.
  61.  
  62. \end{abstract}
  63.  
  64. \begin{ozet}
  65. \end{ozet}
  66.  
  67.  
  68. \begin{acknowledgements}
  69. \vspace{-1cm}
  70. \noindent
  71. \end{acknowledgements}
  72.  
  73. \begin{center}
  74. \newpage
  75. \vspace*{9cm} \center{\textbf{Dedicated to my Family}}
  76. \end{center}
  77.  
  78.  
  79.  
  80.  
  81. \tableofcontents
  82. \listoffigures
  83. \listoftables
  84.  
  85. \begin{symbols}
  86.  
  87. \end{symbols}
  88.  
  89.  
  90. \chapter{INTRODUCTION}\label{ch1}
  91. \pagenumbering{arabic}
  92. \input{chapter1}
  93.  
  94. \chapter{ADAPTIVE FILTERS}\label{ch2}
  95. \input{chapter2}
  96.  
  97. \chapter{THE RECURSIVE INVERSE ADAPTIVE FILTERING ALGORITHM}\label{ch3}
  98. \input{chapter3}
  99.  
  100. %\chapter{SIMULATION RESULTS}\label{ch4}
  101. %\input{chapter4}
  102.  
  103. \chapter{CONCLUSIONS AND FUTURE WORK}\label{ch5}
  104. \input{conclusion}
  105.  
  106. \newpage
  107. \appendix \begin{centering} \large{{APPENDIX A}} \end{centering}
  108. \input{Appendix}
  109.  
  110. \begin{thebibliography}{9}
  111. \input{references}
  112. \end{thebibliography}
  113.  
  114.  
  115. \end{document}
Last edited by Stefan Kottwitz on Sat May 27, 2017 3:49 pm, edited 1 time in total.
Reason: inline LaTeX code changed to code block

User avatar
Stefan Kottwitz
Site Admin
Posts: 9572
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat May 27, 2017 3:54 pm

Do you need the epsfig package? Probably not.
I think it will fixed after you removed the line

\usepackage{epsfig}

Stefan
LaTeX.org admin

feryee
Posts: 20
Joined: Sun Aug 09, 2015 12:57 pm

Postby feryee » Sat May 27, 2017 4:18 pm

I have many .eps figures. So, i suppose it is needed. I am not which line you refer that needs to be removed explicitly.(I removed epsfig but it cant compile due to my eps figures) Beside, if you compile the main file that i sent to , you see the same problem in abstract pages on. Whenever i try to directly get dvi2pdf the editor asks for installing ttfont.map as part of zhmetrics. However, when i prompt for installing it gives an error "dvi2pdf returned exit code........." as you may see below. so every time i need to first do dvit ps first and then convert it to pdf. Is this problem related?

--------------------------------------------------------------------------------------------------------------------


Command Line: dvipdfmx.exe "Full_Thesis_v1.dvi"
Startup Folder: C:My PHD Thesis-spars\PhD_Thesis

Trying to make PK font ptmb8r at 1080 DPI...
Running miktex-makemf.exe...


Sorry, but miktex-makemf did not succeed for the following reason:



The ptmb8r source file could not be found.



The log file hopefully contains the information to get MiKTeX going again:



C:/Users/F/AppData/Local/MiKTeX/2.9/miktex/log/miktex-makemf.log



You may want to visit the MiKTeX project page, if you need help.

Running ttf2pk.exe...


======================================================================

starting package maintenance...

installation directory: "C:\Program Files (x86)\MiKTeX 2.9"

package repository: http://ctan.mirror.ftn.uns.ac.rs/system ... /packages/

lightweight database digest: 81b597402c6b3f02ad51e949de21f31e

going to download 35746 bytes

going to install 4939 file(s) (1 package(s))

downloading http://ctan.mirror.ftn.uns.ac.rs/system ... tar.lzma...

35746 bytes, 18.21 KB/Sec

extracting files from zhmetrics.tar.lzma...



Unfortunately, the package zhmetrics could not be installed.Please check the log file:

C:/Users/Farhad/AppData/Local/MiKTeX/2.9/miktex/log/ttf2pk.log

======================================================================

The PK font file C:\Users\Farhad\AppData\Local\MiKTeX\2.9\fonts/pk/modeless/adobe/times/dpi1080\ptmb8r.pk already exists.
Full_Thesis_v1.dvi -> Full_Thesis_v1.pdf
[1
dvipdfmx:warning: Could not locate a virtual/physical font for TFM "ptmb8r".
dvipdfmx:warning: >> There are no valid font mapping entry for this font.
dvipdfmx:warning: >> Font file name "ptmb8r" was assumed but failed to locate that font.
dvipdfmx:fatal: Cannot proceed without .vf or "physical" font for PDF output...

Output file removed.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9572
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat May 27, 2017 6:59 pm

Quick shot: the pdf paper width and height may be different to the one set with LaTeX to DVI. You could try:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \pdfpageheight=\paperheight
  2. \pdfpagewidth=\paperwidth


or

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \setlength{\pdfpagewidth}{\paperwidth}
  2. \setlength{\pdfpageheight}{\paperheight}


or using the geometry package.

Stefan
LaTeX.org admin

feryee
Posts: 20
Joined: Sun Aug 09, 2015 12:57 pm

Postby feryee » Sun May 28, 2017 1:15 pm

Thank you! resolved.
Regards


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 2 guests