Template:File: Difference between revisions

From Octave
Jump to navigation Jump to search
(change template color for blue)
(change file description background color again)
Line 1: Line 1:
<includeonly><div style="border: 1px solid rgb(191, 191, 255); padding: .2em .3em; margin: .2em .2em; background-color: rgb(242, 242, 255);"><div style="background-color: rgb(193, 193, 255); padding: .2em; margin: .2em; border: solid 1px rgb(112, 112, 255); font-size: 92%; ">'''File:''' {{{1}}}</div>{{{2}}}</div></includeonly><noinclude>{{TemplateDoc}}[[Category:Templates]]</noinclude>
<includeonly><div style="border: 1px solid rgb(191, 191, 255); padding: .2em .3em; margin: .2em .2em; background-color: rgb(242, 242, 255);"><div style="background-color: rgb(135, 206, 235); padding: .2em; margin: .2em; border: solid 1px rgb(112, 112, 255); font-size: 92%; ">'''File:''' {{{1}}}</div>{{{2}}}</div></includeonly><noinclude>{{TemplateDoc}}[[Category:Templates]]</noinclude>

Revision as of 23:22, 15 December 2011

[edit]

Template-info.png Template Documentation

This template is used to include the contents of files. The first argument is the filename/filepath but can be left blank.

  • the actual code still needs to be inside a <pre> ... </pre> block.
  • to markup only the name of a file (e.g., /etc/octave3.2.conf), use Template:Path instead.

Example:

{{File|~/.octaverc|<pre>
## make prompt look like python
PS1(">>> ")
PS2("... ")

## alias help to man
function man (name)
  help (char (name))
endfunction

## load all packages
pkg load all;
</pre>}}

Will produce:

File: ~/.octaverc
## make prompt look like python
PS1(">>> ")
PS2("... ")

## alias help to man
function man (name)
  help (char (name))
endfunction

## load all packages
pkg load all;