Module "Cleanup routines"

August 15, 2022


Cleanup routines are a complex of operations to make your document look professional and coherent with just one click. In cases where many contributors work on the draft and no specific rules are set for the formatting, cleanup rules come in handy. It is effortless to convert the wrong quotes to the standard quotes to avoid inconsistency if set by different users, delete page breaks throughout the whole document, etc.

The functionality includes an individually set number of predefined cleanup routines that can be run separately or all at once throughout the whole document incl tables. Please note that routines inapplicable in tables will be automatically skipped.

In SMASHDOCs cleanup routines can be applied in two cases:

1.Before importing the WORD file

2.In the existent SMASHDOC

2Required right for performing cleanup routines

To be able to perform the function "Cleanup routines" user should get the required permission. This permission can be enabled/disabled during inviting user on the document and also in user management during the work on the document.

The right "Cleanup routines" in user management highlighted

If permission is disabled, “Cleanup routines” option in the document is not available for this user.

3The list of applicable cleanup routines

In the document such cleanup routines can be applied:

Remove all blank lines

Delete unnecessary spaces

Convert (wrong) quotes (single+double) to French (single+double) quotes

German („“; ‚‘)

English (“”; ‘’)

French («»; ‹›)

Swiss (»«; ›‹)

Change image numbering



Change table numbering



Change formula numbering



Delete page breaks

Delete empty lines after headlines

Delete empty lines before headlines

Insert fixed values

Remove hyperlinks

Three points in ellipse

Delete all spaces at the beginning of a paragraph

Delete all spaces at the end of a paragraph

Hyphens in dashes

French punctuation

Convert manual counting in headings to automatic counting

Replace multiple consecutive blank lines with one blank line

Change XRefs content/caption



Remove landscapes

Remove portrait

Convert uppercase to lowercase

Delete inline tabs (note: this routine will function correctly only after running firstly the routine "Delete unnecessary spaces")

Convert uppercase to lowercase

Delete manual numbering from images

Delete manual numbering from tables

Delete hardcoded prefixes in headings and lists

Highlight placeholders

Insert six-per-em-space

All cleanup routines can be configured in the system according to the customer specifications.

4How each clean-up routine works

To apply cleanup routines in the existent SMASHDOC, go to the Tab "Search" and choose the "Cleanup routines". After selecting several or all routines, click on the "Run" button for the chosen actions be executed in the document.

Cleanup routines under the "Search" tab highlighted

