Book a Demo

Author Topic: Template editor: editing Diagram Label style  (Read 3595 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Template editor: editing Diagram Label style
« on: May 13, 2020, 07:49:58 pm »
Hi all,


I've got a very simple template which outputs a diagram image and the diagram's name as a caption, using the Diagram Label style.
This is shown in the editor as
package >
diagram>

{Diagram.DiagramImg}
                                                                               Figure 1: {Diagram.Name}
< diagram
< package


The text "Figure 1: " is not editable. The number 1 is replaced as appropriate in the generated document.

I want to change the caption alignment from adjusted to left-aligned so it doesn't look completely stupid when the diagram is very small. This is proving difficult.

If I mark the text and switch the alignment, EA changes the style to Normal, removes the "Figure 1: " part, changes the font size and left-aligns.

If I edit the style and do the same thing, EA retains the style and font size and left-aligns the text, but still removes the "Figure 1: ".

What am I supposed to do to get a left-aligned diagram label?


/Uffe
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Template editor: editing Diagram Label style
« Reply #1 on: May 13, 2020, 08:51:28 pm »
It feels like you have an issue with your template and it got corrupted somehow.
My templates have this for diagrams

diagram >
{Diagram.DiagramImg}
Figure {Diagram.Figure}: {Diagram.Name}
< diagram

The "Figure" part I can edit and translate however I want.
In your case I would edit the style in the stylesheet to be left aligned.
If this is only needed for one specific template I would create a new style for left aligned diagram captions.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Template editor: editing Diagram Label style
« Reply #2 on: May 13, 2020, 10:28:19 pm »
I don't think the template is corrupt. It's what EA gives me with a very few simple clicks.

I haven't added "Figure {Diagram.Figure}". I'm not using the Diagram.Figure field.
The "Figure 1: " in my template is placed there by EA. And removed when asked to left-align, because it changes the style to Normal.

Funnily enough, if you change the alignment to any of the other three, the style is retained. So it appears that what's broken is that EA interprets the editor command "set alignment Left" as "set alignment Left and also change style to Normal because only text in Normal could ever be left-aligned, obviously."

/U
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Template editor: editing Diagram Label style
« Reply #3 on: May 13, 2020, 10:56:58 pm »
I've never seen the "Figure 1:" you are talking about  ???

Weird..

Geert