我已经使用了htmlize,这里是配置
(add-to-list 'load-path
"~/.emacs.d/plugins/")
(require 'htmlize)
(setq org-src-fontify-natively t)
(setq org-export-with-sub-superscripts nil)
有了这个配置,在我导出下面的 org 文件后:我得到了像本页底部图片一样的输出。
#+STYLE: <style> pre.src { background-color:#1e3436; color: #eeeeec;}</style>
*tst code
#+BEGIN_SRC c
extern struct list_head llc_sap_list;
int a = 0;
#+END_SRC
#+begin_src c
#define LLC_DEST_INVALID 0 /* Invalid LLC PDU type */
#define LLC_DEST_SAP 1 /* Type 1 goes here */
#define LLC_DEST_CONN 2 /* Type 2 goes here */
extern spinlock_t llc_sap_list_lock;
extern int llc_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev);
extern int llc_mac_hdr_init(struct sk_buff *skb,
const unsigned char *sa, const unsigned char *da);
extern void llc_add_pack(int type, void (*handler)(struct llc_sap *sap,
struct sk_buff *skb));
extern void llc_remove_pack(int type);
extern void llc_set_station_handler(void (*handler)(struct sk_buff *skb));
extern struct llc_sap *llc_sap_open(unsigned char lsap,
int (*rcv)(struct sk_buff *skb,
struct net_device *dev,
struct packet_type *pt,
struct net_device *orig_dev));
static inline void llc_sap_hold(struct llc_sap *sap)
{
atomic_inc(&sap->refcnt);
}
extern void llc_sap_close(struct llc_sap *sap);
#+end_src
输出的html,代码的颜色都是灰色的。我不能上传,但是这个问题真的阻止了我,整个晚上。感谢您对此的帮助。