Text FormattingHow to format process/definition/theorem steps

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
kriskras
Posts: 3
Joined: Sun Nov 29, 2009 7:15 pm

How to format process/definition/theorem steps

Post by kriskras »

I am trying to get the following in Tex code but I have no idea how to generate it. It represents a process (written in the N3 ontology notation) and has multiple steps (P1 - Px) and I have no idea how to position the (P1) label as well as how to format the ontology. Can this be generated automatically? Could someone please show me code for this?
Schermafbeelding 2009-11-29 om 18.17.26.png
Schermafbeelding 2009-11-29 om 18.17.26.png (14.18 KiB) Viewed 2499 times
Hope someone could help me out because I'm really stuck and the default LyX functions aren't useful!


Thanks!

Kind regards,

Kris

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kriskras
Posts: 3
Joined: Sun Nov 29, 2009 7:15 pm

How to format process/definition/theorem steps

Post by kriskras »

Okay, so far I've the following code. It includes a description (D3) for a code. Now I want to left float the definition next to the listing. Anyone an idea how to establish this?

Code: Select all

\begin{description}   \item[(D3) \hfill] 


\begin{lstlisting}[basicstyle={\small\ttfamily}]
{ ?P :hasPrivateKeyFor ?key .
	?doc :signature [ :signedwith ?key ]  	
} => { ?P :claims [ is :semantics of ?doc ] } . 
\end{lstlisting}


\end{description}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to format process/definition/theorem steps

Post by localghost »

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{enumitem}
\usepackage{alltt}

\begin{document}
  \begin{enumerate}[label={(P\arabic*)},leftmargin=*]
    \item
      \begin{minipage}[c]{\linewidth}
        \small
        \begin{alltt}
          romeo:i :semantics \{
                               romeo:i a foaf:Person;
                               :HasPrivateKeyFor PubKey;
                               foaf:name "Romeo";
                               foaf:knows jult.me;
                             \}
        \end{alltt}
      \end{minipage}
  \end{enumerate}
\end{document}

Best regards and welcome to the board
Thorsten¹
Post Reply