%% $Id: minted-code-doc.tex 1155 2025-10-08 08:55:59Z herbert $
%%
\listfiles
\documentclass[russian,greek,ngerman,twoside=on,
  spanish,polish,english,parskip=half-,
  paper=a4,DIV=14]{scrartcl}

\usepackage[
  mono=Julia Mono,
  monoFeatures={Scale=MatchLowercase,FakeStretch=0.88},
  math=STIXTwo Math,
  mathFeatures={math-style=TeX}]{gentium-otf}
\setsansfont
      [ Ligatures      = TeX ,
        Scale          = MatchUppercase,
        Extension      = .otf,
          Numbers      = Lining,
        UprightFont    = *-Regular,
        ItalicFont     = *-Italic,
        BoldFont       = *-Bold,
        BoldItalicFont = *-BoldItalic,
      ]{FiraSans}

\usepackage{babel}

\usepackage{minted-code}
\usepackage{fancyvrb}
\usepackage{xcolor,url}
\usepackage[colorlinks]{hyperref}

\def\Lcs#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}}
\def\Largb#1{\texttt{\{}\textit{#1}\texttt{\}}}
\def\Lpack#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Package!#1@\texttt{#1}}}
\def\Loption#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Option!#1@\texttt{#1}}}

\title{List source code with minted}
\author{Herbert Voß\thanks{\protect\url{hvoss@tug.org}}}
\raggedbottom

\begin{document}

\maketitle

\tableofcontents

\section{Sourcecode without output }

\subsection{Environment \texttt{codeblock}}

\begin{Verbatim}
\begin{codeblock}[minted language=bash, title=Bash code (Terminal)]
ls -la | grep ".pdf"
\end{codeblock}
\end{Verbatim}


\begin{codeblock}[minted language=bash, title=Bash code (Terminal)]
ls -la | grep ".pdf"
\end{codeblock}


\begin{Verbatim}
\setminted{breakafter=/}% allows linebreak after slash
\begin{codeblock}[minted language=python3, title=A PAthon3 example]
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
import pandas as pd

[...]

if __name__ == '__main__':
    app.run(debug=False)
\end{codeblock}
\end{Verbatim}

\setminted{breakafter=/}
\begin{codeblock}[minted language=python3, title=A PAthon3 example]
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
import pandas as pd

external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
df = pd.read_csv('https://gist.githubusercontent.com/chriddyp/5d1ea79569ed194d432e56108a04d188/raw/a9f9e8076b837d541398e999dcbac2b2826a81f8/gdp-life-exp-2007.csv')

print(df)
fig = px.scatter(df, x="gdp per capita", y="life expectancy",
                 size="population", color="continent", hover_name="country",
                 log_x=True, size_max=60)

app.layout = html.Div([
    dcc.Graph(
        id='life-exp-vs-gdp',
        figure=fig
    )
])

if __name__ == '__main__':
    app.run(debug=False)
\end{codeblock}


\subsection{Environment \texttt{codeblockA}}


\begin{Verbatim}
\begin{codeblockA}[title=Code with \LaTeX]% default lang is latex
\usepackage[
  sans=FiraSans-Regular.otf,
  sansFeatures={Scale=MatchUppercase},
  mono=Julia Mono,
  monoFeatures={Scale=MatchLowercase,FakeStretch=0.88},
  math=STIXTwo Math,
  mathFeatures={math-style=TeX}]{gentium-otf}
\end{codeblockA}
\end{Verbatim}


\begin{codeblockA}[title=Code with \LaTeX]% default lang is latex
\usepackage[
  sans=FiraSans-Regular.otf,
  sansFeatures={Scale=MatchUppercase},
  mono=Julia Mono,
  monoFeatures={Scale=MatchLowercase,FakeStretch=0.88},
  math=STIXTwo Math,
  mathFeatures={math-style=TeX}]{gentium-otf}
\end{codeblockA}


\section{Sourcecode with \LaTeX-output}

\subsection{\texttt{exampleA}}

\begin{Verbatim}
\begin{exampleA}[righthand width=0.6\linewidth]{Capitals toSC -- exampleA}
Gentium Font ŐŰÉÁÄ 
\Lctosc{Gentium Font ŐŰÉÁÄ}\\
\LCtoSC+ Gentium Font ŐŰÉÁÄ
\end{exampleA}
\end{Verbatim}

