Georg Baum wrote:
> I don't understand that logic. I always thought that you could directly
> enter the euro symbol as a character if you use latin9, so why do you
> output \texteuro? I would expect to output \texteuro for all encodings
> except of latin9, cp1251 and utf8.

You're right, I mixed up things completely. Attached is the correct patch, 
which allows the use of € for all encodings.

OK to apply this one?

Jürgen
Index: src/LaTeXFeatures.C
===================================================================
--- src/LaTeXFeatures.C	(Revision 16185)
+++ src/LaTeXFeatures.C	(Arbeitskopie)
@@ -247,6 +247,7 @@ char const * simplefeatures[] = {
 	"nicefrac",
 	"tipa",
 	"framed",
+	"textcomp",
 };
 
 int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);
Index: src/paragraph_pimpl.C
===================================================================
--- src/paragraph_pimpl.C	(Revision 16185)
+++ src/paragraph_pimpl.C	(Arbeitskopie)
@@ -651,6 +651,24 @@ void Paragraph::Pimpl::simpleTeXSpecialC
 			}
 			break;
 
+		case 0x20ac:    // EURO SIGN
+			if ((bparams.inputenc == "latin9" ||
+			     bparams.inputenc == "cp1251"||
+			     bparams.inputenc == "utf8") ||
+			    (bparams.inputenc == "auto" &&
+			     (font.language()->encoding()->latexName()
+			      == "latin9" ||
+			      font.language()->encoding()->latexName()
+			      == "cp1251"||
+			      font.language()->encoding()->latexName()
+			      == "utf8"))) {
+				os.put(c);
+			} else {
+				os << "\\texteuro{}";
+				column += 11;
+			}
+			break;
+
 		case '$': case '&':
 		case '%': case '#': case '{':
 		case '}': case '_':
@@ -801,6 +819,9 @@ void Paragraph::Pimpl::validate(LaTeXFea
 				break;
 			}
 		}
+		// the euro sign requires the textcomp package
+		if (getChar(i) == 0x20ac)
+			features.require("textcomp");
 	}
 }
 

Reply via email to