jgm/pandoc

tabs not preserved in converting from docx

Open

#5.802 aberto em 7 de out. de 2019

Ver no GitHub
 (11 comments) (0 reactions) (0 assignees)Haskell (3.850 forks)batch import
format:Docxgood first issuereader

Métricas do repositório

Stars
 (44.133 stars)
Métricas de merge de PR
 (Mesclagem média 7d) (7 fundiu PRs em 30d)

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.

Guia do colaborador