Table of Contents Formatting Problem, Microsoft Word - ms-word

I am trying to achieve the TOC formatting depicted in this screenshot. Is there a way to do it neatly, right aligned, using the native Microsoft Word TOC tools? I have to use the native Microsoft tools as it is a colossal document that someone else set up, which I now need to make presentable. This is the last step in the process before it'll be ready for publishing.
TOC problem

The specific formatting that you are trying to achieve is not possible using the native Word TOC tools. This is because the TOC exists as a single field in the document and the TOC entries exist only within that field. Each entry can therefore only occupy a single paragraph.
Whilst you can edit the tab stops in the TOC paragraph styles to create more space for the heading number this will not cause the number to wrap if it is too long. What you are trying to achieve would only be possible in a table cell.
A possible solution may be to finalize the document, generate the TOC, unlink the TOC field to leave the text and create a table from the text.

Related

MS Word Table of Content Formatting

I have this Table of contents, but i am trying to update the formatting so that the numbers arent so close to the letters. the second TOC is what i am trying to get it to look like, does anyone know how to do with in MS word for PC.
Happy to provide screenshots of layouts or settings if that is helpful

How to force Fields using doc properties variables to update in LibreOffice Writer?

I need to display an adjusted version of the word count in the body of a document.
Right now it's possible to insert the total word count through Insert → Field → More Fields... (Document / Statistics / Words). The entire document will be taken into account when generating this number. This word count is a variable in its own right, WORD, which can be used in math formulas.
So to show the corrected word count I need, excluding the content from the title page etc, I created a new variable with a formula, WORD-8, where 8 is the number of words I'm ignoring. It works, but with one issue.
No matter how I insert this formula (Set Variable, Show Variable, Insert Formula), the resulting number won't update as I keep writing unless it's triggered by:
Editing the paragraph where the formula is present. Editing some other paragraph won't work.
Including the real word count (from the doc statistics tab, not as WORD) somewhere in the document. This prompts a document-wide refresh, successfully triggering the formula update.
Even saving, closing and reopening the document won't update the calculation without one of the two approachs above. Is there another automated way to keep this adjusted word count up-to-date as I write that won't visibly litter the document's body with stuff I don't need? Being forced to display the actual number is what's keeping me from just using the method 2.
Hitting F9 should force updating of fields. Note also that it may be necessary to use Ctrl+Shift+F9 to update any Input Fields in a document. See Shortcut Keys for LibreOffice Writer and Update fields (F9) not working.

How to include Dynamic image filenames in word and re-reference them

Is it possible to include filenames for images inserted into word that can be dynamically re-used throughout the document?
For example:
See word screenshot here
In the screenshot i have inserted images from PPT by exporting the PPT as Jpegs and inserted them individually into cells in a table in word. These images are then referenced throughout the instructional text in red text. If ever i delete a slide i have to go through the entire document to change the numbers appropriately. I want some sort of dynamic text to reduce my work efforts during client amends. Possible?
If you use Word's captioning tool for the Slide numbering, you can achieve the results you want by cross-referencing the captions. If you insert/delete a slide and refresh the content via Ctrl+A, F9, the cross-references will update accordingly.

How do I paste data into a table using Confluence 5.7?

I have a pile of tabular data I need to paste onto a Confluence web page. The usual mechanisms are NOT working properly for me.
What "usual mechanisms?"
Copy the data to Excel then copy / paste into Confluence.
Format the content using wiki markup, meaning:
double bars before / between / after the column header cells
single bars before / between / after the data cells
and paste that into the Wiki page.
The first option gets me a table, but it doesn't show the grid lines, and the sorting doesn't work.
The second option plops the markup into the page, but does nothing with it. If I go to the first line and hit <return> after the last bar, it turns the line into a table with a header row (since it has double-bars). If I go to the second line and hit <return> after the last bar, it creates A SEPARATE TABLE with the data in it. I can go to the first table (created from the header row), tell Confluence to add a row below, then copy the data from the second table into that second row and it will do it. But I will need to repeat that sequence for EACH ROW OF DATA.
I've just lived with in this in the past. When there's only a few rows, no biggie. But I'm trying to create a table with 200+ rows. That sequence just isn't acceptable for this amount of work.
Suggestions on how to get this working?
I went a circuitous route to accomplish this:
Made a text file with my information and tab-separated the fields
Pasted this data in to Google Sheets
Copied the cells from Google Sheets
Pasted them in to the a pre-made table in Confluence
It was still faster than writing each field manually.
To insert large tables with the second option you need to first hit Ctrl + Shift + D and then paste in the table in wiki markup form.
Wrap the table in any macros required if you know the macro name and parms. This can be a serious PITA to do after a table has been created in the Confluence 5 GUI.
Click Insert and the resulting table will be converted to the new wiki format into the page.
According to this link, I'd assume it's a bug with the version of Confluence, at least as far as the sorting goes.
Looking through the Confluence JIRA, there appear to have been several issues with copy/pasting from Excel over the development. At least there's a workaround:
Workaround:
Go to the editor again
Cut out the (unsortable) table
Paste it again
Mark the first row as Header
Save the page
-> Now the table is sortable
If that does not work, please install the The confluence source editor, then edit the page to:
Remove the row " "
Replace all "td" tag to "th" tag for the first row of the table. For example, the column name "Number" will need to change from "Number" to "Number".
My Excel has 10 K rows and some rows are with background color. To maintain the Cell background color I followed this steps
Saved the Excel File as HTML File
Open the HTML code, Copy the Complete TABLE (HTML CODE)
In Confluence page Insert HTML Macro
Insert your codes and see the cell color will maintain.

iTextSharp - finding end of page

Is there any way to find the current page is going to end in iTextSharp. For example,
say there are some 10 records which needs two pages to be written down at the end of the first page i wish to add '(contd on nex page'). IS there a way to do this. Will finding the end of page be an answer for this or is there a way to find the line number on which writing is done, so that i can make a calculation to decide whether to add a message of my choice and proceed to the next page.
any advise is much appreciated :)
Thanks a zillion
Usually, this is done by defining a footer for the table. When the table breaks automatically, iText will show that footer. Of course: you don't want this footer to show up on the last page (after the final row of the table). That's why there's also a method to skip the last row.
This example shows you how to create a table with headers and footers. This is the link to SkipLastFooter.
Note that saying that "finding the line number" would solve your problem is wrong for two reasons:
There is no such thing as a line number in a PDF file. You have a MediaBox and you draw content on the canvas defined by the MediaBox using coordinates.
There's a way to get the current Y-position on a page after adding an object to a document. You can get the Y-position before adding a table and after adding a table, but not while you're still creating the table.
An alternative solution to the one I suggested above, woult be to use table events.
If you really need to find the end of the page, and are not using a table with a footer row that will be printed at the end of each page, you can use the PdfWriter object as follows:
var remainingPageSpace = pdfWriter.GetVerticalPosition(false) - pdfDocument.BottomMargin;
This will give you the remaining space on the page, from which you can determine what you want to do next.
If you are using tabular data however, it is much preferred to use a PdfPTable and take advantage of the footer row feature.