jgm/pandoc

tabs not preserved in converting from docx

Open

#5802 aperta il 7 ott 2019

Vedi su GitHub
 (11 commenti) (0 reazioni) (0 assegnatari)Haskell (3850 fork)batch import
format:Docxgood first issuereader

Metriche repository

Star
 (44.133 star)
Metriche merge PR
 (Merge medio 7g) (7 PR mergiate in 30 g)

Descrizione

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.

Guida contributor