Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to write a new class using the report class. In my custom class I have used a custom \maketitle. But it is not working. But it works, if I use article class as my base. My class file is

\ProvidesClass{mins}[2/8/2013]
\NeedsTeXFormat{LaTeX2e}

\DeclareOption*{\InputIfFileExists{\CurrentOption.min}{}{
\PassOptionsToClass{\CurrentOption}{article}}}

\ProcessOptions \relax

\LoadClass[a4paper,12pt]{article}
%[left=.5in,right=.5in,top=1in,bottom=1in]
\RequirePackage[top=.5in,bottom=.5in]{geometry}
\RequirePackage{graphicx}
\RequirePackage{url}
\RequirePackage{titlesec}


\def\@maketitle{%
\newpage
\thispagestyle{empty}
Hello World
  }


\newcommand{\makeack}{
\newpage
\thispagestyle{empty}
Hello World Again
}

and my TeX file is

\documentclass{myclass}
\title{My report Title}
\author{My Name}
\begin{document}
\maketitle
\makeack

\end{document}

My output is enter image description here

When I replace article with report in the class file, the output changes to

enter image description here

share|improve this question
    
What does "not working" mean when using report? What does "it works" mean when using article? What kind of error message(s) do you get? –  Werner Sep 19 '13 at 4:21
    
In addition to Werner's questions, which is the actual definition of \@maketitle? –  Gonzalo Medina Sep 19 '13 at 4:27
    
@Werner When report is used normal title comes. When article is used, my custom title comes. –  tex Sep 19 '13 at 4:36
    
Hard to provide help if you don't provide the information that has been requested. Please, let us see your actual definition of \@maketitle and a complete, minimal example document showing the problem. –  Gonzalo Medina Sep 19 '13 at 5:02
1  
@user3984 \PassOptionsToClass{notitlepage}{report}, perhaps. –  egreg Sep 19 '13 at 8:47
show 5 more comments

1 Answer

up vote 1 down vote accepted
\PassOptionsToClass{notitlepage}{report} 

in the class will help to solve that problem. Thanks @egreg for the answer.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.