I'm generating a pdf from a markdown file that begins this way :
---
header-includes:
- \usepackage{fvextra}
- \DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines, breakanywhere, commandchars=\\\{\}}
title: "Geomatique"
subtitle: "web mapping"
author: Marc Le Bihan
geometry: margin=2cm
fontsize: 11pt
classoption: fleqn
urlcolor: blue
Installation de l'environnement
wget https://download.geofabrik.de/europe/france/midi-pyrenees-latest-free.shp.zip
wget https://www.data.gouv.fr/fr/datasets/contours-des-departements-francais-issus-d-openstreetmap/
wget https://www.data.gouv.fr/fr/datasets/decoupage-administratif-communal-francais-issu-d-openstreetmap/
When I'm generating it with a pandoc command :
pandoc geomatique.md -o geomatique.pdf
I stumble upon lines not completely broken, even if breakanywhere is sat.
You can see the arrow → and the line break at space just after wget, that shows that Pandoc has taken into account the Verbatim directive, but the second part of the command isn't separated correctly.
and if I copy and paste some text on the generated pdf, it appears incomplete, some part being lost :
wget https://www.data.gouv.fr/fr/datasets/decoupage-administratif-communal-francais-issu-d-openstr
instead of
wget https://www.data.gouv.fr/fr/datasets/decoupage-administratif-communal-francais-issu-d-openstreetmap/
@Marijin : here's what it generates in a .tex file :
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor}
%
\documentclass[
11pt,
fleqn]{article}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
\ifPDFTeX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
\KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
pdftitle={Geomatique},
pdfauthor={Marc Le Bihan},
colorlinks=true,
linkcolor={Maroon},
filecolor={Maroon},
citecolor={Blue},
urlcolor={blue},
pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\usepackage[margin=2cm]{geometry}
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\newenvironment{Shaded}{}{}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\BuiltInTok}[1]{#1}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{#1}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{#1}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{#1}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
\newcommand{\ExtensionTok}[1]{#1}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{#1}}
\newcommand{\ImportTok}[1]{#1}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{#1}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{#1}}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}}
\newcommand{\RegionMarkerTok}[1]{#1}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
\usepackage{graphicx}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\usepackage{fvextra}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines, breakanywhere, commandchars=\\\{\}}
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
\fi
\title{Geomatique}
\usepackage{etoolbox}
\makeatletter
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
\apptocmd{@title}{\par {\large #1 \par}}{}{}
}
\makeatother
\subtitle{web mapping}
\author{Marc Le Bihan}
\date{}
\begin{document}
\maketitle
\hypertarget{installation-de-lenvironnement}{%
\section{Installation de
l'environnement}\label{installation-de-lenvironnement}}
\begin{Shaded}
\begin{Highlighting}[]
\FunctionTok{wget}\NormalTok{ https://download.geofabrik.de/europe/france/midi{-}pyrenees{-}latest{-}free.shp.zip}
\FunctionTok{wget}\NormalTok{ https://www.data.gouv.fr/fr/datasets/contours{-}des{-}departements{-}francais{-}issus{-}d{-}openstreetmap/}
\FunctionTok{wget}\NormalTok{ https://www.data.gouv.fr/fr/datasets/decoupage{-}administratif{-}communal{-}francais{-}issu{-}d{-}openstreetmap/}
\end{Highlighting}
\end{Shaded}
\hypertarget{satellite-sentinel-2a-ou-b}{%
\subsection{Satellite Sentinel 2A ou
B}\label{satellite-sentinel-2a-ou-b}}
\begin{itemize}
\tightlist
\item
13 Bandes spectrales du visible à l'infrarouge court (SWIR), en
passant par le proche infrarouge (PIR).
\item
Résolution spatiale : 10 à 60 mètres
\item
Emprise de 290 kilomètres de large
\item
Projection UTM 31 / EPSG 32631
\item
Fréquence de balayage : tous les cinq jours
\end{itemize}
Accessible sur \href{https://scihub.copernicus.eu/dhus/}{Copernicus EU}
Après s'être créé un compte gratuit, télécharger ces données en entrant
dans la barre de recherche : (Données \emph{Sentinel 2}, Toulouse) :
\begin{itemize}
\tightlist
\item
\texttt{S2A_MSIL1C_20170705T105031_N0205_R051_T31TCJ_20170705T105605.SAFE}
\item
\texttt{S2A_MSIL1C_20170215T105121_N0204_R051_T31TCJ_20170215T105607.SAFE}
\item
\texttt{S2A_MSIL1C_20170824T105031_N0205_R051_T31TCJ_20170824T105240.SAFE}
: ce dernier est offline.
\end{itemize}
Note : Copernicus permet de faire des requêtes par type de satellite,
zone visée, date, couverture nuageuse, qualité du post-traitement.
\hypertarget{compruxe9hension-dune-image-satellite}{%
\section{Compréhension d'une image
satellite}\label{compruxe9hension-dune-image-satellite}}
D'après
\href{https://cms.geobretagne.fr/content/comprendre-une-image-satellitaire}{Comprendre
une image satellitaire}
\hypertarget{bandes-spectrales-ou-canaux}{%
\subsection{Bandes spectrales (ou
canaux)}\label{bandes-spectrales-ou-canaux}}
\begin{itemize}
\item
\textbf{Bandes} : rayons gamma, rayons X, ultra-violet, bleu, vert,
rouge, Proche infra-rouge (PIR), infra-rouge, micro-ondes, ondes
radio.
\item
\textbf{Fréquence} : de haute à basse
\item
\textbf{Longueur d'onde} : faible à grande
\end{itemize}
L'on en produit des images de type raster. où \textbf{les valeurs des
bandes sont représentées en niveaux de gris}. et traduisent traduisent
la \textbf{réflectance} ou \textbf{réflexivité}.
La \textbf{résolution spectrale} dit sur un rayon de combien de mètres
porte la valeur d'un pixel : en contrepartie d'une résolution fine, les
fenêtres des capteurs seront étroits.
Si l'on réassocie les bandes bleues, vertes et rouges ensemble, par
simple synthèse additive des trois couleurs, on réobtient
\textbf{l'image en vraies couleurs}.
Mais, pour voir aussi l'infra-rouge ou d'autres bandes non visibles à
l'oeil nu, l'on recoure fréquemment à une \textbf{image en fausses
couleurs} dépendant de ce que l'on veut mettre en évidence (exemple :
mieux discriminer les surfaces végétales ou minérales), où en
contrepartie, l'on ne fait pas apparaître la bande du bleu.
\hypertarget{ruxe9flectance-caractuxe9ristiques}{%
\subsection{Réflectance
caractéristiques}\label{ruxe9flectance-caractuxe9ristiques}}
\hypertarget{vuxe9guxe9tation}{%
\subsubsection{Végétation}\label{vuxe9guxe9tation}}
\begin{itemize}
\item
Infrarouge haut
\item
Rouge et vert bas
\item
Sa réflectance caractéristique montre des sauts dans le domaine
visible (0.4 à 0.7 µm) et le proche infrarouge (1 µm)
\item
L'indice
\textbf{\textcolor{blue}{Normalized Difference Vegetation Index}
(NVDI)} met cette végétation en évidence. [
NVDI = \frac{PIR - R}{PIR + R}
]
\end{itemize}
\hypertarget{eau}{%
\subsubsection{Eau}\label{eau}}
\begin{itemize}
\tightlist
\item
Basse pour toutes les bandes : elle dépend des matières en suspension
qu'elle transporte.
\end{itemize}
\begin{figure}
\centering
\includegraphics{./geomatique_webmapping/signatures_spectrales_combinees.png}
\caption{Signatures spectrales combinées}
\end{figure}
\end{document}



Highlightingenvironment would not color syntax. – egreg Jun 27 '21 at 08:45pandoc geomatique.md -o geomatique.tex)? – Marijn Jun 27 '21 at 08:54- \DefineVerbatimEnvironment{Verbatim}{breaklines, breakanywhere, commandchars=\\\{\}}my Pandoc command fails with an! LaTeX Error: Fileselnolig.sty' not found.later, meaning that I do not master how to write thatDefineVerbatimEnvironment` directive. – Marc Le Bihan Jun 27 '21 at 10:08pandoc geomatique.md -o geomatique.texI have done. Maybe additional parameters should be added to the pandoc command to have better (or other) outputs? – Marc Le Bihan Jun 27 '21 at 17:42pandoc -s geomatique.md -o geomatique.tex, so adding-sas a command line option. Could you add that to the question? Thanks :) – Marijn Jun 27 '21 at 18:03texcode. – Marc Le Bihan Jun 27 '21 at 18:56