Giter Site home page Giter Site logo

Comments (8)

dhimmel avatar dhimmel commented on June 5, 2024 1

Pandoc definition_lists look like they might work (extension enabled by default).

Source markdown and pandoc command:

echo "
I am writing something nice with an abbreviation for [ABBREV2](#abbrev-2):

## Abbreviations

ABBREV1
  ~ Definition 1

[ABBREV2]{#abbrev-2}
  ~ Definition 2a
  ~ Definition 2b
" | pandoc --to=html

Output HTML:

<p>I am writing something nice with an abbreviation for <a
href="#abbrev-2">ABBREV2</a>:</p>
<h2 id="abbreviations">Abbreviations</h2>
<dl>
<dt>ABBREV1</dt>
<dd>
Definition 1
</dd>
<dt><span id="abbrev-2">ABBREV2</span></dt>
<dd>
Definition 2a
</dd>
<dd>
Definition 2b
</dd>
</dl>

Which will render to something like (possibly with different indentation, we could always touch up the styles):

image

There's also a plugin https://kprussing.github.io/pandoc-acro/ (github), but might be easiest to try the builtin solution first.

from rootstock.

dhimmel avatar dhimmel commented on June 5, 2024

a mechanism to be able to link an abbreviation to its definition into an abbreviation list such as it is currently done for references would be awesome! (with the links allowing to switch easily from one to another in the HTML)

Sounds like you're also interested in being able to look at an abbreviation in the abbreviation list and cycle through all instances of it. That would be nice but probably not as essential as find-in-page usually does a good job with abbreviations, as they often can be distinct from other text.

from rootstock.

Adafede avatar Adafede commented on June 5, 2024

The first part essentially already does the job, as you say, thank you very much!

from rootstock.

dhimmel avatar dhimmel commented on June 5, 2024

Cool, should we close the issue or anything else that we should do?

from rootstock.

Adafede avatar Adafede commented on June 5, 2024

Depending on how the non-essential nice addition has an interest, but yes, you can close! 😊

from rootstock.

dhimmel avatar dhimmel commented on June 5, 2024

Depending on how the non-essential nice addition has an interest

Can you elaborate on what possible enhancements would be? There are a couple suggestions in your initial comment, but let's be more specific in the context of the current definition_lists solution and what else we could do.

from rootstock.

Adafede avatar Adafede commented on June 5, 2024

I imagined some hack to have the same ^ arrows as for the references to come back to the text and navigate occurrences as you mentioned. But it is really anecdotical, the definition_lists are already 99.5% OK.

from rootstock.

dhimmel avatar dhimmel commented on June 5, 2024

Got it. I agree that'd be cool. Probably need more adoption of definition_lists on individual manuscripts first and then we could think about adding a javascript plugin for the interactivity. Will close for now, but feel free to continue discussion.

from rootstock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.