Set table width to \columnwidth - formatting

I'm writing a report using the IEEEtran format, so my page is divided into two columns.
I want to insert a table inline and I want the items in their columns to be centered. There are a few similar posts and I have looked at documentation for tabular* and tabularx, but I could not make anything work. I have achieved the best result with the following.
\documentclass[journal]{IEEEtran}
\usepackage{mdwtab}
\usepackage{multirow}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nec tincidunt justo. Fusce imperdiet tincidunt mauris, a hendrerit justo ultrices sodales. In at mi sit amet leo aliquam dignissim. Mauris fringilla fermentum egestas. Nulla facilisi. Nulla rutrum suscipit lectus vehicula consequat. Praesent eu sem vulputate, tristique augue et, cursus risus. Fusce sodales purus turpis, placerat interdum libero consequat at. Vestibulum convallis tincidunt lobortis. In ornare velit erat.
\begin{center}
\begin{tabular*}{\columnwidth}{cccc}
\hline
\multirow{2}{*}{Frequency (Hz)} & \multicolumn{2}{c}{Manual Measurements} & Bode Analyzer\\
\cline{2-3}
\cline{4}
& Linear Gain (V/V) & Logarithmic Gain (dB) & Logarithmic Gain (dB)\\
\hline
1000 & 0.04395 & -33.179 & -35\\
2000 & 0.02274 & -38.902 & -42\\
3000 & 0.01553 & -42.215 & -45\\
4000 & 0.01185 & -44.564 & -47\\
5000 & 0.00474 & -46.484 & -50\\
\hline
\end{tabular*}
\end{center}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nec tincidunt justo. Fusce imperdiet tincidunt mauris, a hendrerit justo ultrices sodales. In at mi sit amet leo aliquam dignissim. Mauris fringilla fermentum egestas. Nulla facilisi. Nulla rutrum suscipit lectus vehicula consequat. Praesent eu sem vulputate, tristique augue et, cursus risus. Fusce sodales purus turpis, placerat interdum libero consequat at. Vestibulum convallis tincidunt lobortis. In ornare velit erat.
\end{document}
I have tried using p{measure} instead of c to define the columns, but I can't get the text centered.
I have tried using tabularx, but I don't want all the columns to be the same width, and I don't want to fiddle with determining the relative widths of the columns.
I don't know if it was clear enough, but I absolutely do not mind if text spans multiple rows.

