# Showing the words Remark, Example and Table in Bold and Italics font

\documentclass[twoside,12pt,leqno]{article}

\usepackage{amsmath,amsthm,amssymb}
\usepackage{amsfonts,graphicx,geometry}
\usepackage{epsfig,cases,subcaption}
\usepackage{chngcntr}
%\counterwithout{section}{chapter}
\counterwithin{table}{section}%{chapter}{part}

\usepackage{url, hyperref}

%Theorem Style%%%%%%%
\numberwithin{equation}{section}
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}{Corollary}[section]
\newtheorem{lem}{Lemma}[section]
\newtheorem{rem}{Remark}[section]
\newtheorem{exm}{Example}[section]
\newtheorem{dfn}{Definition}[section]
\newtheorem{prop}{Proposition}[section]
%===Theorem=====================================
\geometry{margin=1in}
\newcommand{\subjclass}{\textbf{2010 Mathematics Subject Classification. }}
\newcommand{\keywords}{\textbf{Keywords and phrases. }}
\usepackage{sectsty}
\sectionfont{\fontsize{12}{15}\selectfont}
\let\OLDthebibliography\thebibliography
\renewcommand\thebibliography[1]{
\OLDthebibliography{#1}
\setlength{\parskip}{0pt}
\setlength{\itemsep}{0pt plus 0.3ex}
}

%%%%%%%%%%%%%%section spacing
\usepackage{titlesec}
\titlespacing*{\section}
{0pt}{1ex}{0ex}
\titlespacing*{\subsection}
{0pt}{0ex}{0ex}
\titlespacing*{\subsubsection}
{0pt}{0ex}{0ex}
%%%%%%%%%%%%%%List spacing normal
\usepackage{enumitem}
\setlist[1]{itemsep=-5pt}
%%%%
\setlength{\belowcaptionskip}{-12pt}
%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

sample statement.Sample text. This is a sample statement. Sample text. This is a sample statement. Sample text. This is a sample statement. Sample text. This is a sample statement.Sample text.

\section{Introduction}


Sample text. This is a sample statement. Sample text. This is a sample statement.

\begin{rem}


Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts.Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. \end{rem}

Here I would like to show the word \textbf{Remark} as \textbf{\textit{Remark}} but do not know what modification should I make in preamble. Can any one help ?

\begin{exm} Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts.Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. Sample texts. \end{exm} Here I would like to show the word \textbf{Example} as
\textbf{\textit{Example}} but do not know what modification should I make in preamble. Can any one help ?

Finally, here is an example of a table. But here too I am facing problem. The word Table is not in bold font. I would like to show it as \textbf{\textit{Table}}. What modification should be made in preamble ?

\begin{table}[ht]
\centering
\caption{}
\label{tab:example5}
\begin{tabular}{|r||r|r|r|r|r|}
\hline
& $2$ & $2$ & $2$ & $2$ & $2$ \\
\hline
$10$ & $8$ & $6$ & $4$ & $2$ & $\times$ \\
& $16$ & $12$ & $8$ & $4$ &   \\
\hline
$40$ & $24$ & $12$ & $4$ & $\times$ &   \\
& $48$ & $24$ & $8$ & & \\
\hline
$80$ & $32$ & $8$ & $\times$ && \\
& $64$ & $16$ & && \\
\hline
$80$ & $16$ & $\times$ & && \\
& $32$ & &&& \\
\hline
$32$ & $\times$ & &&& \\
\hline
\end{tabular}
\end{table}

\end{document}

• Please note that we in general do not like going to external URLs for example code. Please post the code here instead. External URLs rot over time and thus your question will not be helpful to others. Mar 18, 2021 at 13:19
• Alright. I will post the code. And sorry for the inconvenience
– KON3
Mar 18, 2021 at 13:22
• I have tried my best to explain following the rules of tex.StackExchange. However I think further modifications will be required but unable to do so :-(
– KON3
Mar 18, 2021 at 13:33
• Perhaps to define a new command in the preamble? Put this in the preamble: \newcommand{\bi}[1]{\textbf{\textit{#1}}} where bi stands for bold and italic. Then, in the document, write \bi{Table} or \bi{Remark} or whatever word you wish to be marked up that way.
– tush
Mar 18, 2021 at 13:38

To change the format of the table caption you can use \captionsetup. For example, if you want to obtain the word and the number in bold-italic font you can use

\captionsetup{format=plain, labelfont={bf,it}}


For the bold-italic in remarks,... you can define a new theorem style:

\newtheoremstyle{bolditalic}
{3pt}
{3pt}
{\itshape}
{0pt}
{\bfseries\itshape}
{}
{.5em}
{}


Then place the \newtheorem behind calling the style, for example:

\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}{Corollary}[section]
\newtheorem{lem}{Lemma}[section]

\theoremstyle{bolditalic}
\newtheorem{rem}{Remark}[section]


Edit: If in the table caption you only want to format the name but not the number, you can do something like this:

\DeclareCaptionLabelFormat{bfit}{{\bfseries\itshape#1} #2}

Where #1 correspond to the word "Table" in this case. You ca see how to apply some basic formatting to that part in this example. The #2 correspond to the "number", if you want to format this part you can add something similar to the "#1" part.