Disalignment of Chapter Page Numbers in TOC in LaTex - latex

In this MWE the page numbers of the chapters in the TOC are shifted slightly to the right from chapter 2 onwards.
I like the format of the chapter headings, but it would not be a problem if they were formatted differently in the table of contents.
How can I fix the problem?
\documentclass[a4paper,
fontsize=13pt,
paper=A4,
DIV=calc,
headsepline,
plainheadsepline,
numbers=noenddot
]{scrreprt}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\KOMAoptions{toc=chapterentrydotfill}
\usepackage[left=3cm,right=2cm,bottom=3cm]{geometry}
\usepackage[english,ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[normalem]{ulem}
\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
\usepackage{url}
\usepackage{blindtext}
\newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
\usepackage{scrlayer-scrpage}
\clearscrheadfoot
\ohead[\pagemark]{\pagemark}
\pagestyle{scrheadings}
\usepackage{setspace}
\renewcommand{\chapterpagestyle}{scrheadings}
\begin{document}
\changefont{cmr}{m}{n} %computer modern %allgemeine Schriftart
\setkomafont{sectioning}{\normalcolor\changefont{cmr}{m}{sc}}
\newpage
\singlespacing
\tableofcontents
\newpage
\Blinddocument
\Blinddocument
\Blinddocument
\end{document}

The numbers will be aligned if you remove all the additional spaces you introduce with your \changefont macro:
\documentclass[a4paper,
fontsize=13pt,
paper=A4,
DIV=calc,
headsepline,
plainheadsepline,
numbers=noenddot
]{scrreprt}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\KOMAoptions{toc=chapterentrydotfill}
\usepackage[left=3cm,right=2cm,bottom=3cm]{geometry}
\usepackage[english,ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[normalem]{ulem}
\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
\usepackage{url}
\usepackage{blindtext}
\newcommand{\changefont}[3]{\fontfamily{#1}\fontseries{#2}\fontshape{#3}\selectfont}
\usepackage{scrlayer-scrpage}
\clearscrheadfoot
\ohead[\pagemark]{\pagemark}
\pagestyle{scrheadings}
\usepackage{setspace}
\renewcommand{\chapterpagestyle}{scrheadings}
\begin{document}
\changefont{cmr}{m}{n} %computer modern %allgemeine Schriftart
\setkomafont{sectioning}{\normalcolor\changefont{cmr}{m}{sc}}
\newpage
\singlespacing
\tableofcontents
\newpage
\Blinddocument
\Blinddocument
\Blinddocument
\end{document}

Related

How could I list the subsections in beamer (table of contens)?

Hello I trying to list the subsections in table of contents (beamer), but I can't get the result ? Anyone knows how to do it ?
My code (I am using the \usetheme{CambridgeUS}):
\documentclass[handout,10pt,aspectratio=169]{beamer}
\usepackage[spanish]{babel}
\usepackage{multirow,rotating}
\usepackage{color}
\usepackage{hyperref}
\usepackage{tikz-cd}
\usepackage{array}
\usepackage{siunitx}
\usepackage{mathtools,nccmath}%
\usepackage{etoolbox, xparse}
\usecolortheme{dolphin}
\usepackage{lipsum}
\usepackage{natbib}
\usepackage{hyperref}
\usepackage{calc}
\usepackage{environ}
\usepackage{courier}
\usepackage{tcolorbox}
\usetheme{CambridgeUS}
\title[]{\textcolor{black}{\vskip 1.5cm\textbf {Title}}}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\begin{frame}
\frametitle{Contenido}
\tableofcontents
\end{frame}
\section{Introducción}
\begin{frame}{Introducción}
\subsection{sismos lentos}
\end{frame}
\end{document}
Never use sectioning commands like \section or \subsection within a frame. They must be used outside the frame.
Apart from this problem, you can use https://stackoverflow.com/a/74094309/2777074 to get squares in the toc:
\documentclass[handout,10pt,aspectratio=169]{beamer}
\usepackage[spanish]{babel}
\usepackage{multirow,rotating}
%\usepackage{color}
%\usepackage{hyperref}
\usepackage{tikz-cd}
\usepackage{array}
\usepackage{siunitx}
\usepackage{mathtools,nccmath}%
\usepackage{
%etoolbox,
xparse}
\usecolortheme{dolphin}
\usepackage{lipsum}
\usepackage{natbib}
%\usepackage{hyperref}
\usepackage{calc}
\usepackage{environ}
\usepackage{courier}
\usepackage{tcolorbox}
\usetheme{CambridgeUS}
\title[]{\textcolor{black}{\vskip 1.5cm\textbf {Title}}}
\setbeamertemplate{sections/subsections in toc}[square]
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\begin{frame}
\frametitle{Contenido}
\tableofcontents
\end{frame}
\section{Introduccion}
\subsection{sismos lentos}
\begin{frame}{Introduccion}
\end{frame}
\end{document}

Latex section custom numbering

I am using a document class article and package kafkanotes. I want to start my section numbering from 4 instead of 1. Is it possible? How to do it?
My complete sty file
%==============STYLE DIMULAI==============%
\usepackage[marginparwidth=6cm, marginparsep=0.7cm]{geometry}
%Package Matematika
\usepackage{amsmath}
%Style Gambar
\usepackage{graphicx}
\usepackage{floatrow}
\floatsetup[widefigure]{margins=hangright,capposition=beside,
capbesideposition={bottom, right},floatwidth=\textwidth}
%Package Catatan di Margin
\usepackage{sidenotes}
%Style \maketitle
\usepackage{titlesec}
\makeatletter
\renewcommand{\maketitle}{\bgroup\setlength{\parindent}{0pt}
\begin{flushleft}
{\Huge\sffamily\bfseries\#title}
\vskip 1.5em
{\sffamily\#author}
\end{flushleft}\egroup
}
\makeatother
%Header and Footer Package
\usepackage{fancyhdr}
%Style Abstract
\renewenvironment{abstract}
{\par{\bfseries \noindent \sffamily \abstractname.}}
{\vskip 0.1em \medskip\noindent \rule{\linewidth}{.5pt}}
%Font Teks Utama dan Sesi
\usepackage{lmodern}
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
\usepackage[T1]{fontenc}
\usepackage{sectsty}
\sectionfont{\sffamily\fontsize{15}{15}\selectfont}
\subsectionfont{\sffamily\fontsize{10}{5}\selectfont}
%Style Hyperlink
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
%Pembahasaan ke Indonesia
\renewcommand{\figurename}{\footnotesize Figure}
\renewcommand{\tablename}{\footnotesize Table}
\renewcommand{\contentsname}{Outline}
My tex file:
\documentclass{article}
\usepackage{kafkanotes}
\usepackage{booktabs}
\usepackage{biblatex} %Imports biblatex package
\addbibresource{bibliography.bib} %Import the bibliography file
%Judul dan Penulis
\title{XYZ}
\author{\textbf{ABC}}
\begin{document}
\begin{titlepage}
\thispagestyle{empty}
\maketitle
\begin{abstract}
Lorem
\end{abstract}
\tableofcontents
\end{titlepage}
\section{Some section}
\printbibliography
\end{document}
You could increase your section counter at the start of the document with \addtocounter{section}{3}
\documentclass{article}
\makeatletter
%==============STYLE DIMULAI==============%
\usepackage[marginparwidth=6cm, marginparsep=0.7cm]{geometry}
%Package Matematika
\usepackage{amsmath}
%Style Gambar
\usepackage{graphicx}
\usepackage{floatrow}
\floatsetup[widefigure]{margins=hangright,capposition=beside,
capbesideposition={bottom, right},floatwidth=\textwidth}
%Package Catatan di Margin
\usepackage{sidenotes}
%Style \maketitle
\usepackage{titlesec}
\makeatletter
\renewcommand{\maketitle}{\bgroup\setlength{\parindent}{0pt}
\begin{flushleft}
{\Huge\sffamily\bfseries\#title}
\vskip 1.5em
{\sffamily\#author}
\end{flushleft}\egroup
}
\makeatother
%Header and Footer Package
\usepackage{fancyhdr}
%Style Abstract
\renewenvironment{abstract}
{\par{\bfseries \noindent \sffamily \abstractname.}}
{\vskip 0.1em \medskip\noindent \rule{\linewidth}{.5pt}}
%Font Teks Utama dan Sesi
\usepackage{lmodern}
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
\usepackage[T1]{fontenc}
\usepackage{sectsty}
\sectionfont{\sffamily\fontsize{15}{15}\selectfont}
\subsectionfont{\sffamily\fontsize{10}{5}\selectfont}
%Style Hyperlink
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
%Pembahasaan ke Indonesia
\renewcommand{\figurename}{\footnotesize Figure}
\renewcommand{\tablename}{\footnotesize Table}
\renewcommand{\contentsname}{Outline}
\makeatother
\usepackage{booktabs}
\usepackage{biblatex} %Imports biblatex package
\addbibresource{bibliography.bib} %Import the bibliography file
%Judul dan Penulis
\title{XYZ}
\author{\textbf{ABC}}
\begin{document}
\addtocounter{section}{3}
\begin{titlepage}
\thispagestyle{empty}
\maketitle
\begin{abstract}
Lorem
\end{abstract}
\tableofcontents
\end{titlepage}
\section{Some section}
\printbibliography
\end{document}

Removing spaces between chapter LoF in table of contents

I'm trying to remove the space in LoF between different chapters. i have tried different solutions(patching it as well) but it is not working. I have attached the codes below for your reference. Any help or pointers to resolve it would be highly appreciated.
Edit: Link to a minimal working project file depicting the error.
Working Example
\documentclass[twoside, 12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}
%package for higlighting text
\usepackage{color,soul}
%packages for multicol glossary, bibliography and list
\usepackage[section,numberedsection=autolabel, acronym]{glossaries}
\usepackage{setspace}
\usepackage{enumitem}
\usepackage[style=ieee]{biblatex}
\usepackage{glossary-mcols}
\usepackage{multicol}
%package for comments
\usepackage{verbatim}
%%Random text
\usepackage{lipsum}
%packages for fancy headers
\usepackage{blindtext}
\usepackage{fancyhdr}
\usepackage{tikz}
%package for subfigures
\usepackage{subfigure}
\makeglossaries
% Use package below to change margins and graphics
\usepackage{graphicx}
\usepackage[a4paper,top=25mm,bottom=25mm,left=25mm,right=25mm]{geometry}
% text color package
\usepackage{xcolor}
% use to customize chapter headings of toc lof lot
\usepackage{tocloft}
\renewcommand{\cfttoctitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftaftertoctitle}{\hspace*{\fill}}
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftafterlottitle}{\hspace*{\fill}}
\renewcommand{\cftloftitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftafterloftitle}{\hspace*{\fill}}
\usepackage{sectsty}
\chapternumberfont{\Large}
\chaptertitlefont{\Large}
\usepackage{hyperref}
%for table
\usepackage{booktabs}
%maths Package
\usepackage{amsmath}
%minted package
\usepackage[]{minted}
\usepackage{fancyvrb}
%for greek words
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}
\usepackage{lmodern}
\usemintedstyle{vs}
\setminted{bgcolor=myGray,
breaklines,
mathescape,
linenos,
numbersep=5pt,
frame=single,
numbersep=5pt,
xleftmargin=0pt,
breaksymbolleft=\raisebox{0.8ex}{
\small\reflectbox{\carriagereturn}},
breaksymbolindentleft=0pt,
breaksymbolsepleft=0pt,
breaksymbolindentright=0pt,
breaksymbolsepright=0pt
}
%for code listing
\usepackage{xcolor}
\usepackage{listings}
\definecolor{myGray}{RGB}{245, 239, 239}
\definecolor{maroon}{RGB}{128,0,0}
\definecolor{forestGreen}{RGB}{1,68,33}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{myGray},
commentstyle=\color{forestGreen},
keywordstyle=\color{blue},
numberstyle=\tiny\color{gray},
stringstyle=\color{maroon},
basicstyle=\ttfamily\small,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
frame=single
}
\lstset{style=mystyle}
%Patch to remove the space in LoF, LoT, LoC per chapter basis
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\patchcmd{\#chapter}{\addtocontents{lof}{\protect\addvspace{10\p#}}}{}{}{}% LoF
\patchcmd{\#chapter}{\addtocontents{lot}{\protect\addvspace{10\p#}}}{}{}{}% LoT
\makeatother
%for custom caption
\usepackage{caption}
% document begins here
\begin{document}
%Footer and header fancy - chapter x. ChapterName format
\fancyhead{}
\fancyhead[RO,LE]{\leftmark}
\fancyfoot{}
\fancyfoot[CE,CO]{\thepage}
\newpage
\phantomsection
\tableofcontents
\addcontentsline{toc}{chapter}{Table of Contents}
\newpage
\listoftables
\phantomsection
\addcontentsline{toc}{chapter}{\listtablename}
\newpage
\listoffigures
\phantomsection
\addcontentsline{toc}{chapter}{\listfigurename}
\newpage
\renewcommand{\lstlistingname}{Code}
\renewcommand{\lstlistlistingname}{List of \lstlistingname s}
\lstlistoflistings
\phantomsection
\addcontentsline{toc}{chapter}{\lstlistlistingname}
%CHAPTERS BEGIN
\pagenumbering{arabic}
\newpage
\input{Chapters/Intro}
\input{Chapters/Results}
\newpage
%%APPENDIX BEGINS
\fancyhead{}
\fancyfoot{}
\end{document}
Please find below the code for respective
The below figures are part of sample Intro file.
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{<someImage>}
\caption{Software Development Lifecycle}
\label{fig:swCycle}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{<someImage>}
\caption{Software Development Lifecycle2}
\label{fig:swCycle2}
\end{figure}
Results File
\begin{figure}[h]
\centering
\includegraphics[scale=0.5]{<someImage>}
\caption{Software Development Lifecycle3}
\label{fig:swCycle3}
\end{figure}
You could remove the spaces between the list entries of different chapters if you make the patches before you load hyperref:
\documentclass[twoside, 12pt]{report}
% use to customize chapter headings of toc lof lot
\usepackage{tocloft}
\renewcommand{\cfttoctitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftaftertoctitle}{\hspace*{\fill}}
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftafterlottitle}{\hspace*{\fill}}
\renewcommand{\cftloftitlefont}{\hspace*{\fill}\Large\bfseries}
\renewcommand{\cftafterloftitle}{\hspace*{\fill}}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\#chapter}{\addtocontents{lof}{\protect\addvspace{10\p#}}}{}{}{}
\patchcmd{\#chapter}{\addtocontents{lot}{\protect\addvspace{10\p#}}}{}{}{}
\makeatother
% load hyperref after these patches
\usepackage{hyperref}
\begin{document}
\listoffigures
\chapter{test}
\begin{figure}[htbp]
\caption{heading}
\end{figure}
\chapter{test}
\begin{figure}[htbp]
\caption{heading}
\end{figure}
\end{document}

Citation in figure caption showing up as text in list of tables

When using \cite in a caption for a figure, the citation shows up as the citation number in the caption (as it should) but as text in the list of figures. I never ran into this problem before so I'm not sure what's going on.
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{fullpage}
\usepackage{subcaption}
\usepackage{natbib}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{float}
\usepackage{comment}
\usepackage[table,xcdraw]{xcolor}
\usepackage{pdfpages}
\usepackage{makecell}
\usepackage{textcomp}
\usepackage{siunitx}
\usepackage{graphicx,changepage}
\usepackage{setspace}
\usepackage{chngcntr}
\usepackage{verbatim}
\usepackage{listings}
\usepackage{booktabs}
\usepackage{pgfplots}
\usepackage[thinlines]{easytable}
\usepackage{tabularx}
\usepackage{tocloft}
\usepackage[normalem]{ulem}
\begin{document}
\makeatletter
\renewcommand{\l#table}{\#dottedtocline{1}{1.5em}{2.5em}}
\makeatother
\listoftables
\begin{figure}[H]
\centering
\includegraphics [width=0.7\textwidth] {Images/cnc-processing-center-centateq-p-110_01.jpg}
\caption{Homag Centateq P-110 \cite{HOMAG}}
\label{fig:cnc_mill}
\end{figure}
\end{document}
i tried compiling your code on overleaf, to do that, i added some lines on your code as is show following:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{fullpage}
\usepackage{subcaption}
\usepackage{natbib}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{float}
\usepackage{comment}
\usepackage[table,xcdraw]{xcolor}
\usepackage{pdfpages}
\usepackage{makecell}
\usepackage{textcomp}
\usepackage{siunitx}
\usepackage{graphicx,changepage}
\usepackage{setspace}
\usepackage{chngcntr}
\usepackage{verbatim}
\usepackage{listings}
\usepackage{booktabs}
\usepackage{pgfplots}
\usepackage[thinlines]{easytable}
\usepackage{tabularx}
\usepackage{tocloft}
\usepackage[normalem]{ulem}
\begin{document}
\makeatletter
\renewcommand{\l#table}{\#dottedtocline{1}{1.5em}{2.5em}}
\makeatother
\listoftables
\listoffigures %added to provide a list of figures
\begin{figure}[H]
\centering
\includegraphics [width=0.7\textwidth] {test.pdf}
\caption{Homag Centateq P-110 \cite{HOMAG}}
\label{fig:cnc_mill}
\end{figure}
\begin{thebibliography}{9} % Added the thebibliography enviromment to use Homag as exemple.
\bibitem{HOMAG}
Homag.
\end{thebibliography}
\end{document}
As is shown on the figure above, the list of figures is like you want. I suspect that you have troubles with your LaTex compiler, try do a upgrade on your compiler or use another, like overleaf.

Unwanted blank page before title in Latex

there is an Unwanted blank page before title in Latex, and I don't understand why there are string "_result_result" in this blank page, I am pretty sure I didn't add them
Here is my code.
**I am editing in overleaf and using LuaLaTex **
\documentclass[letterpaper,twocolumn,12pt]{article}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,chains}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{float}
\usepackage{subfigure}
\usepackage{fontspec}
\usepackage{underscore}
\usepackage{ragged2e}
\usepackage{geometry}
\usepackage{array}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{textcomp}
\usepackage{pgfplots}
\usepackage{indentfirst}
\setlength{\parindent}{2em}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{subfigure}
\usepackage[font=footnotesize,labelfont=bf]{caption}
\usepackage{subcaption}
\geometry{centering,textwidth=0.887589cm,columnsep=.81cm,left=1.6cm,right=1.6cm,top=1.91cm,bottom=2.54cm}
\pagenumbering{gobble}
\usepackage{verbatim}
\newtheorem{definition}{Definition}
\usepackage{titlesec}
\usepackage[]{caption2}
\renewcommand{\figurename}{Fig.}
\renewcommand{\captionlabeldelim}{.~}
\renewcommand{\thesubfigure}{Figure.\arabic{figure}(\alph{subfigure})}
\makeatletter \renewcommand{\#thesubfigure}{\thesubfigure\space}
\renewcommand{\p#subfigure}{} \makeatother
\titleformat*{\section}{\normalsize\centering\textbf}
\titleformat*{\subsection}{\indent\small\centering\textbf}{\hspace{1cm}}
\renewcommand\thesection{\Roman{section}.}
\renewcommand\thesubsection{\arabic{subsection}.}
\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}}
\newcommand{\tnewroman}{\fontspec{Times New Roman}}
\providecommand{\keywords}[1]
{
\footnotesize
\textbf{Key words --} #1
}
\providecommand{\abstrct}[1]
{
\footnotesize
\textbf{Abstract --} #1
}
\newcommand{\tabincell}[2]{\begin{tabular}{#{}#1#{}}#2\end{tabular}}
\setlength{\parskip}{0.5\baselineskip}
%set font style
\setmainfont{Times New Roman}
%set title and author
\title{\vspace{-1cm}My title}
%begin the document
\begin{document}
\maketitle
the unwanted blank page
Please don't ignore the errors and warnings in the .log file. they exactly tell you which of your package are incompatible and which commands are missing.
To summarise the changes:
lots of incompatible packages
syntax errors in \titleformat. In particular you must not write \titleformat{}{}
writing \textbf some text is wrong. It is a macro so you either need \textbf{some text} or \bfseries some text
you should clean up your preamble, many of the packages are redundant, make no sense or are loaded multiple times.
% !TeX TS-program = xelatex
\documentclass[letterpaper,twocolumn,12pt]{article}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,chains}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{float}
\usepackage{subfigure}
\usepackage{fontspec}
\usepackage{underscore}
\usepackage{ragged2e}
\usepackage{geometry}
\usepackage{array}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{textcomp}
\usepackage{pgfplots}
\usepackage{indentfirst}
\setlength{\parindent}{2em}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{subfigure}
\usepackage[font=footnotesize,labelfont=bf]{caption}
%\usepackage{subcaption}
\geometry{centering,textwidth=0.887589cm,columnsep=.81cm,left=1.6cm,right=1.6cm,top=1.91cm,bottom=2.54cm}
\pagenumbering{gobble}
\usepackage{verbatim}
\newtheorem{definition}{Definition}
\usepackage{titlesec}
%\usepackage[]{caption2}
\renewcommand{\figurename}{Fig.}
%\renewcommand{\captionlabeldelim}{.~}
\renewcommand{\thesubfigure}{Figure.\arabic{figure}(\alph{subfigure})}
\makeatletter \renewcommand{\#thesubfigure}{\thesubfigure\space}
\renewcommand{\p#subfigure}{} \makeatother
\titleformat*{\section}{\normalsize\centering\bfseries}
\titleformat*{\subsection}{\indent\small\centering\bfseries\hspace{1cm}}
\renewcommand\thesection{\Roman{section}.}
\renewcommand\thesubsection{\arabic{subsection}.}
\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}}
\newcommand{\tnewroman}{\fontspec{Times New Roman}}
\providecommand{\keywords}[1]
{
\footnotesize
\textbf{Key words --} #1
}
\providecommand{\abstrct}[1]
{
\footnotesize
\textbf{Abstract --} #1
}
\newcommand{\tabincell}[2]{\begin{tabular}{#{}#1#{}}#2\end{tabular}}
\setlength{\parskip}{0.5\baselineskip}
%set font style
\setmainfont{Times New Roman}
%set title and author
\title{\vspace{-1cm}My title}
\author{names}
%begin the document
\begin{document}
\maketitle
\justifying
%%
\begin{thebibliography}{00}
\bibitem{1}My bib
\end{thebibliography}
\end{document}

Resources