octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[CHANGESET] line width in code examples


From: Thorsten Meyer
Subject: [CHANGESET] line width in code examples
Date: Thu, 16 Oct 2008 22:02:21 +0200
User-agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724)

Jaroslav Hajek wrote: [in Re: minor correction in container.txi, first contribution]

A question regarding formatting of examples:
Is there a rule for the maximum line length of examples? If not I
would suggest introducing one that makes sure that an example line
fits on one line in all of the pdf and ps documents.

    

A good idea. I think that a vague recommendation "keep your example
code lines short enough to fit on pages in pdf and ps" should be
enough; feel free to add it. If you think a fixed width should be
prescribed, I suggest you start discussion in a new thread
Here is a changeset to add such a recommendation to contrib.txi. I also added a little
text ruler to help the documentation author to find the appropriate line width.

Thorsten


# HG changeset patch
# User Thorsten Meyer <address@hidden>
# Date 1224187270 -7200
# Node ID 220d8dd4e17fd35fc9c2ce5cd75d151ce54b288b
# Parent  ec50e81ea930e8882c341a98d15903f673009b03
recommend limited line width in code examples

diff -r ec50e81ea930 -r 220d8dd4e17f doc/ChangeLog
--- a/doc/ChangeLog     Tue Oct 14 21:52:44 2008 +0200
+++ b/doc/ChangeLog     Thu Oct 16 22:01:10 2008 +0200
@@ -1,3 +1,7 @@
+2008-10-16  Thorsten Meyer  <address@hidden>
+        * interpreter/contrib.txi: added recommendation of limited
+          line width in code examples
+          
 2008-10-03  Thorsten Meyer  <address@hidden>
        * interpreter/contrib.txi: added example for mercurial queues
 
diff -r ec50e81ea930 -r 220d8dd4e17f doc/interpreter/contrib.txi
--- a/doc/interpreter/contrib.txi       Tue Oct 14 21:52:44 2008 +0200
+++ b/doc/interpreter/contrib.txi       Thu Oct 16 22:01:10 2008 +0200
@@ -306,5 +306,17 @@
 
 The M4 macro language is mainly used for autoconf configuration files. You 
should
 follow normal M4 rules when contributing to these files. Some M4 files come
-from external source, namely the Autoconf archive 
@url{http://autoconf-archive.cryp.to}.
+from external source, namely the Autoconf archive
address@hidden://autoconf-archive.cryp.to}.
 
+If you give a code example in the documentation written in texinfo with the 
address@hidden@@example} environment, you should be aware that the text within 
such an 
+environment will not be wrapped. It is recommended that you keep the lines
+short enough to fit on pages in the generated pdf or ps documents. Here is a 
+ruler (in an @code{@@example} environment) for finding the appropriate line 
+width:
+
address@hidden
+         1         2         3         4         5         6         7         
8
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
address@hidden example

reply via email to

[Prev in Thread] Current Thread [Next in Thread]