作者hijkxyzuw (imgur.com/qMWbckp.gif)
看板Linux
標題[問題] 中文 man-pages 的折行警告
時間Sun Jan 28 13:29:41 2018
我自己有把常用東西寫成 man-pages 的習慣,
像之前把台灣常見的固定 IP 寫成 man-pages ,
插人 IP 比較方便。
http://github.com/gholk/loco/tree/master/man
因為學校是中文,一定要用,
但中文在 groff 處理的時候斷行會有問題,
間隔會變很怪。
如果是用 pager 看就沒差,
但如果只想查,像 `man tanet | fgrep 140.128` ,
就會把警告一起丟出來,蠻不方便的。
<standard input>:8: warning [p 1, 1.5i]: cannot adjust line
<standard input>:72: warning [p 2, 0.3i]: cannot adjust line
<standard input>:699: warning [p 2, 9.8i, div `3tbd111,0', 0.0i]: cannot adjustline
<standard input>:2426: warning [p 2, 88.0i, div `3tbd2,1', 0.0i]: cannot adjustline
<standard input>:2426: warning [p 2, 88.0i, div `3tbd2,1', 0.2i]: can't break line
<standard input>:2431: warning [p 2, 88.0i, div `3tbd3,1', 0.0i]: cannot adjustline
<standard input>:2497: warning [p 3, 5.5i]: cannot adjust line
<standard input>:2498: warning [p 3, 5.7i]: cannot adjust line
│ 140.128.1~40 靜宜大學 │
│ 140.128.41~60 南開科技大學 │
│ 140.128.61~70 中國醫藥大學 │
不知道有沒有辦法在 man-pages 裡抑止警告,
希望是在 groff 文件裡可以控制。
用選項的話 man --warning='' tanet 好像沒用。
--
如果我是甜甜圈,那麼…
你會是那個最適合我的法蘭克福香腸嗎?
還是註定會讓我痛徹心扉的法國麵包呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.116.102.187
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1517117385.A.76C.html
※ 編輯: hijkxyzuw (140.116.102.187), 01/28/2018 13:30:17
→ GaliTW: 用preconv先轉過 01/28 14:04
我轉了還是一樣
preconv tanet.7 > tanetp.7
man ./tanetp.7 | grep 128
# 一樣上面那堆警告
※ 編輯: hijkxyzuw (140.116.102.187), 01/28/2018 14:12:43
這篇有幫助,在第一行加入
. mso zh.tmac
就好了
https://github.com/man-pages-zh/wiki/wiki/手册页的中文排版
※ 編輯: hijkxyzuw (140.116.102.187), 01/28/2018 14:21:27
→ GaliTW: 對耶 我剛看了一下你那些檔案有正常轉utf8了 01/28 15:12
→ GaliTW: 問題是出在有些CJK裡面的符號沒有轉對 01/28 15:13