Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Using MS Word 2013 I mocked up what I would like to create using LaTeX:

MS word simulation

I tried exporting it in LibreOffice using its writer2latex; but that didn't work.

So starting from the sectionbox LaTeX package, I wrote this:

\begin{sectionbox}{Title}
    \subsection{Description}
    \subsection{Design}
    \subsection{Tasks}
    \begin{itemize}
        \item
    \end{itemize}
\end{sectionbox}

Without modifying how section, subsection and subsubsection are treated everywhere else (using IEEE template), how do I get this to work?

share|improve this question
    
Do you really need to use the sectioning commands? Also, is that all you want to appear inside your sectionbox? –  Werner Jun 11 '13 at 18:25
    
That is all I want to include. Underneath each section will be paragraphs of text and items in the list will be populated of course also. –  user230347 Jun 11 '13 at 18:32
    
But these will be short (vertically) boxes, and wouldn't require page breaking (I assume)... Also, since you're using a journal class, are you limited in terms of other packages you may/not use? –  Werner Jun 11 '13 at 18:37
    
I feel like I might be missing something really obvious, but isn't this rather standard use of titlesec? –  Sean Allred Jun 11 '13 at 20:43
add comment

1 Answer

If you use titlesec you can redefine how sections and subsections are formatted:

\documentclass{book}
\usepackage[dvipsnames]{xcolor}
%% use `titlesec` package to redefine how sections and subsections are formatted
\usepackage{titlesec}
\titleformat{\section}{\normalfont\huge\sffamily}{}{0pt}{}
\titleformat{\subsection}{\normalfont\sffamily\slshape\large\color{RoyalPurple}}{}{0pt}{}
\usepackage{sectionbox}
\definecolor{sectboxfillcol}{named}{White}
%%
\usepackage{lipsum}
\pagestyle{empty}
\begin{document}

\begin{sectionbox}{Title}

    \subsection{Description}

    \lipsum[1]

    \subsection{Design}

    \subsection{Tasks}

\end{sectionbox}

\section{Title}

\subsection{Description}

\end{document}

enter image description here

But you'll notice that this has a universal effect. Perhaps that's the effect you want; perhaps this doesn't matter. Per your comment about using IEEE template, this is probably not the route you want to go.

To avoid effecting IEEE template:

But if it does matter, you can also create a new environment:

\documentclass{IEEEconf}
\usepackage[dvipsnames]{xcolor}
%% use `titlesec` package to redefine how sections and subsections are formatted
\usepackage{titlesec}
%%
\usepackage{sectionbox}
\definecolor{sectboxfillcol}{named}{White}
%%
\newenvironment{mysectionbox}[1]{%
    %\begingroup%
    \titleformat{\section}{\normalfont\huge\sffamily}{}{0pt}{}%
    \titleformat{\subsection}{\normalfont\sffamily\slshape\large\color{RoyalPurple}}{}{0pt}{}%
    \begin{sectionbox}{#1}
    }{%
    \end{sectionbox}%
    %\endgroup%
    }
%%
\usepackage{lipsum}
\pagestyle{empty}
\begin{document}

\begin{mysectionbox}{Title}

    \subsection{Description}

    \lipsum[1]

    \subsection{Design}

    \subsection{Tasks}

\end{mysectionbox}

\section{Title}

\subsection{Description}

\end{document}

enter image description here

This way your sectioning within the boxes can be formatted differently from those outside of the boxes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.