Hi,
I want to set font size in pt unit (not Large and ...) for heading, section, subsection, abstract.
However, I have 2 problem with them:
1-\fontsize is not working.
2- some of them have not optional part for setting font size.
can anyone help me?
Fonts & Character Sets ⇒ Font Size in Headings, Abstract, Thanks and other Parts
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Font Size in Headings, Abstract, Thanks and other Parts
Hi Farnaz,
Stefan
perhaps you don't use it in the right way. How do you use it, how is your code?farnaz wrote: 1-\fontsize is not working.
Use \fontsize and \selectfont afterward to change the font. This change has effect until the end of the environment or group or another font size changing command. \normalsize returns to the standard size too.farnaz wrote: 2- some of them have not optional part for setting font size
Stefan
LaTeX.org admin
Font Size in Headings, Abstract, Thanks and other Parts
For example in author:
The command \fontsize does not change font anyway.
Or in \section command, I put font size in optional part. However, it does not work:
Code: Select all
\author{\fontsize{11}{13}...
Or in \section command, I put font size in optional part. However, it does not work:
Code: Select all
\section[12pt]{Kinematic Mode;}
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Font Size in Headings, Abstract, Thanks and other Parts
As I mentioned, always use \selectfont after \fontsize.
This works:
The optional argument of \section is not for font settings, it can be used to put a version of the section title into the table of contents and into the headers, such as
So this would work:
However, I would not change font sizes or shape in the text or its headings. Instead, I would define a command such as
and use this command later in the text. This way you have the size definition once in the preamble, not many times in the text, which makes adjustments easier. The same for other settings.
And I would go further, redefining the \section command or a related macro instead of using a size command in argument, the heading text, using the titlesec package or redefining macros of the document class.
Stefan
This works:
Code: Select all
\author{\fontsize{11}{13}\selectfont Author}
Code: Select all
\section[short title]{long title in heading in text}
Code: Select all
\section[Kinematic Mode]{\fontsize{12}{13}\selectfont Kinematic Mode}
Code: Select all
\newcommand{\sectionsize}{\fontsize{12}{13}\selectfont}
And I would go further, redefining the \section command or a related macro instead of using a size command in argument, the heading text, using the titlesec package or redefining macros of the document class.
Stefan
LaTeX.org admin
Re: Font Size in Headings, Abstract, Thanks and other Parts
Thanks for your practical and useful answer.
I will try it soon.
I will try it soon.