PGML image (and link) #562
Replies: 6 comments 8 replies
-
I think your summary is generally correct of the general concept of the usage for an image. I think that both I suspect that these were not implemented as you can use the |
Beta Was this translation helpful? Give feedback.
-
I just enabled discussions in the pg repository. |
Beta Was this translation helpful? Give feedback.
-
Actually, it was that I ran out of time (but yes, I knew that If we were to follow the Markdown syntax (on which PGML is based), it would be
which would at least encourage people to provide alt text for the images. But I can see the other notation working as well. As for the successive braces versus arrow hashes, PGML is set up to allow both (without extra work), and you can use either one for things like answers, rules, and other items that take parameters. |
Beta Was this translation helpful? Give feedback.
-
I should add: I think that having these (image markup; link markup; and if we go there, table markup†) would be useful for community building. With I know it's impossible to remove perl from PG. But I have this sense for what turns off some of my colleagues off from even trying to code a PG problem. And my sense is that if you could do almost everything with PGML and "simple" perl variable assignments, it would make a difference. The next step might even be a palette tool that would just insert each of the PGML tokens and block delimiters. [Don't yell at me, I wouldn't use such a thing :) But I know people who would use it and will never learn things like † @dpvc I haven't forgotten that old thread where we discussed this. |
Beta Was this translation helpful? Give feedback.
-
Yes but if you are using |
Beta Was this translation helpful? Give feedback.
-
Yes, but you are putting in PG functions (like |
Beta Was this translation helpful? Give feedback.
-
In
PGML.pl
, there are a few hints that markup for images and links were planned, but not completed. If these were to be completed, how should the markup be? The suggestion in PGML.pl is that[!
and!]
would be the delimiters for an image. I'm familiar with usingimage()
where you pass either:https://domain.com/image.png
myimage.png
insertGraph()
with a dynamic generated graph that might be$gr
There are width and height in pixels, and the tex width. And following #559
alt
should become a common option. So could/should it be like these?[!https://domain.com/image.png!]{400}{200}{tex_width}{alt text}
[!myimage.png!]{400}{200}{tex_width}{alt text}
[!$gr!]{400}{200}{tex_width}{alt text}
Could it work that way, treating all arguments as optional strings? First thought is that
image()
could be upgraded so that if it is passed a string, then it just returns that string. Then all three examples above could pass throughimage()
.I would like to avoid something like
[!$gr!]{width=>400, height=>200, tex_width=>something, alt=>'alt text'}
but that could be an option with the above being a fixed-order shorthand.Also trying to imagine other things you might want on an image. Maybe a border? Maybe like
[!$gr!]*
if sticking tosolid black 1pt
is OK.So I'm seeking thoughts on how markup should work before getting into it. I'm less interested in the
[<...>]
for a URL, but thoughts welcome there too. Would/could it be like[<https://domain.com/site>]{Text for Link}
?Beta Was this translation helpful? Give feedback.
All reactions