I put a description inside LC1, LC3, and LC5.
LC2 and LC4 have no “description”.
The M2DOC queries are:
m:for comp|self.eAllContents(la::LogicalComponent)
m:if comp.description.trim().size() <> 0
m: comp.description.trim().fromHTMLBodyString().replaceLink(comp)
m:endif
m:endfor
The result would contain UNDESIRABLE spaces:
Eventhough, there is a condition “if”, it should not allow the template to generate a new line for LC2 and LC4.
This problem is even more exasperated when using the black dots, as illustrated here:
As you can see LC2 and CL4, do not possess any green text area, if the “IF” condition was not respected then we would have gotten a green area containing the number 0. The problem is that EVENTHOUGH “IF” is repected, hence the M2DOC querry not being called for LC2/LC4, the (word space/Black Dot) IS GENERATED nonetheless, which generate unwanted spaces and unwanted black dots lines. Is there a way to bypass this problem?
That might comes from various things. Looking at the code the of your template I don’t think it comes from the code. My guess is it comes from the description producing two paragraphs per description. But it can also be an issue with M2Doc itself.
Can you add an highlight expression before your description expression ? If it appears just after the first bullet, it means that the description produce two paragraphs (might be even one). You can also check the HTML code saved in the description. You can use the property view and the expert tab to get the HTML content.
And if you are not using M2Doc 3.2.1, I would suggest to upgrade since a lot of improvements have been done to the HTML export in this version.
I am using 3.1.0 indeed, i just switched to the latest M2DOC version. However the problem remained.
I added highlights as you have requested, here are the three experiments i run:
1)
Could the “tree” /structure of Capella Logical Components, which includes the System containing these components, have anything to do with he problem somehow? Not sure.
I don’t exactly reproduce your bug. see the following issue. As a workaround you can probably remove the first <p> and the last </p> tags. With something like:
You solution would work only if i have one single paragraph on my description though, but it is highly interesting! I could tweak it a bit and see if I can’t something that could suit all the description forms i am seeking. Thank you for your answer.
More Tests:
I was inspecting another example while I noticed this, look in the left you can see the HTML code, and in the right the result (generated document). We can see clearly an extra space/line aboce the text (White square).
The word Debug0 is located directly before the M2DOC query, such as:
What about a WORD FIELD that would “eat”/“erase” the following line or first line, or maybe an M2DOC that would do it? It could be used whenever we can predict for sure that an extra line is going to be added.
Something such as:
{m: var.html… /eraseNextLine}
→
The first empty line (whether it is empty or not by the way), is deleted.
M2Doc is in maintenance mode so unless someone pays to fix this, I will not try to fix that soon. An other workaround would be to change MElement produced by the HTML service.
Totally understandable, i figured it is time i create my own services maybe. I will recheck the related links for creating a service (shared on another topic), re read about EMF elements (MElement for instance) and how to interact with them, then how to insert the service in the template. If I succeed then i could do anything with M2DOC. (Second clue would be python maybe).
Thank you for the answers, again.
Paid service decisions are out of my hands unfortunately, however I hope that my feedback/experiments could prove useful/valuable sometimes.