【问题标题】:Is there a way to exit double column mode without page break in groff?有没有办法退出双列模式而不在 groff 中分页?
【发布时间】:2022-01-21 12:30:19
【问题描述】:

我正在尝试在 groff/troff 中撰写我的简历,并希望将我的联系方式放在顶部的两列中,一列在左侧调整,另一列在右侧调整。我试过这样做:

.2C
Name
.LP
Address line 1
.LP
Address line 1
.LP
Phone number
.LP
Email@ddress
.LP
Link to Github

问题是,当我返回单个列时,会自动分页,并且我的详细信息会显示在左侧列中。

有没有办法避免分页,只让页面的一小部分显示双栏?

【问题讨论】:

    标签: pdf groff troff


    【解决方案1】:

    2 列格式不是那么灵活。

    您可能需要的是tbl。通常情况如下:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tempus tincidunt
    velit, eleifend auctor nisi tristique semper.
    .TS
    expand,tab(@);
    lw35 rw35.
    T{
    Name: Me
    T}@T{
    Email: lorem@ipsum.com
    T}
    T{
    Address: Here
    T}@T{
    Telephone: available
    T}
    .TE
    
    Pellentesque egestas mi scelerisque
    neque lobortis faucibus. Phasellus semper erat vitae neque aliquet molestie.
    Ut sit amet vulputate dui. Maecenas mattis, nisl id fringilla scelerisque, mi
    mauris vestibulum massa, at iaculis ante elit id sem. Etiam scelerisque orci
    at dapibus euismod.
    

    并生成

    tbl columntest.ms | groff -ms  > out.ps
    

    您可能想在列宽上稍作调整,直到您满意为止。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-09-20
      • 2020-07-04
      • 2022-12-28
      • 1970-01-01
      • 1970-01-01
      • 2022-01-17
      • 1970-01-01
      相关资源
      最近更新 更多