%!TEX TS-program = xetex %!TEX encoding = UTF-8 Unicode %###################################### % Fonts: % Linux Libertine % http://libertine-fonts.org/ % FreeSerif % https://www.gnu.org/software/freefont/ %###################################### \input eplain \beginpackages \usepackage{url} \usepackage{color} \endpackages \enablehyperlinks %++++++++++++++++++++++++++++++++++++++ % page layout \pdfpageheight 297mm \pdfpagewidth 210mm \hsize 180mm \vsize 240mm \hoffset -10.4mm \voffset -0.4mm % American settings %\pdfpageheight 279.4mm% 11" %\pdfpagewidth 215.9mm% 8.5" %\hsize 180mm %\vsize 240mm %\hoffset -7.45mm %\voffset -7.45mm %++++++++++++++++++++++++++++++++++++++ \output{\global\footno=0\plainoutput}% footnotes numbered by page \tolerance 1414 \hbadness 1414 \hyphenpenalty 500 \finalhyphendemerits 7500 \emergencystretch 5pt \hfuzz 0.3pt \vfuzz=\hfuzz % paragraph spacing \parskip 0pt \parindent 1.2em \baselineskip 14.5pt \frenchspacing \def\nl{\hfil\break} \def\pagebreak{\vadjust{\eject}} \def\newpage{\vfill\eject} \headline={\hfil} \footline={\rm\hfil\folio\hfil} \font\rm="Linux Libertine" at 12pt \font\it="Linux Libertine/I" at 12pt \font\tt=cmtt10 at 12pt \font\Rm="Linux Libertine" at 14pt \font\fs="FreeSerif" at 12pt \font\cm=cmr12 \def\lb{\rm\char"007B}% left brace \def\rb{\rm\char"007D}% right brace \def\bs{\rm$\backslash$}% backslash % settings for the \quadcolumn macro \abovecolumnskip0pt \belowcolumnskip0pt % line between the columns \def\gutterbox{\vbox to \dimen0{\vfil\hbox{\vrule height\dimen0}\vfil}} % no `Th' ligature \XeTeXinterchartokenstate=1 \newXeTeXintercharclass \Tclass \newXeTeXintercharclass \hclass \XeTeXcharclass`\T \Tclass \XeTeXcharclass`\h \hclass \XeTeXinterchartoks\Tclass \hclass = {\kern 0pt} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % fnotesym (footnotes with symbol references instead of numbers) % unicode version \def\fnsymbol#1{% % #1 is between 1 and 9 inclusive \ifcase#1\or *\or†\or‡\or§\or¶\or ‖\or**\or††\or‡‡ \fi} \catcode`\@=11 %\font\footnotesize="EB Garamond 12 Regular:-clig,-calt,mapping=tex-text" at 8pt % extended definition of \footnotesize \font\foot="Linux Libertine:mapping=tex-text" at 10pt \font\footi="Linux Libertine/I:mapping=tex-text" at 10pt \font\ttfoot=cmtt9 at 10pt \def\footnotesize{\def\rm{\foot}\def\it{\footi}\def\tt{\ttfoot}% \normalbaselineskip=12pt \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}% \normalbaselines\rm} \font\footnumberfont="Linux Libertine:mapping=tex-text" at 10pt \newcount\footno \footno=0 \def\footnote{\global\advance\footno by 1 \ifnum\footno>9 \global\footno=1 \fi \let\@sf=\empty% \ifhmode\edef\@sf{\spacefactor=\the\spacefactor}\/\fi% \fnsymbol{\the\footno}\@sf\vfootnote} \def\vfootnote#1{\insert\footins\bgroup\footnotesize\smallskip\noindent \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox% top baseline for broken footnotes \splitmaxdepth\dp\strutbox\floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip {\footnumberfont\fnsymbol{\the\footno}\penalty10000\hskip.25em}\strut#1\futurelet\next\fo@t} \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t \else\let\next\f@t\fi \next} \def\f@@t{\bgroup\aftergroup\@foot\let\next} \def\f@t{\@foot} \def\@foot{\strut\egroup} \def\footstrut{\vbox to\splittopskip{}} \skip\footins=\medskipamount % space added when footnote is present \count\footins=1000 % footnote magnification factor (1 to 1) \dimen\footins=.35\vsize % maximum footnotes per page \catcode`\@=12 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\def\footnoterule{\kern-3pt % \hrule width 2truein \kern 2.6pt\vskip-\smallskipamount} %%%%%%%%%%%%%%%%%%%%%%% % START OF DOCUMENT %%%%%%%%%%%%%%%%%%%%%%% \rm \centerline{\Rm Input}\smallskip \noindent For years I’ve been using a Windows program called \href{https://www.oeaw.ac.at/kal/multikey/}{Multikey} to input Latin script diacritics and non-Latin scripts. There is also a program called \href{https://keyman.com/windows/}{Keyman} that does the same thing. These days I spend more time on Linux so I’ve had to learn some Linux keyboard mappings. There, additional keyboards are provided by a system called ‘X keyboard extension’ (\href{https://www.x.org/releases/X11R7.5/doc/input/XKB-Config.html}{XKB}). Here is a keyboard mapping for Latin script special characters. This works by default on my UK keyboard. It’s from a file called ‘latin’ found at {\tt/usr/share/X11/xkb/symbols/latin} \vskip\baselineskip {\quadcolumns {\setbox\strutbox=\hbox{\vrule height11.5pt depth4.5pt width0pt} \halign{\strut\tabskip0em #\hfil& \tabskip2em#\hfil& \Rm#\hfil\cr AltGr & 1 & ¹\cr AltGr Shift & 1 & ¡\cr AltGr & 2 & ²\cr AltGr Shift & 2 & ⅛\cr AltGr & 3 & ³\cr AltGr Shift & 3 & £\cr AltGr & 4 & €\cr AltGr Shift & 4 & ¼\cr AltGr & 5 & ½\cr AltGr Shift & 5 & ⅜\cr AltGr & 6 & ¾\cr AltGr Shift & 6 & ⅝\cr AltGr Shift & 7 & ⅞\cr AltGr Shift & 8 & ™\cr AltGr Shift & 9 & ±\cr AltGr Shift & 0 & °\cr AltGr Shift & - & ¿\cr AltGr Shift & q & Ω\cr AltGr & w & ł\cr AltGr Shift & w & Ł\cr AltGr & r & ¶\cr AltGr Shift & r & ®\cr AltGr & t & ŧ\cr AltGr Shift & t & Ŧ\cr AltGr & y & ←\cr AltGr Shift & y & ¥\cr AltGr & u & ↓\cr AltGr Shift & u & ↑\cr AltGr & i & →\cr AltGr Shift & i & ı\cr AltGr & o & ø\cr AltGr Shift & o & Ø\cr AltGr & p & þ\cr AltGr Shift & p & Þ\cr AltGr & a & æ\cr AltGr Shift & a & Æ\cr AltGr & s & ß\cr AltGr Shift & s & §\cr AltGr & d & ð\cr AltGr Shift & d & Ð\cr AltGr & f & đ\cr AltGr Shift & f & ª\cr AltGr & g & ŋ\cr AltGr Shift & g & Ŋ\cr AltGr & h & ħ\cr AltGr Shift & h & Ħ\cr AltGr & k & ĸ\cr AltGr & l & ł\cr AltGr Shift & l & Ł\cr AltGr Shift & \bs & ¦\cr AltGr & z & «\cr AltGr & x & »\cr AltGr & c & ¢\cr AltGr Shift & c & ©\cr AltGr & v & “\cr AltGr Shift & v & ‘\cr AltGr & b & ”\cr AltGr Shift & b & ’\cr AltGr & m & µ\cr AltGr Shift & m & º\cr %AltGr & , & \cr AltGr Shift & , & ×\cr AltGr & . & ·\cr AltGr Shift & . & ÷\cr } } }\singlecolumn \vskip\baselineskip {\quadcolumns {\setbox\strutbox=\hbox{\vrule height11.5pt depth4.5pt width0pt} \halign{\strut #\hfil& #\hfil& \tabskip2em#\hfil& \Rm#\hfil\cr AltGr & = & c & ç\cr AltGr Shift & = & a & ą\cr AltGr & [ & a & ä\cr AltGr Shift & [ & a & å\cr AltGr & ] & a & ã\cr AltGr Shift & ] & a & ā\cr AltGr & ; & a & á\cr AltGr Shift & ; & o & ő\cr AltGr & ' & a & â\cr AltGr Shift & ' & a & ǎ\cr AltGr & \# & a & à\cr AltGr Shift & \# & a & ă\cr AltGr & / & a & ạ\cr AltGr Shift & / & a & ȧ\cr AltGr & j & a & ả\cr AltGr Shift & j & a & ơ\cr } } }\singlecolumn \vskip\baselineskip \noindent The symbols in the first part of the table are made by holding down AltGr or AltGr Shift and then pressing a key. They always produce the same output. The second part of the table uses dead keys to make precomposed Unicode characters with diacritics. You hold down AltGr or AltGr Shift plus a symbol, then lift and press a letter. Some of them produce a great many combinations e.g. AltGr ; [a-z] makes á ć é ǵ í j́ ḱ ĺ ḿ ń ó ṕ ŕ ś ú ǘ ẃ ý ź, AltGr Shift ; [a-z] makes only ő ű. AltGr j [a-z] makes ả ɓ ƈ ɗ ẻ ƒ ɠ ɦ ỉ ƙ ɱ ɲ ỏ ƥ ʠ ɼ ʂ ƭ ủ ʋ {\fs ⱳ} ỷ ȥ, AltGr Shift j [a-z] makes ơ ư. You can combine keystrokes from the first and second part, e.g. AltGr Shift ] Altgr a makes ǣ, AltGr ; AltGr o makes ǿ. You can also use two key combinations from the second group: AltGr ; AltGr Shift \# a makes ắ, AltGr / AltGr Shift ] r makes ṝ. Pressing AltGr ' (lift) and one of the keys on the top row from ‘1’ to ‘=’ makes superscript numbers and maths symbols: ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁰ ⁽ ⁾ ⁻ ⁼ ⁺. AltGr ' Shift with the same keys makes subscripts: ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₀ ₍ ₎ ₋ ₌ ₊. \newpage \noindent A mapping for the ‘Russian (phonetic)’ keyboard. From {\tt/usr/share/X11/xkb/symbols/ru} \vskip\baselineskip {\quadcolumns {\setbox\strutbox=\hbox{\vrule height11.5pt depth4.5pt width0pt} \halign{\strut\tabskip1em #\hfil& \Rm#\hfil\cr Aa & Аа\cr Bb & Бб\cr Ww & Вв\cr Gg & Гг\cr Dd & Дд\cr Ee & Ее\cr \$£ & Ёё\cr Vv & Жж\cr Zz & Зз\cr Ii & Ии\cr Jj & Йй\cr Kk & Кк\cr Ll & Лл\cr Mm & Мм\cr Nn & Нн\cr Oo & Оо\cr Pp & Пп\cr Rr & Рр\cr Ss & Сс\cr Tt & Тт\cr Uu & Уу\cr Ff & Фф\cr Hh & Хх\cr Cc & Цц\cr += & Чч\cr \lb[ & Шш\cr \rb] & Щщ\cr \^{}\% & Ъъ\cr Yy & Ыы\cr Xx & Ьь\cr \~{}\# & Ээ\cr ¬` & Юю\cr Qq & Яя\cr ' & ‘ ’\cr Shift ' & “ ”\cr } } }\singlecolumn \vskip\baselineskip \noindent The default ‘Russian’ keyboard layout is completely different to qwerty. \vskip\baselineskip \noindent To get additional keyboards to work you can go to Menu > Preferences > Keyboard and choose the ‘Layouts’ tab. Once you are in that click ‘+’ and the list of available keyboards will come up. Select the keyboard you want and click ‘Add’. If you want a keyboard shortcut for switching between layouts, click on Options, expand the section ‘Switching to another layout’ and select which key combination you want to use for switching. This is for Linux \href{https://divvun.no/keyboards/userdocs/linux/EnableKeyboardsInLinuxMint.html}{Mint} Cinnamon, but the procedure is similar in xfce desktops. There is also a command line way of doing this. Enter \smallskip \noindent \verbatim setxkbmap -layout gb,ru -variant ,phonetic -option "grp:alt_shift_toggle" |endverbatim \smallskip \noindent in a terminal and press enter. Now you can switch between the UK keyboard and the Russian (phonetic) by pressing Alt Shift. This only lasts until you reboot though. A full list of layouts and variants can be found at {\tt /usr/share/X11/xkb/rules/base.lst} \newpage \noindent A mapping for the ‘Greek (polytonic)’ layout. From {\tt/usr/share/X11/xkb/symbols/gr} \vskip\baselineskip {\quadcolumns {\setbox\strutbox=\hbox{\vrule height11.5pt depth4.5pt width0pt} \halign{\strut #\hfil& \Rm#\hfil\cr Aa & Αα\cr Bb & Ββ\cr Gg & Γγ\cr Dd & Δδ\cr Ee & Εε\cr Zz & Ζζ\cr Hh & Ηη\cr Uu & Θθ\cr Ii & Ιι\cr Kk & Κκ\cr Ll & Λλ\cr Mm & Μμ\cr Nn & Νν\cr Jj & Ξξ\cr Oo & Οο\cr Pp & Ππ\cr Rr & Ρρ\cr Ss & Σσ\cr Ww & Σς\cr Tt & Ττ\cr Yy & Υυ\cr Ff & Φφ\cr Xx & Χχ\cr Cc & Ψψ\cr Vv & Ωω\cr :a & ἀ\cr @a & ἁ\cr ;a & ά\cr 'a & ὰ\cr [a & ᾶ\cr ;:a & ἄ\cr ;@a & ἅ\cr ':a & ἂ\cr '@a & ἃ\cr [:a & ἆ\cr [@a & ἇ\cr \lb i & ϊ\cr [\lb i & ῗ\cr ]a & ᾳ\cr ][@h & ᾗ\cr AltGr [ a & ᾱ\cr AltGr ] a & ᾰ\cr q & ;\cr Q & :\cr AltGr q & ·\cr \bs & «\cr | & »\cr } \halign{\strut #\hfil& #\hfil\tabskip.5em& \Rm#\hfil\cr AltGr & ' & ‘ ’ \cr AltGr Shift & ' & “ ”\cr } } }\singlecolumn \vskip\baselineskip \noindent The default ‘Greek’ keyboard has some things that might be needed for polytonic Greek, such as the Greek numeral signs, U+0374 and U+0375. They are mapped to AltGr n and AltGr Shift n. It also has a lot of variant and archaic letters that can be accessed by AltGr (Shift). You could add those characters to the polytonic keyboard by altering the ‘gr’ file; you need to be root to do this. Or you could even write your own layout from scratch; see \href{https://help.ubuntu.com/community/Custom %20keyboard %20layout %20definitions } {here} or \href{https://ubuntu-mate.community/t/make-your-own-custom-keyboard-layout-for-linux/19733}{here}. One difference between Multikey and the XKB Greek layouts, is that Multikey uses characters from the Greek blocks for Greek punctuation: U+037E for ‘Greek question mark’ (;), U+0387 for ‘ano teleia’ (·), U+1FBD for ‘Greek koronis’ (᾽).\footnote{Actually it uses U+1FBF ‘Greek psili’, but I altered my Multikey.ini to make it use U+1FBD.} The XKB layouts use respectively U+003b (;), U+00b7 (·) and U+2019 (’). Greek texts on the internet seem to vary in which characters they use for these marks. Comma and full stop are the same as in English. Another difference concerns a duplication in Unicode. The following sixteen glyphs appear in both the monotonic block (‘Greek and Coptic’) and in the polytonic block (‘Greek Extended’): \smallskip % try out some different fonts in the table % in these fonts there are (incorrectly) differences % between the two sets of glyphs %\font\min="MinionPro-Regular" at 12pt %\font\pala="Palatino Linotype" at 12pt %\font\gara="EB Garamond" at 12pt %\font\noto="Noto Serif" at 12pt %\font\ubuntu="Ubuntu" at 12pt %\font\crim="Crimson" at 12pt { %\min %\pala %\gara %\noto %\ubuntu %\crim \halign{\strut\tabskip.25em \quad#\hfil\enspace& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil& #\hfil\cr Monotonic glyphs with tonos & ά & έ & ή & ί & ό & ύ & ώ & Ά & Έ & Ή & Ί & Ό & Ύ & Ώ & ΐ & ΰ\cr Polytonic glyphs with oxia & ά & έ & ή & ί & ό & ύ & ώ & Ά & Έ & Ή & Ί & Ό & Ύ & Ώ & ΐ & ΰ\cr} } \smallskip \noindent The Multikey polytonic layout uses the glyphs from Greek Extended; XKB’s uses the monotonic equivalents. It seems that XKB is more correct; see \href{https://wiki.digitalclassicist.org/Greek_Unicode_duplicated_vowels}{here}. If you copy the two rows of glyphs above from this PDF into LibreOffice Writer, the Greek letters in the bottom row get converted to their monotonic equivalents.\footnote{Writer does a similar thing to Greek punctuation. If you highlight a character in Writer or Word and press Alt x, you can toggle between the character and its Unicode value.} If you copy them from the .tex file this doesn’t happen. \bye