cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to deal with the box across pages?

lxie1
1-Visitor

How to deal with the box across pages?

Dear all,

I using the FOSI and the APP source edit for the box, but when the box across pages, we lost 2 line, can I add it in the source edit? thanks!

%E5%A4%8D%E4%BB%B6+ptc_1114_3.png

the APP source:

the example is:

var fish = formatting.fish[ template.stylerFish ];
var block = arguments[0];
var paragraph = block.defaultParagraph;
var style = block.defaultStyle;
var contextProp = arguments[1];

//Create a rule to apply to the block
//Rule is 2pt thick, solid, red and applied to all sides of the block

var rule = new fRule;
rule.sides = fRule.SIDE_BOX;
rule.thickness = "2pt";
rule.lineColor = "red";
rule.lineStyle = fRuleLine.LINE_SOLID;

//Apply the rule to the block
block.rules.addRule(rule);

//Add some padding to the block to provide some space between the rule and the content
block.paddingTop = block.paddingBottom = block.paddingLeft = block.paddingRight = "3pt";

and the "box" also can get the border:

var block = arguments[0];
var paragraph = block.defaultParagraph;
var style = block.defaultStyle;

//Apply a -2.999pt rule to the block to offset the main rule
var rule = new fRule();
with (rule) {
thickness = "-2.999pt";
lineColor = "None";
sides = "tblr";
}
block.rules.addRule(rule);

//Apply the main rule to the block
var rule = new fRule();
with (rule) {
//Line thickness
thickness = "1pt";
//Line colour
lineColor = "Black";
//Sides (top, bottom, left and right)
sides = "tblr";
//Fill colour specifies background for boxing
fillColor = "#FFFFFF";
}
block.rules.addRule(rule);

//Apply a final rule to the block to remove the offset
var rule = new fRule();
with (rule) {
thickness = "2pt";
lineColor = "None";
sides = "tblr";
}
block.rules.addRule(rule);

the FOSI source:

boxing toffset=3pt boffset=3pt loffset=2pt roffset=2pt thick=1pt inclr=#FFFFFF

Can I add the lines for the end/head of pages by update the source? Or could you give me any tips please?

Your assistance will be highly appreciated in this regard.

Thanking you

ACCEPTED SOLUTION

Accepted Solutions
TimPhelps
12-Amethyst
(To:lxie1)

This is by design.

Its purpose was to indicate that the table is continued on the next page.

A workaround is described in article 58143

https://www.ptc.com/appserver/cs/view/solution.jsp?n=CS58143

  • The method for getting a bottom rule is to create a .tmx file with the content of the following:

\TableSplitPreBrk=0
\TableSplitPostBrk=0
\TableRulePreBrk=1
\TableRulePostBrk=1

  • If you are using DITA document types, then the .tmx file must be named custom.tmx and placed in the [productpath]\inputs folder.
  • For other document types or schemas, the .tmx file may be placed in the directory with the DTD and given the same base name as the .dtd file. For example:

doctypes\mysample\mysample.dtd
doctypes\mysample\mysample.tmx

  • The .tmx file may also have the same base name as the document, if the .tmx is to apply to only that one document. In this case, the .tmx must reside in the same folder where the document exists. For example:

local\docs\sampledoc.xml
local\docs\sampledoc.tmx

View solution in original post

2 REPLIES 2
TimPhelps
12-Amethyst
(To:lxie1)

This is by design.

Its purpose was to indicate that the table is continued on the next page.

A workaround is described in article 58143

https://www.ptc.com/appserver/cs/view/solution.jsp?n=CS58143

  • The method for getting a bottom rule is to create a .tmx file with the content of the following:

\TableSplitPreBrk=0
\TableSplitPostBrk=0
\TableRulePreBrk=1
\TableRulePostBrk=1

  • If you are using DITA document types, then the .tmx file must be named custom.tmx and placed in the [productpath]\inputs folder.
  • For other document types or schemas, the .tmx file may be placed in the directory with the DTD and given the same base name as the .dtd file. For example:

doctypes\mysample\mysample.dtd
doctypes\mysample\mysample.tmx

  • The .tmx file may also have the same base name as the document, if the .tmx is to apply to only that one document. In this case, the .tmx must reside in the same folder where the document exists. For example:

local\docs\sampledoc.xml
local\docs\sampledoc.tmx

lxie1
1-Visitor
(To:TimPhelps)

Hi Tim,

Thank you very much for your detailed answer, I will try to follow it!

Announcements

Top Tags