Tables are hard to work with

I have a table with 20 rows. Set it up correctly with formatting, tab locations, fonts, background, etc.

To save myself from rebuilding that every time, I’ve been copying the table and pasting it into other sections, then I can just edit the cell values for the new location and I’m off to the races.

I struggle though with seemingly simple things like dropping unnecessary rows or adding new rows.

If I highlight the last 5 rows and choose “cut” or “delete”, the content goes but the rows remain. I can’t seem to whack them for the life of me. I end up having to use that table popup window to manually edit the number of rows to 15 and then those last 5 will be gone.

If I do that before clearing the content, the content remains in the section and I have to delete it manually. Not a problem, per se, but breaks the idea of “delete the last 5 rows” which I would assume includes the data.

Adding rows is also painful. Sometimes if I’m in the bottom left cell and tab out, I’ll get a new row and be in column 1, but other times I just end up jumping out of the table. Then I have to go to the table popup window to again edit the number of rows to add some in.

Cut n paste of rows is just broken.

Sorry, I’m just frustrated. I’m writing a technical book with lots of code examples. Best way to format code that I’ve found is to use a table with no borders, light grey background , 2 columns (one for line number, one for code), then each line of code in one cell. Number of rows will match the number of lines of code in the example.

When compiling with preserved formatting, it just works great and looks like I want in the output, line-numbered code that in electronic forms should allow reader to copy n paste somewhere else.

But with so many tables in play, the poor table editing controls is hampering my progress.

Any suggestions or help with table manipulation will be greatly appreciated…

Yep. Scrivener uses Apple’s RTF editor, which can’t match how well Microsoft Word (and perhaps other tools I don’t know about) handles tables.

Tables are very complicated.

For my Scrivener projects that require more than just a very simple table, I use Excel or Numbers to construct the table. then screen shot the image and put the PNG into the Scrivener document.

Normally I put the PNG table into the text where they go so that I can see them when editing. Or if its a table that will be re-used in other parts of the project, I put the PNGs into a subfolder called “Research/Figs” and link to them.

I put the Excel and Numbers source files into a subfolder called “Research/Source” so they stay as part of the writing project.

With this approach my time is spent with the table and document content/structure and I don’t do any messing with Apple’s way of handling tables in their editor. Writing is already hard word. Why make it harder?

I do the same thing as the previous respondent: I build all my tables and diagrams in other software, then drop a PNG file into my Scrivener manuscript. This works pretty well but has two drawbacks. First, if you are creating an ebook, the table text will not be searchable, And second, if you have lots of tables and diagrams, you’ll want to compress the PNG files, Otherwise, your ePub file will be huge.

So right now I’ve settled on using Sublime for the code with the addition of Sublime Highlighter.

I’ve enabled the copying of line numbers, so I put code in Sublime (choose the language if necessary), select all and then right-click in the selected text and use Copy as RTF.

I have trouble pasting this directly into Scrivener, but if I copy into Word first, then copy that, I can then paste into Scrivener.

It doesn’t retain the complete look from the theme in Sublime, but it retains enough so it will work for my needs.