[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XeTeX encoding problem

From: Gavin Smith
Subject: Re: XeTeX encoding problem
Date: Sun, 10 Jan 2016 19:21:18 +0000

On 10 January 2016 at 17:59, Masamichi HOSODA <address@hidden> wrote:
> In XeTeX and LuaTex, non-ascii chapter name of ``Table of contents''
> is broken.
> In pdfTeX, it is not broken.

For LuaTeX the code should be something like

local function convert_line_out (line)
  local line_out = ''
  for p, c in unicode.utf8.codes(line) do
     line_out = line_out .. c
  return line_out

callback.register("process_output_buffer", convert_line_out)

but I can't get it to work. It outputs:

This is LuaTeX, Version beta-0.87.0 (TeX Live 2016/dev)
(./aaa.texi (./texinfo.tex Loading texinfo [version 2016-01-07.22]: pdf,
fonts, markup, glyphs, page headings, tables, conditionals, indexing,
sectioning, toc, environments, defuns, macros, cross references, insertions,
This is `epsf.tex' v2.7.4 <14 February 2011>
) localization, formatting, and turning on texinfo input format.) (./aaa.toc)
[-1] Chapter 1 [1

and hangs. I have no knowledge of Lua so am probably missing something
simple. Experimenting I found utf8.char would hang and utf8_char (the
alias declared earlier in the file) doesn't - I don't know what that

reply via email to

[Prev in Thread] Current Thread [Next in Thread]