How do I create page breaks in the structure itself?
Copy link to clipboard
Copied
Hello,
I'm switching from word to structured FM and DITA. I know that I could use the lines element to create page breaks where I need them, and also insert manual page breaks at the top of the next available page.
But there must be a better way in the structure somehow, conditional on certain conditions - for example, new topics always on a new page or no separation of images from its immediately preceding reference. Please could somebody expain how I can create such page breaks in the structure.
Copy link to clipboard
Copied
ABJB,
In case you have not heard about it, but structured publishing is about dividing content and presentation (or something like this).
In format-based publishing you care about the layout and if your template is not well-crafted or your requirements are so-and-so that pagination does not happen automatically you can add overrides in form of manual pagination. But always treat this as a last option. Main reason: a new revision of the document may require other page breaks and you need to check all pages because you could have one anywhere. A translated version will have other page breaks and you have to remove your original overrides and add new ones.
In structured publishing, try to live without manual page breaks. Better optimize the formatting rules in a way that allows the text flow to automatically fall into place as desired. Only if that is not satisfying, you have sevearl options:
• use manual overrides like in format-based publishing.
• use an attribute at certain elements which controls the pagination through appropriate formatting rules
• use an optional element which controls the pagination through appropriate formatting rules
The main question is: Why do you need to control pagination in the first place?
- Michael
Copy link to clipboard
Copied
Hi Michael,
Thanks for your reply. I want to optimize the formatting rules but don't know how - in particular I would like new topics to start new pages and want to avoid images being moved onto the next page (i.e. away from text beforehand that describes them). Please could you tell me what I need to add to the formatting rules to do this.
It would also be helpful if you could give examples (i.e. concrete steps about how to do it) of the other three options that you mentioned (just for comparison and my learning)
Copy link to clipboard
Copied
ABJB and Michael,
Being no DITA expert, I can't comment on whether the spec and application provide a page break option. I will say, though, that I don't think it is uncommon to desire forced page breaks at predictable intervals if you plan to publish to PDF. I have a manual similar to how ABJB describes that requires a page break between topics, so I built that into my template and structured app. Because I build my own template, etc... this is no problem, I make it do whatever I want. ABJB, if you keep running into limitations with DITA, you might consider this option. The knowledge you gain in the process is priceless and you can always migrate later, although the migration path can be laborious depending on how much different your custom structure is.
Russ
Copy link to clipboard
Copied
Hi Russ,
thanks for your input too. Would you mind sharing your knowledge about exactly how you do the page break? I guess you add formatting rules to your element definitions - what do they look like? Also can you recommend a good online reference guide for formatting rules (syntax, possibilities, etc.)?
Copy link to clipboard
Copied
I guess you add formatting rules to your element definitions - what do they look like? Also can you recommend a good online reference guide for formatting rules (syntax, possibilities, etc.)?
The best reference guide is the one that comes with FrameMaker, DEVELOPING STRUCTURED APPLICATIONS WITH ADOBE® FRAMEMAKER®. Getting your topics to always start at the top of the page should be the easier of the tasks you want to do. It does not involve attributes. In your EDD, you set the formatting rules for the topic element to start at the top of the page. That is the way I do it in my custom structured application.
The alternative is that the topic element in the EDD assigns a paragraph format to its first paragraph. Then that paragraph format is one that has the setting to start at the top of the page. I do NOT use DITA, but have looked through its EDDs. It appears that the FrameMaker EDDs for DITA simply assign paragraph formats at the pertinent places. So, it may be as simple as editing the appropriate paragraph formats.
HOWEVER CAUTION:
If you want to stick with DITA and customize it, it can be difficult. I do not know all the details but others have discussed in these forums.
Van
Copy link to clipboard
Copied
I wasn't aware of DITA. And I go the way Russ describes, using custom or customized structures that give you all necessary freedom.
Regarding DITA, I guess very many elements have an attribute "outputclass" which you can use to control appearence. The spec says this:
Names a role that the element is playing. The role must be consistent with the basic semantic and expectations for the element. In particular, the outputclass attribute can be used for styling during output processing; HTML output will typically preserve outputclass for CSS processing.
So you are free to add meaning to the attribute value. Let’s assume you want to use it at topic elements for pagination and let’s define the value "newpage" as the trigger for the formatting rules.
Since the topics themselves do not contain text but all of them have at least a
element in the EDD, like this:
If context is
task[outputclass="newpage"] | concept[outputclass="newpage"] | reference[outputclass="newpage"]
Pagination properties
Start position: Top of page
(You may have to add/check the names of the topic elements)
HTH,
- Michael
Copy link to clipboard
Copied
Just to clarify .. DITA does not provide a method for defining page breaks. One of the big things about using DITA (and XML in general) is that you "should" be separating formatting from content. I say "should" because, this was the intent of the people who created DITA, but since you're using FrameMaker, you're free to modify the formatting rules to suit your needs. You can add new elements to do new things, which essentially breaks from the DITA specification and means you are not longer using "DITA" .. or you can just modify the structure application so FM applies the formatting that you want.
As Michael points out, you can use the @outputclass attribute to manually assign special properties to elements. These properties are interpreted by the context rules in the EDD to apply whatever special formatting you want. Or, if you *always* want a new topic to start on a new page, you can just modify the properties of the paragraph tag that is assigned to the associated heading style. This is easily done by just modifying the template (no EDD tweaks needed).
However, the best way to handle page breaks is through judicious use of "keep w/next|previous" and widows/orphan control in the template. With a bit of effort, you can design a proper template that will break pages in a reasonable manner without forcing breaks at all topics or other predefined locations.
BTW .. for additional FM/DITA support, you may want to join the "framemaker-dita" Yahoo group.
Cheers,
...scott
Copy link to clipboard
Copied
Hi Scott,
While I may risk opening this endless and beaten-down debate, I'd disagree that there is any such thing as an absolute separation of formatting and content. When you are dealing with something that will ultimately end up with some kind of formatting, there is no way to completely erase the notion of formatting while authoring. For example, to me that is why <title> and <p> elements are just that - titles and paragraphs. You may not need to specifically enumerate the exact formatting of each while authoring, but you at least need to be aware that the text will ultimately be formatted something like one or the other.
The same holds true with page breaks. It is common to break pages between topics in a PDF. If there were no such thing anymore as PDFs, I'd say that DITA is just fine to skip that mechanism. But, since the big hype is reuse and multichannel publishing, DITA may be lacking with respect to PDF publication. Of course, maybe that's the pink elephant in the room... everybody knows (especially the DITA camp) that PDFs are like stone age technology or something
Russ
Copy link to clipboard
Copied
Maybe Adobe should add a pageless feature in PDF that creates a PDF without page breaks, much like a galley proof. Then the electronic version can be read as one reads HTML in a browser. The page breaks are then added just at printing, just because most printers use sheets of paper with fixed size.
Van
Copy link to clipboard
Copied
Hi Russ...
Don't confuse the issue with facts!
I completely agree with you that there is no absolute separation between formatting and content. Even within the DITA specification there are "formatting" features (<b> and <i> are clearly formatting, as well as column widths in tables, page width tables and images, alignment of images, etc). And, yes, in the strictest sense you might be able to argue that a <title> and a <p> are the same thing other than formatting (although I think that's a stretch), but other elements do seem a bit weak on the "semantic" scale.
However, I do think that making an effort to remove as much of the output-specific formatting from the content can be a great benefit. This assumes that you are creating more than one type of output. If you're only creating PDFs or WebHelp, then there may be no benefit to removing the formatting, although even if you just have one output type, it can be useful to be able to apply alternate publishing "templates" to achieve a different look.
I don't believe that you should follow the "rules" of a specification, just because they are rules .. you should do what makes the most sense for your needs. If it makes more sense for your needs to break those rules, I'd say go for it! It's just important to know that when you do break the rules, you may not be able to take advantage of other features in the future.
As for manually applied page breaks .. I've seldom had the need for that in all my years of writing, and when I come across a document that has manual page breaks, it often causes more trouble than it solves. If a house style really requires a page break before a certain heading level, then that should be associated with that para tag, otherwise I find that properly applies keeps and widow/orphan control are best in the long run. This is especially true with a model like DITA when you're working with individual topics and you may not really know where the topic will be used and what level heading you're working with, not to mention you have no idea where the "pages" are. (this assumes you're working with separate topics and not nested topics).
But .. in the end you should do what makes the most sense for your organization, not what the specification says is the right thing to do.
Cheers!
...scott
Copy link to clipboard
Copied
Hi Michael,
thanks for the formatting rule.
my map file looks like this:
in the FM installation folder, I have several edd files (see below)
I created the topics and map using the menu command "DITA | New DITA File". The DITA options specifies the DITA version as DITA_1.2_Application. In which folder is the EDD that should be modified?

