LaTeX forum ⇒ Text FormattingCapital letter Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
rayman
Posts: 24
Joined: Thu Feb 24, 2011 11:53 am

Capital letter

Postby rayman » Fri Mar 07, 2014 4:21 pm

Hello everyone. I am using a ready master thesis template that I think looks nice in general, however I have a one problem that drives me crazy. Every time when I start a new section, it never begins with a capital letter. Something like this:
  1. \documentclass[11pt,a5paperfootinclude=true,headinclude=true]{scrbook} % KOMA-Script book
  2. \usepackage[T1]{fontenc}
  3. \usepackage{lipsum}
  4. \usepackage[linedheaders,parts,pdfspacing]{classicthesis} % ,manychapters
  5. \usepackage[bitstream-charter]{mathdesign}
  6. \usepackage[osf]{libertine}
  7. \usepackage{amsthm}
  8. \usepackage{amsmath}
  9. \usepackage{anysize}
  10. \marginsize{0.1\paperwidth}{0.1\paperheight}{2cm}{2cm}
  11. \newcommand{\bigslant}[2]{{\raisebox{.2em}{$#1$}\left/\raisebox{-.2em}{$#2$}\right.}}
  12. \begin{document}
  13. \theoremstyle{plain}
  14. \newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter
  15. \theoremstyle{definition}
  16. \newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers
  17. \newtheorem{exmp}[thm]{Example}
  18. \theoremstyle{corollary}
  19. \newtheorem{cor}[thm]{Corollary}
  20. \theoremstyle{lemma}
  21. \newtheorem{lem}[thm]{Lemma}
  22. \theoremstyle{proposition}
  23. \newtheorem{prop}[thm]{Proposition}
  24. \newcommand{\ndiv}{\hspace{-4pt}\not|\hspace{2pt}}
  25. % \pagestyle{scrheadings}
  26. % \manualmark
  27. % \markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}
  28. \tableofcontents
  29. %\automark[section]{chapter}
  30. % \renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}
  31. % \renewcommand{\sectionmark}[1]{\markright{\thesection\enspace\spacedlowsmallcaps{#1}}}
  32. % use \cleardoublepage here to avoid problems with pdfbookmark
  33. % \cleardoublepage\part{Test Part}
  34. \newtheoremstyle{note}% hnamei
  35. {3pt}% hSpace abovei
  36. {3pt}% hSpace belowi note
  37. {}% hBody fonti
  38. {}% hIndent amounti1
  39. {\itshape}% hTheorem head fonti
  40. % {\spacedlowsmallcaps}%
  41. {:}% hPunctuation after theorem headi
  42. {.5em}% hSpace after theorem headi2
  43. {}%
  44. \chapter{\textbf{Cubic rings and cubic integral binary forms.}}
  45. \section{\textbf{Cubic rings}}
  46. \begin{defn}
  47. \textit{A cubic $\mathbb{Z}$-ring $\Lambda$ is a commutative ring with a unity without zero divisors, whose additive group $G$ is a free $\mathbb{Z}$-module of rank $3$.}
  48. \end{defn}
  49. \end{document}


would give me something like this (please see the attachment)

test.jpg
test.jpg (11.82 KiB) Viewed 5853 times


I would like to be able to get a capital letter in the name of the section: i.e 1.1 Cubic rings.
Thanks for any help
Last edited by cgnieder on Fri Mar 14, 2014 10:37 am, edited 1 time in total.
Reason: scaled image to a smaller size so it doesn't destroy formatting of the site

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9201
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat Mar 08, 2014 3:35 pm

That's caused by the classicthesis style. In classicthesis.sty you can find:

  1. % ********************************************************************
  2. % layout of the chapter-, section-, subsection-, subsubsection-,
  3. % paragraph and description-headings
  4. % ********************************************************************
  5. \RequirePackage{titlesec}
  6. % parts
  7. \ifthenelse{\boolean{@parts}}%
  8. {%
  9. % \newcommand{\ctparttext}{\relax}
  10. \newcommand{\ct@parttext}{\relax} % Thanks to Ivo
  11. \newcommand{\ctparttext}[1]{\renewcommand{\ct@parttext}{#1 \relax}}
  12. \titleformat{\part}[display]
  13. {\normalfont\centering\large}%
  14. {\thispagestyle{empty}\partname~\MakeTextUppercase{\thepart}}{1em}%
  15. {\color{Maroon}\spacedallcaps}[\bigskip\normalfont\normalsize\color{Black}\begin{quote}\ct@parttext\end{quote}]
  16. }{\relax}
  17. % chapters
  18. \ifthenelse{\boolean{@linedheaders}}%
  19. {% lines above and below, number right
  20. \titleformat{\chapter}[display]%
  21. {\relax}{\raggedleft{\color{halfgray}\chapterNumber\thechapter} \\ }{0pt}%
  22. {\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
  23. }{% something like Bringhurst
  24. \titleformat{\chapter}[display]%
  25. {\relax}{\mbox{}\oldmarginpar{\vspace*{-3\baselineskip}\color{halfgray}\chapterNumber\thechapter}}{0pt}%
  26. {\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
  27. }
  28. % sections \FloatBarrier
  29. \titleformat{\section}
  30. {\relax}{\textsc{\MakeTextLowercase{\thesection}}}{1em}{\spacedlowsmallcaps}
  31. % subsections
  32. \titleformat{\subsection}
  33. {\relax}{\textsc{\MakeTextLowercase{\thesubsection}}}{1em}{\normalsize\itshape}
  34. % subsubsections
  35. \titleformat{\subsubsection}
  36. {\relax}{\textsc{\MakeTextLowercase{\thesubsubsection}}}{1em}{\normalsize\itshape}
  37. % paragraphs
  38. \titleformat{\paragraph}[runin]
  39. {\normalfont\normalsize}{\theparagraph}{0pt}{\spacedlowsmallcaps}
  40. % descriptionlabels
  41. \renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\spacedlowsmallcaps{#1}} % spacedlowsmallcaps textit textsc
  42. % spacing
  43. \ifthenelse{\boolean{@nochapters}}%
  44. {\relax}%
  45. {\titlespacing*{\chapter}{0pt}{1\baselineskip}{1.2\baselineskip}}
  46. \titlespacing*{\section}{0pt}{1.25\baselineskip}{1\baselineskip}
  47. \titlespacing*{\subsection}{0pt}{1.25\baselineskip}{1\baselineskip}
  48. \titlespacing*{\paragraph}{0pt}{1\baselineskip}{1\baselineskip}


Redefine as you like, such as removing \spacedlowsmallcaps and \textsc, where you don't desire it. Use \bfseries there instead, so you don't need \textbf in the text later.

  1. \titleformat{\section}
  2. {\normalfont\bfseries}{\thesection}{1em}{}


You can read more about those settings in the titlesec manual.

Stefan
Site admin

rayman
Posts: 24
Joined: Thu Feb 24, 2011 11:53 am

Postby rayman » Mon Mar 10, 2014 11:08 am

Thank you Stefan, it helped. I just have 2 more issues. I would really appreciate if you could give me some hints on that.
1) In contents, sections begin with capital letter but chapters don't. I tried to fix it the same way as you did but it did not seem to work anymore and chapter appear bold which I don't want in the contents table. It looks like that:


2) I have noticed that some headers appear bold as well and never start with capital letters, others don't appear bold, don't begin with a capital letter

Is there any way to fix it?
Many thanks

Namnloest.jpg
Namnloest.jpg (5.36 KiB) Viewed 5853 times


header.jpg
header.jpg (4.41 KiB) Viewed 5920 times


content.jpg
content.jpg (21.41 KiB) Viewed 5853 times
Last edited by cgnieder on Fri Mar 14, 2014 10:39 am, edited 1 time in total.
Reason: scaled images to a smaller size so they don't destroy formatting of the site

User avatar
Stefan Kottwitz
Site Admin
Posts: 9201
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Mar 10, 2014 1:21 pm

Actually it's an issue with combining small caps style and bold face. Not many fonts provide this combination. Here, \textbf overrides \testsc.

You could see the original classicthesis style, if you would remove \usepackage[osf]{libertine} or just comment it out.

Seems like a decision to either use classicthesis or Libertine, or to fix and change all those classicthesis caps settings.

Stefan
Site admin

rayman
Posts: 24
Joined: Thu Feb 24, 2011 11:53 am

Postby rayman » Tue Mar 11, 2014 9:54 pm

Thank you Stefan. After I have removed \usepackage[osf]{libertine} everything looks as I wanted it to look like:)
Last edited by cgnieder on Fri Mar 14, 2014 10:40 am, edited 1 time in total.
Reason: added code markup


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 4 guests