zoukankan      html  css  js  c++  java
  • 让博客园支持Autolisp语法着色

    由于Autolisp是小众语言,博客的代码插件并不支持Autolisp语法着色。但博客支持html语法。

    原理:将着色效果转化为html 代码,效果如下:

    ;;------------------=={ Get Files Dialog }==------------------;;

    ;;                                                            ;;
    ;;  An analog of the 'getfiled' function for multiple files.  ;;
    ;;------------------------------------------------------------;;
    ;;  Author: Lee Mac, Copyright 2013 - www.lee-mac.com       ;;
    ;;------------------------------------------------------------;;
    (defun LM:getfiles ( msg def ext /*error* dch dcl des dir dirdata lst rtn )
        (defun*error*( msg )
           (if(= 'file (type des))
               (close des)
           )
           (if(and(= 'int (type dch))(<0 dch))
               (unload_dialog dch)
           )
           (if(and(= 'str (type dcl))(findfile dcl))
               (vl-file-delete dcl)
           )
           (if(and msg (not(wcmatch(strcase msg t)"*break,*cancel*,*exit*")))
               (princ(strcat" Error: " msg))
           )
           (princ)
       ) ................
     
     
    实现方法之一:使用Everedit设置好代码的着色效果,并复制为Rtf格式,使用Word另存为Html 文件;或者使用rtf2html的工具软件。
    实现方法之二:有高手(见过好几个版本的)使用autolisp语言编写了将lsp代码转化为html文件的源文件。
     
    本人推荐:方法一。
     
  • 相关阅读:
    java环境配置
    关于Chrome(谷歌浏览器)对docume,准确获取网页客户区的宽高、滚动条宽高、滚动条Left和Top
    CSS3圆角详解
    Js监控回车事件
    Sql日期时间格式转换
    JS操作JSON总结
    SQL日期操作及只获取日期的方法
    如何让div出现滚动条
    CodeForces 55D Beautiful numbers
    POJ 3034 Whac-a-Mole
  • 原文地址:https://www.cnblogs.com/InspiringMind/p/4659452.html
Copyright © 2011-2022 走看看