2

I am composing with XeLaTeX (no teubner package...) and I need to use on the same letter the diacritic for long, brevis and the accent. I tried as follows but the character that directly follows (α) disappears in the pdf... How can I solve the problem? Thanks.

How it appears:

enter image description here

It should have the α under the two diacritics, not the ρ...

My code:

% !TeX encoding = UTF-8
% !TeX TS-program = xelatex
% !TeX spellcheck = it_IT
% !TeX root = Prosodia.tex
% !BIB TS-program = biber


\documentclass[a4paper,12pt]{article}

\usepackage[no-math]{fontspec} 
    \setmainfont[Ligatures=TeX,Numbers=OldStyle]{Linux Libertine O}

\usepackage{polyglossia} 
    \setmainlanguage[babelshorthands=true]{italian}
    \setotherlanguages{latin,greek,english,german,russian,serbian}
        \setkeys{greek}{variant=polytonic}



\begin{document}

ἀκηρ\'\uατου

\end{document}
3
  • You should use \'{\u{α}}, but Linux Libertine doesn't correctly place the combining acute. Other fonts do.
    – egreg
    Oct 30, 2020 at 22:11
  • also never ignore error messages, you get ! Undefined control sequence. Oct 30, 2020 at 22:13
  • @egreg do you have any suggestion? Times creates a lot of problem in my text, I've just seen.
    – Giacomo
    Oct 30, 2020 at 22:27

1 Answer 1

6

The correct syntax should be ἀκηρ\'{\u{α}}του. However, with Linux Libertine we get

enter image description here

so the combining acute is not placed correctly. With another font it might work better. I tried Old Standard and got

enter image description here

You might want to define, for this particular font, a specialized accent-making command.

\documentclass[a4paper,12pt]{article}

\usepackage[no-math]{fontspec} 
\usepackage{polyglossia} 

\setmainfont{Linux Libertine O}[Ligatures=TeX,Numbers=OldStyle]
\newfontfamily{\greekfont}{Old Standard}

\setmainlanguage[babelshorthands=true]{italian}
\setotherlanguages{latin,greek,english,german,russian,serbian}
\setkeys{greek}{variant=polytonic}

\newrobustcmd{\ba}[1]{% breve-acute
  \leavevmode
  \vbox{\offinterlineskip
    \ialign{%
      \hfil##\hfil\cr
      \char"00B4\cr
      \noalign{\kern-1.3ex}
      \u{#1}\cr
    }%
  }%
}

\begin{document}

\textgreek{ἀκηρ\'{\u{α}}του}

ἀκηρ\ba{α}του

\end{document}

I left the Old Standard version for comparison. Remove the declaration of \greekfont for your version. However, confining texts in languages different from the main one in their own environment should be best anyway.

enter image description here

3
  • 2
    with lualatex and node renderer libertine looks ok too, with harfbuzz it is wrong. Oct 30, 2020 at 22:30
  • Brilliant!!! Thank you!!!
    – Giacomo
    Oct 30, 2020 at 22:47
  • @UlrikeFischer But the accents are moved far right.
    – egreg
    Oct 31, 2020 at 11:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .