Re: Misteri di \ProsodicMarksOn

#55680
Up
0
Down
::

Ciao a tutti.

1.
`\documentclass{article}
\usepackage[latin,italian]{babel}
\languageattribute{latin}{withprosodicmarks}
\begin{document}
Ciao \begin{otherlanguage}{latin}\ProsodicMarksOn{ros^a}\end{otherlanguage} ciao.
\end{document}
`
Perché quegli spazi sbagliati?

Una possibile soluzione: usare il pacchetto “newunicodechar” appena inviato su CTAN e lasciar perdere “withprosodicmarks”
`\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[latin,italian]{babel}
\usepackage{newunicodechar}

%\newunicodechar{Ă}{\u{A}} \newunicodechar{ă}{\u{a}}
\newunicodechar{Ĕ}{\u{E}} \newunicodechar{ĕ}{\u{e}}
\newunicodechar{Ĭ}{\u{I}} \newunicodechar{ĭ}{\u{\i}}
\newunicodechar{Ŏ}{\u{O}} \newunicodechar{ŏ}{\u{o}}
\newunicodechar{Ŭ}{\u{U}} \newunicodechar{ŭ}{\u{u}}
\newunicodechar{Ā}{\={A}} \newunicodechar{ā}{\={a}}
\newunicodechar{Ē}{\={E}} \newunicodechar{ē}{\={e}}
\newunicodechar{Ī}{\={I}} \newunicodechar{ī}{\={\i}}
\newunicodechar{Ō}{\={O}} \newunicodechar{ō}{\={o}}
\newunicodechar{Ū}{\={U}} \newunicodechar{ū}{\={u}}

\begin{document}

\begin{otherlanguage*}{latin}rosă, invincibĪlis, pōpŭlus, pŏpŭlus\end{otherlanguage*}

\end{document}`
Naturalmente occorre un editor Unicode. Con \newunicodechar è possibile definire il significato di qualsiasi carattere Unicode. Per esempio,
`\usepackage{wasysym}
\newunicodechar{♪}{\eighthnote}`
Ciao
Enrico

Go to top