How do I embed source code or HTML in Open Office Org Presentations without using screenshots?

前端 未结 9 952
忘了有多久
忘了有多久 2021-01-31 01:59

I need to write a lot of class courses presentations to my programming class, and I constantly need to show source code (mainly C

9条回答
  •  我在风中等你
    2021-01-31 02:38

    I do this all the time with open office with source code under Windows. View the code in your favorite editor (emacs, notepad, ...), and select/copy the text of interest. Make a text box in open office, and paste. This works because all of Windows tools share a global cut buffer. I don't use Linux enough to know if it has such a shared cut-buffer, if it doesn't, I kind of understand your problem.( If it does, I really don't understand your problem). My solution of course doesn't get nicely formatted/highlighted code by itself.

    Specific steps: In Open Office Impress ("Presentation") with a slide open, click the box labelled "T" on the lower tool bar (or push F2). Then click on the slide roughly where you want the the text, and drag to make the box about the right size. Click in box and you can enter text. For code, I cut from some editor window, and paste after selecting the text box. If you click on the outline of the text box, you can change the font (courier new is good for code) and print size.

    After you get the text sized right, you can revisit specific substrings, and select/bold or select/color if you want fancy text.

    You might consider cutting and pasting from JavaDoc or Doxygen output; you are likely to get the formatting data along with the text.

提交回复
热议问题