jgm/pandoc

tabs not preserved in converting from docx

Open

#5.802 geöffnet am 7. Okt. 2019

Auf GitHub ansehen
 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Haskell (3.850 Forks)batch import
format:Docxgood first issuereader

Repository-Metriken

Stars
 (44.133 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 7T) (7 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide