### Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 8 guests

## Make custom title

maketitleprogrammingsectioningAdd tags Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)

### Make custom title

Dear all,

This is maybe a stupid question but I can not find how to define a preamble for my own (custom) title "\boldtitle". I can not use \maketitle as this gives me errors. It will be used as a sort of section but without numbering.

Code: Select all  •  Open in writeLaTeX
\newcommand\boldtitle{?????}\begin{document}\boldtitle{[b]This is my title[/b]}\end{document}

I want the title in bold that is left aligned an that has a defined white space before and after.

Thanks!
Last edited by cgnieder on Thu May 16th, 2013, edited 1 time in total.
Hermano

Posts: 14
Joined: Wed Apr 6th, 2011

### Re: Make custom title

Hermano wrote:This is maybe a stupid question but I can not find how to define a preamble for my own (custom) title "\boldtitle". I can not use \maketitle as this gives me errors. It will be used as a sort of section but without numbering.

I don't really understand: do you want to customize the title that is made by \title, \author and \maketitle or do you want an unnumbered section (\section*{I'm not numbered})?

Regards
Clemens
------------------------------
New German Q&A site about TeX: http://texwelt.de/wissen
System: TeXlive 2013, OpenSUSE 12.3

cgnieder
Site Moderator

Posts: 1696
Joined: Sat Apr 16th, 2011
Location: Germany

### Re: Make custom title

I don't want to customize the title made by \title etc.

I can make it easily like:

Code: Select all  •  Open in writeLaTeX
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.  \\\noindent{\textbf{This is my title}} \\Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

But as I will use this format for a "title" many times, I want to create a preamble named "\boldtitle" such it looks like:

Code: Select all  •  Open in writeLaTeX
\boldtitle{This is my title}

In this preamable, I want to define the spacings before and after the title, bold text, not numbered, left aligned and not in taken into account for the table of contents.
Last edited by cgnieder on Thu May 16th, 2013, edited 1 time in total.
Hermano

Posts: 14
Joined: Wed Apr 6th, 2011

### Re: Make custom title

Hermano wrote:I want to create my own "title/heading" for a section which is not numbered and also not in the table of contents.

There's already a command for this: the starred version of \section:

Code: Select all  •  Open in writeLaTeX
\section*{Unnumbered section that will not appear in the ToC}

BTW: you shouldn't use \\ to terminate a paragraph. An empty line in the source suffices. \\ does not terminate a paragraph, anyway, but ends a line, which is a different thing.

Regards
Clemens
------------------------------
New German Q&A site about TeX: http://texwelt.de/wissen
System: TeXlive 2013, OpenSUSE 12.3

cgnieder
Site Moderator

Posts: 1696
Joined: Sat Apr 16th, 2011
Location: Germany

### Re: Make custom title

Dear cgnieder,

However, using \section*{} will make the fontsize bigger than the rest of my text. Is there a way to specify the size once for whole my document for the \section*{} command in such a way it doesn't influence the fontsize of the \section{} command?
Last edited by cgnieder on Thu May 16th, 2013, edited 1 time in total.
Hermano

Posts: 14
Joined: Wed Apr 6th, 2011

### Re: Make custom title

You could adapt the definition of \section from article.cls. The code below defines a macro \mycustomhead which works exactly like \section except that it uses \normalsize instead of \large. I also defined a second command \myhead that simply calls the starred variant of \mycustomhead in order to get an unnumbered heading without entry in the ToC:

Code: Select all  •  Open in writeLaTeX

Regards
Clemens
------------------------------
New German Q&A site about TeX: http://texwelt.de/wissen
System: TeXlive 2013, OpenSUSE 12.3

cgnieder
Site Moderator

Posts: 1696
Joined: Sat Apr 16th, 2011
Location: Germany

### Re: Make custom title

Thanks
Hermano

Posts: 14
Joined: Wed Apr 6th, 2011

### Topic Tags

maketitleprogrammingsectioning

### Who is online

Users browsing this forum: No registered users and 8 guests