Fonts & Character SetsChange font part/section of text

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
BoudewijnD
Posts: 60
Joined: Wed Nov 18, 2009 4:18 pm

Change font part/section of text

Post by BoudewijnD »

Hi,

Searched the forum a few times but I still can't figure out how to change the font of a part or section of my document.
I'am writing the main text in Utopia Regular with Math Design size 11.
And want to change my data section to a different font (have to come up with the right one) and want to change the font size to 10 or 9.

So maybe you people can help me.
Here is some code from the main file.

Code: Select all

Code, edit and compile here:
\documentclass[11pt,twoside,dutch,english]{book}
%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PACKAGE LOADING TIME %%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[utopia]{quotchap} % fancy chapter beginning
\usepackage{fancyhdr}
\usepackage[sectionbib]{chapterbib2} % bibliography per chapter
%\usepackage[sectionbib]{chapterbib2} % bibliography per chapter
% (sectionbib -> bibliography is \section* instead of \chapter*), should come before babel chapterbib2
\usepackage[dutch,english]{babel}
\usepackage[justification=centering]{caption} %better control over captions (sideways, font, ...)
\usepackage{subfigure} % with scriptsize or so, one can adapt the size
%\usepackage{cite}
\usepackage{enumerate} % to make it possible to define the numbers (A,a, ...)
\usepackage{verbatim} % extra support for verbatim environments
\usepackage{float} % you can define 'H' so that floats are forced to be putted 'here
%\usepackage{psfrag}
%\usepackage{chappg} % page numbering (chapno-pageno), for ToC
\usepackage{url} % for better url typesetting
\usepackage{expdlist} % Expanded description (e.g. better alignement) -> needed for acronym_expdlist package
% for list of acronyms
\usepackage{hhline} % generates nicer table lines (without missing pixels) + more flexible
\usepackage{afterpage} % adds \afterpage command, which makes it possible to issue \afterpage{\clearpage} which flushes all floats after this page
\usepackage{listings}
\usepackage{achemso} % dit is voor mooi ACS like Referenties
\usepackage{amsmath,amsfonts,amsthm}
\usepackage{ifthen} % ifthenelse command
\usepackage[version=3]{mhchem} % use \ce {} for chemical forumals
\usepackage{gensymb} %gebruik van \degree voor graden teken
\usepackage[inner=2.25cm, outer=1.75cm, top=2cm, bottom=2cm, paperwidth=16.5cm, paperheight=24cm]{geometry}
\usepackage[T1]{fontenc} %Bold smallcaps
\usepackage[adobe-utopia]{mathdesign}
\usepackage{fixltx2e} %for the use of textsuper/subscript
%%%%%%%%%%%%%%%%%
%% HYPHENATION %%
%%%%%%%%%%%%%%%%%
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
And here a piece of code from chapter 3:

Code: Select all

Code, edit and compile here:
% Chapter 3
\chapter{\textbf{Hoofdstuk over 3 verschillende Chitobiosides}} % Write in your own chapter title
\label{Chapter3}
\lhead{\emph{Chapter 3}} % Write in your own chapter title to set the page header
\renewcommand{\bibname}{References}
\section{Intro}
\section{Results and discusion}
Kijken of we ook een ref kunnen gebruiken \cite{abdel1996}
\section{Experimental Data}
%Alles in size 10
\textbf{1,6-Anhydro-2-azido-3-\textit{O}-benzyl-2-deoxy-4-\textit{O}-methyl-$\beta$-\textsc{d}-glucopyranose (2a):}
\\
Compound \textbf{1} (8.15 mmol, 2.26 g) was dissolved in DMF and cooled using an ice-bath
and after stirring for 15 minutes NaH (60\% dispersion in mineral oil) (0.49 g, 12.23 mmol, 1.5 equiv.) was added
portion wise. After 30 minutes the gas development stopped and MeI (0.61 mL, 9.78 mmol 1.2
equiv.) was added drop wise. The reaction was quenched with
MeOH after 1.5 hours. The reaction mixture was concentrated and purified
using a short silica column (20{\%} EtOAc/PE) which gave product X as clear
oil (91\%, 2.16 g, 7.42 mmol) \textbf{$^{1}$H NMR (400 MHz, CDCl$_{3}$)} $\delta$ 7.41 - 7.27 (m, 5H,
CH$_{arom}$, Bn), 5.48 (s, 1H, H$_{1}$), 4.64 (m, 3H, CH$_{2}$, Bn, H$_{5}$),
4.08 (d, \textit{J} = 7.2 Hz, 1H, H$_{6'}$), 3.76 (dd, \textit{J} = 13.0, 6.4 Hz, 1H,
H$_{6}$), 3.59 (d, \textit{J} = 24.3 Hz, 1H, H$_{4}$), 3.39 (s, 3H, CH$_{3}$), 3.29
(s, 1H, H$_{3}$), 3.20 (s, 1H, H$_{2}$); \textbf{$^{13}$C NMR (101 MHz,
CDCl$_{3}$)} $\delta$ 137.38 (C$_{q}$, Bn), 128.68-127.88 (CH$_{arom}$, Bn),
100.64 (C-1), 78.80 (C-2), 75.92 (C-3), 73.75 (C-4), 72.51 (C-6), 65.34
(CH$_{2}$, Bn), 59.87 (C-5), 57.16 (CH$_{3}$, Me); \textbf{IR :} 2096.5,
1718.5, 1244.0, 1099.3, 1004.8, 929.6, 867.9; \textbf{HRMS :} \ce{C14H17N3O4 + Na+} requires 314.1111, found 314.1113; [$\alpha$]$^{23}_{\textsc{d}}$ + 21.7\degree (c = 2, \ce{CHCl3}).\\
\\
\bibliographystyle{achemso}
{\bibliography{chapter3}}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
so the \section{Experimental Data} should be a different font and size.

THNX,
\BoudewijnD

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Change font part/section of text

Post by frabjous »

The easiest thing to do would be, e.g.,

\begin{small}

at the beginning of the section, and

\end{small}

at the end. That should be 10pt. For 9pt, use

\begin{footnotesize}
...
\end{footnotesize}

Instead.

As for changing the font, it's probably best to figure out which font you want first. There's some additional info here, but I'd prefer to use higher-level commands if at all possible.

By the way your post shows a lot of the common problems mentioned this post about providing sample code, such as including packages not on CTAN ("chapterbib2"), packages unrelated to the issue, and including files not bundled/shared here ("hyphenation.tex").
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Change font part/section of text

Post by localghost »

For different font sizes there are according switches.


Best regards
Thorsten
BoudewijnD
Posts: 60
Joined: Wed Nov 18, 2009 4:18 pm

Re: Change font part/section of text

Post by BoudewijnD »

@frabjous Thanx thats the trick for the size. And next time I will try to give a more use full code.

@Thorsten Also thnx but I know the most abbreviations of the sizes!
Post Reply