如何将 Section Header 压缩为一行?

如何将 Section Header 压缩为一行?

我想将节标题设为一行,但它跳转到下一行,如图所示。如何修复? 章节标题

这是我正在使用的模板。

\documentclass[12pt, twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}
\usepackage{marginnote}
\usepackage{ragged2e}
\usepackage{fontspec}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}\usetikzlibrary{shapes.misc}
\usepackage{mathrsfs}                  
\usepackage{xcolor}
\usepackage{geometry}
\geometry{paperheight=10in,paperwidth=8in, inner=20mm, outer=70mm, bottom=30mm, top=20mm,    marginparsep=5mm,   marginparwidth=50mm}


\definecolor{inchworm}{rgb}{0.7, 0.93, 0.36}

\titleformat{\section}[block]%              
{\large\bfseries%
    \tikz[overlay] \shade[left color=inchworm,right color=white,] (-0.1,-1ex) rectangle (\textwidth,1em);}%    
{\thesection}%                   
{1em}%
{#1}



\begin{document}
\setcounter{chapter}{1}
\section{Common Logarithm and Natural Logarithm}
\marginnote{
    \begin{center}

        The logarithm of $N$ to the base 10 $(\log_{10}N)$ is said to be a common logarithm, 
        and is usually written as $\log N$ (omitting the base)

\end{center}}[-8ex]
\end{document}

相关内容