I am trying to improve the format of my Journal posts, using the very welcome code just released for “Table”. After an hour or two of experimentation I managed to make one table work, but have not been able to repeat that in other parts of the post or other Journal pages.
I have tried adding “cells” and lines and spaces everywhere, but can’t figure out what’s needed. eg this
i think, really, you’re trying to use a table format to represent 2 lists of the same items for 2 different time periods. you can do this, but i don’t think it’s really the most efficient way to do this.
EDIT: the text alignment / justification seems to work only in this Forum’s implementation of extended markdown. the main site’s implementation of extended markdown doesn’t seem to handle it.
You have addressed two issues here, the one of how to present the data, and the other of how to produce the table format. I won’t be changing the data presented there a year ago, into which I great deal of thought went at the time I see you have just moved the data into the format of the spreadhseet it came from, which is indeed much more efficient but I couldn’t do it in Journal posts before we had tables.
But why are my very simple tables not working at all?
I had understood, from the instructions in one of two different guides for the use of this new code, that a minimum of 3 hyphens were needed. It is vital to use the correct format from the start, as otherwise things that happen to work now will fail later, and publications will be destroyed. So I will need to know that I am learning the correct, authorised way to do this. @tiwane can you clarify this for me?
I will work with what you’ve given me …I love the possibilities with those colons! Is it officially supported?..and report back
the hyphen just defines the split between the header row of the table and the body of the table that contains the actual data. you only need one hyphen per column that you’re trying to represent. you define the columns by using the pipes. so a table with 2 columns needs 3 pipes in each row and 2 hyphens in the separator row.
Why do the “rules” say a minimum of three hyphens are needed? And why is my attempt not working?
And is it possible to make the line under a cell invisible, so eg two side by side photos can be captioned underneath, and the line put under that, clarifying the caoption belongs to the photo above the caption not the one below??
I was afraid you’d ask that. It will take me time to find them. there is a post on the iNat feed that mostly talks about the “Agree” button change, but includes the new Markdown codes. And there is a thread, on the New and Updates forum I think, about the Markdown codes. Rather than struggle through browser history now, as I already have a lot of tabs open trying to tidy up a current report, I would rather wait for @tiwane’s advice as to the authorised source of the correct code, then I can bookmark that and refer to it for perpetuity:)
ok, I have found the solution to the example of failure I gave in my first post above: I had only one column in the top (Header) row, and that limited all rows below to one cell.
Of course that was what I had wanted to do for 2 years, but didn’t know how, and because I was not succeeding with the 2 cell table I couldn’t be sure a 3 cell one was even possible. With your example I was encouraged to persevere:)
Thanks pisum. I will still wait for @tiwane’s advice, as I already have many hours of work to do to correct previously-acceptable but apparently unofficial use of code in iNat that no longer works or may no longer work with future web development.
you’d have to do this with html. it’s possible to do in iNat journal posts, but the html tables don’t seem to play nicely with markdown tables in the journal. so you’d have to choose either markdown or html in a given post, i think.
I’d recommend not writing Markdown tables manually. Instead, I use a website called “Tables Generator” that allows you to either (A) create a table through inputting data into cells in a WYSIWYG fashion or (B) copy and paste spreadsheet data straight into it. After that, click on the “Generate” and the markdown code is provided for you to copy and paste. Here’s the link: https://www.tablesgenerator.com/markdown_tables
if you have a small, simple table in a spreadsheet that you want to translate into markdown, you could also just copy it into a post here in the forum. here’s how the forum translates a table:
today
yesterday
the day before
1
2
4
5
65
3
5
6
7
|today|yesterday|the day before|
|---|---|---|
|1|2|4|
|5|65|3|
|5|6|7|
Thanks murphyslab, I’ll look at that when I have time. But are you sure that method meets the iNat code and will always work? That is really important, I have found.
so how would that then get into my journal posts? It wouldn’t be appropriate to redirect my readers - few but formal and not iNat members - to the Forum.
yes, when you paste the code into the forum, you don’t need to actually save the forum post. just copy the markdown that the forum generates, and paste it into the main site. you can simply discard the forum post draft afterward.