~ireas/genpdf-rs#39: 
Hide outer bullet point when List is nested within a List

Would it be possible to disable the outer bullet when a Ordered/UnorderedList is added within another List, either entirely or with a toggle?

1

I think I could figure out how to implement this one if it's fine to add.

Status
RESOLVED WONT_FIX
Submitter
~ap4sc
Assigned to
No-one
Submitted
3 years ago
Updated
3 years ago
Labels
No labels applied.

~ireas 3 years ago

Interesting point! I don’t want to disable it completely because it could make sense in some cases. I think the easiest and most general solution would be to put Outer List 2 and the inner list into a LinearLayout. This should also work with embedded tables, images, and so on. Does that work for you?

~ap4sc 3 years ago

Thanks, I didn't think of that but that would also work. I do think it would be convenient to have a toggle for it in the struct, since hiding the outer point is the default behavior in most word processing applications

~ireas 3 years ago

That might be true for WYSIWYG applications, but I think most text/markup-based word processors do the same as genpdf currently does, for example HTML or LaTeX. And I currently don’t see a good way to implement this generically. You could try to downcast the element box to one of the list types and check if that is successful. But what would happen if the list is inside a wrapper element?

So if you have a good and generic way to implement this, you can submit a patch, but I’m not convinced yet and can’t promise that I’ll accept it.

~ap4sc 3 years ago

I was thinking of using Any to downcast, but you're right there isn't a simple way to do it that accounts for lists within other elements. Might be worth adding a short note in the docs about wrapping inner lists in a LinearLayout

~ireas REPORTED WONT_FIX 3 years ago

Good point, I’ve added examples to the documentation that show the two ways of nesting lists in commit b96bcbd7f6f7b4a4ff8cd22856063a77784413f9.

Register here or Log in to comment, or comment via email.