Reutilización de una definición de entorno personalizada con paquete flotante y comando newenvironment: atascado en la definición del nombre del título

Reutilización de una definición de entorno personalizada con paquete flotante y comando newenvironment: atascado en la definición del nombre del título

Estoy en el proceso de crear un flotante personalizado para albergar largas listas de palabras y definiciones con las que podría organizar en \multicols{n}lugar de tableo tabular(o cualquier derivación de ellas) para que fluya bien a través de las páginas dependiendo de la cantidad de definiciones y la cantidad de columnas. Sin embargo, al igual que con otros entornos flotantes, si son muy grandes, se niegan a fluir a través de varias páginas, mientras que lo que quiero es que la lista comience donde la coloque en el documento y continúe hasta terminar, sin importar cuántas páginas haya. .

Durante mi búsqueda en Google encontré esta pregunta:Etiqueta de algoritmo y salto de página, donde una respuesta incluye definir un entorno personalizado, breakablealgorithmque les permita distribuirse en varias páginas.

Tomé este código y lo modifiqué en mi documento y hasta ahora tengo todo para funcionar más o menos como quiero, excepto que no puedo por mi vida descubrir cómo romper el enlace del código original. haciaAlgoritmonombre que aparece en el título y conectarlo con mi nuevo nombre:Orðalisti(lista de palabras). Creo que sé qué línea es la culpable (ver MWE) pero no he podido descubrir cómo modificarla para que llame al nombre de mi nuevo entorno (OrðalistiPara \begin{bigwordlist}y \endbigwordlist).

MWE:

\documentclass[12pt]{book}


\usepackage[LY1,T1]{fontenc} 
\usepackage[icelandic]{babel}
\usepackage{lmodern}

\usepackage{multicol}
\usepackage{float}
\usepackage{algorithm} % if I delete this it breaks at \caption

\floatstyle{plain}
\newfloat{wordlist}{tbhp}{lol}[chapter]
\floatname{wordlist}{Orðalisti}

