Skip to main content

Custom styling

Alina avatar
Written by Alina
Updated today

LawVu Draft is layout-aware. It analyses the styles used in the currently open Word document and automatically adapts inserted clauses to match that layout, without requiring any manual styling.

In this article:

  • Why use custom styles

  • How custom styles work

  • LawVu Draft layout structure

  • Template detection


Why use custom styles?

In around 80% of cases, this automatic styling works well and no additional configuration is needed. For most users, you can safely skip the rest of this section.

However, custom styling becomes useful when:

  • Documents have inconsistent or poor underlying Word styles

  • Your organisation uses strict or complex house styles

  • You rely on bespoke templates that require precise formatting

In these cases, you can configure custom styles in LawVu Draft. These override automatic styling and ensure consistently correct results when inserting clauses into documents that follow your house style.

Advanced configuration (expert territory)

Configuring custom styles is not conceptually difficult, but it does require a solid understanding of Microsoft Word styles and templates.

We strongly recommend involving:

  • Your organisation’s Word or document automation expert, or

  • External support if needed

LawVu also offers Word training and consultancy services if required.


How custom styles work

Your house style is implemented by mapping LawVu Draft's internal layout structure to your Word styles. This mapping is called a style scheme. You can even store multiple style schemes, e.g. one for contracts, a separate one for legal briefs and yet another one for formal letters.

Optionally, you can add template detection rules so LawVu Draft automatically selects the correct style scheme when a matching Word template is opened.

Once configured:

  • Style schemes are automatically distributed to all users in your organisation

  • They are stored locally in Word and applied automatically when a match is detected

Where to find style settings

Go to Settings → Styles.

Only administrators can create or edit custom styles.

Once configured, styles are applied automatically when:

  • A matching template is detected

  • Clauses are inserted via features such as Truffle Hunt

LawVu Draft layout structure

LawVu Draft uses a flexible, multi-level layout model that can be mapped to most house styles. Essentially, the LawVu Draft layout structure is subdivided into nine different levels.

On each level, you can encounter a title style (typically bold and/or coloured), a heading style and up to nine different body styles. Each title and heading can have a number, while each body paragraph can optionally have a bullet. Finally, there is also a separate style for the title of the (sub)document itself.

LawVu Draft's Word style structure thus look as follows:

Example:

Heading pane

In the Headings pane, you map LawVu Draft's heading and title levels to your Word styles.

You can:

  • Add levels using + Add level

  • Remove the last level using the trash icon

  • Configure additional options per level via the menu

Key options

  • Only titles on the first level - Use this if your house style does not allow plain headings at the top level.

  • Separate title styles - You can assign different Word styles for headings and heading titles.

  • Custom body styles per level - Assign specific Word styles to body paragraphs under certain headings.

If no level-specific body styles are defined, LawVu Draft falls back to the general body styles defined in the Body text pane.

Body text pane

This pane defines which Word styles are applied to body paragraphs.

It contains three sections:

  • Below headings – default body styles

  • Outside any heading – top-level body text

  • In table – body text inside tables

For each section, you can optionally assign separate styles for:

  • Bulleted paragraphs

  • Non-bulleted paragraphs

If no bullet-specific style is defined, the same style is used for both.

Document title pane

Here you define the Word style used for document or sub-document titles.


Template detection pane

Once a style scheme is configured, you can optionally add one or more detectors. Detectors allow LawVu Draft to automatically apply the correct style scheme when a matching Word template is opened.

Template detection is optional, but when configured correctly, it ensures the right style scheme is applied automatically - saving users from selecting styles manually and improving consistency across documents.

How detectors work

  • A style scheme can have multiple detectors

  • Detectors are evaluated in the order they are listed

  • As soon as one detector matches, the style scheme is applied

  • If multiple style schemes exist, LawVu Draft checks them alphabetically by style scheme name

Detectors rely on DOCX file metadata - the information stored in a Word document’s Properties.

Choosing the metadata field

In the first dropdown, select which metadata field should be checked.

  • Standard fields correspond to the Summary tab in Word’s Properties dialog (for example, Title or Subject)

  • The Custom option refers to fields in the Custom tab of the same dialog

Although Word supports multiple data types (text, date, number, yes/no), LawVu Draft currently supports text-based fields only.

Defining the match type

In the second dropdown, you specify how the metadata value should be recognised.

Text (exact match)

The value you enter must match the entire contents of the metadata field.

For example, if you enter Alpha Beta as the expected value for the Subject field:

  • A document with metadata Alpha Beta will match

  • A document with metadata Alpha Beta Gamma will not match

  • A document with metadata XXX Alpha Beta will not match

Leading and trailing spaces, as well as capitalisation, are ignored.

Partial text

The value you enter must appear somewhere within the metadata field.

For example, if you enter Alpha:

  • Alpha Beta Gamma will match

  • xxAlphayy will match

Regex and partial regex

With regex and partial regex, matching is based on regular expressions rather than literal text.

Regular expressions allow you to define advanced matching rules, such as:

  • Text that starts with a specific character

  • Text followed by a certain number of letters

  • Text that must not be followed by a number or a slash

  • Text that ends with a specific pattern

Regular expressions are written in a standard mini-language that describes what a piece of text should look like. LawVu Draft uses JavaScript-style regular expressions.

If you are not familiar with regex, tools like regex101.com and regexone.com are useful for learning and testing patterns before applying them in LawVu Draft.

Did this answer your question?