RolePlay onLine RPoL Logo

, welcome to Technical Discussions

06:15, 24th April 2024 (GMT+0)

Working with tables.

Posted by Piestar
Piestar
member, 664 posts
once upon a time...
...there was a little pie
Thu 14 Apr 2016
at 14:01
  • msg #1

Working with tables

One of the things I have trouble with, while working on tables, is that they look so good when used for information, but are monstrously confusing when trying to actually work on them.

While the optimal solution would be for them to look like tables while doing the data enter, I'm pretty sure that's not on the table.

I was wondering if there was, or if it might be worth considering having a code that would put a line in the editing field, but which does not show up when the table is being viewed.

For example <null>************************************************</null>

Akin to the old readme lines in the basic I learned in 1977...

Any thoughts?
swordchucks
member, 1172 posts
Thu 14 Apr 2016
at 14:18
  • msg #2

Working with tables

Are you using EasyTables?  Because they pretty much look like tables when you're using them.
Piestar
member, 665 posts
once upon a time...
...there was a little pie
Thu 14 Apr 2016
at 14:25
  • msg #3

Working with tables

Well crap, I don't even know. I'm guessing not, as it looks like tr /tr td /td and such.

I guess I will look for easy tables in the FAQ?
Tyr Hawk
member, 169 posts
You know that one guy?
Yeah, that's me.
Thu 14 Apr 2016
at 14:43
  • msg #4

Working with tables

