3

I borrow a template on Overleaf for my report. However, I would like to change the first letter "N" back to ordinary letter style.

enter image description here

Thank you everyone!

New edition : I am sorry for not including the code. The original code is also attached here.

\documentclass[11pt, titlepage]{article}

\usepackage[margin=1in]{geometry}
\usepackage[strict]{changepage}
\usepackage{float}
\usepackage{fancyhdr}
\usepackage{mhchem}
\usepackage{siunitx}
\usepackage{wrapfig, booktabs}
\usepackage{enumitem}
\usepackage{caption}
\usepackage{commath}
\usepackage{amsmath}
\usepackage[hang]{footmisc}
\usepackage{multicol}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{graphicx}
\usepackage[]{algorithm2e}
\usepackage{subcaption}

\newcommand{\experimentDate}{2015-2016
\author{Student}
\newcommand{\authorLastName}{Student}
\title{Title}

\date{\parbox{\linewidth}{}}

%\pagestyle{fancy}
\fancyhf{}
\rhead{\authorLastName\ \thepage}
\lhead{\experimentShortName}
\cfoot{\className\ -- \experimentNumber}

\usepackage{color}
\usepackage{sectsty}

\definecolor{WordSectionBlue}{RGB}{30, 90, 147}

\allsectionsfont{\color{WordSectionBlue}}

\newcommand{\gpmol}{\si{\gram\per\mol}}

\begin{document}
    \maketitle
    \setcounter{tocdepth}{1}
    \section{Introduction}
    \subsection{Aim}
    \begin{paragraph}
    Nonlinear dynamics has diverse applications, ranging from medical diagnosis to computer encryption.
    \end{paragraph}
\end{document}
  • 1
    Welcome to TeX.SE. Please post actual code rather than a screenshot of code, and please make sure that the code actually generates the problem behavior you're looking to fix. (The package loading instructions you're showing in the screenshot do not, by themselves, create the problem behavior.) – Mico Apr 12 '16 at 7:47
1

You may be misusing the \paragraph macro. \paragraph is a sectioning command -- like \section, \subsection, and \subsubsection. paragraph is not an environment pre-defined by LaTeX. It just so happens that because of the way that LaTeX handles the (otherwise) non-existent commands \begin{paragraph} and \end{paragraph}, you're not encountering an immediate error message.

In TeX and LaTeX, paragraphs (the typographic units) are blocks of text; they do not need to be encased in \begin{paragraph} and \end{paragraph} statements.

Here's a simplified version of your code, with the \begin{paragraph} and \end{paragraph} instructions removed.

enter image description here

\documentclass[11pt, titlepage]{article}

\usepackage[margin=1in]{geometry}
\usepackage{color}
\definecolor{WordSectionBlue}{RGB}{30, 90, 147}
\usepackage{sectsty}
\allsectionsfont{\color{WordSectionBlue}}

\begin{document}

\section{Introduction}

\subsection{Aim}

Nonlinear dynamics has diverse applications, ranging from 
medical diagnosis to computer encryption.

\end{document}
  • Thanks for the clear explanation on \begin{}. Indeed it is no need to use \begin{paragraph}. Would you mind to point out which command was removed in my original code to recover normal text style for the first letter? It would be really helpgful =] – Simon Apr 12 '16 at 13:07
  • @Simon - The main change I made was to remove the \begin{paragraph} and \end{paragraph} statements. (I also stripped down the preamble and omitted the titlepage-related material, so that only instructions relevant to the question at hand remained.) – Mico Apr 12 '16 at 13:09
  • Removing '\begin{paragraph}' and '\end{paragraph}' reduces the text style back already. Thank you very much. – Simon Apr 12 '16 at 13:12
2

The command \begin{paragraph} is incomplete, it requires an extra argument as in

\begin{paragraph}{This is the title of the paragraph}
This is the text of the paragraph.
\end{paragraph}
  • Sorry. It is now corrected. – Simon Apr 12 '16 at 8:18
  • 3
    paragraph is not an environment but like \section a command which takes an argument. – Ulrike Fischer Apr 12 '16 at 8:18
  • @UlrikeFischer To my surprise, \begin{paragraph} exists and works. however, it is recommended to use \paragraph{Title}. – Tom-Tom Apr 12 '16 at 8:27
  • 1
    @Tom-Tom - \begin{paragraph} doesn't actually exist. However, it just happens to work because \begin{paragraph} is translated internally to \paragraph (and \end{paragraph} is translated to \endparagraph. Do use the syntax as it is intended, and the problem goes away automatically. Note that in LaTeX, \paragraph is a sectioning header command, just like \section and \subsection; it is not meant to to mark off paragraphs of text. – Mico Apr 12 '16 at 8:59
  • 1
    All commands can be used as \begin{XX} as \begin{XX} calls \XX, but the outcome is not always what you would expect. – Ulrike Fischer Apr 12 '16 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.