10

This is a simple word in Achaemenidian script (ancient Persian language) that is typeset by Parsoomash font in MS Word:

enter image description here

Is there any LaTeX package to typeset stuffs like this?

  • Any pointer to the Parsoomash font? – egreg Oct 19 '17 at 22:39
  • @egreg Well, the font is just designed by the author who owns this website:ganjei.com, and it can be found in ganjei.com/parsoomash.ttf; however, I couldn't find any kind of documentation. – Roboticist Oct 19 '17 at 22:42
  • 3
    Use fontspec and live happy. – egreg Oct 19 '17 at 22:50
  • 2
    @egreg: The problem is that when I paste the copied script from MS Word, the keyboard equivalents are pasted into the editor, not the desired ancient symbols; in other words, to get the script above, one should click m, t, y, and n in MS Word, and these Latin symbols are all I get in Tex Studio's editing window. – Roboticist Oct 19 '17 at 22:58
  • 1
    I also tried to catch the symbol's unicode numbers in MS Word, but it says the symbols arenon-standard. – Roboticist Oct 19 '17 at 23:03
18

Use XeLaTeX. The font maps the glyphs in the Latin alphabet slots, so you have to figure out yourself the correspondence.

\documentclass{article}
\usepackage{fontspec}

\newfontfamily{\oldpersian}{Parsoomash}

\begin{document}

This is ancient Persian script {\oldpersian ABCDFG}

\end{document}

enter image description here

Here's a table:

\documentclass{article}
\usepackage{fontspec}
\usepackage{multicol}

\newfontfamily{\oldpersian}{Parsoomash}

\begin{document}

This is ancient Persian script {\oldpersian ABCDFG}

\begin{multicols}{4}
\count255=32
\loop\ifnum\count255<125
\advance\count255 1
\hbox{\hbox to 1em{\symbol{\count255}\hss}\hbox{\oldpersian\symbol{\count255}}}
\repeat
\end{multicols}

\end{document}

enter image description here

2

mitayana

(1) The oldprsn font package from 2005, bundled with other archaic fonts into the archaic package, might help. It defines a special font family for Tex.

(2) Alternatively, in the unicode space:

Using Xelatex, fontspec, a unicode font containing glyphs belonging to the Old Persian code block, a font mapping file to enable easy input via combinations of "plain" characters, and adapting egreg's transliteration solution for Hittite (How to modify single (ranges of) characters within a custom environment?), we get:

sample syllables

MWE:

\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{stackengine}


\setmainfont{Linux Libertine} 



\newcommand\operfont{Noto Sans Old Persian}
\newcommand\opercolour{blue}
\newcommand\opermapping{latin-to-oldpersian}
\newfontface\fmoper[Mapping=\opermapping ,Colour=\opercolour]{\operfont}



\DeclareTextFontCommand{\textoper}{\Large\fmoper}



\newenvironment{toper}
  {\fmoper\Large\ignorespaces}
  {\ignorespacesafterend}


