{"id":1889,"date":"2023-12-08T04:24:49","date_gmt":"2023-12-08T04:24:49","guid":{"rendered":"https:\/\/software.sil.org\/ptxprint\/documentation\/how-to-interlinear-text-2\/"},"modified":"2024-07-15T15:42:18","modified_gmt":"2024-07-15T15:42:18","slug":"how-to-color-diacritics","status":"publish","type":"page","link":"https:\/\/software.sil.org\/ptxprint\/learn\/how-to-color-diacritics\/","title":{"rendered":"How to: Colored Diacritics"},"content":{"rendered":"<p>One of the ways to embellish the printed Word, particularly in Arabic script, is to use colored diacritics. PTXprint can now process the generated xdv file between its creation by TeX and its being converted into PDF. This allows for the coloring of particular glyphs in a font, as seen in the sample below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1915\" src=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_09_54-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4.png\" alt=\"\" width=\"1336\" height=\"654\" srcset=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_09_54-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4.png 1336w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_09_54-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4-300x147.png 300w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_09_54-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4-1024x501.png 1024w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_09_54-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4-768x376.png 768w\" sizes=\"auto, (max-width: 1336px) 100vw, 1336px\" \/><\/p>\n<hr \/>\n<p>This <em>How To&#8230;<\/em> guide assumes that you can already produce well formatted scripture (as shown below), and only aims to explain how to get the colored diacritics to appear.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1920\" src=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_03_48-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4.png\" alt=\"\" width=\"1514\" height=\"764\" srcset=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_03_48-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4.png 1514w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_03_48-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4-300x151.png 300w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_03_48-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4-1024x517.png 1024w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_03_48-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4-768x388.png 768w\" sizes=\"auto, (max-width: 1514px) 100vw, 1514px\" \/><\/p>\n<p>Make sure that you are using <strong>Full View<\/strong> in order to carry out the instructions below to enable the Colored Diacritics:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1921\" src=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_24_29-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN.png\" alt=\"\" width=\"287\" height=\"177\" \/><\/p>\n<ol>\n<li>Select the <strong>Advanced<\/strong> Tab<\/li>\n<li>Click to enable the option <strong>Apply Customized Settings<\/strong> (ptxprint-mods.tex)<\/li>\n<li>Click on <strong>Edit&#8230;<\/strong> to open the file where we will place the additional settings<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1919\" src=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_05_09-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN-4.png\" alt=\"\" width=\"533\" height=\"329\" srcset=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_05_09-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN-4.png 533w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_05_09-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN-4-300x185.png 300w\" sizes=\"auto, (max-width: 533px) 100vw, 533px\" \/><\/li>\n<li>Now <strong>copy<\/strong> this block of TeX code (so that we can paste it into PTXprint):\n<pre>\\input ptx-arab-colouring.tex\n\\def\\dialist{PATone PAVowel PAHonorific}\n%\\special{ptxp:diacolour PAVowel 0.9 0 0}\n\\def\\diastart{\\special{ptxp:diastart \\dialist}}\n\\def\\diastop{\\special{ptxp:diastop \\dialist}}\n\\addtostartptxhooks{\\ifscripturebook\\diastart\\fi}\n\\addtoendptxhooks{\\ifscripturebook\\diastop\\fi}\n\\sethook{start}{nd}{\\special{ptxp:diapause}}\n\\sethook{end}{nd}{\\special{ptxp:diaunpause}}<\/pre>\n<\/li>\n<li>Switch back to PTXprint and <strong>paste<\/strong> the code (as shown below) into the window containing the <strong>ptxprint-mods.tex<\/strong> file, and then click <strong>Save<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1918\" src=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_06_30-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN-4.png\" alt=\"\" width=\"633\" height=\"486\" srcset=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_06_30-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN-4.png 633w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_06_30-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN-4-300x230.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/li>\n<li>Now select the <strong>Finishing<\/strong> tab<\/li>\n<li>Enable the highlighted option, <strong>Extra XDV Processing<\/strong>:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1917\" src=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_07_24-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN-4.png\" alt=\"\" width=\"843\" height=\"225\" srcset=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_07_24-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN-4.png 843w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_07_24-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN-4-300x80.png 300w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_07_24-PTXprint-2.4.6-arONAV12__2-col-A5-Ayah-JHN-4-768x205.png 768w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/li>\n<li>Finally, click on <strong>Print (Make PDF)<\/strong> to create the PDF with the colored diacritics.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1916\" src=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_09_03-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4.png\" alt=\"\" width=\"1514\" height=\"764\" srcset=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_09_03-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4.png 1514w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_09_03-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4-300x151.png 300w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_09_03-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4-1024x517.png 1024w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_09_03-arONAV12_2-col-A5-Ayah_JHN_ptxp.pdf-Unknown-SumatraPDF-4-768x388.png 768w\" sizes=\"auto, (max-width: 1514px) 100vw, 1514px\" \/><\/li>\n<\/ol>\n<p>It&#8217;s that easy!<\/p>\n<p>Note that the color used can be modified to be lighter or darker as needed by (i) removing the % comment mark on this line:<\/p>\n<pre><span class=\"pl-c\">\\special{ptxp:diacolour PAVowel 0.9 0 0}<\/span><\/pre>\n<p>and then (ii) tweaking the three values of the RGB (Red\/Green\/Blue) code. Here is a color chart (click for even more colors) which may help you choose the right hue:<\/p>\n<p><a href=\"https:\/\/www.tug.org\/pracjourn\/2007-4\/walden\/color.pdf\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1923\" src=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_42_39-color.pdf-Brave.png\" alt=\"\" width=\"1098\" height=\"508\" srcset=\"https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_42_39-color.pdf-Brave.png 1098w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_42_39-color.pdf-Brave-300x139.png 300w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_42_39-color.pdf-Brave-1024x474.png 1024w, https:\/\/software.sil.org\/ptxprint\/wp-content\/uploads\/sites\/59\/2023\/12\/2023-12-08-19_42_39-color.pdf-Brave-768x355.png 768w\" sizes=\"auto, (max-width: 1098px) 100vw, 1098px\" \/><\/a><\/p>\n<p>For further details on this feature, please refer to the <a href=\"https:\/\/github.com\/sillsdev\/ptx2pdf\/blob\/master\/docs\/documentation\/snippets.md#coloured-diacritics\" target=\"_blank\" rel=\"noopener\">technical help<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the ways to embellish the printed Word, particularly in Arabic script, is to use colored diacritics. PTXprint can now process the generated xdv file between its creation by TeX and its being converted into PDF. This allows for the coloring of particular glyphs in a font, as seen in the sample below: This [&hellip;]<\/p>\n","protected":false},"author":61,"featured_media":0,"parent":890,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"hide_sidebar":false,"hide_h1":false,"footnotes":""},"class_list":["post-1889","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/software.sil.org\/ptxprint\/wp-json\/wp\/v2\/pages\/1889","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/software.sil.org\/ptxprint\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/software.sil.org\/ptxprint\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/software.sil.org\/ptxprint\/wp-json\/wp\/v2\/users\/61"}],"replies":[{"embeddable":true,"href":"https:\/\/software.sil.org\/ptxprint\/wp-json\/wp\/v2\/comments?post=1889"}],"version-history":[{"count":4,"href":"https:\/\/software.sil.org\/ptxprint\/wp-json\/wp\/v2\/pages\/1889\/revisions"}],"predecessor-version":[{"id":1926,"href":"https:\/\/software.sil.org\/ptxprint\/wp-json\/wp\/v2\/pages\/1889\/revisions\/1926"}],"up":[{"embeddable":true,"href":"https:\/\/software.sil.org\/ptxprint\/wp-json\/wp\/v2\/pages\/890"}],"wp:attachment":[{"href":"https:\/\/software.sil.org\/ptxprint\/wp-json\/wp\/v2\/media?parent=1889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}