1. 53
  1. 23

    Very impressive. Does it put images literally everywhere except the one place I want them to go?

    1. 7

      Admittedly, I never understood this behaviour until I wrote a thesis in LaTeX. Then the figure-floating-behaviour makes total sense.

      1. 2

        Could you please elaborate more on this?

        1. 7

          The float behaviour builds on LaTeX’ goal to have a harmonic typesetting result. Not to go to deep, you can give one or more of the “intents” “h” (here), “t” (top of page), “b” (bottom of page), “p” (full page) to a figure, which gives LaTeX the freedom to place the figure at the given positions. Using the intent “H” or even “H!” makes sense in some cases, but really is a misuse of the floating environment.

          The idea is that you often end up with multiple figures in one place. LaTeX really watches out that figures don’t float too far away and even considers things when you have a multipage-document, such that e.g. your text is on page N and your two figures are on page N+1. It looks horrible in the editor, but if you look at the final printed out version you realize the motivation. But even if you don’t print it: Using this heuristic prevents too many figures from being in one place. What if you add more content at the front and it shifts half a page? Manually adjusting floats is almost impossible. With floats you just don’t have to worry about that.

          I always use [htbp] for my figures for that reason.

          1. 2

            I always use [htbp] for my figures for that reason.

            Oh god thesis writing flashbacks…

          2. 2

            Not GP but having also written a thesis in LaTeX, it’s pretty sensible. You place your \begin{figure} where it’s relevant and the image will end up positioned probably at the top or bottom of the page where you put that directive. If you have a lot of figures it will set aside entire pages for figures. Alternatively you can override it with various placement specifiers (including “put it right here”).

            This avoids the two main problems you get with word processors like MS Word or LibreOffice Writer:

            1. If you attach your image to text position you can get strange outcomes like a page with a one line of text, a figure, then the rest of the text below it
            2. If you attach your image to page position it can end up several pages away from where it’s actually referenced
        2. 3
          <img src="cat.jpg"/>[!H]
          1. 1

            Does it put images literally everywhere except the one place I want them to go?

            What do you mean? LaTeX puts images exactly where you put them, always. An image is just like a big character and it strictly follows the flow of your text. Unless you explicitly request a floating environment, LaTeX will never put an image anywhere else as it appears in your source document.

          2. 4

            Some years ago, I tried to replicate the ACM paper style in LaTeX: http://beza1e1.tuxen.de/acm_html/test.html

            The biggest problem is floating figures. ACM papers have a copyright notice on the first page at the bottom of the left column. I have no clue how to do that with CSS.

            1. 2

              I love this, great job.

              1. 1

                Honestly, I’ve never really liked this font / typeface / style. (There, I said it.) I know it’s really common, and seemingly really well-respected, well-received and well-liked. Just my opinion.

                1. 1

                  I want to use it.

                  Now, I just need a project to put it in production. I’m sure I’ll think about something

                  1. 0

                    How about nope?