Let`s have a closer look at certain cleanup routines and the difference they make in the document's layout.

4.1Remove all blank lines

If there are spare lines between the components in the document, they can be quickly deleted by running the routine "Remove all blank lines".

The outlook of a document before applying the routine "Delete all blank lines":

The outlook after using the routine "Remove all blank lines":

4.2Delete unnecessary spaces

In case you have accidentally added multiple spaces in a component, run the routine "Delete unnecessary spaces" - and there will remain only one required space between the words.

As it was:

As it became:

4.3Convert (wrong) quotes (single + double) to French (single + double) quotes

There is also an opportunity to convert quotes with the help of clean-up routines. There are four types of quotes which can replace existing quotes in the document:

German („“; ‚‘)

English (“”; ‘’)

French («»; ‹›)

Swiss (»«; ›‹)

Select any of suggested quotes that must be displayed in your document and click "Run". After that, all quotes will be converted into selected ones.

As it was:

As it became:

4.4Change image / table / formula numbering

By applying this routine you can switch on/off numbering of your images, tables and equations. If there isn't any numbering under these objects in the document, but you need to add it, activate "On" in these routines and after running the clean-up routine, numbering will appear in the document. In case you need to remove the numbering - choose "Off" before running the routine.

Activated numbering

Removed numbering

Note: if there is a caption under image/table/formula, it will not be removed by the routine.

4.5Delete page breaks

Removing page breaks is also possible via the corresponding clean-up routine.

As it was before running the routine:

As it became after routine was applied:

4.6Delete empty line(s) after/before headlines

In case you have accidentally added multiple empty lines before or after headings, you can easily remove them with the help of these routines.

Before applying the routine:

After applying the routine:

4.7Insert fixed values

The routine "Insert fixed values" inserts spaces between the particular elements in text. The corresponding elements, as well as types of spaces that are added after applying the routine are listed below:

distance between single and double quotes (« ‹; » ›) - space 1/12

space inside contracted forms (s. o., u. a.) - space 1/8

space after abbreviated forms (Dr.; Prof.) - space 1/6

before the abbreviation/mass units (mm; cm) - space 1/6

between numbers and currency symbols (12$) - space 1/4

inside the numbered date (7.12.12) - space 1/8

inside the date with the outlook "number+word" (7. January) - space 1/6

elements with semicolon (12:23; 2:1) - space 1/12 before and after

genealogical marks (* 23.6.1887) - space 1/8

As it was:

As it became after applying the routine:

4.8Remove hyperlinks

The option to remove hyperlinks from the points in the document is available through clean-up routines, as well. After activating and running this routine the required point will be displayed as a usual text, without a hyperlink.

As it was before:

As it became afterwards:

4.9Three points in ellipse

With this routine you can add a 1/12-space before ellipsis.

As it has been before:

As it is after applying routine:

4.10Delete all spaces at the beginning of a paragraph / Delete all spaces at the end of a paragraph

With the help of these routines you can remove all blank spaces at the beginning or at the end of each component.

The outlook of a document before applying the routine "Delete all spaces at the beginning of a paragraph":

The outlook of a document after applying this clean-up routine:

The stand before and the result after running the routine "Delete all spaces at the end of a paragraph" is clearly displayed in the component history of a corresponding paragraph.

Note: the routines "Delete all spaces at the beginning of a paragraph" and "Delete all spaces at the end of a paragraph" work with both standard and non-printing spaces.

4.11Hyphens in dashes

When you place a hyphen between two words and add a space before and after this hyphen, by applying the routine "Hyphens in dashes" you can change a hyphen into a dash sign.

The outlook of a hyphen (intended as a dash) before running the routine:

The outlook of a correct dash after running the routine:

4.12French punctuation

This routine adds a 1/6-space between a word and such punctuation marks as:

question mark,

exclamation mark,



double quotes.

Before running the routine:

Result of running the routine:

4.13Convert manual counting in headings to automatic counting

This routine is useful, in case a user has typed number and a word and then transformed this combination to Heading 1.

After applying the routine manual counting of headings will be transformed into automatic counting - instead of Heading 1 there will be applied Heading - num 1.

4.14Replace multiple consecutive blank lines with one blank line

In case you have accidentally added several blank lines one by one, but need only one blank line, you can change this situation with the help of routine "Replace multiple consecutive blank lines with one blank line".

Before the routine has been applied:

After applying the routine:

4.15Change xrefs content/caption

If cross-references have an outlook of numbering in the document, activating this routine with ticking "On" will add caption or content to this outlook, as well. When you activate this routine again and tick "Off", caption/content will disappear and numbering will remain.

The outlook of cross-references before running the routine:

The outlook of cross-references after running the routine:

4.16Change xrefs numbering

In case cross-references look like caption or content in the document, activating this routine with the marked point "On" will also add numbering to this outlook. The marked point "Off" will take numbering away and leave only caption/content.

As it was before applying the routine:

The result of applying the routine:

4.17Remove landscape

If some components have been changed to landscape format, applying this routine will remove this format.

Before running the routine:

After running the routine:

4.18Remove portrait

The routine "Remove portrait" works the same way as the previously described routine "Remove landscape". This routine removes portrait formats at the points where this format has been set.

Before applying the routine:

After applying the routine:

4.19Convert uppercase to lowercase

There is one more option among clean-up routines - to substitute uppercase letters to lowercase ones. In case you have accidentally activated CapsLock on your keyboard during the editing a document, you can change uppercase letters that appeared in the middle or at the end of a word. The first uppercase letter in the word will not be converted.

4.20Delete manual numbering from images/tables

This routine is helpful during the Word import, in case in Word document user has inserted numbering under an image or table manually. Cleanup routines "Delete manual numbering from images" and "Delete numbering from tables" replace such manual entries as Tab. 1, Fig. 2 with automatic numbering.

4.21Delete hardcoded prefixes in headings and lists

The cleanup routine "Delete hardcoded prefixes in headings and lists" is required for deleting all manually created prefix entries in headings, ordered and unordered lists. For instance, if a prefix (A) has been added in the document manually, not through the automatic numbering, by running this routine the prefix will be removed.

Before running the routine

After running the routine

The routine works with any numbering pattern, incl. bullets and other list items.

4.22Highlight placeholders

If there are more than one space in direct sequence, spaces starting from second space (space, non-breaking-space, 1/1-space, 1/2-space, 1/4-space, 1/8-space, 1/12-space) will be highlighted with the inline style "Highlighting" after running the routine. The sign [●] will be marked with the same inline style by this routine, as well.

Result after running the routine

4.23Insert six-per-em-space

With the help of this routine you can quickly insert six-per-em-space at the points in the document where such a type of space is required. The list of cases for applying a six-per-em-space is the following:


before: z.B. or z. B.

after: z. B.


before: d.h. or d. h. or D.h.or D. h.

after: d. h. or D. h.


before: u.a. or u. a.

after: u. a.

i.d.R/i. d.R.


et al.


AP x.x (can be any number with and without a dot: 2 or 3.1)

before: AP 1 or AP1 or AP 1.1or AP1.1

after: AP 1 or AP 1.1

SFB/Transregio 150

before: SFB/Transregio 150

after: SFB/Transregio 150


°C, %, K, nm, mm, cm, µm, m,kg, bar, mbar, mol, s, m/s, cSt, Hz, kHz, U/min, 1/s, J etc.

Note: in case during running any routine an error happens and execution of routines stops, you will get an error modal window with the button "Reload" and with the following notification: “An error occurred while running routines. Please reload the page.” In this case you have to reload the page and try once again or contact our Support Team.