]> git.donarmstrong.com Git - lilypond.git/commitdiff
Update texinfo.tex from Texinfo CVS
authorJohn Mandereau <john.mandereau@gmail.com>
Wed, 27 Jun 2007 12:10:18 +0000 (14:10 +0200)
committerJohn Mandereau <john.mandereau@gmail.com>
Wed, 27 Jun 2007 12:10:18 +0000 (14:10 +0200)
texinfo.tex last fix makes UTF-8 to Texinfo acented characters
conversion in texi-gettext.py no longer necessary, so we drop it.

buildscripts/texi-gettext.py
tex/texinfo.tex

index 49cc62288b2cb7ce25fc3bec13e6c666096db33c..00807407b0050db8e6adf59474b3672d0cb47582 100644 (file)
@@ -36,66 +36,6 @@ ref_re = re.compile (r'(?ms)@(rglos|ref)(\{)(.*?)(\})')
 node_section_re = re.compile (r'@(node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading)( )(.*?)(\n)')
 menu_entry_re = re.compile (r'\* (.*?)::')
 
-# Why not use recode?
-# - well, it would add one more dependency...
-accents2texi = (
-       ("á", "@'a"),
-       ("à", "@`a"),
-       ("â", "@^a"),
-       ("ä", "@\"a"),
-       ("é", "@'e"),
-       ("è", "@`e"),
-       ("ê", "@^e"),
-       ("ë", "@\"e"),
-       ("ó", "@'o"),
-       ("ò", "@`o"),
-       ("ô", "@^o"),
-       ("ö", "@\"o"),
-       ("ú", "@'u"),
-       ("ù", "@`u"),
-       ("û", "@^u"),
-       ("ü", "@\"u"),
-       ("ç", "@,{c}"),
-       ("À", "@`A"),
-       ("Á", "@'A"),
-       ("Â", "@^A"),
-       ("Ä", "@\"A"),
-       ("É", "@'E"),
-       ("È", "@`E"),
-       ("Ê", "@^E"),
-       ("Ë", "@\"E"),
-       ("Ó", "@'O"),
-       ("Ò", "@`O"),
-       ("Ô", "@^O"),
-       ("Ö", "@\"O"),
-       ("Ú ", "@'U"),
-       ("Ù", "@`U"),
-       ("Û", "@^U"),
-       ("Ü", "@\"U"),
-       ("Ç", "@,{C}"),
-       ("Í", "@'{@dotless{i}}"),
-       ("ì", "@`{@dotless{i}}"),
-       ("î", "@^{@dotless{i}}"),
-       ("ï", "@\"{@dotless{i}}"),
-       ("Í", "@'I"),
-       ("Ì", "@`I"),
-       ("Î", "@^I"),
-       ("Ï", "@\"I"),
-       ("œ", "@oe{}"),
-       ("Œ", "@OE{}"),
-       ("æ", "@ae{}"),
-       ("Æ", "@AE{}"),
-       ("¡", "@exclamdown{}"),
-       ("¿", "@questiondown{}"),
-       ("ø", "@o{}"),
-       ("Ø", "@O{}"),
-       ("ß", "@ss{}"),
-       ("ł", "@l{}"),
-       ("Ł", "@L{}"),
-       ("å", "@aa{}"),
-       ("Å", "@AA{}"))
-
-
 def title_gettext (m):
        if m.group (2) == '{':
                r = whitespaces.sub (' ', m.group (3))
