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

Short captions for lists #17

Open
jwright6323 opened this issue Apr 21, 2023 · 1 comment
Open

Short captions for lists #17

jwright6323 opened this issue Apr 21, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jwright6323
Copy link

Thanks for working on this extension! I would like to suggest adding a feature to use short captions in the generated list. This is useful if you have long explanations in your figure captions that you want to trim out in the list of figures. In LaTeX this is done like so. It seems like this would require some additional asciidoctor markup, so this might not be trivial to implement.

@Alwinator Alwinator added enhancement New feature or request good first issue Good for newcomers labels May 8, 2023
@Alwinator
Copy link
Owner

I like your idea a lot! However, unfortunately, paid work is keeping me busy! Maybe you can add the feature and make a pull request? That would be cool.|

It should be not that difficult to implement, you need to pass the short captions and then use them here:

references_asciidoc << %(xref:#{element.id}[#{element.caption}]#{element.instance_variable_get(:@title)} +)
else element.caption
references_asciidoc << %(xref:#{element.id}[#{element.instance_variable_get(:@title)}] +)
end
else
if element.caption
references_asciidoc << %(xref:#{element.id}[#{element.caption}]#{element.title} +)
else element.caption
references_asciidoc << %(xref:#{element.id}[#{element.title}] +)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants