0

Update: moewe's comment worked great. removing the package cmbright resolved the problem.

when I try using \caption{ bla bla \tiny bla bla} in a normal scrbook document, I keep getting the following error messages: Illegal parameter number in definition of \reserves@a.

Does any of you know a way to use different font sizes within one caption? I want to include a brief description of the references in the caption itself, which is why I'd like to use a smaller font size...

Thank you very much!

Best, Nuky

EDIT: MWE added.

\documentclass[fontsize=11pt,parskip,a4paper,numbers=noenddot]{scrbook}        
\usepackage[main=english,ngerman]{babel}
\usepackage[ansinew]{inputenc}                  % allow Latin1 characters% use german characters as well
\usepackage[T1]{fontenc}
\newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
\usepackage[bottom=1.8cm,top=1.4cm, left=1.2cm, right=1.2cm]{geometry}
%\usepackage{textcomp}

%\usepackage[bottom=2.5cm,top=2.0cm, left=2.3cm, right=2.3cm]{geometry}         
%override der scrbook seitenränder einstellung [bottom=2.5cm,top=2.0cm, left=2.3cm, right=2.3cm]
\usepackage{cmbright,helvet} %Schriftart Helvetica
%\changefont{ptm}{m}{n}                                 % Times Schriftart
\changefont{phv}{m}{n}                  % Helvet Schriftart
%\usepackage{times}
%\usepackage{mathptmx}                                  % Times Matheschriftart

%\usepackage{mathpazo}                                  % Palatino Matheschriftart
\renewcommand{\rmdefault}{\sfdefault}
\setkomafont{sectioning}{\sffamily\bfseries} % Kapitelüberschriften in gleicher (Times) Schriftart + fett    
\usepackage{color}                                          % use colors
\usepackage{colortbl}                                       % Einzelne Tabellenzellen farbig hervorheben
\definecolor{hellgrau}{rgb}{0.95,0.95,0.95}
\usepackage{amsmath}                                        % make fancy math
\usepackage{amsfonts}                                       % the American Mathematical Society (AMS) has compiled a collection, known as AMSFonts, which contains fonts of symbols and several alphabets
\usepackage{amssymb}                                        % wieder irgendwelche notwendigen Symbole von der AMS
\usepackage{textcomp}                                       % Durch Einbinden des textcompanion-Pakets steht eine Sammlung von nichtmathematischen Symbolen zur Verfügung.
\usepackage{latexsym}                           % Symbole
\usepackage{nicefrac}
\usepackage{verbatim}                                       % comment blocks
\usepackage{pifont}                                         % neu seit 29.04.2012, spezielle Sonderzeichen
\usepackage{makeidx}                                        % create an index
\usepackage{setspace}
\usepackage{microtype}                                  %   Paket "microtype": Erlaubt LaTeX, die Abstände zwischen einzelnen Zeichen leicht zu variieren, um ein schöneres Schriftbild zu erzeugen. Vermindert die Gefahr, dass über den Absatzrand hinausgeschrieben wird (weniger zu volle/leere Boxen). Funktioniert jedoch nicht mit allen verfügbaren Schriften.
\usepackage{multirow}
\usepackage{array}
\usepackage{caption}                                        %2015-11-11
\usepackage{graphicx}                                       % Graphik-Umgebung
\graphicspath{{../1-figures/}}
\usepackage{subcaption}
\usepackage{float}                                          % Paket um Bilder / Tables genauer positionieren zu können. --> Verursacht eine Warnung, ...
\usepackage{scrhack}                                        % ... wenn es ohne scrhack verwendet wird.
%\usepackage{subfig}                                            % mehrere Bilder nebeneinander
\usepackage{icomma}                                         % Komma als Dezimalzeichen, sonst kommt ein Leerzeichen dahinter...
\usepackage{nomencl}                                        %   Paket "nomencl": Ermöglicht das Erzeugen eines Symbolverzeichnisses.
\makenomenclature                                               %    \makenomenclature: Weist den LaTeX-Interpreter pdflatex.exe an, Informationen zur Nomenklatur in eine extra Datei zu schreiben. Diese kann dann vom Indexgenerator makeindex.exe verarbeitet werden. Die Rückgabe von makeindex.exe wird beim nächsten Durchlauf von pdflatex.exe in die PDF-Datei geschrieben.
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\usepackage{longtable}%    
\usepackage{multicol}                                   % z.B. um Bilder nebeneinander anzuzeigen


\begin{document}
\begin{figure}%
\includegraphics[draft,width=\columnwidth]{dummy}%
\caption{hello \tiny hello}%
\label{label}%
\end{figure}

\end{document}
  • 1
    Welcome to TeX.SX! Does it help if you group the \tiny i.e. \caption{ bla bla {\tiny bla bla}}? You are much more likely to receive a helpful answer that works with your actual code if you could provide an MWE? – moewe Nov 11 '15 at 10:03
  • Thank you! Unfortunately putting it in brackets didnt help, already tried that one :/ I would've posted a MWE... but my document is huge (phd thesis...) Any other ideas? :) – Nukularkueken Nov 11 '15 at 10:14
  • Sorry, without an MWE there are just too many variables here. You don't have to (and shouldn't) post your entire PhD thesis, just try and recreate your problem in an as short as possible document. That we can run and examine. Make sure that the MWE issues the exact error as your actual document. – moewe Nov 11 '15 at 10:16
  • moewe, MWE added :P btw - it doesn't matter if i use \usepackage{caption} or not. – Nukularkueken Nov 11 '15 at 10:37
  • That is quite a full on template, are you sure you need everything you have there? Anyway, the culprit is cmbright. If you get rid of that, there are no errors any more. You might want to read komascript.de/latexvorlage – moewe Nov 11 '15 at 10:41
1

moewe comment works pretty well for me.

MWE :

\documentclass{article}
\begin{document}
\begin{figure}

\caption{{\tiny tiny} {\large large}  {\huge huge}  {\Huge Huge}}
\end{figure}
\end{document}

enter image description here

  • moewe,lalylulelo thanks for your efforts. Your MWE works great, however it doesn't work in my MWE... highly appreciate your help on this. Also tried replacing the document class with article instead scrbook... error remains. – Nukularkueken Nov 11 '15 at 10:36
  • I also change to srcbook and it works for me. I tried your MWE (not really minimal btw). I had two errors with the package cmbright and with subcaption. Does it work without those two packages? EDIT: I confirm that I have the same error "illegal parameter ..." with the cmbright package. – Lalylulelo Nov 11 '15 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.