%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "/lilypond-2.25.35/input/regression/markup-tag-simple-keep-and-remove-with-tag.ly"
\sourcefileline 0
\version "2.25.27"

\header {
  texidoc = "Test simple @code{\\keep-with-tag} and @code{\\remove-with-tag} on markups."
}

tagged = \markup {
  \tag #'foo { foo }
  \tag #'bar { bar }
  test
}

\markuplist {
  \override #'(padding . 2)
  \table
  #'(-1 -1)
  {
    \bold { Expectation Result }

    % first line of each snippet is the expectation
    % and the second line produces the result with tags to be tested

    "foo bar test"
    \tagged

    "foo test"
    \keep-with-tag #'foo \tagged

    "bar test"
    \keep-with-tag #'bar \tagged

    "test"
    \keep-with-tag #'baz \tagged

    "test"
    \first-visible {
      \keep-with-tag #'baz
      \tagged
    }

    "foo bar test"
    \keep-with-tag #'(foo bar) \tagged

    "bar test"
    \remove-with-tag #'foo \tagged

    "test"
    \remove-with-tag #'(foo bar) \tagged

    "test"
    \keep-with-tag #'foo
    \remove-with-tag #'foo
    \tagged

    "bar test"
    \keep-with-tag #'(foo bar)
    \remove-with-tag #'foo
    \tagged

    "test"
    \keep-with-tag #'foo
    \keep-with-tag #'bar
    \tagged

    "foo test"
    #(markup->string
      (markup #:keep-with-tag 'foo tagged))

    "bar test"
    #(markup->string
      (markup #:remove-with-tag 'foo tagged))
  }
}



% ****************************************************************
% end ly snippet
% ****************************************************************
