討論該文件的幾個選項

討論該文件的幾個選項

我可以自由地在多個選項之間進行選擇,有時只是為了生成的文檔的列印版本。正如我已經在谷歌上搜索的那樣,有很多反對的建議,我只是想聽聽您更喜歡其中一個而不是另一種選擇的內容和原因。我希望您有足夠的耐心與新手討論這些選項。

EDIT1:非常感謝您提供的已經很有價值且有用的提示!我更新了程式碼並刪除了已解決的問題或根據評論進行了更改。我將盡快落實其餘評論。

EDIT2:我想其餘的問題取決於您的個人決定,我編輯了最終的 MWE 以解決已解決的問題。正如所建議的,我提出了一個新問題,涉及所提供的解決方案未在我的設定上編譯的問題。

以下是我正在討論的 MWE 中使用的選項:

\documentclass[12pt,a4paper,listof=flat,oneside]{scrartcl}
\KOMAoptions{captions=tableheading}
\usepackage{nicefrac}
\usepackage{scrlayer-scrpage}
\ihead{\headmark}
\chead*{}
\ofoot*{\pagemark}
\cfoot*{}
\pagestyle{scrheadings}
\automark[section]{section}
\setkomafont{pagehead}{\normalfont}
\KOMAoptions{
    captions=tableheading,
    headsepline=true,
    markcase=upper}\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{xfrac}
\usepackage{xspace}
\newcommand{\eg}{\mbox{e.\,g.}\xspace}
\newcommand{\Eg}{\mbox{E.\,g.}\xspace}
\usepackage[english]{babel} 
\usepackage[left=3.00cm, right=3.00cm, top=2.00cm, bottom=2.5cm, includeheadfoot]{geometry} 
\usepackage[onehalfspacing]{setspace} 
\usepackage{lmodern}
%\usepackage{helvet}
%\renewcommand{\familydefault}{\sfdefault} 
%\fontfamily{phv}\selectfont
\usepackage{color}
\usepackage[
  pdftoolbar = false,
pdfmenubar = false, pdftitle = mwe, pdfauthor = {author}, colorlinks, allcolors = {blue}, bookmarks = true, bookmarksopen = true, bookmarksnumbered = true ]{hyperref} \usepackage{subcaption}

\begin{document} \thispagestyle{leer} \section{Chapter one} \label{sec:ChapterOne} This text shows the current options that I have used for the printed version of my document. What and why would you change something? \begin{itemize} \item Referencing in blue. \Eg: Chapter one on page \ref{sec:ChapterOne} \item In-text math mode I use tfrac or nicefrac like this $\tfrac{1}{2}$ or this $\nicefrac{1}{2}$ and dfrac in the stand-alone equations. Or is sfrac of the xfrac package the way to go? $\sfrac{1}{2}$. What is the difference? \item Different fonts for print-out and digital copy? \Eg helvet for pdf for no serifs? \end{itemize} \newpage Thats what the pagestyle I have choosed looks like, but there is a warning about fancyhdr, how to produce the same output with KOMA?

\begin{figure}[!htbp] \null\hfill \begin{minipage}[b]{0.4\linewidth} \centering \includegraphics[width=\textwidth]{example-image-a} \subcaption{Example A}\label{fig:a} \end{minipage} \hfill \begin{minipage}[b]{0.4\linewidth} \centering \includegraphics[width=\textwidth]{example-image-b} \subcaption{Example B}\label{fig:b} \end{minipage} \hfill\null \caption{Two figures with subcaption and minipage} \end{figure} \end{document}

答案1

對於標題線和腳線的設定scrlayer-scrpage

\usepackage{scrlayer-scrpage}
\ihead{\headmark}
\chead*{}
\ofoot*{\pagemark}
\cfoot*{}
\pagestyle{scrheadings}
\automark[section]{section}
\setkomafont{pagehead}{\normalfont}
\KOMAoptions{captions=tableheading,
    headsepline=true,
    markcase=upper}

使用\thispagestyle{plain.scrheadings}而不是你的\thispagestyle{leer}.

嵌入到您的完整程式碼中(可能不是 MWE 的最新版本):

\documentclass[12pt,a4paper,listof=flat,oneside]{scrartcl}
\KOMAoptions{captions=tableheading}
\usepackage{nicefrac}
\usepackage{scrlayer-scrpage}
\ihead{\headmark}
\chead*{}
\ofoot*{\pagemark}
\cfoot*{}
\pagestyle{scrheadings}
\automark[section]{section}
\setkomafont{pagehead}{\normalfont}
\KOMAoptions{
    captions=tableheading,
    headsepline=true,
    markcase=upper}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{xfrac}
\usepackage{xspace}
\newcommand{\eg}{\mbox{e.\,g.}\xspace}
\newcommand{\Eg}{\mbox{E.\,g.}\xspace}
\usepackage[english]{babel} 
\usepackage[left=3.00cm, right=3.00cm, top=2.00cm, bottom=2.5cm, includeheadfoot]{geometry} 
\usepackage[onehalfspacing]{setspace} 
\usepackage{lmodern}
%\usepackage{helvet}
%\renewcommand{\familydefault}{\sfdefault} 
%\fontfamily{phv}\selectfont
%\usepackage{thumbpdf}
\usepackage{color}
\usepackage[%
  pdftoolbar = false,
  pdfmenubar = false, 
  pdftitle   = mwe,
  pdfauthor  = {author},
  colorlinks,
  allcolors =  {blue},
  bookmarks         = true,
  bookmarksopen     = true, 
  bookmarksnumbered = true
]{hyperref}
\usepackage{subcaption}



\begin{document}
\thispagestyle{plain.scrheadings}
\section{Chapter one} \label{sec:ChapterOne}
This text shows the current options that I have used for the printed version of my document. What and why you would change something? 
\begin{itemize}
\item Referencing in blue. \Eg: Chapter one on page \ref{sec:ChapterOne}
\item In-text math mode I use tfrac or nicefrac like this $\tfrac{1}{2}$ or this $\nicefrac{1}{2}$ and dfrac in the stand-alone equations. Or is sfrac of the xfrac package the way to go? $\sfrac{1}{2}$. What is the difference?
\item Different fonts for print-out and digital copy? \Eg helvet for pdf for no serifs?
\end{itemize}
\newpage
Thats what the pagestyle I have choosed looks like, but there is a warning about fancyhdr, how to produce the same output with KOMA? There is also a warning about no thumbnail data, how to handle this one?


\begin{figure}[!htbp]
    \null\hfill
    \begin{minipage}[b]{0.4\linewidth}
    \centering \includegraphics[width=\textwidth]{example-image-a}
    \subcaption{Example A}\label{fig:a}
    \end{minipage}
    \hfill
    \begin{minipage}[b]{0.4\linewidth}
    \centering \includegraphics[width=\textwidth]{example-image-b}
    \subcaption{Example B}\label{fig:b}
    \end{minipage}   
    \hfill\null   
\caption{Two figures with subcaption and minipage}
\end{figure}    
\end{document}

相關內容