public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Line breaks for very longg words  - markdown to pdf or docx
Date: Thu, 24 Aug 2023 10:54:22 +0000	[thread overview]
Message-ID: <ZOc23gCeEWh3Jsqx@localhost> (raw)
In-Reply-To: <888e1e7e-3318-4a0f-b7b1-775b24fbf916n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

For PDF output (via LaTeX), the solution may involve the macro \hyphenation (https://en.wikibooks.org/wiki/TeX/hyphenation). If you know in advance the problematic strings, you can add to the header-includes metadata field e.g.:

\hyphenation{7-6-6-6-7-a-2-0-6-0-e-2-1-b-7-5-f-c-4-4-b-6-3-c-7-8-f-0-6-8-7-3-7-7-6-9-9-6-a-4-3-3-0-2-5-6-2-5-9-d-1-9-1-4-3-b-1-c-e-e-c-b-e-b-f-3-e-2-7-6-3-c-7-b-b-e-c-5-d-0-0-3-0-8-e-f-9-e-c-3-7-7-c-1-e-a-2-1-0-4-8-0-4-0-7-5-2-9-d-7-2-6-1-6-9-5-1-2-8-a-6-b-8-2-7-8-2-e-e-z-a-e-z-a-e-z-a-e-a-z-e-z-a-e-z-a-e-z-a-e-a-z-e-z-a-a-z-e-a-z-e-z-a-e-a-z-e-a-z-e-a-z-e-a-z-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-e-a-1-9-1-9-1-9-1-9}

However, I'm not sure that it will work with strings containing numbers, and it will add a hyphen at the breaking point, which may or may not please you.

If you don't know the content of the document in advance, you could write a filter that collects all such strings (I guess strings containing numbers and letters) and creates a \hyphenation macro as above.

Le Thursday 24 August 2023 à 03:02:51AM, Sami Tahri a écrit :
> Hi,
> 
> I'm just starting to use pandoc and trying to grasp all different concept of
> the project.
> 
> My main use is to generate PDF reports by generating markdowns. This work
> great, but there some issue for specific contents:
> 
> I want to display SHA512 in tables (or a list).
> 
> This is what it looks like : 
> 
> | | |
> | - | - |
> | **Uuid** | 0b5b0899-b3d4-b133-35a2-2870e597f1c8 |
> | **Type** | file |
> | **MD5** | d597272b3eeacb8861280fd4f72be29f |
> | **SHA1** | ae8f214c429848080a16235a14861a14800e6bf3 |
> | **SHA256** | f9b33769ff7832be4e204a9c60a76df83ba122748ecc837750c0a9b63208f0d9
> |
> | **SHA512** |
> 76667a2060e21b75fc44b63c78f06873776996a4330256259d19143b1ceecbebf3e2763c7bbec5d00308ef9ec377c1ea210480407529d7261695128a6b82782eezaezaezaeazezaezaezaeazezaazeazezaeazeazeazeazeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeaeeaeaeaeaeaeaeaeaeaea19191919
> |
> 
> 
> I run the command pandoc test.md -o test.pdf,
> 
> But sadly the SHA512 overflow in the following manner (see attached image). Of
> course, splitting the SHA in multiple strings solve the issue because it will
> considerered as multiple words.
> 
> I tried multiple thing like using a cssfile with word-break, using the columns
> options, etc.
> 
> Is there a way to do linebreaking on all markdown table ? I can modify the
> pandoc template I use, but I don't control the markdown appart from the headers
> (so I can't include custom tags/markdown syntax).
> 
> Thank you in advance for your answers :).
> 
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [2]https://groups.google.com/d/msgid/
> pandoc-discuss/888e1e7e-3318-4a0f-b7b1-775b24fbf916n%40googlegroups.com.
> 
> References:
> 
> [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://groups.google.com/d/msgid/pandoc-discuss/888e1e7e-3318-4a0f-b7b1-775b24fbf916n%40googlegroups.com?utm_medium=email&utm_source=footer


-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ZOc23gCeEWh3Jsqx%40localhost.


      parent reply	other threads:[~2023-08-24 10:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 10:02 Sami Tahri
     [not found] ` <888e1e7e-3318-4a0f-b7b1-775b24fbf916n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-08-24 10:54   ` Bastien DUMONT [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZOc23gCeEWh3Jsqx@localhost \
    --to=bastien.dumont-vwifzpto/vqstnjn9+bgxg@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).