summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hvfloat/doc/examples/wide1s2c.tex
blob: f7c4f36b5ef1f3d769e0fc28eb4bc17933f39ac9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
\documentclass[twocolumn,DIV=12]{scrartcl}
%% $Id: sub-right2s2c.tex 72 2021-05-02 11:40:10Z herbert $

\input{preamble.ltx}
\usepackage{ragged2e}
\usepackage{showframe}
\setlength\columnseprule{0.4pt}

\usepackage{marginnote}
\let\Lkeyword\texttt
\let\Lkeyset\texttt
\def\Ldim#1{\texttt{\textbackslash#1}}

\begin{document}
\title{Example for fullpage floats}
\author{Herbert Voß}
\maketitle

\tableofcontents

\textcolor{black!40}{\blindtext}

\textcolor{black!40}{\blindtext}

\section{File \texttt{\jobname}}

With the optional argument \Lkeyword{wide} the width of the defined \Ldim{marginparwidth} is
added to the allowed horizontal width of the float.

The code for figure \ref{fig:70}:
\begin{lstlisting}
\hvFloat[wide,nonFloat,
	capPos=right,
	capVPos=top,
	objectPos=left,
]{figure}{\includegraphics[width=0.75\linewidth]{images/CTAN}}{%
	Caption at top right beside the float and object position left and
the option \texttt{wide}.}{fig:70}
\end{lstlisting}

\hvFloat[%
	wide,nonFloat,
	capPos=right,%
	capVPos=top,%
	objectPos=left,%
]{figure}{\includegraphics[width=0.75\linewidth]{images/CTAN}}{%
	Caption at top right beside the float and object position left and
the option \texttt{wide}.}{fig:70}

\textcolor{black!40}{\blindtext}
%\blindtext


The code for figure \ref{fig:80}:
\begin{lstlisting}
\hvFloat[wide,nonFloat,
	capPos=left,
	capVPos=top,
	objectPos=right,
  ]{figure}{\includegraphics[width=0.75\linewidth]{images/CTAN}}%
  {Caption at top left beside the object and object position left and
   the option \texttt{wide}.}{fig:80}
\end{lstlisting}


\hvFloat[wide,nonFloat,
	capPos=left,%
	capVPos=top,%
]{figure}{\includegraphics[width=0.75\linewidth]{images/CTAN}}%
  {Caption at top left beside the object and object position left and
   the option \texttt{wide}.}{fig:80}


For a twosided document it will place the object always in the margin.

\textcolor{black!40}{\blindtext}

\begin{lstlisting}
\hvFloat[wide,nonFloat,
	capPos=inner,
	capVPos=top,
]{figure}{\includegraphics[width=0.75\linewidth]{images/CTAN}}{%
Caption at top and inner beside the float and object position right and
the option \texttt{wide}.}{fig:81}
\end{lstlisting}

\hvFloat[wide,nonFloat,
	capPos=inner,
	capVPos=top,
]{figure}{\includegraphics[width=0.75\linewidth]{images/CTAN}}{%
Caption at top and inner beside the float and object position right and
the option \texttt{wide}.}{fig:81}

Now we set the same image with the same setting on the next page. The caption will
change its side due to the setting \Lkeyset{capPos=outer}.


\textcolor{black!40}{\blindtext}



\begin{lstlisting}
\hvFloat[wide,nonFloat,
	capPos=inner,
	capVPos=top,
]{figure}{\includegraphics[width=0.75\linewidth]{images/CTAN}}{%
Caption at top inner beside the float and object position right and
the option \texttt{wide}.}{fig:811}
\end{lstlisting}


\hvFloat[wide,nonFloat,
	capPos=inner,
	capVPos=top,
]{figure}{\includegraphics[width=0.75\linewidth]{images/CTAN}}{%
Caption at top inner beside the float and object position right and
the option \texttt{wide}.}{fig:811}

The caption can be typeset completely into the margin with:

\textcolor{black!40}{\blindtext}


\begin{lstlisting}
\captionsetup{justification=RaggedRight}
\hvFloat[wide,nonFloat,
	capPos=outer,
	capVPos=top,
        floatCapSep=\marginparsep,
]{figure}{\includegraphics[width=\linewidth]{images/CTAN}}{%
Caption at top inner beside the float and object position right and
the option \texttt{wide}.}{fig:812}
\end{lstlisting}

\textcolor{black!40}{\blindtext}

\begingroup
\captionsetup{justification=RaggedRight}
\hvFloat[wide,nonFloat,
	capPos=outer,
	capVPos=top,
        floatCapSep=\marginparsep,
]{figure}{\includegraphics[width=\linewidth]{images/CTAN}}{%
Caption at top inner beside the float and object position right and
the option \texttt{wide}.}{fig:812}
\endgroup

\textcolor{black!40}{\blindtext}

\hvFloat[wide,nonFloat,
	capPos=outer,
	capVPos=top,
        floatCapSep=\marginparsep,
]{figure}{\includegraphics[width=\linewidth]{images/CTAN}}{%
Caption at top inner beside the float and object position right and
the option \texttt{wide}.}{fig:813}





\textcolor{black!40}{\Blindtext}

\end{document}