@localghost I appologise - I misstyped the name of the package - it should have been
. This fixes formatting issues for Tables and Figures, but not for Algorithms.
In the mean time I temporarily solved the problem of caption formatting and appearance for algorithms by defining my own float for use in combination with Algorithms and matched their settings to those demanded by my faculty (Long story short - LaTeX document must in the end appear identical to their MS Word template). So the full preamble now looks like
Code: Select all
\documentclass[a4paper,11pt,twoside,final,openany]{book}
\usepackage[slovene,english]{babel}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage{ae,aecompl}
\usepackage[latin2]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb,mathrsfs}
\setlength{\mathindent}{1cm}
\usepackage{graphicx}
\usepackage{url}
\usepackage{psfrag}
\usepackage{units}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage[small]{caption}
\usepackage[top=2.2cm, bottom=2.5cm, left=2.5cm, right=2.5cm, bindingoffset=0.7cm]{geometry}
\usepackage{cite}
\usepackage{subfigure}
\usepackage{fixltx2e}
\usepackage[nottoc,numbib]{tocbibind}
\usepackage{hyperref}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{titlesec}
\titleformat{\chapter}[hang]{\normalfont\LARGE\bfseries}{\thechapter}{1em}{}
\titlespacing{\chapter}{0pt}{0pt}{35mm}
\addto\captionsenglish{\renewcommand\chaptername{}}
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\counterwithout{equation}{chapter}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\renewcommand\citeleft{[}
\renewcommand\citeright{]}
\graphicspath{{images/}}
\makeatletter
\usepackage{float}
%%
\newcommand\floatc@simplerule[2]{{\@fs@cfont #1 #2}\par}
\newcommand\fs@simplerule{\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@simplerule
\def\@fs@pre{\hrule height0pt depth0pt \kern4pt}%
\def\@fs@post{\kern4pt\hrule height0.1mm depth0pt \kern4pt \relax}%
\def\@fs@mid{\kern8pt}%
\let\@fs@iftopcapt\iftrue}
\floatstyle{simplerule}
\newfloat{myalgorithm}{thp}{lob}[chapter]
\floatname{myalgorithm}{Algorithm}
\counterwithout{myalgorithm}{chapter}
%%
In document, Algorithms are used as
Code: Select all
\begin{myalgorithm}[h]
\centering
\caption[Title of Algorithm for TOC]{\textit{Title of Algorithm.} Caption of the algorithm.}
\vspace{-9mm}
\begin{algorithm}
<Algorithm content>
\end{algorithm}
\vspace{-5mm}
\end{myalgorithm}
\listof{myalgorithm}{Index of Algorithms}
It's complicated, but it works...
If there is a simpler solution, I'll gladly use it.