使用“内联”部分

使用“内联”部分

我如何才能将我的部分的起点(参见 MWE 的顶部)作为一个内联文本获取,类似于对 MWE 的底部所做的操作?我需要sections因为我的title marks等功能基于它们。请查看示例中包含单词“CATALAN”的部分。

\documentclass{article}
\usepackage{titlesec, marginnote}

% turns sections into arabic numbers
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\arabic{subsection}}

% sections and subsections formatting
% package = titlesec
\titleformat{\section}{}{\lettrine{\thesection}}{0em}{}[\vskip-1\baselineskip]
\titleformat{\subsection}[leftmargin]{\small\bfseries}{\thesubsection}{1em}{}
\titlespacing{\section}{\howwide}{-1pt}{0pt}
\titlespacing{\subsection}{0pt}{0pt}{1em}

\begin{document}

\subsection{}Babel and hyphenation patterns for english, dumylang, nohyphenation, german-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabic, armenian, basque, bulgarian,
\subsection{}CATALAN, pinyin, coptic, croatian, czech, danish, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnish, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic

\reversemarginpar

\marginnote{{\bf 1}}Babel and hyphenation patterns for english, dumylang, nohyphenation, german-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabic, armenian, basque, bulgarian,
\marginnote{{\bf 2}}CATALAN, pinyin, coptic, croatian, czech, danish, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnish, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic

\end{document}

平均能量损失

答案1

如果你的线条不太深,可以这样做:

\documentclass{article}
\newcommand{\marginsec}[1]{%
  \refstepcounter{marginsec}%
  \mbox{\strut#1}\vadjust{\vbox to 0pt{
    \sbox0{\bfseries\themarginsec\quad}
    \kern-\ht0
    \kern-\dp\strutbox
    \llap{\box0 }
    \vfill
    }
  }%
}
\newcounter{marginsec}

\begin{document}
\marginsec{Babel} and hyphenation patterns for english, dumylang, nohyphenation,
german-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabic,
armenian, basque, bulgarian,
\marginsec{CATALAN}, pinyin, coptic, croatian, czech, danish, dutch, ukenglish,
usenglishmax, esperanto, estonian, ethiopic, farsi, finnish, french, galician, german,
ngerman, swissgerman, monogreek, greek, hungarian, icelandic
\end{document}

答案2

你们男人也做过这样的事吗?

\documentclass{article}
\makeatletter
\renewcommand\section{%
  \@startsection{section}{1}{-1.5em}%
                            {1ex \@plus1ex \@minus.2ex}%
                            {0em}%
                            {\normalfont\normalsize\bfseries}}
\makeatother
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\arabic{subsection}}

\begin{document}

\section{}Babel and hyphenation patterns for english, dumylang, nohyphenation, german-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabic, armenian, basque, bulgarian,
\section{}CATALAN, pinyin, coptic, croatian, czech, danish, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnish, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic

\end{document}

在此处输入图片描述

相关内容