lc-ref
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

lc-ref

A LaTeX style webcomponent reference and preview

This library provides a webcomponent to create numbered elements references and authomatic preview.

<lc-ref href="#fig_1">fig. </lc-ref>

will probably render as "fi.g 1":

Cross documents links are supported:

<lc-ref href="https://example.com#fig_1">fig. </lc-ref>

they will probably render as "fig. example .1 ⧉"

Motivation

I created this package to reference figures, tables, etc. like in LaTeX.

Creating a numbered element

In your WebComponent, you have add the property:

class MyWebcomponent extends HTMLElement {
    // ...

    lc_number = "auto";
}

If you want to provide a custom number or something else, write:

class MyWebcomponent extends HTMLElement {
    // ...

    /**
     * @return {string}
     */
    lc_number() {
        return "42!";
    };
}

/lc-ref/

    Package Sidebar

    Install

    npm i lc-ref

    Weekly Downloads

    4

    Version

    0.1.2

    License

    none

    Unpacked Size

    56.4 kB

    Total Files

    19

    Last publish

    Collaborators

    • lucaciucci