Discussion:
How to get rid of random blank pages? No errors?
(too old to reply)
a***@hotmail.co.uk
2017-06-28 19:04:06 UTC
Permalink
Raw Message
This wasn't my code originally. But it looked amazing so i wanted to try and improve on it, as is the ways of coding.

The Original problem was to start with roman numbering (i-iii), then Arabic page numbering (1-5) and then continue the roman numbering (vi-vii) so that the Bibliography and Appendix appear in the table of contents.

The only problem i have found with this code is with the "NEW CODE FOR \mainmatter AND \backmatter".

This does solve the original problem. However the moment you include \backmatter into the document you gain random blank pages and strange errors without error code.

I believe this new code to be the problem and would appreciate the help to make this a fine piece of Latex for any future users.

Here it is:

\documentclass[12pt, oneside]{book}

\usepackage{sectsty,fancyhdr}
\sectionfont{\LARGE\bfseries}
\usepackage{geometry}

\usepackage{lipsum}%remove

% *******************************Margin Settings*******************************

\geometry{% margin settings, has to go first before \pagestyle{}
paper=a4paper,
inner=2.5cm, % Inner margin
outer=2.5cm, % Outer margin
bindingoffset=0.0cm, % Binding offset
top=2.5cm, % Top margin
bottom=2.5cm, % Bottom margin
headsep=4.5mm,% controles header
footskip=7.4mm,% controles footer
%showframe,% show how the type block is set on the page
}

% ***************************Header/Footer Settings****************************

\sectionfont{\LARGE\bfseries}%this will keep the formattings of sections
\pagestyle{fancy}
\fancyhf{} % sets all head and foot elements empty.
\rhead{} % right side of upper footer
\lhead{Project title} %left side
\renewcommand{\headrulewidth}{2.0pt} % Width of the top line
\renewcommand{\footrulewidth}{1.0pt} % Bottom line
\setlength{\headheight}{14.5pt}%used to remove the \fancyhf{} \headheight error
\rfoot{Page \thepage} % vice versa with the page number
\lfoot{\leftmark} % Should show the name of section



\makeatletter
\renewcommand{\sectionmark}[1]{%this avoids the \makecaptical of footers
\markboth{\ifnum \***@secnumdepth>\z@ %this allowes symbols in foorters
\thesection\hskip 1em\relax
\fi #1}{}}
\makeatother

% ***************************title Settings****************************

\newcommand{\mytitle}{

\begin{center}
{\Huge{\textbf{Project of...}}}
\end{center}

\begin{center}
\textsc{\Large My name}\\[0.5cm]
\end{center}

\begin{center}
{\large My ID number}\\[0.5cm]
\end{center}

}

% ********************************NEW CHAPTER PAGE SETTING*********************
\fancypagestyle{chapterstart}{% 1st page of the chapters, i.e. no new page for chapter
}
\makeatletter

\def\chapter{
\pagestyle{chapterstart}
\secdef\@chapter\@schapter}

\renewcommand\thesection{\@arabic\***@section}

\makeatother
% ********************************CHAPTER STYLE SETTING***********************
\usepackage{geometry}
\usepackage[T1]{fontenc}
\usepackage{graphicx}%**change
% replace color by xcolor (both are for color support, but xcolor is used in code 2 preamble)
\usepackage{titlesec,xcolor} %remove blindtext after
\definecolor{gray75}{gray}{0.65} %1=white, 0=black
\newcommand{\hsp}{\hspace{20pt}} %spacing between line and text
\titleformat{\chapter}[hang]{\vspace*{-2em}\Huge\bfseries}{\scalebox{1} {\thechapter}\hsp\textcolor{gray75}{|}\hsp}{0pt}{} %spacing across entire page %CHANGES** \scalebox{2}{}**3pt, **\vspace{+ down - up}
\titlespacing{\chapter}{0pt}{50pt}{30pt} %change{right}{shift down}{tile and text}

%------------------------TABLE OF CONTENTS SESSTINGS-------------------------------------

\renewcommand\contentsname{CONTENTS}
\renewcommand\listtablename{LIST OF TABLES}
\renewcommand\listfigurename{LIST OF FIGURES}
% added \protect\noindent to remove \parindent from table header
\addtocontents{toc}{{\protect\noindent\bfseries Contents\hfill Page No.\bigskip\par}}
\addtocontents{lot}{{\protect\noindent\bfseries No.\hfill Title\hfill\hfill Page No.\bigskip\par}}
\addtocontents{lof}{{\protect\noindent\bfseries No.\hfill Title\hfill\hfill Page No.\bigskip\par}}

\usepackage[titles]{tocloft}
% xcolor removed, because it's loaded above
\usepackage{xpatch}
\renewcommand\cftbeforechapskip{0ex}
\renewcommand\cftchapfont{\mdseries}
\renewcommand\cftchappagefont{\mdseries}
\renewcommand\cftchappresnum{Chapter~}
\renewcommand\cftchapaftersnum{: }
\newlength\tocindent
\settowidth\tocindent{\cftchapfont\cftchappresnum9\cftchapaftersnum}
\edef\cftchapnumwidth{\the\tocindent}
\edef\cftsecindent{\the\tocindent}
\advance\tocindent2.3em
\edef\cftsubsecindent{\the\tocindent}
\advance\tocindent3.2em
\edef\cftsubsubsecindent{\the\tocindent}
\renewcommand\cftsecdotsep{\cftnodots}
\renewcommand\cftsubsecdotsep{\cftnodots}
\renewcommand\cftsubsubsecdotsep{\cftnodots}
\newcommand\tocmainmatter
{\renewcommand\cftchappagefont{\color{white}}%
}
\xapptocmd\mainmatter{\addtocontents{toc}{\protect\tocmainmatter}}{}{}

% centers \chapter* headers
% if unwanted comment out ...
\newif\ifschaptertoc
\makeatletter
\renewcommand\@makeschapterhead[1]%
{{\parindent \z@ \centering
\normalfont
\interlinepenalty\@M
\Large \bfseries #1\par\nobreak
\vskip 20\p@
}%
\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}%
\ifschaptertoc
\addcontentsline{toc}{chapter}{#1}%
\fi
}
\makeatother
% ... to here



%dots
\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}} % for parts
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % for chapters
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}} % for sections
\renewcommand{\cftsubsecleader}{\cftdotfill{\cftdotsep}} % for subsection


