1

I did some search with no chance about the problem I have using these two packages together. I use TeXStudio under Linux to write TeX docs.

This is the code I use:

\documentclass[11pt,a4paper]{article}
\usepackage{titling}
\newcommand{\subtitle}[1]{%
    \posttitle{%
        \par\end{center}
    \begin{center}\large#1\end{center}
    \vskip0.4em}%
}
\usepackage{fontenc}
\usepackage{csquotes}
\usepackage{calc}
\usepackage{verse}
\usepackage{graphicx}
\usepackage{draftcopy}
\usepackage{cleveref}
\usepackage{enumitem}
\usepackage{xpatch}
\usepackage{datetime}
\usepackage{marginnote}
\usepackage{xspace}
\usepackage{xltxtra}
\usepackage{fancyhdr}
\usepackage{etoolbox}
\usepackage[heightrounded, headheight=114pt,marginparwidth=2.5cm]{geometry}
\usepackage[final,ulem=normalem]{changes}
\usepackage[block=none,style=philosophy-modern]{biblatex}
\setmainfont{Gentium Plus}
\addbibresource{my.bib}
\nocite{*}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Scheherazade}
\renewcommand{\thesection}{\Roman{section}} 
\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}

\title{\textbf{My title}}
\subtitle{my subtitle}
\author{author\\
    email: my mail} 
\date{}
\begin{document}
    \maketitle
\section{bla}
\end{document}

This code works perfectly but when I add the polyglossia package, as in the example below, I get a bunch of errors and the subtitle disappears:

\documentclass[11pt,a4paper]{article}
\usepackage{titling}
\newcommand{\subtitle}[1]{%
    \posttitle{%
        \par\end{center}
    \begin{center}\large#1\end{center}
    \vskip0.4em}%
}
\usepackage{fontenc}
\usepackage{csquotes}
\usepackage{calc}
\usepackage{verse}
\usepackage{graphicx}
\usepackage{draftcopy}
\usepackage{cleveref}
\usepackage{enumitem}
\usepackage{xpatch}
\usepackage{datetime}
\usepackage{marginnote}
\usepackage{xspace}
\usepackage{xltxtra}
\usepackage{fancyhdr}
\usepackage{etoolbox}
\usepackage[heightrounded, headheight=114pt,marginparwidth=2.5cm]{geometry}
\usepackage[final,ulem=normalem]{changes}
\usepackage[block=none,style=philosophy-modern]{biblatex}
\setmainfont{Gentium Plus}
\addbibresource{my.bib}
\nocite{*}
\usepackage[quiet]{polyglossia}
\setdefaultlanguage{italian}
\setotherlanguages{arabic,greek,english,german} 
\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Scheherazade}
\renewcommand{\thesection}{\Roman{section}} 
\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}

\title{\textbf{\emph{My title}, cor gentile}}
\subtitle{my subtitle}
\author{author\\
    email: my mail} 
\date{}
\begin{document}
    \maketitle
\section{bla}
\end{document}

The solution for me about the subtitle was simply, but even removing the titling package the log reports a lot of errors with polyglossia, most relevant is related to biblatex:

Package biblatex Error: No default polyglossia language defined

even if, by contrast, both seem to work correctly.

Any clue how to solve it?

1

Your preamble is kind of a mess. The order the packages are loaded with is very important.

Here's a version with some comments: note that cleveref should be last. And, for your own sanity, only load packages you do need.

However, due to bidi, titling will not work, because the bidi package is not aware of it, so it overwrites its definition. You can check this by removing the arabic language option.

\documentclass[11pt,a4paper]{article}
\usepackage[heightrounded, headheight=114pt,marginparwidth=2.5cm]{geometry}

\usepackage[quiet]{polyglossia}
\usepackage{csquotes}
\usepackage[block=none,style=philosophy-modern]{biblatex}

\usepackage{titling}
%\usepackage{fontenc} % don't load it
\usepackage{calc}
\usepackage{verse}
\usepackage{graphicx}
\usepackage{draftcopy}
\usepackage{enumitem}
\usepackage{xpatch}
\usepackage{datetime}
\usepackage{marginnote}
\usepackage{xspace}
%\usepackage{xltxtra} % don't load it
\usepackage{fancyhdr}
%\usepackage{etoolbox} % already loaded by xpatch
\usepackage[final,ulem=normalem]{changes}
\usepackage{cleveref} % should be last

% languages
\setdefaultlanguage{italian}
\setotherlanguages{arabic,greek,english,german} 
% fonts
\setmainfont{Gentium Plus}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Scheherazade}

% bibliographies
\addbibresource{my.bib}
\nocite{*}

% settings
\renewcommand{\thesection}{\Roman{section}} 
\renewcommand{\thesubsection}{\thesection.\Roman{subsection}}
\newcommand{\subtitle}[1]{%
    \posttitle{%
        \par\end{center}
    \begin{center}\large#1\end{center}
    \vskip0.4em}%
}

% meta data
\title{\textbf{\emph{My title}, cor gentile}}
\subtitle{my subtitle}
\author{author\\
    email: my mail} 
\date{}

\begin{document}

\maketitle

\section{bla}

\end{document}
  • Thank for your kind and rapid answer. I am new to latex and should learn more. I will try to find some online help to know how to put in right order the packages – Gian Paolo Renello Sep 25 '16 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.