Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: x/tools/cmd/present: add support for quote #30343

Open
lucor opened this Issue Feb 21, 2019 · 7 comments

Comments

Projects
None yet
6 participants
@lucor
Copy link

lucor commented Feb 21, 2019

This proposal is about to add support for quote into the present tool.

An implementation is available here: golang/tools/pull/30

It introduces a "quote" function into the template to inject quotes and citations.

The text after ".quote" is embedded in a blockquote element after
processing styling. The text after the optional "//CITATION:" is treated
as a citation and embedded in a cite element after processing styling.

Example:

.quote Never memorize something that you can look up //CITATION: Albert Einstein
@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Feb 27, 2019

@dmitshur

This comment has been minimized.

Copy link
Member

dmitshur commented Feb 27, 2019

Thanks for the proposal!

As an observation, accepting this proposal would incur the cost of increasing the number of invocations available in the present format from 8 to 9:

 .code x.go /^func main/,/^}/
 .play y.go
 .image image.jpg
 .background image.jpg
 .iframe http://foo
 .link http://foo label
 .html file.html
 .caption _Gopher_ by [[https://www.instagram.com/reneefrench/][Renée French]]
+.quote Never memorize something that you can look up //CITATION: Albert Einstein

That means users of present will need to learn one more verb, and make decision on when to use it instead of not using it.

@lucor In your proposal, you've described this new type of invocation, but there's not much justification for why it's being added and what kind of problem it's meant to resolve.

Can you please elaborate on how it will fit into the present format as a whole? What is the experience of adding a quote in a present talk right now, i.e., before this proposal, and how does it change after this proposal? Examples of present text, and screenshots of what the rendered result looks like would be very helpful.

At a first glance, it seems similar/related to the caption invocation. Can caption be used in place of quote to achieve a similar effect, or is the dedicated quote invocation justifiable of its cost?

@lucor

This comment has been minimized.

Copy link
Author

lucor commented Mar 1, 2019

@dmitshur thanks for the feedback!

Right now it seems not possible to highlight some text as a quote in a present talk.
The idea was to present the quotes like the HTML blockquote element.

Example:

* Quote Example

.quote Never memorize something that you can look up //CITATION: Albert Einstein

quote_screenshot

With regard to the caption invocation, it was my initial attempt too... but if it seems related to add caption to images.

@andybons

This comment has been minimized.

Copy link
Member

andybons commented Mar 27, 2019

@dmitshur what do you think?

@dmitshur

This comment has been minimized.

Copy link
Member

dmitshur commented Apr 10, 2019

Thanks for providing that example and screenshot, it's very helpful.

Right now it seems not possible to highlight some text as a quote in a present talk.

I'm not sure if you meant to imply "other than to use an iframe", but if not, it is possible by using an iframe with custom HTML/CSS.

I've seen some examples of iframes used to implement things that the present format doesn't provide native support for. Of course, it's less convenient and requires more work, but the upside is that any custom behavior is possible, and the amount of special present syntax is kept smaller. As one example, clicking with the mouse on the gray textbox on this slide makes a Gopher appear, via an iframe.

In order to make an informed decision of whether this quote feature is something that warrants first-class syntax support in the present format, I think it would be helpful to provide some statistics on existing present talks and see how often people try to include quotes.

If it turns out that there's a sizable amount of such talks, then we should accept this proposal. But if it turns out that very few existing talks tend to include quotes, then it's probably better not to add the new syntax and have people continue to rely on iframes to implement custom features for their talks.

@lucor

This comment has been minimized.

Copy link
Author

lucor commented Apr 10, 2019

Thanks for the feedback.

I'm not sure if you meant to imply "other than to use an iframe", but if not, it is possible by using an iframe with custom HTML/CSS.

Apologies, I've missed the possibility to add it using an iframe

If it turns out that there's a sizable amount of such talks, then we should accept this proposal. But if it turns out that very few existing talks tend to include quotes, then it's probably better not to add the new syntax and have people continue to rely on iframes to implement custom features for their talks.

Agreed :)

@andybons

This comment has been minimized.

Copy link
Member

andybons commented Apr 17, 2019

Let's just try this. We’ll figure it out as we go.

@andybons andybons modified the milestones: Proposal, Unreleased Apr 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.