List numbering is broken by an image

8 views
Skip to first unread message

Vladimir Kulev

unread,
Nov 7, 2012, 12:50:30 PM11/7/12
to wikipu...@googlegroups.com
Hello!

Could someone please help me with making http://www.wikipublisher.org/wiki/Examples/ImagesInList to work? Just try converting it to PDF and look at the list numbering, and you'll see the problem.

I can read and edit PHP code, but I don't know where to start.

JR

unread,
Nov 7, 2012, 7:47:12 PM11/7/12
to wikipu...@googlegroups.com
A way around this is to modify the second list item as follows:

# %item value=2%Second item

This sets the number to 2. I have added this on the example page.

There is also an issue with the first item's continuation line, which in the pdf is treated as "verbatim" text because of the start of line spaces. Another way to write continuation lines in lists using Wikipublisher is with the following markup:

# %item value=2%Second item :+
Second item continuation

The ":+" is an end-of-line markup which wraps the parts of the item in "p" tags. However, this does not let an author place an image between the first item and its continuation line.

The root cause of the problem is that the figure causes the list to close in the pdf version, but not in the html version. Figure handling in pdf is complex and it would be difficult to add support for figures inside other blocks.

JR

Vladimir Kulev

unread,
Nov 8, 2012, 3:52:46 AM11/8/12
to wikipu...@googlegroups.com
I still don't understand wiki->xml markup code quite well, but after some debugging I end up with editing img markup (Markup('^img', '<block' in stdmarkup.php) and replacing <:block> with <:block,1> there (it is used for images in standard PmWiki markup code). It makes figures in list to work, do you have an idea of possible bugs because of this change?

JR

unread,
Nov 8, 2012, 4:02:26 PM11/8/12
to wikipu...@googlegroups.com
Nice catch! I'll run some tests and if they work correctly, we can include this change in the next release.

Thank you.

Vladimir Kulev

unread,
Nov 8, 2012, 4:25:24 PM11/8/12
to wikipu...@googlegroups.com
You're welcome! And thank you for ":+" too :)

--
You received this message because you are subscribed to the Google Groups "wikipublisher" group.
To view this discussion on the web visit https://groups.google.com/d/msg/wikipublisher/-/TJEN-TCxs_UJ.

To post to this group, send email to wikipu...@googlegroups.com.
To unsubscribe from this group, send email to wikipublishe...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wikipublisher?hl=en.



--

Vladimir Kulev
Mobile: +7 (921) 555-44-22

Jabber: m...@lightoze.net

Skype: lightoze

Reply all
Reply to author
Forward
0 new messages