logo elektroda
logo elektroda
X
logo elektroda

[Solved] Inserting Source Code into Word: Maintaining Legibility and Aesthetics for Java, NetBeans

Frobidn 12300 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17100333
    Frobidn
    Level 7  
    Hello Ladies and Gentlemen.

    I am in the process of writing my thesis and I have a problem, namely: I want to paste the source code of the application that I wrote and tried to do using a print screen into my thesis, but Word then reduces the size of the image to fit the size of the page, which the text is very much reduced and illegible. Of course, you can paste the code live, but Word does not color syntax and it looks a little aesthetically. I can attach the code to work in the form of an attachment, but I do not like this solution.

    Hence my question, does anyone know a way to paste the source code into Word so that it looks fairly decent? We are talking here about a maximum of 35 lines of code written in Java, NetBeans environment.

    Thank you for any attempts to help. :)
  • ADVERTISEMENT
  • #2 17100368
    icosie
    Level 34  
    Hello

    35 lines is not much, you can easily color by hand in less than 15 minutes ;)

    I have always attached the code to the works without coloring with a simple font that differs from the rest.

    best regards
  • ADVERTISEMENT
  • Helpful post
    #3 17100430
    JacekCz
    Level 42  
    "beautifiery" or "syntax formattery" with a web pedigree. The produced HTML should (probably) stick.

    PS. Eclipse pastes beautifully the code into Open Office. I don't have Microsoft offica (but surprisingly, every religious linux has quietly got it, because the open office is supposedly the bottom.)

    EDIT Microsoft Visual Stuio also pastes nice code into OO. If I am on the Netbeans computer, I will confirm it.
  • ADVERTISEMENT
  • #4 17100537
    Frobidn
    Level 7  
    @icosie My application contains definitely more code, I paste only 35 lines into Word, because I just need to put a fragment there and describe the code. I have a lot of such fragments, so it would only take me a few hours of unnecessary work. Your idea is good, but I want my work to look aesthetically pleasing. Thank you for all the answers.

    @JacekCz Thank you very much for the hint, I checked Eclipse and indeed, it copies the code along with the colored syntax, but you brought me to "beautifiery". I searched Google a little and found exactly what I was looking for.

    http://www.planetb.ca/syntax-highlight-word

    On this page, you can paste your source code and choose a programming language. The page will format the code, color the syntax and additionally mark the number of lines of the code and mark the even lines with a delicate gray color, which makes the code very aesthetic and easy to read.

    Thanks again for your help! :)
  • #5 17100541
    Frobidn
    Level 7  
    @icosie My application contains definitely more code, I paste only 35 lines into Word, because I just need to put a fragment there and describe the code. I have a lot of such fragments, so it would only take me a few hours of unnecessary work. Your idea is good, but I want my work to look aesthetically pleasing. Thank you for all the answers.

    @JacekCz Thank you very much for the hint, I checked Eclipse and indeed, it copies the code along with the colored syntax, but you brought me to "beautifiery". I searched Google a little and found exactly what I was looking for.

    http://www.planetb.ca/syntax-highlight-word

    On this page, you can paste your source code and choose a programming language. The page will format the code, color the syntax and additionally mark the number of lines of the code and mark the even lines with a delicate gray color, which makes the code very aesthetic and easy to read.

    Thanks again for your help! :)
ADVERTISEMENT