mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix tex2lyx parsing of consecutive hyphens
tex2lyx was already behaving as if bug #3647 was fixed, but currently -- and --- have the same special meaning in LyX as in LaTeX.
This commit is contained in:
parent
3120ff8e9f
commit
7178f98b0f
@ -6768,6 +6768,70 @@ and a spif\SpecialChar \textcompwordmark{}
|
||||
fy ligature break.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
There are dashes: endash in short form -- and long form –, emdash is alike: --- and —. If we really want several hyphens in a row, we need to separate them: -
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
{}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
-, -
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
{}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
-
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
{}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
-, -
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
{}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
-
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
{}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
-
|
||||
\begin_inset ERT
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
{}
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
- etc.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
|
||||
\begin_inset ERT
|
||||
|
@ -656,6 +656,10 @@ And what about special characters like hyphe\-nation mark,
|
||||
ellipsis\ldots, and end-of-sentence\@. LyX also supports a menu
|
||||
separator\lyxarrow{}and a spif\textcompwordmark{}fy ligature break.
|
||||
|
||||
There are dashes: endash in short form -- and long form \textendash,
|
||||
emdash is alike: --- and \textemdash. If we really want several hyphens
|
||||
in a row, we need to separate them: -{}-, -{}-{}-, -{}-{}-{}- etc.
|
||||
|
||||
LyX translates the phrases LyX, TeX, LaTeX2e and LaTeX
|
||||
to the commands \LyX{}, \TeX{}, \LaTeXe{} and \LaTeX{}.
|
||||
If these phrases occur as part of other words (like 1LyX or aTeX or LaTeX3)
|
||||
|
@ -2420,10 +2420,8 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
// {}
|
||||
Token const prev = p.prev_token();
|
||||
p.get_token();
|
||||
if (p.next_token().character() == '`' ||
|
||||
(prev.character() == '-' &&
|
||||
p.next_token().character() == '-'))
|
||||
; // ignore it in {}`` or -{}-
|
||||
if (p.next_token().character() == '`')
|
||||
; // ignore it in {}``
|
||||
else
|
||||
output_ert_inset(os, "{}", context);
|
||||
} else if (next.cat() == catEscape &&
|
||||
|
Loading…
Reference in New Issue
Block a user