Skip to main content
The 2024 Developer Survey results are live! See the results
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 4657 characters in body
Source Link
Britto
  • 113
  • 5

This is the basic code using kaobook template:

% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
%
\documentclass[
  13pt,
  a4paper,
  justified]{kaobook}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
  \setmainfont[]{KpRoman}
  \setsansfont[]{KpSans}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\pagestyle{headings}
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newlength{\cslentryspacingunit} % times entry-spacing
\setlength{\cslentryspacingunit}{\parskip}
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
 {% don't indent paragraphs
  \setlength{\parindent}{0pt}
  % turn on hanging indent if param 1 is 1
  \ifodd #1
  \let\oldpar\par
  \def\par{\hangindent=\cslhangindent\oldpar}
  \fi
  % set entry spacing
  \setlength{\parskip}{#2\cslentryspacingunit}
 }%
 {}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
\ifLuaTeX
\usepackage[bidi=basic]{babel}
\else
\usepackage[bidi=default]{babel}
\fi
\babelprovide[main,import]{brazilian}
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same} % disable monospaced font for URLs
\hypersetup{
  pdfauthor={Christian M. De Britto},
  pdflang={pt-BR},
  colorlinks=true,
  linkcolor={Maroon},
  filecolor={Maroon},
  citecolor={blue},
  urlcolor={Blue},
  pdfcreator={LaTeX via pandoc}}

\author{Christian M. De Britto}
\date{}

\begin{document}

{
\hypersetup{linkcolor=}
\setcounter{tocdepth}{4}
\tableofcontents
}
\hypertarget{cidade-e-transformauxe7uxe3o}{%
\section{Cidade e transformação}\label{cidade-e-transformauxe7uxe3o}}

\hypertarget{afinal-de-contas-o-que-uxe9-a-cidade}{%
\subsection{Afinal de contas, o que é a
cidade?}\label{afinal-de-contas-o-que-uxe9-a-cidade}}

O Sociólogo alemão Georg Simmel (1858-1918) foi um dos primeiros autores
clássicos da sociologia a refletir sobre características da vida urbana.
Segundo ele, a vida urbana é marcada pela intensificação das
experiências. Em suas palavras:

\begin{quote}
O fundamento psicológico sobre o qual se eleva o tipo das
individualidades das grandes cidades é a \textbf{intensificação da vida
nervosa}, que brota da mudança acelerada e ininterrupta das impressões
interiores e exteriores.\footnote{Georg Simmel, \emph{As Grandes Cidades
  e a Vida Do Espírito} ({Covilhã}: {Universidade da Beira Interior},
  2009), 4.}
\end{quote}

\hypertarget{referuxeancias-bibliogruxe1ficas}{%
\subsection*{Referências
Bibliográficas}\label{referuxeancias-bibliogruxe1ficas}}
\addcontentsline{toc}{subsection}{Referências Bibliográficas}

\hypertarget{refs}{}
\begin{CSLReferences}{1}{1}
\leavevmode\vadjust pre{\hypertarget{ref-simmel}{}}%
Simmel, Georg. \emph{As Grandes Cidades e a Vida Do Espírito}.
{Covilhã}: {Universidade da Beira Interior}, 2009.

\end{CSLReferences}

\end{document}

This is the basic code using kaobook template:

% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
%
\documentclass[
  13pt,
  a4paper,
  justified]{kaobook}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
  \setmainfont[]{KpRoman}
  \setsansfont[]{KpSans}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\pagestyle{headings}
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newlength{\cslentryspacingunit} % times entry-spacing
\setlength{\cslentryspacingunit}{\parskip}
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
 {% don't indent paragraphs
  \setlength{\parindent}{0pt}
  % turn on hanging indent if param 1 is 1
  \ifodd #1
  \let\oldpar\par
  \def\par{\hangindent=\cslhangindent\oldpar}
  \fi
  % set entry spacing
  \setlength{\parskip}{#2\cslentryspacingunit}
 }%
 {}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
\ifLuaTeX
\usepackage[bidi=basic]{babel}
\else
\usepackage[bidi=default]{babel}
\fi
\babelprovide[main,import]{brazilian}
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same} % disable monospaced font for URLs
\hypersetup{
  pdfauthor={Christian M. De Britto},
  pdflang={pt-BR},
  colorlinks=true,
  linkcolor={Maroon},
  filecolor={Maroon},
  citecolor={blue},
  urlcolor={Blue},
  pdfcreator={LaTeX via pandoc}}

\author{Christian M. De Britto}
\date{}

\begin{document}

{
\hypersetup{linkcolor=}
\setcounter{tocdepth}{4}
\tableofcontents
}
\hypertarget{cidade-e-transformauxe7uxe3o}{%
\section{Cidade e transformação}\label{cidade-e-transformauxe7uxe3o}}

\hypertarget{afinal-de-contas-o-que-uxe9-a-cidade}{%
\subsection{Afinal de contas, o que é a
cidade?}\label{afinal-de-contas-o-que-uxe9-a-cidade}}

O Sociólogo alemão Georg Simmel (1858-1918) foi um dos primeiros autores
clássicos da sociologia a refletir sobre características da vida urbana.
Segundo ele, a vida urbana é marcada pela intensificação das
experiências. Em suas palavras:

\begin{quote}
O fundamento psicológico sobre o qual se eleva o tipo das
individualidades das grandes cidades é a \textbf{intensificação da vida
nervosa}, que brota da mudança acelerada e ininterrupta das impressões
interiores e exteriores.\footnote{Georg Simmel, \emph{As Grandes Cidades
  e a Vida Do Espírito} ({Covilhã}: {Universidade da Beira Interior},
  2009), 4.}
\end{quote}

\hypertarget{referuxeancias-bibliogruxe1ficas}{%
\subsection*{Referências
Bibliográficas}\label{referuxeancias-bibliogruxe1ficas}}
\addcontentsline{toc}{subsection}{Referências Bibliográficas}

\hypertarget{refs}{}
\begin{CSLReferences}{1}{1}
\leavevmode\vadjust pre{\hypertarget{ref-simmel}{}}%
Simmel, Georg. \emph{As Grandes Cidades e a Vida Do Espírito}.
{Covilhã}: {Universidade da Beira Interior}, 2009.

\end{CSLReferences}

\end{document}
Source Link
Britto
  • 113
  • 5

Pandoc kaobook sidenote issue

I'm using Obsidian to write markdown text in order to export to PDF using pandoc PDFLateX. I'm using using tufte-book class and it's working perfect. The problem is that I'm trying to use kaobook class, but the citations that are automatically shown as sidenote in tufte are being shown as footnote in kaobook.

Is there a way to setup kaoobook to consider all citations as sidenotes automatically as tufte-book class do?

This is the outcome using tufte-book class: enter image description here

This is the outcome using kaobook class: enter image description here