How do I convert a markdown file with centered text in atom, using pandoc-convert to pdf?

大憨熊 提交于 2021-01-29 04:29:50

问题


Since markdown does not have any options for centering text, but does allow html inline, I've added a tag which works fine for converting to html, but not to pdf using the pandoc-convert package in atom. How do I convert this file to pdf using pandoc-convert in atom while preserving the centered text.

---
geometry: margin=1.5cm  
---
<center>
<h1> My name</h1>
My Address   
myemail.com, my2ndemail.com    
+1 (999) 999-9999 (cell)    
</center>

#### Markdown Title
>Some block quoted text.

回答1:


The advice from the comment above worked. In general, it appears the pandoc-convert in atom-editor works with latex commands for formatting the text. Looks like I need to learn more LaTeX. This is the code that worked for me in the end.

    ---
geometry: margin=1.5cm  
---

\begin{center}
\Huge My Name
\\ \small My Address
\\ myemail.com, my2ndemail.com    
\\ +1 (999) 999-9999 (cell)    
\end{center}

#### Markdown title
>Some block quoted text.


来源:https://stackoverflow.com/questions/42217126/how-do-i-convert-a-markdown-file-with-centered-text-in-atom-using-pandoc-conver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!