Guest User

Untitled

a guest
Oct 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. documentclass[twocolumn]{article}
  2. usepackage{graphicx}
  3. usepackage{tikz}
  4. usepackage{lipsum}
  5.  
  6. makeatletter
  7. renewcommandsection{@startsection{section}{1}{z@}%
  8. {-5baselineskip}% this does not get applied after figures
  9. {baselineskip}%
  10. {Huge}
  11. }
  12. makeatother
  13.  
  14. setlength{abovecaptionskip}{0.5baselineskip}
  15. setlength{belowcaptionskip}{0.5baselineskip}
  16. setlength{textfloatsep}{0sp}
  17.  
  18. providecommandimage[1]{
  19. begin{figure}[t]%
  20. begin{tikzpicture}
  21. draw (0,0) -- (8,0) -- (8,4) -- (0,4) -- (0,0);
  22. end{tikzpicture}
  23. caption{textbf{#1}}%
  24. end{figure}%
  25. }
  26.  
  27. begin{document}
  28.  
  29. image{Good. A normal paragraph is nice and close to the caption.}
  30. lipsum[1]
  31.  
  32. newpage
  33. image{Bad. A title should have space no matter what comes before it.}
  34. section{This title has almost no space before it}
  35.  
  36. newpage
  37. lipsum[2]
  38. section{This title has much more space before it}
  39. textbf{Good. This is how a title usually adds space when anything is preceding it.}
  40.  
  41. newpage
  42. section{This title rightly has no space before it}
  43. textbf{Good. There is nothing above the title in this column.}
  44.  
  45. end{document}
Add Comment
Please, Sign In to add comment