add scratch_pad init/free for LyX