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

Forward all unknown attributes to latex lstlistings #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oberien
Copy link
Owner

@oberien oberien commented Feb 13, 2020

I used this for a presentation to specify fontsize (basicstyle=\tiny)
for listings. Shouldn't be a long-term solution in general, so unsure if
we actually want to merge this?

@oberien oberien requested a review from HeroicKatora February 13, 2020 19:22
@@ -160,6 +160,10 @@ impl<'a> Cskvp<'a> {
self.double.remove(key)
}

pub fn take_all_double(&mut self) -> HashMap<Cow<'a, str>, WithRange<Cow<'a, str>>> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Drop we warn for all unused attributes of a Cskvp. Using this method makes that more or less pointless.

@@ -411,6 +411,7 @@ impl<'a> Frontend<'a> {
} else {
Some(WithRange(language, language_range))
},
attributes: cskvp.take_all_double(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could take some inspiration from html, and have a style attribute instead that contains options that should be forwarded? I'm not completely sure either.

I used this for a presentation to specify fontsize (`basicstyle=\tiny`)
for listings. Shouldn't be a long-term solution in general, so unsure if
we actually want to merge this?
@oberien oberien force-pushed the latex-attribute-hack branch from 2bf111a to 265466b Compare July 23, 2020 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants