0

I was considering writing my own classes and thought copying and pasting the original class (report) would be a good starting point.

I assumed that if I:

  1. copied report.cls to myreport.cls in my project directory
  2. changed the documentclass in the latex file to myreport
  3. Changed the \ProvidesClass line in the class file to myreport

that the output should be identical to the original version. It compiles, but the format is markedly different.

It looks like several packages including fancyhdr are not working at all.

Is there something else needed - other files or code to get back to exactly where I started?

I am using tinytex installed in R through Jetbrains Intellij under Windows 10, which I presume is not relevant, except that the report.cls file I took was in [user directory]\AppData\Roaming\TinyTeX\texmf-dist\tex\latex\base just in case that is the wrong class file.

  • 2
    there is no reason to expect different output if you just copied report.cls as you describe but we can not debug if you show no example. – David Carlisle Oct 25 '20 at 16:51

1 Answers1

1

Every file input is shown on the terminal

\documentclass{report}

\begin{document}

\end{document}

shows

$ pdflatex zzaa
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./zzaa.tex
LaTeX2e <2020-10-01> patch level 1
L3 programming layer <2020-10-05> xparse <2020-03-03>
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/report.cls
Document Class: report 2020/04/10 v1.4m Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
No file zzaa.aux.
(./zzaa.aux) )
No pages of output.
Transcript written on zzaa.log.

so in a current latex, size10.clo will be input (or size11 or size12 if the 11pt or 12pt options are used, and l3backend-....def will be input at \begin{document} (unrelated to report class).

David Carlisle
  • 757,742
  • Thanks David, you gave me the idea to do a file diff on both the terminal/log file output and on the LaTeX itself. The LaTeX starts life as an RMarkdown document and that is where the difference lies - myreport had downgraded each heading type by one level. So chapter is now section, section is now subsection etc. This is presumably a question for the RMarkdown forum. – user1683586 Oct 25 '20 at 17:10
  • 5
    It looks like the problem has already been solved. https://stackoverflow.com/questions/62308191/using-custom-latex-class-changes-numbering-in-r-markdown – user1683586 Oct 25 '20 at 17:11