Skip to content
beprintlearn – Home

Advanced course: print templates · Stage 1 · LP code

Rules in the box content

Your card reacts to what the buyer types: text gets smaller, lines break in the right place, and labels only appear where there is something to label.

To check off at your desk. You'll find each video at the address next to its step.

Back to the learning path

  1. Step 1: Overview: what rules in a print template can do

    Video 1:30 min · Practice approx. 5 min · learn.beprint.app/en/folge/15-regeln-showreel

    • Open your business card as your test buyer and note which rules from the video it is missing: name too long, empty line, label without a number, address, image.

    How you can tell it works: You have a list of the rules you want to add to your card in this course.

  2. Step 2: Percentage rule: smaller font for long names

    Video 1:19 min · Practice approx. 15 min · learn.beprint.app/en/folge/langer-name-kleinere-schrift

    • In the layouter, select the box Name and open “Inhalt bearbeiten” (edit content).
    • At the very beginning, before the fields, add the percentage rule: [#:95:<fontsize=8.5>:Vorname:Nachname] – with the font size that fits your card.
    • Either the box must have room for a second line, or the longest name must fit at the smaller size: the rule switches exactly one size.

    How you can tell it works: As your test buyer, type the longest name you can think of: it gets one size smaller and appears in full on the card.

  3. Step 3: Showing a label only when the field is filled

    Video 1:27 min · Practice approx. 20 min · learn.beprint.app/en/folge/telefon-nur-mit-nummer

    • Create a helper field LabelTelefon, hide it in the Special Field Options and enter “Telefon: ” as its default text.
    • In the box Kontakt, tie the label to a rule: [Telefon:{LabelTelefon}].
    • Only add the divider when both numbers are there: [&Telefon&Mobil: | ].
    • Don’t write a colon as text inside the rule – a second colon empties the whole box without a message.

    How you can tell it works: As your test buyer, leave Mobil empty: the card only shows the phone number, with no divider and no empty label. And the other way around.

  4. Step 4: Percentage rule: line break only for long text

    Video 1:18 min · Practice approx. 15 min · learn.beprint.app/en/folge/umbruch-erst-wenn-zu-lang

    • In the address box, put the percentage rule exactly where the line break should go – after the comma, before the city: [#:85:<LF>:Strasse:Ort].
    • Plan the box with one spare line: the rule breaks a little before the edge.

    How you can tell it works: As your test buyer, a short address stays on one line, a long one breaks after the comma – not in the middle of the city name.

  5. Step 5: Font size and color right in the box content

    Video 1:33 min · Practice approx. 15 min · learn.beprint.app/en/folge/inline-formatierung

    • In the box content, set the font size before a variable, for example <fontsize=80>{Preis}. A second tag after it sets a different size for what follows.
    • For a color, use the tag <cmyk (C M Y K)> with values from 0 to 1, for example <cmyk (0 0 0 1)> for black. It only colors from the line it is in.
    • You set the base color of the whole box in the layouter on the box, not in the box content – everything before the tag, such as the headline, takes the base color.

    How you can tell it works: As your test buyer, create the preview: the word appears in the new size or color, and the lines before it keep the box’s base color.

  6. Step 6: Tabs: aligning values

    Video 1:23 min · Practice approx. 15 min · learn.beprint.app/en/folge/tabulatoren-im-boxinhalt

    • In the box Kontakt, put a tab stop in points at the start of the first text line, for example <tab (42.52)>Telefon<T>{Telefon}. Points = mm × 72 / 25.4, with a decimal point. The stop applies to all lines in the box.
    • In each line, put <T> between label and value – <T> jumps to the stop.
    • Place the stop after the longest label: if the label is wider than the distance to the stop, <T> doesn’t jump, and the value sticks to the label.
    • Don’t put <tab> on a line of its own – it pushes the text down one line.

    How you can tell it works: As your test buyer, create the preview: phone, fax and email line up neatly, and the first line starts at the top of the box.

Stage 1

Fix-it task

Three things on your test card: the address breaks in the middle of “Hamburg-/Wandsbek”. Since you wrote “Telefon: ” directly into the rule, the whole box Kontakt is empty – with no error message. And in another box, the number sticks to the label: “Telefon+49”.

What is behind each one, and how do you fix it?

Your notes
Show solution
  1. The line break has no rule. Without a rule, the line breaks where the space runs out. A percentage rule like [#:85:<LF>:Strasse:Ort] after the comma puts the break where it belongs.
  2. A second colon breaks the rule. If the label with its colon is written as text inside the brackets, the rule has a second colon – and the whole box stays empty. That’s why the label comes from a hidden helper field with a default text.
  3. The tab stop is before the end of the label. If “Telefon” is wider than the distance to the stop, <T> doesn’t jump. Put the stop after the longest label.