mszep / pandoc_resume

The Markdown Resume
http://mszep.github.io/pandoc_resume/
MIT License
1.65k stars 758 forks source link

Controlling text justification in preamble #76

Open konradzdeb opened 3 years ago

konradzdeb commented 3 years ago

Expected Behavior

Actual Behavior

Arbintary justification

image

image

Steps to reproduce the behavior

Insert longer text in the preamble

> This is longer text that should be justified and, possibly streatched a little  This is longer text that should be justified and, possibly streatched a little This is longer text that should be justified and, possibly streatched a little bla bla bla

Versions

$ pandoc --version && context --version                                                                                                                                                                                                                   
pandoc 2.13
Compiled with pandoc-types 1.22, texmath 0.12.2, skylighting 0.10.5,
citeproc 0.3.0.9, ipynb 0.1.0.1
User data directory: /Users/konrad/.local/share/pandoc
Copyright (C) 2006-2021 John MacFarlane. Web:  https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
mtx-context     | ConTeXt Process Management 1.04
mtx-context     |
mtx-context     | main context file: /usr/local/texlive/2021/texmf-dist/tex/context/base/mkiv/context.mkiv
mtx-context     | current version: 2021.03.05 19:11
mtx-context     | main context file: /usr/local/texlive/2021/texmf-dist/tex/context/base/mkxl/context.mkxl
mtx-context     | current version: 2021.03.05 19:11

OS:

$sw_vers                                                                                                                                                                                                                                                 
ProductName:    macOS
ProductVersion: 11.3.1
BuildVersion:   20E241
mszep commented 3 years ago

Thanks for the bug report -- It is certainly possible to work around this by customising the context template, but it's nontrivial in pure markdown, and therefore should probably be out of scope for this project.

konradzdeb commented 3 years ago

Hi, thanks for replying. It's a good project and very useful. I'll try to have a look and see if I can come up with a PR but that won't be soon

konradzdeb commented 3 years ago

So I had a (very) quick look into the for the styles tex, for quick fix the one could just modify the setupalign call with the right switch, which seems to do the job (353ad13c6bf90cb94107f4f8b638f79773861da3)


% Controles elements relevant for preamble
% List of options for setupalign:
% normal *or* width *or* yes    justified alignment
% middle    centered lines
% flushleft *or* no *or* right  left-aligned (The right is from 'ragged-right'. Don't use it.)
% flushright *or* left  right-aligned (Again, better to not use left.)
% inner Flush to inner margin.
% outer Flush to outer margin.
% disable   Used only for oneliners. Equivalent to flushleft, but something called \parfillskip is set to zero.
% last  Justified, with last line centered.
\setupdelimitedtext
  [blockquote]
  [before={\setupalign[normal]},
   indentnext=no,
  ]
``