One possible approach with the tabularray package:
\documentclass[journal]{IEEEtran}
\usepackage{mdwtab}
\usepackage{multirow}
\usepackage{tabularray}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nec tincidunt justo. Fusce imperdiet tincidunt mauris, a hendrerit justo ultrices sodales. In at mi sit amet leo aliquam dignissim. Mauris fringilla fermentum egestas. Nulla facilisi. Nulla rutrum suscipit lectus vehicula consequat. Praesent eu sem vulputate, tristique augue et, cursus risus. Fusce sodales purus turpis, placerat interdum libero consequat at. Vestibulum convallis tincidunt lobortis. In ornare velit erat.
\begin{center}
\begin{tblr}{columns={halign=c},rows={valign=m}, row{3-7}={mode=math},colspec={#{}XXXX#{}}}
\hline
\SetCell[r=2]{} Frequency (Hz) & \SetCell[c=2]{} Manual Measurements & & Bode Analyzer\\
\hline
& Linear Gain (V/V) & Logarithmic Gain (dB) & Logarithmic Gain (dB)\\
\hline
1000 & 0.04395 & -33.179 & -35\\
2000 & 0.02274 & -38.902 & -42\\
3000 & 0.01553 & -42.215 & -45\\
4000 & 0.01185 & -44.564 & -47\\
5000 & 0.00474 & -46.484 & -50\\
\hline
\end{tblr}
\end{center}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nec tincidunt justo. Fusce imperdiet tincidunt mauris, a hendrerit justo ultrices sodales. In at mi sit amet leo aliquam dignissim. Mauris fringilla fermentum egestas. Nulla facilisi. Nulla rutrum suscipit lectus vehicula consequat. Praesent eu sem vulputate, tristique augue et, cursus risus. Fusce sodales purus turpis, placerat interdum libero consequat at. Vestibulum convallis tincidunt lobortis. In ornare velit erat.
\end{document}

Related

First page after titlepage (with titlepage extension) with too large bottom margin in Quarto for pdf

I am working with Quarto to create a pdf document from rstudio. I use the quarto_titlepages extension to create a title page, which is followed by a text of several pages. The first one of these pages is shown with a very large bottom margin, which is probably a heritage of the title page. However, this only happens with the bottom margin and not with the top one.
I tried re-stablishing the margins in the pdf format section with margin-left, margin-right, margin-bottom and margin-top. Then I tried the same approach but using geometry instead. None of the two options worked.
Here is the code with margin-top and so on.
---
title: "Here we have a title, not too long"
author: "First Author and Second Author"
date: last-modified
date-format: "d-MMMM-YYYY"
lang: "es"
format:
titlepage-pdf:
documentclass: scrreport
titlepage: plain
titlepage-geometry:
- top=90mm
- bottom=60mm
- right=30mm
- left=30mm
titlepage-logo: "images/anyimages.png"
titlepage-bg-image: "images/anyimage2.png"
titlepage-theme:
elements: ["\\titleblock", "\\logoblock", "\\authorblock", "(some additional information)" ]
page-fontfamily: "Helvetica Neue"
page-align: center
title-fontsize: 30
title-align: center
title-fontstyle: []
title-space-after: 3cm
author-fontsize: 16
author-style: plain
logo-align: center
logo-size: 4cm
logo-space-after: 4cm
bg-image-location: "ULCorner"
bg-image-size: 21cm
pdf:
# Fonts
mainfont: Helvetica Neue
fontsize: 12pt
papersize: A4
margin-top: 25mm
margin-bottom: 25mm
margin-left: 25mm
margin-right: 25mm
toc: true
toc-depth: 2
toc-title: Táboa de contidos
editor: visual
---
## Introdución
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec condimentum eros. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed congue tellus at vehicula interdum. Vivamus dapibus ante vitae rhoncus posuere. Ut ut ipsum nisl. Nullam luctus viverra augue id feugiat. Fusce sollicitudin sed massa eget blandit. Pellentesque tempus lacinia metus, nec facilisis massa varius eget. Proin in felis sed arcu faucibus scelerisque. Sed hendrerit tortor nisl, sed mattis lectus luctus at. Nulla et lorem ac est venenatis posuere. Vivamus eget vehicula purus, sit amet mollis nunc. Phasellus pellentesque nisi eu porttitor egestas. Aliquam a aliquam lectus, eu iaculis mauris.
Suspendisse eu gravida orci. Suspendisse vehicula sagittis libero quis lobortis. Suspendisse potenti. Sed imperdiet ligula eu tellus tincidunt rutrum. Vivamus vel nibh vel lacus efficitur tempus. Maecenas sit amet erat at sapien blandit congue. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus vel nunc hendrerit, venenatis sapien nec, commodo libero. Ut vehicula porta euismod. Vivamus eu dolor neque. Mauris a dui faucibus, elementum dui nec, condimentum nibh.
Etiam aliquam, arcu eget ornare elementum, leo magna sollicitudin augue, vel dapibus lectus nisi ac ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec semper lacus mauris, ac maximus lectus volutpat nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed interdum, velit non sollicitudin volutpat, purus tellus aliquam lacus, et scelerisque ex nisi et ex. Vivamus porta purus ac mauris placerat, venenatis suscipit augue accumsan. Cras consequat dapibus efficitur.
Phasellus diam felis, condimentum vitae diam nec, tincidunt bibendum elit. Donec condimentum, orci in euismod vestibulum, sapien massa maximus lectus, vel interdum magna magna non lectus. Integer vitae nunc nec urna feugiat venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent sapien velit, molestie nec molestie vel, sodales at mauris. Maecenas accumsan malesuada ipsum eget pellentesque. Nam aliquet leo sit amet felis facilisis facilisis. Vivamus aliquam iaculis eros, non bibendum elit convallis ut. Quisque ut varius arcu. Vivamus pellentesque nisi vitae nisi vulputate, quis dapibus est efficitur. Aenean eget ipsum in lorem aliquet efficitur aliquet a est. In sit amet vehicula eros. Donec dui nulla, ultrices ut nisi non, ornare viverra ante.
Proin facilisis sit amet velit placerat porttitor. In congue risus id tempus congue. Cras rutrum justo at ultricies faucibus. Ut sed turpis nec nulla malesuada feugiat sed eu risus. In mattis eu tellus sit amet commodo. Nam molestie vulputate ullamcorper. Curabitur egestas ligula ut urna blandit faucibus.
And this is what I get in the two pages after the title page
UPDATE
I solved it partially, by following samcarter_is_at_topanswers.xyz's advice (using \restoregeometry). Then I realized that it was not only geometry, but I was also losing all other formats detailed under pdf:. To solve it I erased the pdf: line; that is, all pdf formats should directly go under "titlepage-pdf:". But, again, by doing so, the first page appeard with a large bottom margin, even when using \restoregeometry.
This is my code now:
---
title: "Here we have a title"
author: "Author 1 with surname & Author 2 with surname"
date: last-modified
date-format: "d-MMMM-YYYY"
lang: "es"
format:
titlepage-pdf:
documentclass: scrreport
titlepage: plain
titlepage-geometry:
- top=90mm
- bottom=60mm
- right=30mm
- left=30mm
titlepage-logo: "images/circularNegro.png"
titlepage-bg-image: "images/OsTres.png"
titlepage-theme:
elements: ["\\titleblock", "\\logoblock", "\\authorblock", "(some additional text)" ]
page-fontfamily: "Helvetica Neue"
page-align: center
title-fontsize: 30
title-align: center
title-fontstyle: []
title-space-after: 3cm
author-fontsize: 16
author-style: plain
logo-align: center
logo-size: 4cm
logo-space-after: 4cm
bg-image-location: "ULCorner"
bg-image-size: 21cm
# Fonts
mainfont: Helvetica Neue
fontsize: 12pt
papersize: A4
margin-top: 25mm
margin-bottom: 25mm
margin-left: 25mm
margin-right: 25mm
toc: true
toc-depth: 2
toc-title: Táboa de contidos
editor: visual
---
\restoregeometry
## Introdución
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec condimentum eros. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed congue tellus at vehicula interdum. Vivamus dapibus ante vitae rhoncus posuere. Ut ut ipsum nisl. Nullam luctus viverra augue id feugiat. Fusce sollicitudin sed massa eget blandit. Pellentesque tempus lacinia metus, nec facilisis massa varius eget. Proin in felis sed arcu faucibus scelerisque. Sed hendrerit tortor nisl, sed mattis lectus luctus at. Nulla et lorem ac est venenatis posuere. Vivamus eget vehicula purus, sit amet mollis nunc. Phasellus pellentesque nisi eu porttitor egestas. Aliquam a aliquam lectus, eu iaculis mauris.
Suspendisse eu gravida orci. Suspendisse vehicula sagittis libero quis lobortis. Suspendisse potenti. Sed imperdiet ligula eu tellus tincidunt rutrum. Vivamus vel nibh vel lacus efficitur tempus. Maecenas sit amet erat at sapien blandit congue. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus vel nunc hendrerit, venenatis sapien nec, commodo libero. Ut vehicula porta euismod. Vivamus eu dolor neque. Mauris a dui faucibus, elementum dui nec, condimentum nibh.
Etiam aliquam, arcu eget ornare elementum, leo magna sollicitudin augue, vel dapibus lectus nisi ac ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec semper lacus mauris, ac maximus lectus volutpat nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed interdum, velit non sollicitudin volutpat, purus tellus aliquam lacus, et scelerisque ex nisi et ex. Vivamus porta purus ac mauris placerat, venenatis suscipit augue accumsan. Cras consequat dapibus efficitur.
Phasellus diam felis, condimentum vitae diam nec, tincidunt bibendum elit. Donec condimentum, orci in euismod vestibulum, sapien massa maximus lectus, vel interdum magna magna non lectus. Integer vitae nunc nec urna feugiat venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent sapien velit, molestie nec molestie vel, sodales at mauris. Maecenas accumsan malesuada ipsum eget pellentesque. Nam aliquet leo sit amet felis facilisis facilisis. Vivamus aliquam iaculis eros, non bibendum elit convallis ut. Quisque ut varius arcu. Vivamus pellentesque nisi vitae nisi vulputate, quis dapibus est efficitur. Aenean eget ipsum in lorem aliquet efficitur aliquet a est. In sit amet vehicula eros. Donec dui nulla, ultrices ut nisi non, ornare viverra ante.
Proin facilisis sit amet velit placerat porttitor. In congue risus id tempus congue. Cras rutrum justo at ultricies faucibus. Ut sed turpis nec nulla malesuada feugiat sed eu risus. In mattis eu tellus sit amet commodo. Nam molestie vulputate ullamcorper. Curabitur egestas ligula ut urna blandit faucibus.
And this is what I get:
The problem is that quarto and/or the titlepage extension issues \restoregeometry at the wrong place. If one looks at the intermediate .tex file, one will see code like this:
...
\clearpage
\restoregeometry
%%% TITLE PAGE END
\end{titlepage}
...
However \restoregeometry needs to be used after the title page is closed (it would also make more sense to have the \clearpage after the title page...)
You can work around it my manually adding one more \restoregeometry before your text:
---
title: "Here we have a title, not too long"
author: "First Author and Second Author"
date: last-modified
date-format: "d-MMMM-YYYY"
lang: "es"
format:
titlepage-pdf:
documentclass: scrreport
titlepage: plain
titlepage-geometry:
- top=90mm
- bottom=60mm
- right=30mm
- left=30mm
titlepage-logo: "example-image-duck"
titlepage-bg-image: "example-image-duck"
titlepage-theme:
elements: ["\\titleblock", "\\logoblock", "\\authorblock", "(some additional information)" ]
page-fontfamily: "Helvetica Neue"
page-align: center
title-fontsize: 30
title-align: center
title-fontstyle: []
title-space-after: 3cm
author-fontsize: 16
author-style: plain
logo-align: center
logo-size: 4cm
logo-space-after: 4cm
bg-image-location: "ULCorner"
bg-image-size: 21cm
editor: visual
---
\restoregeometry
## Introdución
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec condimentum eros. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed congue tellus at vehicula interdum. Vivamus dapibus ante vitae rhoncus posuere. Ut ut ipsum nisl. Nullam luctus viverra augue id feugiat. Fusce sollicitudin sed massa eget blandit. Pellentesque tempus lacinia metus, nec facilisis massa varius eget. Proin in felis sed arcu faucibus scelerisque. Sed hendrerit tortor nisl, sed mattis lectus luctus at. Nulla et lorem ac est venenatis posuere. Vivamus eget vehicula purus, sit amet mollis nunc. Phasellus pellentesque nisi eu porttitor egestas. Aliquam a aliquam lectus, eu iaculis mauris.
Suspendisse eu gravida orci. Suspendisse vehicula sagittis libero quis lobortis. Suspendisse potenti. Sed imperdiet ligula eu tellus tincidunt rutrum. Vivamus vel nibh vel lacus efficitur tempus. Maecenas sit amet erat at sapien blandit congue. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus vel nunc hendrerit, venenatis sapien nec, commodo libero. Ut vehicula porta euismod. Vivamus eu dolor neque. Mauris a dui faucibus, elementum dui nec, condimentum nibh.
Etiam aliquam, arcu eget ornare elementum, leo magna sollicitudin augue, vel dapibus lectus nisi ac ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec semper lacus mauris, ac maximus lectus volutpat nec. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed interdum, velit non sollicitudin volutpat, purus tellus aliquam lacus, et scelerisque ex nisi et ex. Vivamus porta purus ac mauris placerat, venenatis suscipit augue accumsan. Cras consequat dapibus efficitur.
Phasellus diam felis, condimentum vitae diam nec, tincidunt bibendum elit. Donec condimentum, orci in euismod vestibulum, sapien massa maximus lectus, vel interdum magna magna non lectus. Integer vitae nunc nec urna feugiat venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent sapien velit, molestie nec molestie vel, sodales at mauris. Maecenas accumsan malesuada ipsum eget pellentesque. Nam aliquet leo sit amet felis facilisis facilisis. Vivamus aliquam iaculis eros, non bibendum elit convallis ut. Quisque ut varius arcu. Vivamus pellentesque nisi vitae nisi vulputate, quis dapibus est efficitur. Aenean eget ipsum in lorem aliquet efficitur aliquet a est. In sit amet vehicula eros. Donec dui nulla, ultrices ut nisi non, ornare viverra ante.
Proin facilisis sit amet velit placerat porttitor. In congue risus id tempus congue. Cras rutrum justo at ultricies faucibus. Ut sed turpis nec nulla malesuada feugiat sed eu risus. In mattis eu tellus sit amet commodo. Nam molestie vulputate ullamcorper. Curabitur egestas ligula ut urna blandit faucibus.

How to I keep a kable caption with a floating table?

I'm writing a pdf report in RMarkdown and want to float_left a kable with a caption. This works without a caption:
---
title: "test2"
output: pdf_document
header-includes:
- \usepackage{wrapfig}
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
options(knitr.table.format="latex")
```{r, echo=FALSE}
library(knitr)
library(kableExtra)
kbl(head(cars), booktabs=T) %>%
kable_styling(latex_options = "striped", position = "float_left")
But adding caption="A Caption" to the kbl line, as in
kbl(head(cars), caption="A Caption", booktabs=T) %>%
throws this error:
! Extra }, or forgotten \endgroup.
\endwraptable ...kip \egroup \box \z# \fi \egroup
\WF#floatstyhook \def \wid...
l.164 \end{wraptable}
Error: LaTeX failed to compile test2.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See test2.log for more info.
Execution halted
I've searched SO for what I'd think would be a frequent situation, but have found nothing. It must be something simple I'm missing. Help please.
There is a solution here (although the caption moves to the bottom): https://github.com/haozhu233/kableExtra/issues/221#issuecomment-400473530
Following this solution, you could try this .Rmd file:
---
title: "test2"
output: pdf_document
header-includes:
- \usepackage{wrapfig}
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
options(knitr.table.format="latex")
```
Lorem ipsum dolor sit amet, consecteturadipiscing elit. Cras sit amet mauris inex ultricies elementum vel rutrum dolor.Phasellus tempor convallis dui, in hendreritmauris placerat scelerisque. Maecenas a ac-cumsan enim, a maximus velit. Pellentesquein risus eget est faucibus convallis nec atnulla. Phasellus nec lacinia justo. Morbifermentum, orci id varius accumsan, nibhneque porttitor ipsum, consectetur luctusrisus arcu ac ex. Aenean a luctus augue. Suspendisse et auctor nisl. Suspendisse cursus ultrices quam nonvulputate. Phasellus et pharetra neque, vel feugiat erat. Sed feugiat elit at mauris commodo consequat. Sedcongue lectus id mattis hendrerit. Mauris turpis nisl, congue eget velit sed, imperdiet convallis magna. Namaccumsan urna risus, non feugiat odio vehicula eget.
```{r, echo=FALSE}
library(knitr)
library(kableExtra)
library(xtable)
xtable2kable <- function(x) {
out <- capture.output(print(x, table.placement = NULL))[-(1:2)]
out <- paste(out, collapse = "\n")
structure(out, format = "latex", class = "knitr_kable")
}
xtable(head(cars), booktabs=T, caption="A Caption") %>%
xtable2kable() %>%
kable_styling(latex_options = "striped", position = "float_left")
```
Lorem ipsum dolor sit amet, consecteturadipiscing elit. Cras sit amet mauris inex ultricies elementum vel rutrum dolor.Phasellus tempor convallis dui, in hendreritmauris placerat scelerisque. Maecenas a ac-cumsan enim, a maximus velit. Pellentesquein risus eget est faucibus convallis nec atnulla. Phasellus nec lacinia justo. Morbifermentum, orci id varius accumsan, nibhneque porttitor ipsum, consectetur luctusrisus arcu ac ex. Aenean a luctus augue. Suspendisse et auctor nisl. Suspendisse cursus ultrices quam nonvulputate. Phasellus et pharetra neque, vel feugiat erat. Sed feugiat elit at mauris commodo consequat. Sedcongue lectus id mattis hendrerit. Mauris turpis nisl, congue eget velit sed, imperdiet convallis magna. Namaccumsan urna risus, non feugiat odio vehicula eget.
Lorem ipsum dolor sit amet, consecteturadipiscing elit. Cras sit amet mauris inex ultricies elementum vel rutrum dolor.Phasellus tempor convallis dui, in hendreritmauris placerat scelerisque. Maecenas a ac-cumsan enim, a maximus velit. Pellentesquein risus eget est faucibus convallis nec atnulla. Phasellus nec lacinia justo. Morbifermentum, orci id varius accumsan, nibhneque porttitor ipsum, consectetur luctusrisus arcu ac ex. Aenean a luctus augue. Suspendisse et auctor nisl. Suspendisse cursus ultrices quam nonvulputate. Phasellus et pharetra neque, vel feugiat erat. Sed feugiat elit at mauris commodo consequat. Sedcongue lectus id mattis hendrerit. Mauris turpis nisl, congue eget velit sed, imperdiet convallis magna. Namaccumsan urna risus, non feugiat odio vehicula eget.
Output:

groff putting single word on line after trap

I have a groff document, however, when I set the trap to create a footer, groff puts one word after the specified height, then executes the macro for the trap. I am compilinig the document with groff -Tpdf -P-pletter ex.groff > ex.pdf.
ex.groff:
.de foot
. bp
..
.wh -1i foot
.ls 2
.nh
.ad l
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
In pulvinar, ex id ultricies tincidunt, ligula neque hendrerit velit, id feugiat enim nisl eu justo.
In bibendum elementum auctor.
Fusce dapibus sed nulla in malesuada.
Ut vehicula ultrices nibh, at iaculis est consectetur vitae.
Phasellus condimentum est in elit ultrices mattis.
Mauris orci sem, dictum eleifend augue vitae, fermentum convallis nunc.
In semper vitae nunc a congue.
Pellentesque pretium risus vitae turpis mollis, a blandit lacus vestibulum.
Vivamus congue urna mauris, ac viverra ipsum tristique id.
Maecenas mauris massa, ullamcorper eu fringilla consequat, molestie ac nunc.
Etiam luctus tortor id odio fringilla, eu eleifend leo imperdiet.
.br
Integer venenatis et mi dignissim dictum.
Duis rutrum tortor lectus, eget pulvinar risus viverra id.
Vivamus vel vestibulum neque, in posuere libero.
Praesent eu erat ut ligula consequat consectetur sed nec magna.
Pellentesque vitae rhoncus felis.
Suspendisse potenti.
Nullam in sodales nisi.
Nulla vitae tempus sem, non laoreet felis.
.br
Fusce velit metus, condimentum non ultricies facilisis, dignissim eu diam.
Donec lorem ante, pulvinar et congue non, iaculis ac leo.
Nam sit amet risus dui.
Mauris lorem nunc, facilisis non odio dapibus, gravida posuere leo.
Quisque pellentesque tincidunt dolor sed eleifend.
Nam eget augue feugiat, tincidunt orci et, tempor quam.
Suspendisse purus mi, mollis quis porta quis, tincidunt vel odio.
Pellentesque nisl sapien, posuere sed accumsan eget, elementum vel est.
Maecenas cursus neque quis arcu varius, at efficitur dui dictum.
.br
Etiam semper ultrices ipsum, eget gravida risus condimentum vel.
Suspendisse sed tincidunt lectus.
Suspendisse faucibus gravida lorem, vel volutpat eros hendrerit nec.
Vestibulum ac leo eget metus sollicitudin rhoncus.
Fusce venenatis ligula a sodales varius.
Etiam mauris nisi, ultricies eu ex quis, vehicula facilisis nulla.
Pellentesque eu arcu nec urna tempor fringilla.
Sed consectetur, leo at convallis finibus, nunc mi feugiat dolor, a tincidunt tortor ipsum vitae sem.
Vestibulum tincidunt, nisl vel hendrerit consequat, leo felis rutrum tellus, quis tempor odio leo in lectus.
Donec placerat tempor turpis nec efficitur.
Donec quis erat a augue tempor lacinia sit amet ac felis.
Donec a dui ut diam tempus cursus.
Sed auctor, lorem sed interdum blandit, erat dui tristique dolor, vitae condimentum lorem dui ac augue.
.br
Phasellus et dignissim lacus.
Vestibulum a dolor sodales est bibendum sodales.
Nulla gravida erat lacus, in placerat sapien consequat id.
Donec vitae pulvinar neque.
Etiam a semper augue.
Phasellus sed justo id velit imperdiet finibus.
Nam eget vulputate orci, ac congue nunc.
Pellentesque sollicitudin, nulla quis luctus pulvinar, velit ex feugiat leo, sed euismod ante odio at est.
Duis velit sapien, ornare vel vulputate in, consectetur non neque.
Curabitur non libero at magna venenatis cursus et vel urna.
.br
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
In pulvinar, ex id ultricies tincidunt, ligula neque hendrerit velit, id feugiat enim nisl eu justo.
In bibendum elementum auctor.
Fusce dapibus sed nulla in malesuada.
Ut vehicula ultrices nibh, at iaculis est consectetur vitae.
Phasellus condimentum est in elit ultrices mattis.
Mauris orci sem, dictum eleifend augue vitae, fermentum convallis nunc.
In semper vitae nunc a congue.
Pellentesque pretium risus vitae turpis mollis, a blandit lacus vestibulum.
Vivamus congue urna mauris, ac viverra ipsum tristique id.
Maecenas mauris massa, ullamcorper eu fringilla consequat, molestie ac nunc.
Etiam luctus tortor id odio fringilla, eu eleifend leo imperdiet.
which produces the undesired word right after the trap height (the word on the final line should be on the next page)
How can I make it so this word appears on the next page, instead of right where the trap should be?
I dont have the reference to hand, but from my notes, in the table listing the basic troff commands we have
.bp +-N N=1 Bbv new page. number of next page
where Bbv are a set of flags including this: b will cause line break unless use ' instead of . so the answer is to define your macro to call 'bp instead of .bp.
.de foot
' bp
..
The online groff doc briefly says about requests:
A request line begins with a control character, which is either a
single quote (', the no-break control character) or a period (., the normal control character).
and for bp has an example using 'bp.

Is is possible to load more testdata with liquibase

I want to load a whole html file as testdata with liquibase. So far I've used the approach with loading testdata from csv file, but it is not designed to handle huge html's.
Is there a way to achieve it?
Here is an example to make it clear:
I have a table named Movie. The fields are: id, title, description. In a databaseChangeLog section I point to a file where I store the testdata:
<loadData encoding="UTF-8"
file="config/liquibase/testdata/movie.csv"
separator=";"
tableName="movie"/>
The content is as follows:
id;title;description
1;Titanic;great movie
2;Forrest Gump;another great movie
Now I want to change the description to something that is closer to the real usecase. Lets say this HTML:
<div id="lipsum">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce porta pulvinar lacus eget egestas. Ut quis efficitur turpis. Nunc tincidunt turpis lorem, eget vestibulum nisi sodales at. Quisque in tortor et sapien ornare venenatis. Integer pulvinar nec ipsum malesuada porta. Sed massa metus, condimentum non varius ornare, sollicitudin at dui. Praesent porta, ante et interdum convallis, tellus augue tempus nisl, sit amet mollis augue nisl vel metus.
</p>
<p>
Nam quis libero rhoncus, facilisis magna ut, bibendum urna. Nullam sit amet volutpat turpis. Praesent eget aliquet orci. Duis dignissim tellus erat, eget fermentum augue dapibus sed. Quisque vitae est ipsum. Quisque sit amet libero eget nisi faucibus maximus vel a sem. Proin maximus neque arcu, sit amet eleifend dolor ornare at. Suspendisse laoreet lobortis tellus sed consequat. Nunc commodo ligula eget neque porta consectetur. Mauris sagittis elit in sodales luctus.
</p>
</div>
The content won't fit into the csv file. I could delete all the newlines, but it makes the file unmaintainable.
loadData has a column attribute which in turn has a valueClobFile attribute where you could put in a path to a (html) file.
Checkout these two files in the liquibase integration tests that show a use of this:
batchInsert.changelog.xml
batchInsert.csv

PHPStorm: reformat long comments

How do I reformat long (doc) comments in my code? Hitting "reformat" doesn't work. For example when I have this in my code:
/**
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin porta ac urna quis sagittis. Nam risus leo, ultricies
* id ante sed, bibendum rutrum diam.
* Suspendisse viverra dui et ligula aliquet, sit amet mattis magna consequat. Morbi venenatis tempus mattis.
* Praesent mollis quam non turpis laoreet placerat.
*/
How do I turn it into this?
/**
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin porta ac urna quis sagittis. Nam risus leo, ultricies
* id ante sed, bibendum rutrum diam. Suspendisse viverra dui et ligula aliquet, sit amet mattis magna consequat. Morbi
* venenatis tempus mattis. Praesent mollis quam non turpis laoreet placerat.
*/
Such functionality is not currently available in PhpStorm.
But you may try Wrap to Column plugin -- it may do OK for you (seems to work -- based on very quick test).
Related tickets:
http://youtrack.jetbrains.com/issue/WI-374
http://youtrack.jetbrains.com/issue/WI-3713
http://youtrack.jetbrains.com/issue/WI-13469
http://youtrack.jetbrains.com/issue/WI-18264