Recent from talks
Nothing was collected or created yet.
Page break
View on WikipediaThis article needs additional citations for verification. (May 2013) |
A page break is a marker in an electronic document that tells the document interpreter the content which follows is part of a new page. A page break causes a form feed to be sent to the printer during spooling of the document to the printer. It is one of the elements that contributes to pagination.
Form feed
[edit]Form feed is a page-breaking ASCII control character. It directs the printer to eject the current page and to continue printing at the top of another. It will often also cause a carriage return. The form feed character code is defined as 12 (0xC in hexadecimal), and may be represented as Ctrl+L or ^L. In a related use, Ctrl+L can be pressed to clear the screen in Unix shells such as bash, or redraw the screen in TUI programs like vi/emacs. In the C programming language (and other languages derived from C), the form feed character is represented as '\f'. Unicode also provides the character U+21A1 ↡ DOWNWARDS TWO HEADED ARROW as a printable symbol for a form feed (not as the form feed itself).[1] The form feed character is considered whitespace by the C character classification function isspace().
Form feed is rarely used when programming with modern printers in modern operating environments such as Windows, Unix, Linux or macOS. Instead, form feeds are generated by having the printing program call a form feed API function. For example, when printing using the .NET Framework, the PrintPageEventArgs.HasMorePages property is used to indicate a form feed is desired.
Semantic use
[edit]The form feed character is sometimes used in plain text files of source code as a delimiter for a page break, or as marker for sections of code. Some editors, in particular emacs and vi, have built-in commands to page up/down on the form feed character. This convention is predominantly used in Lisp code, and is also seen in C and Python source code. GNU Coding Standards require such form feeds in C.[2]
In Usenet, the form feed character is used by several newsreaders as a "spoiler character", causing them to automatically hide the following text until prompted, as a way to prevent spoilers from being inadvertently revealed.[3] The precise behavior depends on the client displaying the article. For example, Gnus displays "Next page..." in boldface, and switches to a second screen to display text after the form feed; slrn displays all non-space characters following the form feed as asterisks; Dialog turns the font and background color red between form feeds; and XRN simply inserts blank lines to fill the remainder of the article display area so the user must scroll down to reveal the spoiler. This use of the form feed character is not supported by all newsreaders, and is not standardized, although it has appeared in a draft of a Usenet Best Practices document by the IETF's USEFOR working group, as a feature that user agents should (but are not required to) support.[4]
See also
[edit]References
[edit]- ^ "Unicode" (PDF). Retrieved 2013-05-11.
- ^ "Formatting Your Source Code (C)". GNU Coding Standards.
- ^ Spoilers on newsreaders.com
- ^ IETF USEFOR USEAGE Draft
Page break
View on Grokipediapage-break-after, page-break-before, and page-break-inside (now largely superseded by the more flexible break-after, break-before, and break-inside in modern standards) dictate how content divides across printed pages from browsers. These controls prevent undesirable splits in elements such as headings, images, or tables during PDF generation or hard-copy printing, enhancing the transition from screen to paper media.[5] In desktop publishing software like Adobe InDesign, page breaks integrate with advanced layout tools to manage complex multi-page documents.[6]
Definition and Overview
Core Concept
A page break is a deliberate marker inserted into a document or data stream that instructs a printer, display device, or rendering engine to end the current page and begin a new one, ensuring logical separation of content.[2][1] This marker acts as a formatting instruction, distinct from natural pagination driven by content volume alone.[7] The primary purpose of a page break is to facilitate pagination by preventing awkward content splits, such as a heading isolated at the bottom of a page without its body or paragraphs divided mid-sentence across pages.[8][9] By controlling where pages divide, it enhances readability and maintains the structural integrity of the document in both printed and digital formats.[3] In terms of basic mechanics, a page break in printing triggers a physical or virtual "form feed" to advance to the next sheet or screen section, while in digital views it directs the rendering engine to adjust the visual layout without involving physical output.[10][11] Historically, this concept was implemented in ASCII standards through the form feed control character to signal page advancement.[12] Common examples include manual insertion to force a break after a chapter for clean sectioning, or automatic generation based on predefined page length limits to manage overflow without user intervention.[1][3]Types of Page Breaks
Page breaks are primarily classified into two types—soft and hard—distinguished by their method of insertion and adaptability to document flow in word processors and similar software. Soft page breaks are automatically inserted by the application when content reaches the end of a page, based on factors such as margins, font sizes, line spacing, and overall layout constraints. These breaks adjust dynamically if formatting changes, ensuring continuous pagination without user intervention. For instance, as text is added or edited, soft breaks shift to maintain optimal page filling while adhering to predefined boundaries.[13][14] Hard page breaks, in contrast, are explicitly placed by users to enforce a division at a chosen point, regardless of surrounding content or automatic adjustments. This manual control overrides soft pagination, commonly used to separate sections like chapters or headings for precise control over printed or digital output. Historically, hard breaks trace back to the form feed control character in early computing, which commanded printers to advance to a new page.[14][15] Word processors also provide pagination controls to improve readability and structure by influencing where soft page breaks occur. Features such as "keep with next" bind paragraphs together to prevent separation across pages, while "widow/orphan control" ensures at least two lines of a paragraph appear together at the top or bottom of a page, avoiding isolated lines. "Keep lines together" further maintains entire paragraphs on a single page when possible. These controls adapt based on content length and flow, applied via paragraph formatting options.[16][17]History and Evolution
Origins in Mechanical Printing
The origins of page breaks trace back to the advent of mechanical printing in the 15th century, when Johannes Gutenberg's movable type system required manual composition of individual pages. Compositors arranged metal type letters into lines using a composing stick, then transferred them into a metal frame called a chase to form a complete page. To establish uniform page lengths, thin lead strips known as leads were inserted between lines for consistent spacing, while larger blocks of wood or metal called furniture filled the surrounding areas to define margins and overall dimensions. Wedge-shaped devices called quoins were then tightened to lock the entire assembly securely, ensuring the type remained stable during inking and pressing. This labor-intensive process allowed for precise control over page boundaries but demanded skilled judgment to avoid uneven lengths or "runarounds" in text flow.[18][19] In the 19th century, advancements in typesetting machinery built upon these manual techniques, particularly with the introduction of line-casting machines like the Linotype, invented by Ottmar Mergenthaler and first used commercially in 1886. These devices cast entire lines of text as solid brass slugs in a galley—a long tray—revolutionizing composition speed for newspapers and books. However, compositors still manually planned page breaks by proofreading galleys and rearranging slugs to fit precise page molds or chases, adjusting for headlines, illustrations, and margins to maintain balanced pagination. This planning was crucial to avoid awkward breaks mid-sentence or paragraph, preserving readability while accommodating the fixed dimensions of printing formes.[20] Key innovations further shaped page break practices during this era. The typewriter, patented by Christopher Latham Sholes in 1868, introduced a mechanical line feed mechanism using a pawl-and-pin system to advance paper at fixed intervals, enabling consistent line spacing and laying the groundwork for more controlled textual divisions in office and publishing workflows. Similarly, rotary presses, which emerged in refined forms by the late 1800s—such as those developed by Richard Hoe and others—automated high-speed printing from curved plates on continuous paper rolls, dramatically increasing output for periodicals. Yet, these machines relied on pre-composed pages from manual typesetting, requiring compositors to meticulously plan breaks to align with the press's web-cutting and folding mechanisms.[21][22] The transition to offset printing in the early 1900s marked a shift toward more standardized approaches to pagination. Pioneered by Ira Washington Rubel around 1904, offset lithography used photolithographic plates transferred via a rubber blanket, allowing for larger sheet runs and finer detail. Emerging standards for page sizes, such as the A-series defined by the German DIN 476 in 1922, influenced break strategies by dictating uniform sheet dimensions for imposition—the arrangement of multiple pages on a single sheet for efficient folding and binding. Compositors adapted by calculating breaks to optimize these layouts, minimizing waste and ensuring seamless transitions across folded signatures. This evolution from manual locking to standardized imposition set the stage for later digital form feeds in computing.[23][24]Adoption in Computing and ASCII Standards
The adoption of page breaks in computing began with the standardization of control characters in the 1960s, particularly through the American Standard Code for Information Interchange (ASCII). In the ANSI X3.4-1968 standard, the form feed (FF) character was defined as control code 12 (hexadecimal 0x0C), serving to advance the printing position to the first line of the next page or form, simulating the ejection of paper in printers.[25] This built on earlier practices in teletype and line printer systems, where page breaks were managed via hardware signals; for instance, the IBM 1403 printer, introduced in 1959, used carriage control tapes and punch card mechanisms to handle form ejection and spacing.[26] Key milestones in the integration of page breaks included their incorporation into operating systems for text file handling. In UNIX, developed in the early 1970s at Bell Labs, the FF character was adopted for formatting output in tools like the printer spooler and document processors, enabling software-driven pagination in text streams. Similarly, CP/M, the dominant operating system for microcomputers in the late 1970s, supported FF in its file I/O routines, allowing consistent page break handling across early personal computing environments. These systems relied on ASCII-compatible protocols to interpret FF for line printers and teletypes, marking a transition from isolated mainframe operations to more portable text processing. The evolution of page breaks shifted from hardware-dependent implementations in mainframe environments, where printers like the IBM 1403 required physical control tapes, to software-controlled mechanisms in personal computers during the 1980s, facilitated by widespread ASCII adoption in DOS and early GUI systems. This change was influenced by international standards, such as ISO 646 from 1973, which retained FF as a format effector for page advancement, promoting interoperability across global computing platforms.[27] Early adoption faced challenges with incompatibilities in networked environments, where varying terminal emulations and transport protocols could misinterpret FF, often resulting in garbled output; this led to conventions like representing FF as ^L (control-L) in text editors for visual page separation without triggering hardware actions.[28]Technical Implementation
Form Feed Control Character
The form feed (FF) control character, designated as ASCII decimal 12 (hexadecimal 0C), serves as the primary low-level mechanism for initiating page breaks in text-based systems. In Unicode, it is encoded as U+000C with the formal name FORM FEED (FF), intended to denote a page break in text processing applications. This non-printing control character is typically represented in programming as \f or generated via Ctrl+L, and its inclusion in the original ASCII standard provided a standardized way to signal page advancement without relying on higher-level formatting.[29] In legacy printing systems, such as early line printers and dot-matrix devices, the FF character instructs the mechanism to eject the current sheet of paper or advance the continuous form to the top of the next page, effectively creating a physical page break. This behavior ensured clean separation between pages in output from teletypewriters and early computer terminals connected to printers. In contrast, when processed by terminal emulators, FF typically simulates a page break through scrolling; for instance, in the xterm emulator, it is handled equivalently to a line feed (LF), advancing the cursor one line and scrolling the display if necessary to mimic progression to a new "page" on the screen. Similarly, in VT100-compatible terminals, FF is interpreted as an LF, moving the active position downward one line without altering the column, and triggering an upward scroll if the bottom margin is reached.[30][31][32] Programmers insert the FF character using low-level I/O functions, such as the C standard library's fputc('\f', stdout), which writes the unsigned char value to the output stream and advances the file position accordingly. Detection and handling occur through text processing tools; for example, the grep utility can identify FF in files via patterns like $'\f' or \cL, often ignoring it during searches unless explicitly matched, or visualizing it as ^L in output for readability. While VT100-style escape sequences (such as those prefixed with ESC [) provide more selective control over display functions like erasing or scrolling, the raw FF remains a direct, single-byte control for basic page advancement in compatible environments.[33] Although retained in plain text files and protocols for backward compatibility, the FF character has become largely obsolete in graphical user interface (GUI) printing workflows, where page description languages like PostScript handle pagination through explicit operators such as showpage, which outputs the current page buffer and advances to the next without relying on legacy control codes. This shift, beginning with the adoption of PostScript in the 1980s, prioritized vector-based rendering and complex layouts over simple character-driven commands.[34]Page Breaks in Markup and Programming Languages
In markup languages such as HTML and XML, page breaks are primarily managed through styling and formatting properties rather than dedicated elements, with line breaks handled separately by tags like<br>. The CSS Paged Media Module Level 3, published by the W3C, defines mechanisms for controlling page generation and layout in paged presentations, including the use of print media queries to enforce breaks.[35] For instance, the legacy page-break-before: always property (deprecated in modern CSS) can force a page break before a block-level element during printing; in current standards, use break-before: page instead. This approach integrates with the @page rule to specify page properties like margins and orientations, ensuring consistent rendering across print contexts.[36]
In XML-based formatting, the Extensible Stylesheet Language Formatting Objects (XSL-FO) standard provides explicit support for page breaks through properties like break-before and break-after on elements such as <fo:block>. The W3C's XSL Version 1.0 specification outlines how these properties control fragmentation across pages, columns, or regions, with values like "page" triggering a new page sequence. For example, <fo:block break-after="page"> inserts a break after the block, facilitating structured document flows in tools that process XSL-FO for output formats like PDF.
Programming languages and markup systems often incorporate page break directives tailored to their paradigms, building on or extending the form feed control character as a plain-text fallback. In LaTeX, the \newpage command ends the current page and begins a new one, potentially adding vertical space to fill the page, as documented in the LaTeX2e reference manual.[37] This is commonly used in document preparation to control pagination explicitly. In Python, the print() function can output a form feed by specifying end='\f', which advances to the next page in terminal or printer contexts supporting ASCII control characters. Similarly, in C, programmers insert the form feed character (\f) directly into output streams or use library functions like fflush to ensure buffer ejection before a break.
For PDF generation in markup workflows, libraries like iText (for Java) and ReportLab (for Python) enable programmatic insertion of page breaks. In iText 7, the AreaBreak class with AreaBreakType.NEXT_PAGE adds breaks during document assembly.[38] ReportLab provides a PageBreak() flowable that consumes vertical space to force pagination in Platypus-based layouts.[39] In Markdown processing tools like Pandoc, page breaks are achieved by embedding LaTeX commands such as \newpage within the source, which Pandoc translates to appropriate breaks when generating PDF via engines like pdfLaTeX.[40] These methods allow developers to handle complex, multi-page documents while adhering to underlying standards for paged media.
Applications and Usage
In Word Processors and Document Editors
In word processors and document editors, page breaks are essential for controlling document layout, allowing users to manually dictate where content flows to the next page. These tools typically distinguish between hard page breaks, which are explicitly inserted by the user, and soft page breaks, which are automatically generated based on margins, font sizes, and content volume.[17] Microsoft Word enables users to insert a hard page break via the Insert > Page Break menu option, placing the cursor at the desired location and selecting the command to force content onto a new page.[4] For more precise control, options like even-page or odd-page breaks are available through section breaks under Layout > Breaks, starting a new section on the next even or odd numbered page to maintain balanced printing.[41] Additionally, the "Page break before" setting in paragraph styles, accessed via the Home tab's Paragraph dialog under the Line and Page Breaks tab, forces a break ahead of specific paragraphs, such as headings.[17] LibreOffice Writer supports similar functionality through Insert > More Breaks > Manual Break, where users select Page break as the type and can specify a page style for the following page.[42] Paragraph-level control is provided in the Paragraph dialog's Text Flow tab, enabling "Page break before" via the Breaks section, with options to insert a break positioned before the paragraph and apply a custom page style.[43] Key features in these editors include automatic adjustments visible in print layout views, where Word dynamically repositions soft page breaks as content changes, ensuring accurate preview of printed output.[4] Suppression of unwanted breaks within sections can be managed using pagination options in the Paragraph dialog, such as enabling "Keep with next" or "Widow/Orphan control" to prevent automatic breaks from splitting paragraphs across pages, or inserting Next Page section breaks under Layout > Breaks to isolate and control flow.[17][44] Advanced tools in professional editors like Adobe InDesign allow forced page breaks via keyboard shortcuts (Ctrl+Enter on Windows or Command+Return on Mac) within text frames to override automatic flow.[6] Master pages (also called parent pages) integrate with these breaks by applying consistent layouts across spreads, where inserting pages via the Pages panel automatically inherits the master to maintain pagination uniformity.[45] Google Docs simplifies insertion with the Ctrl+Enter keyboard shortcut, directly adding a hard page break at the cursor position.[46] In collaborative workflows, such as those in Microsoft Office 365, page breaks sync in real-time during co-authoring sessions when documents are saved to OneDrive or SharePoint, allowing multiple users to see and adjust breaks instantly without conflicts.[47] Exporting documents preserves these breaks effectively; for instance, in Word, page breaks are maintained in PDF outputs to retain the intended layout, while RTF exports support hard breaks but may interpret soft breaks based on the receiving application's settings.[48][49]In Web Development and Digital Publishing
In web development, page breaks are primarily managed through CSS properties within print-specific media queries to control how content flows across printed or PDF-generated pages from HTML documents. The CSS Paged Media Module Level 3 defines properties such asbreak-before, break-after, and break-inside to insert, avoid, or allow breaks at specific points, superseding older page-break-* aliases for better fragmentation control in paged contexts.[35] For example, developers can apply rules like .chapter { break-after: page; } inside an @media print block to force a new page after chapter elements, ensuring logical separation without disrupting screen rendering.[50] These properties enable web pages to adapt seamlessly for printing while maintaining digital layouts.
Browsers like Google Chrome provide built-in tools for previewing and debugging page breaks during development. Chrome DevTools' Rendering panel allows emulation of the print media query, displaying a paginated preview that reveals how breaks affect layout, though it may not perfectly simulate all browser-specific rendering behaviors.[51] For generating PDFs from HTML with precise break control, specialized tools such as PrinceXML and WeasyPrint extend CSS support; PrinceXML honors break-before and related properties to automate or manually dictate page divisions, while WeasyPrint implements break-inside: avoid to prevent unwanted splits in elements like tables.[52][53]
In digital publishing formats, page break handling varies between reflowable and fixed-layout ebooks to balance flexibility and structure. EPUB 3 leverages CSS paged media features, including break properties, for reflowable content where reading systems dynamically manage breaks based on user preferences like font size, though support for precise control remains implementation-dependent across devices.[54] For fixed-layout ebooks, tools like Kindle Create enforce page breaks by converting document sections into discrete HTML pages, ensuring content remains paginated as designed without reflow, ideal for illustrated works like children's books.[55]
Challenges in implementing page breaks arise from tensions between responsive web design and print outputs, as screen-oriented media queries (e.g., for mobile) often override or ignore print-specific rules, leading to layouts that reflow differently on devices versus paper. Developers must use separate @media print stylesheets to isolate breaks, but conflicts can occur with modern layouts like CSS Grid or Flexbox, where fragmentation support is incomplete in some browsers, potentially causing elements to split awkwardly. Accessibility considerations further complicate this; while ARIA landmarks (e.g., role="region") can mark major sections for screen reader navigation, print page breaks themselves do not directly translate to audio flows, requiring additional semantic HTML to maintain logical reading order without visual pagination cues.[56][57]
Related Concepts and Comparisons
Distinctions from Line and Section Breaks
Line breaks function as a basic mechanism for horizontal content division within a single page, advancing text to the subsequent line without initiating a new page or altering broader document structure. In text editors and word processors, a line break—often inserted by pressing Shift+Enter—preserves the current paragraph's formatting while simply wrapping content to the next line for readability, such as in poetry or addresses where lineation is stylistic rather than paginal.[17] Similarly, in web markup, the HTML<br> element produces a line break (carriage return) to separate lines of text without affecting pagination in print or screen rendering.[58]
Section breaks, by contrast, establish structural divisions that enable localized changes to document layout, such as varying margins, column configurations, or header/footer settings, and they do not inherently force a page transition unless specified. In applications like Microsoft Word, section breaks include subtypes like "Continuous," which apply formatting alterations mid-page without advancing to a new sheet, and "Next Page," which combines structural separation with pagination—though the former emphasizes intra-page flexibility over rigid boundaries.[44] This allows sections to function as modular blocks for complex layouts, such as switching from single- to multi-column text seamlessly on the same page.
Page breaks differ fundamentally by targeting pagination boundaries, compelling all following content to commence at the top of a new page to maintain clean separations in printed or paginated outputs, irrespective of ongoing formatting. While line breaks remain confined to intra-page text flow and section breaks prioritize structural adaptability within or across pages, page breaks enforce a vertical demarcation that prevents content spillover, ensuring aesthetic and logical page independence. Excessive reliance on page breaks can fragment document flow and introduce unnecessary whitespace, in contrast to the more adaptable nature of line and section breaks, which integrate smoothly into continuous reading experiences without disrupting overall pagination.[59]
For instance, in formatting a professional report, a line break might reposition a long sentence to avoid awkward wrapping within its paragraph on the current page; a section break could transition to a landscape orientation for tables mid-document without a page end; yet a page break would isolate an executive summary to conclude neatly on one page, allowing the detailed analysis to begin afresh.[17][44][59]
