
나는 이 머리를 너무 오랫동안 잡아당겼기 때문에 이제 내가 어디에서 잘못했는지에 대해 도움을 요청하고 있습니다.
최소 작업 예:
\documentclass[12pt,a4paper,twoside]{report}
\usepackage{newxjobb}
\usepackage[swedish]{babel} % date format and hyphenation rules(?)
\selectlanguage{swedish}
\usepackage{blindtext}
%--------------------
% Four subsections
\usepackage{titlesec}
\setcounter{secnumdepth}{4}
% Fugly hack to remove section numbers in ToC
\renewcommand{\thesection}{}
\renewcommand{\thesubsection}{}
\renewcommand{\thesubsubsection}{}
%-------------------- Remove section numbering
\makeatletter
\renewcommand{\@seccntformat}[1]{}
\makeatother
%--------------------
\begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagenumbering{roman}
\pagestyle{empty} % Empty until the abstract
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page
\hfil\hspace*{-4mm}
\begin{minipage}{100mm}
\center {
\vbox to 56mm{\vfil\LARGE\textbf{Shiny Title}}}
\vspace*{2.5mm}
\textbf{Things and stuff} \\
\vspace*{7mm}
\textbf{\large Mr. Name Nameson} \\
City 2019 \\
\vspace*{7mm}
Should you fancy something erronious, drop a mail: \\
[email protected]
\end{minipage}\hfil
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\thispagestyle{empty}
\setcounter{page}{0}
\tableofcontents
%-------------------- Document start
\pagenumbering{arabic}
\pagestyle{fancy}
\chapter{Foo}
\blindtext
\subsection{asdf0}
\subsection{asdf1}
\subsection{asdf2}
\subsection{asdf3}
\subsection{asdf4}
\subsection{asdf5}
\subsection{asdf6}
\subsection{asdf7}
\subsection{asdf8}
\subsection{asdf9}
\chapter{Bar}
\blindtext[2]
\subsection{asdf0}
\subsection{asdf1}
\subsection{asdf2}
\subsection{asdf3}
\subsection{asdf4}
\subsection{asdf5}
\subsection{asdf6}
\subsection{asdf7}
\subsection{asdf8}
\subsection{asdf9}
\chapter{Gazonk}
\blindtext[3]
\subsection{asdf0}
\subsection{asdf1}
\subsection{asdf2}
\subsection{asdf3}
\subsection{asdf4}
\subsection{asdf5}
\subsection{asdf6}
\subsection{asdf7}
\subsection{asdf8}
\subsection{asdf9}
\end{document}
다음 내용으로 PDF를 생성합니다.
"newxjobb" 패키지는 일부 학생들이 우리 교수진에서 사용하는 비표준 패키지(내가 만든 것이 아님)이므로 오류가 있을 경우를 대비해 여기에 추가합니다. 이 패키지는 항상 영어 문서와 함께 사용되어 왔으며 내 문서는 스웨덴어를 사용한 첫 번째 문서입니다. 그것이 문제의 원인이라면 나는 모른다.
패키지 "newxjobb":
% Package file with options making me feel better...
% (Author: Stefan Langemark)
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{newxjobb}[2018/11/16 *** To be reviewed! ***]
\RequirePackage{parskip}
\RequirePackage{geometry}
\RequirePackage[T1]{fontenc} % ... the following line doesn't make much sense
% without this one
\RequirePackage[utf8]{inputenc}
\RequirePackage{fancyhdr}
%
%--------------------------------
% Paper layout
% (no room for margin notes)
%--------------------------------
%
% paper=b5paper,
\geometry{
paperwidth = 165mm, paperheight = 240mm,
% paper = a4paper,
total = {130mm,200mm},
% marginparsep = 2mm,
% marginparwidth = 15mm,
includemp = false,
%twosideshift = 10pt
}
\addtolength{\headheight}{10pt} % ??? (use "\geometry{...}" instead!)
%-------------------------------
% Header/Footer
%-------------------------------
\pagenumbering{arabic}
\renewcommand{\headrulewidth}{0.4pt}
\fancyhf{}
\fancyhead[RO]{\bfseries\leftmark}
\fancyhead[LE]{\bfseries\rightmark}
\fancyhead[RO,LE]{\bfseries\thepage}
\pagestyle{fancy}
\fancypagestyle{headings}{%
\fancyhf{}%
\renewcommand{\headrulewidth}{0pt}
}
%
%-------------------------------------
% Redefine {chapter,section}mark to
% remove ugly all-uppercase
%-------------------------------------
%
% feck off
\renewcommand{\chaptermark}[1]{\markboth{\bfseries ARNE}{HEJHEJ}}
\renewcommand{\sectionmark}[1]{\markright{\bfseries \chaptername\ \thechapter.\enspace #1}}
%
%-------------------------------
% Redefining section styles
% to suit parskip > 0
%-------------------------------
%
%\addtocounter{secnumdepth}{1}% Number subsubsections too
%\addtocounter{tocdepth}{1}% Include subsections in table of contents.
\renewcommand\section{\@startsection%
{section}%
{1}%
{\z@}%
{-2.5ex \@plus -1ex \@minus -.2ex}%
{1.3ex \@plus.2ex}%
{\normalfont\Large\bfseries}%
}
\renewcommand\subsection{\@startsection%
{subsection}%
{2}%
{\z@}%
{-2.25ex\@plus -1ex \@minus -.2ex}%
{0.5ex \@plus .2ex}%
{\normalfont\large\bfseries}%
}
\renewcommand\subsubsection{\@startsection%
{subsubsection}%
{3}%
{\z@}%
{-2.25ex\@plus -1ex \@minus -.2ex}%
{0.1pt \@plus .2ex}%
{\normalfont\mdseries\large\itshape}%
}
%
%
\renewcommand\tableofcontents{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\contentsname}%
\markboth{\contentsname}{\contentsname}%
\@starttoc{toc}%
\if@restonecol\twocolumn\fi
}
\renewcommand\listoffigures{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\listfigurename}%
\markboth{\listfigurename}{\listfigurename}%
\@starttoc{lof}%
\if@restonecol\twocolumn\fi
}
\renewcommand\listoftables{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\listtablename}%
\markboth{\listtablename}{\listtablename}%
\@starttoc{lot}%
\if@restonecol\twocolumn\fi
}
%
%-------------------------------------------
% Chapter (stolen from Kluwer book style)
%-------------------------------------------
%
\newcommand*\chapnumber{% chapter number
\fontsize{50}{60}%
\usefont{T1}{lmr}{bx}{n}%
}
\newcommand*\chaptitle{% chapter title
\fontsize{20}{24}%
\usefont{T1}{lmr}{bx}{n}%
}
\def\bigraggedleft{\leftskip0pt plus1fil\relax}
\def\@makechapterhead#1{%\null\vskip-5pc
\vbox to 8pc{\hbox to\textwidth{\hfill\chapnumber\thechapter}
\hyphenpenalty=10000 % No hyphenation in chapter heads
\vskip8pt
\hrule height 2.5pt
\vskip12pt\vskip-\parskip
\def\\ {\vskip-\parskip}\parfillskip=0pt
\bigraggedleft
\chaptitle{\def\\ {\vskip-\parskip}#1}\vskip1sp
\vfill}}
\def\@makeschapterhead#1{\vbox to 7.5pc{
\hrule height 1.5pt
\hyphenpenalty=10000 % No hyphenation in chapter heads
\vskip12pt\vskip-\parskip
\def\\ {\vskip-\parskip}\parfillskip=0pt
\bigraggedleft
\chaptitle{#1}\vskip1sp\vfill}}
% END newxjobb-package
번호 매기기 문제가 왜 발생하는지 알 수 없어 이제 검색을 포기했습니다.
내가 명백한 실수를 한 걸까?
답변1
당신은
\begin{document}
\pagenumbering{roman}
\pagestyle{empty} % Empty until the abstract
% Title page
\hfil\hspace*{-4mm}
\begin{minipage}{100mm}
\center {
\vbox to 56mm{\vfil\LARGE\textbf{Shiny Title}}}
\vspace*{2.5mm}
\textbf{Things and stuff} \\
\vspace*{7mm}
\textbf{\large Mr. Name Nameson} \\
City 2019 \\
\vspace*{7mm}
Should you fancy something erronious, drop a mail: \\
[email protected]
\end{minipage}\hfil
\clearpage
\thispagestyle{empty}
\setcounter{page}{0}
\tableofcontents
%-------------------- Document start
\pagenumbering{arabic}
\pagestyle{fancy}
몇 가지 불일치가 있습니다.
첫 번째는 \pagenumbering{roman}
더 좋을 것입니다 \pagenumbering{Alph}
(추가할 때 이유를 이해하게 될 것입니다 hyperref
).
다음 \setcounter{page}{0}
으로 \clearpage\pagenumbering{roman}
및 \pagenumbering{arabic}
을(를) 변경합니다 \clearpage\pagenumbering{arabic}
.
뭐가 문제 야? 당신의 \pagenumbering{arabic}
것을 찾았습니다~ 전에TeX는 목차의 마지막 페이지를 배출했으므로 해당 페이지의 번호는 1이 됩니다.
또한 \pagestyle{fancy}
이전에 이동해야 합니다 \tableofcontents
.
그건 그렇고, 섹션과 하위 섹션에 번호를 매기고 싶지 않다면 발행하는 것이 훨씬 쉽습니다.
\setcounter{secnumdepth}{0} % only numbers chapters
다음은 편집된 버전입니다.
\documentclass[12pt,a4paper,twoside]{report}
\usepackage{newxjobb}
\usepackage[swedish]{babel} % date format and hyphenation rules(?)
\usepackage{blindtext}
%--------------------
% Four subsections
\usepackage{titlesec}
\setcounter{secnumdepth}{0}
\begin{document}
\pagenumbering{Alph}
\pagestyle{empty} % Empty until the abstract
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page
\begin{center}
{\LARGE\textbf{Shiny Title}\\}
\textbf{Things and stuff} \\[7mm]
{\large\textbf{Mr. Name Nameson} \\}
{\large City 2019 \\[7mm]}
Should you fancy something erroneous, drop a mail: \\
[email protected]
\end{center}
\clearpage
\pagenumbering{roman}
\pagestyle{fancy}
\tableofcontents
%-------------------- Document start
\clearpage
\pagenumbering{arabic}
\chapter{Foo}
\blindtext
\subsection{asdf0}
\subsection{asdf1}
\subsection{asdf2}
\subsection{asdf3}
\subsection{asdf4}
\subsection{asdf5}
\subsection{asdf6}
\subsection{asdf7}
\subsection{asdf8}
\subsection{asdf9}
\chapter{Bar}
\blindtext[2]
\subsection{asdf0}
\subsection{asdf1}
\subsection{asdf2}
\subsection{asdf3}
\subsection{asdf4}
\subsection{asdf5}
\subsection{asdf6}
\subsection{asdf7}
\subsection{asdf8}
\subsection{asdf9}
\chapter{Gazonk}
\blindtext[3]
\subsection{asdf0}
\subsection{asdf1}
\subsection{asdf2}
\subsection{asdf3}
\subsection{asdf4}
\subsection{asdf5}
\subsection{asdf6}
\subsection{asdf7}
\subsection{asdf8}
\subsection{asdf9}
\end{document}
마지막 댓글:잘못된는, 어,잘못된.