jgm/pandoc

tabs not preserved in converting from docx

Open

#5 802 ouverte le 7 oct. 2019

Voir sur GitHub
 (11 commentaires) (0 réactions) (0 assignés)Haskell (3 850 forks)batch import
format:Docxgood first issuereader

Métriques du dépôt

Stars
 (44 133 stars)
Métriques de merge PR
 (Merge moyen 7j) (7 PRs mergées en 30 j)

Description

Google Docs and Drive, OpenOffice and Microsoft word all have the right tab-stop functionality

docx view

This is how you configure it in Google Document:

  • Type the text you want on the left
  • Click the ruler & "Add right tab-stop"
  • Press "Tab"
  • Type text you want to be right-aligned
  • Adjust the right tab stop to line up with margin (they are 2 different things)

It’s not obvious, but then it works great.

I use TAB + a number to write how long day the task will take.

Now I want to convert it to .pdf with LaTeX and Pandoc, this is the latex document after being converted:

LaTeX view

I have looked at a generated .tex file. This one is produced by a non OpenSource script and they render it right while I don't, this is the difference:

.tex valid result:

\vspace{\baselineskip}
\section*{Task big title\hspace*{10pt}2}
\addcontentsline{toc}{section}{Task big title\hspace*{10pt}2}

\vspace{\baselineskip}
Description task \tabto{6.29in} 2\par

This is what I have in my generated .tex (wrong result):

\section{Task big title 2}\label{task-big-title-2}

Description task 2

I have tried with --preserve-tabs but that doesn't help, tabs are removed when pandoc is isued.

Guide contributeur