• I have trieded all plugins I found for show or show hightlighted source code in a post. No one worked propelly.
    I have a huge necessity to write posts with source codes. I have many posts stuckeds because I can’t write source codes in my posts, mostly Python and C.
    I tried
    <pre> and tags but the when I post the code loses it’s identation. I tried some plugins that promised to show code but none worked.
    I beg you, what I have to do? There’s a easy way to do that? :(`

Viewing 5 replies - 1 through 5 (of 5 total)
  • First, plan on turning off the WYSIWYG editor if you’re going to use any of the code format plugins. (Users -> Your Profile, uncheck the Use VRE box).

    Now, try them again. I use and like iG:Syntax Hiliter, still works well with 2.1.1.

    Thread Starter silveiraneto

    (@silveiraneto)

    I tried the iG:Syntax Hiliter, looks fine but with me was a mess. Just a image could describe. ?? Thanks for the tip, I will try right now.

    Thread Starter silveiraneto

    (@silveiraneto)

    I did this by whis way:
    1) Turned off the WYSIWYG editor, but no identation.
    2) I did the identation manually by putting spaces like this  

    The post:
    https://www.eupodiatamatando.com/2007/03/01/mostrando-as-horas-em-c/

    A huge work, but works.

    I put code in my posts. I just use the HTML entity for certain characters. I don’t do C or Python (my tutes are XHTML and CSS), but I replace things like < with & lt; and that usually takes care of it. I make notations that it’s code by placing it in a div with a border around it. It’s not much extra work at all.

    And I just copy/paste and toss ig:syntax hiliter tags. Indentation is preserved. Color coded. I even turned on the option line numbers. Example of a post with several different code samples.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show a source code in a post’ is closed to new replies.