Question about the markup tag (pre)

+12 votes

I've created a free-space page about a discovery I've made, not finished yet, but I want/need to include a large plain text listing of GEDmatch results.  This text is interspersed lines of text and tabular data, and I need it displayed just as it is, not reformatted.  The normal way to do that in WikiMedia compatible wiki pages is to use the  pre formatting tag around it, and all the line breaks and indentations and tabular formatting are preserved.  I've discovered here that the pre formatting tag does work in the Preview pane on the Edit page of the free-space profile, but does *not* work in the final output, what everyone sees!  It reformats all of the columnar data lines into one jumbled unreadable paragraph.  I've tried every possible workaround and alternative (like nowiki, blockquote, leading colons, etc), and nothing has produced an acceptable output.  Leading colons do preserve the line breaks, but not the tabular spacing.

I'm very disappointed, and hoping someone has an idea for a workaround.  What of course I would really like is for <pre> to be fully supported.  It seems in keeping with the simple philosophy of WikiTree, as it's the way to allow sections of plain text to stay plain, unmarked up.  Otherwise, you have to add styling to every single line, and it still does not look as good as the original plain text.  The only way I know of to get a close approximation of the original text is to add table markup, but that would be a *huge* job, requiring codes to be added to every line and data element, and would still be problematic for the interspersed text lines.

Please please add full support for the pre tag !!!  It's already supported in the Preview pane.  And in fact, for now I've added a comment on the page that if you want to see the data correctly formatted, you have to open it for editing, then click the Preview button, and view it there.  That does not seem like a good long term workaround.

(I would add a link to the new page, but it's not finished yet, was hoping to improve it more before exposing it.)

in WikiTree Tech by Rob Jacobson G2G6 Pilot (127k points)
edited by Abby Glann
that seems really odd that it work in preview mode, but not in in the saved mode. that sounds like its just a bug that should be fixed.

I've used <b> but even for short sections of text, it a pain to edit every line.

4 Answers

+7 votes
Best answer
Another partial workaround: store your pre-formated text in another public space such as google docs and link to it. The issues of access and edit ability require some attention in order to accomplish the desired result.

One example: [ New Sweden Forefathers worksheet]
by Jim Angelo G2G6 Mach 4 (46.2k points)
selected by Rob Jacobson
Another great idea!  I have no familiarity yet with Google Docs, so once I can find time I will have to brush up on it, its usage and tools.  But that should provide what I need, if <pre> cannot be supported.  The downside is that readers will have to go to an external page, but that may be the best available option.  <pre> would make it all so much simpler, nudge nudge hint hint devs!

Thank you Jim!  I was able to create a Google Docs document, that *looks* like it's plain text, and is editable.  It wasn't easy, as Google Docs does not like plain text and wants to add formatting, add pagination, add word wrap, etc.

I still would prefer not using an external link, and document structure, but it serves its purpose for now.  I also left the plain text of the data at the bottom of my paper, in case <pre> is supported in the future.

The paper:  Small DNA Segments - Pennsylvania German

The document:  GEDmatch comparison data for Small DNA Segments - Pennsylvania German

Great! I'm glad it worked out.  Hopefully <pre> will come along soon.
+4 votes
Partial workaround: Save your formatted content in PDF format and upload it here (as an "image").
by Ellen Smith G2G Astronaut (1.2m points)
eeww... that's a really poor totally defeats the point of being a living editable wiki
Yes, it's a poor substitute, but at least it would allow him to display his content in the desired format (and do so without hours of fighting with code that refuses to behave).
That's a really good idea Ellen, and I want to test it, but it does have problems.  As Dennis said, it's not easily community edited, and I think it may be rather awkward to view when it is so many lines long.  In my case, my research has resulted so far in about 110 lines, which is probably more than a page in most people's browser.  And it could very well get longer if others want to contribute to it, which is possible.

But that should work great for shorter plain text sections, of essentially static data.
+6 votes
The <pre> tag supports a white-space CSS property, ie <pre style="white-space: whatever;">

There's a default, overridden by a setting in MediaWiki, which is probably overridden by WikiTree style sheets, so it's not clear what the default behaviour should be expected to be.

But it's against the rules to mess with it on WikiTree.

Somebody could write a very simple template to make the options available, but it wouldn't come under the supported uses of templates.
by Anonymous Horace G2G6 Pilot (568k points)
I admit I've never had time to delve into CSS and style sheets, or the 'innards' of WikiTree templates.  Another learning curve.  But if it's the only way, then I'm willing to delve.  It may not be as acceptable, but I believe that free-space pages are allowed more latitude.
+4 votes
Hi Rob,

I've added your request to our Team To Do list. We'll look into it in one of our next big rounds of improvements. Thanks!
by Abby Glann G2G6 Pilot (468k points)
Thanks, Abby! I believe many of us have wrestled with difficulties controlling page display on Free-space pages.
Thank you so much!  Looking forward to it.

Ummm... I don't suppose that could be in the next day or so?   :)

No?  Well OK, you all do have a lot on your plates.  No more pressure.

I always direct people to the Compact Tree for the DNA stuff, but I tend to be active in auDNA. That would be confusing to non-members!


Yeah, we don't move terribly quickly around here :-) We appreciate your patience! :-D

Related questions

+7 votes
1 answer
+4 votes
3 answers
384 views asked Jan 8, 2019 in WikiTree Tech by John Gilroy G2G2 (2.0k points)
+12 votes
3 answers
211 views asked Jan 3, 2019 in The Tree House by Steven Harris G2G6 Pilot (508k points)
+5 votes
2 answers
146 views asked Sep 8, 2018 in WikiTree Help by Sheena Tait G2G6 Mach 7 (72.4k points)
+5 votes
1 answer
+4 votes
2 answers
+6 votes
3 answers
128 views asked Dec 3, 2020 in Policy and Style by Kim Williams G2G6 Mach 3 (39.0k points)
+2 votes
1 answer
76 views asked Oct 26, 2020 in WikiTree Tech by Babs Deacon G2G1 (1.9k points)

WikiTree  ~  About  ~  Help Help  ~  Search Person Search  ~  Surname:

disclaimer - terms - copyright