LaTeX forum ⇒ Page LayoutNeed to start page numbering on page 2,4,6 or 8.

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Lumy
Posts: 24
Joined: Tue Jan 06, 2009 2:41 pm

Need to start page numbering on page 2,4,6 or 8.

Postby Lumy » Thu Aug 10, 2017 6:45 pm

Hi!


I have a problem: Need to start page numbering on page 2,4,6,8 "\firstpageno{8}" and after compile, the header (with journal title) don't appear.

If I set page 1,3,5,7,9 "\firstpageno{3}" header is Ok with journal title. Please see the code with journal style.

Can you help me?


Thank you in advance!


  1. \documentclass[twoside,11pt,leqno]{article}
  2.  
  3. \usepackage{journal2}
  4. \usepackage{amssymb}
  5. \usepackage{amsmath}
  6. \usepackage{amsfonts}
  7.  
  8. \usepackage{graphicx}
  9.  
  10. \itfjournalheading{N.}{35--}{2016 (1--12)}
  11.  
  12. \ShortHeadings{article}{authors}
  13. \firstpageno{3}
  14.  
  15. \begin{document}
  16. \title{..................}
  17.  
  18. \author{\name Author
  19. }
  20.  
  21.  
  22. \maketitle
  23.  
  24. \begin{abstract}
  25. ............
  26. \end{abstract}
  27.  
  28. \begin{keywords}
  29. ......................
  30. \end{keywords}
  31. \end{document}


