<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Thomas Tsoi on Medium]]></title>
        <description><![CDATA[Stories by Thomas Tsoi on Medium]]></description>
        <link>https://medium.com/@tsoithomas?source=rss-79e906b7b99f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*5d6DJKSB0xLtg0Ia.jpg</url>
            <title>Stories by Thomas Tsoi on Medium</title>
            <link>https://medium.com/@tsoithomas?source=rss-79e906b7b99f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 16:36:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tsoithomas/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to import Chinese characters with ruby text into Adobe InDesign]]></title>
            <link>https://tsoithomas.medium.com/how-to-import-chinese-characters-with-ruby-text-into-adobe-indesign-50d2293bd816?source=rss-79e906b7b99f------2</link>
            <guid isPermaLink="false">https://medium.com/p/50d2293bd816</guid>
            <category><![CDATA[chinese]]></category>
            <category><![CDATA[indesign]]></category>
            <category><![CDATA[jyutping]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[cantonese]]></category>
            <dc:creator><![CDATA[Thomas Tsoi]]></dc:creator>
            <pubDate>Thu, 03 Aug 2023 09:03:45 GMT</pubDate>
            <atom:updated>2023-08-03T09:05:06.881Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tsoithomas.medium.com/%E5%A6%82%E4%BD%95%E5%9C%A8adobe-indesign%E4%B8%AD%E5%8C%AF%E5%85%A5%E6%BC%A2%E5%AD%97%E6%A8%99%E9%9F%B3-1fd0e2a6a5dc">Chinese version 中文版本</a></p><p>When I was editing “The Little Prince in Cantonese with Jyutping” in 2017, I needed to mark Jyutping (a romanization system for Cantonese) annotations to all the words in the book. This process was challenging and not efficient in the current InDesign interface. Firstly, the English version of InDesign lacks tools for handling these ruby characters, so I had to install the Chinese version. Even then, adding phonetic ruby characters word by word or line by line in the program was still inconvenient. In practice, it would be much quicker to edit and proofread the text in a separate file and then import it directly.</p><p>In general, finding a solution to this kind of problems should be as easy as a quick Google search, considering that there are many children’s books with annotated phonetics. Strangely, I couldn’t find any solutions online, and I was perplexed about how those children’s book publishers managed to do it. So, I had no choice but to explore a way to quickly import ruby characters on my own.</p><h4>Adobe InDesign Tagged Text</h4><p>After some research, I discovered that in InDesign, you can export text as an Adobe InDesign Tagged Text File, and conversely you can import tagged text into the application too. Most importantly, these text files support ruby characters. The format of this tagged text file is somewhat intriguing, especially when font and layout styles are applied to the text, the exported files do not appear to be simple plain text files. However, if we do not apply additional formatting but are only concerned with having ruby characters, the markup syntax is not difficult to understand. Let’s take a simple example to illustrate:</p><pre>&lt;UNICODE-WIN&gt;<br>&lt;vsn:18.5&gt;&lt;fset:InDesign-Roman&gt;&lt;ctable:=&lt;Black:COLOR:CMYK:Process:0,0,0,1&gt;&gt;<br>&lt;pstyle:&gt;&lt;cr:1&gt;&lt;crstr:zung1&gt;中&lt;cr:&gt;&lt;crstr:&gt;&lt;cr:1&gt;&lt;crstr:man4&gt;文&lt;cr:&gt;&lt;crstr:&gt;&lt;cr:1&gt;&lt;crstr:zi6&gt;字&lt;cr:&gt;&lt;crstr:&gt;<br>&lt;pstyle:&gt;&lt;cr:1&gt;&lt;crstr:siu2 wong4 zi2&gt;小王子&lt;cr:&gt;&lt;crstr:&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*Tu64A4ZzjsOVa5rv4vbd6g.png" /><figcaption>Words imported into InDesign with the markup file above</figcaption></figure><p>The first two lines are basic specifications and can be ignored. The third and fourth lines start with &lt;pstyle:&gt;, indicating the beginning of a paragraph. The format for annotating Chinese characters is a bit unusual; it does not use opening and closing tags like HTML or XML. Anyway, we can see that the tags required for each unit of Chinese character is as follows. Note that the ruby text is specified within the first &lt;crstr:&gt; tag.</p><pre>&lt;cr:1&gt;&lt;crstr:zi6&gt;字&lt;cr:&gt;&lt;crstr:&gt;</pre><p>Additionally, it is important to note that this tagged text file needs to be saved in UTF16-LE format with Windows’ CRLF line endings; otherwise, InDesign cannot import it correctly.</p><p>Once the technical aspects are understood, the remaining task is to write a small program that converts the Chinese text and corresponding ruby text into a proper format required by the markup text file. With this, you can easily import a large amount of Chinese characters with ruby text into InDesign without the need to manually edit each character. This is why I wrote the tool “ruby2indesign”:</p><p><a href="https://ruby2indesign.vercel.app/">ruby2indesign — https://ruby2indesign.vercel.app</a></p><p><strong>ruby2indesign</strong> accepts .txt files in the following format:</p><blockquote>The Chinese text for each sentence and its corresponding phonetic annotations are placed on alternate lines. Odd-numbered lines contain the Chinese characters, while even-numbered lines contain the ruby text. The Chinese characters do not require spacing, but a single space is needed between each group of ruby text.</blockquote><pre>你好，小王子！<br>nei5 hou2 , siu2 wong4 zi2 !<br>拜拜啦！<br>baai1 baai3 laa3 !</pre><p>After the format conversion, full-width punctuation marks will not be shown with their corresponding half-width punctuation marks. The imported result will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*F3JS6-HSLs7ufBUQukentg.png" /></figure><h4>Importing the tagged text file</h4><p>Create a text frame in InDesign:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*-XVC6Do8bJe7-hPpOmUy5A.gif" /></figure><p>From the menu, select <strong>檔案</strong> &gt; <strong>置入 (</strong>File &gt; Place). Note that ruby text is only imported in the Chinese version but not the English one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*NhlI816h-ltvy4rLUe2jQQ.png" /></figure><p>Then select the<em> _indesign.txt</em> text file converted with <strong>ruby2indesign</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50d2293bd816" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[如何在Adobe InDesign中匯入漢字標音]]></title>
            <link>https://tsoithomas.medium.com/%E5%A6%82%E4%BD%95%E5%9C%A8adobe-indesign%E4%B8%AD%E5%8C%AF%E5%85%A5%E6%BC%A2%E5%AD%97%E6%A8%99%E9%9F%B3-1fd0e2a6a5dc?source=rss-79e906b7b99f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fd0e2a6a5dc</guid>
            <category><![CDATA[cantonese]]></category>
            <category><![CDATA[chinese]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[jyutping]]></category>
            <category><![CDATA[indesign]]></category>
            <dc:creator><![CDATA[Thomas Tsoi]]></dc:creator>
            <pubDate>Thu, 03 Aug 2023 08:02:08 GMT</pubDate>
            <atom:updated>2023-08-03T09:05:38.064Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tsoithomas.medium.com/how-to-import-chinese-characters-with-ruby-text-into-adobe-indesign-50d2293bd816">English version</a></p><p>我在2017年編輯《小王子香港粵拼版》時，需要為全書中所有文字加上粵拼（粵語的標音系統）。這項工序在InDesign現時的介面中很難可以有效率地完成。首先，在英文的InDesign中並沒有加注標音的工具，因此你需要安裝中文介面的InDesign。然後，即使在中文InDesign中有標音工具，但要逐字或逐行加上標音，事實上也很不方便。實際情況下，往往先在文字檔編輯校對好，再直接匯入是最快捷的方法。</p><p>一般來說，要找出如何做到以上所講應該只要Google一下就會有答案，畢竟有加注標音的兒童圖書其實並不算少。奇怪的是竟然事與願違，網上怎找都找不到方法（而我實在不知道那些兒童圖書出版社是怎樣做的）。於是乎，我唯有自己探索能夠快速匯入標音的途徑。</p><h4>Adobe InDesign標記文字檔</h4><p>幾番研究後，我發現在InDesign中可以將文字匯出成<strong>Adobe InDesign標記文字檔</strong>，同時亦可反向利用標記文字檔直接匯入文字；而這些文字是可以支援標音，亦即英文中所謂的ruby character。這種標記文字檔的格式有點複雜，尤其是當文本套用了字體、排版式樣等參數後，匯出的似乎並非純文字檔。不過，如果不套用格式，只著眼標音的話，其標記並不難理解。且看以下一個簡單的例子：</p><pre>&lt;UNICODE-WIN&gt;<br>&lt;vsn:18.5&gt;&lt;fset:InDesign-Roman&gt;&lt;ctable:=&lt;Black:COLOR:CMYK:Process:0,0,0,1&gt;&gt;<br>&lt;pstyle:&gt;&lt;cr:1&gt;&lt;crstr:zung1&gt;中&lt;cr:&gt;&lt;crstr:&gt;&lt;cr:1&gt;&lt;crstr:man4&gt;文&lt;cr:&gt;&lt;crstr:&gt;&lt;cr:1&gt;&lt;crstr:zi6&gt;字&lt;cr:&gt;&lt;crstr:&gt;<br>&lt;pstyle:&gt;&lt;cr:1&gt;&lt;crstr:siu2 wong4 zi2&gt;小王子&lt;cr:&gt;&lt;crstr:&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*Tu64A4ZzjsOVa5rv4vbd6g.png" /><figcaption>匯入以上標記文字檔後的文字</figcaption></figure><p>當中頭兩行是基本設定，可以忽視。第三、四行以&lt;pstyle:&gt;開始，代表段落開始，漢字標音部份格式有點奇怪，不像HTML或XML那樣使用開始標記和結束標記，但總之一個漢字單元格式如下，留意標音藏在第一個&lt;crstr:&gt;標記中：</p><pre>&lt;cr:1&gt;&lt;crstr:zi6&gt;字&lt;cr:&gt;&lt;crstr:&gt;</pre><p>此外，必須留意這個標記文字檔需要以UTF16-LE格式和Windows的CRLF換行字元儲存，否則InDesign不能正確匯入。</p><p>技術層面搞清楚以後，剩下來就只需要寫一個小程式將漢字文本和相關標音轉化做符合格式的標記文字檔，就可以輕鬆將大量文字加注標音而無需在InDesign內逐字修改。這就成了ruby2indesign這個小工具：</p><p><a href="https://ruby2indesign.vercel.app/">ruby2indesign — https://ruby2indesign.vercel.app</a></p><p>ruby2indesign接受以下輸入格式的.txt文字檔：</p><blockquote>整句的漢字文本和標音符號分別放在不同行數上，單數行是漢字，雙數行是標音。漢字不用空格分隔，但標音符號之間需要用一個空格分隔。</blockquote><pre>你好，小王子！<br>nei5 hou2 , siu2 wong4 zi2 !<br>拜拜啦！<br>baai1 baai3 laa3 !</pre><p>格式轉換後，全形標點符號上會自動省略其相應的半形標點符號，匯入後效果如下：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*F3JS6-HSLs7ufBUQukentg.png" /></figure><h4>匯入步驟</h4><p>在InDesign內創造一個文字框：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*-XVC6Do8bJe7-hPpOmUy5A.gif" /></figure><p>在選單中，選取 <strong>檔案</strong> &gt; <strong>置入</strong>：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*NhlI816h-ltvy4rLUe2jQQ.png" /></figure><p>然後選取從ruby2indesign轉換格式後得到的_indesign.txt文字檔。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fd0e2a6a5dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>