KTUG 한국 텍 사용자 그룹

Menu

KTUG :: Q&A 마당 › scrartcl class 문서를 book 또는 oblivoir class 에서 compile 이 되게 할 수 있나요?

파란초보 | 2021.02.15 07:59:31 | 메뉴 건너뛰기 쓰기
\PassOptionsToPackage{svgnames,table,dvipsnames}{xcolor}
\documentclass[a4paper,10pt,oneside,DIV=9]{scrartcl}

% Packages
\usepackage{scrlayer-scrpage}
\usepackage{xcolor} % showframe loads this
\usepackage[normalem]{ulem}
\usepackage{hyperref}

% demo only
\usepackage{lipsum}
\usepackage{mwe}

% theme colours
\definecolor{MyThemeColour}{cmyk}{0.10,0.10,1.00,0} % personal yellow

\newlength{\mysecnumhang}
\setlength{\mysecnumhang}{30pt}
% KOMA and general setup
\renewcommand*{\sectionformat}{%
  \makebox[\mysecnumhang][l]{\thesection\autodot\enskip}%
}
\renewcommand*{\subsectionformat}{%
  \makebox[\mysecnumhang][l]{\thesubsection\autodot\enskip}%
}
\renewcommand*{\subsubsectionformat}{%
  \makebox[\mysecnumhang][l]{\thesubsubsection\autodot\enskip}%
}

\newbox\tmpseclinenobox
\renewcommand{\sectionlinesformat}[4]{%
  \sbox\tmpseclinenobox{#3}%
  \ifdim\wd\tmpseclinenobox>0pt\hspace{-\mysecnumhang}\fi
  \expandafter\headuline{#3#4}%
}

\newcommand\headuline{%
    \bgroup\markoverwith{\textcolor{MyThemeColour}{\rule[-0.75ex]{1pt}{1pt}}}\ULon% 2pt 2pt
    }

% recalc the text block after all the font loading
\KOMAoptions{DIV=last}

\begin{document}
\section*{Lipsum}
Some text.
\section{Lipsum}
\blinddocument
\end{document}

댓글 [4]

댓글 쓰기

목록 삭제

KTUG 한국 텍 사용자 그룹