Journal style
  1. \typeout{ July 2017.}
  2.  
  3. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  4. % REQUIRED PACKAGES
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6.  
  7. \RequirePackage{epsfig}
  8. \RequirePackage{amssymb}
  9. %\RequirePackage{natbib}
  10. \RequirePackage{graphicx}
  11.  
  12. %
  13. \renewcommand{\topfraction}{0.95}
  14. \renewcommand{\textfraction}{0.05}
  15.  
  16. \oddsidemargin .25in
  17. \evensidemargin .25in
  18. \marginparwidth 0.07 true in
  19.  
  20. \topmargin -0.5in
  21. \addtolength{\headsep}{0in}
  22. \textheight 21cm
  23. \textwidth 13.3cm
  24. \widowpenalty=10000
  25. \clubpenalty=10000
  26. \@twosidetrue \@mparswitchtrue \def\ds@draft{\overfullrule 5pt}
  27.  
  28. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  29. % S E C T I O N S
  30. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  31.  
  32.  
  33. \def\@startsiction#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
  34. \par \@tempskipa #4\relax
  35. \@afterindenttrue
  36. \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi
  37. \if@nobreak \everypar{}\else
  38. \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar
  39. {\@ssect{#3}{#4}{#5}{#6}}{\@dblarg{\@sict{#1}{#2}{#3}{#4}{#5}{#6}}}}
  40.  
  41. \def\@sict#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
  42. \def\@svsec{}\else
  43. \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname}\fi
  44. \@tempskipa #5\relax
  45. \ifdim \@tempskipa>\z@
  46. \begingroup #6\relax
  47. \@hangfrom{\hskip #3\relax\@svsec.\hskip 0.1em}
  48. {\interlinepenalty \@M #8\par}
  49. \endgroup
  50. \csname #1mark\endcsname{#7}\addcontentsline
  51. {toc}{#1}{\ifnum #2>\c@secnumdepth \else
  52. \protect\numberline{\csname the#1\endcsname}\fi
  53. #7}\else
  54. \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
  55. {#7}\addcontentsline
  56. {toc}{#1}{\ifnum #2>\c@secnumdepth \else
  57. \protect\numberline{\csname the#1\endcsname}\fi
  58. #7}}\fi
  59. \@xsect{#5}}
  60.  
  61. \def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
  62. \def\@svsec{}\else
  63. \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname\hskip 0.5em }\fi
  64. \@tempskipa #5\relax
  65. \ifdim \@tempskipa>\z@
  66. \begingroup #6\relax
  67. \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
  68. \endgroup
  69. \csname #1mark\endcsname{#7}\addcontentsline
  70. {toc}{#1}{\ifnum #2>\c@secnumdepth \else
  71. \protect\numberline{\csname the#1\endcsname}\fi
  72. #7}\else
  73. \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
  74. {#7}\addcontentsline
  75. {toc}{#1}{\ifnum #2>\c@secnumdepth \else
  76. \protect\numberline{\csname the#1\endcsname}\fi
  77. #7}}\fi
  78. \@xsect{#5}}
  79.  
  80. \def\thesection {\arabic{section}}
  81. \def\thesubsection {\thesection.\arabic{subsection}}
  82. \def\section{\@startsiction{section}{1}{\z@}{-0.24in}{0.10in}
  83. {\normalsize\bf\raggedright}}
  84. \def\subsection{\@startsection{subsection}{2}{\z@}{-0.20in}{0.08in}
  85. {\normalsize\bf\raggedright}}
  86. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-0.18in}{0.08in}
  87. {\normalsize\sc\raggedright}}
  88. \def\paragraph{\@startsiction{paragraph}{4}{\z@}{1.5ex plus
  89. 0.5ex minus .2ex}{-1em}{\normalsize\bf}}
  90. \def\subparagraph{\@startsiction{subparagraph}{5}{\z@}{1.5ex plus
  91. 0.5ex minus .2ex}{-1em}{\normalsize\bf}}
  92.  
  93. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  94. % A B S T R A C T
  95. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  96.  
  97. \renewenvironment{abstract}
  98. {\noindent{\normalsize\bf Abstract.}%
  99. \bgroup\leftskip 0pt\rightskip 0pt\small\noindent}%
  100. {\par\egroup\vskip 0.25ex}
  101.  
  102. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  103. % KEYWORDS
  104. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  105.  
  106.  
  107. \newenvironment{keywords}
  108. {\bgroup\leftskip 0pt\rightskip 0pt \small\noindent{\bf Keywords:} }%
  109. {\par\egroup\vskip 0.25ex}
  110.  
  111. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  112. % FIRST PAGE, TITLE, AUTHOR
  113. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  114.  
  115.  
  116. \newlength\aftertitskip \newlength\beforetitskip
  117. \newlength\interauthorskip \newlength\aftermaketitskip
  118.  
  119. \setlength\aftertitskip{0.1in plus 0.2in minus 0.2in}
  120. \setlength\beforetitskip{0.05in plus 0.08in minus 0.08in}
  121. \setlength\interauthorskip{0.08in plus 0.1in minus 0.1in}
  122. \setlength\aftermaketitskip{0.3in plus 0.1in minus 0.1in}
  123.  
  124. \def\maketitle{\par
  125. \begingroup
  126. \def\thefootnote{\fnsymbol{footnote}}
  127. \def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}}
  128. \@maketitle \@thanks
  129. \endgroup
  130. \setcounter{footnote}{0}
  131. \let\maketitle\relax \let\@maketitle\relax
  132. \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}
  133.  
  134. \def\@startauthor{\noindent \normalsize\bf}
  135. \def\@endauthor{}
  136.  
  137. \def\@maketitle{\vbox{\hsize\textwidth
  138. \linewidth\hsize \vskip \beforetitskip
  139. {\begin{flushleft} \large\bf \@title \par \end{flushleft}} \vskip \aftertitskip\vskip \aftertitskip\vskip \aftertitskip\vskip \aftertitskip
  140. {\def\and{\unskip\enspace{\rm and}\enspace}%
  141. \def\addr{\small\it}%
  142. \def\email{\small\it}%
  143. \def\name{\normalsize\bf}%
  144. \def\AND{\@endauthor\rm\hss \vskip \interauthorskip \@startauthor}
  145. \@startauthor \@author \@endauthor}
  146.  
  147. \vskip \aftermaketitskip
  148. }}
  149.  
  150. \def\firstpageno#1{\setcounter{page}{#1}}
  151.  
  152. \def\itfjournalheading#1#2#3{\def\ps@itfjournaltps{\let\@mkboth\@gobbletwo%
  153. \def\@oddhead{\scriptsize JOURNAL TITLE -- #1\,#2#3 \hfill \small\thepage}%
  154. \def\@evenhead{}\def\@evenfoot{}}%
  155. \thispagestyle{itfjournaltps}}
  156.  
  157.  
  158. \def\ShortHeadings#1#2{\def\ps@itfjournalps{\let\@mkboth\@gobbletwo%
  159. \def\@oddhead{\noindent {\scriptsize\sc #1} \hfill\thepage}%
  160. \def\@oddfoot{\hfill \scriptsize\rm \hfill}%
  161. \def\@evenhead{\noindent {\scriptsize\sc #2} \hfill\thepage}%
  162. \def\@evenfoot{\hfill \scriptsize\rm \hfill}}%
  163. \pagestyle{itfjournalps}}
Last edited by Lumy on Fri Aug 11, 2017 10:36 am, edited 2 times in total.

User avatar
thomasb
Posts: 76
Joined: Thu Aug 03, 2017 10:54 am
Location: france

Postby thomasb » Thu Aug 10, 2017 9:51 pm

It doesn't compile... Post a compiling example !

Lumy
Posts: 24
Joined: Tue Jan 06, 2009 2:41 pm

Postby Lumy » Fri Aug 11, 2017 9:54 am

download/file.php?mode=view&id=9892

This is example. Thank you!
Attachments
odd numbers.pdf
(6.6 KiB) Downloaded 19 times
even numbers.pdf
(3.97 KiB) Downloaded 5 times

Lumy
Posts: 24
Joined: Tue Jan 06, 2009 2:41 pm

Postby Lumy » Fri Aug 11, 2017 10:35 am

Problem resolved. Thank you!


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 1 guest