commit 471889e0db3e97c97ea7da5d54577b253d6974e0
Author: Uwe Stöhr <[email protected]>
Date:   Fri Nov 7 01:58:06 2014 +0100

    tex2lyx/text.cpp: support for \nameref
    
    \nameref is not recognized
    
    should be backported to branch

diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt
index 18b30dd..46429c9 100644
--- a/src/tex2lyx/TODO.txt
+++ b/src/tex2lyx/TODO.txt
@@ -46,7 +46,6 @@ Format LaTeX feature                        LyX feature
 390    forward/reverse search               \forward_search, \forward_macro
 391    decimal alignment in tables          InsetTabular
 392    new beamer format                    InsetLayout
-396    nameref.sty                          InsetRef
 399    automatic mathdots loading           \use_mathdots
 407    vertical offset for multirows        InsetTabular
 411    support for polyglossia              \language_package  (the cases of 
no package, of babel and of custom package is supported)
@@ -80,7 +79,6 @@ Format LaTeX feature                        LyX feature
 459    beamer: \begin{frame},               \begin_layout Frame
        \begin{frame}[plain],                \begin_layout PlainFrame
        \begin{frame}[fragile]               \begin_layout FragileFrame
-461   support for kurier math font (the other kurier fonts are already 
supported); done in master
 462    New libertine LaTeX fonts:
        \usepackage[scale|scaled|ttscale=$val]{libertineMono-type1}
                                             \font_typewriter
@@ -96,7 +94,6 @@ Format LaTeX feature                        LyX feature
       \twocolumn[]{}{}                      Layout Twocolumn, InsetArgument
       \item[]<>                             InsetArgument
       \begin{enumerate|itemize|...}[]       InsetArgument
-467   support for iwona math font (the other iwona fonts are already 
supported); done in master
 
 
 General
diff --git a/src/tex2lyx/test/test-insets.tex b/src/tex2lyx/test/test-insets.tex
index 5009086..5fd3930 100644
--- a/src/tex2lyx/test/test-insets.tex
+++ b/src/tex2lyx/test/test-insets.tex
@@ -86,7 +86,8 @@ Of course there are other kind of references, like page
 reference~\pageref{lab:test}, but also equation
 reference~\eqref{lab:test} (from amsmath package), or varioref's
 equivalents~\vref{lab:test} and~\vpageref{lab:test}, without
-forgetting pretty references like~\prettyref{lab:test}.
+forgetting pretty references like~\prettyref{lab:test} as well as textual
+references like~\nameref{lab:test}.
 The command \secref{lab:test} will be parsed in ERT, since LyX
 does not support refstyle and prettyref natively at the same time.
 
diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index 32c08ac..c0c71d2 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -112,10 +112,10 @@ string parse_text_snippet(Parser & p, unsigned flags, 
const bool outer,
 
 
 char const * const known_ref_commands[] = { "ref", "pageref", "vref",
- "vpageref", "prettyref", "eqref", 0 };
+ "vpageref", "prettyref", "nameref", "eqref", 0 };
 
 char const * const known_coded_ref_commands[] = { "ref", "pageref", "vref",
- "vpageref", "formatted", "eqref", 0 };
+ "vpageref", "formatted", "nameref", "eqref", 0 };
 
 char const * const known_refstyle_commands[] = { "algref", "chapref", "corref",
  "eqref", "enuref", "figref", "fnref", "lemref", "parref", "partref", 
"propref",

Reply via email to