Editing Template:File/Doc

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
This template is used to include the contents of files. The first argument is the filename/filepath but can be left blank.
This template is used to include the contents of files.


* the actual code still needs to be inside a {{Codeline|<nowiki><pre> ... </pre></nowiki>}} block.
Example: <pre>{{File|/etc/conf.d/915resolution|<pre>
* to markup ''only'' the name of a file (e.g., {{path|/etc/octave3.2.conf}}), use [[Template:Path]] instead.
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/915resolution/files/confd,v 1.3 2007/04/17 16:52:24 genstef Exp $


Example:
# Config file for /etc/init.d/915resolution
<pre>{{File|~/.octaverc|<pre>
# based on the config file included with sys-apps/855resolution
## make prompt look like python
PS1(">>> ")
PS2("... ")


## alias help to man
# this example will replace mode "4d" with 1280x768x24
function man (name)
# to replace more than one mode do something like this
  help (char (name))
#replace="'4d 1280 768 24' '5c 1400 1050 16'"
endfunction
replace="'5c 800 480 32'"


## load all packages
# if you want to log the output add the file here.
pkg load all;
# this will be overwritten at every boot
log="/var/log/915resolution"
&lt;/pre>}}</pre>
&lt;/pre>}}</pre>


Will produce:
Will produce:
{{File|~/.octaverc|<pre>
{{File|/etc/conf.d/915resolution|<pre>
## make prompt look like python
# Copyright 1999-2006 Gentoo Foundation
PS1(">>> ")
# Distributed under the terms of the GNU General Public License v2
PS2("... ")
# $Header: /var/cvsroot/gentoo-x86/sys-apps/915resolution/files/confd,v 1.3 2007/04/17 16:52:24 genstef Exp $


## alias help to man
# Config file for /etc/init.d/915resolution
function man (name)
# based on the config file included with sys-apps/855resolution
  help (char (name))
endfunction


## load all packages
# this example will replace mode "4d" with 1280x768x24
pkg load all;
# to replace more than one mode do something like this
#replace="'4d 1280 768 24' '5c 1400 1050 16'"
replace="'5c 800 480 32'"
 
# if you want to log the output add the file here.
# this will be overwritten at every boot
log="/var/log/915resolution"
</pre>}}
</pre>}}


[[Category:Template with documentation]]
To markup ''only'' the name of a file (e.g., {{path|/etc/conf.d/915resolution}}), use [[Template:Path]] instead.
 
<noinclude>[[Category:Template Documentation]]</noinclude>
Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Templates used on this page: