0

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.

Below is the current output. Expected output

enter image description here

  • 1
    We can't compile your code. We don't have access to your local files. – samcarter_is_at_topanswers.xyz Sep 06 '23 at 12:24
  • 5
    And don't use titlesec with memoir – daleif Sep 06 '23 at 12:32
  • Thanks @daleif. If I remove the titlesec package, how can I obtain the same header format using only Memoir? – ceramicquasar88 Sep 06 '23 at 14:04
  • 1
    Then please update your question with a description about how it should look like. – daleif Sep 06 '23 at 15:07
  • @daleif, I have attached the header that I am trying to achieve. Thanks for your assistance. – ceramicquasar88 Sep 06 '23 at 16:23
  • 1
    Is it possible for you to make a MWE that does not require script fonts that are not available in say TeXLive. – daleif Sep 07 '23 at 09:54
  • @daleif I have updated the file with the lorem ipsum text. Thanks for your help. – ceramicquasar88 Sep 07 '23 at 12:08
  • There is no sectional commands in that example. And I don't really get the requirement in relation to the first image. Perhaps memoir is just not a good solution for this. – daleif Sep 07 '23 at 12:25
  • I did not put any sectional commands because it would not compile with them. I took the code from this post: https://tex.stackexchange.com/a/26400/303666 but I have not been able to figure out how to implement it. I have figured out how to format the footnotes the way I want, but the header formatting has eluded me. – ceramicquasar88 Sep 07 '23 at 12:57

0 Answers0