LaTeX forum ⇒ Text FormattingPart and Title

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
tanuirau
Posts: 3
Joined: Tue Apr 19, 2016 6:11 am

Part and Title

Postby tanuirau » Tue Jun 28, 2016 6:31 am

Any assistance would be appreciated.I have something like:

Part I

Preliminary

Part II
Principles

BUT, I want to have it like

Part I Preliminary

Part II Principles

etc.

How do I do this?

Thanks.

Tanu

User avatar
Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Jun 28, 2016 9:16 am

Hi and welcome, can you show a minimal working example with us? A solution t your problem depends on the class and packages related to the formatting.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

tanuirau
Posts: 3
Joined: Tue Apr 19, 2016 6:11 am

Postby tanuirau » Wed Jun 29, 2016 12:49 am

  1. \documentclass[11pt]{article} % use larger type; default would be 10pt
  2. \usepackage{amssymb,amsmath}
  3. \usepackage[utf8]{inputenc} % set input encoding (not needed with XeLaTeX)
  4.  
  5. %%% PAGE DIMENSIONS
  6. \usepackage{geometry} % to change the page dimensions
  7. \geometry{a4paper} % or letterpaper (US) or a5paper or....
  8. \geometry{margin=0.9in} % for example, change the margins to 2 inches all round
  9. %\geometry{landscape} % set up the page for landscape
  10. % read geometry.pdf for detailed page layout information
  11.  
  12. \usepackage{graphicx} % support the \includegraphics command and options
  13.  
  14. \usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
  15.  
  16. %%% PACKAGES
  17. \usepackage{booktabs} % for much better looking tables
  18. \usepackage{array} % for better arrays (eg matrices) in maths
  19. \usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)
  20. \usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim
  21. \usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float
  22. \usepackage[singlespacing]{setspace}
  23. % These packages are all incorporated in the memoir class to one degree or another...
  24.  
  25. %%% HEADERS & FOOTERS
  26. \usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
  27. \pagestyle{fancy} % options: empty , plain , fancy
  28. \renewcommand{\headrulewidth}{1.5pt} % customise the layout...
  29. \lhead {BPS310: Corporate Governance - Fit and Proper Requirements}\chead{}\rhead {June 2016}
  30. \lfoot{}\cfoot{}\rfoot{BPS310-\thepage}
  31. \renewcommand{\footrulewidth}{1.5pt} % customise the layout...
  32.  
  33. %%% ToC (table of contents) APPEARANCE
  34. \usepackage[nottoc,notlof,notlot]{tocbibind} % Put the bibliography in the ToC
  35. \usepackage[titles,subfigure]{tocloft} % Alter the style of the Table of Contents
  36. \renewcommand{\cftsecfont}{\rmfamily\mdseries\upshape}
  37. \renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape} % No bold!
  38. \renewcommand\contentsname{\bf\rmfamily\large ARRANGEMENT OF SECTIONS}
  39.  
  40. %formatting the table of contents
  41. \setcounter{secnumdepth}{5}
  42. \usepackage[tocflat]{tocstyle}
  43. \settocstylefeature[0]{entryhook}{\rmfamily}
  44. \settocstylefeature[1]{entryhook}{\rmfamily}
  45.  
  46. \begin{document}
  47. \hrule
  48. \tableofcontents
  49. \newpage
  50. \vspace{-0.5cm}
  51. \part{\bf\rmfamily\large{Preliminary}}
  52. \part{\bf\rmfamily\large{Principles}}
  53. \part{\bf\rmfamily\large{Statement of Policy}}
  54. \part{\bf\rmfamily\large{Effective Date}}
  55. \end{document}

User avatar
Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Jul 03, 2016 4:24 pm

I am really not sure why you are using parts for this. There might be a much better and simpler solution, that keeps you from trouble later on.

  1. \documentclass[11pt]{article}
  2. \usepackage{amssymb,amsmath}
  3. \usepackage[utf8]{inputenc}
  4.  
  5.  
  6. \usepackage{geometry}
  7. \geometry{a4paper}
  8. \geometry{margin=0.9in,
  9. headheight=14pt, %JB Added to avoid bad typesetting and the warning
  10. }
  11.  
  12.  
  13.  
  14. \usepackage{graphicx}
  15.  
  16. \usepackage[parfill]{parskip}
  17.  
  18.  
  19. \usepackage{booktabs}
  20. \usepackage{array}
  21. \usepackage{paralist}
  22. \usepackage{verbatim}
  23. \usepackage{subfig}
  24. \usepackage[singlespacing]{setspace}
  25.  
  26.  
  27.  
  28. \usepackage{fancyhdr}
  29. \pagestyle{fancy}
  30. \renewcommand{\headrulewidth}{1.5pt}
  31. \lhead {BPS310: Corporate Governance - Fit and Proper Requirements}\chead{}\rhead {June 2016}
  32. \lfoot{}\cfoot{}\rfoot{BPS310-\thepage}
  33. \renewcommand{\footrulewidth}{1.5pt}
  34.  
  35.  
  36. \usepackage[nottoc,notlof,notlot]{tocbibind}
  37. \usepackage[titles,subfigure]{tocloft}
  38. \renewcommand{\cftsecfont}{\rmfamily\mdseries\upshape}
  39. \renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape}
  40. \renewcommand\contentsname{\bf\rmfamily\large ARRANGEMENT OF SECTIONS}
  41.  
  42.  
  43. %JB: tocloft customized the toc and other lists, but so does package tocstyle.
  44. % everything you have defined before is overridden.
  45. \setcounter{secnumdepth}{5}
  46. \usepackage[tocflat]{tocstyle}
  47. \settocstylefeature[0]{entryhook}{\rmfamily}
  48. \settocstylefeature[1]{entryhook}{\rmfamily}
  49.  
  50. \usepackage{titlesec}
  51. \titleformat{\part}{\bfseries\large}{\partname~\thepart}{1em}{}{}
  52. \begin{document}
  53. \hrule
  54. \tableofcontents
  55. \newpage
  56. \vspace{-0.5cm}
  57. \part{Preliminary}
  58. \part{Principles}
  59. \part{Statement of Policy}
  60. \part{Effective Date}
  61. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

tanuirau
Posts: 3
Joined: Tue Apr 19, 2016 6:11 am

Postby tanuirau » Mon Jul 04, 2016 12:40 am

Thanks for the help.

Greatly appreciated.


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 4 guests