In reply to Piestar (msg # 3):

Easy tables are super simple, here's an example! =D

Table Heading
Column Heading 1Column Heading 2
Hi thereHello
DoomNot Doom

Which looks like this for coding:

|2! Table Heading|
|!Column Heading 1|! Column Heading 2|
|^ Hi there|^ Hello|
|^ Doom|^ Not Doom|


The ! is used to make titles (auto bold, center, and gray fill), numbers at the beginning will change the column width (2, in the example, meaning that cell stretches over 2 columns), the ^ centers. You can also use color and (I believe) all other types of formatting. There's probably also some other special codes you can use that I don't know about, but those are the ones I've found. It sometimes looks a bit off, but the more of your information with the same spacing, the better it looks. ;D No idea if this stuff is in the FAQ, but I like examples.
Piestar
member, 666 posts
once upon a time...
...there was a little pie
Thu 14 Apr 2016
at 14:46
  • msg #5

Working with tables

That did not help. I have images and such in my tables, they are deeper than one line per box. No clue how to enter multiple lines of text in a box in the easy table.
swordchucks
member, 1173 posts
Thu 14 Apr 2016
at 14:53
  • msg #6

Working with tables

An easy table works mostly fine with that.  Use \n to put in line breaks if you need to force it or just allow it to wrap.

This is aTable
Where there
are multiple
lines of text.
And here is a
  • list
  • of
  • things
Or you can just have a super long sentence that is likely to wrap around and that will automatically wrap back on itself eventually when it reaches the end of your screen, but screen sizes do vary so making a point out of this sentence requires a super long run-on that would make an English teacher cry and/or commit homicide upon my person. Or I could have just used multiple sentences... oh, well.

|!! This is a | Table |
| Where there\nare multiple\nlines of text. | And here is a [list][*]list [*]of [*]things[/list] |
|2 Or you can just have a super long sentence that is likely to wrap around and that will automatically wrap back on itself eventually when it reaches the end of your screen, but screen sizes do vary so making a point out of this sentence requires a super long run-on that would make an English teacher cry and/or commit homicide upon my person. Or I could have just used multiple sentences... oh, well. |

Not the prettiest thing in the world, but it does work and it is at least better than using the old method.
otghand
member, 392 posts
Thu 14 Apr 2016
at 14:55
  • msg #7

Working with tables

That is indeed better, but in no way approaches wysiwyg tables.  The goal for me would be to be able to build the table, then fill in the data.  That is a more complex problem though.
Piestar
member, 667 posts
once upon a time...
...there was a little pie
Thu 14 Apr 2016
at 15:28
  • msg #8

Working with tables

Wow, absolutely no help at all, wow. Sigh... thanks anyway.
Tyr Hawk
member, 170 posts
You know that one guy?
Yeah, that's me.
Thu 14 Apr 2016
at 15:39
  • msg #9

Working with tables

In reply to swordchucks (msg # 6):

Well, at least I learned something new from this. ^_^ Thank you, swordchucks, I had no idea about the \n thing. Very useful to me.
swordchucks
member, 1174 posts
Thu 14 Apr 2016
at 15:58
  • msg #10

Working with tables

If you're really pushing the fringe on tables, the easiest thing to do is probably use a spreadsheet program to lay everything out and then leverage concatenation functions to build the tables from that.  I've done it with complex skill lists several times and it works well for that.
Piestar
member, 668 posts
once upon a time...
...there was a little pie
Thu 14 Apr 2016
at 17:43
  • msg #11

Working with tables

So back to be initial question/request, is there or could there be anything akin to a line of readme code to allow me to find my way around the page?
bigbadron
moderator, 15052 posts
He's big, he's bad,
but mostly he's Ron.
Thu 14 Apr 2016
at 18:17

Working with tables

If you hit the Preview button every so often, you can see how your table looks, then edit anything that looks wrong.  That's how I tend to do it.

And to answer your question: No there is nothing like that (and adding it would still require you to hit the Preview button every so often to see how the table looks, then edit anything that looks wrong).
This message was last edited by the user at 18:18, Thu 14 Apr 2016.
nauthiz
member, 448 posts
Thu 14 Apr 2016
at 20:42
  • msg #13

Working with tables

Alternatively, you could just use a WYSIWYG html editor then copy and paste the code for your table into rpol.  The basic tags are the same.
Skald
moderator, 688 posts
Whatever it is,
I'm against it
Fri 15 Apr 2016
at 13:40
  • msg #14

Working with tables

If you want to work with a Word table and then convert it to the required format, AND you're happy to mess about with VBA macros, the following code will handle the VERY basics (for starters it'd need additional code to process the cell text to detect bold and italics and <gulp> colours etc etc etc and apply appropriate tags) and inserts the results at the end of the document.

Sub TableToRuBB()
Dim vRow As Integer
Dim vColumn As Integer
Selection.GoTo wdGoToBookmark, Name:="\EndOfDoc"
Selection.TypeText vbCrLf & "<table>" & vbCrLf
With ActiveDocument.Tables(1)
    For vRow = 1 To .Rows.Count
        Selection.TypeText "<tr>"
        For vColumn = 1 To .Columns.Count
            Selection.TypeText "<td>" & Left(.Cell(vRow, vColumn).Range.Text, Len(.Cell(vRow, vColumn).Range.Text) - 2) & "</td>"
        Next vColumn
        Selection.TypeText "</tr>" & vbCrLf
    Next vRow
End With
Selection.TypeText "</table>"
End Sub
Skald
moderator, 689 posts
Whatever it is,
I'm against it
Fri 15 Apr 2016
at 14:22
  • msg #15

Working with tables

Interestingly, you can put a private line in the middle of a table and it's ignored, which is kinda what Piestar was after originally.  Just need to address it to yourself, so Private to GM  :>

<table>
<tr><td>A</td><td>B</td><td>C</td></tr>
[Private to Admin: NOTE HERE]
<tr><td>D</td><td>E</td><td>F</td></tr>
<tr><td>G</td><td>H</td><td>I</td></tr>
</table>

ABC
DEF
GHI

Piestar
member, 669 posts
once upon a time...
...there was a little pie
Fri 15 Apr 2016
at 16:41
  • msg #16

Working with tables

Genius, that's exactly what I wanted! Thank you Skald!
Sign In