%**************NEW CODE FOR \mainmatter AND \backmatter*************
\newcounter{fmpage}
\makeatletter

\renewcommand\mainmatter{%
  \clearpage
  \setcounter{fmpage}{\value{page}}%
  \message{page is \thefmpage}
  \@mainmattertrue
  \pagenumbering{arabic}}

\renewcommand\backmatter{%
  \clearpage
  \@mainmatterfalse
  \markright{}%
  \pagenumbering{roman}%
  \setcounter{page}{\value{fmpage}}}
\makeatother


%------------------------------------------------------------------

% Begin Project

%------------------------------------------------------------------

\begin{document}

\frontmatter %starts roman number.
\schaptertoctrue %includes contents in table of contents


\tableofcontents

\newpage
\listoftables

\newpage
\listoffigures


%-------------------------------Title-------------------------------
\mainmatter %arabaic numbers

\newpage
\mytitle

%------------------------------Begin--------------------------------

\chapter{Chapter 1}
\section{Section 1}
\subsection{Subsection 1}
\lipsum

\newpage
\chapter{Chapter 2}
\section{Section 1}
\subsection{Subsection 1}
\lipsum



\backmatter %continue roman numbers

\newpage
\begin{thebibliography}{59}

\bibitem{Refernce code}
Author.
\emph{``title of document"},
Document Information.

\end{thebibliography}

\newpage
\chapter*{Appendix}
\section*{Not important information}
\lipsum



%------------------------------------------------------------------

% end Project

%------------------------------------------------------------------


\end{document}
Peter Flynn
2017-06-28 21:14:25 UTC
Permalink
Raw Message
Post by a***@hotmail.co.uk
This wasn't my code originally. But it looked amazing so i wanted to
try and improve on it, as is the ways of coding.
The Original problem was to start with roman numbering (i-iii), then
Arabic page numbering (1-5) and then continue the roman numbering
(vi-vii) so that the Bibliography and Appendix appear in the table
of contents.
As I pointed out in my original reply, the Appendix is misplaced and
should appear after the chapters, if you are using traditional layout.

If you want to keep it after the Bibliography, you must add \appendix
before the Appendix, and then use the \chapter command to get a lettered
appendix ("A").
Post by a***@hotmail.co.uk
The only problem i have found with this code is with the "NEW CODE
FOR \mainmatter AND \backmatter".
This does solve the original problem.
That is why I posted it.
Post by a***@hotmail.co.uk
However the moment you include
\backmatter into the document you gain random blank pages and
strange errors without error code.
Not when I processed it. Can you please process the file as I sent it
and describe what errors you get?
Post by a***@hotmail.co.uk
I believe this new code to be the problem and would appreciate the
help to make this a fine piece of Latex for any future users.
[snip]

I get no errors and no blank pages when I process your file. I added the
\listfiles command immediately before \begin{document} and this is what
Post by a***@hotmail.co.uk
*File List*
book.cls 2014/09/29 v1.4h Standard LaTeX document class
bk12.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
sectsty.sty 2002/02/25 v2.0.2 Commands to change all sectional heading styles
fancyhdr.sty
geometry.sty 2010/09/12 v5.6 Page Geometry
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
lipsum.sty 2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
graphicx.sty 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR)
trig.sty 2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
titlesec.sty 2016/03/15 v2.10.1 Sectioning titles
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
tocloft.sty 2013/05/02 v2.3f parameterised ToC, etc., typesetting
xpatch.sty 2012/10/02 v0.3 Extending etoolbox patching commands
expl3.sty 2016/01/19 v6377 L3 programming layer (loader)
expl3-code.tex 2016/01/19 v6377 L3 programming layer
l3pdfmode.def 2015/11/11 v6250 L3 Experimental driver: PDF mode
xparse.sty 2016/01/19 v6377 L3 Experimental document command parser
etoolbox.sty 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
supp-pdf.mkii
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf
grfext.sty 2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
If you do the same and then compare your list with mine, it may help
find the problem.

