On 2016-03-20, Kornel Benko wrote:
> Am Samstag, 19. März 2016 um 23:12:32, schrieb Guenter Milde 
> <mi...@users.sf.net>

Dear Kornel,

>> >> Does the underline '_' work? ...

>> > Not checked, but most probably it would work.

It does, see below.


...

>> ... currently "words" following the separator are also turned into
>> labels.

> This is the intended behaviour.
...
> I wanted the possibility to have more than one label specified.

>> Therefore, we need to clarify whether this should be independent labels
>> (of same depth) or sublabel + subsublabel ...

Suggestion:

The following simple patch allows to specify all three cases:

a) "words" joined by '_' -> one label (or sublabel)

b) "words" joined by ':' -> label + subordinate label

c) "words" separated with any <separator> -> independent labels (same depth)


Exec: git 'diff' 'ExportTests.cmake' 2>&1
Dir: /usr/local/src/lyx/development/autotests/

diff --git a/development/autotests/ExportTests.cmake 
b/development/autotests/ExportTests.cmake
index f1a178e..6971dae 100644
--- a/development/autotests/ExportTests.cmake
+++ b/development/autotests/ExportTests.cmake
@@ -80,7 +80,7 @@ macro(findexpr found testname listname rsublabel)
     if ("${_itrx}" MATCHES "^Sublabel:")
       set(tmpsublabel "")
       string(REGEX REPLACE "^Sublabel:[ \t]*" "" _itrlabels ${_itrx})
-      string(REGEX MATCHALL "[a-zA-Z]+" _labels ${_itrlabels})
+      string(REGEX MATCHALL "[a-zA-Z_:]+" _labels ${_itrlabels})
       foreach(subl ${_labels})
         if (subl STREQUAL "RESET")
           set(tmpsublabel "")


Example:

Incompatible versions (like aastex and aastex6) are a TeX issue (not LyX's
fault) that will lead to export failure at some (but not all) places.

This can be described as "unreliable:texissues:incompatible_versions":


diff --git a/development/autotests/unreliableTests 
b/development/autotests/unreliableTests
index dc361ce..e4c7064 100644
--- a/development/autotests/unreliableTests
+++ b/development/autotests/unreliableTests
@@ -56,8 +56,8 @@ export/examples/(|fr/)seminar_.*
 export/doc/es/Customization_pdf4_texF
 
 
-Sublabel: varying_versions
-# ========================
+Sublabel: texissues:incompatible_versions
+# =======================================
 # Test depending on TeX distribution, package versions or OS
 
 # document class aastex.cls replaced by aastex6.cls


With both patches, I get

#> ctest --print-labels -L texissues
Test project /usr/local/src/lyxtest
All Labels:
  -1examples:export:inverted:texissues
  -1examples:load:lyx2lyx:unreliable:texissues:incompatible_versions
  -1examples:suspended:texissues
  -1examples:unreliable:texissues:incompatible_versions
  -1manuals:export:inverted:texissues
  -1manuals:suspended:texissues
  load:lyx2lyx:unreliable:texissues:incompatible_versions
  unreliable:texissues:incompatible_versions

The "manually set" colon and the automatically set one work together to
get the desired result. (I'd prefer not to join all labels, rather

  export
  inverted:texissues
  load
  lyx2lyx
  suspended:texissues
  unreliable:texissues:incompatible_versions

but this is another issue) and

#> ctest -N -L version -R pdf$
Test project /usr/local/src/lyxtest
  Test #1941: 
UNRELIABLE.TEXISSUES:INCOMPATIBLE_VERSIONS_export/examples/aas_sample_pdf
  Test #4500: 
UNRELIABLE.TEXISSUES:INCOMPATIBLE_VERSIONS_export/templates/aastex_pdf

Total Tests: 2


Here, the colon differs from the '.' used as "joiner" in name formation.
However, for simpler pattern matchig with "-R", the colon would be a better
choice anyway...


What do you think?


Günter

Reply via email to