--- Begin Message ---
Hello again.
Received this from the debian bug system. I really wish there would be
some new recode release sometime in the near future. Patching the old
one for this feature request would be a pita.
Thanks.
---------- Forwarded message ----------
From: Vincent Danjean <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Date: Thu, 07 Dec 2006 17:19:58 +0100
Subject: Bug#402031: recode: Support BibTeX charset
Package: recode
Version: 3.6-12.1
Severity: wishlist
Tags: patch
BibTeX files uses a subset of LaTeX syntaxe. In order accentuated
characters to be correctly alphabeticaly sorted (or transformed to
the correct case), we MUST use the syntaxe :
{\'e} (and not \'e or \'{e} or ...)
The BibTeX charset added with this patch does this. It is based on
the LaTeX charset. Please, consider adding it. It is really useful
in my lab to process bibtex files from several sources automatically.
PS:
Note that the upstream build system does not seem in a good shape.
I needed to add two files to src/Makefile.am. The rules try to invoke
flex with bad options (ie options from the old flex, see my previous
bug report).
To build the package, apply the patch to the source and call debuild
(or dpkg-buildpackage)
Note that, once the package is built, it cannot be rebuild :
'make distclean' does not restore the previous state (automake files
have been modified) and dpkg-source is unable to create the diff.
The correct thing would be to run a new version of automake, so
probably to unpack original source in a directory and patch/build in
another directory. If you want I do this work, please tell me.
But I will not start to modify the way the package is built without
you tell me you are interested by this work.
Best regards,
Vincent
[...]Index: recode/recode-3.6/src/lat1btex.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ recode/recode-3.6/src/lat1btex.c 2006-12-07 15:52:55.000000000 +0100
@@ -0,0 +1,180 @@
+/* Conversion of files between different charsets and surfaces.
+ Copyright © 2006 Free Software Foundation, Inc.
+ Contributed by Vincent Danjean <[EMAIL PROTECTED]>, 2006.
+ Modified from lat1ltex.c
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ as published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the `recode' Library; see the file `COPYING.LIB'.
+ If not, write to the Free Software Foundation, Inc., 59 Temple Place -
+ Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "common.h"
+
+struct translation
+ {
+ unsigned code; /* code being translated */
+ const char *string; /* translation string */
+ };
+
+static struct translation const diacritic_translations [] =
+ {
+ {192, "{\\`A}"}, /* capital A with grave accent */
+ {193, "{\\'A}"}, /* capital A with acute accent */
+ {194, "{\\^A}"}, /* capital A with circumflex accent */
+ {195, "{\\~A}"}, /* capital A with tilde */
+ {196, "{\\\"A}"}, /* capital A diaeresis */
+ {197, "{\\AA{}}"}, /* capital A with ring above */
+ {198, "{\\AE{}}"}, /* capital diphthong A with E */
+ {199, "{\\c{C}}"}, /* capital C with cedilla */
+ {200, "{\\`E}"}, /* capital E with grave accent */
+ {201, "{\\'E}"}, /* capital E with acute accent */
+ {202, "{\\^E}"}, /* capital E with circumflex accent */
+ {203, "{\\\"E}"}, /* capital E with diaeresis */
+ {204, "{\\`I}"}, /* capital I with grave accent */
+ {205, "{\\'I}"}, /* capital I with acute accent */
+ {206, "{\\^I}"}, /* capital I with circumflex accent */
+ {207, "{\\\"I}"}, /* capital I with diaeresis */
+ {209, "{\\~N}"}, /* capital N with tilde */
+ {210, "{\\`O}"}, /* capital O with grave accent */
+ {211, "{\\'O}"}, /* capital O with acute accent */
+ {212, "{\\^O}"}, /* capital O with circumflex accent */
+ {213, "{\\~O}"}, /* capital O with tilde */
+ {214, "{\\\"O}"}, /* capital O with diaeresis */
+ {216, "{\\O{}}"}, /* capital O with oblique stroke */
+ {217, "{\\`U}"}, /* capital U with grave accent */
+ {218, "{\\'U}"}, /* capital U with acute accent */
+ {219, "{\\^U}"}, /* capital U with circumflex accent */
+ {220, "{\\\"U}"}, /* capital U with diaeresis */
+ {221, "{\\'Y}"}, /* capital Y with acute accent */
+ {223, "{\\ss{}}"}, /* small german sharp s */
+ {224, "{\\`a}"}, /* small a with grave accent */
+ {225, "{\\'a}"}, /* small a with acute accent */
+ {226, "{\\^a}"}, /* small a with circumflex accent */
+ {227, "{\\~a}"}, /* small a with tilde */
+ {228, "{\\\"a}"}, /* small a with diaeresis */
+ {229, "{\\aa{}}"}, /* small a with ring above */
+ {230, "{\\ae{}}"}, /* small diphthong a with e */
+ {231, "{\\c{c}}"}, /* small c with cedilla */
+ {232, "{\\`e}"}, /* small e with grave accent */
+ {233, "{\\'e}"}, /* small e with acute accent */
+ {234, "{\\^e}"}, /* small e with circumflex accent */
+ {235, "{\\\"e}"}, /* small e with diaeresis */
+ {236, "{\\`{\\i}}"}, /* small i with grave accent */
+ {237, "{\\'{\\i}}"}, /* small i with acute accent */
+ {238, "{\\^{\\i}}"}, /* small i with circumflex accent */
+ {239, "{\\\"{\\i}}"}, /* small i with diaeresis */
+ {241, "{\\~n}"}, /* small n with tilde */
+ {242, "{\\`o}"}, /* small o with grave accent */
+ {243, "{\\'o}"}, /* small o with acute accent */
+ {244, "{\\^o}"}, /* small o with circumflex accent */
+ {245, "{\\~o}"}, /* small o with tilde */
+ {246, "{\\\"o}"}, /* small o with diaeresis */
+ {248, "{\\o{}}"}, /* small o with oblique stroke */
+ {249, "{\\`u}"}, /* small u with grave accent */
+ {250, "{\\'u}"}, /* small u with acute accent */
+ {251, "{\\^u}"}, /* small u with circumflex accent */
+ {252, "{\\\"u}"}, /* small u with diaeresis */
+ {253, "{\\'y}"}, /* small y with acute accent */
+ {255, "{\\\"y}"}, /* small y with diaeresis */
+ {0, NULL}
+ };
+
+static struct translation const other_translations [] =
+ {
+ { 35, "\\#"},
+ { 36, "\\$"},
+ { 37, "\\%"},
+ { 38, "\\&"},
+ { 92, "\\backslash{}"},
+ { 95, "\\_"},
+ {123, "\\{"},
+ {125, "\\}"},
+ {160, "~"}, /* no-break space */
+ {161, "!`"}, /* inverted exclamation mark */
+ {163, "\\pound{}"}, /* pound sign */
+ {167, "\\S{}"}, /* paragraph sign, section sign */
+ {168, "\\\"{}"}, /* diaeresis */
+ {169, "\\copyright{}"}, /* copyright sign */
+ {171, "``"}, /* left angle quotation mark */
+ {172, "\\neg{}"}, /* not sign */
+ {173, "\\-"}, /* soft hyphen */
+ {176, "\\mbox{$^\\circ$}"}, /* degree sign */
+ {177, "\\mbox{$\\pm$}"}, /* plus-minus sign */
+ {178, "\\mbox{$^2$}"}, /* superscript two */
+ {179, "\\mbox{$^3$}"}, /* superscript three */
+ {180, "\\'{}"}, /* acute accent */
+ {181, "\\mbox{$\\mu$}"}, /* small greek mu, micro sign */
+ {183, "\\cdotp"}, /* middle dot */
+ {184, "\\,{}"}, /* cedilla */
+ {185, "\\mbox{$^1$}"}, /* superscript one */
+ {187, "''"}, /* right angle quotation mark */
+ {188, "\\frac1/4{}"}, /* vulgar fraction one quarter */
+ {189, "\\frac1/2{}"}, /* vulgar fraction one half */
+ {190, "\\frac3/4{}"}, /* vulgar fraction three quarters */
+ {191, "?`"}, /* inverted question mark */
+ {0, NULL}
+ };
+
+static bool
+init_latin1_bibtex (RECODE_STEP step,
+ RECODE_CONST_REQUEST request,
+ RECODE_CONST_OPTION_LIST before_options,
+ RECODE_CONST_OPTION_LIST after_options)
+{
+ RECODE_OUTER outer = request->outer;
+ char *pool;
+ const char **table;
+ unsigned counter;
+ struct translation const *cursor;
+
+ if (before_options || after_options)
+ return false;
+
+ if (!ALLOC_SIZE (table, 256 * sizeof (char *) + 256, const char *))
+ return false;
+ pool = (char *) (table + 256);
+
+ for (counter = 0; counter < 128; counter++)
+ {
+ table[counter] = pool;
+ *pool++ = counter;
+ *pool++ = NUL;
+ }
+ for (counter = 128; counter < 256; counter++)
+ table[counter] = NULL;
+ for (cursor = diacritic_translations; cursor->code; cursor++)
+ table[cursor->code] = cursor->string;
+
+ if (!request->diacritics_only)
+ for (cursor = other_translations; cursor->code; cursor++)
+ table[cursor->code] = cursor->string;
+
+ step->step_type = RECODE_BYTE_TO_STRING;
+ step->step_table = table;
+ return true;
+}
+
+bool
+module_latin1_bibtex (RECODE_OUTER outer)
+{
+ return
+ declare_single (outer, "Latin-1", "BibTeX",
+ outer->quality_byte_to_variable,
+ init_latin1_bibtex, transform_byte_to_variable)
+ && declare_alias (outer, "btex", "BibTeX");
+}
+
+void
+delmodule_latin1_bibtex (RECODE_OUTER outer)
+{
+}
Index: recode/recode-3.6/src/main.c
===================================================================
--- recode.orig/recode-3.6/src/main.c 2000-12-06 20:44:59.000000000 +0100
+++ recode/recode-3.6/src/main.c 2006-12-07 15:52:55.000000000 +0100
@@ -286,7 +286,7 @@
\n\
Fine tuning:\n\
-s, --strict use strict mappings, even loose characters\n\
- -d, --diacritics convert only diacritics or alike for HTML/LaTeX\n\
+ -d, --diacritics convert only diacritics or alike for
HTML/LaTeX/BibTeX\n\
-S, --source[=LN] limit recoding to strings and comments as for LN\n\
-c, --colons use colons instead of double quotes for diaeresis\n\
-g, --graphics approximate IBMPC rulers by ASCII graphics\n\
Index: recode/recode-3.6/src/recodext.h
===================================================================
--- recode.orig/recode-3.6/src/recodext.h 2001-01-04 15:36:54.000000000
+0100
+++ recode/recode-3.6/src/recodext.h 2006-12-07 15:52:55.000000000 +0100
@@ -348,7 +348,7 @@
to a single step, table production will fail. */
bool make_header_flag : 1;
- /* For `latex' charset, it is often convenient to recode the diacritics
+ /* For `latex/bibtex' charsets, it is often convenient to recode the
diacritics
only, while letting other LaTeX code using backslashes unrecoded. In
the other charset, one can edit text as well as LaTeX directives. */
bool diacritics_only : 1;
Index: recode/recode-3.6/src/btexlat1.l
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ recode/recode-3.6/src/btexlat1.l 2006-12-07 15:52:55.000000000 +0100
@@ -0,0 +1,138 @@
+/* Conversion of files between different charsets and surfaces.
+ Copyright © 1990, 93, 97, 98, 99, 00 Free Software Foundation, Inc.
+ Contributed by François Pinard <[EMAIL PROTECTED]>, 1988.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License
+ as published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the `recode' Library; see the file `COPYING.LIB'.
+ If not, write to the Free Software Foundation, Inc., 59 Temple Place -
+ Suite 330, Boston, MA 02111-1307, USA. */
+
+/* Step name: bibtex_latin1. */
+
+Letter [a-zA-Z]
+Braces [ \t]*(\{\})?
+
+%%
+
+\\"#" { PUT_NON_DIACRITIC_BYTE ('#', subtask); }
+\\"$" { PUT_NON_DIACRITIC_BYTE ('$', subtask); }
+\\"%" { PUT_NON_DIACRITIC_BYTE ('%', subtask); }
+\\"&" { PUT_NON_DIACRITIC_BYTE ('&', subtask); }
+\\"_" { PUT_NON_DIACRITIC_BYTE ('_', subtask); }
+\\"{" { PUT_NON_DIACRITIC_BYTE ('{', subtask); }
+\\"}" { PUT_NON_DIACRITIC_BYTE ('}', subtask); }
+
+\\backslash{Braces} { PUT_NON_DIACRITIC_BYTE ('\\', subtask); }
+
+"~" { PUT_NON_DIACRITIC_BYTE (160, subtask); }
+"!`" { PUT_NON_DIACRITIC_BYTE (161, subtask); }
+\\pound{Braces} { PUT_NON_DIACRITIC_BYTE (163,
subtask); }
+\\S{Braces} { PUT_NON_DIACRITIC_BYTE (167, subtask); }
+\\\" { PUT_NON_DIACRITIC_BYTE (168, subtask); }
+\\copyright{Braces} { PUT_NON_DIACRITIC_BYTE (169, subtask); }
+"``" { PUT_NON_DIACRITIC_BYTE (171, subtask); }
+\\neg{Braces} { PUT_NON_DIACRITIC_BYTE (172, subtask); }
+\\"-" { PUT_NON_DIACRITIC_BYTE (173, subtask); }
+\\mbox"{$^\\circ$}" { PUT_NON_DIACRITIC_BYTE (176, subtask); }
+\\mbox"{$\\pm$}" { PUT_NON_DIACRITIC_BYTE (177, subtask); }
+\\mbox"{$^2$}" { PUT_NON_DIACRITIC_BYTE (178, subtask); }
+\\mbox"{$^3$}" { PUT_NON_DIACRITIC_BYTE (179, subtask); }
+\\"'" { PUT_NON_DIACRITIC_BYTE (180, subtask); }
+\\mbox"{$\\mu$}" { PUT_NON_DIACRITIC_BYTE (181, subtask); }
+\\cdotp { PUT_NON_DIACRITIC_BYTE (183,
subtask); }
+\\"," { PUT_NON_DIACRITIC_BYTE (184, subtask); }
+\\mbox"{$^1$}" { PUT_NON_DIACRITIC_BYTE (185, subtask); }
+"''" { PUT_NON_DIACRITIC_BYTE (187, subtask); }
+\\frac"1/4"{Braces} { PUT_NON_DIACRITIC_BYTE (188, subtask); }
+\\frac"1/2"{Braces} { PUT_NON_DIACRITIC_BYTE (189, subtask); }
+\\frac"3/4"{Braces} { PUT_NON_DIACRITIC_BYTE (190, subtask); }
+"?`" { PUT_NON_DIACRITIC_BYTE (191, subtask); }
+
+"{"(\\"`"A|\\"`{A}")"}"|\\"`"A|\\"`{A}" {
put_byte (192, subtask); }
+"{"(\\"'"A|\\"'{A}")"}"|\\"'"A|\\"'{A}" {
put_byte (193, subtask); }
+"{"(\\"^"A|\\"^{A}")"}"|\\"^"A|\\"^{A}" {
put_byte (194, subtask); }
+"{"(\\"~"A|\\"~{A}")"}"|\\"~"A|\\"~{A}" {
put_byte (195, subtask); }
+"{"(\\\"A|\\\""{A}")"}"|\\\"A|\\\""{A}" {
put_byte (196, subtask); }
+"{"(\\AA{Braces})"}"|\\AA{Braces} { put_byte
(197, subtask); }
+"{"(\\AE{Braces})"}"|\\AE{Braces} { put_byte
(198, subtask); }
+"{"(\\c[ \t]+C|\\c"{C}")"}"|\\c[ \t]+C|\\c"{C}" {
put_byte (199, subtask); }
+"{"(\\"`"E|\\"`{E}")"}"|\\"`"E|\\"`{E}" {
put_byte (200, subtask); }
+"{"(\\"'"E|\\"'{E}")"}"|\\"'"E|\\"'{E}" {
put_byte (201, subtask); }
+"{"(\\"^"E|\\"^{E}")"}"|\\"^"E|\\"^{E}" {
put_byte (202, subtask); }
+"{"(\\\"E|\\\""{E}")"}"|\\\"E|\\\""{E}" {
put_byte (203, subtask); }
+"{"(\\"`"I|\\"`{I}")"}"|\\"`"I|\\"`{I}" {
put_byte (204, subtask); }
+"{"(\\"'"I|\\"'{I}")"}"|\\"'"I|\\"'{I}" {
put_byte (205, subtask); }
+"{"(\\"^"I|\\"^{I}")"}"|\\"^"I|\\"^{I}" {
put_byte (206, subtask); }
+"{"(\\\"I|\\\""{I}")"}"|\\\"I|\\\""{I}" {
put_byte (207, subtask); }
+"{"(\\"~"N|\\"~{N}")"}"|\\"~"N|\\"~{N}" {
put_byte (209, subtask); }
+"{"(\\"`"O|\\"`{O}")"}"|\\"`"O|\\"`{O}" {
put_byte (210, subtask); }
+"{"(\\"'"O|\\"'{O}")"}"|\\"'"O|\\"'{O}" {
put_byte (211, subtask); }
+"{"(\\"^"O|\\"^{O}")"}"|\\"^"O|\\"^{O}" {
put_byte (212, subtask); }
+"{"(\\"~"O|\\"~{O}")"}"|\\"~"O|\\"~{O}" {
put_byte (213, subtask); }
+"{"(\\\"O|\\\""{O}")"}"|\\\"O|\\\""{O}" {
put_byte (214, subtask); }
+"{"(\\O{Braces})"}"|\\O{Braces} {
put_byte (216, subtask); }
+"{"(\\"`"U|\\"`{U}")"}"|\\"`"U|\\"`{U}" {
put_byte (217, subtask); }
+"{"(\\"'"U|\\"'{U}")"}"|\\"'"U|\\"'{U}" {
put_byte (218, subtask); }
+"{"(\\"^"U|\\"^{U}")"}"|\\"^"U|\\"^{U}" {
put_byte (219, subtask); }
+"{"(\\\"U|\\\""{U}")"}"|\\\"U|\\\""{U}" {
put_byte (220, subtask); }
+"{"(\\"'"Y|\\"'{Y}")"}"|\\"'"Y|\\"'{Y}" {
put_byte (221, subtask); }
+"{"(\\ss{Braces})"}"|\\ss{Braces} { put_byte
(223, subtask); }
+"{"(\\"`"a|\\"`{a}")"}"|\\"`"a|\\"`{a}" {
put_byte (224, subtask); }
+"{"(\\"'"a|\\"'{a}")"}"|\\"'"a|\\"'{a}" {
put_byte (225, subtask); }
+"{"(\\"^"a|\\"^{a}")"}"|\\"^"a|\\"^{a}" {
put_byte (226, subtask); }
+"{"(\\"~"a|\\"~{a}")"}"|\\"~"a|\\"~{a}" {
put_byte (227, subtask); }
+"{"(\\\"a|\\\""{a}")"}"|\\\"a|\\\""{a}" {
put_byte (228, subtask); }
+"{"(\\aa{Braces})"}"|\\aa{Braces} { put_byte
(229, subtask); }
+"{"(\\ae{Braces})"}"|\\ae{Braces} { put_byte
(230, subtask); }
+"{"(\\c[ \t]+c|\\c"{c}")"}"|\\c[ \t]+c|\\c"{c}" {
put_byte (231, subtask); }
+"{"(\\"`"e|\\"`{e}")"}"|\\"`"e|\\"`{e}" {
put_byte (232, subtask); }
+"{"(\\"'"e|\\"'{e}")"}"|\\"'"e|\\"'{e}" {
put_byte (233, subtask); }
+"{"(\\"^"e|\\"^{e}")"}"|\\"^"e|\\"^{e}" {
put_byte (234, subtask); }
+"{"(\\\"e|\\\""{e}")"}"|\\\"e|\\\""{e}" {
put_byte (235, subtask); }
+"{"(\\"`"\\i{Braces}|\\"`{\\i}")"}"|\\"`"\\i{Braces}|\\"`{\\i}" {
put_byte (236, subtask); }
+"{"(\\"'"\\i{Braces}|\\"'{\\i}")"}"|\\"'"\\i{Braces}|\\"'{\\i}" {
put_byte (237, subtask); }
+"{"(\\"^"\\i{Braces}|\\"^{\\i}")"}"|\\"^"\\i{Braces}|\\"^{\\i}" {
put_byte (238, subtask); }
+"{"(\\\"\\i{Braces}|\\\""{\\i}")"}"|\\\"\\i{Braces}|\\\""{\\i}" {
put_byte (239, subtask); }
+"{"(\\"~"n|\\"~{n}")"}"|\\"~"n|\\"~{n}" {
put_byte (241, subtask); }
+"{"(\\"`"o|\\"`{o}")"}"|\\"`"o|\\"`{o}" {
put_byte (242, subtask); }
+"{"(\\"'"o|\\"'{o}")"}"|\\"'"o|\\"'{o}" {
put_byte (243, subtask); }
+"{"(\\"^"o|\\"^{o}")"}"|\\"^"o|\\"^{o}" {
put_byte (244, subtask); }
+"{"(\\"~"o|\\"~{o}")"}"|\\"~"o|\\"~{o}" {
put_byte (245, subtask); }
+"{"(\\\"o|\\\""{o}")"}"|\\\"o|\\\""{o}" {
put_byte (246, subtask); }
+"{"(\\o{Braces})"}"|\\o{Braces} {
put_byte (248, subtask); }
+"{"(\\"`"u|\\"`{u}")"}"|\\"`"u|\\"`{u}" {
put_byte (249, subtask); }
+"{"(\\"'"u|\\"'{u}")"}"|\\"'"u|\\"'{u}" {
put_byte (250, subtask); }
+"{"(\\"^"u|\\"^{u}")"}"|\\"^"u|\\"^{u}" {
put_byte (251, subtask); }
+"{"(\\\"u|\\\""{u}")"}"|\\\"u|\\\""{u}" {
put_byte (252, subtask); }
+"{"(\\"'"y|\\"'{y}")"}"|\\"'"y|\\"'{y}" {
put_byte (253, subtask); }
+"{"(\\\"y|\\\""{y}")"}"|\\\"y|\\\""{y}" {
put_byte (255, subtask); }
+
+\\[`'^"]\\i{Letter}*{Braces} { ECHO; }
+\\{Letter}+{Braces} { ECHO; }
+
+%%
+
+bool
+module_bibtex_latin1 (RECODE_OUTER outer)
+{
+ return
+ declare_single (outer, "BibTeX", "Latin-1",
+ outer->quality_variable_to_byte,
+ NULL, transform_bibtex_latin1)
+ && declare_alias (outer, "btex", "BibTeX");
+}
+
+void
+delmodule_bibtex_latin1 (RECODE_OUTER outer)
+{
+}
Index: recode/recode-3.6/doc/recode.texi
===================================================================
--- recode.orig/recode-3.6/doc/recode.texi 2000-12-06 20:55:33.000000000
+0100
+++ recode/recode-3.6/doc/recode.texi 2006-12-07 16:05:55.000000000 +0100
@@ -173,6 +173,7 @@
* HTML:: World Wide Web representations
* LaTeX:: LaTeX macro calls
+* BibTeX:: BibTeX macro calls
* Texinfo:: GNU project documentation files
* Vietnamese:: Vietnamese charsets
* African:: African charsets
@@ -1456,22 +1457,22 @@
@opindex --diacritics
@cindex convert a subset of characters
@cindex partial conversion
-While converting to or from one of @code{HTML} or @code{LaTeX}
+While converting to or from one of @code{HTML}, @code{LaTeX} or @code{BibTeX}
charset, limit conversion to some subset of all characters.
For @code{HTML}, limit conversion to the subset of all non-ASCII
-characters. For @code{LaTeX}, limit conversion to the subset of all
+characters. For @code{LaTeX} or @code{BibTeX}, limit conversion to the subset
of all
non-English letters. This is particularly useful, for example, when
people create what would be valid @code{HTML}, @TeX{} or [EMAIL PROTECTED]
files, if only they were using provided sequences for applying
diacritics instead of using the diacriticised characters directly
from the underlying character set.
-While converting to @code{HTML} or @code{LaTeX} charset, this option
+While converting to @code{HTML}, @code{LaTeX} or @code{BibTeX} charset, this
option
assumes that characters not in the said subset are properly coded
or protected already, @code{recode} then transmit them literally.
While converting the other way, this option prevents translating back
coded or protected versions of characters not in the said subset.
[EMAIL PROTECTED] @xref{LaTeX}.
[EMAIL PROTECTED] @xref{LaTeX}. @xref{BibTeX}.
@ignore
@item -M
@@ -1941,7 +1942,7 @@
@item diacritics_only
@vindex diacritics_only
-This field is initially @code{false}. For @code{HTML} and @code{LaTeX}
+This field is initially @code{false}. For @code{HTML}, @code{LaTeX} and
@code{BibTeX}
charset, it is often convenient to recode the diacriticized characters
only, while just not recoding other HTML code using ampersands or angular
brackets, or [EMAIL PROTECTED] code using backslashes. Set the field to
@code{true}
@@ -3673,6 +3674,7 @@
@menu
* HTML:: World Wide Web representations
* LaTeX:: LaTeX macro calls
+* BibTeX:: BibTeX macro calls
* Texinfo:: GNU project documentation files
* Vietnamese::
* African:: African charsets
@@ -3838,7 +3840,7 @@
@noindent
then @samp{&AE;} should be normalised into @samp{Æ} by the operation.
[EMAIL PROTECTED] LaTeX, Texinfo, HTML, Miscellaneous
[EMAIL PROTECTED] LaTeX, BibTeX, HTML, Miscellaneous
@section [EMAIL PROTECTED] macro calls
@tindex [EMAIL PROTECTED], a charset}
@@ -3857,7 +3859,22 @@
of backslashes into @[EMAIL PROTECTED]@}} can be rather inconvenient,
it may be inhibited through the command option @samp{-d} (@pxref{Mixed}).
[EMAIL PROTECTED] Texinfo, Vietnamese, LaTeX, Miscellaneous
[EMAIL PROTECTED] BibTeX, Texinfo, LaTeX, Miscellaneous
[EMAIL PROTECTED] [EMAIL PROTECTED] macro calls
+
[EMAIL PROTECTED] [EMAIL PROTECTED], a charset}
[EMAIL PROTECTED] btex
[EMAIL PROTECTED] [EMAIL PROTECTED] files
[EMAIL PROTECTED] @TeX{} files
+This charset is available in @code{recode} under the name @code{BibTeX}
+and has @code{btex} as an alias. It is used for ASCII files coded to be
+read by [EMAIL PROTECTED] or, in certain cases, by [EMAIL PROTECTED] or @TeX{}.
+
+This charset is very similar to @code{LaTeX}. The only difference is that
+diacritics are enclosed between @[EMAIL PROTECTED]@}}. Refer to @code{LaTeX}
+charset for further informations. @xref{LaTeX}.
+
[EMAIL PROTECTED] Texinfo, Vietnamese, BibTeX, Miscellaneous
@section GNU project documentation files
@tindex [EMAIL PROTECTED], a charset}
Index: recode/recode-3.6/src/Makefile.am
===================================================================
--- recode.orig/recode-3.6/src/Makefile.am 2000-12-06 17:36:12.000000000
+0100
+++ recode/recode-3.6/src/Makefile.am 2006-12-07 15:53:09.000000000 +0100
@@ -35,8 +35,8 @@
L_STEPS = ascilat1.l $(L_FALLBACKS) $(L_SURFACES)
H_FALLBACKS =
-C_FALLBACKS = flat.c html.c lat1ltex.c lat1txte.c rfc1345.c texinfo.c
-L_FALLBACKS = ltexlat1.l txtelat1.l
+C_FALLBACKS = flat.c html.c lat1ltex.c lat1btex.c lat1txte.c rfc1345.c
texinfo.c
+L_FALLBACKS = ltexlat1.l btexlat1.l txtelat1.l
H_SURFACES = base64.h
C_SURFACES = base64.c dump.c endline.c permut.c quoted.c
@@ -67,7 +67,7 @@
$(srcdir)/decsteps.h: stamp-steps
$(srcdir)/inisteps.h: stamp-steps
$(srcdir)/tersteps.h: stamp-steps
-stamp-steps: $(C_STEPS) merged.c
+stamp-steps: $(C_STEPS) merged.c Makefile
@echo "Updating {dec,ini,ter}steps.h"
@(cd $(srcdir) && grep -h '^module_' $(C_STEPS) merged.c ) \
| sed 's/ .*//' > liste.tmp
@@ -90,7 +90,7 @@
main.o: main.c ../config.status
#main.o: common.h recode.h (should be automatic?)
-outer.o: stamp-steps
+outer.o outer.lo: stamp-steps
$(srcdir)/merged.c: mergelex.py $(L_STEPS)
(cd $(srcdir) && cat $(L_STEPS)) \
Index: recode/recode-3.6/debian/control
===================================================================
--- recode.orig/recode-3.6/debian/control 2006-12-07 15:52:51.000000000
+0100
+++ recode/recode-3.6/debian/control 2006-12-07 15:52:55.000000000 +0100
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Santiago Vila <[EMAIL PROTECTED]>
Standards-Version: 3.6.2
-Build-Depends: flex, gettext
+Build-Depends: flex-old, gettext
Build-Depends-Indep: texi2html (>= 1.76)
Package: recode
Index: recode/recode-3.6/debian/changelog
===================================================================
--- recode.orig/recode-3.6/debian/changelog 2006-12-07 15:52:51.000000000
+0100
+++ recode/recode-3.6/debian/changelog 2006-12-07 15:52:55.000000000 +0100
@@ -1,3 +1,10 @@
+recode (3.6-12.1) unstable; urgency=low
+
+ * NMU
+ * add support for BibTeX charset
+
+ -- Vincent Danjean <[EMAIL PROTECTED]> Thu, 7 Dec 2006 15:06:07 +0100
+
recode (3.6-12) unstable; urgency=low
* Updated config.guess and config.sub for GNU/kFreeBSD (Closes: #333452).
Index: recode/recode-3.6/debian/rules
===================================================================
--- recode.orig/recode-3.6/debian/rules 2006-12-07 15:52:51.000000000 +0100
+++ recode/recode-3.6/debian/rules 2006-12-07 15:52:55.000000000 +0100
@@ -34,6 +34,7 @@
touch tests/Makefile.in
touch contrib/Makefile.in
./configure --prefix=/usr --without-included-gettext
+ touch src/Makefile.am
$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)"
$(MAKE) install DESTDIR=`pwd`/debian/tmp \
INSTALL_PROGRAM="$(INSTALL_PROGRAM)"
Index: recode/recode-3.6/src/ChangeLog
===================================================================
--- recode.orig/recode-3.6/src/ChangeLog 2001-01-22 17:56:19.000000000
+0100
+++ recode/recode-3.6/src/ChangeLog 2006-12-07 15:52:55.000000000 +0100
@@ -1,3 +1,8 @@
+2006-12-07 Vincent Danjean <[EMAIL PROTECTED]>
+
+ * lat1btex.c main.c recodext.h btexlat1.l Makefile.am : add support
+ for BibTeX charset (based on LaTeX charset)
+
2001-01-22 Bruno Haible <[EMAIL PROTECTED]>
* hash.c: Avoid use of undefined macros HAVE_DECL_MALLOC/FREE.
--- End Message ---