Comments (9)
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.
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.
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.
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.
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.
Maybe should replace ; not all code is an actual program. For instance, it could be a non-functioning snippet.
from pretext.
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.
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.
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)
- Markup in HTML page title HOT 3
- Space character in Sage strings for PDF/print
- Warn about non-Western alphabets in code comments
- Geogebra interactives move around once used
- Pretext repo is missing js/lib directory HOT 5
- Make dark mode work well HOT 6
- Knowl styling consistency HOT 1
- Asides at bottom of page get cut off
- characters in a @label
- Support Mermaid as a source language for diagrams HOT 1
- Use `Streams` interface for xsl info/warings/errors HOT 1
- Recompile latex images as needed HOT 5
- `pretext/pretext` documentation out of date? Example needed HOT 4
- Appendices not placed in back matter HOT 2
- Open DL knowled content at full width
- Empty "test" elements in "program" HOT 1
- Normalize "document-id" HOT 2
- External images in slideshows do not consider the publication file HOT 12
- Height to large: Interactive tag using pure JavaScript HOT 1
- Update the sample slideshow HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.