Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controlling text justification in preamble #76

Open
konradzdeb opened this issue May 4, 2021 · 3 comments
Open

Controlling text justification in preamble #76

konradzdeb opened this issue May 4, 2021 · 3 comments

Comments

@konradzdeb
Copy link

Expected Behavior

  • Possible to define whether the text should be left/right justified using a quick switch
  • Possibile to stretch tex to the full length of the top and bottom line

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
Copy link
Owner

mszep commented May 6, 2021

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
Copy link
Author

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
Copy link
Author

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 (353ad13)

% 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,
  ]
``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants