Slide Tutorial - Collected Slides
|
|
Slide 1
| 1 Introduction
| Slide Tutorial - Introduction |
Use
m4 macro package
for slides
- "Relatively" easy
- Painless
- Hides many HTML details
- Portable
- Quick tutorial slides
Details follows:
Slide 2
| 1
| Slide Tutorial - Disclaimer |
Before tackling tutorial slides should be
somewhat familiar with the
macro package.
- Many HTML formatting commands are
redefined via macro definitions
- Easier for web authors
- "Raw" html can be used any time (but unnecessary)
- Better & more reliable for formatting issues
- Portable internal web pages references
Slide 3
| 1
| Slide Tutorial - Things to Know |
Things to know (with regards to this web page information):
- WEBROOT refers to the `root' of this m4 macro website
This macro package knows the
WEBROOT as
http://rkowen.owentrek.com/
Or ../../../ (3 directories up) from this "tutorial" directory.
Slide 4
| 2 Start of Steps
| Slide Tutorial - Start of Steps |
Directory
../slidetmp/ (relative to the directory
for this webpage)
contains the "bare-bones" structure or template for tutorial set of
slides using the
m4
macro package.
Follow the detailed instructions
Slide 5
| 2.1 Set Up Directory
| Slide Tutorial - Set Up Directory |
- Create directory for slides
mkdir xxxdir
where xxxdir is whatever desciptive name you give the directory.
- Copy files from the template directory to the new directory
cp webroot/howto/webpaging/slidetmp/* xxxdir
cp webroot/howto/webpaging/slidetmp/.??* xxxdir
The last command copies the "dot files"
(.level & .list)
Slide 6
| 2.2 Naming of Slides
| Slide Tutorial - Naming Slides |
- Use
slide.htm4.template as template for each slide
- Only worry about the contents
- Macro package takes care of
previous & next slide links and the slide number.
- Name each slide
something.htm4
(e.g. page_1.htm4, slide_3.htm4, slide_1ab.htm4,
etc.).
- Extension "
.htm4" is necessary
Slide 7
2.3 slide.m4.template
| Slide Tutorial - slide.htm4.template |
The following is
slide.htm4.template:
include(.level)@[]@_DNL
_SLIDE
START_HTML(_SUBTITLE(xxxslidesubtitle), index, xxxthis,
$Date$
)
<!-- _REVISION( $Revision$ ) -->
<!-- _RCSID( $Id$ ) -->
<!-- put slide contents here -->
END_HTML
Slide 8
| 2.3.1 Template Changes
| Slide Tutorial - Template Changes |
- Change everything that begins with an `xxx'.
-
- xxxslidesubtitle
- A subtitle for this slide
modified by _SUBTITLE macro in
.level file
- xxxthis
- Name of file (WITHOUT the
.htm4 extension)
Slide 9
| 2.4 Caveats: Referencing Pages
| Slide Tutorial - Caveats |
- Refer to other tutorial slides in the series with:
_SPAGE(relative_url_no_file_extension
, descriptive text).
- Refer to other web pages under this m4 website with:
_PAGE(relative_url_no_file_extension
, descriptive text).
- Refer to other pages out on the web with:
_URL(full_url_of_page
, descriptive text).
- If "Descriptive text" contains commas (`,'s) then
bracket text with one or more square brackets
(@[]@s)
- Commas have special meaning for the
m4 macros and need to be "escaped".
Slide 10
| 2.4.1 Keywords
| Slide Tutorial - Keywords |
- To enter keywords ... use the
_KEYWORDS( ... ) macro
- Only use it for the first slide
- see Web page on "webpaging"
for further details.
Slide 11
2.5 .level - Common Information
| Slide Tutorial - .level Introduction |
- Edit the
.level file
- Contains common information for slides in this directory
- Accesses the
htm4 macro package.
Slide 12
2.5.1 .level File
| Slide Tutorial - .level file |
The
.level file in the tutorial template directory:
divert(-1)
#
# level information
#
define(`DIR_LEVEL', 3)
define(`THIS_DIR', howto/slides/xxxdir/)
include(../../../.site)
include(../../../htm4)@[]@_DNL
_DEFINE(@[_SUBTITLE]@, @[xxxtitle($1)]@)@[]@_DNL
Slide 13
2.5.2 .level Changes
| Slide Tutorial - .level Changes |
- Change everything that begins with `xxx'.
-
- xxxdir
- Directory for your slides relative to the
WEBROOT
- xxxtitle
- Common title for all the slides
-
_SUBTITLE macro
enforces consistency for tutorial titles
- Make sure DIR_LEVEL and
's
are correct
Slide 14
2.6 .list - Table of Contents
| Slide Tutorial - .list Introduction |
- After creating some slides
- Create the
.list file
-
.list is very important
- Specifies the slide ordering
- And the table of content's entries
- Signals to tools that directory contains slides
Slide 15
2.6.1 .list Example
| Slide Tutorial - .list Example |
The following is an example from
the this tutorial
Example .list file:
#
# .list file for slide tutorial
# by R.K.Owen,Ph.D.
#
#file toc entry
intro Introduction
disclaim
things
start Start of Steps
setdir + Set Up Directory
name + Naming of Slides
templates + _CODE(slide.htm4.template)
templatexxx + + Template Changes
caveat + Caveats: Referencing Pages
keyword + + Keywords
levelintro + _CODE(.level) - Common Information
levelfile + + _CODE(.level) File
levelxxx + + _CODE(.level) Changes
listintro + _CODE(.list) - Table of Contents
listfile + + _CODE(.list) Example
listrules + + _CODE(.list) Rules
listresult + + _CODE(.list) Results
path + Add to Path
setupmake + Create _CODE(Makefile)
runmake + Run _CODE(make)
view + View Results
conclusion Conclusion
Slide 16
2.6.2 .list Rules
| Slide Tutorial - .list Rules |
- Each slide file has an entry
(without the .htm4 extension)
- Blank lines are ignored
- Lines starting with `#' are ignored
- Lines with only file entries are not placed
in table of contents
- Lines with text following file entry
is placed in the table of contents.
- Plus (+) sign indicates what outline level to use
Slide 17
2.6.3 .list Results
| Slide Tutorial - .list Results |
The following is what the Table of Contents portion of the Netscape
frame should look like:
1. Introduction
2. Start of Steps
2.1. Set Up Directory
2.2. Naming of Slides
2.3. slide.htm4.template
2.3.1. Template Changes
2.4. Caveats: Referencing Pages
2.4.1. Keywords
2.5. .level - Common Information
2.5.1. .level File
2.5.2. .level Changes
2.6. .list - Table of Contents
2.6.1. .list Example
2.6.2. .list Rules
2.6.3. .list Results
2.7. Add to Path
2.8. Create Makefile
2.9. Run make
2.10. View Results
3. Conclusion
Slide 18
| 2.7 Add to Path
| Slide Tutorial - Add to Path |
- Add WEBROOT to execution path
- C-shell
set path=($path webroot)
- Bourne shell (and derivatives)
PATH=$PATH:webroot
- This is only necessary if doing partial "makes"
Slide 19
2.8 Create Makefile
| Slide Tutorial - Create Makefile |
- Create the tutorial
Makefile with
-
setupmake
if the path is set
- or
../../../setupmake
or whatever level of redirection you need
if path is not set
- Automagically reads
.list file
Slide 20
2.9 Run make
| Slide Tutorial - Run make |
- Create viewable HTML files with
-
make
- The
Makefile runs the slidemaking scripts
- Creates
-
index.htm4
-
toc.htm4
-
ALL.htm4
- Don't name any slides by these names else they will get clobbered
Slide 21
| 2.10 View Results
| Slide Tutorial - View Results |
- With browser put in URL for
index.html
- Typically:
http://rkowen.owentrek.com/howto/slides/index.html
- View slides
- Edit contents given in the
*.htm4 files
- IF changes - Go back to "Run make" step
- IF adding pages - Go back to
"
.list" step
- When satisfied and want "presentation" quality slides
add _@[]@PRESENTATION"
to "
.level" file
Slide 22
| 3 Conclusion
| Slide Tutorial - Conclusion |
Conclusion
This Tutorial was an example of the slide-making steps
using this Webpaging
,
macro package)
Macros by: R.K.Owen,Ph.D.