LaTeX forum ⇒ Fonts & Character SetsUppercase in the subsection without to change the lowercase in the sumary

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
jaco_julio
Posts: 2
Joined: Fri Feb 23, 2018 6:08 pm

Uppercase in the subsection without to change the lowercase in the sumary

Postby jaco_julio » Fri Feb 23, 2018 6:39 pm

I want to put the subsection and the subsubsection in the text on uppercase, but I don't want to change the lowercase in the sumary.
My code is this:
  1. \documentclass[a4paper, 12pt]{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[lmargin = 2.5cm, rmargin = 2.5cm, tmargin = 2.5cm, bmargin = 3cm]{geometry}
  4. \usepackage[english,brazil]{babel}
  5. \usepackage{graphicx}
  6. \usepackage{amsmath}
  7. \usepackage{indentfirst}
  8. \usepackage{subfiles}
  9. \usepackage{blindtext}
  10. \usepackage{color}
  11. \usepackage{lipsum}
  12. \usepackage{setspace}
  13. \usepackage{chngcntr}
  14. \usepackage{etoolbox}
  15. \usepackage{titlesec}
  16. \usepackage{float}
  17. \usepackage{tikz}
  18. \usepackage{fancyhdr}
  19. \usepackage{nomencl}
  20. \usepackage{titletoc}
  21. \usepackage[toc,page]{appendix}
  22. %\usepackage{fontspec}
  23. %\setmainfont{Times New Roman}
  24. %\usepackage{hyphenat} \hyp{}
  25. %\usepackage{sectsty}
  26. %0205218599
  27. %\lineskip
  28. %\setlength\afterchapskip{18pt} %capítulo começa nas páginas ímpares
  29. \setlength{\parindent}{0.75cm}
  30. \setstretch{1.5}
  31. %\onehalfspacing %espaçamento entre linas
  32. \newcommand{\signaturerule}{\rule{30em}{.4pt}}
  33. %\renewcommand{\arraystretch}{0.5}
  34. \renewcommand{\baselinestretch}{1.5}
  35. \setlength{\parskip}{0pt}
  36.  
  37. \setlength{\nomitemsep}{-\parsep}
  38.  
  39. \makenomenclature
  40.  
  41. \usetikzlibrary{shapes,arrows}
  42. \setcounter{secnumdepth}{4}
  43. \setcounter{tocdepth}{4}
  44. %\setlength{\parskip}{0.3cm} (espaço entre os parágrafos)
  45. \titleformat{\paragraph}
  46. {\normalfont\normalsize\normalfont}{\theparagraph}{1em}{}\fontsize{12}{12}
  47. %\titlespacing*{\paragraph}
  48.  
  49. %\patchcmd{\thebibliography}{\section*{\refname}}{}{}{}
  50.  
  51. \titleformat*{\section}{\normalfont\fontfamily{phv}\fontsize{14}{14}\bfseries}
  52. \titleformat*{\subsection}{\normalfont\fontfamily{phv}\fontsize{12}{12}\normalfont}{}{}{}
  53. \titleformat*{\subsubsection}{\normalfont\fontfamily{phv}\fontsize{12}{12}\normalfont}{}{}{}
  54.  
  55. %nas figura e tabelas, mudar o nome para "FIG." e "TAB.", respectivamente
  56. %nas equações, além da numeração colocar o termo "EQ."
  57. \counterwithin{figure}{section}
  58. \counterwithin{table}{section}
  59. \counterwithin{equation}{section}
  60. \numberwithin{equation}{section}%{subsubsection}
  61.  
  62. \graphicspath{ {figures/} }
  63. \graphicspath{{images/}{../images/}}
  64. \newcommand{\ii}{\'{\i}}
  65. \newcommand{\ca}{\c{c}\~ao}
  66. \newcommand{\co}{\c{c}\~oes}
  67. \newcommand{\sectionbreak}{\clearpage}
  68.  
  69. \addto\captionsbrazil{\renewcommand*\contentsname{\centering SUMÁRIO}}
  70.  
  71. \addto\captionsbrazil{\renewcommand*{\listfigurename}{\centering LISTA DE ILUSTRAÇÕES}}
  72.  
  73. \addto\captionsbrazil{\renewcommand*{\listtablename}{\centering LISTA DE TABELAS}}
  74.  
  75. \titlecontents{section}[2.5em]{\addvspace{1em}\bfseries}{\contentslabel{2.9em}}{\hspace*{-2.9em}}{\titlerule*[1pc]{.}\contentspage}
  76. %\dottedcontents{section}[2.5em]{\bfseries}{2.9em}{1pc}
  77. \dottedcontents{subsection}[2.5em]{}{3.3em}{1pc}
  78. \dottedcontents{subsubsection}[2.5em]{}{3.3em}{1pc}
  79.  
  80.  
  81. \titlecontents{figure}[0em]{\addvspace{1.5em}}{FIG.{\thecontentslabel} \hspace*{1.5em}}{}{\titlerule*[1pc]{$\cdot$}\contentspage}
  82.  
  83.  
  84. \titlecontents{table}[0em]{\addvspace{1.5em}}{TAB.{\thecontentslabel} \hspace*{1.5em}}{}{ \titlerule*[1pc]{$\cdot$}\contentspage}
  85.  
  86.  
  87. \renewenvironment{abstract}
  88. {\small
  89. \begin{center}
  90. \bfseries \abstractname\vspace{-.5em}\vspace{0pt}
  91. \end{center}
  92. \list{}{%
  93. \setlength{\leftmargin}{0mm}% <---------- CHANGE HERE
  94. \setlength{\rightmargin}{\leftmargin}%
  95. }%
  96. \item\relax}
  97. {\endlist}
  98.  
  99.  
  100. \begin{document}


Is there someone can help me, please?

Tags:

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

Postby Johannes_B » Sat Feb 24, 2018 9:52 am

Wouldn't \subsection[Capybara]{CAPYBARA} be the most simple thing to do?

Crosspost on TeX.SX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 2 guests