GeneralCompilation

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
armc242
Posts: 2
Joined: Tue Mar 23, 2021 6:14 pm

Compilation

Post by armc242 »

Hi, I am preparing a document.

This is my preamble.

Code: Select all

\documentclass[11pt,twoside]{article}

%\setcounter{page}{127}

%\usepackage[cp1251]{inputenc}
\usepackage{graphicx}
\usepackage{amssymb,amsmath}
\usepackage{fancyhdr}
%\usepackage[russian]{babel}
\usepackage{bm}
%\headrulewidth=0pt
\textwidth=165mm % ��ਭ� ⥪���
%\pagestyle{fancyplain}
\oddsidemargin=-4.2mm % ����� ���� ��� ����⭮� ��࠭��� (+1 �)
\evensidemargin=4.4mm % ����� ���� ��� ��⭮� ��࠭��� (+1 �)
\textheight=234mm % ������ ⥪��� �� ��࠭���
\topmargin=-5mm % ���孥� ���� (+1 �)
\headheight=5.0mm % ����� ��� ��������㫠
\headsep=6.6mm % ������ ��᫥ ��������㫠 6.6 5.6
\footskip=8.1mm % ������ﭨ� �� ��������㫠 8.1 7.1
%\renewcommand{\baselinestretch}{0.9} % ����૨���� 0.9 0.87
% �������. ��⠢��� � �ॠ�����
\usepackage{caption2}
\usepackage[rightcaption]{sidecap}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{euscript}
\usepackage{cite}
\usepackage{subcaption}


\usepackage{array}
\newcommand\norm[1]{\left\lVert#1\right\rVert}
%\usepackage{lscape}
%
\setcaptionwidth{\linewidth}
%
\renewcommand{\captionlabeldelim}{.~}
\renewcommand{\captionlabelfont}{\bfseries}
\renewcommand{\captionfont}{\footnotesize}

%\def\thesubsection{\arabic{subsection}}


\newcommand{\supp}{\operatornamewithlimits{supp}}

\newcommand{\wt}{\widetilde}
\newcommand{\wh}{\hat}
\newcommand{\pri}{\;\;\;\text{for}\;\;\;}

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}

\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{remark}{Remark}

\usepackage[utf8]{inputenc}

\usepackage{enumitem}
\usepackage{listings}
\usepackage{xcolor}

%New colors defined below
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}

%Code listing style named "mystyle"
\lstdefinestyle{mystyle}{
  backgroundcolor=\color{backcolour},   commentstyle=\color{codegreen},
  keywordstyle=\color{magenta},
  numberstyle=\tiny\color{codegray},
  stringstyle=\color{codepurple},
  basicstyle=\ttfamily\footnotesize,
  breakatwhitespace=false,         
  breaklines=true,                 
  captionpos=b,                    
  keepspaces=true,                 
  numbers=left,                    
  numbersep=5pt,                  
  showspaces=false,                
  showstringspaces=false,
  showtabs=false,                  
  tabsize=2
}

%"mystyle" code listing set
\lstset{style=mystyle}

\title{Code Listing}
\date{ }

\begin{document}

\end{document}
The document compiles, however, there is an added line at the top of the document:
figuretable [sub]size=smaller,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0
[sub]

I am not sure what the error is or why this is showing.
Last edited by Stefan Kottwitz on Tue Mar 23, 2021 6:25 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Compilation

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

If you remove \usepackage{subcaption} then the document compiles and there's not such a line on top.

You can also try it here in the code editor right in the forum.

subcaption requires the caption package that's newer and replacing the caption2 package. Actually, removing it is not the solution, but considering re-working the whole preamble (or using a newer template) would be recommendable.

Stefan
LaTeX.org admin
armc242
Posts: 2
Joined: Tue Mar 23, 2021 6:14 pm

Compilation

Post by armc242 »

Thank you so much!!
Post Reply