mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Support for the EURO sign (bug 845):
* lib/chkconfig.ltx: check for the textcomp package * lib/doc/LaTeXConfig.lyx.in: document textcomp * src/LaTeXFeatures.C (simplefeatures): add textcomp * src/paragraph_pimpl.C (simpleTeXSpecialChar): support the Euro sign (via textcomp command) * src/paragraph_pimpl.C (validate): require textcomp if we have a Euro symbol git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16193 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b579fbd3b6
commit
ca5838b017
@ -230,6 +230,7 @@
|
||||
\TestPackage{rotating}
|
||||
\TestPackage{setspace}
|
||||
\TestPackage{subfigure}
|
||||
\TestPackage{textcomp}
|
||||
\TestPackage{varioref}
|
||||
\TestPackage{url}
|
||||
|
||||
|
@ -2516,6 +2516,31 @@ booktabs
|
||||
is needed by LyX to be able to output correctly formal tables.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
textcomp
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Found: @chk_textcomp@
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
CTAN:
|
||||
\family typewriter
|
||||
macros/latex/unpacked/textcomp.sty
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Notes: The package
|
||||
\family sans
|
||||
textcomp
|
||||
\family default
|
||||
is needed by LyX to output some special symbols like the EURO currency
|
||||
sign.
|
||||
The package is part of the LaTeX base distribution and should already be
|
||||
installed on your system.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
varioref
|
||||
\end_layout
|
||||
@ -2532,7 +2557,7 @@ macros/latex/required/tools/
|
||||
|
||||
\begin_layout Description
|
||||
Notes: The package
|
||||
\family typewriter
|
||||
\family sans
|
||||
varioref
|
||||
\family default
|
||||
introduces some commands to generate references with an information about
|
||||
|
@ -247,6 +247,7 @@ char const * simplefeatures[] = {
|
||||
"nicefrac",
|
||||
"tipa",
|
||||
"framed",
|
||||
"textcomp",
|
||||
};
|
||||
|
||||
int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);
|
||||
|
@ -651,6 +651,24 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
}
|
||||
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 += 10;
|
||||
}
|
||||
break;
|
||||
|
||||
case '$': case '&':
|
||||
case '%': case '#': case '{':
|
||||
case '}': case '_':
|
||||
@ -801,6 +819,9 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features,
|
||||
break;
|
||||
}
|
||||
}
|
||||
// the euro sign requires the textcomp package
|
||||
if (getChar(i) == 0x20ac)
|
||||
features.require("textcomp");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user