1

The first part of the question has an answer GRAPHIQUE ENVIRONMENT. I want to create the same environment as subfigures (called graphique for instance) to put photos side by side.

\documentclass{report}

\usepackage[demo]{graphicx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{float}
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{subcaption}%to insert subfigures side by side
\usepackage{sidecap}%side caption
\usepackage{wrapfig}% to wrp a figure

\newfloat{Planche}{hbtp}{lop}[section]
\newfloat{graphique}{tpbh}{grp}[chapter]
\newcommand{\listofgraphiquesname}{Table des graphiques}
\newcommand{\listofgraphiques}{%
  \listof{graphique}{\listofgraphiquesname}%
}
\crefname{graphique}{graphique}{graphiques}
\Crefname{graphique}{Graphique}{Graphiques}
\renewcommand{\thegraphique}{\arabic{graphique}}
\renewcommand{\thefigure}{\arabic{figure}}


\begin{document}
\listoffigures
\listofgraphiques
\clearpage
See \cref{grp-lagraphique} or \Cref{grp-lagraphique} or \Cref{grp-lagraphique,grp-lagraphique-encore} for more information. 
\chapter{Alors\dots}
\begin{figure}
  \centering
  \includegraphics[scale=0.5]{ente}
\caption{Foo figure} \label{fig-lafigure}
\end{figure}
\begin{graphique}
  \centering
  \includegraphics[scale=0.5]{ente}
  \caption{C'est bon!}  \label{grp-lagraphique}
\end{graphique}



\begin{figure}[h!]
    \begin{center}
        \begin{subfigure}[b]{0.32\textwidth}
            \centering
            \includegraphics[width=\textwidth, keepaspectratio]{example-imege} 
            \caption{subfigure}\label{fig7:a}      
            \hfill
            \vspace{2ex}
        \end{subfigure}%% 
        \hfill
        \begin{subfigure}[b]{0.34\textwidth}
            \centering
            \includegraphics[width=\textwidth, keepaspectratio]{example-imege} 
            \caption{subfigure}\label{fig7:b} 
            \hfill
            \vspace{2ex}   
        \end{subfigure} 
        \hfill  
        \begin{subfigure}[b]{0.32\textwidth}
            \centering
            \includegraphics[width=\textwidth, keepaspectratio]{example-imege} 
            \caption{subfigure}\label{fig7:b} 
            \hfill
            \vspace{2ex}   
        \end{subfigure}   
        \caption{subfigure}\label{fig:houseCracks}   
    \end{center}    
\end{figure}
\end{document}
2
  • 1
    Adding \DeclareCaptionSubType{graphique} to the preamble should allow you to use subgraphique just as you can already use subfigure.
    – leandriis
    Nov 5, 2021 at 18:42
  • It works well, is there a way to add a label for this environment to \listofgraphiques? the question is here tex.stackexchange.com/questions/621489/… Nov 5, 2021 at 20:56

0

You must log in to answer this question.

Browse other questions tagged .