\makeatletter
\newenvironment{bigwordlist}
  {
     \refstepcounter{wordlist}
     \renewcommand{\caption}[2][\relax]{
       {\center{\ALG@name~\thewordlist}{:} ##2\par}% problematic line
       \ifx\relax##1\relax 
         \addcontentsline{lol}{wordlist}{\protect\numberline{\thewordlist}##2} 
       \else
         \addcontentsline{lol}{wordlist}{\protect\numberline{\thewordlist}##1} 
       \fi
     }
  }{
  }
\makeatother


\begin{document}

\chapter{List chapter}

This is a short list:

\begin{wordlist}
\sffamily
    Master cleanse edison \\  bulb bicycle rights ad \\  affogato ethical \\  Truffaut mustache fugiat \\ skateboard shaman man braid \\ 
\rmfamily
\label{listi:short}
\caption{this is a short list}
\end{wordlist}

This is a very long list that I have: 

\begin{bigwordlist}

\begin{footnotesize}
\begin{multicols}{2}
\sffamily
\noindent
Master cleanse edison \\  bulb bicycle rights ad \\  affogato ethical \\  Truffaut mustache fugiat \\ skateboard shaman man braid \\ 
tumeric irure sunt \\  enamel pin \\  in taiyaki \\  Tacos velit four\\  loko listicle health \\ goth narwhal \\ XOXO \\ esse mumblecore ea \\
bitters +1 \\ Organic sartorial authentic  \\ waistcoat officia \\ reprehenderit pork \\ belly helvetica mumblecore \\ Chillwave dreamcatcher marfa \\
ea artisan kickstarter \\ thundercats \\ lo-fi tofu \\ before they sold out \\  air plant \\ woke offal  \\ Typewriter truffaut quinoa \\ 
everyday carry  \\ ethical narwhal in \\ Selfies la croix \\ cray salvia subway tile \\ bitters vexillologist \\ enim tumeric anim \\ Craft beer \\ 
meh lorem \\ air plant \\ adaptogen stumptown \\ cold-pressed chartreuse\\ deserunt chicharrones forage \\ Lomo cupidatat  \\ subway tile \\
locavore ut \\ 90's keffiyeh ramps \\ consectetur truffaut \\ skateboard  \\ pour-over slow-carb \\ irony subway \\ tile adipisicing aliquip \\ 
Yuccie vinyl shoreditch \\ mumblecore \\ sriracha \\ tote bag \\ heirloom gluten-free wayfarers \\ letterpress glossier \\ Green juice taiyaki \\
chambray actually \\ letterpress \\ XOXO lyft \\ duis af sed \\ flannel \\ gentrify deep v. Dreamcatcher \\ cornhole flexitarian \\ mumblecore street art\\
raw denim \\ Live-edge \\ vegan portland \\ cray et yuccie \\ beard \\ shabby chic qui \\ selvage roof party \\ sunt \\ Pour-over yr \\ mollit raclette \\
beard brooklyn \\ hell of hexagon pork belly celiac \\ Succulents chambray\\  incididunt coloring book \\ disrupt flexitarian taiyaki sed \\ Before they sold out \\
edison bulb \\ prism \\ farm-to-table \\ do coloring book \\ Tattooed lorem \\ cred tacos \\ before they sold out \\ viral \\ man bun \\ cray enamel \\
pin wolf \\ Tofu wolf\\  semiotics id typewriter \\ XOXO \\ you probably haven't heard of them \\ tote bag \\ williamsburg \\ Asymmetrical heirloom \\ 
taxidermy cred \\ ea occaecat squid \\ fugiat labore \\ PBR\&B godard \\ the end
\rmfamily
\end{multicols}
\end{footnotesize}
    

\label{listi:long}
\caption{this is a long list}
\end{bigwordlist}

\listof{wordlist}{Orðalistaskrá}

\end{document}

Algunos comentarios y respuestas sobre la creación de nuevos tipos de entornos flotantes dijeron que la gente debería usar package newfloaty no float, y he intentado configurar el mismo tipo de entorno con él. Sin embargo, todavía necesitaría definir una versión rompible de eso, ya que tampoco pude ver que pudiera implementar una función de salto de página lista para usar.

Respuesta1

Usar \fname@wordlisten lugar de \ALG@name. Entonces tampoco necesitas \usepackage{algorithm}más.

ingrese la descripción de la imagen aquí

ingrese la descripción de la imagen aquí

\documentclass[12pt]{book}


\usepackage[LY1,T1]{fontenc} 
\usepackage[icelandic]{babel}
\usepackage{lmodern}

\usepackage{multicol}
\usepackage{float}

\floatstyle{plain}
\newfloat{wordlist}{tbhp}{lol}[chapter]
\floatname{wordlist}{Orðalisti}

\makeatletter
\newenvironment{bigwordlist}
  {
     \refstepcounter{wordlist}
     \renewcommand{\caption}[2][\relax]{
       {\center{\fname@wordlist~\thewordlist}{:} ##2\par}% problematic line
       \ifx\relax##1\relax 
         \addcontentsline{lol}{wordlist}{\protect\numberline{\thewordlist}##2} 
       \else
         \addcontentsline{lol}{wordlist}{\protect\numberline{\thewordlist}##1} 
       \fi
     }
  }{
  }
\makeatother


\begin{document}

\chapter{List chapter}

This is a short list:

\begin{wordlist}
\sffamily
    Master cleanse edison \\  bulb bicycle rights ad \\  affogato ethical \\  Truffaut mustache fugiat \\ skateboard shaman man braid \\ 
\rmfamily
\label{listi:short}
\caption{this is a short list}
\end{wordlist}

This is a very long list that I have: 

\begin{bigwordlist}

\begin{footnotesize}
\begin{multicols}{2}
\sffamily
\noindent
Master cleanse edison \\  bulb bicycle rights ad \\  affogato ethical \\  Truffaut mustache fugiat \\ skateboard shaman man braid \\ 
tumeric irure sunt \\  enamel pin \\  in taiyaki \\  Tacos velit four\\  loko listicle health \\ goth narwhal \\ XOXO \\ esse mumblecore ea \\
bitters +1 \\ Organic sartorial authentic  \\ waistcoat officia \\ reprehenderit pork \\ belly helvetica mumblecore \\ Chillwave dreamcatcher marfa \\
ea artisan kickstarter \\ thundercats \\ lo-fi tofu \\ before they sold out \\  air plant \\ woke offal  \\ Typewriter truffaut quinoa \\ 
everyday carry  \\ ethical narwhal in \\ Selfies la croix \\ cray salvia subway tile \\ bitters vexillologist \\ enim tumeric anim \\ Craft beer \\ 
meh lorem \\ air plant \\ adaptogen stumptown \\ cold-pressed chartreuse\\ deserunt chicharrones forage \\ Lomo cupidatat  \\ subway tile \\
locavore ut \\ 90's keffiyeh ramps \\ consectetur truffaut \\ skateboard  \\ pour-over slow-carb \\ irony subway \\ tile adipisicing aliquip \\ 
Yuccie vinyl shoreditch \\ mumblecore \\ sriracha \\ tote bag \\ heirloom gluten-free wayfarers \\ letterpress glossier \\ Green juice taiyaki \\
chambray actually \\ letterpress \\ XOXO lyft \\ duis af sed \\ flannel \\ gentrify deep v. Dreamcatcher \\ cornhole flexitarian \\ mumblecore street art\\
raw denim \\ Live-edge \\ vegan portland \\ cray et yuccie \\ beard \\ shabby chic qui \\ selvage roof party \\ sunt \\ Pour-over yr \\ mollit raclette \\
beard brooklyn \\ hell of hexagon pork belly celiac \\ Succulents chambray\\  incididunt coloring book \\ disrupt flexitarian taiyaki sed \\ Before they sold out \\
edison bulb \\ prism \\ farm-to-table \\ do coloring book \\ Tattooed lorem \\ cred tacos \\ before they sold out \\ viral \\ man bun \\ cray enamel \\
pin wolf \\ Tofu wolf\\  semiotics id typewriter \\ XOXO \\ you probably haven't heard of them \\ tote bag \\ williamsburg \\ Asymmetrical heirloom \\ 
taxidermy cred \\ ea occaecat squid \\ fugiat labore \\ PBR\&B godard \\ the end
\rmfamily
\end{multicols}
\end{footnotesize}
    

\label{listi:long}
\caption{this is a long list}
\end{bigwordlist}

\listof{wordlist}{Orðalistaskrá}

\end{document}

información relacionada