LaTeX forum ⇒ Page Layout ⇒ Createpage blocks \begin{document} Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Haines
Posts: 5
Joined: Sun Sep 16, 2018 5:04 pm

Createpage blocks \begin{document}

I installed Giniewics' createpage.sty file.
\documentclass{memoir} %   \usepackage{createspace} %  \usepackage[T1]{fontenc} %   \usepackage[utf8]{inputenc} %  \usepackage{tgtermes} %   \begin{document}    test   \end{document}

Result: LaTeX Error: Missing \begin{document}

Tags:

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Haines wrote:I installed Giniewics' createpage.sty file.

Welcome to the forum.
Where does this package come from?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 9406
Joined: Mon Mar 10, 2008 9:44 pm
Sounds like this one: https://github.com/aginiewicz/createspace

Stefan

rais
Posts: 209
Joined: Sun Nov 16, 2014 8:51 pm
@Haines:
Well, if you tried to download file by file from that page, there's a good chance you got html files instead of text files...

KR
Rainer

Haines
Posts: 5
Joined: Sun Sep 16, 2018 5:04 pm
I may have found the reason for the error message, but not the solution.

When pdflatex is run on the test file, the log has:

...! pdfTeX error (ext5): cannot open file for embedding.\@begindocumenthook ..._Uncoated_ISO12647_bas.ICC}                                                  \edef \cs@profile {\the \p...l.13 \begin{document}                      %!  ==> Fatal error occurred, no output PDF file produced!

When I unzipped the package from github, it provided these files:

ISOuncoatedyellowish_bas.ICC
ISOuncoatedyellowish_basICC.pdf
PSO_Uncoated_ISO12647_bas.ICC
PSO_Uncoated_ISO12647_basICC.pdf

Directions said to put the .ICC files into a TeX path. So I simply copied
them to the same place as the createspace.sty file. But the names are
not quite the same as the file mentioned in the log.

Haines
Posts: 5
Joined: Sun Sep 16, 2018 5:04 pm
I may have found the reason for the error message, but not the solution.

When pdflatex is run on the test file, the log has:

...! pdfTeX error (ext5): cannot open file for embedding.\@begindocumenthook ..._Uncoated_ISO12647_bas.ICC}                                                  \edef \cs@profile {\the \p...l.13 \begin{document}                      %!  ==> Fatal error occurred, no output PDF file produced!

When I unzipped the package from github, it provided these files:

ISOuncoatedyellowish_bas.ICC
ISOuncoatedyellowish_basICC.pdf
PSO_Uncoated_ISO12647_bas.ICC
PSO_Uncoated_ISO12647_basICC.pdf

Directions said to put the .ICC files into a TeX path. So I simply copied
them to the same place as the createspace.sty file. But the names are
not quite the same as the file mentioned in the log.

rais
Posts: 209
Joined: Sun Nov 16, 2014 8:51 pm
Well, the' error has changed somewhat.
From your description, I'd say you need to run mktexlsr aka texhash.
You can check on a console with
kpsewhich PSO_Uncoated_ISO12647_bas.ICC
if the file can be found.

KR
Rainer

Haines
Posts: 5
Joined: Sun Sep 16, 2018 5:04 pm
Thanks, Ras, failure to run texhax seems to have been the problem. If I recall I ran texhax
prior to moving the UCC files into the proper location.

Having done that I can run pdflatex on the file:

\documentclass{memoir} %\usepackage{createspace} %\usepackage[T1]{fontenc} % \usepackage[utf8]{inputenc} %\usepackage{tgtermes} % This is clone of Nimbus 9 used for mass market paperbac\$\pdftitle{title}\pdfauthor{author}\pdfsubject{subject}\pdfkeywords{keywords} test \end{document}

This time, pdflatex generated a pdf file. But the file has:

LaTeX Error: Missing
LaTeX produced printed output before encountering a begindocument command.
Either you forgot the begindocument command or there is something wrong in the
preamble. The problem may be a stray character or an error in a declaration—for
example, omitting the braces around an argument or forgetting the in a command
name.
test

Stefan Kottwitz
Posts: 9406
Joined: Mon Mar 10, 2008 9:44 pm
Hello Haines,

just insert \begin{document}` before you start the document text, so before "test".

Stefan

Haines
Posts: 5
Joined: Sun Sep 16, 2018 5:04 pm
Stefan,

My blunder and my apologies. In copying the code I missed the \begin{document} line. It now works properly.
Thanks for the help.