Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

txtMergeLines

A merges lines while preserving the line break for HTML/LaTeX


Description

This function helps you to do a table header with multiple lines in both HTML and in LaTeX. In HTML this isn't that tricky, you just use the <br /> command but in LaTeX I often find myself writing vbox/hbox stuff and therefore I've created this simple helper function

Usage

txtMergeLines(..., html = 5)

Arguments

...

The lines that you want to be joined

html

If HTML compatible output should be used. If FALSE it outputs LaTeX formatting. Note if you set this to 5 then the HTML5 version of br will be used: <br> otherwise it uses the <br /> that is compatible with the XHTML-formatting.

Value

string

See Also

Other text formatters: txtInt(), txtPval(), txtRound()

Examples

txtMergeLines("hello", "world")
txtMergeLines("hello", "world", html=FALSE)
txtMergeLines("hello", "world", list("A list", "is OK"))

htmlTable

Advanced Tables for Markdown/HTML

v2.1.0
GPL (>= 3)
Authors
Max Gordon [aut, cre], Stephen Gragg [aut], Peter Konings [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.