Skip to content

Forward all unknown attributes to latex lstlistings#116

Open
oberien wants to merge 1 commit into
masterfrom
latex-attribute-hack
Open

Forward all unknown attributes to latex lstlistings#116
oberien wants to merge 1 commit into
masterfrom
latex-attribute-hack

Conversation

@oberien
Copy link
Copy Markdown
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 197g February 13, 2020 19:22
Comment thread src/cskvp.rs
self.double.remove(key)
}

pub fn take_all_double(&mut self) -> HashMap<Cow<'a, str>, WithRange<Cow<'a, str>>> {
Copy link
Copy Markdown
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.

Comment thread src/frontend/mod.rs
} else {
Some(WithRange(language, language_range))
},
attributes: cskvp.take_all_double(),
Copy link
Copy Markdown
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