Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[twocolumn]{article}
- usepackage{graphicx}
- usepackage{tikz}
- usepackage{lipsum}
- makeatletter
- renewcommandsection{@startsection{section}{1}{z@}%
- {-5baselineskip}% this does not get applied after figures
- {baselineskip}%
- {Huge}
- }
- makeatother
- setlength{abovecaptionskip}{0.5baselineskip}
- setlength{belowcaptionskip}{0.5baselineskip}
- setlength{textfloatsep}{0sp}
- providecommandimage[1]{
- begin{figure}[t]%
- begin{tikzpicture}
- draw (0,0) -- (8,0) -- (8,4) -- (0,4) -- (0,0);
- end{tikzpicture}
- caption{textbf{#1}}%
- end{figure}%
- }
- begin{document}
- image{Good. A normal paragraph is nice and close to the caption.}
- lipsum[1]
- newpage
- image{Bad. A title should have space no matter what comes before it.}
- section{This title has almost no space before it}
- newpage
- lipsum[2]
- section{This title has much more space before it}
- textbf{Good. This is how a title usually adds space when anything is preceding it.}
- newpage
- section{This title rightly has no space before it}
- textbf{Good. There is nothing above the title in this column.}
- end{document}
Add Comment
Please, Sign In to add comment