Lout (software)

Document formatting software

The topic of this article may not meet Wikipedia's notability guidelines for products and services. Please help to demonstrate the notability of the topic by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to be merged, redirected, or deleted.
Find sources: "Lout" software – news · newspapers · books · scholar · JSTOR (September 2011) (Learn how and when to remove this template message)

|

LoutDeveloper(s)| Jeffrey H. Kingston

|

Stable release|

3.41 / June 2023

Written in| C
Operating system| Linux, MS-Windows, POSIX compliant systems
Type| Text formatting
License| GPL
Website| savannah.nongnu.org/projects/lout

* Free and open-source software portal

Lout is a batch document formatting system[1] invented by Jeffrey H. Kingston. It reads a high-level description of a document similar in style to LaTeX and produces a PostScript file which can be printed on most printers. Plain text and PDF output are also available. The term Lout primarily designates a document formatting programming language, while the (only) implementation of the language (by Jeffrey H. Kingston) is sometimes referred to as Basser Lout. Basser Lout is free software, distributed under the terms of the GNU General Public License.

Lout copies some of its formatting algorithms from TeX but is intended to be much easier to program due to the use of high-level functional programming language, instead of a macro language.

While a typical installation of LaTeX, together with TeX binaries takes from 50 to 300 MB, Lout is about 1 MB. This is mainly due to fewer packages and tools, but might also be attributed to a C implementation instead of macro language source code.[2]

Lout comes with an easy-to-read user guide, and the basics can be learned in a couple of hours. It includes packages for creating tables, charts, equations, and diagrams, everything in one package "out of the box". Lout is useful for creating reports and books and gives very precise control over typesetting.

## Document formatting with Lout[edit]

While the core of the Lout programming language provides only low-level operations, similar to that of TeX, the packages that come with Basser Lout provide a complete high-level markup language that users may use directly to produce documents, in a way that is similar to LaTeX.

A very simple Lout document may look like this:

# This is a comment.

# Use the `doc' document class and its default style.
@SysInclude { doc }

@Document
@InitialFont { Times Base 10p }

# Beginning of document contents.
@Text @Begin

@PP
This is a paragraph.  One can easily embed @B { bold } or
@I { italic } text.  One can also easily change the style of
text, such as { Helvetica Base } @Font { changing the font
being used }.

@BeginSections
@Section @Title { The First Section }
@Begin

@PP
This is the content of a section.

@End @Section
@EndSections

@End @Text
# End of the document.

Different document types are available: doc, report, book, but also slides (for overhead transparencies) and illustration (for stand-alone illustrations). Customizing a document style is usually relatively easy, even to the non-programmer.

## Programming language features[edit]

The Lout programming language is similar to other functional languages. The core programming language consists of less than 30 primitive operators.[3] Some features make it particularly close to Haskell, notably the fact that Lout expressions are lazily evaluated. Lout also provides constructs needed for the implementation of document formatting that are not commonly found in other programming languages, such as galleys.[4] Unlike most other functional programming languages, Lout does not provide, for instance, first-class functions.

## Security issues[edit]

In 2019 Common Vulnerabilities and Exposures listed two buffer overflow issues in Lout 3.40, which can be exploited if untrusted documents are processed.[5][6] Debian removed Lout in October 2020 due to these issues not having been patched;[7][8] the package had had no maintainer since 2013.[9] In June 2023, Kingston published a slightly reformatted Lout 3.41, still subject to those buffer overflows. At least one unofficial fork of Lout has been created to patch the buffer overflows.[10]

## References[edit]

1. ^ Jeffrey H. Kingston (2023). "The Lout Document Formatting System". Retrieved 2023-12-19.
2. ^ Lout Downloads
3. ^ Jeffrey H. Kingston (September 1993). "The Design and Implementation of the Lout Document Formatting Language". Software: Practice and Experience. 23 (9): 1001–1041. CiteSeerX 10.1.1.45.9433. doi:10.1002/spe.4380230906. S2CID 22952199.
4. ^ Wolfram Kahl (January 1999). "Beyond Pretty-Printing: Galley Concepts in Document Formatting Combinators". Practical Aspects of Declarative Languages: First International Workshop.
5. ^ "NVD - CVE-2019-19917".
6. ^ "NVD - CVE-2019-19918".
7. ^ Debian Lout bug: security issues
8. ^ Debian Lout: package removal
9. ^ Debian Lout bug: maintainer gone
10. ^ "William" (2022-11-01). "william8000/lout (version 3.42.2)". GitHub. Retrieved 2023-12-19.

* v
* t
* e

Document markup languages

Office suite|

* Compound Document Format
* OOXML
* SpreadsheetML
* PresentationML
* WordprocessingML
* ODF
* UOF

Well-known|

* HTML
* XHTML
* MathML
* RTF
* TeX
* LaTeX
* Markdown

Lesser-known|

* AmigaGuide
* AsciiDoc
* BBCode
* CML
* C-HTML
* ConTeXt
* CrossMark
* DITA
* Djot
* DocBook
* eLML
* EAD
* Enriched text
* FHTML
* GML
* GuideML
* HDML
* HyTime
* IPF
* LilyPond
* LinuxDoc
* Lout
* MIF
* MAML
* MEI
* MusicXML
* OMDoc
* OpenMath
* Org-mode
* POD
* ReStructuredText
* RTML
* RFT
* S1000D
* Setext
* TEI
* Texinfo
* troff
* Wikitext
* WML
* WapTV
* XAML

List of document markup languages
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template