{"id":723,"date":"2016-04-14T10:30:08","date_gmt":"2016-04-14T08:30:08","guid":{"rendered":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/?p=723"},"modified":"2016-04-21T09:31:51","modified_gmt":"2016-04-21T07:31:51","slug":"fat%e1%b8%a5ah-in-the-margin","status":"publish","type":"post","link":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/2016\/04\/14\/fat%e1%b8%a5ah-in-the-margin\/","title":{"rendered":"Fat\u1e25ah in the margin"},"content":{"rendered":"<p>This post discusses an advanced typesetting problem dealing with the interplay of margin notes with German and Arabic LaTeX packages.<\/p>\n<p>We have published a critical edition of Georg von der Gabelentz&#8217;s <a href=\"https:\/\/langsci-press.org\/catalog\/book\/97\"><em>Die Sprachwissenschaft<\/em><\/a>. This book comprises the text of the first edition from 1891 and the second edition from 1901. Differences between the editions are marked with different colours in the running text. Substitutions are marked in the margin. So far so good. The following image gives an example.<\/p>\n<div id=\"attachment_739\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/greek.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-739\" class=\"wp-image-739 size-large\" src=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/greek-1024x180.png\" alt=\"Margin notes and coloured text in the critical edition of Gabelentz's &quot;Die Sprachwissenschaft&quot;\" width=\"584\" height=\"103\" srcset=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/greek-1024x180.png 1024w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/greek-300x53.png 300w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/greek-500x88.png 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-739\" class=\"wp-caption-text\">Margin notes and coloured text in the critical edition of Gabelentz&#8217;s &#8220;Die Sprachwissenschaft&#8221;. Red text marks updates between first and second edition, blue text marks corrections by the editors of the present edition, here a wrong accent mark.<\/p><\/div>\n<p><!--more--><\/p>\n<p>Gabelentz treats many different languages. Among other things, he has passages on Arabic and Hebrew. These also occur with critical annotations.<\/p>\n<div id=\"attachment_738\" style=\"width: 594px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/hebrew.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-738\" class=\"wp-image-738 size-large\" src=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/hebrew-1024x228.png\" alt=\"hebrew\" width=\"584\" height=\"130\" srcset=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/hebrew-1024x228.png 1024w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/hebrew-300x67.png 300w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/hebrew-500x111.png 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-738\" class=\"wp-caption-text\">Passage about Hebrew with critical annotations<\/p><\/div>\n<div id=\"attachment_740\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/arabic1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-740\" class=\"wp-image-740 size-large\" src=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/arabic1-1024x186.png\" alt=\"Passage about Arabic with critical annotations.\" width=\"584\" height=\"106\" srcset=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/arabic1-1024x186.png 1024w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/arabic1-300x54.png 300w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/arabic1-500x91.png 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-740\" class=\"wp-caption-text\">Passage about Arabic with critical annotations.<\/p><\/div>\n<p>Arabic script is an <a href=\"https:\/\/en.wikipedia.org\/wiki\/Abjad\">abjad<\/a>. Vowels are normally not written, but they can be added as diacritic marks if required. Texts are typically either fully vocalized or fully unvocalized. The LaTeX packages <a href=\"https:\/\/www.ctan.org\/pkg\/arabtex\">arabtex<\/a> and <a href=\"https:\/\/www.ctan.org\/tex-archive\/language\/hebrew\/hebtex\">hebtex<\/a> can be used to typeset this. The vocalized and unvocalized variants are given below. The relevant marks are the <span id=\"Fat.E1.B8.A5ah\" class=\"mw-headline\">fat\u1e25ah (<\/span> \u064e) and the <b><span class=\"Unicode\" title=\"ar ALA transliteration\">suk\u016bn (<\/span><\/b>\u0640\u0652). The <span id=\"Fat.E1.B8.A5ah\" class=\"mw-headline\">fat\u1e25ah<\/span> indicates that the next vowel is a short \/a\/, whereas the <b><span class=\"Unicode\" title=\"ar ALA transliteration\">suk\u016bn <\/span><\/b>indicates that the following vowel slot ist empty. In the example below, we have the consonant sequence &#8220;qtlt&#8221; and the vowel sequence &#8220;aa-a&#8221; (indicated by \u064e \u0640\u0652 \u064e \u064e\u00a0 ), which give <em>qa.ta.l.ta<\/em> when combined.<\/p>\n<div id=\"attachment_741\" style=\"width: 874px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qatalta.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-741\" class=\"size-full wp-image-741\" src=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qatalta.png\" alt=\"Vocalized and unvocalized representation of &quot;qatalta&quot;\" width=\"864\" height=\"675\" srcset=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qatalta.png 864w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qatalta-300x234.png 300w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qatalta-384x300.png 384w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/a><p id=\"caption-attachment-741\" class=\"wp-caption-text\">Vocalized and unvocalized representation of &#8220;qatalta&#8221;<\/p><\/div>\n<p>There is one instance of incomplete vocalization in the book. The final letter is missing its <span id=\"Fat.E1.B8.A5ah\" class=\"mw-headline\">fat\u1e25ah<\/span>. The first letters of the word <em>qatalta<\/em> all come with diacritics; it is only the last letter which is bare. It is extremely likely that this is an oversight. Therefore, this is corrected in the running text and the original, erroneous, sequence is given in the margin for reference.<\/p>\n<div id=\"attachment_743\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qatalt.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-743\" class=\"wp-image-743 size-large\" src=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qatalt-1024x230.png\" alt=\"Margin note which gives original form with erroneous vocalization. The correct from is indicated in light blue in the running text. \" width=\"584\" height=\"131\" srcset=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qatalt-1024x230.png 1024w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qatalt-300x67.png 300w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qatalt-500x112.png 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-743\" class=\"wp-caption-text\">Margin note which gives original form with erroneous vocalization<\/p><\/div>\n<div id=\"attachment_744\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qataltdetail.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-744\" class=\"wp-image-744 size-large\" src=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qataltdetail-1024x230.png\" alt=\"Detail of the needed Arabic forms\" width=\"584\" height=\"131\" srcset=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qataltdetail-1024x230.png 1024w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qataltdetail-300x67.png 300w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qataltdetail-500x112.png 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-744\" class=\"wp-caption-text\">Detail of the needed Arabic forms. The right form, found in the margin, is missing the final fat\u1e25ah.<\/p><\/div>\n<p>The LaTeX package arabtex uses double quotation marks to suppress diacritics.<\/p>\n<div id=\"attachment_745\" style=\"width: 594px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qtlt.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-745\" class=\"size-large wp-image-745\" src=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qtlt-1024x299.png\" alt=\"Using &quot; to suppress diacritics in arabtex\" width=\"584\" height=\"171\" srcset=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qtlt-1024x299.png 1024w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qtlt-300x87.png 300w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qtlt-500x146.png 500w, https:\/\/userblogs.fu-berlin.de\/langsci-press\/files\/2016\/03\/qtlt.png 1303w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><p id=\"caption-attachment-745\" class=\"wp-caption-text\">Using &#8221; to suppress diacritics in arabtex<\/p><\/div>\n<p>Gabelentz&#8217;s book is written in German. The option <code>[german]<\/code> of the LaTeX package <code>babel<\/code> also uses <code>\"<\/code> to mark German umlauts. One could use <code>\"a<\/code> to write \u00e4 for instance (today one would of course use Unicode, but the option is still there).<\/p>\n<p>This presents no problem while the text is on the main page. However, things are different with margins and footnotes. It took some time to figure out where the problem lay.<\/p>\n<p>The main problem is that commands like <code>\\marginpar<\/code> (and <code>\\footnote<\/code>) tokenize their argument without interpreting it. The reason for this is that LaTeX cannot typeset margin notes (and footnotes) immediately upon encountering them in the code. It needs to store their content temporarily, then calculate the optimal position for them in the margin (or at the bottom of the page, in the case of footnotes), and finally typeset the content at the calculated position. The mechanics of storing the content have the effect that babel&#8217;s definition of the quotation mark <code>\"<\/code> is fixated in a way that conflicts with the arabic packages.<\/p>\n<p>One solution is to set the <code>\\catcode<\/code> for the quotation mark manually just for the relevant passage in such a way that it can be processed by the arabic packages without problem.<br \/>\n<code>{\\catcode`\\\"=12%<br \/>\n\\marginpar{<br \/>\n\\vspace{-5pt}<br \/>\n\\color{black}<br \/>\n\\raggedright<br \/>\n\\scriptsize<br \/>\n\\arabictext{qatalt\"}\\linebreak<br \/>\n\\tiny 1891 und 1901<br \/>\n}{%<br \/>\n\\color{lsMidBlue}<br \/>\n\\arabictext{qatalta}<br \/>\n}<br \/>\n}<\/code><br \/>\nIf there was more than one such passage, one could also disable babel&#8217;s special settings for the quotation mark or tell it to use another character that does not conflict with the arabic packages, for example &#8216;<code>|<\/code>&#8216; instead of &#8216;<code>\"<\/code>&#8216;.<\/p>\n<p><code>\\usepackage[german]{babel}<br \/>\n\\aliasshorthand{\"}{|}<br \/>\n\\AtBeginDocument{\\shorthandoff*{\"}}<br \/>\n\\usepackage{hebtex}<\/code><\/p>\n<p>This has been a rather technical post describing the problems of critical editions in several scripts with margin notes. The whole project is available on <a href=\"https:\/\/github.com\/langsci\/97\">github<\/a> for others to see the implementation in case similar problems arise elsewhere. Thanks go to Mathias Schenner for identifying the problem and finding the two solutions, as well as for having a look at the LaTeX parts of this post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post discusses an advanced typesetting problem dealing with the interplay of margin notes with German and Arabic LaTeX packages. We have published a critical edition of Georg von der Gabelentz&#8217;s Die Sprachwissenschaft. This book comprises the text of the &hellip; <a href=\"https:\/\/userblogs.fu-berlin.de\/langsci-press\/2016\/04\/14\/fat%e1%b8%a5ah-in-the-margin\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2177,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1150],"tags":[],"class_list":["post-723","post","type-post","status-publish","format-standard","hentry","category-latex"],"_links":{"self":[{"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/posts\/723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/users\/2177"}],"replies":[{"embeddable":true,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/comments?post=723"}],"version-history":[{"count":22,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/posts\/723\/revisions"}],"predecessor-version":[{"id":907,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/posts\/723\/revisions\/907"}],"wp:attachment":[{"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/media?parent=723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/categories?post=723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/userblogs.fu-berlin.de\/langsci-press\/wp-json\/wp\/v2\/tags?post=723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}