Hot answers tagged

19

\documentclass[pagenumber=footright, DIV=20, fontsize=16]{scrartcl} \usepackage[automark]{scrlayer-scrpage} \pagestyle{scrheadings} \ihead{} \ofoot[\pagemark]{\pagemark} \chead{} \cfoot[]{} \ohead{} \begin{document} \def\x{\ifnum\value{page}<501\mbox{}\clearpage\expandafter\x\fi} \x \end{document}


19

Use a primitive \loop with \repeat and \unless testing. \documentclass[pagenumber=footright, DIV=20, fontsize=16]{scrartcl} \usepackage[automark]{scrlayer-scrpage} \pagestyle{scrheadings} \ihead{} \ofoot[\pagemark]{\pagemark} \chead{} \cfoot[]{} \ohead{} \newcounter{loopcntr} \begin{document} \loop\unless\ifnum\value{loopcntr}=500 \mbox{} \newpage \...


13

A variant with package multido (50 bytes): \documentclass[DIV=20, fontsize=16]{scrartcl} \usepackage{lmodern} \usepackage[automark]{scrlayer-scrpage} \pagestyle{scrheadings} \cfoot{} \ofoot[\pagemark]{\pagemark} \usepackage{multido} \begin{document} \multido{}{500}{\null\newpage} \end{document}


12

With expl3: \documentclass[pagenumber=footright, DIV=20, fontsize=16]{scrartcl} \usepackage[automark]{scrlayer-scrpage} \usepackage{expl3} \pagestyle{scrheadings} \ihead{} \ofoot[\pagemark]{\pagemark} \chead{} \cfoot[]{} \ohead{} \begin{document} \ExplSyntaxOn \prg_replicate:nn { 500 } { \mbox{}\newpage } \ExplSyntaxOff \end{document} With no ...


9

