Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. ANSAM

ANSAM

Scheduled Pinned Locked Moved The Lounge
htmlvisual-studioquestion
13 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Todd Smith
    wrote on last edited by
    #1

    Article Newbie Seeks Article Master for one-on-one mentoring relationship. I just threw up (pun intended) my first article and would like a few suggestions on formatting techniques. Specifically I need to reel in the width of the article so that it conforms to the suggested guidelines. The two obvious fixes are to crop the images to 600px and remove any code lines that are greater than ~120 chars. How do you typically deal with tabs in your artciles? I copy the code snippets from VS, encode them using an online tool and then paste them into a HTML file I'm editing. Since you can't use tabs or indention inside of pre tags do you manually space everything over or is there an easier way to handle tabs? My OCD won't allow me to sleep at night knowing there's some poorly formatted code of mine floating out there on the internets. p.s. BOO!

    Todd Smith

    R M C D R 5 Replies Last reply
    0
    • T Todd Smith

      Article Newbie Seeks Article Master for one-on-one mentoring relationship. I just threw up (pun intended) my first article and would like a few suggestions on formatting techniques. Specifically I need to reel in the width of the article so that it conforms to the suggested guidelines. The two obvious fixes are to crop the images to 600px and remove any code lines that are greater than ~120 chars. How do you typically deal with tabs in your artciles? I copy the code snippets from VS, encode them using an online tool and then paste them into a HTML file I'm editing. Since you can't use tabs or indention inside of pre tags do you manually space everything over or is there an easier way to handle tabs? My OCD won't allow me to sleep at night knowing there's some poorly formatted code of mine floating out there on the internets. p.s. BOO!

      Todd Smith

      R Offline
      R Offline
      Robert Royall
      wrote on last edited by
      #2

      There's a nice little plugin to Visual Studio called CopySourceAsHTML[^] you might want to look into. It replicates, in HTML tags (and optionally RTF if you're pasting into Word), the exact layout you see in your IDE without any other formatting.

      Imagine that you are hired to build a bridge over a river which gets slightly wider every day; sometimes it shrinks but nobody can predict when. Your client provides no concrete or steel, only timber and cut stone (but they won't tell you what kind). The coefficient of gravity changes randomly from hour to hour, as does the viscosity of air. Your only tools are a hacksaw, a chainsaw, a rubber mallet, and a length of rope. Welcome to my world. -Me explaining my job to an engineer

      G 1 Reply Last reply
      0
      • R Robert Royall

        There's a nice little plugin to Visual Studio called CopySourceAsHTML[^] you might want to look into. It replicates, in HTML tags (and optionally RTF if you're pasting into Word), the exact layout you see in your IDE without any other formatting.

        Imagine that you are hired to build a bridge over a river which gets slightly wider every day; sometimes it shrinks but nobody can predict when. Your client provides no concrete or steel, only timber and cut stone (but they won't tell you what kind). The coefficient of gravity changes randomly from hour to hour, as does the viscosity of air. Your only tools are a hacksaw, a chainsaw, a rubber mallet, and a length of rope. Welcome to my world. -Me explaining my job to an engineer

        G Offline
        G Offline
        Giorgi Dalakishvili
        wrote on last edited by
        #3

        I hope you have read this: Submission Guidelines[^]

        Giorgi Dalakishvili #region signature My Articles / My Latest Article[^] / My blog[^] #endregion

        1 Reply Last reply
        0
        • T Todd Smith

          Article Newbie Seeks Article Master for one-on-one mentoring relationship. I just threw up (pun intended) my first article and would like a few suggestions on formatting techniques. Specifically I need to reel in the width of the article so that it conforms to the suggested guidelines. The two obvious fixes are to crop the images to 600px and remove any code lines that are greater than ~120 chars. How do you typically deal with tabs in your artciles? I copy the code snippets from VS, encode them using an online tool and then paste them into a HTML file I'm editing. Since you can't use tabs or indention inside of pre tags do you manually space everything over or is there an easier way to handle tabs? My OCD won't allow me to sleep at night knowing there's some poorly formatted code of mine floating out there on the internets. p.s. BOO!

          Todd Smith

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #4

          Todd Smith wrote:

          How do you typically deal with tabs in your artciles?

          I replace all tabs with two whitespaces.

          Todd Smith wrote:

          I copy the code snippets from VS, encode them using an online tool and then paste them into a HTML file I'm editing.

          I copy them into Notepad to get rid of the formatting first, believe it or not, then paste it the code into FrontPage. (Yes, I'm archaic.)

          Todd Smith wrote:

          do you manually space everything over

          Yes. Sigh.

          Todd Smith wrote:

          The two obvious fixes are to crop the images to 600px

          What about just scaling the image. Or, a technique I see here and admire is to link to a full a full size version when clicking on the image. But I always think, do I really need that big of an image? What am I trying to show here? And that usually results in a smaller image. :) I'll wander over and read your article now! :-D Marc

          Thyme In The Country Interacx My Blog

          T 1 Reply Last reply
          0
          • M Marc Clifton

            Todd Smith wrote:

            How do you typically deal with tabs in your artciles?

            I replace all tabs with two whitespaces.

            Todd Smith wrote:

            I copy the code snippets from VS, encode them using an online tool and then paste them into a HTML file I'm editing.

            I copy them into Notepad to get rid of the formatting first, believe it or not, then paste it the code into FrontPage. (Yes, I'm archaic.)

            Todd Smith wrote:

            do you manually space everything over

            Yes. Sigh.

            Todd Smith wrote:

            The two obvious fixes are to crop the images to 600px

            What about just scaling the image. Or, a technique I see here and admire is to link to a full a full size version when clicking on the image. But I always think, do I really need that big of an image? What am I trying to show here? And that usually results in a smaller image. :) I'll wander over and read your article now! :-D Marc

            Thyme In The Country Interacx My Blog

            T Offline
            T Offline
            Todd Smith
            wrote on last edited by
            #5

            To replace an image I removed the references in the article then clicked delete for two images I want to replace. Then I go back to the upload form and upload new versions of those files. It looks like it's not possible to replace an uploaded image correct? I have to give it a different name or else the old image keeps reappearing in the list of available images. Bug or Feature? EDIT: nvm I was saving to one directory and uploading from another.

            Todd Smith

            M 1 Reply Last reply
            0
            • T Todd Smith

              To replace an image I removed the references in the article then clicked delete for two images I want to replace. Then I go back to the upload form and upload new versions of those files. It looks like it's not possible to replace an uploaded image correct? I have to give it a different name or else the old image keeps reappearing in the list of available images. Bug or Feature? EDIT: nvm I was saving to one directory and uploading from another.

              Todd Smith

              M Offline
              M Offline
              Marc Clifton
              wrote on last edited by
              #6

              You should be able to replace the old image, but you may have to go into the HTML and manually set the new width and height. At least, that's what I've had to do in the past. Also, I've noticed I have to refresh the page or clear my cache because the browser won't see the new image. Marc

              Thyme In The Country Interacx My Blog

              1 Reply Last reply
              0
              • T Todd Smith

                Article Newbie Seeks Article Master for one-on-one mentoring relationship. I just threw up (pun intended) my first article and would like a few suggestions on formatting techniques. Specifically I need to reel in the width of the article so that it conforms to the suggested guidelines. The two obvious fixes are to crop the images to 600px and remove any code lines that are greater than ~120 chars. How do you typically deal with tabs in your artciles? I copy the code snippets from VS, encode them using an online tool and then paste them into a HTML file I'm editing. Since you can't use tabs or indention inside of pre tags do you manually space everything over or is there an easier way to handle tabs? My OCD won't allow me to sleep at night knowing there's some poorly formatted code of mine floating out there on the internets. p.s. BOO!

                Todd Smith

                C Offline
                C Offline
                Chris Maunder
                wrote on last edited by
                #7

                I've taken a swipe at cleaning the article up a little.

                cheers, Chris Maunder

                CodeProject.com : C++ MVP

                T 1 Reply Last reply
                0
                • C Chris Maunder

                  I've taken a swipe at cleaning the article up a little.

                  cheers, Chris Maunder

                  CodeProject.com : C++ MVP

                  T Offline
                  T Offline
                  Todd Smith
                  wrote on last edited by
                  #8

                  I've been making little hacks at it as well. How does that work when two people are trying to edit the same article? LILO?

                  Todd Smith

                  1 Reply Last reply
                  0
                  • T Todd Smith

                    Article Newbie Seeks Article Master for one-on-one mentoring relationship. I just threw up (pun intended) my first article and would like a few suggestions on formatting techniques. Specifically I need to reel in the width of the article so that it conforms to the suggested guidelines. The two obvious fixes are to crop the images to 600px and remove any code lines that are greater than ~120 chars. How do you typically deal with tabs in your artciles? I copy the code snippets from VS, encode them using an online tool and then paste them into a HTML file I'm editing. Since you can't use tabs or indention inside of pre tags do you manually space everything over or is there an easier way to handle tabs? My OCD won't allow me to sleep at night knowing there's some poorly formatted code of mine floating out there on the internets. p.s. BOO!

                    Todd Smith

                    D Offline
                    D Offline
                    Dr Walt Fair PE
                    wrote on last edited by
                    #9

                    I use cparticlewriterhelper[^] to write the article off line. When done, I delete the images/links and copy/paste the html to the submission wizard. Finally, a few minor edits to add the images/links back in the wizard and it's done. As far as source code, I simply copy and paste from VS and then wrap it in <code> and <pre> tags. Only problem is, after proofing 27,386 times, I always find a typo right after submitting ...

                    The PetroNerd

                    Walt Fair, Jr. Comport Computing Specializing in Technical Engineering Software

                    T 1 Reply Last reply
                    0
                    • D Dr Walt Fair PE

                      I use cparticlewriterhelper[^] to write the article off line. When done, I delete the images/links and copy/paste the html to the submission wizard. Finally, a few minor edits to add the images/links back in the wizard and it's done. As far as source code, I simply copy and paste from VS and then wrap it in <code> and <pre> tags. Only problem is, after proofing 27,386 times, I always find a typo right after submitting ...

                      The PetroNerd

                      Walt Fair, Jr. Comport Computing Specializing in Technical Engineering Software

                      T Offline
                      T Offline
                      Todd Smith
                      wrote on last edited by
                      #10

                      I started out with that but figured it was the same as editing in VS so I switched over to that. I'll give the helper another try for my next article now that I've learned the ropes.

                      Todd Smith

                      1 Reply Last reply
                      0
                      • T Todd Smith

                        Article Newbie Seeks Article Master for one-on-one mentoring relationship. I just threw up (pun intended) my first article and would like a few suggestions on formatting techniques. Specifically I need to reel in the width of the article so that it conforms to the suggested guidelines. The two obvious fixes are to crop the images to 600px and remove any code lines that are greater than ~120 chars. How do you typically deal with tabs in your artciles? I copy the code snippets from VS, encode them using an online tool and then paste them into a HTML file I'm editing. Since you can't use tabs or indention inside of pre tags do you manually space everything over or is there an easier way to handle tabs? My OCD won't allow me to sleep at night knowing there's some poorly formatted code of mine floating out there on the internets. p.s. BOO!

                        Todd Smith

                        R Offline
                        R Offline
                        realJSOP
                        wrote on last edited by
                        #11

                        Todd Smith wrote:

                        Since you can't use tabs or indention inside of pre tags

                        But you *can* use tabs and indentation inside a pre block.

                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                        -----
                        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                        T 1 Reply Last reply
                        0
                        • R realJSOP

                          Todd Smith wrote:

                          Since you can't use tabs or indention inside of pre tags

                          But you *can* use tabs and indentation inside a pre block.

                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                          -----
                          "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                          T Offline
                          T Offline
                          Todd Smith
                          wrote on last edited by
                          #12

                          How do you enter a tab in a online html editor (like the one I'm typing in now)?

                          Todd Smith

                          R 1 Reply Last reply
                          0
                          • T Todd Smith

                            How do you enter a tab in a online html editor (like the one I'm typing in now)?

                            Todd Smith

                            R Offline
                            R Offline
                            realJSOP
                            wrote on last edited by
                            #13

                            I copy/paste, but I'm sure there's an ampersand sequence for it.

                            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                            -----
                            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups