PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Grafiken Nummerieren, aber mit "Untergrafiken"



martinli
17-11-2012, 16:27
Hallo,

Ich füge momentan alle Grafiken folgendermaßen ein:


\begin{figure}[htbp]
\centering
\caption{XXX}
\label{fig:XXX}
\includegraphics[scale=.4]{bilder/XXX.png}\\
\end{figure}

Entsprechend werden alle Grafiken fortlaufend nummeriert, was auch OK ist. nun habe ich aber auch ein paar Grafigen, die Sinngemäß zusammen gehören.
Diese würde ich gern folgendermaßen nummerieren:

Grafik 13 A
Grafik 13 B
Grafik 14
und so weiter.
Hat jemand eine Idee wie ich das machen kann?

Vielen Dank im vorraus

Martin

rstuby
17-11-2012, 16:58
Es gibt ein Paket subcaption. Benutzt habe ich es allerdings noch nicht.

martinli
17-11-2012, 17:11
Hmm,
Das könnte wohl helfen, aber es scheint, als ob das Probleme mit dem Usepackage:
\usepackage[bf]{caption} hat.


%\usepackage{subcaption} %Für SUB-Darstellungen
\usepackage[bf]{caption} %% Schrift
\renewcommand{\captionfont}{\small\itshape} %% Abb., fett
\setcaptionwidth{10cm} %% die Breite

Unabhängig davon bekomme ich gerade das Warning:
\caption will not be redefined since it's already redifined by a Document class or package whch is unknown to the caption package.
Weiß jemand wo dieser Fehler hekommt? Ich kann den gerade garnicht zuordnen.

Viele Grüße

Martin

bobmalaria
17-11-2012, 17:27
hi,

lade subcaption nach caption. die pakete sind vom gleichen autor und funktionieren auf jeden fall zusammen.

schau dir die doku von subcaption an für beispiele.

gruss

martinli
17-11-2012, 17:43
Hallo noch mal,

Ich bin jetzt noch mal durch die Doku, konnte aber keinen Feher finden.
Vielleicht hängt es mit was anderem zusammen, drum hier noch mein kompletter header:



\documentclass[12pt,oneside,a4paper,headinclude=on,footinclude=of f,DIV=20,BCOR=25mm]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{amsmath,amssymb,amsthm,amsfonts,latexs ym}
\usepackage[latin1]{inputenc}
\usepackage{courier}
% fuer Zitate
\usepackage[round]{natbib}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage[table]{xcolor}
\usepackage{tabu}

\usepackage{textcomp} %Sonderzeichen
%Für Tabellenfarben
% Define user colors using the RGB model
\definecolor{dunkelgrau}{rgb}{0.8,0.8,0.8}
\definecolor{hellgrau}{rgb}{0.95,0.95,0.95}

\usepackage{flexisym}
\usepackage{breqn}

%% Text Hintergrundfarbe ohne Randabstand:
\setlength{\fboxsep}{0pt}
%%Zeilenabstand
\usepackage{setspace}
\onehalfspacing
%%Seitenränder
\usepackage[left=30mm,right=30mm,top=25mm,bottom=25mm]{geometry}
%%SUBSUBSUBSECTIONS

\usepackage[]{blindtext}
\usepackage[]{forloop}
\usepackage{titlesec}
\usepackage[]{titletoc}

\titlecontents{subsubsubsection}[9em]{}{\contentslabel{3.9em}}%
{\hspace*{-1.2em}}{\titlerule*[0.675pc]{.}\contentspage}

\makeatletter
\newcounter{subsubsubsection}[subsubsection]
\setcounter{subsubsubsection}{1}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{5}
\renewcommand{\thesubsubsubsection}{\thesubsubsect ion.\@arabic\c@subsubsubsection}

\titleclass{\subsubsubsection}{straight}[\subsubsection]
\titleformat{\subsubsubsection}{\bf}{\thetitle}{1e m}{}[]
\titlespacing{\subsubsubsection}{0pt}{3.25ex plus 1ex minus 0.2ex}{1.5ex plus 0.2ex}