///Peter
d***@googlemail.com
2017-06-29 15:54:42 UTC
Permalink
Raw Message
Post by Peter Flynn
should appear after the chapters, if you are using traditional layout.
For my Uses, (mathematics thesis), the Appendix goes after biography since the Appendix includes any additional workings e.g. MatLab code which isn't apart of the actual thesis it self. It is, in the words of my supervisor, the "Rough Paper Workings" if you will, which is why I was attracted to this project to make it roman numbering, as that is what I was doing before I found this code on a google search.
Post by Peter Flynn
Not when I processed it. Can you please process the file as I sent it
and describe what errors you get?
No red errors with your code. However when you direct copy and past into sharelatex, has the Appendix in Arabic numbering (p.4), and the Bibliography in roman (iii). I rearranged them in the code above to make it both Roman (iii - iv), but as you can see the results were mixed.

And when I copy and past your original code into sharelatex, page 1 is indeed blank and "Chapter 1, First" starts on page 2. From your original code does this help:

*File List*
book.cls 2014/09/29 v1.4h Standard LaTeX document class
bk12.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
***********
Post by Peter Flynn
I get no errors and no blank pages when I process your file.
That's incredible?! I very clearly have page (i-iii) as the table of conents, list of tables, and list of figures. Then a blank page 1 with "Âă" symbols. And again another blank page before the bibliography page iv.
Post by Peter Flynn
\listfiles command immediately before \begin{document}
*File List*
book.cls 2014/09/29 v1.4h Standard LaTeX document class
bk12.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
sectsty.sty 2002/02/25 v2.0.2 Commands to change all sectional heading styl
es
fancyhdr.sty
geometry.sty 2010/09/12 v5.6 Page Geometry
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
lipsum.sty 2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
graphicx.sty 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
titlesec.sty 2011/12/15 v2.10.0 Sectioning titles
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
tocloft.sty 2013/05/02 v2.3f parameterised ToC, etc., typesetting
xpatch.sty 2012/10/02 v0.3 Extending etoolbox patching commands
expl3.sty 2016/01/03 v6358 L3 programming layer (loader)
expl3-code.tex 2016/01/03 v6358 L3 programming layer
l3pdfmode.def 2015/11/11 v6250 L3 Experimental driver: PDF mode
xparse.sty 2015/12/20 v6326 L3 Experimental document command parser
etoolbox.sty 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
supp-pdf.mkii
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf
grfext.sty 2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
***********
Post by Peter Flynn
If you do the same and then compare your list with mine, it may help
find the problem.
Not sure what I'm looking for


//Alfred
a***@hotmail.co.uk
2017-06-29 15:58:09 UTC
Permalink
Raw Message
Post by Peter Flynn
should appear after the chapters, if you are using traditional layout.
For my Uses, (mathematics thesis), the Appendix goes after biography since the Appendix includes any additional workings e.g. MatLab code which isn't apart of the actual thesis it self. It is, in the words of my supervisor, the "Rough Paper Workings" if you will, which is why I was attracted to this project to make it roman numbering, as that is what I was doing before I found this code on a google search.
 
Post by Peter Flynn
Not when I processed it. Can you please process the file as I sent it
and describe what errors you get?
No red errors with your code. However when you direct copy and past into sharelatex,  has the Appendix in Arabic numbering (p.4), and the Bibliography in roman (iii). I rearranged them in the code above to make it both Roman (iii - iv), but as you can see the results were mixed.  

