aperis-docs / react-static-plugin-aperis-doc-pages

0 stars 0 forks source link

Add support for additional text formatting: bold/underlined/code highlighting #8

Open w00lf opened 3 years ago

w00lf commented 3 years ago

Currently, there is no way of denoting variable names in the aperis posts, it will be good to have markdown type styling options:

strogonoff commented 3 years ago

@w00lf, inline code blocks and emphasis are currently supported. Inline block button IIRC looks like <>.

Since this is not really a WYSIWYG editor, we are trying to offer semantic controls over text structure only. Hence there is only emphasis, and no "show in bold" / "use italics" controls which is not semantics but presentation.

ronaldtse commented 3 years ago

@strogonoff "basic" textual formatting of bold/underline/monospace is considered part of text content nowadays. For example, a book title may contain such formatting as defined by ISO 690. They are also supported in the semantic markup in Metanorma. We should definitely consider supporting them, there does not seem to have good alternatives.

Regarding inline syntax highlighting -- this is for documentation of programming syntax. Do you have a suggestion to differentiate normal text from programming syntax?

strogonoff commented 3 years ago

Inline WYSIWYG text formatting:

If bold/italics/underlined/strikethrough and other WYWISYG features are needed to make our future standards editor (Metanorma GUI) comply with necessary standards, I will make sure they are supported by Metanorma editor schema. However, Aperis is not Metanorma. There is no standard that dictates a schema for documentation system yet; there is an opportunity to deliver a purely semantic editor here. Perhaps this schema could be standardized and become more widely adopted later.

Speaking of just Aperis: potentially there may be multiple emphasis levels supported, though it is uncertain yet. If they are supported, emphasis levels will be rendered in different ways, but that is a presentational detail that should depend on target medium.

For now there is the Emphasize mark support intended to be used where emphasis is needed. Note that “emphasize” is neither bold nor italics, even though it is rendered in italics to offer visual aid to documentation author (this may change).

Source code listing blocks:

The rendering of source listings as it appears rendered on Aperis site pages does indeed want improvement. Earlier this week I filed issues regarding that in aperis-doc-pages React components (https://github.com/aperis-docs/aperis-doc-pages/issues/4) and Paneron extension repositories.

On 17 Jan 2021, at 6:15 PM, Ronald Tse notifications@github.com wrote:

@strogonoff https://github.com/strogonoff "basic" textual formatting of bold/underline/monospace is considered part of text content nowadays. For example, a book title may contain such formatting as defined by ISO 690. They are also supported in the semantic markup in Metanorma. We should definitely consider supporting them, there does not seem to have good alternatives.

Regarding inline syntax highlighting -- this is for documentation of programming syntax. Do you have a suggestion to differentiate normal text from programming syntax?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aperis-docs/react-static-plugin-aperis-doc-pages/issues/8#issuecomment-761759317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACHQX6MSE5Y5IJF7JVF4CTS2KTDLANCNFSM4WEBUIYQ.

ronaldtse commented 3 years ago

If we were to build a purely semantical editor (which I support), the question we ought to think about is the "types of semantics". There are other types of semantics other than "emphasize" (or "emphasizing what aspect"). Right now with the simple "emphasize" we are unable to express things like "this is code".

Semantics also does not mean avoiding formatting -- let's say we quote from some external text that contains bolding and underline formatting. We can't retain original semantics by stripping off their formatting.

opoudjis commented 3 years ago

I barely know anything about what is going on here, but clearly there needs to be a semantic model anchor for markup.

We have devised a core of Metanorma which is to be used as a generic document model, Basicdoc: https://github.com/metanorma/basicdoc-models . (It is pretty much the inline elements of Metanorma, and a very rudimentary sections model.) That is as good an anchor as any, and it is mostly aligned to Asciidoctor—certainly in the inline elements being discussed here.

So monospace, italics, boldspace can be modelled as tt, em, strong in accordance to Basicdoc.

Shrug.