Coder Social home page Coder Social logo

ref is not HTML about pubcss HOT 5 CLOSED

thomaspark avatar thomaspark commented on September 8, 2024
ref is not HTML

from pubcss.

Comments (5)

MattiSG avatar MattiSG commented on September 8, 2024

Yes, these should be <cite>.

from pubcss.

elmimmo avatar elmimmo commented on September 8, 2024

Indeed, @MattiSG. But an added issue is that PubCSS' required markup already does use cite for another purpose, and one which is seemingly not valid HTML just as well.

Citations to the references make use of these IDs.

<cite href="#nicole"></cite>

The cite element is not intended to be a way of linking (you have the a element for that) but, as @MattiSG pointed out, to cite (i.e. to mention, to reference) titles of works (and authors of such works, if you prefer W3C's version of cite to WHATWG's version of cite).

In other words, in no HTML specification can cite have an href attribute, so PubCSS' use of it is not valid HTML too.

I think @thomaspark is mixing two different scenarios:

  1. Linking to tables and figures. This can be done with regular id attributes in table and figure and in some other place linking to them with a standard internal HTML link like <a href="#…">…</a>.
  2. Providing a list of creative works at the end of the document, and referencing them in short form from within the main body of the text.

Each title of a work in the list of works at the end should be wrapped with <cite id="…">…</cite>.

The references to them from within the main body might be wrapped in <cite>…</cite> (no id needed, unless one wants to be able to link back to the reference in some other place) only if their short form is still descriptive enough to differentiate what work it is, and then, the whole thing should be wrapped again with a standard internal HTML link like <a href="#…">…</a> pointing to the id of the referenced work at the end.

At any rate, and even if @thomaspark fixed PubCSS' non-valid uses of HTML (which he should IMHO), pretending that non-web people will write in HTML straight is wishful thinking (and bad advice) IMHO. Tools such as Pandoc can provide those people with a nice balance between being able to comfortably write technical papers without creativity or thinking process being hindered by the syntax and obtaining nicely structured documents with standard rich HTML.

I think PubCSS would do good in expecting HTML markup to be like that output by Pandoc (which can output to LaTex and Word too BTW) and hence become a potential companion to format its output or a similar tool's, as Pandoc's HTML5 output is, at any rate, a good guideline even for those preferring to write directly in it instead of producing their source in Pandoc's version of Markdown.

from pubcss.

MattiSG avatar MattiSG commented on September 8, 2024

Thanks for these very precise and relevant details, @elmimmo :)

Let's try to separate concerns about the product’s use-cases and HTML standards compliance, though.

I think @elmimmo gave the solution: <cite id="work"> + <a href="#work"><cite> is probably the way it should be. Admittedly, this is less concise than the current format, but being compliant means it will be much, much easier to interoperate with other tools, and I’d expect PubCSS to do so to become a common format.
With an HTML-compliant spec, for example, one could simply use a cite extension for Markdown and decrease the barrier to entry :)

What do you think @thomaspark?

from pubcss.

thomaspark avatar thomaspark commented on September 8, 2024

@elmimmo, thanks for opening this and the other issues. I think they cover all of the cases of invalid HTML, which I'll iron out (nb: the CSS is another matter).

Along with validation, the markup should ideally be concise and obvious. The proposed seems like a good solution in all regards.

from pubcss.

MattiSG avatar MattiSG commented on September 8, 2024

Nice, congrats! :)

from pubcss.

Related Issues (18)

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.