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?
Hope someone could help me out because I'm really stuck and the default LyX functions aren't useful!
Thanks!
Kind regards,
Kris
Text Formatting ⇒ How to format process/definition/theorem steps
NEW: TikZ book now 40% off at Amazon.com for a short time.

How to format process/definition/theorem steps
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}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to format process/definition/theorem steps
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¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10