And when I copy and past your original code into sharelatex, page 1 is indeed blank and "Chapter 1, First" starts on page 2. From your original code does this help:  

 *File List*
    book.cls    2014/09/29 v1.4h Standard LaTeX document class
    bk12.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
 ***********
Post by Peter Flynn
I get no errors and no blank pages when I process your file.
That's incredible?! I very clearly have page (i-iii) as the table of conents, list of tables, and list of figures. Then a blank page 1 with "Âă" symbols. And again another blank page before the bibliography page iv.
Post by Peter Flynn
\listfiles command immediately before \begin{document}
*File List*
    book.cls    2014/09/29 v1.4h Standard LaTeX document class
    bk12.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
 sectsty.sty    2002/02/25 v2.0.2 Commands to change all sectional heading styl
es
fancyhdr.sty    
geometry.sty    2010/09/12 v5.6 Page Geometry
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
  ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
titlesec.sty    2011/12/15 v2.10.0 Sectioning titles
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 tocloft.sty    2013/05/02 v2.3f parameterised ToC, etc., typesetting
  xpatch.sty    2012/10/02 v0.3 Extending etoolbox patching commands
   expl3.sty    2016/01/03 v6358 L3 programming layer (loader)
expl3-code.tex    2016/01/03 v6358 L3 programming layer
l3pdfmode.def    2015/11/11 v6250 L3 Experimental driver: PDF mode
  xparse.sty    2015/12/20 v6326 L3 Experimental document command parser
etoolbox.sty    2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
supp-pdf.mkii
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
 ***********
Post by Peter Flynn
If you do the same and then compare your list with mine, it may help
find the problem.
Not sure what I'm looking for


//Alfred
Peter Flynn
2017-06-29 21:19:23 UTC
Permalink
Raw Message
Post by d***@googlemail.com
Post by Peter Flynn
should appear after the chapters, if you are using traditional layout.
For my Uses, (mathematics thesis), the Appendix goes after biography
OK, that's fine so long as you understand that it is not the default.
Post by d***@googlemail.com
Post by Peter Flynn
Not when I processed it. Can you please process the file as I sent it
and describe what errors you get?
No red errors with your code.
I don't know what "red" errors are. Is this something your editor does?
Post by d***@googlemail.com
However when you direct copy and past into sharelatex, has the
Appendix in Arabic numbering (p.4), and the Bibliography in roman
(iii). I rearranged them in the code above to make it both Roman
(iii - iv), but as you can see the results were mixed.
No, when I paste it into ShareLaTeX, it processes identically and I get
the same output as I got on my laptop. No errors.
Post by d***@googlemail.com
And when I copy and past your original code into sharelatex, page 1
is indeed blank and "Chapter 1, First" starts on page 2.
I don't get that: it processes in ShareLaTeX normally.
Post by d***@googlemail.com
That's incredible?! I very clearly have page (i-iii) as the table of
conents, list of tables, and list of figures. Then a blank page 1 with
"Âă" symbols. And again another blank page before the bibliography page iv.
Aha. That looks like your problem. Are you using Microsoft Windows? And
one or more of the otherwise excellent LaTeX GUI editors? Your file
(possibly files) may have bogus or invisible control-characters in them,
and possibly the character-encoding is set wrongly.

I don't know how to get rid of them in Windows software. If you can find
a hex editor you should be able to see every character, hidden or not,
and find the ones that are causing the problem and delete them.

Or find someone with a Linux system and a copy of Emacs and use that to
open the file[s] and find the characters.
Post by d***@googlemail.com
Post by Peter Flynn
\listfiles command immediately before \begin{document}
[snip]
Post by d***@googlemail.com
Post by Peter Flynn
If you do the same and then compare your list with mine, it may help
find the problem.
Not sure what I'm looking for
ANY difference between the versions of packages used on my machine and
the versions of packages used on your machine. Just compare the two lists.

///Peter
Leon van Dommelen
2017-07-01 04:35:18 UTC
Permalink
Raw Message
Post by Peter Flynn
I don't know how to get rid of them in Windows software. If you can find
a hex editor you should be able to see every character, hidden or not,
and find the ones that are causing the problem and delete them.
Or find someone with a Linux system and a copy of Emacs and use that to
open the file[s] and find the characters.
Emacs is available for Windows. (Has been for many years, thank God.)
Opening a file literally is not on the menu bar, however. You have
to press 'Esc' and 'r', or 'Esc' and 'x' and 'find-file-literally'.
(May instead be able to use the Mule menu option and switch to 'raw-text'
encoding, if you cannot find the file that way, I think. Finding the
file requires some knowledge of the Windows file naming conventions.)

