I have converted a .docx file to .tex, and I am trying to create a running header. Looking through the forums, I have found some nice code to generate this header. Unfortunately, when I try to implement the \section or \subsection feature, I receive multiple errors.
At the moment, the header has 0:00––0:00, showing that it has been created, but I cannot actually create the section and subsection environments. I have attached my preamble, so that you can see if there is anything that I have overlooked.
\documentclass[twoside,14pt]{memoir}
\usepackage{lettrine}
\usepackage{dblfnote}
\usepackage[para]{footmisc}
\usepackage{ragged2e}
\usepackage[pagestyles]{titlesec}
\usepackage{polyglossia}
\setmainlanguage{syriac}
\setmainfont{Serto Antioch Bible}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\arabic{subsection}}
\pagestyle{empty}
% definition of the page style with required headers
\newpagestyle{Biblestyle}{
\setheadrule{.009pt}
\sethead[\thepage][\chaptertitle]
[\toptitlemarks\thesection:\toptitlemarks\thesubsection---%
\bottitlemarks\thesection:\bottitlemarks\thesubsection]%
{\toptitlemarks\thesection:\toptitlemarks\thesubsection---%
\bottitlemarks\thesection:\bottitlemarks\thesubsection}{\chaptertitle}{\thepage}
}
% sets the marks to be used (section and subsection)
\setmarks{section}{subsection}
% sections and subsections formatting
\titleformat{\section}
{}{\lettrine{\thesection}}{0em}{}[\vskip-0.65\baselineskip]
\titleformat{\subsection}[runin]
{\small\bfseries}{\thesubsection}{1em}{}
\titlespacing{\section}{1em}{-1pt}{0pt}
\titlespacing{\subsection}{0pt}{0pt}{1em}
\pagestyle{Biblestyle}
\renewcommand{\LettrineFontHook}{\bfseries}
\setlength{\parindent}{0pt}
\newlength\NumLen
\newlength\LinLen
% indents one line of text. Indentation= width of section number + 1em
\newcommand\IndOne{%
\settowidth\NumLen{\thesection}
\addtolength\NumLen{1em}
\setlength\LinLen{\dimexpr\textwidth-\NumLen}%\the\NumLen\the\LinLen
\parshape 2 \NumLen \LinLen 0pt \textwidth}
% indents two lines of text. Indentation= width of section number + 1em
\newcommand\IndTwo{%
\settowidth\NumLen{\thesection}
\addtolength\NumLen{1em}
\setlength\LinLen{\dimexpr\textwidth-\NumLen}%\the\NumLen\the\LinLen
\parshape 3 \NumLen \LinLen \NumLen \LinLen 0pt \textwidth}
\let\oldfootnote\footnote
\renewcommand{\footnote}[1]{\oldfootnote{~#1}}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\LTRfootnote{This is the first footnote.} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\LTRfootnote{This is the second footnote.} Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{document}
EDIT: I have updated the question with an excerpt here.
I have attached some images for the expected output. This image shows the header that I am going for. The only difference is that I do not want a header on the first page. I would also like the English title to be on the odd page and the Syriac title to be on the even page.


titlesecwith memoir – daleif Sep 06 '23 at 12:32memoiris just not a good solution for this. – daleif Sep 07 '23 at 12:25