|Did you know ...||Search Documentation:|
|Pack logtalk -- logtalk-3.11.2/coding/rouge/NOTES.txt|
This file is part of Logtalk http://logtalk.org/ Copyright 1998-2017 Paulo Moura <firstname.lastname@example.org>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ________________________________________________________________________
This directory contains the
logtalk.rb file that provides syntax
coloring support for Rouge (version 1.9.1 or later):
These support files are dual-licensed under the Apache License 2.0 and the Rouge license.
Rouge may already include support for Logtalk. You can check it by running the command:
$ rougify list
This directory may contain, however, updated support files. If that is the case, install the Logtalk support files by performing the following steps:
lib/rouge/lexers/logtalk.rbto the same directory in your Rouge installation directory (replacing any existing older file).
lib/rouge/demos/logtalkto the same directory in your Rouge installation directory (replacing any existing older file).
spec/lexers/logtalk_spec.rbto the same directory in your Rouge installation directory (if it exists, replacing any existing older file).
spec/visual/samples/logtalkto the same directory in your Rouge installation directory (if it exists, replacing any existing older file).
An example of generating HTML code (wrapped with a
pre tag) would be:
$ rougify highlight -f html -i source.lgt > source.html
To get the CSS file used for the generated HTML code use the command:
$ rougify style > source.css
An useful formatter option is line numbers:
$ rougify highlight -f html -F line_numbers=true -i source.lgt > source.html
You may also use the Logtalk lexer with plain Prolog files by using the
option. For example:
$ rougify highlight -l logtalk -i source.pl > source.html