0

I want to have a term and explained it like in the picture below. I tried using something like

\subsubsection*{Foo}

but without the new line.

enter image description here

  • 2
    Use \paragraph{Foo}. – Phelype Oleinik Mar 19 '18 at 21:01
  • @PhelypeOleinik although having a 4th level heading without a preceding level 3 section heading can lead to problems later (eg if you change secnumdepth) – David Carlisle Mar 19 '18 at 21:18
  • @DavidCarlisle Ooh... Indeed, I didn't think of that, as always :/ – Phelype Oleinik Mar 19 '18 at 21:32
2

My impression is that you want a description list instead:

\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[czech]{babel}
\usepackage{enumitem}

\begin{document}

\begin{description}[wide,itemindent=\labelsep]
\item[Java API for WordNet searching (JAPS)] Má asi nejjednodušší API,
ale pracuje přímo se soubory Wordnetu na disku a je proto velmi pomalý.

\item[Java WordNet interface (JWI)] Má také velmi jednoduché API a~navíc
umožňuje načíst celý Wordnet do paměti, a proto je velmi rychlý. Pro
účely implementace jednoduchých metod sémantické podobnosti je naprosto
idéalní.~[Fin14]
\end{description}

\end{document}

enter image description here

1

When declaring headings LaTeX uses the sign of the length argument as a flag to set inline or display style so a simple modification from the definition copied from article.sty changes to the run-in format:

enter image description here

\documentclass{article}

\begin{document}

\section{bar}zzzz
\subsection{bar bar}zzzz

\subsubsection*{Foo} zzzzzzzzzzzzzz


% from article.cls
%\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
%                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
%                                     {1.5ex \@plus .2ex}%
%                                     {\normalfont\normalsize\bfseries}}
%

% same with 5th argument -ve with a length suitable for horiz space
\makeatletter
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus .2ex}%
                                     {-1em}%
                                     {\normalfont\normalsize\bfseries}}
\makeatother

\subsubsection*{Foo} zzzzzzzzzzzzzz


\end{document}
1

Following David's answer, you can use a slightly friendlier syntax provided by the titlesec package with the runin option:

\documentclass{article}
\usepackage{titlesec}

\begin{document}

\section{bar}zzzz
\subsection{bar bar}zzzz

\subsubsection*{Foo} zzzzzzzzzzzzzz

\titleformat{\subsubsection}[runin]{\normalfont\normalsize\bfseries}{\thesubsubsection}{5pt}{}
\subsubsection*{Foo} zzzzzzzzzzzzzz

\end{document}
0

If your goal is to define terms used in your document, I think you should consider using the glossaries package. It makes easier global references to technical terms.

MWE to illustrate this:

\documentclass{article}

\usepackage[nopostdot]{glossaries}
\setacronymstyle{long-short-desc}

\makeglossaries

\newglossaryentry{jaws}{name={Java API for WordNet searching},
        short={JAWS},
        description={Mà asi nejjednodussí API\textellipsis{}}
}
\newacronym[description={Má také velmi\textellipsis{}}]{jwi}{JWI}{Java WordNet interface}


\begin{document}

Let’s talk about the \gls{jaws},
also known as
\glsentryshort{jaws}.


\vspace{2\baselineskip}
Then, let’s describe the \gls{jwi}
with some text.

After that, it will be reffered to as \gls{jwi}.

\printglossaries

\end{document}

Compilation sequence:

lualatex test.tex
makeglossaries test
lualatex test.tex

More info in the glossaries documentation at CTAN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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