The sidenotes package uses package caption to define a caption style sidecaption. You can redeclare this style: \documentclass{scrartcl} \usepackage[T1]{fontenc}% <- added \usepackage{lipsum} \usepackage{graphicx} \usepackage{sidenotes} \DeclareCaptionStyle{sidecaption}{labelfont={sc,bf},justification=raggedright} \begin{document} \lipsum \begin{...


5

While the command \setuptoc{<extension>}{<feature list>} sets the features for an file extension like toc or lof, the command \unsettoc{<extension>}{<feature list>} unsets the listed features. Note that these are tocbasic commands and the file extension must be controlled by package tocbasic. Each of the KOMA-Script classes scrartcl, ...


4

Note that this is unusual. It would be better to not use such a small headsep. But if you really want to do this, you can use \usepackage{xpatch} \xpretocmd\sectionlinesformat{\vspace*{0pt}}{}{\PatchFailed} Then the beforeskip is also inserted if the section titles (section, subsection etc.) are on top of a new page. Additional remarks: Do not set \...


4

\footheight is total height of the foot, including height (space above the baseline) and depth (space below the baseline) of the foot. Your rule starts on the baseline. So the height of the foot must be at least the height of your rule plus the depth of a \strutbox. Therefore scrlayer-scrpage enlarges the former \footheight by \dp\strutbox. On the next ...


4

KOMA-Script has its own captionbeside environment (see manual page 121). With that \addkomafont changed the font for the caption as you wish. Please see the following MWE: \documentclass{scrartcl} \usepackage{lipsum} \usepackage{graphicx} %\usepackage{sidenotes} \setkomafont{captionlabel}{\scshape\bfseries} \begin{document} \lipsum \begin{figure}[htb]...


4

The following is how I'd do it. It's very similar to David Carlisle's answer, but in a way which makes the recursion slightly clearer to me (trying to remember how \expandafter works always gives me a headache!). \begin{document} \def\x{\ifnum \count0>500 \let\next\relax \else \null\clearpage \let\next\x \fi \next} \x \end{document} ...


4

Personally I do not know much about R, but helped prepare a book that used R plots throughout back in 2012. The book is set in Kp-fonts and we wanted as much as we could in that font from R as well (all titles and legends were replaced via psfrag to get proper LaTeX formatting of those, but handling the numbers on axis was a bit too much for psfrag. Here is ...


4

A possible solution working for article and scrartcl (i.e. without using features of KOMA) The page numbers are still right justified, but the width of the page number slot at the right margin is too small, because Roman numbers need more space to be typeset than arabic figures. Increasing the value of \@pnumwidth will solve this problem, however, this ...


3

It is not recommended - see tex.stackexchange.com/a/300541/43317 and komascript.de/node/2039 (German) - but possible with KOMA-Script version 3.19 or newer: \documentclass[parskip=full-]{scrartcl}[2015/10/03] \RedeclareSectionCommand[afterskip=1sp]{section} %the magic happens here \usepackage{xpatch} \xapptocmd\sectionlinesformat{\vspace*{-\parskip}}{}{\...


3

Unfortunately, minitoc is not updated for XeLaTeX or LuaLaTeX and hardcodes the keywords using commands such as \CYRS, \cyrhrdsn and so on. You can simply convert the following code into proper Cyrillic Unicode letters \def\ptctitle{% {\cyr\CYRS\cyrhrdsn\cyrd\cyrhrdsn\cyrr\cyrzh\cyra\cyrn\cyri\cyre}}% \def\plftitle{{\cyr\CYRS\cyrp\cyri\cyrs\cyrhrdsn\...


2

Try this and see if it works for you \documentclass[mpinclude=true]{scrbook} \IfFileExists{luatex85.sty}{\usepackage{luatex85}}{} \usepackage{scrlayer-scrpage} \pagestyle{scrheadings} \usepackage{scrlayer-notecolumn} \begin{document} This is \makenote{margin note} test. \end{document}


2

This solution is based on three ideas: We use a center environment instead of a figure since the content of a figure is limited to one page only. (This idea was stolen from Werner.) We use \setcaptiontype{figure} (or \captionsetup{type=figure}) to make this environment known to the (sub)caption package as figure. BTW: Please don't use \def\@captype{figure} ...


2

You can use \onecolumn to get one column page(s) and \twocolumn to switch back. Note that both commands starts a new page. To have a float using both columns use the starred version of the floating environments. Note that they will not be on the first page. \documentclass[twocolumn]{scrreprt} \usepackage{blindtext}% dummy text \usepackage{microtype} \begin{...


2

This seems like a bug in configuration for scrartcl in tex4ht. At the bottom of scrartcl.4ht, there is this configuration: \pend:defI\@makefntext{\IgnorePar} this put \IgnorePar at the beginning of \@makefntext macro by redefining it. Unfortunately, this redefinition uses normal \def, which causes compilation error when the argument contains paragraph. It ...


1

Use the dedault and don't confuse yourself with self made trouble. \documentclass[a4paper, numbers=noenddot]{scrbook} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{csquotes} \usepackage{hyperref} \begin{document} \appendix \chapter{Animals} \section{Wombat} \section{Capybara} \section{Mara} \chapter{People} \section{Donald} \...


1

Change afterskip for paragraph and subparagraph to a positive value using: \RedeclareSectionCommands[ afterskip=1sp ]{paragraph,subparagraph} Note that 1sp is the smallest possible positive value. Code: \documentclass[parskip]{scrbook} \setcounter{secnumdepth}{5} \RedeclareSectionCommands[ afterskip=1sp ]{paragraph,subparagraph} \begin{document} ...


1

Another solution is the mcaption package. \documentclass{scrartcl} \usepackage{blindtext} \usepackage{graphicx} \usepackage[top]{mcaption} \usepackage{caption} \addtokomafont{captionlabel}{\bfseries\scshape} \addtokomafont{caption}{\itshape} \setcapindent*{0em} \begin{document} \blindtext \begin{figure}[htb] \begin{margincap} \caption{This is my ...


1

Workaround I solved everything in a manual way: I've just created a ``part'' which resembles the bibliography. Anyway this works easy only if you do not have many references and do not need to change often the document.



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