LaTeX forum ⇒ Page LayoutCreatepage 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}

Postby Haines » Sun Sep 16, 2018 5:52 pm

I installed Giniewics' createpage.sty file.
  1. \documentclass{memoir} %
  2. \usepackage{createspace} %
  3. \usepackage[T1]{fontenc} %
  4. \usepackage[utf8]{inputenc} %
  5. \usepackage{tgtermes} %
  6.  
  7. \begin{document}
  8. test
  9. \end{document}

Result: LaTeX Error: Missing \begin{document}

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 3903
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Sep 16, 2018 5:57 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.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9194
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Sep 16, 2018 7:01 pm

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

Stefan
Site admin

rais
Posts: 177
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Mon Sep 17, 2018 3:02 am

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

Postby Haines » Thu Sep 20, 2018 2:42 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:

  1. ...
  2. ! pdfTeX error (ext5): cannot open file for embedding.
  3. \@begindocumenthook ..._Uncoated_ISO12647_bas.ICC}
  4. \edef \cs@profile {\the \p...
  5. l.13 \begin{document}
  6. %
  7. ! ==> 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

Postby Haines » Sun Sep 23, 2018 1:54 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:

  1. ...
  2. ! pdfTeX error (ext5): cannot open file for embedding.
  3. \@begindocumenthook ..._Uncoated_ISO12647_bas.ICC}
  4. \edef \cs@profile {\the \p...
  5. l.13 \begin{document}
  6. %
  7. ! ==> 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: 177
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Mon Sep 24, 2018 12:21 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
  1. 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

Postby Haines » Thu Sep 27, 2018 11:18 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:

  1. \documentclass{memoir} %
  2. \usepackage{createspace} %
  3. \usepackage[T1]{fontenc} %
  4. \usepackage[utf8]{inputenc} %
  5. \usepackage{tgtermes} % This is clone of Nimbus 9 used for mass market paperbac$
  6. \pdftitle{title}
  7. \pdfauthor{author}
  8. \pdfsubject{subject}
  9. \pdfkeywords{keywords}
  10.  
  11. test
  12.  
  13. \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: 9194
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Sep 27, 2018 11:30 pm

Hello Haines,

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

Stefan
Site admin

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

Postby Haines » Fri Sep 28, 2018 12:05 am

Stefan,

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


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 5 guests