今天玩得很开心!我在下面的例子中使用 mdframed 后,使用后没有文本
\begin{mdframed}
\tableofcontents
\end{mdframed}
,没有目录,没有章节标题,也没有文本“ddddd”。
以下是整个文件:
\documentclass[titlepage=false,14pt,titlepage]{scrreprt}
%\pagenumbering{roman}
\usepackage{ucs} % unicode support
\usepackage[utf8x]{inputenc}
\usepackage[english,hebrew]{babel}
% \usepackage[parfill]{parskip}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{titlesec}
\titleformat{\section}[block]{\sffamily\Large\bfseries\filcenter}{\thesection}{1em}{}
\date{}
\usepackage{enumitem}
\usepackage{setspace}
\renewcommand{\labelenumi}{)\arabic{enumi}(}
\renewcommand{\labelenumii}{\alph{enumii}(}
\setlist[itemize]{leftmargin=1cm,labelindent=0.5cm }
\setlist[enumerate]{leftmargin=0.5cm,labelindent=1cm }
\usepackage{sectsty}
\usepackage{lipsum}
\allsectionsfont{\centering}
\usepackage{tikz}
\usetikzlibrary{arrows}
%------------------------------------------------------
\newcommand{\oneline}{
\begin{itemize}
\setstretch{1.5}{
\item[]
\rule[0 cm]{16cm}{0.4pt}
}
\end{itemize}
}
\usepackage[left= 1cm, right= 1.5 cm, top=1cm,bottom=1cm, footskip=0.5cm]{geometry}
\setcounter{secnumdepth}{-2}
\usepackage{tocloft}
\renewcommand{\cfttoctitlefont}{\normalsize}
\renewcommand{\cftsecfont}{\small}
\renewcommand{\cftsubsecfont}{{\tiny}}
\setlength\cftaftertoctitleskip{5pt}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{sltables}
\usepackage{tabularx}
\usepackage{tabu}
%\usepackage{framed}
\usepackage[framemethod=TikZ]{mdframed}
%--------------------------------------------------
\begin{document}
\begin{titlepage}
\vspace*{0.2 cm}
\begin{center}
{\huge בדיקת דירה \par}
\end{center}
\end{titlepage}
\mdfsetup{ roundcorner=20pt}
\begin{mdframed}
\tableofcontents
\end{mdframed}
%\begin{framed}
%\vspace*{-1.2 cm}
%\tableofcontents
%\end{framed}
\section{תוכנית כללית}
ddddd
\end{document}
答案1
正确的代码是:
\L{
\begin{mdframed} [roundcorner=10pt]
\vspace*{-1.5 cm}
\R{\tableofcontents}
\end{mdframed}
}