Mercurial > gnulib
comparison build-aux/texinfo.tex @ 18196:33db3bd19ab5
autoupdate
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 12 Jan 2016 12:53:28 -0800 |
parents | 87830a35000e |
children | 6237327134cc |
comparison
equal
deleted
inserted
replaced
18195:6ee445128d2a | 18196:33db3bd19ab5 |
---|---|
1 % texinfo.tex -- TeX macros to handle Texinfo files. | 1 % texinfo.tex -- TeX macros to handle Texinfo files. |
2 % | 2 % |
3 % Load plain if necessary, i.e., if running under initex. | 3 % Load plain if necessary, i.e., if running under initex. |
4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi | 4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
5 % | 5 % |
6 \def\texinfoversion{2016-01-07.22} | 6 \def\texinfoversion{2016-01-11.19} |
7 % | 7 % |
8 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
10 % 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 | 10 % 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
11 % Free Software Foundation, Inc. | 11 % Free Software Foundation, Inc. |
9432 % otherwise the encoding support is completely broken. | 9432 % otherwise the encoding support is completely broken. |
9433 \ifx\XeTeXrevision\thisisundefined | 9433 \ifx\XeTeXrevision\thisisundefined |
9434 \else | 9434 \else |
9435 \XeTeXdefaultencoding "bytes" % For subsequent files to be read | 9435 \XeTeXdefaultencoding "bytes" % For subsequent files to be read |
9436 \XeTeXinputencoding "bytes" % Effective in texinfo.tex only | 9436 \XeTeXinputencoding "bytes" % Effective in texinfo.tex only |
9437 % Unfortunately, there seems to be no corresponding XeTeX command for | |
9438 % output encoding. This is a problem for auxiliary index and TOC files. | |
9439 % The only solution would be perhaps to write out @U{...} sequences in | |
9440 % place of UTF-8 characters. | |
9437 \fi | 9441 \fi |
9438 | 9442 |
9439 \ifx\luatexversion\thisisundefined | 9443 \ifx\luatexversion\thisisundefined |
9440 \else | 9444 \else |
9441 \directlua{ | 9445 \directlua{ |
9442 local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub | 9446 local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub |
9443 | |
9444 local function convert_char (char) | 9447 local function convert_char (char) |
9445 return utf8_char(byte(char)) | 9448 return utf8_char(byte(char)) |
9446 end | 9449 end |
9447 | 9450 |
9448 local function convert_line (line) | 9451 local function convert_line (line) |
9449 return gsub(line, ".", convert_char) | 9452 return gsub(line, ".", convert_char) |
9450 end | 9453 end |
9451 | 9454 |
9452 callback.register("process_input_buffer", convert_line) | 9455 callback.register("process_input_buffer", convert_line) |
9456 | |
9457 local function convert_line_out (line) | |
9458 local line_out = "" | |
9459 for c in string.utfvalues(line) do | |
9460 line_out = line_out .. string.char(c) | |
9461 end | |
9462 return line_out | |
9463 end | |
9464 | |
9465 callback.register("process_output_buffer", convert_line_out) | |
9453 } | 9466 } |
9454 \fi | 9467 \fi |
9455 | 9468 |
9456 | 9469 |
9457 % Helpers for encodings. | 9470 % Helpers for encodings. |