comparison doc/interpreter/tips.txi @ 19630:0e1f5a750d00

maint: Periodic merge of gui-release to default.
author John W. Eaton <jwe@octave.org>
date Tue, 20 Jan 2015 10:24:46 -0500
parents 83b88e20e9c1 446c46af4b42
children 4197fc428c7d
comparison
equal deleted inserted replaced
19626:37d37297acf8 19630:0e1f5a750d00
4 @c 4 @c
5 @c Octave is free software; you can redistribute it and/or modify it 5 @c Octave is free software; you can redistribute it and/or modify it
6 @c under the terms of the GNU General Public License as published by the 6 @c under the terms of the GNU General Public License as published by the
7 @c Free Software Foundation; either version 3 of the License, or (at 7 @c Free Software Foundation; either version 3 of the License, or (at
8 @c your option) any later version. 8 @c your option) any later version.
9 @c 9 @c
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT 10 @c Octave is distributed in the hope that it will be useful, but WITHOUT
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 @c for more details. 13 @c for more details.
14 @c 14 @c
15 @c You should have received a copy of the GNU General Public License 15 @c You should have received a copy of the GNU General Public License
16 @c along with Octave; see the file COPYING. If not, see 16 @c along with Octave; see the file COPYING. If not, see
17 @c <http://www.gnu.org/licenses/>. 17 @c <http://www.gnu.org/licenses/>.
18 18
19 @node Tips and Standards 19 @node Tips and Standards
121 ## This file is part of Octave. 121 ## This file is part of Octave.
122 ## 122 ##
123 ## Octave is free software; you can redistribute it and/or 123 ## Octave is free software; you can redistribute it and/or
124 ## modify it under the terms of the GNU General Public 124 ## modify it under the terms of the GNU General Public
125 ## License as published by the Free Software Foundation; 125 ## License as published by the Free Software Foundation;
126 ## either version 3 of the License, or (at your option) any 126 ## either version 3 of the License, or (at your option) any
127 ## later version. 127 ## later version.
128 ## 128 ##
129 ## Octave is distributed in the hope that it will be useful, 129 ## Octave is distributed in the hope that it will be useful,
130 ## but WITHOUT ANY WARRANTY; without even the implied 130 ## but WITHOUT ANY WARRANTY; without even the implied
131 ## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 131 ## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
282 It is a good idea for most lines to be no wider than 60 characters. 282 It is a good idea for most lines to be no wider than 60 characters.
283 283
284 However, rather than simply filling the entire documentation string, you 284 However, rather than simply filling the entire documentation string, you
285 can make it much more readable by choosing line breaks with care. 285 can make it much more readable by choosing line breaks with care.
286 Use blank lines between topics if the documentation string is long. 286 Use blank lines between topics if the documentation string is long.
287 287
288 @item 288 @item
289 @strong{Do not} indent subsequent lines of a documentation string so 289 @strong{Do not} indent subsequent lines of a documentation string so
290 that the text is lined up in the source code with the text of the first 290 that the text is lined up in the source code with the text of the first
291 line. This looks nice in the source code, but looks bizarre when users 291 line. This looks nice in the source code, but looks bizarre when users
292 view the documentation. Remember that the indentation before the 292 view the documentation. Remember that the indentation before the
347 @example 347 @example
348 @group 348 @group
349 -*- texinfo -*- 349 -*- texinfo -*-
350 @@deftypefn @{Function File@} @{@@var@{ret@} =@} fn (@dots{}) 350 @@deftypefn @{Function File@} @{@@var@{ret@} =@} fn (@dots{})
351 @@cindex index term 351 @@cindex index term
352 Help text in Texinfo format. Code samples should be marked 352 Help text in Texinfo format. Code samples should be marked
353 like @@code@{sample of code@} and variables should be marked 353 like @@code@{sample of code@} and variables should be marked
354 as @@var@{variable@}. 354 as @@var@{variable@}.
355 @@seealso@{fn2, fn3@} 355 @@seealso@{fn2, fn3@}
356 @@end deftypefn 356 @@end deftypefn
357 @end group 357 @end group
372 372
373 @item @@cindex index term 373 @item @@cindex index term
374 This generates an index entry, and can be useful when the function is 374 This generates an index entry, and can be useful when the function is
375 included as part of a larger piece of documentation. It is ignored 375 included as part of a larger piece of documentation. It is ignored
376 within Octave's help viewer. Only one index term may appear per line 376 within Octave's help viewer. Only one index term may appear per line
377 but multiple @@cindex lines are valid if the function should be 377 but multiple @@cindex lines are valid if the function should be
378 filed under different terms. 378 filed under different terms.
379 379
380 @item @@var@{variable@} 380 @item @@var@{variable@}
381 All variables should be marked with this macro. The markup of variables 381 All variables should be marked with this macro. The markup of variables
382 is then changed appropriately for display. 382 is then changed appropriately for display.
566 566
567 @noindent 567 @noindent
568 which demonstrates most of the concepts discussed above. 568 which demonstrates most of the concepts discussed above.
569 @iftex 569 @iftex
570 This documentation string renders in Info format as 570 This documentation string renders in Info format as
571 @c Note: use the actual output of info below, rather than try and 571 @c Note: use the actual output of info below, rather than try and
572 @c reproduce it here to prevent it looking different from how it would 572 @c reproduce it here to prevent it looking different from how it would
573 @c appear with info. 573 @c appear with info.
574 574
575 @example 575 @example
576 -- Function File: C = nchoosek (N, K) 576 -- Function File: C = nchoosek (N, K)