Giter Club home page Giter Club logo

Comments (9)

rbeezer avatar rbeezer commented on May 21, 2024

Right. <c> works for small inline snippets, but I really need something for large blocks (w/ carriage returns) that is not as cumbersome as <program>, which is meant for programming languages listings. I do think your workaround is the best suggestion now.

What do you think of <code>, which would get sanitized like <input> does? (Preserve line breaks, preserve indentation, etc). Or maybe just recycle <pre>?

from pretext.

davidfarmer avatar davidfarmer commented on May 21, 2024

The other day I learned of the term "tag abuse", which is when you use
a tag merely for the side-effect of having its contents appear with the
desired visual appearance.

Since (presumably!) should contain actual code, it would be bad
to have the as the generic preformatting tag. Since we need
a generic preformatting tag, it makes sense to recycle

.

I see an analogy with and .

What to do before we have both a and a

 tag?  I think the
suggestion of using is a good one, because it is
obviously tag abuse, intended to be temporary as we develop the standards,
and can be fixed later.

On Fri, 16 Jan 2015, Rob Beezer wrote:

Right. works for small inline snippets, but I really need something for large blocks (w/ carriage returns) that is
not as cumbersome as , which is meant for programming languages listings. I do think your workaround is the
best suggestion now.

What do you think of , which would get sanitized like does? (Preserve line breaks, preserve indentation,
etc). Or maybe just recycle

?


Reply to this email directly or view it on GitHub.[AAM6LBU0nZfv21ZAkk01DTtK1aRqa3vhks5niN32gaJpZM4DTL9R.gif]

from pretext.

rbeezer avatar rbeezer commented on May 21, 2024

On 16/01/2015 14:20, davidfarmer wrote:

I see an analogy with and .

So if I understand right, it would be tag abuse if I were to use on
a defined term? Because I am simply using the tag to gain the visual formatting
that I think a defined term should have? So we have to prevent tag
abuse? And need

 to prevent more.

Is it abusive to have an tag in the first place? I would argue not, but
on first reading I thought this might be what you meant by "use
a tag merely for the side-effect of having its contents appear with the
desired visual appearance."

Rob

from pretext.

davidfarmer avatar davidfarmer commented on May 21, 2024

Yes to your first question, and that is probably the most
common example of tag abuse. (Or maybe it is for .)
We need because sometimes emphasis is just emphasis.

But we need to train people to use the semantic markup when it is
available, and alert us to cases where we may need a new tag.

Let's hope nobody thinks to suggest , , and <C++>
tags in place of the generic tag! (You may want an
optional language="python" attribute to .)

On Fri, 16 Jan 2015, Rob Beezer wrote:

On 16/01/2015 14:20, davidfarmer wrote:

I see an analogy with and .

So if I understand right, it would be tag abuse if I were to use on
a defined term? Because I am simply using the tag to gain the visual formatting
that I think a defined term should have? So we have to prevent tag
abuse? And need

 to prevent more.

Is it abusive to have an tag in the first place? I would argue not, but
on first reading I thought this might be what you meant by "use
a tag merely for the side-effect of having its contents appear with the
desired visual appearance."

Rob


Reply to this email directly or view it on GitHub.[AAM6LCk4Fhp7LprwW9PNpjKRUk-hAEK9ks5niPzmgaJpZM4DTL9R.gif]

from pretext.

rbeezer avatar rbeezer commented on May 21, 2024

supports a plethora of language="".

LaTeX output uses the listings package and HTML uses Google's CodePrettifier,
both to achieve syntax highlighting. The and have obvious
uses. So the intent is that language-specific code goes in .

Maybe should be like a block-level version of the inline . That would
be my first thought. And

 would be more generic.

I am giving my students here at AIMS lots of "stuff" they can cut/paste out of
an assignment into Sage worksheets. Mostly entries of semi-big matrices (list
of lists of numbers). Not program statements, perhaps code, more
computer-specific than just

.

Suppose you provided a small data set to a reader. 20 rows, 6 numbers to a row.
Formatted so it could be cut/paste without loss (eg, minus signs are not some
Unicode dash, as sometimes happens in PDFs). What would you wrap that in?

Rob

On 16/01/2015 14:53, davidfarmer wrote:

Yes to your first question, and that is probably the most
common example of tag abuse. (Or maybe it is for .)
We need because sometimes emphasis is just emphasis.

But we need to train people to use the semantic markup when it is
available, and alert us to cases where we may need a new tag.

Let's hope nobody thinks to suggest , , and <C++>
tags in place of the generic tag! (You may want an
optional language="python" attribute to .)

On Fri, 16 Jan 2015, Rob Beezer wrote:

On 16/01/2015 14:20, davidfarmer wrote:

I see an analogy with and .

So if I understand right, it would be tag abuse if I were to use on
a defined term? Because I am simply using the tag to gain the visual formatting
that I think a defined term should have? So we have to prevent tag
abuse? And need

 to prevent more.

Is it abusive to have an tag in the first place? I would argue not, but
on first reading I thought this might be what you meant by "use
a tag merely for the side-effect of having its contents appear with the
desired visual appearance."

Rob


Reply to this email directly or view it on
GitHub.[AAM6LCk4Fhp7LprwW9PNpjKRUk-hAEK9ks5niPzmgaJpZM4DTL9R.gif]


Reply to this email directly or view it on GitHub
https://github.com/rbeezer/mathbook/issues/21#issuecomment-70249592.

from pretext.

kcrisman avatar kcrisman commented on May 21, 2024

Maybe should replace ; not all code is an actual program. For instance, it could be a non-functioning snippet.

from pretext.

davidfarmer avatar davidfarmer commented on May 21, 2024

I think we need to take this discussion to the mailing list so more people can comment.
A particular concern is missed use cases.

from pretext.

kcrisman avatar kcrisman commented on May 21, 2024

If you do have that discussion, is there a tag for "comment" as well? Perhaps something that would drop down a knowl ... that is actually what I have been using the pre tag for.

from pretext.

rbeezer avatar rbeezer commented on May 21, 2024

I have implemeted and pushed a <pre> element. I really needed it the past three weeks at AIMS so was anxious to put it in place.

KDC - I'm uncertain about your request for a "comment" tag. Comment on something in particular, or would the remark tag be too heavy (gets a number)? Remarks will be knowlizable eventually. I'm thinking maybe we already had that discussion? Anyway, please open a new issue for "comment" as I am going to close this one now.

from pretext.

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.