¿Errores al utilizar la "Lista de símbolos" para una tesis que utiliza archivos .bib?

¿Errores al utilizar la "Lista de símbolos" para una tesis que utiliza archivos .bib?

Tengo el deseo de utilizar un método eficaz para crear un glosario y poder clasificar los diferentes "tipos" de entradas en diferentes listas (abreviaturas, siglas, símbolos, glosario, etc.).

Seguí dos post que son fantásticos y que os aconsejo:

Elel primero, muestra cómo clasificar las diferentes entradas utilizando archivos .bib para símbolos. Lo seguí usando el método 4. Elsegunda publicaciónmuestra cómo seguir este método generando un glosario que contendría símbolos, siglas, definiciones, etc.

Soy nuevo en LaTex pero he aprendido mucho siguiendo estos métodos (muchas gracias Nicola Talbot). Ya casi he llegado, pero todavía tengo algunos errores en el resultado. He creado archivos de prueba para probar lo que me gustaría lograr.

Aquí está el código que estoy probando:

\documentclass{report}

\usepackage{amssymb}
\usepackage{siunitx}


\usepackage[record,abbreviations,acronyms,symbols,stylemods={tree},style=treegroup]{glossaries-extra}


% always set the abbreviation style before \GlsXtrLoadResources
\setabbreviationstyle{short-long-desc}
\setabbreviationstyle[acronym]{short-long}


% Assign group titles:
\glsxtrsetgrouptitle{latin}{Latin Symbols}
\glsxtrsetgrouptitle{greek}{Greek Symbols}

\GlsXtrLoadResources[
  src={no-interpret-preamble,glossary},% bib files
  sort={en-US},% sort according to this locale
  set-widest,% needed for 'alttree' styles
%  save-locations=false % use this command to pring only the acronyms you are using
  selection=all% select all entries in the .bib files
]


\GlsXtrLoadResources[
 src={symbols-greek},
 sort={letter-case}, % sort according Unicode value
 field-aliases={
   unitname=name,
   unitsymbol=symbol,
   measurement=description
 },
 symbol-sort-fallback=name,
 type=symbols,
 group=greek,
 set-widest,% needed for 'alttree' styles
 save-locations=false % pring only used symbols.
]

\GlsXtrLoadResources[
 src={symbols-latin},
  sort={letter-case},% sort according Unicode value
  symbol-sort-fallback=name,
  type=symbols,
  group=latin,
  set-widest,% needed for 'alttree' styles
  selection=all% select all entries in the .bib files
]




\begin{document}

\section*{Examples}
In this section, I will use the following greek symbols: \gls{alpha}, \gls{alphalin} and \gls{delta}.

One acronym is for example \glstext{ad} and one abbreviation is given by \glstext{html}.



\printunsrtglossary[type=acronyms,style=alttree,title={List of Acronyms}]
\printunsrtglossary[type=abbreviations,style=alttree,title={List of Abbreviations}]
\printunsrtglossary[style=alttree,title={Glossary}] % By not specifing the type, I pring only the entries
\printunsrtglossary[type=symbols,style=alttreegroup,title={List of Symbols}]
\end{document}

Puedes encontrar el archivo.no-interpret-preamble.bibaquí. Los archivos glossary.bibysymbols-latin.bibsymbols-greek.bib se ven así (inspirado en el trabajo de Nicola Talbot):

glosario.bib:

% glossary.bib

% This file is public domain. See the "Examples" chapter
% in the bib2gls user manual for a more detailed description
% of this file.

% Encoding: UTF-8

@preamble{"\providecommand{\abbrvtag}[1]{#1}"}
@string{markuplang="\abbrvtag{m}arkup \abbrvtag{l}anguage"}

@entry{TeX,
  name={{}\TeX},
  description={a format for describing complex type and page layout
    often used for mathematics, technical, and academic publications},
  identifier={markuplanguage}
}

@entry{LaTeX,
  name={{}\LaTeX},
  description={a format of \glstext{TeX} designed to separate
   content from style},
  identifier={markuplanguage}
}

@entry{markdown,
  name={markdown},
  description={a lightweight markup language with plain text
    formatting syntax},
  identifier={markuplanguage}
}


@acronym{ad,
  short={AD},
  long={Affinity Diagram},
  description={Tool that gathers large amounts of language data and organizes them into groupings based on their natural relationships},
  identifier={acronym}
}

@acronym{dom,
  short={DOM},
  long={Document Object Model},
  description={Cross-platform and language-independent application programming interface},
  identifier={acronym}
}


@acronym{spa,
  short={SPA},
  long={Single Page Application},
  description={Web applicaiton of web site that interacts with the user by dynanically rewriting the current page},
  identifier={acronym}
}


@acronym{svp,
  short={SVG},
  long={Scalable Vector Graphics},
  description={{}\glstext{xml}-based vector image format for two-dimensional graphics with support for interactivity and animation},
  identifier={acronym}
}

@abbreviation{xml,
  short={XML},
  long={e\abbrvtag{x}tensible }#markuplang,
  description={a markup language that defines a set of rules for
    encoding documents},
  identifier={markuplanguage}
}