@@ -125,8 +65,6 @@ well as all `UNTRANSLATED NODE: IGNORE ME' lines.""", '')
        page = page.replace ('UNTRANSLATED NODE: IGNORE ME', _doc ("This section has not been translated yet; please refer to the manual in English."))
        includes = include_re.findall (page)
        page = include_re.sub (lambda m: include_replace (m, filename), page)
-       for (u_char, texiaccent_char) in accents2texi:
-               page = page.replace (u_char, texiaccent_char)
        p = os.path.join (outdir, filename) [:-4] + 'pdftexi'
        f = open (p, 'w')
        f.write (page)
index 0f3c750a645050c04ce742eaab4c5572a512da1b..060f622245978dc97a558d88ac955a894817483a 100644 (file)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2007-05-04.09}
+\def\texinfoversion{2007-06-26.23}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -5765,11 +5765,11 @@ end
 % regular 0x27.  
 % 
 \def\codequoteright{%
-  \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
-    '%
-  \else
-    \char'15
-  \fi
+  \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+    \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+      '%
+    \else \char'15 \fi
+  \else \char'15 \fi
 }
 %
 % and a similar option for the left quote char vs. a grave accent.
@@ -5777,11 +5777,11 @@ end
 % the code environments to do likewise.
 % 
 \def\codequoteleft{%
-  \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
-    `%
-  \else
-    \char'22
-  \fi
+  \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+    \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+      `%
+    \else \char'22 \fi
+  \else \char'22 \fi
 }
 %
 \begingroup
@@ -6332,6 +6332,10 @@ end
 % all characters are catcode 10, 11 or 12, except \ which is active
 % (as in normal texinfo). It is necessary to change the definition of \.
 
+% Non-ASCII encodings make 8-bit characters active, so un-activate
+% them to avoid their expansion.  Must do this non-globally, to
+% confine the change to the current group.
+
 % It's necessary to have hard CRs when the macro is executed. This is
 % done by  making ^^M (\endlinechar) catcode 12 when reading the macro
 % body, and then making it the \newlinechar in \scanmacro.
@@ -6346,6 +6350,7 @@ end
   \catcode`\_=\other
   \catcode`\|=\other
   \catcode`\~=\other
+  \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
 }
 
 \def\scanargctxt{%
@@ -7434,22 +7439,41 @@ end
 
 % @documentlanguage is usually given very early, just after
 % @setfilename.  If done too late, it may not override everything
-% properly.  Single argument is the language abbreviation.
-% It would be nice if we could set up a hyphenation file here.
+% properly.  Single argument is the language (de) or locale (de_DE)
+% abbreviation.  It would be nice if we could set up a hyphenation file.
 %
-\parseargdef\documentlanguage{%
+{
+  \catcode`\_ = \active
+  \globaldefs=1
+\parseargdef\documentlanguage{\begingroup
+  \let_=\normalunderscore  % normal _ character for filenames
   \tex % read txi-??.tex file in plain TeX.
-    % Read the file if it exists.
+    % Read the file by the name they passed if it exists.
     \openin 1 txi-#1.tex
     \ifeof 1
-      \errhelp = \nolanghelp
-      \errmessage{Cannot read language file txi-#1.tex}%
+      \documentlanguagetrywithoutunderscore{#1_\finish}%
     \else
       \input txi-#1.tex
     \fi
     \closein 1
   \endgroup
+\endgroup}
+}
+%
+% If they passed de_DE, and txi-de_DE.tex doesn't exist,
+% try txi-de.tex.
+% 
+\def\documentlanguagetrywithoutunderscore#1_#2\finish{%
+  \openin 1 txi-#1.tex
+  \ifeof 1
+    \errhelp = \nolanghelp
+    \errmessage{Cannot read language file txi-#1.tex}%
+  \else
+    \input txi-#1.tex
+  \fi
+  \closein 1
 }
+%
 \newhelp\nolanghelp{The given language definition file cannot be found or
 is empty.  Maybe you need to install it?  In the current directory
 should work if nowhere else does.}
@@ -7464,6 +7488,14 @@ should work if nowhere else does.}
    \repeat
 }
 
+\def\setnonasciicharscatcodenonglobal#1{%
+   \count255=128
+   \loop\ifnum\count255<256
+      \catcode\count255=#1
+      \advance\count255 by 1
+   \repeat
+}
+
 % @documentencoding sets the definition of non-ASCII characters
 % according to the specified encoding.
 %
@@ -8316,6 +8348,10 @@ should work if nowhere else does.}
   \ifpdf
     \pdfpageheight #7\relax
     \pdfpagewidth #8\relax
+    % if we don't reset these, they will remain at "1 true in" of
+    % whatever layout pdftex was dumped with.
+    \pdfhorigin = 1 true in
+    \pdfvorigin = 1 true in
   \fi
   %
   \setleading{\textleading}