\ExplSyntaxOn
\NewDocumentCommand{\eoper}{m}
 {
  \tl_set:Nn \l_xander_oper_tl { #1 }
  % change every run of lowercase letters into italic
  \regex_replace_all:nnN
   { [a-z]+ }
   { \c{textit}\cB\{\0\cE\} }
   \l_xander_oper_tl
% change every xx to name
  \regex_replace_all:nnN
   { ([xx]){2,2} }
   { |Xshaayathiya| }
   \l_xander_oper_tl
  % change every ch into c U+030c
  \regex_replace_all:nnN
   { ([ch]){2,2} }
   { c \x{030c} }
   \l_xander_oper_tl
  % change every th into θ = U+03b8
  \regex_replace_all:nnN
   { ([th]){2,2} }
   { \x{03b8} }
   \l_xander_oper_tl
  % change every ss into c U+0327
  \regex_replace_all:nnN
   { ([ss]){2,2} }
   { c \x{0327} }
   \l_xander_oper_tl  
   % change every s into s U+030C
  \regex_replace_all:nnN
   { ([sh]){2,2} }
   { s \x{030c} }
   \l_xander_oper_tl

   % change every am into AM
  \regex_replace_all:nnN
   { ([aur]){3,3} }
   { |AuraMazda| }
   \l_xander_oper_tl
   % change every dah into Dah
  \regex_replace_all:nnN
   { ([dah]){3,3} }
   { |Dahya \x{0304}ush| }
   \l_xander_oper_tl
   % change every baga into Baga
  \regex_replace_all:nnN
   { ([baga]){4,4} }
   { |BAGA| }
   \l_xander_oper_tl
   % change every buu into Buumish
  \regex_replace_all:nnN
   { ([buu]){3,3} }
   { |Buumish| }
   \l_xander_oper_tl

%  % change every double vowel aa/ into a/ U+0301
%  \regex_replace_all:nnN
%   { ([a,e,i,u]){2,2} }
%   { \1 \x{0301} }
%   \l_xander_oper_tl
%  % change |...| into \textsuperscript{...}
% change |...| into raised small-caps
  \regex_replace_all:nnN
   { \|([^|]+)\| }
   { \c{raisebox}\cB\{0.5ex\cE\}\cB\{\c{textsc}\cB\{\1\cE\}\cE\} 
    }
%    \raisebox{0.5ex}{yyy}
%   { \c{textsuperscript}\cB\{\c{textsc}\cB\{\1\cE\}\cE\} 
%    }
   \l_xander_oper_tl


   % change every buu into Buumish
  \regex_replace_all:nnN
   { ([Buumish]){7,7} }
   { Bu\x{0304}mis\x{030c} }
   \l_xander_oper_tl
% \x{0304}

  % print the result
  \tl_use:N \l_xander_oper_tl
 }
\ExplSyntaxOff



\newcommand\hstackonh[1]{\stackon{\begin{toper}#1\end{toper}}{\eoper{#1}}}  

\setstackgap{L}{1.24\normalbaselineskip}%4.25ex}
\newcommand\hstackon[1]{\Longstack{ \raisebox{1.12ex}{\eoper{#1}}  \begin{toper}#1\end{toper}}}  




\begin{document}
\section{Old Persian \textoper{la-da div pa-aur-ra-sa-i-a-na}}
For heading, see ref\footnote{\texttt{oldprsn} package (2005) documentation: "Old Persian in the Old Persian script" "(as near as possible)"}. \textoper{mi-ta-ya-na}.



\begin{center}
\hstackon{a}
\hstackon{i}
\hstackon{u}
\hstackon{ka}
\hstackon{ku}
\hstackon{ga}
\hstackon{gu}
\hstackon{xa}
\par
\hstackon{a-i-u-ka-ku-ga-gu-xa}
\end{center}


\begin{center}
\hstackon{cha}
\hstackon{tha}
\hstackon{sha}
\hstackon{ssa}
\par
\hstackon{cha-tha-sha-ssa}
\end{center}


\begin{center}
\hstackon{aur}
\hstackon{aur2}
\hstackon{aur3}
\hstackon{xx}
\par
\hstackon{aur-aur2-aur3-xx}
\end{center}


\begin{center}
\hstackon{dah}
\hstackon{dah2}
\hstackon{baga}
\hstackon{buu}
\par
\hstackon{dah-dah2-baga-buu}
\end{center}

\section{Usage}
(0) Compile the map text file with teckit\_compile to produce a binary tec file.

\verb|teckit_compile foo.map foo.tec|

Call the mapping file in the font command:

\verb|\newfontface\fontfoo[Mapping=foo]{SomeFontName}|

(1) To typeset in cuneiform, use \textbackslash\texttt{textoper} and type the mapping syllables: 

\verb|\textoper{a}| $\to$ \textoper{a}.

\textoper{da-a-ra-ya-va-ha-u-sha-} (son of Darius).

(2) To typeset transliteration with diacritics, type the mapping syllables and use \textbackslash\texttt{eoper}: 

\verb|\eoper{a}| $\to$ \eoper{a}.

\eoper{da-a-ra-ya-va-ha-u-sha-}.

(3) To typeset ruby text, use \textbackslash\texttt{hstackon}:

\verb|\hstackon{a}| $\to$ \hstackon{a} (per syllable).

\hstackon{da-a-ra-ya-va-ha-u-sha-} (per word).
\end{document}

Mapping file (to be compiled with teckit_compile):

; TECkit mapping for TeX input conventions <-> Unicode characters

LHSName "latin-to-oldpersian"
RHSName "UNICODE"

pass(Unicode)

; ligatures from Knuth's original CMR fonts
U+002D U+002D           <>  U+2013  ; -- -> en dash
U+002D U+002D U+002D    <>  U+2014  ; --- -> em dash

U+0027          <>  U+2019  ; ' -> right single quote
U+0027 U+0027   <>  U+201D  ; '' -> right double quote
U+0022           >  U+201D  ; " -> right double quote

U+0060          <>  U+2018  ; ` -> left single quote
U+0060 U+0060   <>  U+201C  ; `` -> left double quote

U+0021 U+0060   <>  U+00A1  ; !` -> inverted exclam
U+003F U+0060   <>  U+00BF  ; ?` -> inverted question

; additions supported in T1 encoding
U+002C U+002C   <>  U+201E  ; ,, -> DOUBLE LOW-9 QUOTATION MARK
U+003C U+003C   <>  U+00AB  ; << -> LEFT POINTING GUILLEMET
U+003E U+003E   <>  U+00BB  ; >> -> RIGHT POINTING GUILLEMET


;U+0020    >  U+0020 ;  space maps to space
U+002D    >  U+200D ;  hyphen as Zero Width Joiner
U+002E    >  U+200D ;  dot as Zero Width Joiner
U+007C    >  U+200C ;  pipe as Zero Width Non-Joiner



U+0061         <>  U+103A0    ;  a 𐎠 
U+0069         <>  U+103A1    ;  i 𐎡
U+0075         <>  U+103A2    ;  u 𐎢
U+006B U+0061        <>  U+103A3    ;  ka 𐎣
U+006B U+0075        <>  U+103A4    ;  ku 𐎤
U+0067 U+0061        <>  U+103A5    ;  ga 𐎥
U+0067 U+0075        <>  U+103A6    ;  gu 𐎦
U+0078 U+0061        <>  U+103A7    ;  xa 𐎧
U+0063 U+0068 U+0061       <>  U+103A8    ;  cha 𐎨
U+006A U+0061        <>  U+103A9    ;  ja 𐎩
U+006A U+0069        <>  U+103AA    ;  ji 𐎪
U+0074 U+0061        <>  U+103AB    ;  ta 𐎫
U+0074 U+0075        <>  U+103AC    ;  tu 𐎬
U+0064 U+0061        <>  U+103AD    ;  da 𐎭
U+0064 U+0069        <>  U+103AE    ;  di 𐎮
U+0064 U+0075        <>  U+103AF    ;  du 𐎯
U+0074 U+0068 U+0061       <>  U+103B0    ;  tha 𐎰
U+0070 U+0061        <>  U+103B1    ;  pa 𐎱
U+0062 U+0061        <>  U+103B2    ;  ba 𐎲
U+0066 U+0061        <>  U+103B3    ;  fa 𐎳
U+006E U+0061        <>  U+103B4    ;  na 𐎴
U+006E U+0075        <>  U+103B5    ;  nu 𐎵
U+006D U+0061        <>  U+103B6    ;  ma 𐎶
U+006D U+0069        <>  U+103B7    ;  mi 𐎷
U+006D U+0075        <>  U+103B8    ;  mu 𐎸
U+0079 U+0061        <>  U+103B9    ;  ya 𐎹
U+0076 U+0061        <>  U+103BA    ;  va 𐎺
U+0076 U+0069        <>  U+103BB    ;  vi 𐎻
U+0072 U+0061        <>  U+103BC    ;  ra 𐎼
U+0072 U+0075        <>  U+103BD    ;  ru 𐎽
U+006C U+0061        <>  U+103BE    ;  la 𐎾
U+0073 U+0061        <>  U+103BF    ;  sa 𐎿
U+007A U+0061        <>  U+103C0    ;  za 𐏀
U+0073 U+0068 U+0061       <>  U+103C1    ;  sha 𐏁
U+0073 U+0073 U+0061       <>  U+103C2    ;  ssa 𐏂
U+0068 U+0061        <>  U+103C3    ;  ha 𐏃


U+0061 U+0075 U+0072       <>  U+103C8    ;  aur 𐏈
U+0061 U+0075 U+0072 U+0032      <>  U+103C9    ;  aur2 𐏉
U+0061 U+0075 U+0072 U+0033      <>  U+103CA    ;  aur3 𐏊
U+0078 U+0078        <>  U+103CB    ;  xx 𐏋
U+0064 U+0061 U+0068       <>  U+103CC    ;  dah 𐏌
U+0064 U+0061 U+0068 U+0032      <>  U+103CD    ;  dah2 𐏍
U+0062 U+0061 U+0067 U+0061      <>  U+103CE    ;  baga 𐏎
U+0062 U+0075 U+0075       <>  U+103CF    ;  buu 𐏏


U+0064 U+0069 U+0076       <>  U+103D0    ;  div 𐏐
U+0031         <>  U+103D1    ;  1 𐏑
U+0032         <>  U+103D2    ;  2 𐏒
U+0031 U+0030        <>  U+103D3    ;  10 𐏓
U+0032 U+0030        <>  U+103D4    ;  20 𐏔
U+0031 U+0030 U+0030       <>  U+103D5    ;  100 𐏕

Adjust the mapping, and the matching diacritic regexes as required. It all depends on what input method you have or want (for example, there are various Old Persian virtual keyboards available for download from linguistics sites; or you can program your own).

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.