[texworks] ver 567 Scripts - Cariag/Line returns now coming back as ??
Jérome Laurens
jerome.laurens at u-bourgogne.fr
Thu Mar 18 10:57:36 CET 2010
Le 17 mars 2010 à 15:44, Herbert Schulz a écrit :
> What is worse is that the designations for the inputenc package are different than the TeXShop and TeXworks versions.
TeXWorks should be able to recognize various input encoding definitions (in that order)
0 - Byte Order Mark
see http://unicode.org/faq/utf_bom.html#22 for the details
1 - for LaTeX, parse \usepackage[...]{inputenc}
ICU regex: (?m)^\s*(?!%|\s).*\\usepackage\s*\[\s*([[:letter:][:digit:][-]_]+)\s*\]\s*\{\s*inputenc\s*\}
2 - for ConTeXt, parse \enableregime[]
ICU regex: (?m)^\s*(?!%|\s).*\\enableregime\s*\[\s*([[:letter:][:digit:][-]_]+)\s*\]
3 - for emacs:
ICU regex: (?m)^.*-\*-\s*coding\s*:\s*(.*?)\s*(?:;|-\*-)
4 - for texshop
ICU regex: (?m)^\s*%!\s*TEX\s*encoding\s*(?:=|:)\s*([[:letter:][:digit:][-]_]+)
5 - for itexmac2
ICU regex: (?m)^\s*%!\s*(?i:itexmac2?)\s*\(\s*(?:charset|codeset|encoding)\s*\)\s*(?:=|:)\s*([[:letter:][:digit:][-]_]+)
The regex are starting points and may not work in all regex engines.
If more than one of these situations exist in a given file, then some compatibility checking should be performed.
JL
More information about the texworks
mailing list