Tag Info

Hot answers tagged

6

Update My original answer (see below) works with both MiKTeX2.9 and TL 2015 but not with 2014 (but you can load fixltx2e to get it to work as @Johannes mentioned in a comment). So here is another suggestion. \documentclass[english]{scrreprt} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{blindtext} \KOMAoption{chapterprefix}{true} ...


4

Both \sectionmark and \subsectionmark should take an argument: \renewcommand{\sectionmark}[1]{}%prevent rewriting \markright \renewcommand{\subsectionmark}[1]{}%prevent rewriting \markright The \section command produces \sectionmark{<title>} and if you redefine \sectionmark to have no argument, the tokens {<title>} are not removed.


4

A bit alternative approach: \documentclass{scrreprt} \let\raggedchapter\centering \setkomafont{chapterprefix}{\normalsize\mdseries} \KOMAoption{chapterprefix}{true} \renewcommand{\chapterheadmidvskip}{% \par\nobreak\vskip -.1cm {\rule{.9\textwidth}{.5pt}}\par% } \RedeclareSectionCommand[beforeskip=0pt,afterskip=8\baselineskip]{chapter} ...


3

For a lack of the actual code, i cannot really tell why this spacing is introduced, but here a solution using KOMA-only methods. \documentclass[english]{scrbook} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{blindtext} \KOMAoption{chapterprefix}{true} \renewcommand*\raggedchapter{\raggedleft} \addtokomafont{chapter}{\large} ...


3

Because you are loading scrlayer-scrpage: Remove the (unnecessary) redefinitions of \sectionmark and \subsectionmark and use the possibilities of scrlayer-scrpage. \usepackage{scrlayer-scrpage} \automark{chapter}% -> section does not rewrite \markright \clearpairofpagestyles \renewcommand{\chaptermarkformat}{} \addtokomafont{pagehead}{\small} ...


3

It doesn't seem like a good idea. \documentclass{article} \usepackage{titlesec,graphicx} \titleformat{\section} {\Large\bfseries} {\thesection} {1em} {\resizetitle} \newcommand{\resizetitle}[1]{\resizebox{\sectionwidth}{!}{#1}} \newlength{\sectionwidth} \AtBeginDocument{% \setlength{\sectionwidth}{.3\textwidth}% } \begin{document} \section{Abc} ...


2

This just uses a \section*{\ackname} command to insert a heading and an itemize list into the document. Since there is no real information on formatting requirements, I kept it simple. (I would not use it this way, of course, let alone the names ;-)) \documentclass[11pt,a4paper,oneside]{memoir} \usepackage{blindtext} ...


1

I found the error, but now I just feel really stupid! It's a template I borrowed from a friend, and in the code (where I did not suspect it to be) I found \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{-2cm} I have no idea why this is desirable, but never the less, the problem is solved.


1

I think \automark[section]{section} is the correct command, which will 'break' the standard section|subsection style of KOMA scrartcl class. \documentclass[twoside]{scrartcl} \usepackage{lipsum} \usepackage[header,title,titletoc]{appendix} \usepackage[automark,headsepline]{scrlayer-scrpage} \pagestyle{scrheadings} \begin{document} ...


1

If you're not using any sectional packages, then you can patch \@sect - used by all (unstarred) sectional commands to set the heading: \documentclass{article} \usepackage{etoolbox} \makeatletter \patchcmd{\@sect}% <cmd> {\@xsect}% <search> {\label{sec:#8}\@xsect}% <replace> {}{}% <successs><failure> \makeatother ...


1

This is a quick solution with the cntperchap package (I am quite familar with its author ;-)) The key is to register counters which should be tracked on a per chapter base, here it is the section counter. Then use the \GetStoredCounterValue[chapter number]{section} macro to get the number of sections in the relevant chapter. This does not print the number ...


1

The following example remembers the section count in the .aux file. A counter abs@chapter is used to identify the chapter. Thus also starred or unnumbered chapters are supported. \section is redefined to write a line in the .aux file, which increases the number of sections for the current chapter. Also starred \section commands are supported. In the next ...


1

If I understand you correctly, you like to change vertical space before of one chapter head. This you can obtain width: \documentclass[openany]{memoir} \usepackage{lipsum} \setlength\beforechapskip{9\baselineskip} \begin{document} \chapter{one} \lipsum[1-2] \setlength\beforechapskip{0\baselineskip} \chapter{two} ...


1

You can use Enrico’s answer in the other question, provided you define a macro that outputs the Bengali numerals, as in the code below: \documentclass{article} \makeatletter \def\bengalidigits#1{\expandafter\@bengali@digits #1@} \def\@bengali@digits#1{% \ifx @#1 \else ...



Only top voted, non community-wiki answers of a minimum length are eligible