If you do this, also check the sanity of your encoding. If you
are using UTF-8, multinational characters should show up raw in
emacs as "\300+" followed by one or two "\277-" bytes. If not,
make sure that you have the right non-UTF-8 encoding declared. Don't
know about control characters GUIs may put in.

Leon
Peter Flynn
2017-07-01 19:50:22 UTC
Permalink
Raw Message
Post by Leon van Dommelen
Post by Peter Flynn
I don't know how to get rid of them in Windows software. If you can find
a hex editor you should be able to see every character, hidden or not,
and find the ones that are causing the problem and delete them.
Or find someone with a Linux system and a copy of Emacs and use that to
open the file[s] and find the characters.
Emacs is available for Windows. (Has been for many years, thank God.)
Yes, I've used it and even installed it. But as an Emacs user virtually
all my working life, I wouldn't recommend it to someone not experienced
in its way of working, as you describe...
Post by Leon van Dommelen
Opening a file literally is not on the menu bar, however. You have
to press 'Esc' and 'r', or 'Esc' and 'x' and 'find-file-literally'.
Or just open the file and hit up M-x hexl-mode RET
Post by Leon van Dommelen
If you do this, also check the sanity of your encoding. If you
are using UTF-8, multinational characters should show up raw in
emacs as "\300+" followed by one or two "\277-" bytes. If not,
make sure that you have the right non-UTF-8 encoding declared. Don't
know about control characters GUIs may put in.
They tend to be in something like Windows-1252 or Mac Roman-8, but they
usually show up in text-mode as \nnn octal.

///Peter
a***@hotmail.co.uk
2017-07-02 09:23:28 UTC
Permalink
Raw Message
Thanks everyone i solved the problem. I just re did the entire document line by line, removing all comments, removing all common packages and commands, and putting everything in book document class. Some how it worked.
Peter Flynn
2017-07-02 19:10:05 UTC
Permalink
Raw Message
Post by a***@hotmail.co.uk
Thanks everyone i solved the problem. I just re did the entire
document line by line, removing all comments, removing all common
packages and commands, and putting everything in book document class.
That's the rather longer way round.
Post by a***@hotmail.co.uk
Somehow it worked.
In the process there are now no invisible characters. Well done!

///Peter
Leon van Dommelen
2017-07-08 04:34:49 UTC
Permalink
Raw Message
Post by Peter Flynn
Post by Leon van Dommelen
Emacs is available for Windows. (Has been for many years, thank God.)
Yes, I've used it and even installed it. But as an Emacs user virtually
all my working life, I wouldn't recommend it to someone not experienced
in its way of working, as you describe...
Post by Leon van Dommelen
Opening a file literally is not on the menu bar, however. You have to
press 'Esc' and 'r', or 'Esc' and 'x' and 'find-file-literally'.
Or just open the file and hit up M-x hexl-mode RET
This seems to put you in hex-edit mode, which would hard to figure out
for someone with no programming knowledge. But your idea is right; what
I should have said is to go into "Options", "Multilingual environment",
"Set coding system", "For reverting this file now", and enter "raw-text".
That would have avoided the issue of dealing with the DOS path naming
conventions completely. (Maybe there is a shorter way?)

Leon

d***@googlemail.com
2017-06-29 16:05:01 UTC
Permalink
Raw Message
Post by Peter Flynn
Not when I processed it. Can you please process the file as I sent it
Since i'm new here. I didn't know if I'm the right to question your code, (kind of the reason why I left latex stack exchange, too many people arguing). But I agree with \\Alfred.

I did get page 1 blank with your original code. And for my purposes I wanted to get the Appendix in roman numbering as well. (But i'm not doing a math thesis, I just use latex to type up my written lecture notes, and that's how my OCD works with Appendixes).

\\Adil
jfh
2017-06-29 02:22:52 UTC
Permalink
Raw Message
Post by a***@hotmail.co.uk
This wasn't my code originally. But it looked amazing so i wanted to try and improve on it, as is the ways of coding.
The Original problem was to start with roman numbering (i-iii), then Arabic page numbering (1-5) and then continue the roman numbering (vi-vii) so that the Bibliography and Appendix appear in the table of contents.
Maybe that's why publishers usually continue the Arabic page numbering after the main text, e.g. Robinson and Stokes "Electrolyte Solutions" (Butterworths, 1970) in which the Appendices followed by an Addendum occupy over 100 pages after the main text.
Loading...