2009-10-17 33 views
3

我想充分證明EMACS上的膠乳代碼,以便我的乳膠代碼看起來更好。比如,我記得我的導師給我乳膠完全合理的方式是這樣的:我如何完全證明EMACS上的膠乳代碼

In ~\cite{Hummel2004}, authors described an approach for harvesting 
software components from the Web. The basic idea is to use the Web as 
the underlying repository, and to utilize standard search engines, 
such as Google, as the means of discovering appropriate software 
assets. Other researchers have crawled through Internet publicly 
available CVS repositories to build their own source code search 
engines (e.g., SPARS-J)~\cite{Matsushita2005}. 

我想,他的列寬設置爲70列。 有人可以給我一個提示嗎?

回答

3

如果您選擇該區域,然後按Ctrl-u M-x填充區域您將得到「完全正確」。

+2

還有'fill-paragraph'與'M-q'綁定。爲了得到充分的理由,使用任何前綴(如'C-u',但在這種情況下'M-1'更容易到達)。 –

1

M-X的設置理由全

使用Refill mode事後不必打字後再次運行該命令。

6

標準fill.el包中包含命令justify-current-line,它是您所需要的一部分。從功能的幫助:

 
Do some kind of justification on this line. 
Normally does full justification: adds spaces to the line to make it end at 
the column given by `current-fill-column'. 
Optional first argument how specifies alternate type of justification: 
it can be `left', `right', `full', `center', or `none'. 
If how is t, will justify however the `current-justification' function says to 

而其他海報已經給你magicall invokation:

M-x set-justification 

作爲哲學方面說明,固定wdith文本對齊的一點是假的在不靈活的輸出設備上進行真正的排版。所以將它應用於LaTeX源似乎對我來說有點奇怪。此外,我幾個月來一直在使用LaTeX文檔中的「一句一句」方法,並發現它確實提高了LaTeX的可編輯性和源代碼控制行爲,所以我建議不要這樣做。

1

要獲取文件本身(而不是像longlines-mode不改變文件的結構)換行,我用auto-fill-mode,可自動適用M-qfill-paragraph)到每個段落。例如,我在mail-mode中使用auto-fill-mode。你可以做你的LaTeX的模式類似與這樣的鉤:

(add-hook 'TeX-mode-hook 'turn-on-auto-fill) 

假設你的TeX模式的鉤子TeX-mode-hook