![リストまたは別のオプションを使用してこのコード形式を再作成するアイデアを持っている人はいますか?](https://rvso.com/image/461895/%E3%83%AA%E3%82%B9%E3%83%88%E3%81%BE%E3%81%9F%E3%81%AF%E5%88%A5%E3%81%AE%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%93%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E5%BD%A2%E5%BC%8F%E3%82%92%E5%86%8D%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%82%A2%E3%82%A4%E3%83%87%E3%82%A2%E3%82%92%E6%8C%81%E3%81%A3%E3%81%A6%E3%81%84%E3%82%8B%E4%BA%BA%E3%81%AF%E3%81%84%E3%81%BE%E3%81%99%E3%81%8B%3F.png)
このコード形式を で再現してみました\usepackage{listingsutf8}
。このコードは Inkscape を使用して作成しました。
私の LaTex コードは次のとおりです:
\documentclass{article}
\usepackage{listingsutf8}
\usepackage{xcolor}
\usepackage{inconsolata}
\lstset
{
literate=%
{á}{{\'a}}1
{í}{{\'i}}1
{é}{{\'e}}1
{ý}{{\'y}}1
{ú}{{\'u}}1
{ó}{{\'o}}1
{Á}{{\'A}}1
{Í}{{\'I}}1
{É}{{\'E}}1
{Ý}{{\'Y}}1
{Ú}{{\'U}}1
{Ó}{{\'O}}1
}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\lstset{
identifierstyle=\ttfamily,%family of letter
basicstyle=\footnotesize, % the size of the fonts that are used for the code
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
breaklines=false, % sets automatic line breaking
captionpos=b, % sets the caption-position to bottom
commentstyle=\color{mygreen}, % comment style
extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
keywordstyle=\color[rgb]{0.97, 0.51, 0.47},
language=[95]Fortran, % the language of the code
numbers=left, % where to put the line-numbers; possible values are (none, left, right)
numbersep=10pt, % how far the line-numbers are from the code
numberstyle=\tiny\color[rgb]{0.64,0.0,0.0}, % the style that is used for the line-numbers
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showstringspaces=false, % underline spaces within strings only
showtabs=false, % show tabs within strings adding particular underscores
stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered
stringstyle=\color[rgb]{0.0, 0.1, 0.80}, % string literal style
tabsize=4, % sets default tabsize to 2 spaces
%frame=single,
backgroundcolor=\color[rgb]{0.96,0.94,0.93}, %{1.0,0.97,0.91},
}
\begin{document}
\begin{lstlisting}[linewidth=7.7cm, frame=single ]
Program Pepito
Implicit none
Real(8),parameter:: pi=dacos(-1.d0)
Real(8) Res !Estación
Res=1.d0/pi
Print*,Res
End Program
\end{lstlisting}
\end{document}