\begin{exampleA}[righthand width=0.6\linewidth]{Capitals toSC -- exampleA}
Gentium Font ŐŰÉÁÄ 
\Lctosc{Gentium Font ŐŰÉÁÄ}\\
\LCtoSC+ Gentium Font ŐŰÉÁÄ
\end{exampleA}

\subsection{\texttt{exampleB}}

\begin{Verbatim}
\begin{exampleB}%[righthand width=0.6\linewidth]
{Ligatures -- exampleB}
No ligatures for the upright font!
Schifffahrt ff, fi, ffi, fl

\itshape but for the italic font!
Schifffahrt ff, fi, ffi, fl
{\LLIGA- ff, fi, ffi, fl, Schifffahrt}
\end{exampleB}
\end{Verbatim}


\begin{exampleB}%[righthand width=0.6\linewidth]
{Ligatures -- exampleB}
No ligatures for the upright font!
Schifffahrt ff, fi, ffi, fl

\itshape but for the italic font!
Schifffahrt ff, fi, ffi, fl
{\LLIGA- ff, fi, ffi, fl, Schifffahrt}
\end{exampleB}


\subsection{\texttt{exampleM}}


\begin{exampleM}[]{Stylistic Sets -- exampleM}
default: aªàáâãäåāăąǎǟǡǻȁȃȧḁẚạảấầẩẫậắằẳẵặⱥₐᵃ◌ͣgĝğġģǧǵǥḡꞡᵍ\par
ss01: \Lss01{aªàáâãäåāăąǎǟǡǻȁȃȧḁẚạảấầẩẫậắằẳẵặⱥₐᵃ◌ͣgĝğġģǧǵǥḡꞡᵍ}\par
ss11: \Lss11{aªàáâãäåāăąǎǟǡǻȁȃȧḁẚạảấầẩẫậắằẳẵặⱥₐᵃ◌ͣ}\par
ss12: \Lss12{ĝğġģǧǵǥḡꞡᵍ}\par
ss04: đƀǥ \Lss04{đƀǥ}\par
default: aãàáâäåāăǎǟǡǻȁȃȧḁẚảấầẩẫậắằẳẵạặⱥɐæfḟiìíîïĩīĭįǐȉȋḭḯỉịılĺḷḹḻḽꝉₗvṽṿꝟzźżžẑẓẕғӻfiffi\par
ss05: \Lss05{aãàáâäåāăǎǟǡǻȁȃȧḁẚảấầẩẫậắằẳẵạặⱥɐæfḟiìíîïĩīĭįǐȉȋḭḯỉịılĺḷḹḻḽꝉₗvṽṿꝟzźżžẑẓẕғӻfiffi}\par
ss07: áàâǎāãäȧ \Lss05{áàâǎāãäȧ} also for e,o,\ldots
\end{exampleM}


\begingroup
\selectlanguage{greek}

\begin{exampleM}[]{Greek language -- exampleM}
%%\usepackage[greek]{babel}
Από τις 140 χώρες που υπάρχουν στο κόσμο, μόνον 19 έχουν πραγματική δημοκρατία. 
Τούτο σημαίνει ότι αυτό το θαυμάσιο και ευαίσθητο πολίτευμα είναι δύσκολο στην 
εφαρμογή του. Και προϋποθέτει ειδικές συνθήκες, χωρίς τις οποίες δεν ημπορεί να 
ανθίσει και να καρποφορήσει.

Δημοκρατία θα ήθελαν να έχουν όλοι οι λαοί. Αλλά δεν την έχουν παρά μόνο εκείνοι 
που, εκτός από την συνειδητοποίηση των προτερημάτων της, σέβονται και τους όρους 
της λειτουργίας της.
\end{exampleM}
\endgroup

\begingroup
\selectlanguage{russian}
\begin{exampleM}[]{Cyrillic language -- exampleM}
%%\usepackage[russian]{babel}
Из 140 стран мира только 19 имеют реальную демократию. 
Это означает, что эта замечательная и чувствительная система трудно реализовать. 
И это требует особых условий, без которых он не может цветут и принести фрукты.

Демократия хотела бы, чтобы все народы имели. Но у них есть только те, кто, в дополнение 
к реализации его достижений, также уважают условия его работы.
\end{exampleM}
\endgroup

\end{document}

