diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt index 6d2556d529..2b3abc5c19 100644 --- a/src/tex2lyx/TODO.txt +++ b/src/tex2lyx/TODO.txt @@ -81,7 +81,6 @@ Format LaTeX feature LyX feature 394 \makebox InsetBox use_makebox 396 nameref.sty InsetRef 399 automatic mathdots loading \use_mathdots -400 other rules than \lyxline InsetLine 401 feyn.sty InsetMathDiagram 402 \addcontentsline InsetBibtex bibtotoc option 404 refstyle.sty InsetRef diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index be0f1a9126..697e14754f 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -2472,6 +2472,24 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer, end_inset(os); } + else if (t.cs() == "rule") { + string offset = ""; + string width; + string thickness; + if (p.hasOpt()) + offset = p.getArg('[', ']'); + width = p.getArg('{', '}'); + thickness = p.getArg('{', '}'); + + context.check_layout(os); + begin_command_inset(os, "line", "rule"); + if (!offset.empty()) + os << "offset \"" << translate_len(offset) << "\"\n"; + os << "width \"" << translate_len(width) << "\"\n" + "height \"" << translate_len(thickness) << "\"\n"; + end_inset(os); + } + else if (is_known(t.cs(), known_phrases) || (t.cs() == "protect" && p.next_token().cat() == catEscape &&