The branch, master, has been updated. - Log -----------------------------------------------------------------
commit f2eb5004de527c54740e858c2c60abb6990ad1cf Author: Uwe Stöhr <[email protected]> Date: Mon Feb 4 21:37:14 2013 +0100 tex2lyx: adapt refstyle support aft the fix for bug #8536 diff --git a/src/tex2lyx/test/test-refstyle-references.tex b/src/tex2lyx/test/test-refstyle-references.tex index f2bb0e6..70ad4c6 100644 --- a/src/tex2lyx/test/test-refstyle-references.tex +++ b/src/tex2lyx/test/test-refstyle-references.tex @@ -14,7 +14,9 @@ \AtBeginDocument{\providecommand\secref[1]{\ref{sec:#1}}} \AtBeginDocument{\providecommand\subref[1]{\ref{sub:#1}}} \AtBeginDocument{\providecommand\parref[1]{\ref{par:#1}}} -\AtBeginDocument{\providecommand\Staref[1]{\ref{Sta:#1}}} +\AtBeginDocument{\providecommand\figref[1]{\ref{fig:#1}}} +\AtBeginDocument{\providecommand\tabref[1]{\ref{tab:#1}}} +\AtBeginDocument{\providecommand\algref[1]{\ref{alg:#1}}} \AtBeginDocument{\providecommand\fnref[1]{\ref{fn:#1}}} \AtBeginDocument{\providecommand\enuref[1]{\ref{enu:#1}}} \AtBeginDocument{\providecommand\eqref[1]{\ref{eq:#1}}} @@ -22,6 +24,10 @@ \AtBeginDocument{\providecommand\thmref[1]{\ref{thm:#1}}} \AtBeginDocument{\providecommand\corref[1]{\ref{cor:#1}}} \AtBeginDocument{\providecommand\propref[1]{\ref{prop:#1}}} +\floatstyle{ruled} +\newfloat{algorithm}{tbp}{loa}[chapter] +\providecommand{\algorithmname}{Algorithm} +\floatname{algorithm}{\protect\algorithmname} \RS@ifundefined{subref} {\def\RSsubtxt{section~}\newref{sub}{name = \RSsubtxt}} {} @@ -123,25 +129,25 @@ Ref to \subref{Subsubsection}. \parref{subparagraph} \begin{figure} -\protect\caption{\label{Sta:figure}figure} +\protect\caption{figure\label{fig:figure}} \end{figure} -\Staref{figure} +\figref{figure} \begin{table} -\protect\caption{\label{Sta:table}table} +\protect\caption{table\label{tab:table}} \end{table} -\Staref{table} +\tabref{table} \begin{algorithm} -\protect\caption{algorithm\label{Sta:algorithm}} +\protect\caption{algorithm\label{alg:algorithm}} \end{algorithm} -\Staref{algorithm} +\algref{algorithm} \footnote{foot\label{fn:foot}% } diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index e7d38cc..fb09aa8 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -117,13 +117,13 @@ char const * const known_ref_commands[] = { "ref", "pageref", "vref", char const * const known_coded_ref_commands[] = { "ref", "pageref", "vref", "vpageref", "formatted", "eqref", 0 }; -char const * const known_refstyle_commands[] = { "chapref", "corref", "eqref", - "enuref", "fnref", "lemref", "parref", "partref", "propref", "secref", "Staref", - "subref", "thmref", 0 }; +char const * const known_refstyle_commands[] = { "algref", "chapref", "corref", + "eqref", "enuref", "figref", "fnref", "lemref", "parref", "partref", "propref", + "secref", "subref", "tabref", "thmref", 0 }; -char const * const known_refstyle_prefixes[] = { "chap", "cor", "eq", - "enu", "fn", "lem", "par", "part", "prop", "sec", "Sta", - "sub", "thm", 0 }; +char const * const known_refstyle_prefixes[] = { "alg", "chap", "cor", + "eq", "enu", "fig", "fn", "lem", "par", "part", "prop", + "sec", "sub", "tab", "thm", 0 }; /** ----------------------------------------------------------------------- Summary of changes: src/tex2lyx/test/test-refstyle-references.tex | 20 +++++++++++++------- src/tex2lyx/text.cpp | 12 ++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) hooks/post-receive -- The LyX Source Repository
