Historique des modifications [retour]
cliquez ici pour masquer/afficher la révision 3
Modif de test 2. Et conclusion que ça ne répond pas bien au PO.

06 Mar '18, 02:44

Mathieu2L's gravatar image

Mathieu2L
356518

Des tentatives de solutions via le package `tcolorbox`. `tcolorbox`, qui ne répondent finalement pas bien au problème. 1/ Si c'est toute la boite qui est à réduire, une possibilité est via l'option `scale` du package `tcolorbox` (voir § 10.7 de la documentation). Cela requiert, pour la boite, de ne pas utiliser le skin `standard` (mais par exemple le skin `enhanced`, qui a besoin de la librairie `skins`). Le contenu, mais aussi la boite, sont tous les deux réduits. Voir test 1. 2/ Si le contenu de la boite est à réduire, mais que la boite doit avoir une hauteur fixée, on peut utiliser l'option `fit` de `tcolorbox`. Cela requiert la librairie `fitting` (voir § 20.2 de la documentation). Voir test 2 (sans le `fit algorithm=areasize`, il réduit le texte mais pas les images... voir la documentation pour d'autres options de `fit algorithm` qui conviendraient peut-être mieux). mieux). Edit : en fait, cela ne conserve pas nécessairement les proportions des images (la doc dit d'ailleurs "The aspect ratio cannot be fully garanteed."). Exemple (avec une image `figure.jpg`) : \documentclass{article} \usepackage{graphicx} \usepackage{tcolorbox} \tcbuselibrary{skins, fitting} \begin{document} \begin{tcolorbox}[title = Etat initial] \includegraphics[width=5cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=4cm]{figure} \end{tcolorbox} \begin{tcolorbox}[title = Test 1, enhanced, scale=0.5] \includegraphics[width=5cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=4cm]{figure} \end{tcolorbox} \begin{tcolorbox}[title= Test 2, fit to height=5cm, fit algorithm=areasize] \includegraphics[width=5cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=4cm]{figure} \end{tcolorbox} \end{document}
cliquez ici pour masquer/afficher la révision 2
Ajout de la solution avec fit, qui semble mieux correspondre au besoin de l'OP

01 Mar '18, 17:36

Mathieu2L's gravatar image

Mathieu2L
356518

Des solutions via le package `tcolorbox`. 1/ Si c'est toute la boite qui est à réduire (et pas seulement chacun des graphiques qu'elle contient), réduire, une possibilité serait est via l'option `scale` du package `tcolorbox` (voir § 10.7 de la documentation). Cela requiert, pour la boite, de ne pas utiliser le skin `standard` (mais par exemple le skin `enhanced`, qui a besoin de la librairie `skins`). `skins`). Le contenu, mais aussi la boite, sont tous les deux réduits. Voir test 1. 2/ Si le contenu de la boite est à réduire, mais que la boite doit avoir une hauteur fixée, on peut utiliser l'option `fit` de `tcolorbox`. Cela requiert la librairie `fitting` (voir § 20.2 de la documentation). Voir test 2 (sans le `fit algorithm=areasize`, il réduit le texte mais pas les images... voir la documentation pour d'autres options de `fit algorithm` qui conviendraient peut-être mieux). Exemple (avec une image `figure.jpg`) : \documentclass{article} \usepackage{graphicx} \usepackage{tcolorbox} \tcbuselibrary{skins} \tcbuselibrary{skins, fitting} \begin{document} \begin{tcolorbox}[enhanced, \begin{tcolorbox}[title = Etat initial] \includegraphics[width=5cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=4cm]{figure} \end{tcolorbox} \begin{tcolorbox}[title = Test 1, enhanced, scale=0.5] TEST 1 \includegraphics[width=5cm]{figure} \includegraphics[width=5cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=4cm]{figure} \end{tcolorbox} \begin{tcolorbox} TEST 2 \includegraphics[width=5cm]{figure} \begin{tcolorbox}[title= Test 2, fit to height=5cm, fit algorithm=areasize] \includegraphics[width=5cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=3cm]{figure} \includegraphics[width=4cm]{figure} \end{tcolorbox} \end{document}\end{document}
cliquez ici pour masquer/afficher la révision 1

28 Fév '18, 22:46

Mathieu2L's gravatar image

Mathieu2L
356518

C'est votre première visite ici ? Consultez la FAQ !

×