Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- newcommandmybook[1]{paragraph{B getcurrentref{subsection}-getcurrentref{paragraph}: #1}hfillparvspace{0.2baselineskip}}%
- documentclass{scrreprt}
- usepackage{etoolbox}
- % get currentref command
- newcommandgetcurrentref[1]{%
- ifnumequal{value{#1}}{0}
- {??}
- {thevalue{#1}}%
- }
- % remove label from paragraph, even if numbered
- renewcommand*{paragraphformat}{}
- % custom paragraph heading
- newcommandmybook[1]{paragraph{B getcurrentref{subsection}-getcurrentref{paragraph}: #1}hfillparvspace{0.2baselineskip}}%
- setcounter{secnumdepth}{4} % how many sectioning levels to assign numbers to
- setcounter{tocdepth}{2} % how many sectioning levels to show in ToC
- begin{document}
- chapter{Books (chapter)}
- section{Fiction (section)}
- subsection{Dystopy (subsection)}
- subsubsection*{George Orwell (subsubsection 1.1.1.1)}
- mybook{Animal Farm (paragraph)}label{AnimalFarm}
- Animal Farm is an allegorical and dystopian novella by George Orwell, first [...]
- mybook{1984 (paragraph)}
- Nineteen Eighty-Four, often published as 1984, is a dystopian novel [...]
- I'd like to reference Animal Farm (ref{AnimalFarm}) as B 1-1 [...]
- subsubsection*{Aldous Huxley (subsubsection 1.1.1.2)}
- mybook{Brave New World (paragraph)}
- Brave New World is a novel written in 1931 by [...]
- subsection{Historic Novel (subsection)}
- subsubsection*{Ken Follet}
- mybook{The Pillars of the Earth (paragraph)}
- section{Non-Fiction}
- subsection{Cooking}
- subsubsection*{Baking}
- mybook{Baking without flour}
- subsubsection*{Cooking}
- mybook{Cooking without water}
- end{document}
- documentclass{scrreprt}
- usepackage{etoolbox}
- % get currentref command
- newcommandgetcurrentref[1]{%
- ifnumequal{value{#1}}{0}
- {??}
- {thevalue{#1}}%
- }
- % remove label from paragraph, even if numbered
- renewcommand*{paragraphformat}{}
- % custom paragraph heading
- newcommandmybook[1]{paragraph{B getcurrentref{subsection}-getcurrentref{paragraph}: #1}hfillparvspace{0.2baselineskip}}%
- renewcommand{theparagraph}{B arabic{subsection}-arabic{paragraph}}
- usepackage{cleveref}
- crefname{paragraph}{paragraph}{paragraphs}
- Crefname{paragraph}{Paragraph}{Paragraphs}
- setcounter{secnumdepth}{4} % how many sectioning levels to assign numbers to
- setcounter{tocdepth}{2} % how many sectioning levels to show in ToC
- begin{document}
- chapter{Books}
- section{Fiction}
- subsection{Dystopy}
- subsubsection*{George Orwell}
- mybook{Animal Farm}label{AnimalFarm}
- Animal Farm is an allegorical and dystopian novella by George Orwell, first [...]
- mybook{1984}
- Nineteen Eighty-Four, often published as 1984, is a dystopian novel [...]
- subsubsection*{Aldous Huxley}
- mybook{Brave New World}
- Brave New World is a novel written in 1931 by [...]
- section{Interpretation}
- I'd like to Reference Animal Farm (ref{AnimalFarm}) as B 1-1 [...]
- cref{AnimalFarm}
- end{document}
- documentclass[a4paper, 11pt]{article}
- usepackage[ngerman]{babel}
- usepackage[utf8x]{inputenc}
- usepackage{hyperref}
- newcounter{book}
- newcounter{subbook}[book]
- defbookagraph#1{stepcounter{book}stepcounter{subbook} paragraph{B arabic{book} -arabic{subbook} #1}expandafterlabel{bookagraph_arabic{book}arabic{subbook}}}
- begin{document}
- arabic{book}
- bookagraph{Heute}
- As seen in nameref{bookagraph_11}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement