
% !TeX encoding = UTF-8
% !TeX spellcheck = pl_PL
\documentclass[a5paper,10pt,leqno, twoside, noindentfirst]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[polish]{babel}
\usepackage{multicol}
%\usepackage{a4wide}
\usepackage{calc}
\newlength{\hadd}
\newlength{\vadd}
\setlength{\hadd}{4mm}
\setlength{\vadd}{4mm}
\usepackage[paperwidth=148mm+\hadd,paperheight=210mm+\vadd,top=1.1cm+\vadd/2
, bottom=1.1cm+\vadd/2, left=1cm+\hadd/2,
right=1cm+\hadd/2,headsep=13.5pt,footskip=15pt]{geometry}
\usepackage{xifthen}
%\usepackage{mathtools}
\usepackage{graphicx}
\usepackage[labelformat=empty]{caption}
\usepackage{fancybox}
\usepackage{listings}
\usepackage{hyphenat}
%\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{textcomp}
\usepackage{enumitem} % http://ctan.org/pkg/enumitem
\usepackage{fancyhdr}
\usepackage[explicit,newparttoc]{titlesec} % http://ctan.org/pkg/titlesec
\usepackage{setspace}
\usepackage{float}
%\usepackage{caption}
\usepackage[normalem]{ulem}
\usepackage{subfigure}
\usepackage[colorlinks=true, % false: boxed links; true: colored links
linkcolor=blue, % color of~internal links (change box color with linkbordercolor)
hidelinks, % hide links (removing color and border)
linktoc=all, % defines which part of~an entry in the~table of~contents
% is made into a~link
bookmarks=true, % show bookmarks bar?
unicode=true, % non-Latin characters in Acrobat's bookmarks
pdftoolbar=true, % show Acrobat's toolbar?
pdfmenubar=false, % show Acrobat's menu?
%pagebackref=true % enabling back references inside bibliography
]{hyperref}
\setlength{\parindent}{10pt}
\renewcommand{\sectionmark}[1]{\markright{\thesection. #1 }}
\renewcommand{\subsectionmark}[1]{\markright{\thesubsection. #1 }}


\def\Vhrulefill{\leavevmode\leaders\hrule height 0.7ex depth \dimexpr0.4pt-0.7ex\hfill\kern0pt}

\titleformat{\part}[frame]
{\normalfont}
{\filright
    \footnotesize
    \enspace PART \thepart\enspace}%
{8pt}%
{\Large\bfseries\filcenter#1}%[\newpage]
%\titleclass{\part}{top}
%\newcommand{\partbreak}{\clearpage}
\let\oldpart\part

\renewcommand{\part}[1]{\clearpage\oldpart{#1}\clearpage}
\titleformat{\section}{\normalfont\Large\bfseries}{}{0pt}{\noindent\Vhrulefill~\sectionmark~#1~\Vhrulefill}
\titleformat{\subsection}{\centering\normalfont\bfseries}{}{0pt}{#1}
\titlespacing*{\part}{0pt}{.375\textheight}{*0}
\titlespacing*{\section}{0pt}{*4}{*1.5}
\titlespacing*{\subsection}{0pt}{*3}{*0.75}

\setlength{\unitlength}{12.8cm}

\newlist{refs}{enumerate}{1}
\setlist[refs]{label={[\arabic*]},leftmargin=1cm,labelsep=0.3cm,noitemsep,topsep=2pt,parsep=0.75pt}

\makeatletter
\g@addto@macro\normalsize{%
	\setlength\abovedisplayskip{2pt plus 2pt minus 2pt}%
	\setlength\belowdisplayskip{2pt plus 2pt minus 2pt}%
}
\makeatother

\makeatletter
\renewcommand{\@biblabel}[1]{\quad #1.}
\makeatother

\addto\captionsenglish{\renewcommand{\figurename}{Fig.}}
%\renewcommand{\figurename}{Fig.}
\renewcommand{\labelitemi}{-}

\pagestyle{fancy}
\fancyhead{}
\fancyhead[LE]{Kumquat Theoretical Physics, Quantum Computing and Complex Systems International Conference 2021}
%\fancyhead[RO]{Abstract book}
\fancyfoot{} 
\fancyfoot[LE,RO]{}
\fancyfoot[CE,CO]{\thepage}
%\fancyfoot[CE]{\thepage}
%\fancyfoot[CO]{\thepage}
\addtolength{\headheight}{3pt} 
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.0pt}

\newcommand{\speaker}[2][]{%
  {\centering\emph{#2}%
  \ifthenelse{\isempty{#1}}%
		{}% if #1 is empty
		{,\\*\vspace{0.15em}#1}% if #1 is not empty
  \\*}
}

\newcommand{\affiliation}[2][]{%
	{\centering\scriptsize{#2}%
		\ifthenelse{\isempty{#1}}%
		{}% if #1 is empty
		{,\\*\vspace{0.15em}#1}% if #1 is not empty
		\\*}
}

\newcommand{\abstractentry}[5][]{%
	\ifthenelse{\isempty{#1}}%
		{\ifthenelse{\isempty{#2}}% if #1 is empty
			{\subsection*{#2}}% if #4 is empty
			{\subsection{#2}}% if #4 is not empty
		}
		{\ifthenelse{\isempty{#2}}% if #1 is not empty
			{\subsection*[#1]{#2}}% if #4 is empty
			{\subsection[#1]{#2}}% if #4 is not empty
		}
	\vspace*{0.5em}
	\speaker{#3}
	\vspace*{0.5em}
	\affiliation{#4}\vspace*{1.2em}
	\normalsize{#5}
	\begin{samepage}
	\begin{center}
	\noindent\line(1,0){0.56}%\vfill
	\end{center}
	\end{samepage}
	
}

\newcommand{\important}[1]{\par\noindent\uline{#1}}
\newcommand{\rfr}{\important{Bibliografia:}\mynobreakpar}
\newcommand{\kwd}{\important{Keywords:} }

%\abstractentry%
%[Optional changed title to Table Of Contents]%
%{Affiliation – university\\*
%    Affiliation – faculty}%
%{Author}%
%{Title to headline (and to TOC, if there is no optional argument in the function call)}%

%{%
%    Content of abstract
%}

\widowpenalty10000
\clubpenalty10000

%\setlength{\parskip}{2pt plus4pt minus1pt}

%\title{Tytuł}

\setlength{\abovecaptionskip}{6pt plus 2pt minus 2pt}

\makeatletter 
\newcommand\mynobreakpar{\par\nobreak\@afterheading} 
\makeatother


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% Don't modify above %%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\abstractentry%
{Title of presentation}%
{Author$^1$, Another author$^2$}%
{$^1$Affiliation(e.g. Department of Theoretical Physics, Faculty of Fundamental Problems of Technology, Wrocław University of Science and Technology, 
Wybrzeże Wyspiańskiego 27, 50-370 Wrocław, Poland)\\

    $^2$ Another affiliation (dept., faculty, university, adress)
        }%
{
	\noindent
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porttitor eu est ut ornare. Vestibulum leo augue, interdum at interdum vitae, dapibus non nisi. Pellentesque at aliquam purus, ut egestas ipsum. Suspendisse potenti. Praesent placerat id nulla a gravida. In vitae porta arcu. Fusce est turpis, aliquam a mollis at, porta faucibus ipsum.\\ 

    %graphics insertion below: if not needed just ignore that or delete, whatever ;)
    %\begin{figure}[hbtp]
        %\centering
        %\includegraphics[scale = 0.5]{name_of_file.jpg}
        %\caption{Subtitle}
        %\label{fig:if_fig}
    %\end{figure}


\scriptsize{
	\noindent	
	[1] Exemplary reference\\ \relax
	[2] Another exemplary reference\\ \relax
	
}%
}%

\end{document}