@abbreviation{html,
  short={HTML},
  long={\abbrvtag{h}yper\abbrvtag{t}ext }#markuplang,
  description={the standard markup language for creating web pages},
  identifier={markuplanguage}
}

@abbreviation{mathml,
  short={MathML},
  long={\abbrvtag{m\NoCaseChange{ath}}ematical }#markuplang,
  description={markup language for describing mathematical notation},
  identifier={markuplanguage}
}

@abbreviation{xhtml,
  short={XHTML},
  long={e\abbrvtag{x}tensible \abbrvtag{h}yper\abbrvtag{t}ext }
    # markuplang,
  description={{}\glstext{xml} version of \glstext{html}},
  identifier={markuplanguage}
}

simbolos-griego.bib:

% symbols-greek.bib

% Put here all greek symbols
% Encoding: UTF-8

@symbol{alpha,
 name={\ensuremath{\alpha}},
 description={angular acceleration},
 indentifier={mathgreek}
}
@symbol{alphalin,
 name={\ensuremath{\alpha_{L}}},
 description={linear coefficient of thermal expansion},
 indentifier={mathgreek}
}
@symbol{delta,
 name={\ensuremath{\delta}},
 description={Kronecker delta},
 indentifier={mathgreek}
}
@symbol{lambda,
 name={\ensuremath{\lambda}},
 description={Lagrange multiplier},
 indentifier={mathgreek}
}
@symbol{chi,
 name={\ensuremath{\chi}},
 description={chromatic number},
 indentifier={mathgreek}
}
@symbol{rho,
 name={\ensuremath{\rho}},
 description={density},
 indentifier={mathgreek}
}
@symbol{zeta,
 name={\ensuremath{\zeta}},
 description={Riemann zeta function},
 indentifier={mathgreek}
}

símbolos-latin.bib:

% symbols-latin.bib

% Put here all latin symbols
% Encoding: UTF-8

@symbol{x,
 name={\ensuremath{x}},
 description={position},
 indentifier={mathlatin}
}
@symbol{v,
 name={\ensuremath{v}},
 description={velocity},
 indentifier={mathlatin}
}
@symbol{a,
 name={\ensuremath{a}},
 description={acceleration},
 indentifier={mathlatin}
}
@symbol{t,
 name={\ensuremath{t}},
 description={time},
 indentifier={mathlatin}
}
@symbol{E,
 name={\ensuremath{E}},
 description={Young's modulus},
 indentifier={mathlatin}
}
@symbol{F,
 name={\ensuremath{F}},
 description={force},
 indentifier={mathlatin}
}
@symbol{Tm,
 name={\ensuremath{T_{m}}},
 description={melting point temperature},
 indentifier={mathlatin}
}
@symbol{KIC,
 name={\ensuremath{K_{IC}}},
 description={stress intensity factor},
 indentifier={mathlatin}
}
@symbol{Z,
 name={\ensuremath{Z}},
 description={atomic number},
 indentifier={mathlatin}
}

Sin embargo, el resultado obtenido no es satisfactorio.

¿Qué estoy haciendo mal? ¿Por qué no puedo obtener una lista de siglas? ¿Cómo puedo hacer que la lista de abreviaturas sea legible?

Estaría muy agradecido por su ayuda. Ya casi estoy allí...

Respuesta1

Deberías encontrar algunas advertencias en la transcripción:

Package glossaries-extra Warning: Glossary type `acronyms' doesn't exist on input line 65.
Package glossaries-extra Warning: No entries defined in glossary `acronyms' on input line 65.

La etiqueta del glosario de siglas acronymno es acronymsasí que necesitas:

\printunsrtglossary[type=acronym,style=alttree,title={List of Acronyms}]

o

\printunsrtglossary[type=\acronymtype,style=alttree,title={List of Acronyms}]

La set-widestopción intenta determinar qué entrada tiene el nombre más amplio, pero bib2glsno conoce las nameabreviaturas/acrónimos (ya que no tiene acceso a la información de estilo establecida en el documento), por lo que asume que el nombre es solo la forma corta. por defecto por lo que no tiene en cuenta la forma larga al realizar las mediciones. Sin embargo, el alttreeestilo no es adecuado para abreviaturas con descripciones porque terminarías con solo una pequeña cantidad de espacio para la descripción. Es mejor utilizar un estilo continuo (como tree) o un estilo que ponga un descanso antes de la descripción (como altlist).

Por ejemplo:

\printunsrtglossary[type=abbreviations,style=altlist,title={List of Abbreviations}]

Por cierto, es mejor no utilizar \glstextabreviaturas. Si solo desea que se muestre la forma corta (independientemente de si se ha usado la abreviatura), entonces úsela \glscon uno de los short-nolongestilos.¹ (Si desea garantizar la forma corta para subtítulos o encabezados, use \glsfmtshort.) Usar \glsen lugar de \glstextayuda a garantizar la El estilo de la abreviatura es correcto.


¹Hay un error en el short-nolong-descestilo que se solucionó en glossaries-extrala versión 1.39.

información relacionada