How To Format A Block of Code Within a Presentation?
Solution 1
An on-line syntax highlighter:
Just copy and paste into your document.
Solution 2
http://www.tohtml.com/ created syntax highlighted HTML code for lots of languages. It might be what you're looking for.
Solution 3
If you're using Visual Studio (this might work in Eclipse also, but I never tried) and you copy & paste into Microsoft Word (or any other microsoft product) it will paste the code in whatever color your IDE had. Then you just need to copy the text out of word and into your desired application and it will paste as rich text.
I've only seen this work across Visual Studio to other Microsoft products though so I don't know if it will be any help.
Solution 4
With the new Add-Ons for Google Drive, you can get code highlighting with the Code Pretty add-on.
Solution 5
I've also thought of this. Finally, my solution is to use github gist. Don't forget it also has highlight functionality. Just copy it. :)
Related videos on Youtube
Guram Savinov
I work for Lendio which helps small businesses find lending. While I have spent a lot of time as a full stack LAMPP programmer, my first love was data and databases. At present I get to spend all of my time at Lendio working on data architecture solutions, data quality, and helping data tell its story to our employees.
Updated on July 04, 2021Comments
-
Guram Savinov almost 3 years
I am preparing a presentation using Google Slides, though I can also work on the presentation within Open Office that will include code snippets.
Is there any easy way to perform basic syntax highlighting on the code snippets with either Google Docs or Open Office Presenter?
Edit: Since I believe that I can find a way to embed HTML, any tools that can perform syntax highlighting on HTML would also be welcome suggestions.
-
Gelldur almost 9 yearsIf you copy from InteliJ products it will just work :)
-
Vladimir Mikulic over 3 yearsCheck out Code Highlight add-on. It highlights a block of code in Slides presentation. Supports a wide variety of syntaxes (React, Vue, C++, Go etc.) & offers the most popular themes on the market (VS Code, Cobalt, One Dark etc.)
-
-
DrBeco about 13 yearsThe problem is what to do after that. I installed qt-source-highlight and got the HTML. But OOO Presentation doesn't seems to have an option to insert HTML, nor can I find some program to export the syntax with another option (like RTF for example). For windows, I found this answer: fauskes.net/nb/syntaxms But I'm using LINUX and oowriter doesn't have this option.
-
Ilia Choly about 10 yearsPresentation no longer lets you add arbitrary html.
-
RobotEyes about 10 years@iliacholy You can just copy and paste the text from the preview box instead of using the HTML code
-
grasshopper almost 10 yearsit would be cool if it also indented..
-
Some Noob Student about 9 yearsUnfortunately, this only works for Doc and Spreadsheet and not Presentation, which is what the question is about.
-
CoffeDeveloper about 9 yearsnow it works also for presentation. They probably added the feature
-
Marson Mao almost 9 yearsCan't tweak colors of this add on...made it less useful
-
Erik Schierboom over 8 yearsWhile this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
-
Zack over 8 yearsThis isn't an article, it is the link to a tool that may have some of the desired features. If the link changes and the tool becomes unavailable, the answer becomes irrelevant.
-
samu about 7 years@GameDeveloper how did yo umanage to get it working in presentations?
-
CoffeDeveloper about 7 yearsOh. it was a old comment. Who remember.. so much changed in 2 years. Maybe I copy pasted from another editor supporting markup. I really don't remember XD
-
galkin over 5 years
-
Yaelz over 5 yearsThis service is unavailable
-
svichkar over 5 yearsHey @RobotEyes! looks like the service is not available now
-
RobotEyes about 5 yearsI've added an alternative service
-
AndrewKS almost 3 yearsmarkup.su/highlighter is dead now, as well