Pomocí MacVim
I just tried the trick I use to get syntax-highlighted code into Keynote, and I think it works, though I don't have an iPad handy to export the book and try it.Edit the code in MacVim
Make sure syntax highlighting is on:
- Hit escape
- Type ":syn on" and hit return (don't type the quotes)
- If you don't see syntax highlighting, you may have vim mis-installed or are using a language that doesn't have a highlighting file installed by default; search github and you'll probably find something
- Export the buffer as HTML
- Hit escape
- Type ":TOhtml" and hit return (don't type the quotes)
- This will open a second buffer with the HTML of your text in it. Save it via ":w" and hitting return
- Open the file in your browser
- Copy the contents
- Paste inside iBooks Author
When I did this, I got a text box with the highlighted code in it.
Zdroj:
https://apple.stackexchange.com/questions/37706/embedding-code-snippets-in-ibooks-author
Výběr barevného schématu
Tmavé
Zdroj:
Žádné komentáře:
Okomentovat