Frame with only crosses in two opposite corners
Update
Now that the powerful tcolorbox
and mdframed
packages are around, this is an easy task:
\documentclass{article}
\usepackage{mdframed}
\usepackage[many]{tcolorbox}
\usepackage{lipsum}
\newtcolorbox{tcboppbox}[1][]{
breakable,
enhanced,
arc=0pt,
boxrule=0pt,
outer arc=0pt,
overlay first={
\draw[#1] ([yshift=10pt]frame.north east) -- ++(0,-1cm);
\draw[#1] ([xshift=10pt]frame.north east) -- ++(-1cm,0pt);
},
overlay last={
\draw[#1] ([yshift=-10pt]frame.south west) -- ++(0,1cm);
\draw[#1] ([xshift=-10pt]frame.south west) -- ++(1cm,0pt);
},
overlay unbroken={
\draw[#1] ([yshift=10pt]frame.north east) -- ++(0,-1cm);
\draw[#1] ([xshift=10pt]frame.north east) -- ++(-1cm,0pt);
\draw[#1] ([yshift=-10pt]frame.south west) -- ++(0,1cm);
\draw[#1] ([xshift=-10pt]frame.south west) -- ++(1cm,0pt);
},
colback=white,
}
\begin{document}
\begin{tcboppbox}
\lipsum[4]
\end{tcboppbox}
\begin{tcboppbox}[line width=5pt,color=green!50!black]
\lipsum[4]
\end{tcboppbox}
\end{document}
Initial version
You can define your own environment to add the frame; you can do something along these lines:
\documentclass{article}
\usepackage{lipsum} % just to generate text for the example
\newenvironment{MyFrame}
{\par\hfill\rlap{\kern-0.5cm\rule{1cm}{0.4pt}\kern-0.2cm\rule[-0.8cm]{0.4pt}{1cm}}%
\vskip-\baselineskip}
{\par\kern-0.5cm\hskip-0.9cm\rule{0.4pt}{1cm}\kern-0.2cm\rule[0.2cm]{1cm}{0.4pt}\par}
\begin{document}
\begin{MyFrame}
\lipsum*[1]
\end{MyFrame}
\end{document}
Using the help of the xparse
package is easy to define a more sophisticated version of the MyFrame
environment (this idea was suggested by Werner in a comment); in the following example, the new environment will have six optional arguments; the syntax is
\begin{MyFrame}[<length>][<rule thick.>][<hor. sep.>][<color>][<factor>][<vert. sep.>]
<contents>
\end{MyFrame}
where <length>
controls the length of the rules used (default=1cm
), <rule thick.>
controls the "thickness" of the rules (defualt=0.4pt
), <hor. sep.>
controls the horizontal distance between the rules and the text (default=0.8cm
), <color>
allows you to select, with the help of the xcolor
package, the color for the rules (default=black
), <factor>
is a number controlling the point of intersection of each pair of rules used for the frame (default=3
), and <ver. sep.>
controls the vertical distance between the rules and the text (default=2ex
). Play with the values and you'll get some interesting frames. A little example:
\documentclass{article}
\usepackage{xparse}
\usepackage{xcolor}
\newcommand\Text{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.
Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra
metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices.}% just to generate text for the example
\DeclareDocumentEnvironment{MyFrame}{O{1cm}O{0.4pt}O{0.8cm}O{black}O{3}O{2ex}}
{\par\hfill\rlap{%
\bgroup\color{#4}%
\hskip-\dimexpr#1-#3\relax\rule{#1}{#2}%
\hskip-\dimexpr#1/#5\relax\rule[-\dimexpr#1-\dimexpr#1/#5\relax]{#2}{#1}%
\egroup
}%
\vskip-\dimexpr#1/#5+\dimexpr#1/#5-#6\relax%
}
{\par\nobreak\offinterlineskip\vskip-\dimexpr#1/#5+\dimexpr#1/#5-#6\relax\noindent%
\hskip-#3\bgroup\color{#4}%
\rule{#1}{#2}\hskip-\dimexpr#1-\dimexpr#1/#5-#2\relax%
\rule[-\dimexpr#1/#5-#2\relax]{#2}{#1}\egroup\par
}
\begin{document}
\begin{MyFrame}
\Text
\end{MyFrame}
\begin{MyFrame}[3cm][4pt][1.5cm][red!60]
\Text
\end{MyFrame}
\begin{MyFrame}[1.5cm][2pt][1.3cm][blue][2][8ex]
\Text
\end{MyFrame}
\begin{MyFrame}[1cm][7pt][0.6cm][olive!60][4][0ex]
\Text
\end{MyFrame}
\end{document}
As requested in one comment, here's the definition of the \MyFrame
environment (with the same six optional arguments) required for producing a four-corner version of the frame:
\DeclareDocumentEnvironment{MyFrame}{O{1cm}O{0.4pt}O{0.8cm}O{black}O{3}O{2ex}}
{\par\noindent\hskip-#3\bgroup\color{#4}%
\rule{#1}{#2}\hskip-\dimexpr#1-\dimexpr#1/#5-#2\relax%
\rule[-\dimexpr#1-\dimexpr#1/#5\relax]{#2}{#1}\egroup
\hfill\rlap{%
\bgroup\color{#4}%
\hskip-\dimexpr#1-#3\relax\rule{#1}{#2}%
\hskip-\dimexpr#1/#5\relax\rule[-\dimexpr#1-\dimexpr#1/#5\relax]{#2}{#1}%
\egroup
}%
\vskip-\dimexpr#1/#5+\dimexpr#1/#5-#6\relax%
}
{\par\nobreak\offinterlineskip\vskip-\dimexpr#1/#5+\dimexpr#1/#5-#6\relax\noindent%
\hskip-#3\bgroup\color{#4}%
\rule{#1}{#2}\hskip-\dimexpr#1-\dimexpr#1/#5-#2\relax%
\rule[-\dimexpr#1/#5-#2\relax]{#2}{#1}\egroup
\hfill\rlap{%
\bgroup\color{#4}%
\hskip-\dimexpr#1-#3\relax\rule{#1}{#2}%
\hskip-\dimexpr#1/#5\relax\rule[-\dimexpr#1/#5-#2\relax]{#2}{#1}%
\egroup
}%
\par
}
And the following code (same preamble as before)
\begin{MyFrame}
\Text
\end{MyFrame}\vskip\baselineskip
\begin{MyFrame}[1.5cm][3pt][1cm][red!60][4][5.5ex]
\Text
\end{MyFrame}\vskip\baselineskip
\begin{MyFrame}[1cm][7pt][0.6cm][olive!60][4][0ex]
\Text
\end{MyFrame}
now produces the following result:
Try my new crbox package:
\documentclass{minimal}
\usepackage{crbox}
\setlength{\fboxsep}{10pt}
\begin{document}
\crbox{\parbox{0.8\textwidth}{
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy tex
}}
\bigskip
\crbox[curved]{\parbox{0.8\textwidth}{
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy tex
}}
\bigskip
\crbox[hollowcurved]{\parbox{0.8\textwidth}{
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy tex
}}
\end{document}
and this is the output:
Here is an example using the crop
package:
\documentclass[a5paper]{article}
\usepackage[a4,center]{crop}
\usepackage{lipsum}
\crop[cross,noinfo]
\begin{document}
\lipsum[1]
\end{document}
For the case where you only want specific marks to be shown, you can use the \cropdef
command to disable the unwanted marks.
And with the geometry
package:
\documentclass{article}
\usepackage[showcrop,
papersize={8.5in,11.0in},
layoutsize={6.5in,9.0in},layoutoffset=1.0in
]{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\end{document}
Note that you need to specify the layout size smaller than paper size to see the crop marks.