From a0e23086ce568d920269d70ea10b3514b7f3caab Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Fri, 22 Nov 2024 12:05:59 +0100 Subject: [PATCH] change doc and snippets for glossary, symbols and acronym entries --- lisp/my/my-org-article.org | 80 ++++++++++++++++++++++++++-- snippets/org-mode/article | 25 +++------ snippets/org-mode/article-glossaries | 24 +++------ 3 files changed, 89 insertions(+), 40 deletions(-) diff --git a/lisp/my/my-org-article.org b/lisp/my/my-org-article.org index 195e8720..0e917248 100644 --- a/lisp/my/my-org-article.org +++ b/lisp/my/my-org-article.org @@ -705,16 +705,52 @@ Create math matrix objects with org tables | 1 | 2 | | 3 | 4 | -* Glossary and Acronym and References +* Table of Contents and List of Tables, Figures, Glossaries, Symbols, Acronyms and References -** Glossary +to display the table of contents +#+begin_src org +,#+LATEX: \clearpage\pdfbookmark[1]{\contentsname}{toc} +,#+TOC: headlines +#+end_src -Define glossary entries with +to display the list of figures +#+begin_src org +#+LATEX: \listoffigures +# `#+TOC: figures' is not working +#+end_src + +to display the list of tables +#+begin_src org +,#+TOC: tables +# old: #+LATEX: \listoftables +#+end_src + +to display the list of listing +#+begin_src org +,#+TOC: listings +# old: #+LATEX: \lstlistoflistings +#+end_src + +to display the tables for glossaries, symbols and acronyms +#+begin_src org +,#+LATEX: \printglossary\thispagestyle{plain} +,#+LATEX: \printglossary[type=\acronymtype,title=Abkürzungsverzeichnis]\thispagestyle{plain} +,#+LATEX: \printglossary[type=symbols,style=mysymbols,title=Symbolverzeichnis]\thispagestyle{plain} +,#+LATEX: \glsaddallunused +#+end_src + +** Glossary and List of Symbols + +Define glossary and symbol entries with #+latex_header_extra: \newglossaryentry{tree}{name={tree},description={A description for the glossary entry}} #+latex_header_extra: \newglossaryentry{shrub}{name={shrub},description={A description for the other glossary entry}} #+begin_src org -,#+latex_header_extra: \newglossaryentry{tree}{name={tree},description={A description for the glossary entry}} -,#+latex_header_extra: \newglossaryentry{shrub}{name={shrub},description={A description for the other glossary entry}} +# glossaries +,#+latex_header_extra: \newglossaryentry{tree}{name={tree},description={A description for the glossary entry},type=main,symbol=} +,#+latex_header_extra: \newglossaryentry{shrub}{name={shrub},description={A description for the other glossary entry},type=main,symbol=} +# symbols +,#+latex_header_extra: \newglossaryentry{A}{name=\(A\),description={{Area}},type=symbols,symbol=mm^{2}} +,#+latex_header_extra: \newglossaryentry{L}{name=\(L\),description={{Length}},type=symbols,symbol=mm} #+end_src @@ -740,6 +776,27 @@ Use a glossary entry using | =Glsdesc= | The capitalized description associated with the label | |-----------+-------------------------------------------------------------| + +# +# ALTERNATIVE to define glossary and symbols entries via org tables; +# but problem with link hanging +# +# NOTE! the following table will be split into an glossary and a symbol table +# #+name: glossary +# | label | name | description | unit | +# |-------+-------+-----------------------------------------------------+--------| +# | tree | Tree | A woody plant | | +# | shrub | Shrub | A woody bush | | +# | api-g | API | An Application Programming Interface (API) is a ... | | +# | w | \(w\) | Width | mm | +# | A | \(A\) | Area | mm^{2} | +# | L | \(L\) | Length | mm | +# | f | \(f\) | Eigen frequency | Hz | + + +# OR simply use an org table for the list of symbols , e.g. +# | \(L\) | m | Length | + ** Acronym Define acronym entries with @@ -780,6 +837,19 @@ Use a acronyms entry using | =ACRfullpl= | Both the acronym and its definition in plurall ALL-CAPS | |------------+-----------------------------------------------------------| + +# +# ALTERNATIVE to define acronym entries via org tables; but problem +# with link hanging +# +# #+name: acronyms +# | label | abbreviation | full form | +# |-------+--------------+-----------------------------------| +# | mimo | | multiple-input multiple output | +# | qos | QoS | quality-of-service | +# | bb | BB | branch and bound | +# | api | API | Application Programming Interface | + ** References check regarding the style defined in the preamble : biber --validate-datamodel diff --git a/snippets/org-mode/article b/snippets/org-mode/article index 410f4b04..de0dce58 100644 --- a/snippets/org-mode/article +++ b/snippets/org-mode/article @@ -62,25 +62,14 @@ #+LATEX: \thispagestyle{plain} * Glossary, Acronym and List of Symbols :ignore: -# NOTE! the following table will be split into an glossary and a symbol table -#+name: glossary -| label | name | description | unit | -|-------+-------+-----------------------------------------------------+--------| -| tree | Tree | A woody plant | | -| shrub | Shrub | A woody bush | | -| api-g | API | An Application Programming Interface (API) is a ... | | -| w | \\(w\\) | Width | mm | -| A | \\(A\\) | Area | mm^{2} | -| L | \\(L\\) | Length | mm | -| f | \\(f\\) | Eigen frequency | Hz | -#+name: acronyms -| label | abbreviation | full form | -|-------+--------------+-----------------------------------| -| mimo | | multiple-input multiple output | -| qos | QoS | quality-of-service | -| bb | BB | branch and bound | -| api | API | Application Programming Interface | +# glossaries (label, name, description) +#+latex_header_extra: \newglossaryentry{tree}{name={tree},description={A description for the glossary entry}} +#+latex_header_extra: \newglossaryentry{shrub}{name={shrub},description={A description for the other glossary entry}} + +# acronyms (label, abbreviation, full form) +#+latex_header_extra: \newacronym{bb}{BB}{Two Letter Acronym} +#+latex_header_extra: \newacronym{qos}{QoS}{quality-of-service} #+LATEX: \printglossary\thispagestyle{plain} #+LATEX: \printglossary[type=\acronymtype,title=Abkürzungsverzeichnis]\thispagestyle{plain} diff --git a/snippets/org-mode/article-glossaries b/snippets/org-mode/article-glossaries index 0477a27b..df503f10 100644 --- a/snippets/org-mode/article-glossaries +++ b/snippets/org-mode/article-glossaries @@ -4,24 +4,14 @@ # key: ?article-gls # -- * Glossary, Acronym and List of Symbols :ignore: -#+name: glossary -| label | name | description | unit | -|-------+-------+-----------------------------------------------------+--------| -| tree | Tree | A woody plant | | -| shrub | Shrub | A woody bush | | -| api-g | API | An Application Programming Interface (API) is a ... | | -| w | \\(w\\) | Width | mm | -| A | \\(A\\) | Area | mm^{2} | -| L | \\(L\\) | Length | mm | -| f | \\(f\\) | Eigen frequency | Hz | -#+name: acronyms -| label | abbreviation | full form | -|-------+--------------+-----------------------------------| -| mimo | | multiple-input multiple output | -| qos | QoS | quality-of-service | -| bb | BB | branch and bound | -| api | API | Application Programming Interface | +# glossaries (label, name, description) +#+latex_header_extra: \newglossaryentry{tree}{name={tree},description={A description for the glossary entry}} +#+latex_header_extra: \newglossaryentry{shrub}{name={shrub},description={A description for the other glossary entry}} + +# acronyms (label, abbreviation, full form) +#+latex_header_extra: \newacronym{bb}{BB}{Two Letter Acronym} +#+latex_header_extra: \newacronym{qos}{QoS}{quality-of-service} #+LATEX: \printglossary\thispagestyle{plain} #+LATEX: \printglossary[type=\acronymtype,title=Abkürzungsverzeichnis]\thispagestyle{plain}