我正在使用此命令将 md 文件转换为 tex
pandoc -s --bibliography teatar.bib --filter pandoc-citeproc 1.md -o cit2.tex
当我编译时,我得到了 pdf 文件,但没有斜体和粗体。然而,在 tex 文件中有正确的\emph
和\textbf
标记。
我的 MWE:
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T2A]{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}
\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}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
hidelinks,
pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifluatex
\usepackage{selnolig} % disable illegal ligatures
\fi
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newenvironment{cslreferences}%
{\setlength{\parindent}{0pt}%
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces}%
{\par}
\author{}
\date{}
\begin{document}
\hypertarget{ux43dux430ux441ux43bux43eux432-1-title-1}{%
\section{Наслов 1 Title
1}\label{ux43dux430ux441ux43bux43eux432-1-title-1}}
Некаков текст \emph{италик} и \textbf{болд} Some text \emph{italic} and
\textbf{bold} њитх референце (Alexander 2004, 1)
\hypertarget{ux43fux440ux438ux43aux430ux437ux43dux430ux442ux430-ux438-ux433ux43eux440ux430ux43d-ux441ux43cux435ux43dux438-ux43fux43eux441ux43bux435}{%
\section{Title Наслов}\label{ux43fux440ux438ux43aux430ux437ux43dux430ux442ux430-ux438-ux433ux43eux440ux430ux43d-ux441ux43cux435ux43dux438-ux43fux43eux441ux43bux435}}
Некаков текст \emph{италик} и \textbf{болд} Some text \emph{italic} and
\textbf{bold} with footnote.\footnote{footnote text текст на фуснота.}
\hypertarget{references}{%
\section*{References}\label{references}}
\addcontentsline{toc}{section}{References}
\hypertarget{refs}{}
\begin{cslreferences}
\leavevmode\hypertarget{ref-Alexander.2004}{}%
Alexander, Jeffrey C. 2004. ``Preface.'' In \emph{Cultural trauma and
collective identity}, edited by Jeffrey C. Alexander, vii--ix. Berkeley,
Calif.; London: University of California Press.
\end{cslreferences}
\end{document}
请问有什么帮助吗?
编辑:我的降价来源
# Наслов 1 Title 1
Некаков текст *италик* и **болд**
Some text *italic* and **bold** њитх референце [@Alexander.2004,1]
# Title Наслов
Некаков текст *италик* и **болд**
Some text *italic* and **bold** with footnote.[^1]
[^1]: footnote text текст на фуснота.
# References
答案1
根据@Alan Munn 的建议,我添加\usepackage[macedonian]{babel}
并评论\usepackage{lmodern}
现在我有粗体和斜体。:-)
答案2
以下组合对我有用。
以下是 markdown 源代码:
---
lang: ru-RU
---
# Наслов 1 Title 1
Некаков текст *италик* и **болд**.
[Some text *italic* and **bold**]{lang=en-US} њитх референце.
# Title Наслов
Некаков текст *италик* и **болд**
[Some text *italic* and **bold** with footnote.]{lang=en-US}[^1]
[^1]: [footnote text]{lang=en-US} текст на фуснота.
# References
这Pandoc 手册在第41页:
lang
使用 IETF 语言标签(遵循 BCP 47 标准)识别文档的主要语言,例如 en 或 en-GB。语言子标签查找工具可以查找或验证这些标签。这会影响大多数格式,并在使用 LaTeX(通过 babel 和 polyglossia)或 ConTeXt 时控制 PDF 输出中的连字符。
使用 Pandoc (v. 2.11),使用以下命令,然后使用 pdfTeX 进行编译:
pandoc -t latex -o output.tex source.md -s
您也可以使用以下命令直接生成 PDF:
pandoc -t latex -o output.pdf source.md
输出: