Sunday, June 18, 2017

Expanded Devanāgarī font comparison

In 2012 I posted a comparison of some Devanāgarī fonts that were around at the time.

Here's an update, with some more fonts and more concise TeX code:

\documentclass{article}
\usepackage{polyglossia}
\defaultfontfeatures{Script=Devanagari,Language=Sanskrit}

% set up a font, print its name, and typeset the test text:
\newcommand{\FontTrial}[1]{ %
    \setmainfont[Mapping=RomDev]{#1}
    \newfontfamily\eng{#1}
    % print the font name:
    {\eng #1} \TestText }

\newcommand{\TestText}{ = शक्ति, kārtsnyam ṣaṭtriṃśad;
{\addfontfeatures{Language=Hindi} Hindī =
        शक्ति कार्त्स्न्यम्}\par}

\begin{document}

\FontTrial{FreeSerif}
\FontTrial{FreeSans}
\FontTrial{Sanskrit 2003}

\setmainfont[FakeStretch=1.08,Mapping=RomDev]{Sanskrit 2003}
\newfontfamily\eng[FakeStretch=1.08,Language=English]{Sanskrit 2003}
{\eng Sanskrit 2003+} \TestText

\FontTrial{Nakula}
\FontTrial{Sahadeva}
\FontTrial{Murty Hindi}
\FontTrial{Murty Sanskrit}
\FontTrial{Shobhika}
% ... etcetera

\end{document}

Output:



Lessons learned: only Sanskrit 2003, Murty Sanskrit, and Shobhika do the right things with ṣaṭtriṃśad.

There's a special issue affecting FreeSans and FreeSerif.  I described this in a post in 2012.  The publicly distributed version of the fonts fails to make some important conjunct consonants, like त्रि and प्र correctly.  Unfortunately this issue has not changed in the intervening five years. The examples shown here use a fresh compilation of the fonts, based on downloading and compiling the development version at the Savannah repository (June 2017).  (Here's a link to my compiled fonts.)  This Savannah development version works better for  Devanagari, but has problems elsewhere, according to their author Stevan White.

Thursday, June 15, 2017

Preserve the Mess

Many years ago, I attended a Digital Humanities conference, Toronto 1989 I think it was, and heard a paper by Jocelyn Small about using digital tools to manage large datasets.  She was talking about images, but her ideas applied to any data.

One of her key slogans was, "Preserve the Mess."  This approach is now completely normalized by Google search, Google Mail, etc., and we all take it for granted.  But it's worth remembering that this was a major conceptual breakthrough.

Before this approach, everyone thought that the way to find stuff was to use subject indexes.  And subject indexing is expensive, difficult, subjective and structurally imperfect.  What subject headings would you use for the Mahābhārata, for example? I think most people would agree that it is difficult to impossible to arrive at a simple statement of the subject matter of the Mbh that is actually worth having.  Of course, we can all play nothing-buttery, "the Mbh is nothing but a family quarrel," but that's not a serious approach to the problem.  If we pervade the epic with our keywords and subject index terms, we are trying to make the text more accurate than it is, and our exercise is culture-bound and subjective.

"Preserving the mess" means that we leave the data alone.  Rather, we put the intelligence and power into our tools for accessing the data.  We use fuzzy-matching, pattern recognition, machine learning, but all applied to the raw data which is not itself manipulated or changed.

A published version of Small's ideas appeared in 1991:

As she says, p. 52,
Thus Principle Number One is Aristotelian: "Do not make your datum more accurate than it is. This principle may be rephrased as, "Preserve the Mess."

Tuesday, June 13, 2017

Del latitude xinput settings

See https://askubuntu.com/questions/688270/mouse-speed-too-fast

Put the following commands in a file (foobar.sh), make the file executable (chmod +x foobar.sh), and then run it.

#!/bin/sh
xinput --set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Constant Deceleration" 8
xinput --set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Velocity Scaling" .8
xinput --set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Adaptive Deceleration" 8


You can run this command on startup from the Startup Applications menu.

Friday, June 09, 2017

Lining or Oldstyle numerals in math typesetting?

The classic work,


has the following remarks in paragraph 95, p. 63:
Relative size of numerals in tables.-- André says on this point: "In certain numerical tables, as those of
 Schrön, all numerals are of the same height. In certain other tables, as those of Lalande, of Callet, of Houël, of Dupuis, they have unequal heights: the 7 and 9 are prolonged downward; 3, 4, 5, 6 and 8 extend upward; while 1 and 2 do not reach above nor below the central body of the writing.... The unequal numerals, by their very inequality, render the long train of numerals easier to read; numerals of uniform height are less legible." (D. André, Des notations mathématiques (Paris, 1909), p .9).

Thursday, May 18, 2017

YAAC ("yet again about copyright")

Some sensible remarks from the Director of UofA's copyright office.  Importantly, the UofA relinquishes its rights to the copyright of work written by faculty members.  Faculty members own the copyright of their writings.

Tuesday, May 16, 2017

IBUS bug fix ... again (sigh!)

Further to https://cikitsa.blogspot.ca/2012/01/ibus-bug-fix.html, I found the same bug cropping up in Linux Mint 18.1, with IBUS 1.15.11.

Some applications don't like IBUS + m17n, and certain input mim files. For example, LibreOffice and JabRef.  Trying to type "ācārya" will give the result is "ācāry a". And in other strings, some letters are inverted: "is" becomes "si" and so forth.

Here's the fix.

Create a file called, say ibus-setting.sh with the following one-line content:
export IBUS_ENABLE_SYNC_MODE=0
Copy the file ibus-setting.sh to the directory /etc/profile.d/, like this:
sudo cp ibus-setting.sh /etc/profile.d
Make the file executable, like this:
sudo chmod +x /etc/profile.d/ibus-setting.sh
Logout and login again.

Phew!

This fixes the behaviour of IBUS + m17n with most applications, including LibreOffice and Java applications like JabRef.  However, some applications compiled with QT5 still have problems.  So, for example, you have to use the version of TeXStudio that is compiled with QT4, not QT5.

Wednesday, March 22, 2017

Dvandva compounds of adjectives

Some discussions supporting the existence of this formation:
  • Speyer, Sanskrit Syntax, para 208
  • Whitney, para 1257
  • Burrow, The Skt Language, p.219