I want to write chapter title as attached. For that this code doesn't work for me. Any suggestion:

\usepackage{xcolor,calc, blindtext}
% helper macros
    \parbox{\textwidth}{\chaptitlefont \strut bg\\bg\strut}}
      %\microtypesetup{protrusion=false}% add this if you use microtype
      \chaptitlefont\strut ##1\strut}%
\aliaspagestyle{chapter}{empty} % just to save some space
\chapter{Hansen Memoir Chapter Style}

enter image description here

  • What exactly doesn't work for you (i.e. what errors or result do you get)? – remco Apr 5 '18 at 13:48
  • ! LaTeX Error: File `kpfonts.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: iqra.tex (./iqra.tex ! LaTeX Error: Two \documentclass or \documentstyle commands. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.1 \documentclass{ memoir} ? – Higgs Apr 5 '18 at 13:57
  • So you don't have the package "kpfonts" installed. Perhaps download and install it? (I know it's part of the TeXlive distribution, so it should be available on CTAN). With that package installed, your code works for me with PdfLatex, XeLatex and LuaLatex. – remco Apr 5 '18 at 14:04
  • by adding only \usepackage{kpfonts} will not work? – Higgs Apr 5 '18 at 14:20
  • In MikTeX (Windows), if you request a package that is not installed, then the program will attempt to download and install it. In texlive (Windows, Linux, Mac), if you request a package that is not installed, then the program does NOT attempt to get it for you; instead, an error results. – user139954 Apr 5 '18 at 14:59

Your Answer

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

Browse other questions tagged or ask your own question.