TransWikia.com

How to add some indentation/space in the references numbered list?

TeX - LaTeX Asked on April 15, 2021

I am writing a thesis using UTM.sty:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The package UTMthesis.sty will produce the output    %
% of a thesis according to UTM Thesis Manual,          %     
% School of Graduate Studies, 2007.                    %
% Yusof Yaacob, Department of Mathematical Sciences,   %
% Faculty of Science,  Universiti Teknologi Malaysia   %
% 81310 Johor Bahru, Malaysia                          %
% e-mail: [email protected]                               %
% 24 December 2009                                     %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LaTeX cod for chapter header
makeatletter
def@makechapterhead#1{
  %vspace*{20p@}   %  vspace*{15p@}
  {parindent z@ 
      centering  
    normalfont
    ifnum c@secnumdepth >m@ne
      if@mainmatter
      normalsize 
           bfseries @chapappspace thechapter 
       parnobreak
              vskip 1.4baselineskip 
      fi
    fi
    interlinepenalty@M
    normalsize     
         bfseries #1parnobreak 
       vskip 1.4baselineskip %
  }}
def@schapter#1{if@twocolumn
                   @topnewpage[@makeschapterhead{#1}]%
                 else
                   @makeschapterhead{#1}
                   @afterheading
                 fi}
def@makeschapterhead#1{
  %vspace*{20p@} % vspace*{20p@} %
  {parindent z@  
    centering  
    normalfont 
    interlinepenalty@M
    normalsize 
    bfseries  #1parnobreak
         vskip 1.4baselineskip  
  }}
makeatother
renewcommand{chaptername}{CHAPTER}
%------------------------------------------------------------
% Commands for layout
   %setlength{topmargin}{-1.2cm}
   %setlength{oddsidemargin}{1.7cm}   %setlength{oddsidemargin}{1.46cm} 
setlength{textwidth}{14.5cm}
   setlength{textheight}{24.5cm} %  setlength{textheight}{24.5cm}
   %setlength{headheight}{2mm}
    %setlength{headsep}{10.175mm}
%-------------------------------------------------------------
% Command for 1.5 spacing
   %renewcommand{baselinestretch}{1.5}
usepackage{doublespace}
setstretch{1.5}
%-------------------------------------------------------------
% Command for  indentation
   setlengthparindent{.55in}
   usepackage{indentfirst} %1st line indented after section...
%-------------------------------------------------------------
% Command for space between paragraph
  makeatletter
    %setlength{parskip}{1.5baselineskip @plus 3ex
                %  @minus 2.0ex}
    setlength{parskip}{2baselineskip @plus .01ex
                  @minus .01ex}
   makeatother
%-------------------------------------------------------------
% Commands for no hyphenation and right justified
    hyphenpenalty=10000 sloppy
    raggedbottom
%-------------------------------------------------------------
% Command to get rid of default running head
   pagestyle{myheadings}
%-------------------------------------------------------------
% Command for  page number 
%  makeatletter
%    renewcommand{ps@plain}{%
%    renewcommand{@oddhead}{hfilltextrm{thepage}}
%    renewcommand{@evenhead}{@oddhead}
%    renewcommand{@evenfoot}{}
%    renewcommand{@oddfoot}{}  }
%   makeatother
%-----------------------------------------------------------------

 %For section font
 % usepackage{sectsty} 
  %  chapterfont{centeringnormalsizeuppercase}
  %  sectionfont{normalsizeuppercase}
   % subsectionfont{normalsize}
   % subsubsectionfont{itshapenormalsize}
%---------------------------------------------------------
%--------------------------------------------------------------
% Commands for REFERENCES name
renewcommand{bibname}{REFERENCES}
%--------------------------------------------------------------
% Commands to change vertical space in section and subsection
makeatletter
renewcommand{section}{@startsection
  {section}%      % the name
  {1}             % the level
  {0cm}           % the indent
  {1.0cm}         % the beforeskip
  {0.01cm}    %{0.5cm}    % the afterskip
  {normalfontnormalsizebfseries} } % the style
renewcommand{subsection}{@startsection
  {subsection}%   % the name
  {2}             % the leve2
  {0cm}           % the indent
  {1.0cm}         % the beforeskip
  {0.01cm} %{0.5cm}        % the afterskip
  {normalfontnormalsizebfseries} } % the style
makeatother
%--------------------------------------------------------------
% Commands to change horizontal space in section and subsection
% for times romans
%   renewcommand{thesection} % space between sect. etc.
%     {thechapter.arabic{section}hspace{.12in}}
%    renewcommand{thesubsection} 
%       {thesectionhspace{-.3cm}.arabic{subsection} hspace{-.135cm}} 

    renewcommand{thesection}{thechapter.arabic{section}}
    renewcommand{thesubsection}{thesection.arabic{subsection}}
%--------------------------------------------------------------
% Commands for  TocLoFT
  usepackage{tocloft}
    %cftsetrmarg{2.75cm} %    
     cftsetrmarg{1.5cm} %  
       cftsetpnumwidth{1.25cm} 
       %cftsetpnumwidth{1.25cm}
    renewcommand{cftdot}{} % get rid of dots
%Table of Contents
renewcommand{contentsname}{}        % off tocname
setlength{cftchapindent}{.8cm}      % chapter indent
setlength{cftsecindent}{2.3cm}      % section indent
setlength{cftsubsecindent}{3.25cm}  % subsection indent
setlength{cftchapnumwidth}{1.45cm}  % chp number width
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  renewcommand{cftchapafterpnum}{rule{1.75ex}{0ex}}
%   renewcommand{cftsecafterpnum}{rule{1.75ex}{0ex}}
%   renewcommand{cftsubsecafterpnum}{rule{1.75ex}{0ex}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  renewcommand{cftchapafterpnum}{rule{0.75ex}{0ex}}
   renewcommand{cftsecafterpnum}{rule{0.75ex}{0ex}}
   renewcommand{cftsubsecafterpnum}{rule{0.75ex}{0ex}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   renewcommand{cftchappagefont}{normalfont}
%-------------------------------------------------------------  
%List of Table
setlength{cfttabnumwidth}{2.5cm}  %setlength{cfttabnumwidth}{2.5cm}  
renewcommand{listtablename}{} % off lotname
%setlength{cfttabindent}{-.015cm}      % table indent %%%%%%%%%%%%%%%%%%
setlength{cfttabindent}{-.1cm}      % table indent %%%%%%%%%%%%%%%%%%
             renewcommand{cfttabafterpnum}{rule{2ex}{0ex}}
cftsetrmarg{3cm}
%------------------------------------------------------------
 %List of Figure
setlength{cftfignumwidth}{2.5cm}
renewcommand{listfigurename}{} % off lofname
setlength{cftfigindent}{-.1cm}      % figure indent %%%%%%%%%%%%%%%%%%
   renewcommand{cftfigafterpnum}{rule{2ex}{0ex}}
%-------------------------------------------------------------
%-------------------------------------------------------------
% Command for bold caption
makeatletter
  longdef@makecaption#1#2{vskip 10p@   % caption parameter
       setbox@tempboxahbox{{#1,,,,,} #2} %%%%%
       ifdim wd@tempboxa >hsize         % caption parameter
           {#1,,,,,}  #2par  % caption parameter
       else                                   % caption parameter
           hbox tohsize{hfilbox@tempboxahfil}  % caption parameter
   fi}                                            % caption parameter
makeatother   
renewcommand{thesection}{thechapter.arabic{section}}
renewcommand{thesubsection}{thesection.arabic{subsection}}
%--------------------------------------------------------------
usepackage{paralist} %refine list item
%--------------------------------------------------------------
usepackage{latexsym,amsmath,amssymb} % math symbols
%--------------------------------------------------------------
usepackage{graphicx} % .eps graphic
%--------------------------------------------------------------
usepackage{lscape} % for landscape
%-------------------------------------------------------------- 
usepackage{times}
%--------------------------------------------------------------
% Theorem-Like-Environment
usepackage{theorem}
{theorembodyfont{upshape}
newtheorem{lemma}{Lemma}[chapter]
newtheorem{theorem}{rule{0ex}{5ex}Theorem}[chapter]
newtheorem{corollary}{Corollary}[chapter]
newtheorem{proposition}{Proposition}[chapter]
newtheorem{definition}{rule{0ex}{5ex}Definition}[chapter]
newtheorem{example}{Example}[chapter]
newtheorem{remark}{Remark} }
%--------------------------------------------------------
newenvironment{proof}{begin{paragraph}
          {Proof}vspace{-1cm}}{end{paragraph}}
newenvironment{solution}{begin{paragraph}
          {Solution}vspace{-1cm}}{end{paragraph}}
%-----------------------------------------------------------

My working code is as follows:

makeatletter
letmy@xfloat@xfloat
makeatother

documentclass[oneside,12pt,a4paper]{book}
%documentclass[12pt,a4paper]{book}
usepackage{UTMThesis,enumerate,amsfonts,longtable,qtree,etoolbox,array,rotating,pgf,tikz,tikz-cd,algorithm,csquotes,amsmath,algpseudocode,float,listings,color,pdfpages,tabu,blindtext,enumitem,subcaption}

usepackage{siunitx}            % new
usepackage[skip=1ex,           % new
labelsep=quad,      % new
]{caption}          % new

definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
definecolor{mylilas}{RGB}{170,55,241}

newtheorem{conjecture}[theorem]{Conjecture}

makeatletter
renewcommand{@seccntformat}[1]{csname the#1endcsnameqquad}
makeatother

makeatletter
newenvironment{breakablealgorithm}
{% begin{breakablealgorithm}
    begin{center}
        refstepcounter{algorithm}% New algorithm
        hrule height.8pt depth0pt kern2pt% @fs@pre for @fs@ruled
        renewcommand{caption}[2][relax]{% Make a new caption
            {raggedrighttextbf{ALG@name~thealgorithm} ##2par}%
            ifxrelax##1relax % #1 is relax
            addcontentsline{loa}{algorithm}{protectnumberline{thealgorithm}##2}%
            else % #1 is not relax
            addcontentsline{loa}{algorithm}{protectnumberline{thealgorithm}##1}%
            fi
            kern2pthrulekern2pt
        }
    }{% end{breakablealgorithm}
        kern2pthrulerelax% @fs@post for @fs@ruled
    end{center}
}
makeatother

makeatletter
def@xfloat#1[#2]{
    my@xfloat#1[#2]%
    defbaselinestretch{1}%
    @normalsize normalsize
}
makeatother

allowdisplaybreaks
usetikzlibrary{arrows, matrix, positioning, shapes, shapes.geometric, calc, intersections, decorations.pathreplacing}
newcommand{tikznode}[2]{relax
    ifmmode%
    tikz[remember picture,baseline=(#1.base),inner sep=0pt] node (#1) {$#2$};
    else
    tikz[remember picture,baseline=(#1.base),inner sep=0pt] node (#1) {#2};%
    fi}
letopenboxrelax
letiintrelax
letiiintrelax
letiiiintrelax
letidotsintrelax

newcommand*{qed}{hfillensuremath{square}}

%-------------------------------------------------------------
usepackage{cite}                       % change  cite from [1,2,3] to [1-3] etc for number system
makeatletter                           % change from
renewcommand{@biblabel}[1]{#1.}   % [1] to 1. etc 
makeatother                            % in list of references
%-----------------------------------------------------------
setlength{voffset}{-2.1cm}
setlength{hoffset}{-.4cm}  
%--------------------------------------------------------
fontfiverm=cmr5 
%input{Pictex.tex} % using pictex
%---------------------------------------------------------
%pagestyle{plain}
%-------------------------------------------------------
usepackage{fancyhdr}
pagestyle{fancy}
lhead{}
chead{}
rhead{}
lfoot{}  
cfoot{vspace{-.35cm}thepage}  % 
rfoot{} 
renewcommand{headrulewidth}{0pt}
%-------------------------------------------------------
begin{document}
    frontmatter

    mainmatter
    Refer to cite{Pack2019}
    
    input{ThesisRefUTMn(Final).tex}%
    
    addcontentsline{toc}{chapter}{REFERENCES}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    bibliographystyle{UTMn}     %.bst
    bibliography{amiruldatabase}

    backmatter
end{document}

that produces a references list that looks like this:

enter image description here

I want to put some indentation in the references list that looks like this:

enter image description here

How can I do this?

2 Answers

Add labelsep=1cm (or whatever) before the bibliography command.

{labelsep=1cm
bibliography{amiruldatabase}%
}

enter image description here

% ... preamble see original posting
begin{document}
    frontmatter

    mainmatter
    Refer to cite{Pack2019}
    
%    input{ThesisRefUTMn(Final).tex}%

    addcontentsline{toc}{chapter}{REFERENCES}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    bibliographystyle{UTMn}     %.bst
    {labelsep=1cm
    bibliography{amiruldatabase}%
    }
    backmatter
end{document}

Correct answer by gernot on April 15, 2021

I have no idea where the UTMThesis.sty package can be downloaded... In any case, try with this:

makeatletter
def@biblabel#1{[#1]hskip1cm}
makeatother

Answered by Ivan on April 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP