Page LayoutCreatepage blocks \begin{document}

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

Createpage blocks \begin{document}

Post by Haines »

I installed Giniewics' createpage.sty file.

Code: Select all

\documentclass{memoir} % 
  \usepackage{createspace} %
  \usepackage[T1]{fontenc} % 
  \usepackage[utf8]{inputenc} %
  \usepackage{tgtermes} %

  \begin{document}
    test 
  \end{document}
Result: LaTeX Error: Missing \begin{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Createpage blocks \begin{document}

Post by Johannes_B »

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.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Createpage blocks \begin{document}

Post by Stefan Kottwitz »

Sounds like this one: https://github.com/aginiewicz/createspace

Stefan
LaTeX.org admin
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Createpage blocks \begin{document}

Post by rais »

@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...
try the clone/download button instead.

KR
Rainer
Haines
Posts: 13
Joined: Sun Sep 16, 2018 5:04 pm

Createpage blocks \begin{document}

Post by Haines »

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:

Code: Select all

...
! 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: 13
Joined: Sun Sep 16, 2018 5:04 pm

Createpage blocks \begin{document}

Post by Haines »

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:

Code: Select all

...
! 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: 419
Joined: Sun Nov 16, 2014 8:51 pm

Createpage blocks \begin{document}

Post by rais »

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

Code: Select all

kpsewhich PSO_Uncoated_ISO12647_bas.ICC
if the file can be found.

KR
Rainer
Haines
Posts: 13
Joined: Sun Sep 16, 2018 5:04 pm

Createpage blocks \begin{document}

Post by Haines »

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:

Code: Select all

\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
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Createpage blocks \begin{document}

Post by Stefan Kottwitz »

Hello Haines,

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

Stefan
LaTeX.org admin
Haines
Posts: 13
Joined: Sun Sep 16, 2018 5:04 pm

Createpage blocks \begin{document}

Post by Haines »

Stefan,

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