Skip to content

Commit

Permalink
resolves #555 clarify how to preserve numbers with 3 or more digits
Browse files Browse the repository at this point in the history
- document that numbers with 3 or more digits my be confused as a color by preprocessor
- for example, 100 is interpreted as '100' (or #110000)
- solutions are proposed
  • Loading branch information
mojavelinux committed Sep 14, 2016
1 parent 3658bcf commit ff41a2e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/theming-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,9 @@ base:

Several of the keys require a value in points (pt), the unit of measure for the PDF canvas.
A point is defined as 1/72 of an inch.
However, us humans like to think in real world units like inches (in), centimeters (cm) or millimeters (mm).
If you specify a number without any units, the units defaults to pt.

However, us humans like to think in real world units like inches (in), centimeters (cm), or millimeters (mm).
You can let the theme do this conversion for you automatically by adding a unit notation next to any number.

The following units are supported:
Expand All @@ -356,9 +358,12 @@ The following units are supported:
|mm

|Points
|pt
|pt (default)
|===

IMPORTANT: Numbers with more than two digits should be written as a float (e.g., 100.0), a math expression (e.g, 1 * 100), or with a unit (e.g., 100pt).
Otherwise, the value may be misinterpreted as a hex color (e.g., '100') and could cause the converter to crash.

Here's an example of how you can use inches to define the page margins:

[source,yaml]
Expand Down

0 comments on commit ff41a2e

Please sign in to comment.