[Solved] How to set a specific word in `Table` caption in `xltabular` so that it be recognized by the indexes

user2535338 Asks: How to set a specific word in `Table` caption in `xltabular` so that it be recognized by the indexes
I’m writing a master thesis. So I’m having trouble with the long tables and frames. I’m using xltabular because it can deal with tables of multiple pages, and I need to change some Tables # to Frames # but it’s following the table number and not the frames, and its also putting them in the tables list index and not in the Frame List index. Edited: MWE, using xltabular, is:

Code:
documentclass{article}
usepackage[margin=20mm]{geometry}
usepackage{ragged2e}
usepackage{array, makecell, multirow, xltabular}
usepackage{caption}

usepackage{lipsum} % for dummy text
newcolumntype{L}{>{RaggedRightarraybackslashhspace{0pt}}X}



begin{document}


captionsetup[table]{name = Frame}
begingroup
footnotesize
setlengthtabcolsep{3pt}
setcellgapes{3pt}
makegapedcells
begin{xltabular}{linewidth}{| *{5}{L|}}
    caption{Long table caption.}
    label{long} \   
    Xhline{1pt}
multicolumn{5}{|c|}{Begin of Table}\
    hline
textbf{Chave} & textbf{Nome}   & textbf{Tarefa/Banda} & textbf{Análise} & textbf{Contexto}\
    Xhline{0.5pt}
endfirsthead
    caption[]{Continuation}    \
    Xhline{1pt}
textbf{Chave} & textbf{Nome}   & textbf{Tarefa/Banda} & textbf{Análise} & textbf{Contexto}\
    hline
endhead
    Xhline{1pt}
endfoot
     hline
     multicolumn{5}{|c|}{End of Table}\
     Xhline{1pt}
endlastfoot
%%%% table body
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
end{xltabular}
endgroup


captionsetup[table]{name = Table}
begingroup
footnotesize
setlengthtabcolsep{3pt}
setcellgapes{3pt}
makegapedcells
begin{xltabular}{linewidth}{| *{5}{L|}}
    caption{Long table caption.}
    label{long} \   
    Xhline{1pt}
multicolumn{5}{|c|}{Begin of Table}\
    hline
textbf{Chave} & textbf{Nome}   & textbf{Tarefa/Banda} & textbf{Análise} & textbf{Contexto}\
    Xhline{0.5pt}
endfirsthead
    caption[]{Continuation}    \
    Xhline{1pt}
textbf{Chave} & textbf{Nome}   & textbf{Tarefa/Banda} & textbf{Análise} & textbf{Contexto}\
    hline
endhead
    Xhline{1pt}
endfoot
     hline
     multicolumn{5}{|c|}{End of Table}\
     Xhline{1pt}
endlastfoot
%%%% table body
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
end{xltabular}
endgroup

captionsetup[table]{name = Frame}
begingroup
footnotesize
setlengthtabcolsep{3pt}
setcellgapes{3pt}
makegapedcells
begin{xltabular}{linewidth}{| *{5}{L|}}
    caption{Long table caption.}
    label{long} \   
    Xhline{1pt}
multicolumn{5}{|c|}{Begin of Table}\
    hline
textbf{Chave} & textbf{Nome}   & textbf{Tarefa/Banda} & textbf{Análise} & textbf{Contexto}\
    Xhline{0.5pt}
endfirsthead
    caption[]{Continuation}    \
    Xhline{1pt}
textbf{Chave} & textbf{Nome}   & textbf{Tarefa/Banda} & textbf{Análise} & textbf{Contexto}\
    hline
endhead
    Xhline{1pt}
endfoot
     hline
     multicolumn{5}{|c|}{End of Table}\
     Xhline{1pt}
endlastfoot
%%%% table body
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
end{xltabular}
endgroup


captionsetup[table]{name = Table}
begingroup
footnotesize
setlengthtabcolsep{3pt}
setcellgapes{3pt}
makegapedcells
begin{xltabular}{linewidth}{| *{5}{L|}}
    caption{Long table caption.}
    label{long} \   
    Xhline{1pt}
multicolumn{5}{|c|}{Begin of Table}\
    hline
textbf{Chave} & textbf{Nome}   & textbf{Tarefa/Banda} & textbf{Análise} & textbf{Contexto}\
    Xhline{0.5pt}
endfirsthead
    caption[]{Continuation}    \
    Xhline{1pt}
textbf{Chave} & textbf{Nome}   & textbf{Tarefa/Banda} & textbf{Análise} & textbf{Contexto}\
    hline
endhead
    Xhline{1pt}
endfoot
     hline
     multicolumn{5}{|c|}{End of Table}\
     Xhline{1pt}
endlastfoot
%%%% table body
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] & lipsum[66] \ hline
end{xltabular}
endgroup

end{document}


enter image description here

Thank you you all :)

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.