제목에서 알 수 있듯이 두 번째 페이지 이후에는 머리글과 바닥글이 무작위로 사라집니다.
이것은 내 서문입니다.
% !TeX spellcheck = hr_HR
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[
backend=bibtex % biber or bibtex
,style=numeric-comp % numerical-compressed
,sorting=none % no sorting
,sortcites=true % some other example options ...
,block=none
,indexing=false
,citereset=none
,isbn=true
,url=true
,doi=true % prints doi
,natbib=true % if you need natbib functions
]{biblatex}
\addbibresource{bibliografija.bib}
\nocite{*}
\usepackage{fancyhdr}
\usepackage{indentfirst}
\usepackage{setspace}
\usepackage[croatian]{babel}
\ifx\l@croatian\@undefined
\@nopatterns{Croatian}
\adddialect\l@croatian0\fi
\captionscroatian
\usepackage{graphicx}
\graphicspath{ {img/} }
\renewcommand{\contentsname}{Sadržaj}
\title{MVC arhitektura unutar AngularJS razvojnog okvira}
\author{Marko Klobučar}
\date{Lipanj, 2017.}
머리글과 바닥글을 시작하기 위해 실행한 명령은 다음과 같습니다.
\pagestyle{fancy}
\fancyhf{}
\lhead{Sveučilište Sjever - Multimedija, oblikovanje i primjena}
\rhead{Marko Klobučar}
\rfoot{Stranica \thepage~od~\pageref{lastpage}}
\pagenumbering{arabic}
그리고 모든 것이 전체 두 페이지에 적합합니다. 그러다가 실제 6번째 페이지에서 갑자기 머리글과 바닥글이 사라집니다. 하지만 세 번째 번호가 매겨진 페이지입니다.
이전에 답변이 있었다면 정말 죄송합니다. 지금 한 시간 동안 검색했는데 원하는 내용을 찾을 수 없었습니다. 저는 또한 라텍스의 완전한 초보자이므로 도움을 주시면 감사하겠습니다.
미리 감사드립니다! 제가 잊어버린 내용을 포함해야 하는지 알려주시기 바랍니다.
편집하다: 여기 작은 문서가 있습니다.
% !TeX spellcheck = hr_HR
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
%\usepackage[
% backend=bibtex
%]{biblatex}
% \addbibresource{bibliografija.bib}
% \nocite{*}
\usepackage{fancyhdr}
\usepackage{indentfirst}
\usepackage{setspace}
\usepackage[croatian]{babel}
\ifx\l@croatian\@undefined
\@nopatterns{Croatian}
\adddialect\l@croatian0\fi
\captionscroatian
\usepackage{graphicx}
\graphicspath{ {img/} }
\renewcommand{\contentsname}{Sadržaj}
\title{Title}
\author{Me}
\date{Now}
\begin{document}
\pagestyle{empty}
\pagenumbering{gobble}
\begin{titlepage}
\maketitle
\end{titlepage}
\newpage
\tableofcontents
\newpage
\begin{spacing}{1.5}
\section*{Lorem ipsum.}
Lorem ipsum.
\newpage
\pagestyle{fancy}
\fancyhf{}
\lhead{Header left}
\rhead{John Doe}
\rfoot{Page \thepage~of~\pageref{lastpage}}
\pagenumbering{arabic}
\section{Sažetak}
Lorem ipsum dolor sit amet.
\newpage
\section{Uvod}
Lorem ipsum dolor sit amet.
\newpage
\section{Trouble!}
\subsection{This part is messed up.}
This section is where the header and footer disappear.
\subsection{Lorem ipsum.}
Lorem ipsum.
\end{spacing}
\newpage
\section{Popis literature}
\label{lastpage}
\vspace*{-1cm}
% \printbibliography[title=~]
\end{document}
답변1
가능한 두 가지 간단한 코드는 다음과 같습니다.
- 환경 을 사용 하고 바로 앞에
{spacing}{1.5}
마지막 명령을 입력 하고 바로 뒤에 반복해야 합니다 .\newpage
\end{spacing}
\pagestyle{fancy}
\onehalfspacing
또는 명령 을 사용\end{spacing}
하고\singlespacing
.
관련 부분의 코드는 다음과 같습니다.
환경:
\begin{spacing}{1.5}
\section*{Predgovor}
Here's some text.
\newpage
\pagestyle{fancy}
\pagenumbering{arabic}
\section{Sažetak}
Lorem ipsum dolor sit amet.
\newpage
\section{Uvod}
Lorem ipsum dolor sit amet.
\newpage
\section{O tehnologiji}
\subsection{O pojmu arhitekture u softverskom razvoju}
Here's some text.
\subsection{Opis MVC arhitekture}
Here's some text.
\newpage
\end{spacing}
\pagestyle{fancy}
\section{Popis literature}
\label{lastpage}
\vspace*{-1cm}
\printbibliography[title=Bib]
다음 명령을 사용하세요.
\onehalfspacing
\section*{Predgovor}
Here's some text.
\newpage
\pagestyle{fancy}
\pagenumbering{arabic}
\section{Sažetak}
Lorem ipsum dolor sit amet.
\newpage
\section{Uvod}
Lorem ipsum dolor sit amet.
\newpage
\section{O tehnologiji}
\subsection{O pojmu arhitekture u softverskom razvoju}
Here's some text.
\subsection{Opis MVC arhitekture}
Here's some text.
\newpage
\singlespacing
\section{Popis literature}
\label{lastpage}
\vspace*{-1cm}
\printbibliography[title=Bib]
답변2
내 문제를 해결했습니다. 문제는 간격 섹션이 끝난 직후 머리글과 바닥글이 끝났기 때문에 수동으로 줄 바꿈을 했더니 이제 작동합니다. 최소한의 코드는 다음과 같습니다.
% !TeX spellcheck = hr_HR
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[
backend=bibtex
]{biblatex}
\addbibresource{bibliografija.bib}
\nocite{*}
\usepackage{fancyhdr}
\usepackage{indentfirst}
\usepackage{setspace}
\usepackage[croatian]{babel}
\ifx\l@croatian\@undefined
\@nopatterns{Croatian}
\adddialect\l@croatian0\fi
\captionscroatian
\usepackage{graphicx}
\graphicspath{ {img/} }
\renewcommand{\contentsname}{Sadržaj}
\title{Here's some text.}
\author{Here's some text.}
\date{Lipanj, 2017.}
\fancyhf{}
\lhead{Here's some text.}
\rhead{Here's some text.}
\rfoot{Stranica \thepage~od~\pageref{lastpage}}
\begin{document}
\pagestyle{empty}
\pagenumbering{gobble}
\begin{titlepage}
\maketitle
\newpage
\tableofcontents
\newpage
\end{titlepage}
\begin{spacing}{1.5}
\section*{Predgovor}
Here's some text.
\newpage
\end{spacing}
\begin{spacing}{1.5}
\pagestyle{fancy}
\pagenumbering{arabic}
\section{Sažetak}
Lorem ipsum dolor sit amet.
\newpage
\section{Uvod}
Lorem ipsum dolor sit amet.
\newpage
\section{O tehnologiji}
\subsection{O pojmu arhitekture u softverskom razvoju}
Here's some text.
\subsection{Opis MVC arhitekture}
Here's some text.
\end{spacing}
\newpage
\pagestyle{fancy}
\section{Popis literature}
\label{lastpage}
\vspace*{-1cm}
\printbibliography[title=~]
\end{document}
가장 예쁜 것은 아니지만 내가 원했던 대로 작동하고 그것만으로도 충분합니다.
답변3
편집하다 이제 문제가 보입니다. 다음 솔루션이 귀하에게 적합한지 확인하십시오.
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{indentfirst}
\usepackage{setspace}
\usepackage[croatian]{babel}
\renewcommand{\contentsname}{Sadržaj}
\title{Title}
\author{Me}
\date{Now}
\fancyhf{}% head to be in preamble !
\lhead{Header left}
\rhead{John Doe}
\rfoot{Page \thepage~of~\pageref{lastpage}}
\begin{document}
\pagestyle{fancy}
\thispagestyle{empty}
\pagenumbering{gobble}
\begin{titlepage}
\maketitle
\end{titlepage}
\newpage
\thispagestyle{plain}% or empty)
\tableofcontents
\newpage
\thispagestyle{plain}% or empty)
\begin{spacing}{1.5}
\section*{Lorem ipsum.}
Lorem ipsum.
\newpage
\section{Sažetak}
Lorem ipsum dolor sit amet.
\newpage
\newpage
\section{Uvod}
Lorem ipsum dolor sit amet.
\newpage
\section{Trouble!}
\subsection{This part is messed up.}
This section is where the header and footer disappear.
\subsection{Lorem ipsum.}
Lorem ipsum.
\end{spacing}
\newpage
%\thispagestyle{empty} % addin case if the Literature had not have fancypage style
\section{Popis literature}
\label{lastpage}
\end{document}