%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%
%% Für das Abkürzungsverzeichnis
\usepackage[printonlyused,]{acronym}
\renewcommand{\bflabel}[1]{\normalfont{\normalsize{#1}}\hfill}
%% Für lange Tabellen
\setkeys{breqn}{breakdepth={100}}
%\usepackage{setspace}
%\setkeys{breqn}{compact}
\usepackage{lscape} %Für querformatige Seiten
\usepackage{lscape,longtable,booktabs} %Für Mehrseitige Tabellen, die noch mehr können
\usepackage{booktabs} %Für Dicke Linien in Tabellen
\usepackage[headsepline,plainheadsepline]{scrpage2}
\automark{section}
\pagestyle{scrheadings}
%% Für das Darstellungsverzeichnis
\addto{\captionsngerman}{
\renewcommand{\contentsname}{\sffamily Inhaltsverzeichnis}
\renewcommand{\listfigurename}{\sffamily Darstellungsverzeichnis}%Darstellungs anstelle von Abbildungsverzeichnis
\renewcommand{\figurename}{\sffamily Darstellung}%Darstellung anstelle von Abbildung
}
%% Für lange Titel in Darstellungen:

\usepackage[bf]{caption} %% Schrift
\renewcommand{\captionfont}{\small\itshape} %% Abb., fett
\setcaptionwidth{10cm} %% die Breite
\usepackage[list=true]{subcaption} %Für SUB-Darstellungen
%%Säulendiagramme
\usepackage{pgfplots}
\pgfplotsset{compat=1.6}
%% Kopfzeile
\clearscrheadfoot
\ihead[\headmark]{\headmark}
\ohead[\pagemark]{\pagemark}
\pagestyle{scrheadings}
%%\input{zeilenumbruch.tex}
\usepackage{here} %Damit Figure HERE ist

\begin{document}

Folgender Fehler wird ausgespuckt:
! Package Caption Error: The 'subcaption' package does not work correctly in compatibility mode.
Ich komme da gerade leider nicht weiter....
Vielen Dank noch mal
Martin

defcon
19-11-2012, 08:43
genau das gleiche Problem hatte ich auch schon. Ich habe dann einfach das subfig (ftp://ctan.tug.org/tex-archive/macros/latex/contrib/subfig/subfig.pdf) Paket benutzt. Das funktioniert einwandfrei.

Hier noch ein codeschnipsel, der die Verwendung zeigt... (Auszug aus hier (http://texblog.org/2011/05/24/placing-figures-side-by-side-subfig/))


\documentclass[11pt, a4paper, draft]{article}
\usepackage{graphicx}
\usepackage[lofdepth,lotdepth]{subfig}
\begin{document}

\section{Example with 4 "sub" figures 2x2}
\begin{figure}[h]
\centering
\subfloat[Subfigure 1 list of figures text][Subfigure 1 caption]{
\includegraphics[width=0.4\textwidth]{figure1.jpg}
\label{fig:subfig1}}
\qquad
\subfloat[Subfigure 2 list of figures text][Subfigure 2 caption]{
\includegraphics[width=0.4\textwidth]{figure2.jpg}
\label{fig:subfig2}}
\subfloat[Subfigure 3 list of figures text][Subfigure 3 caption]{
\includegraphics[width=0.4\textwidth]{figure3.jpg}
\label{fig:subfig3}}
\qquad
\subfloat[Subfigure 4 list of figures text][Subfigure 4 caption]{
\includegraphics[width=0.4\textwidth]{figure4.jpg}
\label{fig:subfig4}}
\caption{This is a figure containing several subfigures.}
\label{fig:globfig}
\end{figure}

\end{document}

rstuby
19-11-2012, 08:59
Martinli, erstelle bitte ein komplettes lauffähiges Minimalbeispiel. Dann können wir ausprobieren, was da schief läuft. Außerdem könnte es sein, dass du beim Ausprobieren, welche Pakete und Einstellungen aus der Präambel für das Problem relevant sind, schon von alleine auf die Lösung kommst.

sommerfee
19-11-2012, 10:39
Folgender Fehler wird ausgespuckt:
! Package Caption Error: The 'subcaption' package does not work correctly in compatibility mode.

Das breqn-Paket ist incompatibel zum (sub)caption-Paket, siehe auch:

http://tex.stackexchange.com/questions/67931/is-there-an-incompatibility-between-the-packages-breqn-and-subcaption

BTW: Ich sehe nicht, daß man für die Lösung des Problems das subcaption-Paket benötigt:



\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{caption}
\renewcommand\theContinuedFloat{\Alph{ContinuedFlo at}}

\begin{document}
\begin{figure}
\ContinuedFloat*
\caption{}
\end{figure}
\begin{figure}
\ContinuedFloat
\caption{}
\end{figure}
\begin{figure}
\caption{}
\end{figure}
\end{document}


Ansonsten lohnt sich hier IMHO auch ein Blick auf das subfloat-Paket.

martinli
19-11-2012, 10:56
Moin,
ich hab es jetzt mal mit dem code von defcon probiert und das klappt soweit. Schaut gut aus, sowohl im Text, als auch im Darstellungsverzeichnis:

48 This is a figure containing several subfigures. . . . . . . . . . . . . . . . 55
-------(a) Subfigure 1 list of figures text . . . . . . . . . . . . . . . . . . . . 55
-------(b) Subfigure 2 list of figures text . . . . . . . . . . . . . . . . . . . . 55
-------(c) Subfigure 3 list of figures text . . . . . . . . . . . . . . . . . . . . 55
-------(d) Subfigure 4 list of figures text . . . . . . . . . . . . . . . . . . . . 55

Vielen Dank für die Hilfe.

Martin